@fluentui-copilot/react-chat-input-plugins 0.0.0-nightly-20251002-0405-17b34fb7.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,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "GhostText", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return GhostText;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
-
const _useGhostText = require("./useGhostText");
|
|
14
|
-
const _renderGhostText = require("./renderGhostText");
|
|
15
|
-
const _useGhostTextStylesstyles = require("./useGhostTextStyles.styles");
|
|
16
|
-
const GhostText = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
-
const state = (0, _useGhostText.useGhostText_unstable)(props, ref);
|
|
18
|
-
(0, _useGhostTextStylesstyles.useGhostTextStyles_unstable)(state);
|
|
19
|
-
return (0, _renderGhostText.renderGhostText_unstable)(state);
|
|
20
|
-
});
|
|
21
|
-
GhostText.displayName = 'GhostText';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useGhostText_unstable } from './useGhostText';\nimport { renderGhostText_unstable } from './renderGhostText';\nimport { useGhostTextStyles_unstable } from './useGhostTextStyles.styles';\nimport type { GhostTextProps } from './GhostText.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// GhostText component - TODO: add more docs\nexport const GhostText: ForwardRefComponent<GhostTextProps> = React.forwardRef((props, ref) => {\n const state = useGhostText_unstable(props, ref);\n\n useGhostTextStyles_unstable(state);\n return renderGhostText_unstable(state);\n});\n\nGhostText.displayName = 'GhostText';\n"],"names":["GhostText","React","forwardRef","props","ref","state","useGhostText_unstable","useGhostTextStyles_unstable","renderGhostText_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;8BACe;iCACG;0CACG;AAKrC,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAC5B,OAAOG,IAAAA,yCAAAA,EAAyBH;AAClC;AAEAL,UAAUS,WAAW,GAAG"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* State used in rendering GhostText
|
|
3
|
-
*/ "use strict";
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
// TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from GhostTextProps.
|
|
8
|
-
// & Required<Pick<GhostTextProps, 'propName'>>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type GhostTextSlots = {\n root: Slot<'span'>;\n indicator?: Slot<'span'>;\n};\n\n/**\n * GhostText Props\n */\nexport type GhostTextProps = ComponentProps<GhostTextSlots> & { nodeKey?: string };\n\n/**\n * State used in rendering GhostText\n */\nexport type GhostTextState = ComponentState<GhostTextSlots>;\n// TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from GhostTextProps.\n// & Required<Pick<GhostTextProps, 'propName'>>\n"],"names":[],"rangeMappings":";;;;;;;","mappings":"AAYA;;CAEC;;;;CAED,0HAA0H;CAC1H,+CAA+C"}
|
|
@@ -1,31 +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
|
-
GhostText: function() {
|
|
13
|
-
return _GhostText.GhostText;
|
|
14
|
-
},
|
|
15
|
-
ghostTextClassNames: function() {
|
|
16
|
-
return _useGhostTextStylesstyles.ghostTextClassNames;
|
|
17
|
-
},
|
|
18
|
-
renderGhostText_unstable: function() {
|
|
19
|
-
return _renderGhostText.renderGhostText_unstable;
|
|
20
|
-
},
|
|
21
|
-
useGhostTextStyles_unstable: function() {
|
|
22
|
-
return _useGhostTextStylesstyles.useGhostTextStyles_unstable;
|
|
23
|
-
},
|
|
24
|
-
useGhostText_unstable: function() {
|
|
25
|
-
return _useGhostText.useGhostText_unstable;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
const _GhostText = require("./GhostText");
|
|
29
|
-
const _renderGhostText = require("./renderGhostText");
|
|
30
|
-
const _useGhostText = require("./useGhostText");
|
|
31
|
-
const _useGhostTextStylesstyles = require("./useGhostTextStyles.styles");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { GhostText } from './GhostText';\nexport type { GhostTextProps, GhostTextSlots, GhostTextState } from './GhostText.types';\nexport { renderGhostText_unstable } from './renderGhostText';\nexport { useGhostText_unstable } from './useGhostText';\nexport { ghostTextClassNames, useGhostTextStyles_unstable } from './useGhostTextStyles.styles';\n"],"names":["GhostText","ghostTextClassNames","renderGhostText_unstable","useGhostTextStyles_unstable","useGhostText_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,SAAS;eAATA,oBAAS;;IAITC,mBAAmB;eAAnBA,6CAAmB;;IAFnBC,wBAAwB;eAAxBA,yCAAwB;;IAEHC,2BAA2B;eAA3BA,qDAA2B;;IADhDC,qBAAqB;eAArBA,mCAAqB;;;2BAHJ;iCAEe;8BACH;0CAC2B"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "renderGhostText_unstable", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return renderGhostText_unstable;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
-
const renderGhostText_unstable = (state)=>{
|
|
14
|
-
(0, _reactcomponents.assertSlots)(state);
|
|
15
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
16
|
-
children: [
|
|
17
|
-
state.root.children,
|
|
18
|
-
state.indicator && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.indicator, {})
|
|
19
|
-
]
|
|
20
|
-
});
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["renderGhostText.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { GhostTextState, GhostTextSlots } from './GhostText.types';\n\n/**\n * Render the final JSX of GhostText\n */\nexport const renderGhostText_unstable = (state: GhostTextState) => {\n assertSlots<GhostTextSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.indicator && <state.indicator />}\n </state.root>\n );\n};\n"],"names":["renderGhostText_unstable","state","assertSlots","_jsxs","root","children","indicator","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;iCAE4B;AAMrB,MAAMA,2BAA2B,CAACC;IACvCC,IAAAA,4BAAAA,EAA4BD;IAE5B,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMG,IAAI,CAACC,QAAQ;YACnBJ,MAAMK,SAAS,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACN,MAAMK,SAAS,EAAA,CAAA;;;AAG1C"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useGhostText_unstable", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useGhostText_unstable;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
14
|
-
const _reacttexteditor = require("@fluentui-copilot/react-text-editor");
|
|
15
|
-
const useGhostText_unstable = (props, ref)=>{
|
|
16
|
-
const { nodeKey, onClick, ...rest } = props;
|
|
17
|
-
const [editor] = (0, _reacttexteditor.useLexicalComposerContext)();
|
|
18
|
-
const handleClick = _react.useCallback((_ev)=>{
|
|
19
|
-
if (!nodeKey) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
editor.update(()=>{
|
|
23
|
-
var _node_getPreviousSibling;
|
|
24
|
-
const node = (0, _reacttexteditor.$getNodeByKey)(nodeKey);
|
|
25
|
-
node === null || node === void 0 ? void 0 : (_node_getPreviousSibling = node.getPreviousSibling()) === null || _node_getPreviousSibling === void 0 ? void 0 : _node_getPreviousSibling.selectEnd();
|
|
26
|
-
}, {
|
|
27
|
-
tag: 'historic'
|
|
28
|
-
});
|
|
29
|
-
}, [
|
|
30
|
-
editor,
|
|
31
|
-
nodeKey
|
|
32
|
-
]);
|
|
33
|
-
const mergedOnClick = (0, _reactcomponents.mergeCallbacks)(handleClick, onClick);
|
|
34
|
-
const state = {
|
|
35
|
-
components: {
|
|
36
|
-
root: 'span',
|
|
37
|
-
indicator: 'span'
|
|
38
|
-
},
|
|
39
|
-
root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('span', {
|
|
40
|
-
ref,
|
|
41
|
-
onClick: mergedOnClick,
|
|
42
|
-
...rest
|
|
43
|
-
}), {
|
|
44
|
-
elementType: 'span'
|
|
45
|
-
}),
|
|
46
|
-
indicator: _reactcomponents.slot.optional(props.indicator, {
|
|
47
|
-
elementType: 'span'
|
|
48
|
-
})
|
|
49
|
-
};
|
|
50
|
-
return state;
|
|
51
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useGhostText.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport type { GhostTextProps, GhostTextState } from './GhostText.types';\nimport { $getNodeByKey, useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render GhostText.\n *\n * The returned state can be modified with hooks such as useGhostTextStyles_unstable,\n * before being passed to renderGhostText_unstable.\n *\n * @param props - props from this instance of GhostText\n * @param ref - reference to root HTMLElement of GhostText\n */\nexport const useGhostText_unstable = (props: GhostTextProps, ref: React.Ref<HTMLSpanElement>): GhostTextState => {\n const { nodeKey, onClick, ...rest } = props;\n const [editor] = useLexicalComposerContext();\n\n const handleClick = React.useCallback(\n (_ev: React.MouseEvent<HTMLElement>) => {\n if (!nodeKey) {\n return;\n }\n\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey);\n node?.getPreviousSibling()?.selectEnd();\n },\n { tag: 'historic' },\n );\n },\n [editor, nodeKey],\n );\n\n const mergedOnClick = mergeCallbacks(handleClick, onClick);\n\n const state: GhostTextState = {\n components: {\n root: 'span',\n indicator: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('span', {\n ref,\n onClick: mergedOnClick,\n ...rest,\n }),\n { elementType: 'span' },\n ),\n indicator: slot.optional(props.indicator, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["useGhostText_unstable","props","ref","nodeKey","onClick","rest","editor","useLexicalComposerContext","handleClick","React","useCallback","_ev","update","node","$getNodeByKey","getPreviousSibling","selectEnd","tag","mergedOnClick","mergeCallbacks","state","components","root","indicator","slot","always","getIntrinsicElementProps","elementType","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;iCACwC;iCAEN;AAalD,MAAMA,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGC,MAAM,GAAGJ;IACtC,MAAM,CAACK,OAAO,GAAGC,IAAAA,0CAAAA;IAEjB,MAAMC,cAAcC,OAAMC,WAAW,CACnC,CAACC;QACC,IAAI,CAACR,SAAS;YACZ;QACF;QAEAG,OAAOM,MAAM,CACX;gBAEEC;YADA,MAAMA,OAAOC,IAAAA,8BAAAA,EAAcX;YAC3BU,SAAAA,QAAAA,SAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,2BAAAA,KAAME,kBAAkB,EAAA,MAAA,QAAxBF,6BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,yBAA4BG,SAAS;QACvC,GACA;YAAEC,KAAK;QAAW;IAEtB,GACA;QAACX;QAAQH;KAAQ;IAGnB,MAAMe,gBAAgBC,IAAAA,+BAAAA,EAAeX,aAAaJ;IAElD,MAAMgB,QAAwB;QAC5BC,YAAY;YACVC,MAAM;YACNC,WAAW;QACb;QACAD,MAAME,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,QAAQ;YAC/BxB;YACAE,SAASc;YACT,GAAGb,IAAI;QACT,IACA;YAAEsB,aAAa;QAAO;QAExBJ,WAAWC,qBAAAA,CAAKI,QAAQ,CAAC3B,MAAMsB,SAAS,EAAE;YAAEI,aAAa;QAAO;IAClE;IAEA,OAAOP;AACT"}
|
|
@@ -1,98 +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
|
-
ghostTextClassNames: function() {
|
|
13
|
-
return ghostTextClassNames;
|
|
14
|
-
},
|
|
15
|
-
useGhostTextStyles_unstable: function() {
|
|
16
|
-
return useGhostTextStyles_unstable;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
-
const ghostTextClassNames = {
|
|
21
|
-
root: 'fai-GhostText',
|
|
22
|
-
indicator: 'fai-GhostText__indicator'
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Styles for the root slot
|
|
26
|
-
*/ const useStyles = (0, _reactcomponents.__styles)({
|
|
27
|
-
root: {
|
|
28
|
-
sj55zd: "fxc4j92",
|
|
29
|
-
Huce71: "fibxuh5",
|
|
30
|
-
i8kkvl: 0,
|
|
31
|
-
Belr9w4: 0,
|
|
32
|
-
rmohyg: "fkln5zr"
|
|
33
|
-
},
|
|
34
|
-
indicator: {
|
|
35
|
-
Bahqtrf: "fk6fouc",
|
|
36
|
-
Be2twd7: "f13mqy1h",
|
|
37
|
-
Bhrd7zp: "flh3ekv",
|
|
38
|
-
Bg96gwp: "fwrc4pm",
|
|
39
|
-
sj55zd: "f11d4kpn",
|
|
40
|
-
De3pzq: "f3vzo32",
|
|
41
|
-
Byoj8tv: 0,
|
|
42
|
-
uwmqm3: 0,
|
|
43
|
-
z189sj: 0,
|
|
44
|
-
z8tnut: 0,
|
|
45
|
-
B0ocmuz: "f1vo1c1k",
|
|
46
|
-
Beyfa6y: 0,
|
|
47
|
-
Bbmb7ep: 0,
|
|
48
|
-
Btl43ni: 0,
|
|
49
|
-
B7oj6ja: 0,
|
|
50
|
-
Dimara: "fq9zq91",
|
|
51
|
-
Frg6f3: [
|
|
52
|
-
"fbyavb5",
|
|
53
|
-
"fm0x6gh"
|
|
54
|
-
],
|
|
55
|
-
Cd5d3v: "f1pc5kto"
|
|
56
|
-
}
|
|
57
|
-
}, {
|
|
58
|
-
d: [
|
|
59
|
-
".fxc4j92{color:var(--colorNeutralForeground4);}",
|
|
60
|
-
".fibxuh5{white-space:pre-wrap;}",
|
|
61
|
-
[
|
|
62
|
-
".fkln5zr{gap:var(--spacingHorizontalXS);}",
|
|
63
|
-
{
|
|
64
|
-
p: -1
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
68
|
-
".f13mqy1h{font-size:var(--fontSizeBase100);}",
|
|
69
|
-
".flh3ekv{font-weight:var(--fontWeightBold);}",
|
|
70
|
-
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
|
71
|
-
".f11d4kpn{color:var(--colorNeutralForeground3);}",
|
|
72
|
-
".f3vzo32{background-color:var(--colorNeutralBackground5);}",
|
|
73
|
-
[
|
|
74
|
-
".f1vo1c1k{padding:var(--spacingVerticalNone) var(--spacingHorizontalSNudge);}",
|
|
75
|
-
{
|
|
76
|
-
p: -1
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
[
|
|
80
|
-
".fq9zq91{border-radius:var(--borderRadiusSmall);}",
|
|
81
|
-
{
|
|
82
|
-
p: -1
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
".fbyavb5{margin-left:var(--spacingHorizontalXS);}",
|
|
86
|
-
".fm0x6gh{margin-right:var(--spacingHorizontalXS);}",
|
|
87
|
-
".f1pc5kto{mergin-right:var(--spacingHorizontalXS);}"
|
|
88
|
-
]
|
|
89
|
-
});
|
|
90
|
-
const useGhostTextStyles_unstable = (state)=>{
|
|
91
|
-
'use no memo';
|
|
92
|
-
const styles = useStyles();
|
|
93
|
-
state.root.className = (0, _reactcomponents.mergeClasses)(ghostTextClassNames.root, styles.root, state.root.className);
|
|
94
|
-
if (state.indicator) {
|
|
95
|
-
state.indicator.className = (0, _reactcomponents.mergeClasses)(ghostTextClassNames.indicator, styles.indicator, state.indicator.className);
|
|
96
|
-
}
|
|
97
|
-
return state;
|
|
98
|
-
}; //# sourceMappingURL=useGhostTextStyles.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\nimport type { GhostTextSlots, GhostTextState } from './GhostText.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const ghostTextClassNames: SlotClassNames<GhostTextSlots> = {\n root: 'fai-GhostText',\n indicator: 'fai-GhostText__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground4,\n whiteSpace: 'pre-wrap',\n gap: tokens.spacingHorizontalXS,\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalSNudge}`,\n borderRadius: tokens.borderRadiusSmall,\n marginLeft: tokens.spacingHorizontalXS,\n merginRight: tokens.spacingHorizontalXS,\n },\n});\n\n/**\n * Apply styling to the GhostText slots based on the state\n */\nexport const useGhostTextStyles_unstable = (state: GhostTextState): GhostTextState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(ghostTextClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n ghostTextClassNames.indicator,\n styles.indicator,\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["ghostTextClassNames","root","indicator","__styles","color","whiteSpace","gap","i8kkvl","typographyStyles","backgroundColor","padding","borderRadius","marginLeft","merginRight","sj55zd","De3pzq","Byoj8tv","z189sj","z8tnut","B0ocmuz","styles","state","Bbmb7ep","B7oj6ja","Dimara","Frg6f3"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,mBAAAA;eAAAA;;;;;;iCALoB;AAK1B,MAAMA,sBAAsD;UACjEC;eACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACAC;QACFC,QAAA;QAEAL,SAAAA;gBACKM;;eAEHC;iBACAC;iBACAC;iBACAC;iBACAC;QACFC,QAAA;QACFC,QAAA;QAEAC,SAAA;;QAGAC,QAAO;QACLC,QAAA;QAEAC,SAAMC;QACNC,SAAMpB;QAENqB,SAAID;iBACFA;QAKFE,SAAA;QAEAC,QAAOH;QACPI,QAAA;YAAA;YAAA;SAAA"}
|
|
@@ -1,51 +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
|
-
ghostTextClassNames: function() {
|
|
13
|
-
return ghostTextClassNames;
|
|
14
|
-
},
|
|
15
|
-
useGhostTextStyles_unstable: function() {
|
|
16
|
-
return useGhostTextStyles_unstable;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
-
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
-
const ghostTextClassNames = {
|
|
22
|
-
root: 'fai-GhostText',
|
|
23
|
-
indicator: 'fai-GhostText__indicator'
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Styles for the root slot
|
|
27
|
-
*/ const useStyles = (0, _reactcomponents.makeStyles)({
|
|
28
|
-
root: {
|
|
29
|
-
color: _tokens.tokens.colorNeutralForeground4,
|
|
30
|
-
whiteSpace: 'pre-wrap',
|
|
31
|
-
gap: _tokens.tokens.spacingHorizontalXS
|
|
32
|
-
},
|
|
33
|
-
indicator: {
|
|
34
|
-
..._tokens.typographyStyles.caption2Strong,
|
|
35
|
-
color: _tokens.tokens.colorNeutralForeground3,
|
|
36
|
-
backgroundColor: _tokens.tokens.colorNeutralBackground5,
|
|
37
|
-
padding: `${_tokens.tokens.spacingVerticalNone} ${_tokens.tokens.spacingHorizontalSNudge}`,
|
|
38
|
-
borderRadius: _tokens.tokens.borderRadiusSmall,
|
|
39
|
-
marginLeft: _tokens.tokens.spacingHorizontalXS,
|
|
40
|
-
merginRight: _tokens.tokens.spacingHorizontalXS
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const useGhostTextStyles_unstable = (state)=>{
|
|
44
|
-
'use no memo';
|
|
45
|
-
const styles = useStyles();
|
|
46
|
-
state.root.className = (0, _reactcomponents.mergeClasses)(ghostTextClassNames.root, styles.root, state.root.className);
|
|
47
|
-
if (state.indicator) {
|
|
48
|
-
state.indicator.className = (0, _reactcomponents.mergeClasses)(ghostTextClassNames.indicator, styles.indicator, state.indicator.className);
|
|
49
|
-
}
|
|
50
|
-
return state;
|
|
51
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\nimport type { GhostTextSlots, GhostTextState } from './GhostText.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const ghostTextClassNames: SlotClassNames<GhostTextSlots> = {\n root: 'fai-GhostText',\n indicator: 'fai-GhostText__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground4,\n whiteSpace: 'pre-wrap',\n gap: tokens.spacingHorizontalXS,\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalSNudge}`,\n borderRadius: tokens.borderRadiusSmall,\n marginLeft: tokens.spacingHorizontalXS,\n merginRight: tokens.spacingHorizontalXS,\n },\n});\n\n/**\n * Apply styling to the GhostText slots based on the state\n */\nexport const useGhostTextStyles_unstable = (state: GhostTextState): GhostTextState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(ghostTextClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n ghostTextClassNames.indicator,\n styles.indicator,\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["ghostTextClassNames","useGhostTextStyles_unstable","root","indicator","useStyles","makeStyles","color","tokens","colorNeutralForeground4","whiteSpace","gap","spacingHorizontalXS","typographyStyles","caption2Strong","colorNeutralForeground3","backgroundColor","colorNeutralBackground5","padding","spacingVerticalNone","spacingHorizontalSNudge","borderRadius","borderRadiusSmall","marginLeft","merginRight","state","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,mBAAAA;eAAAA;;IA6BAC,2BAAAA;eAAAA;;;iCAlC4B;wBACA;AAIlC,MAAMD,sBAAsD;IACjEE,MAAM;IACNC,WAAW;AACb;AAEA;;CAEC,GACD,MAAMC,YAAYC,IAAAA,2BAAAA,EAAW;IAC3BH,MAAM;QACJI,OAAOC,cAAAA,CAAOC,uBAAuB;QACrCC,YAAY;QACZC,KAAKH,cAAAA,CAAOI,mBAAmB;IACjC;IAEAR,WAAW;QACT,GAAGS,wBAAAA,CAAiBC,cAAc;QAClCP,OAAOC,cAAAA,CAAOO,uBAAuB;QACrCC,iBAAiBR,cAAAA,CAAOS,uBAAuB;QAC/CC,SAAS,CAAC,EAAEV,cAAAA,CAAOW,mBAAmB,CAAC,CAAC,EAAEX,cAAAA,CAAOY,uBAAuB,CAAC,CAAC;QAC1EC,cAAcb,cAAAA,CAAOc,iBAAiB;QACtCC,YAAYf,cAAAA,CAAOI,mBAAmB;QACtCY,aAAahB,cAAAA,CAAOI,mBAAmB;IACzC;AACF;AAKO,MAAMV,8BAA8B,CAACuB;IAC1C;IAEA,MAAMC,SAASrB;IACfoB,MAAMtB,IAAI,CAACwB,SAAS,GAAGC,IAAAA,6BAAAA,EAAa3B,oBAAoBE,IAAI,EAAEuB,OAAOvB,IAAI,EAAEsB,MAAMtB,IAAI,CAACwB,SAAS;IAE/F,IAAIF,MAAMrB,SAAS,EAAE;QACnBqB,MAAMrB,SAAS,CAACuB,SAAS,GAAGC,IAAAA,6BAAAA,EAC1B3B,oBAAoBG,SAAS,EAC7BsB,OAAOtB,SAAS,EAChBqB,MAAMrB,SAAS,CAACuB,SAAS;IAE7B;IAEA,OAAOF;AACT"}
|
package/lib-commonjs/index.js
DELETED
|
@@ -1,108 +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 _ChatInputEntity.$createChatInputEntityNode;
|
|
14
|
-
},
|
|
15
|
-
$createChatInputTokenNode: function() {
|
|
16
|
-
return _ChatInputToken.$createChatInputTokenNode;
|
|
17
|
-
},
|
|
18
|
-
$createGhostTextNode: function() {
|
|
19
|
-
return _GhostText.$createGhostTextNode;
|
|
20
|
-
},
|
|
21
|
-
$isChatInputEntityNode: function() {
|
|
22
|
-
return _ChatInputEntity.$isChatInputEntityNode;
|
|
23
|
-
},
|
|
24
|
-
$isChatInputTokenNode: function() {
|
|
25
|
-
return _ChatInputToken.$isChatInputTokenNode;
|
|
26
|
-
},
|
|
27
|
-
$isGhostTextNode: function() {
|
|
28
|
-
return _GhostText.$isGhostTextNode;
|
|
29
|
-
},
|
|
30
|
-
BasicFunctionalityPlugin: function() {
|
|
31
|
-
return _BasicFunctionality.BasicFunctionalityPlugin;
|
|
32
|
-
},
|
|
33
|
-
ChatInputEntity: function() {
|
|
34
|
-
return _ChatInputEntity.ChatInputEntity;
|
|
35
|
-
},
|
|
36
|
-
ChatInputEntityNode: function() {
|
|
37
|
-
return _ChatInputEntity.ChatInputEntityNode;
|
|
38
|
-
},
|
|
39
|
-
ChatInputEntityPlugin: function() {
|
|
40
|
-
return _ChatInputEntity.ChatInputEntityPlugin;
|
|
41
|
-
},
|
|
42
|
-
ChatInputToken: function() {
|
|
43
|
-
return _ChatInputToken.ChatInputToken;
|
|
44
|
-
},
|
|
45
|
-
ChatInputTokenNode: function() {
|
|
46
|
-
return _ChatInputToken.ChatInputTokenNode;
|
|
47
|
-
},
|
|
48
|
-
GhostText: function() {
|
|
49
|
-
return _GhostText.GhostText;
|
|
50
|
-
},
|
|
51
|
-
GhostTextNode: function() {
|
|
52
|
-
return _GhostText.GhostTextNode;
|
|
53
|
-
},
|
|
54
|
-
GhostTextPlugin: function() {
|
|
55
|
-
return _GhostText.GhostTextPlugin;
|
|
56
|
-
},
|
|
57
|
-
ImperativeControlPlugin: function() {
|
|
58
|
-
return _ImperativeControl.ImperativeControlPlugin;
|
|
59
|
-
},
|
|
60
|
-
ManualGhostTextPlugin: function() {
|
|
61
|
-
return _GhostText.ManualGhostTextPlugin;
|
|
62
|
-
},
|
|
63
|
-
PasteUnfurlingPlugin: function() {
|
|
64
|
-
return _PasteUnfurling.PasteUnfurlingPlugin;
|
|
65
|
-
},
|
|
66
|
-
chatInputEntityClassNames: function() {
|
|
67
|
-
return _ChatInputEntity.chatInputEntityClassNames;
|
|
68
|
-
},
|
|
69
|
-
chatInputTokenClassNames: function() {
|
|
70
|
-
return _ChatInputToken.chatInputTokenClassNames;
|
|
71
|
-
},
|
|
72
|
-
ghostTextClassNames: function() {
|
|
73
|
-
return _GhostText.ghostTextClassNames;
|
|
74
|
-
},
|
|
75
|
-
renderChatInputEntity_unstable: function() {
|
|
76
|
-
return _ChatInputEntity.renderChatInputEntity_unstable;
|
|
77
|
-
},
|
|
78
|
-
renderChatInputToken_unstable: function() {
|
|
79
|
-
return _ChatInputToken.renderChatInputToken_unstable;
|
|
80
|
-
},
|
|
81
|
-
renderGhostText_unstable: function() {
|
|
82
|
-
return _GhostText.renderGhostText_unstable;
|
|
83
|
-
},
|
|
84
|
-
useChatInputEntityStyles_unstable: function() {
|
|
85
|
-
return _ChatInputEntity.useChatInputEntityStyles_unstable;
|
|
86
|
-
},
|
|
87
|
-
useChatInputEntity_unstable: function() {
|
|
88
|
-
return _ChatInputEntity.useChatInputEntity_unstable;
|
|
89
|
-
},
|
|
90
|
-
useChatInputTokenStyles_unstable: function() {
|
|
91
|
-
return _ChatInputToken.useChatInputTokenStyles_unstable;
|
|
92
|
-
},
|
|
93
|
-
useChatInputToken_unstable: function() {
|
|
94
|
-
return _ChatInputToken.useChatInputToken_unstable;
|
|
95
|
-
},
|
|
96
|
-
useGhostTextStyles_unstable: function() {
|
|
97
|
-
return _GhostText.useGhostTextStyles_unstable;
|
|
98
|
-
},
|
|
99
|
-
useGhostText_unstable: function() {
|
|
100
|
-
return _GhostText.useGhostText_unstable;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
const _ChatInputEntity = require("./ChatInputEntity");
|
|
104
|
-
const _GhostText = require("./GhostText");
|
|
105
|
-
const _ChatInputToken = require("./ChatInputToken");
|
|
106
|
-
const _BasicFunctionality = require("./BasicFunctionality");
|
|
107
|
-
const _ImperativeControl = require("./ImperativeControl");
|
|
108
|
-
const _PasteUnfurling = require("./PasteUnfurling");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type {\n ChatInputEntityProps,\n ChatInputEntitySlots,\n ChatInputEntityState,\n ChatInputEntityPluginRef,\n SerializedChatInputEntityNode,\n} from './ChatInputEntity';\nexport {\n ChatInputEntity,\n chatInputEntityClassNames,\n renderChatInputEntity_unstable,\n useChatInputEntityStyles_unstable,\n useChatInputEntity_unstable,\n ChatInputEntityNode,\n ChatInputEntityPlugin,\n $isChatInputEntityNode,\n $createChatInputEntityNode,\n} from './ChatInputEntity';\n\nexport type {\n GhostTextProps,\n GhostTextSlots,\n GhostTextState,\n GhostTextPluginProps,\n SerializedGhostTextNode,\n ManualGhostTextRef,\n ManualGhostTextProps,\n} from './GhostText';\nexport {\n GhostText,\n ghostTextClassNames,\n renderGhostText_unstable,\n useGhostTextStyles_unstable,\n useGhostText_unstable,\n GhostTextNode,\n GhostTextPlugin,\n $isGhostTextNode,\n $createGhostTextNode,\n ManualGhostTextPlugin,\n} from './GhostText';\n\nexport type {\n ChatInputTokenProps,\n ChatInputTokenSlots,\n ChatInputTokenState,\n SerializedChatInputTokenNode,\n} from './ChatInputToken';\nexport {\n ChatInputToken,\n ChatInputTokenNode,\n chatInputTokenClassNames,\n renderChatInputToken_unstable,\n useChatInputTokenStyles_unstable,\n useChatInputToken_unstable,\n $createChatInputTokenNode,\n $isChatInputTokenNode,\n} from './ChatInputToken';\n\nexport type { BasicFunctionalityPluginProps, BasicFunctionalityPluginRef } from './BasicFunctionality';\nexport { BasicFunctionalityPlugin } from './BasicFunctionality';\n\nexport type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './ImperativeControl';\nexport { ImperativeControlPlugin } from './ImperativeControl';\n\nexport type { PasteUnfurlingPluginProps } from './PasteUnfurling';\nexport { PasteUnfurlingPlugin } from './PasteUnfurling';\n"],"names":["$createChatInputEntityNode","$createChatInputTokenNode","$createGhostTextNode","$isChatInputEntityNode","$isChatInputTokenNode","$isGhostTextNode","BasicFunctionalityPlugin","ChatInputEntity","ChatInputEntityNode","ChatInputEntityPlugin","ChatInputToken","ChatInputTokenNode","GhostText","GhostTextNode","GhostTextPlugin","ImperativeControlPlugin","ManualGhostTextPlugin","PasteUnfurlingPlugin","chatInputEntityClassNames","chatInputTokenClassNames","ghostTextClassNames","renderChatInputEntity_unstable","renderChatInputToken_unstable","renderGhostText_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable","useChatInputTokenStyles_unstable","useChatInputToken_unstable","useGhostTextStyles_unstable","useGhostText_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAgBEA,0BAA0B;eAA1BA,2CAA0B;;IAsC1BC,yBAAyB;eAAzBA,yCAAyB;;IAjBzBC,oBAAoB;eAApBA,+BAAoB;;IAtBpBC,sBAAsB;eAAtBA,uCAAsB;;IAwCtBC,qBAAqB;eAArBA,qCAAqB;;IAnBrBC,gBAAgB;eAAhBA,2BAAgB;;IAuBTC,wBAAwB;eAAxBA,4CAAwB;;IAnD/BC,eAAe;eAAfA,gCAAe;;IAKfC,mBAAmB;eAAnBA,oCAAmB;;IACnBC,qBAAqB;eAArBA,sCAAqB;;IAkCrBC,cAAc;eAAdA,8BAAc;;IACdC,kBAAkB;eAAlBA,kCAAkB;;IApBlBC,SAAS;eAATA,oBAAS;;IAKTC,aAAa;eAAbA,wBAAa;;IACbC,eAAe;eAAfA,0BAAe;;IA2BRC,uBAAuB;eAAvBA,0CAAuB;;IAxB9BC,qBAAqB;eAArBA,gCAAqB;;IA2BdC,oBAAoB;eAApBA,oCAAoB;;IAxD3BC,yBAAyB;eAAzBA,0CAAyB;;IAyCzBC,wBAAwB;eAAxBA,wCAAwB;;IApBxBC,mBAAmB;eAAnBA,8BAAmB;;IApBnBC,8BAA8B;eAA9BA,+CAA8B;;IAyC9BC,6BAA6B;eAA7BA,6CAA6B;;IApB7BC,wBAAwB;eAAxBA,mCAAwB;;IApBxBC,iCAAiC;eAAjCA,kDAAiC;;IACjCC,2BAA2B;eAA3BA,4CAA2B;;IAwC3BC,gCAAgC;eAAhCA,gDAAgC;;IAChCC,0BAA0B;eAA1BA,0CAA0B;;IArB1BC,2BAA2B;eAA3BA,sCAA2B;;IAC3BC,qBAAqB;eAArBA,gCAAqB;;;iCAhBhB;2BAsBA;gCAiBA;oCAGkC;mCAGD;gCAGH"}
|
|
@@ -1,69 +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 BasicFunctionalityPlugin;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
-
const _reacttexteditor = require("@fluentui-copilot/react-text-editor");
|
|
14
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
15
|
-
const _chatinputplugins = require("@fluentui-copilot/chat-input-plugins");
|
|
16
|
-
const BasicFunctionalityPlugin = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
-
const { trimWhitespace, onCountChanged, onContentChange, onPaste, isSentinelNodeEnabled } = props;
|
|
18
|
-
const [editor] = (0, _reacttexteditor.useLexicalComposerContext)();
|
|
19
|
-
const [basicFunctionalityImpl, setBasicFunctionalityImpl] = _react.useState(null);
|
|
20
|
-
(0, _reactcomponents.useIsomorphicLayoutEffect)(()=>{
|
|
21
|
-
setBasicFunctionalityImpl(new _chatinputplugins.BasicFunctionalityBase(editor, isSentinelNodeEnabled));
|
|
22
|
-
return ()=>{
|
|
23
|
-
setBasicFunctionalityImpl((prev)=>{
|
|
24
|
-
prev === null || prev === void 0 ? void 0 : prev.cleanup();
|
|
25
|
-
return null;
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
}, [
|
|
29
|
-
editor,
|
|
30
|
-
isSentinelNodeEnabled
|
|
31
|
-
]);
|
|
32
|
-
_react.useImperativeHandle(ref, ()=>({
|
|
33
|
-
setIsDisabled (isDisabled) {
|
|
34
|
-
basicFunctionalityImpl === null || basicFunctionalityImpl === void 0 ? void 0 : basicFunctionalityImpl.setIsDisabled(isDisabled);
|
|
35
|
-
}
|
|
36
|
-
}), [
|
|
37
|
-
basicFunctionalityImpl
|
|
38
|
-
]);
|
|
39
|
-
_react.useEffect(()=>{
|
|
40
|
-
basicFunctionalityImpl === null || basicFunctionalityImpl === void 0 ? void 0 : basicFunctionalityImpl.activateContentCallbacks(onContentChange, onCountChanged);
|
|
41
|
-
return ()=>basicFunctionalityImpl === null || basicFunctionalityImpl === void 0 ? void 0 : basicFunctionalityImpl.deactivateContentCallbacks();
|
|
42
|
-
}, [
|
|
43
|
-
basicFunctionalityImpl,
|
|
44
|
-
editor,
|
|
45
|
-
onContentChange,
|
|
46
|
-
onCountChanged
|
|
47
|
-
]);
|
|
48
|
-
_react.useEffect(()=>{
|
|
49
|
-
if (onPaste) {
|
|
50
|
-
basicFunctionalityImpl === null || basicFunctionalityImpl === void 0 ? void 0 : basicFunctionalityImpl.activatePasteCallback(onPaste);
|
|
51
|
-
}
|
|
52
|
-
return ()=>basicFunctionalityImpl === null || basicFunctionalityImpl === void 0 ? void 0 : basicFunctionalityImpl.deactivatePasteCallback();
|
|
53
|
-
}, [
|
|
54
|
-
basicFunctionalityImpl,
|
|
55
|
-
editor,
|
|
56
|
-
onPaste
|
|
57
|
-
]);
|
|
58
|
-
_react.useEffect(()=>{
|
|
59
|
-
if (trimWhitespace) {
|
|
60
|
-
basicFunctionalityImpl === null || basicFunctionalityImpl === void 0 ? void 0 : basicFunctionalityImpl.activateTrimWhitespace();
|
|
61
|
-
}
|
|
62
|
-
return ()=>basicFunctionalityImpl === null || basicFunctionalityImpl === void 0 ? void 0 : basicFunctionalityImpl.deactivateTrimWhitespace();
|
|
63
|
-
}, [
|
|
64
|
-
basicFunctionalityImpl,
|
|
65
|
-
editor,
|
|
66
|
-
trimWhitespace
|
|
67
|
-
]);
|
|
68
|
-
return null;
|
|
69
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["BasicFunctionality.ts"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-components';\nimport type { IBasicFunctionalityBase } from '@fluentui-copilot/chat-input-plugins';\nimport { BasicFunctionalityBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type BasicFunctionalityPluginProps = {\n // Whether or not to clear the input when only whitespace is remaining\n trimWhitespace?: boolean;\n onCountChanged?: (count: number) => void;\n onContentChange?: (value: string) => void;\n onPaste?: (event: ClipboardEvent) => void;\n isSentinelNodeEnabled?: boolean;\n};\n\nexport type BasicFunctionalityPluginRef = {\n setIsDisabled: (isDisabled: boolean) => void;\n};\n\nexport const BasicFunctionalityPlugin = React.forwardRef<BasicFunctionalityPluginRef, BasicFunctionalityPluginProps>(\n (props, ref) => {\n const { trimWhitespace, onCountChanged, onContentChange, onPaste, isSentinelNodeEnabled } = props;\n\n const [editor] = useLexicalComposerContext();\n\n const [basicFunctionalityImpl, setBasicFunctionalityImpl] = React.useState<IBasicFunctionalityBase | null>(null);\n\n useIsomorphicLayoutEffect(() => {\n setBasicFunctionalityImpl(new BasicFunctionalityBase(editor, isSentinelNodeEnabled));\n\n return () => {\n setBasicFunctionalityImpl(prev => {\n prev?.cleanup();\n return null;\n });\n };\n }, [editor, isSentinelNodeEnabled]);\n\n React.useImperativeHandle<BasicFunctionalityPluginRef, BasicFunctionalityPluginRef>(\n ref,\n () => ({\n setIsDisabled(isDisabled: boolean) {\n basicFunctionalityImpl?.setIsDisabled(isDisabled);\n },\n }),\n [basicFunctionalityImpl],\n );\n\n React.useEffect(() => {\n basicFunctionalityImpl?.activateContentCallbacks(onContentChange, onCountChanged);\n return () => basicFunctionalityImpl?.deactivateContentCallbacks();\n }, [basicFunctionalityImpl, editor, onContentChange, onCountChanged]);\n\n React.useEffect(() => {\n if (onPaste) {\n basicFunctionalityImpl?.activatePasteCallback(onPaste);\n }\n return () => basicFunctionalityImpl?.deactivatePasteCallback();\n }, [basicFunctionalityImpl, editor, onPaste]);\n\n React.useEffect(() => {\n if (trimWhitespace) {\n basicFunctionalityImpl?.activateTrimWhitespace();\n }\n return () => basicFunctionalityImpl?.deactivateTrimWhitespace();\n }, [basicFunctionalityImpl, editor, trimWhitespace]);\n\n return null;\n },\n);\n"],"names":["BasicFunctionalityPlugin","React","forwardRef","props","ref","trimWhitespace","onCountChanged","onContentChange","onPaste","isSentinelNodeEnabled","editor","useLexicalComposerContext","basicFunctionalityImpl","setBasicFunctionalityImpl","useState","useIsomorphicLayoutEffect","BasicFunctionalityBase","prev","cleanup","useImperativeHandle","setIsDisabled","isDisabled","useEffect","activateContentCallbacks","deactivateContentCallbacks","activatePasteCallback","deactivatePasteCallback","activateTrimWhitespace","deactivateTrimWhitespace"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmBaA;;;eAAAA;;;;iEAnBU;iCACmB;iCACA;kCAEH;AAehC,MAAMA,yCAA2BC,OAAMC,UAAU,CACtD,CAACC,OAAOC;IACN,MAAM,EAAEC,cAAc,EAAEC,cAAc,EAAEC,eAAe,EAAEC,OAAO,EAAEC,qBAAqB,EAAE,GAAGN;IAE5F,MAAM,CAACO,OAAO,GAAGC,IAAAA,0CAAAA;IAEjB,MAAM,CAACC,wBAAwBC,0BAA0B,GAAGZ,OAAMa,QAAQ,CAAiC;IAE3GC,IAAAA,0CAAAA,EAA0B;QACxBF,0BAA0B,IAAIG,wCAAAA,CAAuBN,QAAQD;QAE7D,OAAO;YACLI,0BAA0BI,CAAAA;gBACxBA,SAAAA,QAAAA,SAAAA,KAAAA,IAAAA,KAAAA,IAAAA,KAAMC,OAAO;gBACb,OAAO;YACT;QACF;IACF,GAAG;QAACR;QAAQD;KAAsB;IAElCR,OAAMkB,mBAAmB,CACvBf,KACA,IAAO,CAAA;YACLgB,eAAcC,UAAmB;gBAC/BT,2BAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAwBQ,aAAa,CAACC;YACxC;QACF,CAAA,GACA;QAACT;KAAuB;IAG1BX,OAAMqB,SAAS,CAAC;QACdV,2BAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAwBW,wBAAwB,CAAChB,iBAAiBD;QAClE,OAAO,IAAMM,2BAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAwBY,0BAA0B;IACjE,GAAG;QAACZ;QAAwBF;QAAQH;QAAiBD;KAAe;IAEpEL,OAAMqB,SAAS,CAAC;QACd,IAAId,SAAS;YACXI,2BAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAwBa,qBAAqB,CAACjB;QAChD;QACA,OAAO,IAAMI,2BAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAwBc,uBAAuB;IAC9D,GAAG;QAACd;QAAwBF;QAAQF;KAAQ;IAE5CP,OAAMqB,SAAS,CAAC;QACd,IAAIjB,gBAAgB;YAClBO,2BAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAwBe,sBAAsB;QAChD;QACA,OAAO,IAAMf,2BAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAwBgB,wBAAwB;IAC/D,GAAG;QAAChB;QAAwBF;QAAQL;KAAe;IAEnD,OAAO;AACT"}
|
|
@@ -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 _BasicFunctionality.BasicFunctionalityPlugin;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _BasicFunctionality = require("./BasicFunctionality");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export type { BasicFunctionalityPluginProps, BasicFunctionalityPluginRef } from './BasicFunctionality';\nexport { BasicFunctionalityPlugin } from './BasicFunctionality';\n"],"names":["BasicFunctionalityPlugin"],"rangeMappings":";;;;;;;;;;","mappings":";;;;+BACSA;;;eAAAA,4CAAwB;;;oCAAQ"}
|
|
@@ -1,100 +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 $createChatInputEntityNode;
|
|
14
|
-
},
|
|
15
|
-
$isChatInputEntityNode: function() {
|
|
16
|
-
return $isChatInputEntityNode;
|
|
17
|
-
},
|
|
18
|
-
ChatInputEntityNode: function() {
|
|
19
|
-
return ChatInputEntityNode;
|
|
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 _ChatInputEntity = require("../../ChatInputEntity");
|
|
27
|
-
class ChatInputEntityNode extends _texteditor.DecoratorNode {
|
|
28
|
-
static getType() {
|
|
29
|
-
return 'entity';
|
|
30
|
-
}
|
|
31
|
-
static clone(node) {
|
|
32
|
-
return new ChatInputEntityNode(node.__pluginId, node.__text, node.__data, node.__entityProps, node.__key);
|
|
33
|
-
}
|
|
34
|
-
static importJSON(serializedNode) {
|
|
35
|
-
return $createChatInputEntityNode(serializedNode.pluginId, serializedNode.text, serializedNode.data, serializedNode.entityProps);
|
|
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
|
-
pluginId: this.__pluginId,
|
|
49
|
-
text: this.__text,
|
|
50
|
-
data: this.__data,
|
|
51
|
-
entityProps: this.__entityProps,
|
|
52
|
-
type: ChatInputEntityNode.getType(),
|
|
53
|
-
version: 1
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
createDOM() {
|
|
57
|
-
// eslint-disable-next-line no-restricted-globals
|
|
58
|
-
return document.createElement('span');
|
|
59
|
-
}
|
|
60
|
-
updateDOM() {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
decorate(_editor, config) {
|
|
64
|
-
var _this___entityProps;
|
|
65
|
-
if ((_this___entityProps = this.__entityProps) === null || _this___entityProps === void 0 ? void 0 : _this___entityProps.children) {
|
|
66
|
-
return /*#__PURE__*/ _react.createElement(_ChatInputEntity.ChatInputEntity, this.__entityProps);
|
|
67
|
-
}
|
|
68
|
-
return /*#__PURE__*/ _react.createElement(_ChatInputEntity.ChatInputEntity, this.__entityProps, this.__text);
|
|
69
|
-
}
|
|
70
|
-
getEntityData() {
|
|
71
|
-
return {
|
|
72
|
-
text: this.__text,
|
|
73
|
-
data: this.__data,
|
|
74
|
-
entityProps: this.__entityProps
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
updateEntityData(data) {
|
|
78
|
-
const writable = this.getWritable();
|
|
79
|
-
writable.__text = data.text;
|
|
80
|
-
writable.__data = data.data;
|
|
81
|
-
writable.__entityProps = data.entityProps;
|
|
82
|
-
}
|
|
83
|
-
constructor(pluginId, text, data, entityProps, key){
|
|
84
|
-
super(key);
|
|
85
|
-
(0, _define_property._)(this, "__pluginId", void 0);
|
|
86
|
-
(0, _define_property._)(this, "__text", void 0);
|
|
87
|
-
(0, _define_property._)(this, "__entityProps", void 0);
|
|
88
|
-
(0, _define_property._)(this, "__data", void 0);
|
|
89
|
-
this.__pluginId = pluginId;
|
|
90
|
-
this.__text = text;
|
|
91
|
-
this.__data = data;
|
|
92
|
-
this.__entityProps = entityProps;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function $createChatInputEntityNode(pluginId, text, data, entityProps, key) {
|
|
96
|
-
return new ChatInputEntityNode(pluginId, text, data, entityProps, key);
|
|
97
|
-
}
|
|
98
|
-
function $isChatInputEntityNode(node) {
|
|
99
|
-
return node instanceof ChatInputEntityNode;
|
|
100
|
-
}
|