@fluentui-copilot/react-chat-input-plugins 0.0.7 → 0.0.9
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 +62 -0
- package/CHANGELOG.md +23 -1
- package/dist/index.d.ts +23 -0
- package/lib/PasteUnfurling.js +2 -0
- package/lib/PasteUnfurling.js.map +1 -0
- package/lib/components/ChatInputEntity/ChatInputEntity.js +1 -1
- package/lib/components/ChatInputEntity/ChatInputEntity.js.map +1 -1
- package/lib/components/ChatInputEntity/index.js +1 -1
- package/lib/components/ChatInputEntity/index.js.map +1 -1
- package/lib/components/ChatInputEntity/{useChatInputEntityStyles.js → useChatInputEntityStyles.styles.js} +3 -1
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.js.map +1 -0
- package/lib/components/ChatInputToken/ChatInputToken.js +1 -1
- package/lib/components/ChatInputToken/ChatInputToken.js.map +1 -1
- package/lib/components/ChatInputToken/ChatInputToken.node.js +1 -0
- package/lib/components/ChatInputToken/ChatInputToken.node.js.map +1 -1
- package/lib/components/ChatInputToken/index.js +1 -1
- package/lib/components/ChatInputToken/index.js.map +1 -1
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.js +19 -0
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.js.map +1 -0
- package/lib/components/GhostText/GhostText.js +1 -1
- package/lib/components/GhostText/GhostText.js.map +1 -1
- package/lib/components/GhostText/index.js +1 -1
- package/lib/components/GhostText/index.js.map +1 -1
- package/lib/components/GhostText/{useGhostTextStyles.js → useGhostTextStyles.styles.js} +3 -1
- package/lib/components/GhostText/useGhostTextStyles.styles.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js +1 -0
- package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -1
- package/lib/plugins/GhostText/GhostText.js +2 -0
- package/lib/plugins/GhostText/GhostText.js.map +1 -1
- package/lib/plugins/GhostText/GhostText.node.js +1 -0
- package/lib/plugins/GhostText/GhostText.node.js.map +1 -1
- package/lib/plugins/PasteUnfurling/PasteUnfurling.js +11 -0
- package/lib/plugins/PasteUnfurling/PasteUnfurling.js.map +1 -0
- package/lib/plugins/PasteUnfurling/index.js +2 -0
- package/lib/plugins/PasteUnfurling/index.js.map +1 -0
- package/lib-commonjs/PasteUnfurling.js +7 -0
- package/lib-commonjs/PasteUnfurling.js.map +1 -0
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js +2 -2
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js.map +1 -1
- package/lib-commonjs/components/ChatInputEntity/index.js +1 -1
- package/lib-commonjs/components/ChatInputEntity/index.js.map +1 -1
- package/lib-commonjs/components/ChatInputEntity/{useChatInputEntityStyles.js → useChatInputEntityStyles.styles.js} +2 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.js +2 -2
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js +1 -0
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/index.js +1 -1
- package/lib-commonjs/components/ChatInputToken/index.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.js +34 -0
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.js.map +1 -0
- package/lib-commonjs/components/GhostText/GhostText.js +2 -2
- package/lib-commonjs/components/GhostText/GhostText.js.map +1 -1
- package/lib-commonjs/components/GhostText/index.js +1 -1
- package/lib-commonjs/components/GhostText/index.js.map +1 -1
- package/lib-commonjs/components/GhostText/{useGhostTextStyles.js → useGhostTextStyles.styles.js} +2 -1
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +4 -0
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js +1 -0
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -1
- package/lib-commonjs/plugins/GhostText/GhostText.js +1 -0
- package/lib-commonjs/plugins/GhostText/GhostText.js.map +1 -1
- package/lib-commonjs/plugins/GhostText/GhostText.node.js +1 -0
- package/lib-commonjs/plugins/GhostText/GhostText.node.js.map +1 -1
- package/lib-commonjs/plugins/PasteUnfurling/PasteUnfurling.js +24 -0
- package/lib-commonjs/plugins/PasteUnfurling/PasteUnfurling.js.map +1 -0
- package/lib-commonjs/plugins/PasteUnfurling/index.js +7 -0
- package/lib-commonjs/plugins/PasteUnfurling/index.js.map +1 -0
- package/package.json +7 -7
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.js.map +0 -1
- package/lib/components/ChatInputToken/useChatInputTokenStyles.js +0 -17
- package/lib/components/ChatInputToken/useChatInputTokenStyles.js.map +0 -1
- package/lib/components/GhostText/useGhostTextStyles.js.map +0 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.js.map +0 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.js +0 -33
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.js.map +0 -1
- package/lib-commonjs/components/GhostText/useGhostTextStyles.js.map +0 -1
|
@@ -59,6 +59,7 @@ const chatInputEntityClassNames = {
|
|
|
59
59
|
]
|
|
60
60
|
});
|
|
61
61
|
const useChatInputEntityStyles_unstable = (state)=>{
|
|
62
|
+
'use no memo';
|
|
62
63
|
const styles = useStyles();
|
|
63
64
|
state.root.className = (0, _reactcomponents.mergeClasses)(chatInputEntityClassNames.root, styles.root, state.root.className);
|
|
64
65
|
if (state.text) {
|
|
@@ -68,4 +69,4 @@ const useChatInputEntityStyles_unstable = (state)=>{
|
|
|
68
69
|
state.sensitivity.className = (0, _reactcomponents.mergeClasses)(chatInputEntityClassNames.sensitivity, styles.sensitivity, state.sensitivity.className);
|
|
69
70
|
}
|
|
70
71
|
return state;
|
|
71
|
-
}; //# sourceMappingURL=useChatInputEntityStyles.js.map
|
|
72
|
+
}; //# sourceMappingURL=useChatInputEntityStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useChatInputEntityStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots> = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {},\n\n text: {\n color: tokens.colorBrandForeground1,\n },\n\n href: {\n color: tokens.colorBrandForegroundLink,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n sensitivity: {\n paddingLeft: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = (state: ChatInputEntityState): ChatInputEntityState => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n\n if (state.text) {\n state.text.className = mergeClasses(\n chatInputEntityClassNames.text,\n styles.text,\n state.text.as === 'a' && styles.href,\n state.text.className,\n );\n }\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n chatInputEntityClassNames.sensitivity,\n styles.sensitivity,\n state.sensitivity.className,\n );\n }\n\n return state;\n};\n"],"names":["chatInputEntityClassNames","styles","useStyles","root","sensitivity","text","__styles","color","sj55zd","textDecorationLine","a","state","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,yBAAAA;eAAAA;;IAwCLC,iCAASC;eAATD;;;iCA5CiC;AAIlC,MAAMD,4BAAkE;UAC7EG;iBACAC;UACAC;AACF;AAEA;;CAEC,SAECF,YAAOG,IAAAA,yBAAA,EAAA;UAEPD,CAAAA;UACEE;QACFC,QAAA;;UAGED;gBAEA;iBACEE;iBACAF;gBACF;gBAEA;;iBAEEA;gBACF;YAAA;YAAA;SAAA;;;;;QAGwC;QAAA;QAAA;KAAA;OAC1C;QAAA;QAAA;KAAA;IACFG,GAAA;QAAA;QAAA;KAAA;AAEA;AAME,MAAMT,oCAASC,CAAAA;;UAKbS,SAAMN;UAMRF,IAAA,CAAAS,SAAA,GAAAC,IAAAA,6BAAA,EAAAb,0BAAAG,IAAA,EAAAF,OAAAE,IAAA,EAAAQ,MAAAR,IAAA,CAAAS,SAAA;QAEAD,MAAIA,IAAMP,EAAAA;cACRO,IAAMP,CAAAA,SAAAA,GAAYQ,IAAAA,6BAAYC,EAAAA,0BAC5Bb,IAAAA,EAAAA,OAA0BI,IAAAA,EAAAA,MAC1BH,IAAAA,CAAAA,EAAOG,KAAAA,OACPO,OAAMP,IAAAA,EAAAA,MAAYQ,IAAAA,CAAAA,SAAS;;QAI/BD,MAAOA,WAAAA,EAAAA;QACPA,MAAAP,WAAA,CAAAQ,SAAA,GAAAC,IAAAA,6BAAA,EAAAb,0BAAAI,WAAA,EAAAH,OAAAG,WAAA,EAAAO,MAAAP,WAAA,CAAAQ,SAAA"}
|
|
@@ -12,10 +12,10 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _useChatInputToken = require("./useChatInputToken");
|
|
14
14
|
const _renderChatInputToken = require("./renderChatInputToken");
|
|
15
|
-
const
|
|
15
|
+
const _useChatInputTokenStylesstyles = require("./useChatInputTokenStyles.styles");
|
|
16
16
|
const ChatInputToken = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
17
|
const state = (0, _useChatInputToken.useChatInputToken_unstable)(props, ref);
|
|
18
|
-
(0,
|
|
18
|
+
(0, _useChatInputTokenStylesstyles.useChatInputTokenStyles_unstable)(state);
|
|
19
19
|
return (0, _renderChatInputToken.renderChatInputToken_unstable)(state);
|
|
20
20
|
});
|
|
21
21
|
ChatInputToken.displayName = 'ChatInputToken'; //# sourceMappingURL=ChatInputToken.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ChatInputToken.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useChatInputToken_unstable } from './useChatInputToken';\nimport { renderChatInputToken_unstable } from './renderChatInputToken';\nimport { useChatInputTokenStyles_unstable } from './useChatInputTokenStyles';\nimport type { ChatInputTokenProps } from './ChatInputToken.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ChatInputToken component\nexport const ChatInputToken: ForwardRefComponent<ChatInputTokenProps> = React.forwardRef((props, ref) => {\n const state = useChatInputToken_unstable(props, ref);\n\n useChatInputTokenStyles_unstable(state);\n return renderChatInputToken_unstable(state);\n});\n\nChatInputToken.displayName = 'ChatInputToken';\n"],"names":["ChatInputToken","React","forwardRef","props","state","useChatInputToken_unstable","useChatInputTokenStyles_unstable","renderChatInputToken_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;mCACoB;sCACG;
|
|
1
|
+
{"version":3,"sources":["ChatInputToken.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useChatInputToken_unstable } from './useChatInputToken';\nimport { renderChatInputToken_unstable } from './renderChatInputToken';\nimport { useChatInputTokenStyles_unstable } from './useChatInputTokenStyles.styles';\nimport type { ChatInputTokenProps } from './ChatInputToken.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ChatInputToken component\nexport const ChatInputToken: ForwardRefComponent<ChatInputTokenProps> = React.forwardRef((props, ref) => {\n const state = useChatInputToken_unstable(props, ref);\n\n useChatInputTokenStyles_unstable(state);\n return renderChatInputToken_unstable(state);\n});\n\nChatInputToken.displayName = 'ChatInputToken';\n"],"names":["ChatInputToken","React","forwardRef","props","state","useChatInputToken_unstable","useChatInputTokenStyles_unstable","renderChatInputToken_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;mCACoB;sCACG;+CACG;AAK1C,MAAMA,iBAAAA,WAAAA,GAAAA,OAA2DC,UAAMC,CAAU,CAACC,OAACA;UACxFC,QAAMA,IAAAA,6CAAQC,EAAAA,OAA2BF;uEAEzCG,EAAAA;WACAC,IAAAA,mDAAOA,EAAAA;AACT;AAEAP,eAAeQ,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ChatInputToken.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 { ChatInputTokenProps } from './ChatInputToken.types';\nimport { ChatInputToken } from './ChatInputToken';\n\nexport type SerializedChatInputTokenNode = Spread<\n { text: string; componentProps?: ChatInputTokenProps },\n SerializedLexicalNode\n>;\n\nexport class ChatInputTokenNode extends DecoratorNode<JSX.Element | null> {\n __text: string;\n __componentProps?: ChatInputTokenProps;\n\n static getType(): string {\n return 'token';\n }\n static clone(node: ChatInputTokenNode): ChatInputTokenNode {\n return new ChatInputTokenNode(node.__text, node.__componentProps, node.__key);\n }\n\n static importJSON(serializedNode: SerializedChatInputTokenNode): ChatInputTokenNode {\n return $createChatInputTokenNode(serializedNode.text, serializedNode.componentProps);\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(): SerializedChatInputTokenNode {\n return {\n ...super.exportJSON(),\n text: this.__text,\n componentProps: this.__componentProps,\n type: ChatInputTokenNode.getType(),\n version: 1,\n };\n }\n\n constructor(text: string, componentProps?: ChatInputTokenProps, key?: NodeKey) {\n super(key);\n this.__text = text;\n this.__componentProps = componentProps;\n }\n\n createDOM(): HTMLElement {\n return document.createElement('span');\n }\n\n updateDOM() {\n return false;\n }\n\n decorate(_editor: LexicalEditor, config: EditorConfig): JSX.Element | null {\n if (this.__componentProps?.children) {\n return <ChatInputToken {...this.__componentProps} />;\n }\n return <ChatInputToken {...this.__componentProps}>{this.__text}</ChatInputToken>;\n }\n}\n\nexport function $createChatInputTokenNode(\n text: string,\n componentProps?: ChatInputTokenProps,\n key?: NodeKey,\n): ChatInputTokenNode {\n return new ChatInputTokenNode(text, componentProps, key);\n}\n\nexport function $isChatInputTokenNode(node: LexicalNode | null | undefined): node is ChatInputTokenNode {\n return node instanceof ChatInputTokenNode;\n}\n"],"names":["$createChatInputTokenNode","$isChatInputTokenNode","ChatInputTokenNode","DecoratorNode","getType","clone","node","__text","__componentProps","__key","importJSON","serializedNode","text","componentProps","isIsolated","isInline","getTextContent","exportJSON","type","version","createDOM","document","createElement","updateDOM","decorate","_editor","config","_this___componentProps","children","React","ChatInputToken","constructor","key"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["ChatInputToken.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 { ChatInputTokenProps } from './ChatInputToken.types';\nimport { ChatInputToken } from './ChatInputToken';\n\nexport type SerializedChatInputTokenNode = Spread<\n { text: string; componentProps?: ChatInputTokenProps },\n SerializedLexicalNode\n>;\n\nexport class ChatInputTokenNode extends DecoratorNode<JSX.Element | null> {\n __text: string;\n __componentProps?: ChatInputTokenProps;\n\n static getType(): string {\n return 'token';\n }\n static clone(node: ChatInputTokenNode): ChatInputTokenNode {\n return new ChatInputTokenNode(node.__text, node.__componentProps, node.__key);\n }\n\n static importJSON(serializedNode: SerializedChatInputTokenNode): ChatInputTokenNode {\n return $createChatInputTokenNode(serializedNode.text, serializedNode.componentProps);\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(): SerializedChatInputTokenNode {\n return {\n ...super.exportJSON(),\n text: this.__text,\n componentProps: this.__componentProps,\n type: ChatInputTokenNode.getType(),\n version: 1,\n };\n }\n\n constructor(text: string, componentProps?: ChatInputTokenProps, key?: NodeKey) {\n super(key);\n this.__text = text;\n this.__componentProps = componentProps;\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): JSX.Element | null {\n if (this.__componentProps?.children) {\n return <ChatInputToken {...this.__componentProps} />;\n }\n return <ChatInputToken {...this.__componentProps}>{this.__text}</ChatInputToken>;\n }\n}\n\nexport function $createChatInputTokenNode(\n text: string,\n componentProps?: ChatInputTokenProps,\n key?: NodeKey,\n): ChatInputTokenNode {\n return new ChatInputTokenNode(text, componentProps, key);\n}\n\nexport function $isChatInputTokenNode(node: LexicalNode | null | undefined): node is ChatInputTokenNode {\n return node instanceof ChatInputTokenNode;\n}\n"],"names":["$createChatInputTokenNode","$isChatInputTokenNode","ChatInputTokenNode","DecoratorNode","getType","clone","node","__text","__componentProps","__key","importJSON","serializedNode","text","componentProps","isIsolated","isInline","getTextContent","exportJSON","type","version","createDOM","document","createElement","updateDOM","decorate","_editor","config","_this___componentProps","children","React","ChatInputToken","constructor","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA8EgBA,yBAAAA;eAAAA;;IAQAC,qBAAAA;eAAAA;;IAnEHC,kBAAAA;eAAAA;;;;;iEAnBU;4BAEO;gCAUC;AAOxB,MAAMA,2BAA2BC,yBAAAA;WAItCC,UAAOA;eACL;;WAEFC,MAAOA,IAAMC,EAAwB;eACnC,IAAOJ,mBAAIA,KAAmBI,MAAKC,EAAAA,KAAQD,gBAAKE,EAAAA,KAAkBF,KAAKG;;WAGzEC,WAAOA,cAAWC,EAA4C;eAC5DX,0BAAOA,eAA0BW,IAAeC,EAAAA,eAAMD,cAAeE;;iBAGvEC;eACE;;eAEFC;eACE;;qBAGFC;eACE,IAAO,CAAAT,MAAKA;;iBAGdU;eACE;oBACE,CAAGA,YAAMA;kBACTL,IAAAA,CAAAA,MAAWL;4BACXM,IAAAA,CAAAA,gBAAqBL;kBACrBU,mBAAMhB,OAAmBE;qBACzBe;;;gBAUJC;yDACE;eACAC,SAAOA,aAASC,CAAAA;;gBAGlBC;eACE;;aAGFC,OAASC,EAAsBC,MAAEA,EAAoB;;YACnD,AAAAC,CAAAA,yBAAI,IAAA,CAAAnB,gBAAKA,MAAgB,QAAAmB,2BAArB,KAAA,IAAA,KAAA,IAAAA,uBAAAC,QAAuBA,EAAAA;mBACzB,WAAA,GAAAC,OAAAP,aAAO,CAAAQ,8BAACA,EAAAA,IAAAA,CAAAA,gBAAwBtB;;eAElC,WAAA,GAAAqB,OAAOP,aAAA,CAAAQ,8BAACA,EAAAA,IAAAA,CAAmBtB,gBAAKA,EAAAA,IAAgB,CAAGD,MAAKA;;gBAnB1DwB,IAAYnB,EAAYC,cAAEA,EAAoCmB,GAAEA,CAAa;aAC3E,CAAAA;8BApCFzB,EAAAA,IAAAA,EAAAA,UAAAA,KAAAA;8BACAC,EAAAA,IAAAA,EAAAA,oBAAAA,KAAAA;YAoCE,CAAAD,MAAKA,GAAAA;YACL,CAAAC,gBAAKA,GAAAA;;AAkBT;AAEO,SAASR,0BACdY,IAAY,EACZC,cAAoC,EACpCmB,GAAa;WAEb,IAAO9B,mBAAIA,MAAmBU,gBAAMC;AACtC;AAEO,SAASZ,sBAAsBK,IAAoC;WACxEA,gBAAOA;AACT"}
|
|
@@ -7,6 +7,6 @@ _export_star._(require("./ChatInputToken"), exports);
|
|
|
7
7
|
_export_star._(require("./ChatInputToken.types"), exports);
|
|
8
8
|
_export_star._(require("./renderChatInputToken"), exports);
|
|
9
9
|
_export_star._(require("./useChatInputToken"), exports);
|
|
10
|
-
_export_star._(require("./useChatInputTokenStyles"), exports);
|
|
10
|
+
_export_star._(require("./useChatInputTokenStyles.styles"), exports);
|
|
11
11
|
_export_star._(require("./ChatInputToken.node"), exports);
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ChatInputToken';\nexport * from './ChatInputToken.types';\nexport * from './renderChatInputToken';\nexport * from './useChatInputToken';\nexport * from './useChatInputTokenStyles';\nexport * from './ChatInputToken.node';\n"],"names":[],"rangeMappings":";;;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ChatInputToken';\nexport * from './ChatInputToken.types';\nexport * from './renderChatInputToken';\nexport * from './useChatInputToken';\nexport * from './useChatInputTokenStyles.styles';\nexport * from './ChatInputToken.node';\n"],"names":[],"rangeMappings":";;;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
chatInputTokenClassNames: function() {
|
|
13
|
+
return chatInputTokenClassNames;
|
|
14
|
+
},
|
|
15
|
+
useChatInputTokenStyles_unstable: function() {
|
|
16
|
+
return useChatInputTokenStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const chatInputTokenClassNames = {
|
|
21
|
+
root: 'fai-ChatInputToken'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Styles for the root slot
|
|
25
|
+
*/ const useBaseClassName = (0, _reactcomponents.__resetStyles)("rfuwgnq", "r1934wcn", [
|
|
26
|
+
".rfuwgnq{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:calc(var(--lineHeightBase200) + (2 * var(--spacingVerticalXXS)) + (2 * var(--strokeWidthThin)));background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-right:0;padding-bottom:var(--spacingVerticalXXS);padding-left:0;}",
|
|
27
|
+
".r1934wcn{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:calc(var(--lineHeightBase200) + (2 * var(--spacingVerticalXXS)) + (2 * var(--strokeWidthThin)));background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-left:0;padding-bottom:var(--spacingVerticalXXS);padding-right:0;}"
|
|
28
|
+
]);
|
|
29
|
+
const useChatInputTokenStyles_unstable = (state)=>{
|
|
30
|
+
'use no memo';
|
|
31
|
+
const baseClassName = useBaseClassName();
|
|
32
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(chatInputTokenClassNames.root, baseClassName, state.root.className);
|
|
33
|
+
return state;
|
|
34
|
+
}; //# sourceMappingURL=useChatInputTokenStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useChatInputTokenStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ChatInputTokenSlots, ChatInputTokenState } from './ChatInputToken.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots> = {\n root: 'fai-ChatInputToken',\n};\n\n/**\n * Styles for the root slot\n */\nconst useBaseClassName = makeResetStyles({\n ...typographyStyles.caption1,\n lineHeight: `calc(${tokens.lineHeightBase200} + (2 * ${tokens.spacingVerticalXXS}) + (2 * ${tokens.strokeWidthThin}))`,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusMedium,\n boxDecorationBreak: 'clone',\n color: tokens.colorNeutralForeground2,\n ...shorthands.padding(tokens.spacingVerticalXXS, 0),\n});\n\n/**\n * Apply styling to the ChatInputToken slots based on the state\n */\nexport const useChatInputTokenStyles_unstable = (state: ChatInputTokenState): ChatInputTokenState => {\n 'use no memo';\n\n const baseClassName = useBaseClassName();\n state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);\n\n return state;\n};\n"],"names":["chatInputTokenClassNames","borderRadius","root","useBaseClassName","caption1","state","shorthands","padding","className","mergeClasses","baseClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAYXC,gCAAuC;eAAvCA;;;iCAhB0E;AAIrE,MAAMD,2BAAgE;UAC3EE;AACF;AAEA;;CAEC,SAECC,mBAAoBC,IAAAA,8BAAQ,EAAA,WAAA,YAAA;IAAA;IAAA;CAAA;AAI5BH,MAAAA,mCAAuCI,CAAAA;;UAGpCC,gBAAWC;IAChBF,MAAAH,IAAA,CAAAM,SAAA,GAAAC,IAAAA,6BAAA,EAAAT,yBAAAE,IAAA,EAAAQ,eAAAL,MAAAH,IAAA,CAAAM,SAAA;IAEA,OAAAH;6DAGiDA"}
|
|
@@ -12,10 +12,10 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _useGhostText = require("./useGhostText");
|
|
14
14
|
const _renderGhostText = require("./renderGhostText");
|
|
15
|
-
const
|
|
15
|
+
const _useGhostTextStylesstyles = require("./useGhostTextStyles.styles");
|
|
16
16
|
const GhostText = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
17
|
const state = (0, _useGhostText.useGhostText_unstable)(props, ref);
|
|
18
|
-
(0,
|
|
18
|
+
(0, _useGhostTextStylesstyles.useGhostTextStyles_unstable)(state);
|
|
19
19
|
return (0, _renderGhostText.renderGhostText_unstable)(state);
|
|
20
20
|
});
|
|
21
21
|
GhostText.displayName = 'GhostText'; //# sourceMappingURL=GhostText.js.map
|
|
@@ -1 +1 @@
|
|
|
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';\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","state","useGhostText_unstable","useGhostTextStyles_unstable","renderGhostText_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;8BACe;iCACG;
|
|
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","state","useGhostText_unstable","useGhostTextStyles_unstable","renderGhostText_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;8BACe;iCACG;0CACG;AAKrC,MAAMA,YAAAA,WAAAA,GAAAA,OAAiDC,UAAMC,CAAU,CAACC,OAACA;UAC9EC,QAAMA,IAAAA,mCAAQC,EAAAA,OAAsBF;6DAEpCG,EAAAA;WACAC,IAAAA,yCAAOA,EAAAA;AACT;AAEAP,UAAUQ,WAAW,GAAG"}
|
|
@@ -7,5 +7,5 @@ _export_star._(require("./GhostText"), exports);
|
|
|
7
7
|
_export_star._(require("./GhostText.types"), exports);
|
|
8
8
|
_export_star._(require("./renderGhostText"), exports);
|
|
9
9
|
_export_star._(require("./useGhostText"), exports);
|
|
10
|
-
_export_star._(require("./useGhostTextStyles"), exports);
|
|
10
|
+
_export_star._(require("./useGhostTextStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './GhostText';\nexport * from './GhostText.types';\nexport * from './renderGhostText';\nexport * from './useGhostText';\nexport * from './useGhostTextStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './GhostText';\nexport * from './GhostText.types';\nexport * from './renderGhostText';\nexport * from './useGhostText';\nexport * from './useGhostTextStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
package/lib-commonjs/components/GhostText/{useGhostTextStyles.js → useGhostTextStyles.styles.js}
RENAMED
|
@@ -94,10 +94,11 @@ const ghostTextClassNames = {
|
|
|
94
94
|
]
|
|
95
95
|
});
|
|
96
96
|
const useGhostTextStyles_unstable = (state)=>{
|
|
97
|
+
'use no memo';
|
|
97
98
|
const styles = useStyles();
|
|
98
99
|
state.root.className = (0, _reactcomponents.mergeClasses)(ghostTextClassNames.root, styles.root, state.root.className);
|
|
99
100
|
if (state.indicator) {
|
|
100
101
|
state.indicator.className = (0, _reactcomponents.mergeClasses)(ghostTextClassNames.indicator, styles.indicator, state.indicator.className);
|
|
101
102
|
}
|
|
102
103
|
return state;
|
|
103
|
-
}; //# sourceMappingURL=useGhostTextStyles.js.map
|
|
104
|
+
}; //# sourceMappingURL=useGhostTextStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\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.colorNeutralForeground3,\n whiteSpace: 'pre-wrap',\n ...shorthands.gap(tokens.spacingHorizontalXS),\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalSNudge),\n ...shorthands.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","shorthands","i8kkvl","backgroundColor","marginLeft","merginRight","De3pzq","z8tnut","z189sj","uwmqm3","useGhostTextStyles_unstable","Bbmb7ep","Beyfa6y","styles","useStyles","state","mergeClasses","Btl43ni","className","Cd5d3v"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,mBAAAA;eAAAA;;;;;;iCAJ0D;AAIhE,MAAMA,sBAAsD;UACjEC;eACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACGC;QACLC,QAAA;QAEAL,SAAAA;;eAEEE;iBACAI;iBACGF;iBACAA;iBACHG;gBACAC;QACFC,QAAA;QACFC,QAAA;QAEAC,QAAA;YAAA;YAAA;SAAA;;QAGAC,QAAO;YAAA;YAAMC;SAAAA;QACXC,SAAA;YAAA;YAAA;SAAA;QAEAC,SAAMC;YAAAA;YAASC;SAAAA;QACfC,SAAMnB;YAAI;YAAU;SAAGoB;QAEvBC,SAAIF;YAAMlB;YAAW;SAAA;gBACnBkB;YAAAA;YAAgBG;SAAS;QAK3BC,QAAA;;AAGF,GAAE"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -60,6 +60,9 @@ _export(exports, {
|
|
|
60
60
|
ManualGhostTextPlugin: function() {
|
|
61
61
|
return _GhostText.ManualGhostTextPlugin;
|
|
62
62
|
},
|
|
63
|
+
PasteUnfurlingPlugin: function() {
|
|
64
|
+
return _PasteUnfurling.PasteUnfurlingPlugin;
|
|
65
|
+
},
|
|
63
66
|
chatInputEntityClassNames: function() {
|
|
64
67
|
return _ChatInputEntity.chatInputEntityClassNames;
|
|
65
68
|
},
|
|
@@ -102,4 +105,5 @@ const _GhostText = require("./GhostText");
|
|
|
102
105
|
const _ChatInputToken = require("./ChatInputToken");
|
|
103
106
|
const _BasicFunctionality = require("./BasicFunctionality");
|
|
104
107
|
const _ImperativeControl = require("./ImperativeControl");
|
|
108
|
+
const _PasteUnfurling = require("./PasteUnfurling");
|
|
105
109
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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"],"names":["$createChatInputEntityNode","$createChatInputTokenNode","$createGhostTextNode","$isChatInputEntityNode","$isChatInputTokenNode","$isGhostTextNode","BasicFunctionalityPlugin","ChatInputEntity","ChatInputEntityNode","ChatInputEntityPlugin","ChatInputToken","ChatInputTokenNode","GhostText","GhostTextNode","GhostTextPlugin","ImperativeControlPlugin","ManualGhostTextPlugin","chatInputEntityClassNames","chatInputTokenClassNames","ghostTextClassNames","renderChatInputEntity_unstable","renderChatInputToken_unstable","renderGhostText_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable","useChatInputTokenStyles_unstable","useChatInputToken_unstable","useGhostTextStyles_unstable","useGhostText_unstable"],"rangeMappings":"
|
|
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 { 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;;IA0BdC,oBAAoB;eAApBA,oCAAoB;;IAvD3BC,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;gCAEH"}
|
|
@@ -1 +1 @@
|
|
|
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 { 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<JSX.Element | 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 ...super.exportJSON(),\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 return document.createElement('span');\n }\n\n updateDOM() {\n return false;\n }\n\n decorate(_editor: LexicalEditor, config: EditorConfig): JSX.Element | 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":["$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntityNode","DecoratorNode","getType","clone","node","__pluginId","__text","__data","__entityProps","__key","importJSON","serializedNode","pluginId","text","data","entityProps","isIsolated","isInline","getTextContent","exportJSON","type","version","createDOM","document","createElement","updateDOM","decorate","_editor","config","_this___entityProps","children","React","ChatInputEntity","getEntityData","updateEntityData","writable","getWritable","constructor","key"],"rangeMappings":"
|
|
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 { 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<JSX.Element | 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 ...super.exportJSON(),\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): JSX.Element | 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":["$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntityNode","DecoratorNode","getType","clone","node","__pluginId","__text","__data","__entityProps","__key","importJSON","serializedNode","pluginId","text","data","entityProps","isIsolated","isInline","getTextContent","exportJSON","type","version","createDOM","document","createElement","updateDOM","decorate","_editor","config","_this___entityProps","children","React","ChatInputEntity","getEntityData","updateEntityData","writable","getWritable","constructor","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAyGgBA,0BAAAA;eAAAA;;IAUAC,sBAAAA;eAAAA;;IA/FHC,mBAAAA;eAAAA;;;;;iEApBU;4BAEO;iCAUE;AAQzB,MAAMA,4BAA+BC,yBAAAA;WAM1CC,UAAOA;eACL;;WAEFC,MAAOA,IAASC,EAA4B;eAC1C,IAAOJ,oBAAIA,KAAoBI,UAAKC,EAAAA,KAAYD,MAAKE,EAAAA,KAAQF,MAAKG,EAAAA,KAAQH,aAAKI,EAAAA,KAAeJ,KAAKK;;WAGrGC,WAAOA,cAAcC,EAAgD;eACnEb,2BAAOA,eACLa,QAAeC,EAAAA,eACfD,IAAeE,EAAAA,eACfF,IAAeG,EAAAA,eACfH,WAAeI;;iBAInBC;eACE;;eAEFC;eACE;;qBAGFC;eACE,IAAO,CAAAZ,MAAKA;;iBAGda;eACE;oBACE,CAAGA,YAAMA;sBACTP,IAAAA,CAAAA,UAAeP;kBACfQ,IAAAA,CAAAA,MAAWP;kBACXQ,IAAAA,CAAAA,MAAWP;yBACXQ,IAAAA,CAAAA,aAAkBP;kBAClBY,oBAAMpB,OAAoBE;qBAC1BmB;;;gBAYJC;yDACE;eACAC,SAAOA,aAASC,CAAAA;;gBAGlBC;eACE;;aAGFC,OAASC,EAAsBC,MAAEA,EAAoB;;YACnD,AAAAC,CAAAA,sBAAI,IAAA,CAAArB,aAAKA,MAAa,QAAAqB,wBAAlB,KAAA,IAAA,KAAA,IAAAA,oBAAAC,QAAoBA,EAAAA;mBACtB,WAAA,GAAAC,OAAAP,aAAO,CAAAQ,gCAACA,EAAAA,IAAAA,CAAAA,aAAyBxB;;eAEnC,WAAA,GAAAuB,OAAOP,aAAA,CAAAQ,gCAACA,EAAAA,IAAAA,CAAoBxB,aAAKA,EAAAA,IAAa,CAAGF,MAAKA;;oBAGxD2B;eACE;kBACEpB,IAAAA,CAAAA,MAAWP;kBACXQ,IAAAA,CAAAA,MAAWP;yBACXQ,IAAAA,CAAAA,aAAkBP;;;qBAItB0B,IAAiBpB,EAAkD;cACjEqB,WAAMA,IAAW,CAAAC,WAAKA;iBACtBD,MAAS7B,GAAAA,KAASQ,IAAKD;iBACvBsB,MAAS5B,GAAAA,KAASO,IAAKA;iBACvBqB,aAAS3B,GAAAA,KAAgBM,WAAKC;;gBApChCsB,QAAYzB,EAAgBC,IAAEA,EAAYC,IAAEA,EAAQC,WAAEA,EAAkCuB,GAAEA,CAAa;aACrG,CAAAA;8BA7CFjC,EAAAA,IAAAA,EAAAA,cAAAA,KAAAA;8BACAC,EAAAA,IAAAA,EAAAA,UAAAA,KAAAA;8BACAE,EAAAA,IAAAA,EAAAA,iBAAAA,KAAAA;8BACAD,EAAAA,IAAAA,EAAAA,UAAAA,KAAAA;YA2CE,CAAAF,UAAKA,GAAAA;YACL,CAAAC,MAAKA,GAAAA;YACL,CAAAC,MAAKA,GAAAA;YACL,CAAAC,aAAKA,GAAAA;;AAiCT;AAEO,SAASV,2BACdc,QAAgB,EAChBC,IAAY,EACZC,IAAQ,EACRC,WAAkC,EAClCuB,GAAa;WAEb,IAAOtC,oBAAIA,UAAoBY,MAAUC,MAAMC,aAAMC;AACvD;AAEO,SAAShB,uBAA0BK,IAAoC;WAC5EA,gBAAOA;AACT"}
|
|
@@ -15,6 +15,7 @@ const _GhostText = require("../../GhostText");
|
|
|
15
15
|
const _GhostTextnode = require("./GhostText.node");
|
|
16
16
|
const _chatinputplugins = require("@fluentui-copilot/chat-input-plugins");
|
|
17
17
|
function GhostTextPlugin(props) {
|
|
18
|
+
'use no memo';
|
|
18
19
|
const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;
|
|
19
20
|
const [editor] = (0, _reacttexteditor.useLexicalComposerContext)();
|
|
20
21
|
const ghostTextBase = _react.useRef(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { LexicalEditor, EditorState } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode } from '../../GhostText';\nimport { GhostTextNode } from './GhostText.node';\nimport { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type GhostTextPluginProps = {\n id: string;\n $getGhostText: (\n editor: LexicalEditor,\n editorState: EditorState,\n prevEditorState: EditorState,\n ) => Promise<string | undefined>;\n ghostTextProps?: GhostTextProps;\n // Whether or not the ghost text should count as text inside the input for submitting and character count\n exposeText?: boolean;\n allowCompletion?: boolean;\n};\n\nexport function GhostTextPlugin(props: GhostTextPluginProps): JSX.Element | null {\n const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;\n const [editor] = useLexicalComposerContext();\n\n const ghostTextBase = React.useRef<GhostTextPluginBase<GhostTextProps> | null>(null);\n\n React.useEffect(\n () => {\n ghostTextBase.current = new GhostTextPluginBase(\n editor,\n id,\n $getGhostText,\n GhostTextNode,\n $createGhostTextNode,\n ghostTextProps,\n exposeText,\n allowCompletion,\n );\n\n return () => {\n ghostTextBase.current?.cleanup();\n };\n },\n // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, id],\n );\n\n React.useEffect(() => {\n ghostTextBase.current?.setAllowCompletion(allowCompletion);\n }, [allowCompletion]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setComponentProps(ghostTextProps);\n }, [ghostTextProps]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setExposeText(exposeText);\n }, [exposeText]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setGetGhostText($getGhostText);\n }, [$getGhostText]);\n\n return null;\n}\n"],"names":["GhostTextPlugin","props","$getGhostText","
|
|
1
|
+
{"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { LexicalEditor, EditorState } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode } from '../../GhostText';\nimport { GhostTextNode } from './GhostText.node';\nimport { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type GhostTextPluginProps = {\n id: string;\n $getGhostText: (\n editor: LexicalEditor,\n editorState: EditorState,\n prevEditorState: EditorState,\n ) => Promise<string | undefined>;\n ghostTextProps?: GhostTextProps;\n // Whether or not the ghost text should count as text inside the input for submitting and character count\n exposeText?: boolean;\n allowCompletion?: boolean;\n};\n\nexport function GhostTextPlugin(props: GhostTextPluginProps): JSX.Element | null {\n 'use no memo';\n\n const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;\n const [editor] = useLexicalComposerContext();\n\n const ghostTextBase = React.useRef<GhostTextPluginBase<GhostTextProps> | null>(null);\n\n React.useEffect(\n () => {\n ghostTextBase.current = new GhostTextPluginBase(\n editor,\n id,\n $getGhostText,\n GhostTextNode,\n $createGhostTextNode,\n ghostTextProps,\n exposeText,\n allowCompletion,\n );\n\n return () => {\n ghostTextBase.current?.cleanup();\n };\n },\n // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, id],\n );\n\n React.useEffect(() => {\n ghostTextBase.current?.setAllowCompletion(allowCompletion);\n }, [allowCompletion]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setComponentProps(ghostTextProps);\n }, [ghostTextProps]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setExposeText(exposeText);\n }, [exposeText]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setGetGhostText($getGhostText);\n }, [$getGhostText]);\n\n return null;\n}\n"],"names":["GhostTextPlugin","props","$getGhostText","ghostTextBase","React","editor","useLexicalComposerContext","useRef","useEffect","current","GhostTextPluginBase","id","GhostTextNode","$createGhostTextNode","ghostTextProps","exposeText","allowCompletion","_ghostTextBase_current","cleanup","setComponentProps","setExposeText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqBgBA;;;eAAAA;;;;iEArBO;iCACmB;2BAGL;+BACP;kCACM;AAe7B,SAASA,gBAAgBC,KAA2B;;UAIzD,EAEAC,aAAMC,EAENC,EAAAA,gBAEID,YAWA,iBACEA;UACF,CAAAE,OAAA,GAAAC,IAAAA,0CAAA;UAEFH,gBAAAC,OAAAG,MAAA,CAAA;WACAC,SAAA,CAAA;QACAL,cAAAM,OAAA,GAAA,IAAAC,qCAAA,CAAAL,QAAAM,IAAAT,eAAAU,4BAAA,EAAAC,+BAAA,EAAAC,gBAAAC,YAAAC;eAACX;gBAAQM;YAAGM,CAAAA,yBAAAd,cAAAM,OAAA,MAAA,QAAAQ,2BAAA,KAAA,IAAA,KAAA,IAAAA,uBAAAC,OAAA;QAGdd;+HACED;2DACC;;;QAACa;KAAAA;WAAgBR,SAAA,CAAA;QAEpBJ,IAAAA;kCACED,cAAAA,OAAAA,MAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAAA,kBAAAA,CAAAA;;;KAAAA;WACCK,SAAA,CAAA;YAACM;QAAeG,CAAAA,yBAAAd,cAAAM,OAAA,MAAA,QAAAQ,2BAAA,KAAA,IAAA,KAAA,IAAAA,uBAAAE,iBAAA,CAAAL;OAEnBV;QAAAA;KAAgB;oBACdD,CAAAA;;QACFc,CAAAA,yBAAGd,cAAAM,OAAA,MAAA,QAAAQ,2BAAA,KAAA,IAAA,KAAA,IAAAA,uBAAAG,aAAA,CAAAL;;;KAACA;WAAWP,SAAA,CAAA;QAEfJ,IAAAA;kCACED,cAAAA,OAAAA,MAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAAA,eAAAA,CAAAA;;;KAAAA;WACC;uCAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.node.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { DecoratorNode } from '@fluentui-copilot/text-editor';\nimport type { EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../components/GhostText/GhostText.types';\nimport { GhostText } from '../../components/GhostText/GhostText';\n\nexport type SerializedGhostTextNode = Spread<\n {\n content: string;\n id: string;\n componentProps?: GhostTextProps;\n exposeText?: boolean;\n },\n SerializedLexicalNode\n>;\n\nexport class GhostTextNode extends DecoratorNode<JSX.Element | null> {\n __content: string;\n __id: string;\n __allowCommitting?: boolean;\n __componentProps?: GhostTextProps;\n __exposeText?: boolean;\n\n static clone(node: GhostTextNode): GhostTextNode {\n return new GhostTextNode(node.__id, node.__content, node.__exposeText, node.__componentProps, node.__key);\n }\n\n static getType(): 'ghosttext' {\n return 'ghosttext';\n }\n\n static importJSON(serializedNode: SerializedGhostTextNode): GhostTextNode {\n const node = $createGhostTextNode(\n serializedNode.id,\n serializedNode.content,\n serializedNode.exposeText,\n serializedNode.componentProps,\n );\n return node;\n }\n\n exportJSON(): SerializedGhostTextNode {\n return {\n ...super.exportJSON(),\n type: 'ghosttext',\n id: this.__id,\n content: this.__content,\n componentProps: this.__componentProps,\n exposeText: this.__exposeText,\n version: 1,\n };\n }\n\n constructor(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps, key?: NodeKey) {\n super(key);\n this.__id = id;\n this.__content = content;\n this.__exposeText = exposeText;\n this.__componentProps = componentProps;\n }\n\n isInline() {\n return true;\n }\n\n 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 return document.createElement('span');\n }\n\n decorate(): JSX.Element | 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":["$createGhostTextNode","$isGhostTextNode","GhostTextNode","DecoratorNode","clone","node","__id","__content","__exposeText","__componentProps","__key","getType","importJSON","serializedNode","id","content","exposeText","componentProps","exportJSON","type","version","isInline","isIsolated","getTextContent","updateDOM","prevNode","dom","config","createDOM","document","createElement","decorate","React","GhostText","nodeKey","getKey","constructor","key","__allowCommitting"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["GhostText.node.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { DecoratorNode } from '@fluentui-copilot/text-editor';\nimport type { EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../components/GhostText/GhostText.types';\nimport { GhostText } from '../../components/GhostText/GhostText';\n\nexport type SerializedGhostTextNode = Spread<\n {\n content: string;\n id: string;\n componentProps?: GhostTextProps;\n exposeText?: boolean;\n },\n SerializedLexicalNode\n>;\n\nexport class GhostTextNode extends DecoratorNode<JSX.Element | null> {\n __content: string;\n __id: string;\n __allowCommitting?: boolean;\n __componentProps?: GhostTextProps;\n __exposeText?: boolean;\n\n static clone(node: GhostTextNode): GhostTextNode {\n return new GhostTextNode(node.__id, node.__content, node.__exposeText, node.__componentProps, node.__key);\n }\n\n static getType(): 'ghosttext' {\n return 'ghosttext';\n }\n\n static importJSON(serializedNode: SerializedGhostTextNode): GhostTextNode {\n const node = $createGhostTextNode(\n serializedNode.id,\n serializedNode.content,\n serializedNode.exposeText,\n serializedNode.componentProps,\n );\n return node;\n }\n\n exportJSON(): SerializedGhostTextNode {\n return {\n ...super.exportJSON(),\n type: 'ghosttext',\n id: this.__id,\n content: this.__content,\n componentProps: this.__componentProps,\n exposeText: this.__exposeText,\n version: 1,\n };\n }\n\n constructor(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps, key?: NodeKey) {\n super(key);\n this.__id = id;\n this.__content = content;\n this.__exposeText = exposeText;\n this.__componentProps = componentProps;\n }\n\n isInline() {\n return true;\n }\n\n 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(): JSX.Element | 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":["$createGhostTextNode","$isGhostTextNode","GhostTextNode","DecoratorNode","clone","node","__id","__content","__exposeText","__componentProps","__key","getType","importJSON","serializedNode","id","content","exposeText","componentProps","exportJSON","type","version","isInline","isIsolated","getTextContent","updateDOM","prevNode","dom","config","createDOM","document","createElement","decorate","React","GhostText","nodeKey","getKey","constructor","key","__allowCommitting"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA4FgBA,oBAAAA;eAAAA;;IASAC,gBAAAA;eAAAA;;IApFHC,aAAAA;eAAAA;;;;;iEAjBU;4BAEO;2BAGJ;AAYnB,MAAMA,sBAAsBC,yBAAAA;WAOjCC,MAAOA,IAAMC,EAAmB;eAC9B,IAAOH,cAAIA,KAAcG,IAAKC,EAAAA,KAAMD,SAAKE,EAAAA,KAAWF,YAAKG,EAAAA,KAAcH,gBAAKI,EAAAA,KAAkBJ,KAAKK;;WAGrGC,UAAOA;eACL;;WAGFC,WAAOA,cAAWC,EAAuC;cACvDR,OAAMA,qBAAOL,eACXa,EAAAA,EAAeC,eACfD,OAAeE,EAAAA,eACfF,UAAeG,EAAAA,eACfH,cAAeI;eAEjBZ;;iBAGFa;eACE;oBACE,CAAGA,YAAMA;kBACTC;oBACAL,CAAAA,IAAI;qBACJC,IAAAA,CAAAA,SAAcR;4BACdU,IAAAA,CAAAA,gBAAqBR;wBACrBO,IAAAA,CAAAA,YAAiBR;qBACjBY;;;eAYJC;eACE;;iBAGFC;eACE;;qBAGFC;eACE,IAAO,CAAAf,YAAKA,GAAAA,IAAe,CAAAD,SAAKA,GAAAA;;cAGlCiB,QAAUC,EAAiBC,GAAEA,EAAgBC,MAAEA,EAAoB;eACjE;;cAGFC,MAAUD,EAAoB;yDAC5B;eACAE,SAAOA,aAASC,CAAAA;;eAGlBC;eACE,WAAA,GAAAC,OACEF,aAAA,CAAAG,oBAACA,EAAAA;qBAAUC,IAAAA,CAAAA,MAAcC;mBAAW,CAAA1B,gBAAQA;eACzC,CAAAF,SAAKA;;gBAhCZ6B,EAAYtB,EAAUC,OAAEA,EAAeC,UAAEA,EAAoBC,cAAEA,EAA+BoB,GAAEA,CAAa;aAC3G,CAAAA;8BArCF9B,EAAAA,IAAAA,EAAAA,aAAAA,KAAAA;8BACAD,EAAAA,IAAAA,EAAAA,QAAAA,KAAAA;8BACAgC,EAAAA,IAAAA,EAAAA,qBAAAA,KAAAA;8BACA7B,EAAAA,IAAAA,EAAAA,oBAAAA,KAAAA;8BACAD,EAAAA,IAAAA,EAAAA,gBAAAA,KAAAA;YAkCE,CAAAF,IAAKA,GAAAA;YACL,CAAAC,SAAKA,GAAAA;YACL,CAAAC,YAAKA,GAAAA;YACL,CAAAC,gBAAKA,GAAAA;;AA+BT;AAEO,SAAST,qBACdc,EAAU,EACVC,OAAe,EACfC,UAAoB,EACpBC,cAA+B;WAE/B,IAAOf,cAAIA,IAAcY,SAAIC,YAASC;AACxC;AAEO,SAASf,iBAAiBI,IAAoC;WACnEA,gBAAOA;AACT"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 PasteUnfurlingPlugin;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _chatinputplugins = require("@fluentui-copilot/chat-input-plugins");
|
|
14
|
+
const _reacttexteditor = require("@fluentui-copilot/react-text-editor");
|
|
15
|
+
const PasteUnfurlingPlugin = (props)=>{
|
|
16
|
+
const [editor] = (0, _reacttexteditor.useLexicalComposerContext)();
|
|
17
|
+
_react.useEffect(()=>{
|
|
18
|
+
return (0, _chatinputplugins.registerPasteUnfurlingPlugin)(editor, props);
|
|
19
|
+
}, [
|
|
20
|
+
editor,
|
|
21
|
+
props
|
|
22
|
+
]);
|
|
23
|
+
return null;
|
|
24
|
+
}; //# sourceMappingURL=PasteUnfurling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["import * as React from 'react';\nimport { registerPasteUnfurlingPlugin, type PasteUnfurlingPluginProps } from '@fluentui-copilot/chat-input-plugins';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nexport const PasteUnfurlingPlugin = <ExtraDataType>(\n props: PasteUnfurlingPluginProps<ExtraDataType, ChatInputEntityProps>,\n) => {\n const [editor] = useLexicalComposerContext();\n\n React.useEffect(() => {\n return registerPasteUnfurlingPlugin(editor, props);\n }, [editor, props]);\n\n return null;\n};\n"],"names":["PasteUnfurlingPlugin","props","editor","useLexicalComposerContext","React","useEffect","registerPasteUnfurlingPlugin"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;;iEAJU;kCACsD;iCAEnC;AACnC,MAAMA,uBAAuBC,CAAAA;UAGlC,CAAAC,OAAOA,GAAOC,IAAAA,0CAAGA;WAEjBC,SAAMC,CAAAA;eACJC,IAAAA,8CAAOA,EAAAA,QAA6BJ;OACtC;QAAAA;QAAGD;KAAA;WAACC;6CAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './PasteUnfurling';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-chat-input-plugins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "A Fluent AI package for React-based ChatInput plugins.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/chat-input-plugins": "^0.0.
|
|
16
|
-
"@fluentui-copilot/react-text-editor": "^0.1.
|
|
17
|
-
"@fluentui-copilot/text-editor": "^0.0.
|
|
15
|
+
"@fluentui-copilot/chat-input-plugins": "^0.0.8",
|
|
16
|
+
"@fluentui-copilot/react-text-editor": "^0.1.6",
|
|
17
|
+
"@fluentui-copilot/text-editor": "^0.0.4",
|
|
18
18
|
"@swc/helpers": "^0.5.1"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@fluentui/react-components": ">=9.
|
|
22
|
-
"@fluentui/react-jsx-runtime": ">=9.0.
|
|
23
|
-
"@fluentui/react-utilities": ">=9.18.
|
|
21
|
+
"@fluentui/react-components": ">=9.52.0 <10.0.0",
|
|
22
|
+
"@fluentui/react-jsx-runtime": ">=9.0.38 <10.0.0",
|
|
23
|
+
"@fluentui/react-utilities": ">=9.18.9 <10.0.0",
|
|
24
24
|
"@types/react": ">=16.14.0 <19.0.0",
|
|
25
25
|
"@types/react-dom": ">=16.9.8 <19.0.0",
|
|
26
26
|
"react": ">=16.14.0 <19.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useChatInputEntityStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots> = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {},\n\n text: {\n color: tokens.colorBrandForeground1,\n },\n\n href: {\n color: tokens.colorBrandForegroundLink,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n sensitivity: {\n paddingLeft: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = (state: ChatInputEntityState): ChatInputEntityState => {\n const styles = useStyles();\n\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n\n if (state.text) {\n state.text.className = mergeClasses(\n chatInputEntityClassNames.text,\n styles.text,\n state.text.as === 'a' && styles.href,\n state.text.className,\n );\n }\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n chatInputEntityClassNames.sensitivity,\n styles.sensitivity,\n state.sensitivity.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","chatInputEntityClassNames","root","sensitivity","text","useStyles","color","colorBrandForeground1","href","colorBrandForegroundLink","textDecorationLine","colorBrandForegroundLinkHover","colorBrandForegroundLinkPressed","paddingLeft","spacingHorizontalXXS","useChatInputEntityStyles_unstable","state","styles","className","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AAI9E,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,aAAa;IACbC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BI,MAAM,CAAC;IAEPE,MAAM;QACJE,OAAON,OAAOO,qBAAqB;IACrC;IAEAC,MAAM;QACJF,OAAON,OAAOS,wBAAwB;QAEtC,UAAU;YACRC,oBAAoB;YACpBJ,OAAON,OAAOW,6BAA6B;QAC7C;QAEA,WAAW;YACTD,oBAAoB;YACpBJ,OAAON,OAAOY,+BAA+B;QAC/C;IACF;IACAT,aAAa;QACXU,aAAab,OAAOc,oBAAoB;IAC1C;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD,MAAMC,SAASZ;IAEfW,MAAMd,IAAI,CAACgB,SAAS,GAAGnB,aAAaE,0BAA0BC,IAAI,EAAEe,OAAOf,IAAI,EAAEc,MAAMd,IAAI,CAACgB,SAAS;IAErG,IAAIF,MAAMZ,IAAI,EAAE;QACdY,MAAMZ,IAAI,CAACc,SAAS,GAAGnB,aACrBE,0BAA0BG,IAAI,EAC9Ba,OAAOb,IAAI,EACXY,MAAMZ,IAAI,CAACe,EAAE,KAAK,OAAOF,OAAOT,IAAI,EACpCQ,MAAMZ,IAAI,CAACc,SAAS;IAExB;IAEA,IAAIF,MAAMb,WAAW,EAAE;QACrBa,MAAMb,WAAW,CAACe,SAAS,GAAGnB,aAC5BE,0BAA0BE,WAAW,EACrCc,OAAOd,WAAW,EAClBa,MAAMb,WAAW,CAACe,SAAS;IAE/B;IAEA,OAAOF;AACT,EAAE"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { __resetStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';
|
|
2
|
-
export const chatInputTokenClassNames = {
|
|
3
|
-
root: 'fai-ChatInputToken'
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Styles for the root slot
|
|
7
|
-
*/
|
|
8
|
-
const useBaseClassName = __resetStyles("rjbvsrk", "r1d7fxr6", [".rjbvsrk{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:inherit;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-right:0;padding-bottom:var(--spacingVerticalXXS);padding-left:0;}", ".r1d7fxr6{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:inherit;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-left:0;padding-bottom:var(--spacingVerticalXXS);padding-right:0;}"]);
|
|
9
|
-
/**
|
|
10
|
-
* Apply styling to the ChatInputToken slots based on the state
|
|
11
|
-
*/
|
|
12
|
-
export const useChatInputTokenStyles_unstable = state => {
|
|
13
|
-
const baseClassName = useBaseClassName();
|
|
14
|
-
state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);
|
|
15
|
-
return state;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=useChatInputTokenStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useChatInputTokenStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ChatInputTokenSlots, ChatInputTokenState } from './ChatInputToken.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots> = {\n root: 'fai-ChatInputToken',\n};\n\n/**\n * Styles for the root slot\n */\nconst useBaseClassName = makeResetStyles({\n ...typographyStyles.caption1,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusMedium,\n boxDecorationBreak: 'clone',\n color: tokens.colorNeutralForeground2,\n lineHeight: 'inherit',\n ...shorthands.padding(tokens.spacingVerticalXXS, 0),\n});\n\n/**\n * Apply styling to the ChatInputToken slots based on the state\n */\nexport const useChatInputTokenStyles_unstable = (state: ChatInputTokenState): ChatInputTokenState => {\n const baseClassName = useBaseClassName();\n state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","shorthands","tokens","typographyStyles","chatInputTokenClassNames","root","useBaseClassName","caption1","backgroundColor","colorNeutralBackground3","border","strokeWidthThin","colorTransparentStroke","borderRadius","borderRadiusMedium","boxDecorationBreak","color","colorNeutralForeground2","lineHeight","padding","spacingVerticalXXS","useChatInputTokenStyles_unstable","state","baseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAIjH,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBP,gBAAgB;IACvC,GAAGI,iBAAiBI,QAAQ;IAC5BC,iBAAiBN,OAAOO,uBAAuB;IAC/CC,QAAQ,CAAC,EAAER,OAAOS,eAAe,CAAC,OAAO,EAAET,OAAOU,sBAAsB,CAAC,CAAC;IAC1EC,cAAcX,OAAOY,kBAAkB;IACvCC,oBAAoB;IACpBC,OAAOd,OAAOe,uBAAuB;IACrCC,YAAY;IACZ,GAAGjB,WAAWkB,OAAO,CAACjB,OAAOkB,kBAAkB,EAAE,EAAE;AACrD;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C,MAAMC,gBAAgBjB;IACtBgB,MAAMjB,IAAI,CAACmB,SAAS,GAAGxB,aAAaI,yBAAyBC,IAAI,EAAEkB,eAAeD,MAAMjB,IAAI,CAACmB,SAAS;IAEtG,OAAOF;AACT,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useGhostTextStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\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.colorNeutralForeground3,\n whiteSpace: 'pre-wrap',\n ...shorthands.gap(tokens.spacingHorizontalXS),\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalSNudge),\n ...shorthands.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 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":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","ghostTextClassNames","root","indicator","useStyles","color","colorNeutralForeground3","whiteSpace","gap","spacingHorizontalXS","caption2Strong","backgroundColor","colorNeutralBackground5","padding","spacingVerticalNone","spacingHorizontalSNudge","borderRadius","borderRadiusSmall","marginLeft","merginRight","useGhostTextStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAI5G,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,WAAW;AACb,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYR,WAAW;IAC3BM,MAAM;QACJG,OAAON,OAAOO,uBAAuB;QACrCC,YAAY;QACZ,GAAGT,WAAWU,GAAG,CAACT,OAAOU,mBAAmB,CAAC;IAC/C;IAEAN,WAAW;QACT,GAAGH,iBAAiBU,cAAc;QAClCL,OAAON,OAAOO,uBAAuB;QACrCK,iBAAiBZ,OAAOa,uBAAuB;QAC/C,GAAGd,WAAWe,OAAO,CAACd,OAAOe,mBAAmB,EAAEf,OAAOgB,uBAAuB,CAAC;QACjF,GAAGjB,WAAWkB,YAAY,CAACjB,OAAOkB,iBAAiB,CAAC;QACpDC,YAAYnB,OAAOU,mBAAmB;QACtCU,aAAapB,OAAOU,mBAAmB;IACzC;AACF;AAEA;;CAEC,GACD,OAAO,MAAMW,8BAA8B,CAACC;IAC1C,MAAMC,SAASlB;IACfiB,MAAMnB,IAAI,CAACqB,SAAS,GAAG1B,aAAaI,oBAAoBC,IAAI,EAAEoB,OAAOpB,IAAI,EAAEmB,MAAMnB,IAAI,CAACqB,SAAS;IAE/F,IAAIF,MAAMlB,SAAS,EAAE;QACnBkB,MAAMlB,SAAS,CAACoB,SAAS,GAAG1B,aAC1BI,oBAAoBE,SAAS,EAC7BmB,OAAOnB,SAAS,EAChBkB,MAAMlB,SAAS,CAACoB,SAAS;IAE7B;IAEA,OAAOF;AACT,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useChatInputEntityStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots> = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {},\n\n text: {\n color: tokens.colorBrandForeground1,\n },\n\n href: {\n color: tokens.colorBrandForegroundLink,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n sensitivity: {\n paddingLeft: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = (state: ChatInputEntityState): ChatInputEntityState => {\n const styles = useStyles();\n\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n\n if (state.text) {\n state.text.className = mergeClasses(\n chatInputEntityClassNames.text,\n styles.text,\n state.text.as === 'a' && styles.href,\n state.text.className,\n );\n }\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n chatInputEntityClassNames.sensitivity,\n styles.sensitivity,\n state.sensitivity.className,\n );\n }\n\n return state;\n};\n"],"names":["chatInputEntityClassNames","root","sensitivity","text","__styles","color","sj55zd","textDecorationLine","a","state","className","mergeClasses","styles","as","href"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,yBAAAA;eAAAA;;IAwCLC,iCAA8BD;eAA9BC;;;iCA5CiC;AAIlC,MAAMD,4BAAkE;UAC7EC;iBACAC;UACAC;AACF;AAEA;;CAEC,SAECF,YAAOG,IAAAA,yBAAA,EAAA;UAEPD,CAAAA;UACEE;QACFC,QAAA;;UAGED;gBAEA;iBACEE;iBACAF;gBACF;gBAEA;;iBAEEA;gBACF;YAAA;YAAA;SAAA;;;;;QAGwC;QAAA;QAAA;KAAA;OAC1C;QAAA;QAAA;KAAA;IACFG,GAAA;QAAA;QAAA;KAAA;AAEA;AAMEC,MAAMR,oCAA8BD,CAAAA;UAEhCS,SAAMN;UACRM,IAAAA,CAAAA,SAAWC,GAAAA,IAAAA,6BAAYC,EAAAA,0BACrBX,IAAAA,EAA0BG,OAC1BS,IAAAA,EAAOT,MACPM,IAAAA,CAAAA,SAAa;QAGjBA,MAAAN,IAAA,EAAA;QAEAM,MAAIA,IAAMP,CAAAA,SAAAA,GAAaS,IAAAA,6BAAA,EAAAX,0BAAAG,IAAA,EAAAS,OAAAT,IAAA,EAAAM,MAAAN,IAAA,CAAAU,EAAA,KAAA,OAAAD,OAAAE,IAAA,EAAAL,MAAAN,IAAA,CAAAO,SAAA;;QAMvBD,MAAAP,WAAA,EAAA;QAEAO,MAAAP,WAAOO,CAAAA,SAAAA,GAAAA,IAAAA,6BAAAA,EAAAA,0BAAAA,WAAAA,EAAAA,OAAAA,WAAAA,EAAAA,MAAAA,WAAAA,CAAAA,SAAAA;IACP"}
|
|
@@ -1,33 +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
|
-
chatInputTokenClassNames: function() {
|
|
13
|
-
return chatInputTokenClassNames;
|
|
14
|
-
},
|
|
15
|
-
useChatInputTokenStyles_unstable: function() {
|
|
16
|
-
return useChatInputTokenStyles_unstable;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
-
const chatInputTokenClassNames = {
|
|
21
|
-
root: 'fai-ChatInputToken'
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Styles for the root slot
|
|
25
|
-
*/ const useBaseClassName = (0, _reactcomponents.__resetStyles)("rjbvsrk", "r1d7fxr6", [
|
|
26
|
-
".rjbvsrk{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:inherit;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-right:0;padding-bottom:var(--spacingVerticalXXS);padding-left:0;}",
|
|
27
|
-
".r1d7fxr6{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:inherit;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-left:0;padding-bottom:var(--spacingVerticalXXS);padding-right:0;}"
|
|
28
|
-
]);
|
|
29
|
-
const useChatInputTokenStyles_unstable = (state)=>{
|
|
30
|
-
const baseClassName = useBaseClassName();
|
|
31
|
-
state.root.className = (0, _reactcomponents.mergeClasses)(chatInputTokenClassNames.root, baseClassName, state.root.className);
|
|
32
|
-
return state;
|
|
33
|
-
}; //# sourceMappingURL=useChatInputTokenStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useChatInputTokenStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ChatInputTokenSlots, ChatInputTokenState } from './ChatInputToken.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots> = {\n root: 'fai-ChatInputToken',\n};\n\n/**\n * Styles for the root slot\n */\nconst useBaseClassName = makeResetStyles({\n ...typographyStyles.caption1,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusMedium,\n boxDecorationBreak: 'clone',\n color: tokens.colorNeutralForeground2,\n lineHeight: 'inherit',\n ...shorthands.padding(tokens.spacingVerticalXXS, 0),\n});\n\n/**\n * Apply styling to the ChatInputToken slots based on the state\n */\nexport const useChatInputTokenStyles_unstable = (state: ChatInputTokenState): ChatInputTokenState => {\n const baseClassName = useBaseClassName();\n state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);\n\n return state;\n};\n"],"names":["chatInputTokenClassNames","boxDecorationBreak","root","useBaseClassName","caption1","state","color","colorNeutralForeground2","lineHeight","mergeClasses","baseClassName","className","shorthands"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAYXC,gCAAoB;eAApBA;;;iCAhB0E;AAIrE,MAAMD,2BAAgE;UAC3EE;AACF;AAEA;;CAEC,SAECC,mBAAoBC,IAAAA,8BAAQ,EAAA,WAAA,YAAA;IAAA;IAAA;CAAA;AAI5BH,MAAAA,mCAAoBI,CAAAA;UACpBC,gBAAcC;UACdC,IAAAA,CAAAA,SAAY,GAAAC,IAAAA,6BAAA,EAAAT,yBAAAE,IAAA,EAAAQ,eAAAL,MAAAH,IAAA,CAAAS,SAAA;WACTC;AACL,GAEA,mDAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useGhostTextStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\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.colorNeutralForeground3,\n whiteSpace: 'pre-wrap',\n ...shorthands.gap(tokens.spacingHorizontalXS),\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalSNudge),\n ...shorthands.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 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","shorthands","i8kkvl","backgroundColor","marginLeft","merginRight","De3pzq","z8tnut","z189sj","uwmqm3","useGhostTextStyles_unstable","Bbmb7ep","styles","useStyles","state","mergeClasses","B7oj6ja","className","Frg6f3","Cd5d3v"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,mBAAAA;eAAAA;;;;;;iCAJ0D;AAIhE,MAAMA,sBAAsD;UACjEC;eACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACGC;QACLC,QAAA;QAEAL,SAAAA;;eAEEE;iBACAI;iBACGF;iBACAA;iBACHG;gBACAC;QACFC,QAAA;QACFC,QAAA;QAEAC,QAAA;YAAA;YAAA;SAAA;;QAGAC,QAAO;YAAA;YAAMC;SAAAA;QACXC,SAAMC;YAAAA;YAASC;SAAAA;QACfC,SAAMlB;YAAI;YAAU;SAAGmB;QAEvBC,SAAIF;YAAMjB;YAAW;SAAA;iBACnBiB;YAAMjB;YAAUoB;SAAYF;QAK9BG,QAAA;YAAA;YAAA;SAAA;QAEAC,QAAOL;IACP"}
|