@fluentui-copilot/react-chat-input-plugins 0.0.0-nightly-20251006-0406-b5da4f6a.1 → 0.0.0-nightly-20251010-0406-7df7c6d1.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/package.json +9 -9
- package/dist/index.d.ts +0 -284
- package/lib/BasicFunctionality.js +0 -1
- package/lib/BasicFunctionality.js.map +0 -1
- package/lib/ChatInputEntity.js +0 -2
- package/lib/ChatInputEntity.js.map +0 -1
- package/lib/ChatInputToken.js +0 -1
- package/lib/ChatInputToken.js.map +0 -1
- package/lib/GhostText.js +0 -3
- package/lib/GhostText.js.map +0 -1
- package/lib/ImperativeControl.js +0 -1
- package/lib/ImperativeControl.js.map +0 -1
- package/lib/PasteUnfurling.js +0 -1
- package/lib/PasteUnfurling.js.map +0 -1
- package/lib/components/ChatInputEntity/ChatInputEntity.js +0 -11
- package/lib/components/ChatInputEntity/ChatInputEntity.js.map +0 -1
- package/lib/components/ChatInputEntity/ChatInputEntity.types.js +0 -4
- package/lib/components/ChatInputEntity/ChatInputEntity.types.js.map +0 -1
- package/lib/components/ChatInputEntity/index.js +0 -4
- package/lib/components/ChatInputEntity/index.js.map +0 -1
- package/lib/components/ChatInputEntity/renderChatInputEntity.js +0 -13
- package/lib/components/ChatInputEntity/renderChatInputEntity.js.map +0 -1
- package/lib/components/ChatInputEntity/useChatInputEntity.js +0 -51
- package/lib/components/ChatInputEntity/useChatInputEntity.js.map +0 -1
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.js +0 -47
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.js.map +0 -1
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js +0 -43
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js.map +0 -1
- package/lib/components/ChatInputToken/ChatInputToken.js +0 -11
- package/lib/components/ChatInputToken/ChatInputToken.js.map +0 -1
- package/lib/components/ChatInputToken/ChatInputToken.node.js +0 -59
- package/lib/components/ChatInputToken/ChatInputToken.node.js.map +0 -1
- package/lib/components/ChatInputToken/ChatInputToken.types.js +0 -3
- package/lib/components/ChatInputToken/ChatInputToken.types.js.map +0 -1
- package/lib/components/ChatInputToken/index.js +0 -5
- package/lib/components/ChatInputToken/index.js.map +0 -1
- package/lib/components/ChatInputToken/renderChatInputToken.js +0 -8
- package/lib/components/ChatInputToken/renderChatInputToken.js.map +0 -1
- package/lib/components/ChatInputToken/useChatInputToken.js +0 -23
- package/lib/components/ChatInputToken/useChatInputToken.js.map +0 -1
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.js +0 -20
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.js.map +0 -1
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js +0 -25
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js.map +0 -1
- package/lib/components/GhostText/GhostText.js +0 -11
- package/lib/components/GhostText/GhostText.js.map +0 -1
- package/lib/components/GhostText/GhostText.types.js +0 -4
- package/lib/components/GhostText/GhostText.types.js.map +0 -1
- package/lib/components/GhostText/index.js +0 -4
- package/lib/components/GhostText/index.js.map +0 -1
- package/lib/components/GhostText/renderGhostText.js +0 -13
- package/lib/components/GhostText/renderGhostText.js.map +0 -1
- package/lib/components/GhostText/useGhostText.js +0 -49
- package/lib/components/GhostText/useGhostText.js.map +0 -1
- package/lib/components/GhostText/useGhostTextStyles.styles.js +0 -60
- package/lib/components/GhostText/useGhostTextStyles.styles.js.map +0 -1
- package/lib/components/GhostText/useGhostTextStyles.styles.raw.js +0 -35
- package/lib/components/GhostText/useGhostTextStyles.styles.raw.js.map +0 -1
- package/lib/index.js +0 -6
- package/lib/index.js.map +0 -1
- package/lib/plugins/BasicFunctionality/BasicFunctionality.js +0 -58
- package/lib/plugins/BasicFunctionality/BasicFunctionality.js.map +0 -1
- package/lib/plugins/BasicFunctionality/index.js +0 -1
- package/lib/plugins/BasicFunctionality/index.js.map +0 -1
- package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js +0 -78
- package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js.map +0 -1
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js +0 -42
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +0 -1
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +0 -1
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js.map +0 -1
- package/lib/plugins/ChatInputEntity/index.js +0 -2
- package/lib/plugins/ChatInputEntity/index.js.map +0 -1
- package/lib/plugins/GhostText/GhostText.js +0 -50
- package/lib/plugins/GhostText/GhostText.js.map +0 -1
- package/lib/plugins/GhostText/GhostText.node.js +0 -66
- package/lib/plugins/GhostText/GhostText.node.js.map +0 -1
- package/lib/plugins/GhostText/index.js +0 -2
- package/lib/plugins/GhostText/index.js.map +0 -1
- package/lib/plugins/ImperativeControl/ImperativeControl.js +0 -10
- package/lib/plugins/ImperativeControl/ImperativeControl.js.map +0 -1
- package/lib/plugins/ImperativeControl/index.js +0 -1
- package/lib/plugins/ImperativeControl/index.js.map +0 -1
- package/lib/plugins/ManualGhostText/ManualGhostText.js +0 -14
- package/lib/plugins/ManualGhostText/ManualGhostText.js.map +0 -1
- package/lib/plugins/ManualGhostText/index.js +0 -1
- package/lib/plugins/ManualGhostText/index.js.map +0 -1
- package/lib/plugins/PasteUnfurling/PasteUnfurling.js +0 -19
- package/lib/plugins/PasteUnfurling/PasteUnfurling.js.map +0 -1
- package/lib/plugins/PasteUnfurling/index.js +0 -1
- package/lib/plugins/PasteUnfurling/index.js.map +0 -1
- package/lib-commonjs/BasicFunctionality.js +0 -11
- package/lib-commonjs/BasicFunctionality.js.map +0 -1
- package/lib-commonjs/ChatInputEntity.js +0 -41
- package/lib-commonjs/ChatInputEntity.js.map +0 -1
- package/lib-commonjs/ChatInputToken.js +0 -37
- package/lib-commonjs/ChatInputToken.js.map +0 -1
- package/lib-commonjs/GhostText.js +0 -45
- package/lib-commonjs/GhostText.js.map +0 -1
- package/lib-commonjs/ImperativeControl.js +0 -11
- package/lib-commonjs/ImperativeControl.js.map +0 -1
- package/lib-commonjs/PasteUnfurling.js +0 -11
- package/lib-commonjs/PasteUnfurling.js.map +0 -1
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js +0 -21
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js.map +0 -1
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js +0 -8
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js.map +0 -1
- package/lib-commonjs/components/ChatInputEntity/index.js +0 -31
- package/lib-commonjs/components/ChatInputEntity/index.js.map +0 -1
- package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js +0 -21
- package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js.map +0 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js +0 -52
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js.map +0 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.js +0 -72
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js +0 -59
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.js +0 -21
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js +0 -81
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js +0 -6
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/index.js +0 -41
- package/lib-commonjs/components/ChatInputToken/index.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js +0 -16
- package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputToken.js +0 -24
- package/lib-commonjs/components/ChatInputToken/useChatInputToken.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.js +0 -33
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js +0 -41
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/GhostText/GhostText.js +0 -21
- package/lib-commonjs/components/GhostText/GhostText.js.map +0 -1
- package/lib-commonjs/components/GhostText/GhostText.types.js +0 -8
- package/lib-commonjs/components/GhostText/GhostText.types.js.map +0 -1
- package/lib-commonjs/components/GhostText/index.js +0 -31
- package/lib-commonjs/components/GhostText/index.js.map +0 -1
- package/lib-commonjs/components/GhostText/renderGhostText.js +0 -21
- package/lib-commonjs/components/GhostText/renderGhostText.js.map +0 -1
- package/lib-commonjs/components/GhostText/useGhostText.js +0 -51
- package/lib-commonjs/components/GhostText/useGhostText.js.map +0 -1
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.js +0 -98
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.js.map +0 -1
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.raw.js +0 -51
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/index.js +0 -108
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js +0 -69
- package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js.map +0 -1
- package/lib-commonjs/plugins/BasicFunctionality/index.js +0 -11
- package/lib-commonjs/plugins/BasicFunctionality/index.js.map +0 -1
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js +0 -100
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js.map +0 -1
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js +0 -53
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +0 -1
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +0 -4
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js.map +0 -1
- package/lib-commonjs/plugins/ChatInputEntity/index.js +0 -26
- package/lib-commonjs/plugins/ChatInputEntity/index.js.map +0 -1
- package/lib-commonjs/plugins/GhostText/GhostText.js +0 -60
- package/lib-commonjs/plugins/GhostText/GhostText.js.map +0 -1
- package/lib-commonjs/plugins/GhostText/GhostText.node.js +0 -88
- package/lib-commonjs/plugins/GhostText/GhostText.node.js.map +0 -1
- package/lib-commonjs/plugins/GhostText/index.js +0 -26
- package/lib-commonjs/plugins/GhostText/index.js.map +0 -1
- package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js +0 -21
- package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js.map +0 -1
- package/lib-commonjs/plugins/ImperativeControl/index.js +0 -11
- package/lib-commonjs/plugins/ImperativeControl/index.js.map +0 -1
- package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js +0 -25
- package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js.map +0 -1
- package/lib-commonjs/plugins/ManualGhostText/index.js +0 -11
- package/lib-commonjs/plugins/ManualGhostText/index.js.map +0 -1
- package/lib-commonjs/plugins/PasteUnfurling/PasteUnfurling.js +0 -30
- package/lib-commonjs/plugins/PasteUnfurling/PasteUnfurling.js.map +0 -1
- package/lib-commonjs/plugins/PasteUnfurling/index.js +0 -11
- package/lib-commonjs/plugins/PasteUnfurling/index.js.map +0 -1
|
@@ -1,78 +0,0 @@
|
|
|
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 { ChatInputEntity } from '../../ChatInputEntity';
|
|
5
|
-
export class ChatInputEntityNode extends DecoratorNode {
|
|
6
|
-
static getType() {
|
|
7
|
-
return 'entity';
|
|
8
|
-
}
|
|
9
|
-
static clone(node) {
|
|
10
|
-
return new ChatInputEntityNode(node.__pluginId, node.__text, node.__data, node.__entityProps, node.__key);
|
|
11
|
-
}
|
|
12
|
-
static importJSON(serializedNode) {
|
|
13
|
-
return $createChatInputEntityNode(serializedNode.pluginId, serializedNode.text, serializedNode.data, serializedNode.entityProps);
|
|
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
|
-
pluginId: this.__pluginId,
|
|
27
|
-
text: this.__text,
|
|
28
|
-
data: this.__data,
|
|
29
|
-
entityProps: this.__entityProps,
|
|
30
|
-
type: ChatInputEntityNode.getType(),
|
|
31
|
-
version: 1
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
createDOM() {
|
|
35
|
-
// eslint-disable-next-line no-restricted-globals
|
|
36
|
-
return document.createElement('span');
|
|
37
|
-
}
|
|
38
|
-
updateDOM() {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
decorate(_editor, config) {
|
|
42
|
-
var _this___entityProps;
|
|
43
|
-
if ((_this___entityProps = this.__entityProps) === null || _this___entityProps === void 0 ? void 0 : _this___entityProps.children) {
|
|
44
|
-
return /*#__PURE__*/ React.createElement(ChatInputEntity, this.__entityProps);
|
|
45
|
-
}
|
|
46
|
-
return /*#__PURE__*/ React.createElement(ChatInputEntity, this.__entityProps, this.__text);
|
|
47
|
-
}
|
|
48
|
-
getEntityData() {
|
|
49
|
-
return {
|
|
50
|
-
text: this.__text,
|
|
51
|
-
data: this.__data,
|
|
52
|
-
entityProps: this.__entityProps
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
updateEntityData(data) {
|
|
56
|
-
const writable = this.getWritable();
|
|
57
|
-
writable.__text = data.text;
|
|
58
|
-
writable.__data = data.data;
|
|
59
|
-
writable.__entityProps = data.entityProps;
|
|
60
|
-
}
|
|
61
|
-
constructor(pluginId, text, data, entityProps, key){
|
|
62
|
-
super(key);
|
|
63
|
-
_define_property(this, "__pluginId", void 0);
|
|
64
|
-
_define_property(this, "__text", void 0);
|
|
65
|
-
_define_property(this, "__entityProps", void 0);
|
|
66
|
-
_define_property(this, "__data", void 0);
|
|
67
|
-
this.__pluginId = pluginId;
|
|
68
|
-
this.__text = text;
|
|
69
|
-
this.__data = data;
|
|
70
|
-
this.__entityProps = entityProps;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
export function $createChatInputEntityNode(pluginId, text, data, entityProps, key) {
|
|
74
|
-
return new ChatInputEntityNode(pluginId, text, data, entityProps, key);
|
|
75
|
-
}
|
|
76
|
-
export function $isChatInputEntityNode(node) {
|
|
77
|
-
return node instanceof ChatInputEntityNode;
|
|
78
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ChatInputEntity.node.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { DecoratorNode } from '@fluentui-copilot/text-editor';\nimport type {\n EditorConfig,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n SerializedLexicalNode,\n Spread,\n} from '@fluentui-copilot/text-editor';\nimport type { JSXElement } from '@fluentui/react-components';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\nimport { ChatInputEntity } from '../../ChatInputEntity';\nimport type { ChatInputEntityData } from '@fluentui-copilot/chat-input-plugins';\n\nexport type SerializedChatInputEntityNode<T> = Spread<\n { pluginId: string; text: string; data?: T; entityProps?: ChatInputEntityProps },\n SerializedLexicalNode\n>;\n\nexport class ChatInputEntityNode<T> extends DecoratorNode<JSXElement | null> {\n __pluginId: string;\n __text: string;\n __entityProps?: ChatInputEntityProps;\n __data?: T;\n\n static getType(): string {\n return 'entity';\n }\n static clone<T>(node: ChatInputEntityNode<T>): ChatInputEntityNode<T> {\n return new ChatInputEntityNode(node.__pluginId, node.__text, node.__data, node.__entityProps, node.__key);\n }\n\n static importJSON<T>(serializedNode: SerializedChatInputEntityNode<T>): ChatInputEntityNode<T> {\n return $createChatInputEntityNode(\n serializedNode.pluginId,\n serializedNode.text,\n serializedNode.data,\n serializedNode.entityProps,\n );\n }\n\n isIsolated() {\n return true;\n }\n isInline() {\n return true;\n }\n\n getTextContent(): string {\n return this.__text;\n }\n\n exportJSON(): SerializedChatInputEntityNode<T> {\n return {\n pluginId: this.__pluginId,\n text: this.__text,\n data: this.__data,\n entityProps: this.__entityProps,\n type: ChatInputEntityNode.getType(),\n version: 1,\n };\n }\n\n constructor(pluginId: string, text: string, data?: T, entityProps?: ChatInputEntityProps, key?: NodeKey) {\n super(key);\n this.__pluginId = pluginId;\n this.__text = text;\n this.__data = data;\n this.__entityProps = entityProps;\n }\n\n createDOM(): HTMLElement {\n // eslint-disable-next-line no-restricted-globals\n return document.createElement('span');\n }\n\n updateDOM() {\n return false;\n }\n\n decorate(_editor: LexicalEditor, config: EditorConfig): JSXElement | null {\n if (this.__entityProps?.children) {\n return <ChatInputEntity {...this.__entityProps} />;\n }\n return <ChatInputEntity {...this.__entityProps}>{this.__text}</ChatInputEntity>;\n }\n\n getEntityData(): ChatInputEntityData<T, ChatInputEntityProps> {\n return {\n text: this.__text,\n data: this.__data,\n entityProps: this.__entityProps,\n };\n }\n\n updateEntityData(data: ChatInputEntityData<T, ChatInputEntityProps>) {\n const writable = this.getWritable();\n writable.__text = data.text;\n writable.__data = data.data;\n writable.__entityProps = data.entityProps;\n }\n}\n\nexport function $createChatInputEntityNode<T>(\n pluginId: string,\n text: string,\n data?: T,\n entityProps?: ChatInputEntityProps,\n key?: NodeKey,\n): ChatInputEntityNode<T> {\n return new ChatInputEntityNode(pluginId, text, data, entityProps, key);\n}\n\nexport function $isChatInputEntityNode<T>(node: LexicalNode | null | undefined): node is ChatInputEntityNode<T> {\n return node instanceof ChatInputEntityNode;\n}\n"],"names":["React","DecoratorNode","ChatInputEntity","ChatInputEntityNode","getType","clone","node","__pluginId","__text","__data","__entityProps","__key","importJSON","serializedNode","$createChatInputEntityNode","pluginId","text","data","entityProps","isIsolated","isInline","getTextContent","exportJSON","type","version","createDOM","document","createElement","updateDOM","decorate","_editor","config","children","getEntityData","updateEntityData","writable","getWritable","constructor","key","$isChatInputEntityNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,aAAa,QAAQ,gCAAgC;AAW9D,SAASC,eAAe,QAAQ,wBAAwB;AAQxD,OAAO,MAAMC,4BAA+BF;IAM1C,OAAOG,UAAkB;QACvB,OAAO;IACT;IACA,OAAOC,MAASC,IAA4B,EAA0B;QACpE,OAAO,IAAIH,oBAAoBG,KAAKC,UAAU,EAAED,KAAKE,MAAM,EAAEF,KAAKG,MAAM,EAAEH,KAAKI,aAAa,EAAEJ,KAAKK,KAAK;IAC1G;IAEA,OAAOC,WAAcC,cAAgD,EAA0B;QAC7F,OAAOC,2BACLD,eAAeE,QAAQ,EACvBF,eAAeG,IAAI,EACnBH,eAAeI,IAAI,EACnBJ,eAAeK,WAAW;IAE9B;IAEAC,aAAa;QACX,OAAO;IACT;IACAC,WAAW;QACT,OAAO;IACT;IAEAC,iBAAyB;QACvB,OAAO,IAAI,CAACb,MAAM;IACpB;IAEAc,aAA+C;QAC7C,OAAO;YACLP,UAAU,IAAI,CAACR,UAAU;YACzBS,MAAM,IAAI,CAACR,MAAM;YACjBS,MAAM,IAAI,CAACR,MAAM;YACjBS,aAAa,IAAI,CAACR,aAAa;YAC/Ba,MAAMpB,oBAAoBC,OAAO;YACjCoB,SAAS;QACX;IACF;IAUAC,YAAyB;QACvB,iDAAiD;QACjD,OAAOC,SAASC,aAAa,CAAC;IAChC;IAEAC,YAAY;QACV,OAAO;IACT;IAEAC,SAASC,OAAsB,EAAEC,MAAoB,EAAqB;YACpE;QAAJ,KAAI,sBAAA,IAAI,CAACrB,aAAa,cAAlB,0CAAA,oBAAoBsB,QAAQ,EAAE;YAChC,qBAAO,oBAAC9B,iBAAoB,IAAI,CAACQ,aAAa;QAChD;QACA,qBAAO,oBAACR,iBAAoB,IAAI,CAACQ,aAAa,EAAG,IAAI,CAACF,MAAM;IAC9D;IAEAyB,gBAA8D;QAC5D,OAAO;YACLjB,MAAM,IAAI,CAACR,MAAM;YACjBS,MAAM,IAAI,CAACR,MAAM;YACjBS,aAAa,IAAI,CAACR,aAAa;QACjC;IACF;IAEAwB,iBAAiBjB,IAAkD,EAAE;QACnE,MAAMkB,WAAW,IAAI,CAACC,WAAW;QACjCD,SAAS3B,MAAM,GAAGS,KAAKD,IAAI;QAC3BmB,SAAS1B,MAAM,GAAGQ,KAAKA,IAAI;QAC3BkB,SAASzB,aAAa,GAAGO,KAAKC,WAAW;IAC3C;IArCAmB,YAAYtB,QAAgB,EAAEC,IAAY,EAAEC,IAAQ,EAAEC,WAAkC,EAAEoB,GAAa,CAAE;QACvG,KAAK,CAACA;QA5CR/B,uBAAAA,cAAAA,KAAAA;QACAC,uBAAAA,UAAAA,KAAAA;QACAE,uBAAAA,iBAAAA,KAAAA;QACAD,uBAAAA,UAAAA,KAAAA;QA0CE,IAAI,CAACF,UAAU,GAAGQ;QAClB,IAAI,CAACP,MAAM,GAAGQ;QACd,IAAI,CAACP,MAAM,GAAGQ;QACd,IAAI,CAACP,aAAa,GAAGQ;IACvB;AAgCF;AAEA,OAAO,SAASJ,2BACdC,QAAgB,EAChBC,IAAY,EACZC,IAAQ,EACRC,WAAkC,EAClCoB,GAAa;IAEb,OAAO,IAAInC,oBAAoBY,UAAUC,MAAMC,MAAMC,aAAaoB;AACpE;AAEA,OAAO,SAASC,uBAA0BjC,IAAoC;IAC5E,OAAOA,gBAAgBH;AACzB"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode } from './ChatInputEntity.node';
|
|
4
|
-
import { ChatInputEntityPluginBase } from '@fluentui-copilot/chat-input-plugins';
|
|
5
|
-
export const ChatInputEntityPlugin = (props)=>{
|
|
6
|
-
const { id, controlRef, onChatInputEntityAdded, onChatInputEntityDeleted, skipInitialization } = props;
|
|
7
|
-
const [editor] = useLexicalComposerContext();
|
|
8
|
-
const chatInputEntityPluginBase = React.useRef(null);
|
|
9
|
-
React.useEffect(()=>{
|
|
10
|
-
chatInputEntityPluginBase.current = new ChatInputEntityPluginBase(editor, id, ChatInputEntityNode, $createChatInputEntityNode, $isChatInputEntityNode, onChatInputEntityAdded, onChatInputEntityDeleted);
|
|
11
|
-
return ()=>{
|
|
12
|
-
var _chatInputEntityPluginBase_current;
|
|
13
|
-
return (_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.cleanup();
|
|
14
|
-
};
|
|
15
|
-
}, [
|
|
16
|
-
editor,
|
|
17
|
-
id,
|
|
18
|
-
onChatInputEntityAdded,
|
|
19
|
-
onChatInputEntityDeleted,
|
|
20
|
-
skipInitialization
|
|
21
|
-
]);
|
|
22
|
-
React.useImperativeHandle(controlRef, ()=>({
|
|
23
|
-
insertChatInputEntity (props) {
|
|
24
|
-
var _chatInputEntityPluginBase_current;
|
|
25
|
-
return (_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.insertChatInputEntity(props);
|
|
26
|
-
},
|
|
27
|
-
getActiveEntities () {
|
|
28
|
-
var _chatInputEntityPluginBase_current;
|
|
29
|
-
var _chatInputEntityPluginBase_current_getActiveEntities;
|
|
30
|
-
return (_chatInputEntityPluginBase_current_getActiveEntities = (_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.getActiveEntities()) !== null && _chatInputEntityPluginBase_current_getActiveEntities !== void 0 ? _chatInputEntityPluginBase_current_getActiveEntities : [];
|
|
31
|
-
},
|
|
32
|
-
removeChatInputEntity (keyOrPredicate) {
|
|
33
|
-
var _chatInputEntityPluginBase_current;
|
|
34
|
-
(_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.removeChatInputEntity(keyOrPredicate);
|
|
35
|
-
},
|
|
36
|
-
updateChatInputEntityProps (keyOrPredicate, props) {
|
|
37
|
-
var _chatInputEntityPluginBase_current;
|
|
38
|
-
(_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.updateChatInputEntityProps(keyOrPredicate, props);
|
|
39
|
-
}
|
|
40
|
-
}), []);
|
|
41
|
-
return null;
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ChatInputEntityPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport * as React from 'react';\nimport { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode } from './ChatInputEntity.node';\nimport type { ChatInputEntityPluginRef } from './ChatInputEntityPlugin.types';\nimport type { ChatInputEntityPluginProps } from '@fluentui-copilot/chat-input-plugins';\nimport { ChatInputEntityPluginBase } from '@fluentui-copilot/chat-input-plugins';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\n\nexport const ChatInputEntityPlugin = <ExtraDataType,>(\n props: ChatInputEntityPluginProps<ExtraDataType, ChatInputEntityProps> & {\n controlRef: React.Ref<ChatInputEntityPluginRef<ExtraDataType>>;\n },\n) => {\n const { id, controlRef, onChatInputEntityAdded, onChatInputEntityDeleted, skipInitialization } = props;\n const [editor] = useLexicalComposerContext();\n\n const chatInputEntityPluginBase = React.useRef<ChatInputEntityPluginBase<\n ExtraDataType,\n ChatInputEntityProps,\n ChatInputEntityNode<ExtraDataType>\n > | null>(null);\n\n React.useEffect(() => {\n chatInputEntityPluginBase.current = new ChatInputEntityPluginBase<\n ExtraDataType,\n ChatInputEntityProps,\n ChatInputEntityNode<ExtraDataType>\n >(\n editor,\n id,\n ChatInputEntityNode,\n $createChatInputEntityNode,\n $isChatInputEntityNode,\n onChatInputEntityAdded,\n onChatInputEntityDeleted,\n );\n\n return () => chatInputEntityPluginBase.current?.cleanup();\n }, [editor, id, onChatInputEntityAdded, onChatInputEntityDeleted, skipInitialization]);\n\n React.useImperativeHandle(\n controlRef,\n () => ({\n insertChatInputEntity(props) {\n return chatInputEntityPluginBase.current?.insertChatInputEntity(props);\n },\n\n getActiveEntities() {\n return chatInputEntityPluginBase.current?.getActiveEntities() ?? [];\n },\n\n removeChatInputEntity(keyOrPredicate) {\n chatInputEntityPluginBase.current?.removeChatInputEntity(keyOrPredicate);\n },\n\n updateChatInputEntityProps(keyOrPredicate, props) {\n chatInputEntityPluginBase.current?.updateChatInputEntityProps(keyOrPredicate, props);\n },\n }),\n [],\n );\n return null;\n};\n"],"names":["useLexicalComposerContext","React","$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntityNode","ChatInputEntityPluginBase","ChatInputEntityPlugin","props","id","controlRef","onChatInputEntityAdded","onChatInputEntityDeleted","skipInitialization","editor","chatInputEntityPluginBase","useRef","useEffect","current","cleanup","useImperativeHandle","insertChatInputEntity","getActiveEntities","removeChatInputEntity","keyOrPredicate","updateChatInputEntityProps"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,yBAAyB,QAAQ,sCAAsC;AAChF,YAAYC,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,EAAEC,sBAAsB,EAAEC,mBAAmB,QAAQ,yBAAyB;AAGjH,SAASC,yBAAyB,QAAQ,uCAAuC;AAGjF,OAAO,MAAMC,wBAAwB,CACnCC;IAIA,MAAM,EAAEC,EAAE,EAAEC,UAAU,EAAEC,sBAAsB,EAAEC,wBAAwB,EAAEC,kBAAkB,EAAE,GAAGL;IACjG,MAAM,CAACM,OAAO,GAAGb;IAEjB,MAAMc,4BAA4Bb,MAAMc,MAAM,CAIpC;IAEVd,MAAMe,SAAS,CAAC;QACdF,0BAA0BG,OAAO,GAAG,IAAIZ,0BAKtCQ,QACAL,IACAJ,qBACAF,4BACAC,wBACAO,wBACAC;QAGF,OAAO;gBAAMG;oBAAAA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCI,OAAO;;IACzD,GAAG;QAACL;QAAQL;QAAIE;QAAwBC;QAA0BC;KAAmB;IAErFX,MAAMkB,mBAAmB,CACvBV,YACA,IAAO,CAAA;YACLW,uBAAsBb,KAAK;oBAClBO;gBAAP,QAAOA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCM,qBAAqB,CAACb;YAClE;YAEAc;oBACSP;oBAAAA;gBAAP,OAAOA,CAAAA,wDAAAA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCO,iBAAiB,gBAApDP,kEAAAA,uDAA0D,EAAE;YACrE;YAEAQ,uBAAsBC,cAAc;oBAClCT;iBAAAA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCQ,qBAAqB,CAACC;YAC3D;YAEAC,4BAA2BD,cAAc,EAAEhB,KAAK;oBAC9CO;iBAAAA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCU,0BAA0B,CAACD,gBAAgBhB;YAChF;QACF,CAAA,GACA,EAAE;IAEJ,OAAO;AACT,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ChatInputEntityPlugin.types.ts"],"sourcesContent":["import type { ChatInputEntityData } from '@fluentui-copilot/chat-input-plugins';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\n\nexport type ChatInputEntityPluginRef<ExtraDataType = undefined> = {\n // Inserts a new entity and returns its key, to be used by removeChatInputEntity or updateChatInputEntityProps\n insertChatInputEntity: (props: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>) => string | undefined;\n // Removes an entity by its key, or removes all entities that match a predicate function\n removeChatInputEntity: (\n keyOrPredicate: string | ((entity: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>, i: number) => boolean),\n ) => void;\n // Updates an entity by its key, or removes all entities that match a predicate function\n updateChatInputEntityProps: (\n keyOrPredicate: string | ((entity: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>, i: number) => boolean),\n props:\n | ChatInputEntityData<ExtraDataType, ChatInputEntityProps>\n | ((\n oldProps: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>,\n ) => ChatInputEntityData<ExtraDataType, ChatInputEntityProps>),\n ) => void;\n getActiveEntities: () => ChatInputEntityData<ExtraDataType, ChatInputEntityProps>[];\n};\n"],"names":[],"rangeMappings":"","mappings":"AAGA,WAiBE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { SerializedChatInputEntityNode } from './ChatInputEntity.node';\nexport { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode } from './ChatInputEntity.node';\nexport { ChatInputEntityPlugin } from './ChatInputEntityPlugin';\nexport type { ChatInputEntityPluginRef } from './ChatInputEntityPlugin.types';\n"],"names":["$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntityNode","ChatInputEntityPlugin"],"rangeMappings":";","mappings":"AACA,SAASA,0BAA0B,EAAEC,sBAAsB,EAAEC,mBAAmB,QAAQ,yBAAyB;AACjH,SAASC,qBAAqB,QAAQ,0BAA0B"}
|
|
@@ -1,50 +0,0 @@
|
|
|
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
|
-
'use no memo';
|
|
8
|
-
const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;
|
|
9
|
-
const [editor] = useLexicalComposerContext();
|
|
10
|
-
const [ghostTextBase, setGhostTextBase] = React.useState(null);
|
|
11
|
-
React.useEffect(()=>{
|
|
12
|
-
setGhostTextBase(new GhostTextPluginBase(editor, id, $getGhostText, GhostTextNode, $createGhostTextNode, ghostTextProps, exposeText, allowCompletion));
|
|
13
|
-
return ()=>{
|
|
14
|
-
setGhostTextBase((prev)=>{
|
|
15
|
-
prev === null || prev === void 0 ? void 0 : prev.cleanup();
|
|
16
|
-
return null;
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
}, // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting
|
|
20
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21
|
-
[
|
|
22
|
-
editor,
|
|
23
|
-
id
|
|
24
|
-
]);
|
|
25
|
-
React.useEffect(()=>{
|
|
26
|
-
ghostTextBase === null || ghostTextBase === void 0 ? void 0 : ghostTextBase.setAllowCompletion(allowCompletion);
|
|
27
|
-
}, [
|
|
28
|
-
allowCompletion,
|
|
29
|
-
ghostTextBase
|
|
30
|
-
]);
|
|
31
|
-
React.useEffect(()=>{
|
|
32
|
-
ghostTextBase === null || ghostTextBase === void 0 ? void 0 : ghostTextBase.setComponentProps(ghostTextProps);
|
|
33
|
-
}, [
|
|
34
|
-
ghostTextBase,
|
|
35
|
-
ghostTextProps
|
|
36
|
-
]);
|
|
37
|
-
React.useEffect(()=>{
|
|
38
|
-
ghostTextBase === null || ghostTextBase === void 0 ? void 0 : ghostTextBase.setExposeText(exposeText);
|
|
39
|
-
}, [
|
|
40
|
-
exposeText,
|
|
41
|
-
ghostTextBase
|
|
42
|
-
]);
|
|
43
|
-
React.useEffect(()=>{
|
|
44
|
-
ghostTextBase === null || ghostTextBase === void 0 ? void 0 : ghostTextBase.setGetGhostText($getGhostText);
|
|
45
|
-
}, [
|
|
46
|
-
$getGhostText,
|
|
47
|
-
ghostTextBase
|
|
48
|
-
]);
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-components';\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): JSXElement | null {\n 'use no memo';\n\n const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;\n const [editor] = useLexicalComposerContext();\n\n const [ghostTextBase, setGhostTextBase] = React.useState<GhostTextPluginBase<GhostTextProps> | null>(null);\n\n React.useEffect(\n () => {\n setGhostTextBase(\n new GhostTextPluginBase(\n editor,\n id,\n $getGhostText,\n GhostTextNode,\n $createGhostTextNode,\n ghostTextProps,\n exposeText,\n allowCompletion,\n ),\n );\n\n return () => {\n setGhostTextBase(prev => {\n prev?.cleanup();\n return null;\n });\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?.setAllowCompletion(allowCompletion);\n }, [allowCompletion, ghostTextBase]);\n\n React.useEffect(() => {\n ghostTextBase?.setComponentProps(ghostTextProps);\n }, [ghostTextBase, ghostTextProps]);\n\n React.useEffect(() => {\n ghostTextBase?.setExposeText(exposeText);\n }, [exposeText, ghostTextBase]);\n\n React.useEffect(() => {\n ghostTextBase?.setGetGhostText($getGhostText);\n }, [$getGhostText, ghostTextBase]);\n\n return null;\n}\n"],"names":["React","useLexicalComposerContext","$createGhostTextNode","GhostTextNode","GhostTextPluginBase","GhostTextPlugin","props","$getGhostText","id","ghostTextProps","exposeText","allowCompletion","editor","ghostTextBase","setGhostTextBase","useState","useEffect","prev","cleanup","setAllowCompletion","setComponentProps","setExposeText","setGetGhostText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,yBAAyB,QAAQ,sCAAsC;AAGhF,SAASC,oBAAoB,QAAQ,kBAAkB;AACvD,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,mBAAmB,QAAQ,uCAAuC;AAe3E,OAAO,SAASC,gBAAgBC,KAA2B;IACzD;IAEA,MAAM,EAAEC,aAAa,EAAEC,EAAE,EAAEC,cAAc,EAAEC,UAAU,EAAEC,eAAe,EAAE,GAAGL;IAC3E,MAAM,CAACM,OAAO,GAAGX;IAEjB,MAAM,CAACY,eAAeC,iBAAiB,GAAGd,MAAMe,QAAQ,CAA6C;IAErGf,MAAMgB,SAAS,CACb;QACEF,iBACE,IAAIV,oBACFQ,QACAJ,IACAD,eACAJ,eACAD,sBACAO,gBACAC,YACAC;QAIJ,OAAO;YACLG,iBAAiBG,CAAAA;gBACfA,iBAAAA,2BAAAA,KAAMC,OAAO;gBACb,OAAO;YACT;QACF;IACF,GACA,wHAAwH;IACxH,uDAAuD;IACvD;QAACN;QAAQJ;KAAG;IAGdR,MAAMgB,SAAS,CAAC;QACdH,0BAAAA,oCAAAA,cAAeM,kBAAkB,CAACR;IACpC,GAAG;QAACA;QAAiBE;KAAc;IAEnCb,MAAMgB,SAAS,CAAC;QACdH,0BAAAA,oCAAAA,cAAeO,iBAAiB,CAACX;IACnC,GAAG;QAACI;QAAeJ;KAAe;IAElCT,MAAMgB,SAAS,CAAC;QACdH,0BAAAA,oCAAAA,cAAeQ,aAAa,CAACX;IAC/B,GAAG;QAACA;QAAYG;KAAc;IAE9Bb,MAAMgB,SAAS,CAAC;QACdH,0BAAAA,oCAAAA,cAAeS,eAAe,CAACf;IACjC,GAAG;QAACA;QAAeM;KAAc;IAEjC,OAAO;AACT"}
|
|
@@ -1,66 +0,0 @@
|
|
|
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
|
-
type: 'ghosttext',
|
|
19
|
-
id: this.__id,
|
|
20
|
-
content: this.__content,
|
|
21
|
-
componentProps: this.__componentProps,
|
|
22
|
-
exposeText: this.__exposeText,
|
|
23
|
-
version: 1
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
isInline() {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
isIsolated() {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
getTextContent() {
|
|
33
|
-
return this.__exposeText ? this.__content : '';
|
|
34
|
-
}
|
|
35
|
-
updateDOM(prevNode, dom, config) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
createDOM(config) {
|
|
39
|
-
// eslint-disable-next-line no-restricted-globals
|
|
40
|
-
return document.createElement('span');
|
|
41
|
-
}
|
|
42
|
-
decorate() {
|
|
43
|
-
return /*#__PURE__*/ React.createElement(GhostText, {
|
|
44
|
-
nodeKey: this.getKey(),
|
|
45
|
-
...this.__componentProps
|
|
46
|
-
}, this.__content);
|
|
47
|
-
}
|
|
48
|
-
constructor(id, content, exposeText, componentProps, key){
|
|
49
|
-
super(key);
|
|
50
|
-
_define_property(this, "__content", void 0);
|
|
51
|
-
_define_property(this, "__id", void 0);
|
|
52
|
-
_define_property(this, "__allowCommitting", void 0);
|
|
53
|
-
_define_property(this, "__componentProps", void 0);
|
|
54
|
-
_define_property(this, "__exposeText", void 0);
|
|
55
|
-
this.__id = id;
|
|
56
|
-
this.__content = content;
|
|
57
|
-
this.__exposeText = exposeText;
|
|
58
|
-
this.__componentProps = componentProps;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
export function $createGhostTextNode(id, content, exposeText, componentProps) {
|
|
62
|
-
return new GhostTextNode(id, content, exposeText, componentProps);
|
|
63
|
-
}
|
|
64
|
-
export function $isGhostTextNode(node) {
|
|
65
|
-
return node instanceof GhostTextNode;
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.node.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-components';\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<JSXElement | 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 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 isIsolated() {\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 // eslint-disable-next-line no-restricted-globals\n return document.createElement('span');\n }\n\n decorate(): JSXElement | null {\n return (\n <GhostText nodeKey={this.getKey()} {...this.__componentProps}>\n {this.__content}\n </GhostText>\n );\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","isIsolated","getTextContent","updateDOM","prevNode","dom","config","createDOM","document","createElement","decorate","nodeKey","getKey","constructor","key","__allowCommitting","$isGhostTextNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,YAAYA,WAAW,QAAQ;AAG/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;YACLC,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,aAAa;QACX,OAAO;IACT;IAEAC,iBAAyB;QACvB,OAAO,IAAI,CAAChB,YAAY,GAAG,IAAI,CAACD,SAAS,GAAG;IAC9C;IAEAkB,UAAUC,QAAiB,EAAEC,GAAgB,EAAEC,MAAoB,EAAW;QAC5E,OAAO;IACT;IAEAC,UAAUD,MAAoB,EAAe;QAC3C,iDAAiD;QACjD,OAAOE,SAASC,aAAa,CAAC;IAChC;IAEAC,WAA8B;QAC5B,qBACE,oBAAC9B;YAAU+B,SAAS,IAAI,CAACC,MAAM;YAAK,GAAG,IAAI,CAACzB,gBAAgB;WACzD,IAAI,CAACF,SAAS;IAGrB;IAnCA4B,YAAYpB,EAAU,EAAEC,OAAe,EAAEC,UAAoB,EAAEC,cAA+B,EAAEkB,GAAa,CAAE;QAC7G,KAAK,CAACA;QApCR7B,uBAAAA,aAAAA,KAAAA;QACAD,uBAAAA,QAAAA,KAAAA;QACA+B,uBAAAA,qBAAAA,KAAAA;QACA5B,uBAAAA,oBAAAA,KAAAA;QACAD,uBAAAA,gBAAAA,KAAAA;QAiCE,IAAI,CAACF,IAAI,GAAGS;QACZ,IAAI,CAACR,SAAS,GAAGS;QACjB,IAAI,CAACR,YAAY,GAAGS;QACpB,IAAI,CAACR,gBAAgB,GAAGS;IAC1B;AA8BF;AAEA,OAAO,SAASJ,qBACdC,EAAU,EACVC,OAAe,EACfC,UAAoB,EACpBC,cAA+B;IAE/B,OAAO,IAAIf,cAAcY,IAAIC,SAASC,YAAYC;AACpD;AAEA,OAAO,SAASoB,iBAAiBjC,IAAoC;IACnE,OAAOA,gBAAgBF;AACzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { GhostTextPluginProps } from './GhostText';\nexport { GhostTextPlugin } from './GhostText';\nexport type { SerializedGhostTextNode } from './GhostText.node';\nexport { $createGhostTextNode, $isGhostTextNode, GhostTextNode } from './GhostText.node';\n"],"names":["GhostTextPlugin","$createGhostTextNode","$isGhostTextNode","GhostTextNode"],"rangeMappings":";","mappings":"AACA,SAASA,eAAe,QAAQ,cAAc;AAE9C,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,mBAAmB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
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), [
|
|
7
|
-
editor
|
|
8
|
-
]);
|
|
9
|
-
return null;
|
|
10
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
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"],"rangeMappings":";;;;;;;;;","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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ImperativeControlPlugin } from './ImperativeControl';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './ImperativeControl';\nexport { ImperativeControlPlugin } from './ImperativeControl';\n"],"names":["ImperativeControlPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,uBAAuB,QAAQ,sBAAsB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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 { id } = props;
|
|
7
|
-
const [editor] = useLexicalComposerContext();
|
|
8
|
-
React.useImperativeHandle(ref, ()=>new ManualGhostTextBase(editor, id, $isGhostTextNode, $createGhostTextNode), [
|
|
9
|
-
editor,
|
|
10
|
-
id
|
|
11
|
-
]);
|
|
12
|
-
return null;
|
|
13
|
-
});
|
|
14
|
-
ManualGhostTextPlugin.displayName = 'ManualGhostTextPlugin';
|
|
@@ -1 +0,0 @@
|
|
|
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 type { IManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';\nimport { ManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type ManualGhostTextProps = {\n id: string;\n};\n\nexport type ManualGhostTextRef = IManualGhostTextBase<GhostTextProps>;\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"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,sCAAsC;AAEhF,SAASC,oBAAoB,EAAEC,gBAAgB,QAAQ,kBAAkB;AAEzE,SAASC,mBAAmB,QAAQ,uCAAuC;AAQ3E,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ManualGhostTextPlugin } from './ManualGhostText';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { ManualGhostTextProps, ManualGhostTextRef } from './ManualGhostText';\nexport { ManualGhostTextPlugin } from './ManualGhostText';\n"],"names":["ManualGhostTextPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,qBAAqB,QAAQ,oBAAoB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { registerPasteUnfurlingPlugin } from '@fluentui-copilot/chat-input-plugins';
|
|
3
|
-
import { $createChatInputEntityNode } from '../../ChatInputEntity';
|
|
4
|
-
import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
|
|
5
|
-
export const PasteUnfurlingPlugin = (props)=>{
|
|
6
|
-
const { $createEntityNode = $createChatInputEntityNode, ...rest } = props;
|
|
7
|
-
const [editor] = useLexicalComposerContext();
|
|
8
|
-
React.useEffect(()=>{
|
|
9
|
-
return registerPasteUnfurlingPlugin(editor, {
|
|
10
|
-
...rest,
|
|
11
|
-
$createEntityNode
|
|
12
|
-
});
|
|
13
|
-
}, [
|
|
14
|
-
$createEntityNode,
|
|
15
|
-
editor,
|
|
16
|
-
rest
|
|
17
|
-
]);
|
|
18
|
-
return null;
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["import * as React from 'react';\nimport { registerPasteUnfurlingPlugin, type PasteUnfurlingPluginBaseProps } from '@fluentui-copilot/chat-input-plugins';\nimport { $createChatInputEntityNode, type ChatInputEntityProps } from '../../ChatInputEntity';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\n\nexport type PasteUnfurlingPluginProps<ExtraDataType> = Omit<\n PasteUnfurlingPluginBaseProps<ExtraDataType, ChatInputEntityProps>,\n '$createEntityNode'\n> &\n Pick<Partial<PasteUnfurlingPluginBaseProps<ExtraDataType, ChatInputEntityProps>>, '$createEntityNode'>;\n\nexport const PasteUnfurlingPlugin = <ExtraDataType>(props: PasteUnfurlingPluginProps<ExtraDataType>) => {\n const { $createEntityNode = $createChatInputEntityNode, ...rest } = props;\n\n const [editor] = useLexicalComposerContext();\n\n React.useEffect(() => {\n return registerPasteUnfurlingPlugin(editor, { ...rest, $createEntityNode });\n }, [$createEntityNode, editor, rest]);\n\n return null;\n};\n"],"names":["React","registerPasteUnfurlingPlugin","$createChatInputEntityNode","useLexicalComposerContext","PasteUnfurlingPlugin","props","$createEntityNode","rest","editor","useEffect"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAA4C,uCAAuC;AACxH,SAASC,0BAA0B,QAAmC,wBAAwB;AAC9F,SAASC,yBAAyB,QAAQ,sCAAsC;AAQhF,OAAO,MAAMC,uBAAuB,CAAgBC;IAClD,MAAM,EAAEC,oBAAoBJ,0BAA0B,EAAE,GAAGK,MAAM,GAAGF;IAEpE,MAAM,CAACG,OAAO,GAAGL;IAEjBH,MAAMS,SAAS,CAAC;QACd,OAAOR,6BAA6BO,QAAQ;YAAE,GAAGD,IAAI;YAAED;QAAkB;IAC3E,GAAG;QAACA;QAAmBE;QAAQD;KAAK;IAEpC,OAAO;AACT,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { PasteUnfurlingPlugin } from './PasteUnfurling';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { PasteUnfurlingPluginProps } from './PasteUnfurling';\nexport { PasteUnfurlingPlugin } from './PasteUnfurling';\n"],"names":["PasteUnfurlingPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,oBAAoB,QAAQ,mBAAmB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "BasicFunctionalityPlugin", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _index.BasicFunctionalityPlugin;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _index = require("./plugins/BasicFunctionality/index");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["BasicFunctionality.ts"],"sourcesContent":["export type { BasicFunctionalityPluginProps, BasicFunctionalityPluginRef } from './plugins/BasicFunctionality/index';\nexport { BasicFunctionalityPlugin } from './plugins/BasicFunctionality/index';\n"],"names":["BasicFunctionalityPlugin"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BACSA;;;eAAAA,+BAAwB;;;uBAAQ"}
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
$createChatInputEntityNode: function() {
|
|
13
|
-
return _index1.$createChatInputEntityNode;
|
|
14
|
-
},
|
|
15
|
-
$isChatInputEntityNode: function() {
|
|
16
|
-
return _index1.$isChatInputEntityNode;
|
|
17
|
-
},
|
|
18
|
-
ChatInputEntity: function() {
|
|
19
|
-
return _index.ChatInputEntity;
|
|
20
|
-
},
|
|
21
|
-
ChatInputEntityNode: function() {
|
|
22
|
-
return _index1.ChatInputEntityNode;
|
|
23
|
-
},
|
|
24
|
-
ChatInputEntityPlugin: function() {
|
|
25
|
-
return _index1.ChatInputEntityPlugin;
|
|
26
|
-
},
|
|
27
|
-
chatInputEntityClassNames: function() {
|
|
28
|
-
return _index.chatInputEntityClassNames;
|
|
29
|
-
},
|
|
30
|
-
renderChatInputEntity_unstable: function() {
|
|
31
|
-
return _index.renderChatInputEntity_unstable;
|
|
32
|
-
},
|
|
33
|
-
useChatInputEntityStyles_unstable: function() {
|
|
34
|
-
return _index.useChatInputEntityStyles_unstable;
|
|
35
|
-
},
|
|
36
|
-
useChatInputEntity_unstable: function() {
|
|
37
|
-
return _index.useChatInputEntity_unstable;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const _index = require("./components/ChatInputEntity/index");
|
|
41
|
-
const _index1 = require("./plugins/ChatInputEntity/index");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ChatInputEntity.ts"],"sourcesContent":["export type { ChatInputEntityProps, ChatInputEntitySlots, ChatInputEntityState } from './components/ChatInputEntity/index';\nexport { ChatInputEntity, chatInputEntityClassNames, renderChatInputEntity_unstable, useChatInputEntityStyles_unstable, useChatInputEntity_unstable } from './components/ChatInputEntity/index';\nexport type { ChatInputEntityPluginRef, SerializedChatInputEntityNode } from './plugins/ChatInputEntity/index';\nexport { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode, ChatInputEntityPlugin } from './plugins/ChatInputEntity/index';\n"],"names":["$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntity","ChatInputEntityNode","ChatInputEntityPlugin","chatInputEntityClassNames","renderChatInputEntity_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGSA,0BAA0B;eAA1BA,kCAA0B;;IAAEC,sBAAsB;eAAtBA,8BAAsB;;IAFlDC,eAAe;eAAfA,sBAAe;;IAEqCC,mBAAmB;eAAnBA,2BAAmB;;IAAEC,qBAAqB;eAArBA,6BAAqB;;IAF7EC,yBAAyB;eAAzBA,gCAAyB;;IAAEC,8BAA8B;eAA9BA,qCAA8B;;IAAEC,iCAAiC;eAAjCA,wCAAiC;;IAAEC,2BAA2B;eAA3BA,kCAA2B;;;uBAAQ;wBAE5C"}
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
$createChatInputTokenNode: function() {
|
|
13
|
-
return _index.$createChatInputTokenNode;
|
|
14
|
-
},
|
|
15
|
-
$isChatInputTokenNode: function() {
|
|
16
|
-
return _index.$isChatInputTokenNode;
|
|
17
|
-
},
|
|
18
|
-
ChatInputToken: function() {
|
|
19
|
-
return _index.ChatInputToken;
|
|
20
|
-
},
|
|
21
|
-
ChatInputTokenNode: function() {
|
|
22
|
-
return _index.ChatInputTokenNode;
|
|
23
|
-
},
|
|
24
|
-
chatInputTokenClassNames: function() {
|
|
25
|
-
return _index.chatInputTokenClassNames;
|
|
26
|
-
},
|
|
27
|
-
renderChatInputToken_unstable: function() {
|
|
28
|
-
return _index.renderChatInputToken_unstable;
|
|
29
|
-
},
|
|
30
|
-
useChatInputTokenStyles_unstable: function() {
|
|
31
|
-
return _index.useChatInputTokenStyles_unstable;
|
|
32
|
-
},
|
|
33
|
-
useChatInputToken_unstable: function() {
|
|
34
|
-
return _index.useChatInputToken_unstable;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const _index = require("./components/ChatInputToken/index");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ChatInputToken.ts"],"sourcesContent":["export type { ChatInputTokenProps, ChatInputTokenSlots, ChatInputTokenState, SerializedChatInputTokenNode } from './components/ChatInputToken/index';\nexport { $createChatInputTokenNode, $isChatInputTokenNode, ChatInputToken, ChatInputTokenNode, chatInputTokenClassNames, renderChatInputToken_unstable, useChatInputTokenStyles_unstable, useChatInputToken_unstable } from './components/ChatInputToken/index';\n"],"names":["$createChatInputTokenNode","$isChatInputTokenNode","ChatInputToken","ChatInputTokenNode","chatInputTokenClassNames","renderChatInputToken_unstable","useChatInputTokenStyles_unstable","useChatInputToken_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,yBAAyB;eAAzBA,gCAAyB;;IAAEC,qBAAqB;eAArBA,4BAAqB;;IAAEC,cAAc;eAAdA,qBAAc;;IAAEC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IAAEC,gCAAgC;eAAhCA,uCAAgC;;IAAEC,0BAA0B;eAA1BA,iCAA0B;;;uBAAQ"}
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
$createGhostTextNode: function() {
|
|
13
|
-
return _index1.$createGhostTextNode;
|
|
14
|
-
},
|
|
15
|
-
$isGhostTextNode: function() {
|
|
16
|
-
return _index1.$isGhostTextNode;
|
|
17
|
-
},
|
|
18
|
-
GhostText: function() {
|
|
19
|
-
return _index.GhostText;
|
|
20
|
-
},
|
|
21
|
-
GhostTextNode: function() {
|
|
22
|
-
return _index1.GhostTextNode;
|
|
23
|
-
},
|
|
24
|
-
GhostTextPlugin: function() {
|
|
25
|
-
return _index1.GhostTextPlugin;
|
|
26
|
-
},
|
|
27
|
-
ManualGhostTextPlugin: function() {
|
|
28
|
-
return _index2.ManualGhostTextPlugin;
|
|
29
|
-
},
|
|
30
|
-
ghostTextClassNames: function() {
|
|
31
|
-
return _index.ghostTextClassNames;
|
|
32
|
-
},
|
|
33
|
-
renderGhostText_unstable: function() {
|
|
34
|
-
return _index.renderGhostText_unstable;
|
|
35
|
-
},
|
|
36
|
-
useGhostTextStyles_unstable: function() {
|
|
37
|
-
return _index.useGhostTextStyles_unstable;
|
|
38
|
-
},
|
|
39
|
-
useGhostText_unstable: function() {
|
|
40
|
-
return _index.useGhostText_unstable;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const _index = require("./components/GhostText/index");
|
|
44
|
-
const _index1 = require("./plugins/GhostText/index");
|
|
45
|
-
const _index2 = require("./plugins/ManualGhostText/index");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.ts"],"sourcesContent":["export type { GhostTextProps, GhostTextSlots, GhostTextState } from './components/GhostText/index';\nexport { GhostText, ghostTextClassNames, renderGhostText_unstable, useGhostTextStyles_unstable, useGhostText_unstable } from './components/GhostText/index';\nexport type { GhostTextPluginProps, SerializedGhostTextNode } from './plugins/GhostText/index';\nexport { $createGhostTextNode, $isGhostTextNode, GhostTextNode, GhostTextPlugin } from './plugins/GhostText/index';\nexport type { ManualGhostTextProps, ManualGhostTextRef } from './plugins/ManualGhostText/index';\nexport { ManualGhostTextPlugin } from './plugins/ManualGhostText/index';\n"],"names":["$createGhostTextNode","$isGhostTextNode","GhostText","GhostTextNode","GhostTextPlugin","ManualGhostTextPlugin","ghostTextClassNames","renderGhostText_unstable","useGhostTextStyles_unstable","useGhostText_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGSA,oBAAoB;eAApBA,4BAAoB;;IAAEC,gBAAgB;eAAhBA,wBAAgB;;IAFtCC,SAAS;eAATA,gBAAS;;IAE+BC,aAAa;eAAbA,qBAAa;;IAAEC,eAAe;eAAfA,uBAAe;;IAEtEC,qBAAqB;eAArBA,6BAAqB;;IAJVC,mBAAmB;eAAnBA,0BAAmB;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,2BAA2B;eAA3BA,kCAA2B;;IAAEC,qBAAqB;eAArBA,4BAAqB;;;uBAAQ;wBAEtC;wBAEjD"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "ImperativeControlPlugin", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _index.ImperativeControlPlugin;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _index = require("./plugins/ImperativeControl/index");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ImperativeControl.ts"],"sourcesContent":["export type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './plugins/ImperativeControl/index';\nexport { ImperativeControlPlugin } from './plugins/ImperativeControl/index';\n"],"names":["ImperativeControlPlugin"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BACSA;;;eAAAA,8BAAuB;;;uBAAQ"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "PasteUnfurlingPlugin", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _index.PasteUnfurlingPlugin;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _index = require("./plugins/PasteUnfurling/index");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["export type { PasteUnfurlingPluginProps } from './plugins/PasteUnfurling/index';\nexport { PasteUnfurlingPlugin } from './plugins/PasteUnfurling/index';\n"],"names":["PasteUnfurlingPlugin"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BACSA;;;eAAAA,2BAAoB;;;uBAAQ"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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 _useChatInputEntityStylesstyles = require("./useChatInputEntityStyles.styles");
|
|
16
|
-
const ChatInputEntity = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
-
const state = (0, _useChatInputEntity.useChatInputEntity_unstable)(props, ref);
|
|
18
|
-
(0, _useChatInputEntityStylesstyles.useChatInputEntityStyles_unstable)(state);
|
|
19
|
-
return (0, _renderChatInputEntity.renderChatInputEntity_unstable)(state);
|
|
20
|
-
});
|
|
21
|
-
ChatInputEntity.displayName = 'ChatInputEntity';
|