@fluentui-copilot/react-send-button 0.0.0-nightly-20250416-0405-24e1479b.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.
Files changed (42) hide show
  1. package/CHANGELOG.json +20 -0
  2. package/CHANGELOG.md +13 -0
  3. package/LICENSE +23 -0
  4. package/README.md +5 -0
  5. package/dist/index.d.ts +68 -0
  6. package/lib/SendButton.js +2 -0
  7. package/lib/SendButton.js.map +1 -0
  8. package/lib/components/SendButton/SendButton.js +12 -0
  9. package/lib/components/SendButton/SendButton.js.map +1 -0
  10. package/lib/components/SendButton/SendButton.types.js +4 -0
  11. package/lib/components/SendButton/SendButton.types.js.map +1 -0
  12. package/lib/components/SendButton/buttonMotion.js +151 -0
  13. package/lib/components/SendButton/buttonMotion.js.map +1 -0
  14. package/lib/components/SendButton/index.js +5 -0
  15. package/lib/components/SendButton/index.js.map +1 -0
  16. package/lib/components/SendButton/renderSendButton.js +38 -0
  17. package/lib/components/SendButton/renderSendButton.js.map +1 -0
  18. package/lib/components/SendButton/useSendButton.js +117 -0
  19. package/lib/components/SendButton/useSendButton.js.map +1 -0
  20. package/lib/components/SendButton/useSendButtonStyles.styles.js +212 -0
  21. package/lib/components/SendButton/useSendButtonStyles.styles.js.map +1 -0
  22. package/lib/index.js +2 -0
  23. package/lib/index.js.map +1 -0
  24. package/lib-commonjs/SendButton.js +29 -0
  25. package/lib-commonjs/SendButton.js.map +1 -0
  26. package/lib-commonjs/components/SendButton/SendButton.js +21 -0
  27. package/lib-commonjs/components/SendButton/SendButton.js.map +1 -0
  28. package/lib-commonjs/components/SendButton/SendButton.types.js +7 -0
  29. package/lib-commonjs/components/SendButton/SendButton.types.js.map +1 -0
  30. package/lib-commonjs/components/SendButton/buttonMotion.js +233 -0
  31. package/lib-commonjs/components/SendButton/buttonMotion.js.map +1 -0
  32. package/lib-commonjs/components/SendButton/index.js +32 -0
  33. package/lib-commonjs/components/SendButton/index.js.map +1 -0
  34. package/lib-commonjs/components/SendButton/renderSendButton.js +54 -0
  35. package/lib-commonjs/components/SendButton/renderSendButton.js.map +1 -0
  36. package/lib-commonjs/components/SendButton/useSendButton.js +118 -0
  37. package/lib-commonjs/components/SendButton/useSendButton.js.map +1 -0
  38. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.js +299 -0
  39. package/lib-commonjs/components/SendButton/useSendButtonStyles.styles.js.map +1 -0
  40. package/lib-commonjs/index.js +29 -0
  41. package/lib-commonjs/index.js.map +1 -0
  42. package/package.json +41 -0
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderSendButton_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderSendButton_unstable;
9
+ }
10
+ });
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactcomponents = require("@fluentui/react-components");
13
+ const renderSendButton_unstable = (state)=>{
14
+ if (state.designVersion === 'next') {
15
+ return renderSendButtonNext(state);
16
+ }
17
+ return renderSendButtonCurrent(state);
18
+ };
19
+ function renderSendButtonCurrent(state) {
20
+ (0, _reactcomponents.assertSlots)(state);
21
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
22
+ children: [
23
+ state.stopIcon && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
24
+ children: [
25
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.stopBackgroundMotion, {
26
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.stopBackground, {})
27
+ }),
28
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.stopButtonMotion, {
29
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.stopIcon, {})
30
+ })
31
+ ]
32
+ }),
33
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.sendButtonMotion, {
34
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.sendIcon, {})
35
+ })
36
+ ]
37
+ });
38
+ }
39
+ function renderSendButtonNext(state) {
40
+ (0, _reactcomponents.assertSlots)(state);
41
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
42
+ children: [
43
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.stopBackgroundMotion, {
44
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.stopBackground, {})
45
+ }),
46
+ state.stopIcon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.stopButtonMotion, {
47
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.stopIcon, {})
48
+ }),
49
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.sendButtonMotion, {
50
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.sendIcon, {})
51
+ })
52
+ ]
53
+ });
54
+ } //# sourceMappingURL=renderSendButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderSendButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SendButtonState, SendButtonSlots } from './SendButton.types';\n\n/**\n * Render the final JSX of SendButton\n */\nexport const renderSendButton_unstable = (state: SendButtonState) => {\n if (state.designVersion === 'next') {\n return renderSendButtonNext(state);\n }\n\n return renderSendButtonCurrent(state);\n};\n\nfunction renderSendButtonCurrent(state: SendButtonState) {\n assertSlots<SendButtonSlots>(state);\n\n return (\n <state.root>\n {state.stopIcon && (\n <>\n <state.stopBackgroundMotion>\n <state.stopBackground />\n </state.stopBackgroundMotion>\n <state.stopButtonMotion>\n <state.stopIcon />\n </state.stopButtonMotion>\n </>\n )}\n <state.sendButtonMotion>\n <state.sendIcon />\n </state.sendButtonMotion>\n </state.root>\n );\n}\n\nfunction renderSendButtonNext(state: SendButtonState) {\n assertSlots<SendButtonSlots>(state);\n\n return (\n <state.root>\n <state.stopBackgroundMotion>\n <state.stopBackground />\n </state.stopBackgroundMotion>\n {state.stopIcon && (\n <state.stopButtonMotion>\n <state.stopIcon />\n </state.stopButtonMotion>\n )}\n <state.sendButtonMotion>\n <state.sendIcon />\n </state.sendButtonMotion>\n </state.root>\n );\n}\n"],"names":["state","designVersion","renderSendButtonNext","renderSendButtonCurrent","assertSlots","stopIcon","_jsxs","_Fragment","stopBackgroundMotion","stopButtonMotion","children","_jsx","stopBackground"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUMA;;;eAAAA;;;4BATN;iCAE4B;AAO1B,MAAIA,4BAAgCA,CAAAA;cAClCC,aAAOC,KAAAA,QAAqBF;QAC9B,OAAAE,qBAAAF;;IAGA,OAAAG,wBAAAH;AAEF;SACEI,wBAA6BJ,KAAAA;oCAE7B,EAAAA;;kBAEKA;YAAAA,MAAMK,QAAQ,IAAA,WACb,GAAAC,IAAAA,gBAAA,EAAAC,oBAAA,EAAA;;;mEACE,EAAAP,MAACA,cAAMQ,EAAAA,CAAAA;;6DACLC,gBAAA,EAAA;;;;;qEAGA,EAAA;;;;;;8BAKJT,KAAA;;;;;gBAIRU,UAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAX,MAAAY,cAAA,EAAA,CAAA;YAEA;YAAAZ,MAASE,QAAAA,IAAAA,WAA2C,GAAAS,IAAAA,eAAA,EAAAX,MAAAS,gBAAA,EAAA;gBAClDL,UAA6BJ,WAAAA,GAAAA,IAAAA,eAAAA,EAAAA,MAAAA,QAAAA,EAAAA,CAAAA;YAE7B;YAAA,WAAA,GAAAW,IAAAA,eACE,EAAAX,MAACA,gBAAU,EAAA;;;;;8CAKP"}
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useSendButton_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useSendButton_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 _buttonMotion = require("./buttonMotion");
15
+ const _reacticons = require("@fluentui/react-icons");
16
+ const _reactmotion = require("@fluentui/react-motion");
17
+ const _reactprovider = require("@fluentui-copilot/react-provider");
18
+ const SendIcon = (0, _reacticons.bundleIcon)(_reacticons.SendFilled, _reacticons.SendRegular);
19
+ const SendIconV2Canvas = (0, _reacticons.bundleIcon)(_reacticons.ArrowRight24Filled, _reacticons.ArrowRight24Regular);
20
+ const SendIconV2Sidecar = (0, _reacticons.bundleIcon)(_reacticons.ArrowRight20Filled, _reacticons.ArrowRight20Regular);
21
+ const useSendButton_unstable = (props, ref)=>{
22
+ /** Used to apply/remove styles when button is animating */ const [isSendMotionRunning, setIsSendMotionRunning] = _react.useState(false);
23
+ const [isStopMotionRunning, setIsStopMotionRunning] = _react.useState(false);
24
+ const isButtonMotionRunning = isSendMotionRunning || isStopMotionRunning;
25
+ const designVersion = (0, _reactprovider.useDesignVersion)(props.designVersion);
26
+ const mode = (0, _reactprovider.useCopilotMode)(props.mode);
27
+ const [visible, setVisible] = _react.useState(false);
28
+ const mountRef = _react.useCallback((elem)=>{
29
+ if (elem) {
30
+ setVisible(true);
31
+ } else {
32
+ setVisible(false);
33
+ }
34
+ }, []);
35
+ const finalRef = (0, _reactcomponents.useMergedRefs)(ref, mountRef);
36
+ const buttonState = (0, _reactcomponents.useButton_unstable)({
37
+ shape: designVersion === 'next' ? 'circular' : undefined,
38
+ ...props,
39
+ appearance: 'transparent',
40
+ 'aria-disabled': props.disabled ? true : undefined,
41
+ type: 'submit'
42
+ }, finalRef);
43
+ const icon = (()=>{
44
+ if (designVersion === 'next') {
45
+ if (props.isSendIconFilled || isButtonMotionRunning) {
46
+ return mode === 'canvas' ? /*#__PURE__*/ _react.createElement(_reacticons.ArrowRight24Filled, null) : /*#__PURE__*/ _react.createElement(_reacticons.ArrowRight20Regular, null);
47
+ } else {
48
+ return mode === 'canvas' ? /*#__PURE__*/ _react.createElement(SendIconV2Canvas, null) : /*#__PURE__*/ _react.createElement(SendIconV2Sidecar, null);
49
+ }
50
+ } else {
51
+ if (props.isSendIconFilled || isButtonMotionRunning) {
52
+ return /*#__PURE__*/ _react.createElement(_reacticons.SendFilled, null);
53
+ } else {
54
+ return /*#__PURE__*/ _react.createElement(SendIcon, null);
55
+ }
56
+ }
57
+ })();
58
+ const state = {
59
+ ...buttonState,
60
+ components: {
61
+ root: 'button',
62
+ sendIcon: 'span',
63
+ stopIcon: 'span',
64
+ stopBackground: 'div',
65
+ sendButtonMotion: _buttonMotion.SendButtonMotion,
66
+ stopButtonMotion: _buttonMotion.StopButtonMotion,
67
+ stopBackgroundMotion: _buttonMotion.CircleButtonMotion
68
+ },
69
+ root: buttonState.root,
70
+ sendIcon: _reactcomponents.slot.always(props.sendIcon, {
71
+ elementType: 'span',
72
+ defaultProps: {
73
+ children: icon
74
+ }
75
+ }),
76
+ stopIcon: _reactcomponents.slot.optional(props.stopIcon, {
77
+ elementType: 'span',
78
+ defaultProps: {
79
+ children: designVersion === 'next' ? mode === 'canvas' ? /*#__PURE__*/ _react.createElement(_reacticons.Stop24Filled, null) : /*#__PURE__*/ _react.createElement(_reacticons.Stop20Filled, null) : /*#__PURE__*/ _react.createElement(_reacticons.Stop16Filled, null)
80
+ },
81
+ renderByDefault: true
82
+ }),
83
+ stopBackground: _reactcomponents.slot.always(props.stopBackground, {
84
+ elementType: 'div'
85
+ }),
86
+ sendButtonMotion: (0, _reactmotion.presenceMotionSlot)(props.sendButtonMotion, {
87
+ elementType: _buttonMotion.SendButtonMotion,
88
+ defaultProps: {
89
+ visible: !props.isSending,
90
+ unmountOnExit: true,
91
+ onMotionFinish: ()=>setIsSendMotionRunning(false),
92
+ onMotionStart: ()=>setIsSendMotionRunning(true)
93
+ }
94
+ }),
95
+ stopButtonMotion: (0, _reactmotion.presenceMotionSlot)(props.stopButtonMotion, {
96
+ elementType: _buttonMotion.StopButtonMotion,
97
+ defaultProps: {
98
+ visible: props.isSending,
99
+ unmountOnExit: true,
100
+ onMotionFinish: ()=>setIsStopMotionRunning(false),
101
+ onMotionStart: ()=>setIsStopMotionRunning(true)
102
+ }
103
+ }),
104
+ stopBackgroundMotion: (0, _reactmotion.presenceMotionSlot)(props.stopBackgroundMotion, {
105
+ elementType: _buttonMotion.CircleButtonMotion,
106
+ defaultProps: {
107
+ visible: designVersion === 'next' ? visible : props.isSending,
108
+ unmountOnExit: true
109
+ }
110
+ }),
111
+ isButtonMotionRunning,
112
+ isSendIconFilled: props.isSendIconFilled,
113
+ isSending: props.isSending,
114
+ designVersion,
115
+ mode
116
+ };
117
+ return state;
118
+ }; //# sourceMappingURL=useSendButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useSendButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ButtonProps } from '@fluentui/react-components';\nimport { slot, useButton_unstable, useMergedRefs } from '@fluentui/react-components';\nimport type { SendButtonProps, SendButtonState } from './SendButton.types';\n\nimport { CircleButtonMotion, SendButtonMotion, StopButtonMotion } from './buttonMotion';\nimport {\n bundleIcon,\n SendFilled,\n SendRegular,\n Stop16Filled,\n Stop24Filled,\n ArrowRight24Filled,\n ArrowRight24Regular,\n Stop20Filled,\n ArrowRight20Regular,\n ArrowRight20Filled,\n} from '@fluentui/react-icons';\nimport { presenceMotionSlot } from '@fluentui/react-motion';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\n\nconst SendIcon = bundleIcon(SendFilled, SendRegular);\nconst SendIconV2Canvas = bundleIcon(ArrowRight24Filled, ArrowRight24Regular);\nconst SendIconV2Sidecar = bundleIcon(ArrowRight20Filled, ArrowRight20Regular);\n\n/**\n * Create the state required to render SendButton.\n *\n * The returned state can be modified with hooks such as useSendButtonStyles_unstable,\n * before being passed to renderSendButton_unstable.\n *\n * @param props - props from this instance of SendButton\n * @param ref - reference to root HTMLElement of SendButton\n */\nexport const useSendButton_unstable = (\n props: SendButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SendButtonState => {\n /** Used to apply/remove styles when button is animating */\n const [isSendMotionRunning, setIsSendMotionRunning] = React.useState(false);\n const [isStopMotionRunning, setIsStopMotionRunning] = React.useState(false);\n const isButtonMotionRunning = isSendMotionRunning || isStopMotionRunning;\n\n const designVersion = useDesignVersion(props.designVersion);\n const mode = useCopilotMode(props.mode);\n\n const [visible, setVisible] = React.useState(false);\n const mountRef = React.useCallback((elem: HTMLElement | null) => {\n if (elem) {\n setVisible(true);\n } else {\n setVisible(false);\n }\n }, []);\n const finalRef = useMergedRefs(ref, mountRef);\n const buttonState = useButton_unstable(\n {\n shape: designVersion === 'next' ? 'circular' : undefined,\n ...(props as ButtonProps),\n appearance: 'transparent',\n 'aria-disabled': props.disabled ? true : undefined,\n type: 'submit',\n },\n finalRef,\n );\n\n const icon = (() => {\n if (designVersion === 'next') {\n if (props.isSendIconFilled || isButtonMotionRunning) {\n return mode === 'canvas' ? <ArrowRight24Filled /> : <ArrowRight20Regular />;\n } else {\n return mode === 'canvas' ? <SendIconV2Canvas /> : <SendIconV2Sidecar />;\n }\n } else {\n if (props.isSendIconFilled || isButtonMotionRunning) {\n return <SendFilled />;\n } else {\n return <SendIcon />;\n }\n }\n })();\n\n const state: SendButtonState = {\n ...buttonState,\n components: {\n root: 'button',\n sendIcon: 'span',\n stopIcon: 'span',\n stopBackground: 'div',\n sendButtonMotion: SendButtonMotion as React.ComponentType,\n stopButtonMotion: StopButtonMotion as React.ComponentType,\n stopBackgroundMotion: CircleButtonMotion as React.ComponentType,\n },\n root: buttonState.root,\n sendIcon: slot.always(props.sendIcon, {\n elementType: 'span',\n defaultProps: {\n children: icon,\n },\n }),\n stopIcon: slot.optional(props.stopIcon, {\n elementType: 'span',\n defaultProps: {\n children: designVersion === 'next' ? mode === 'canvas' ? <Stop24Filled /> : <Stop20Filled /> : <Stop16Filled />,\n },\n renderByDefault: true,\n }),\n stopBackground: slot.always(props.stopBackground, { elementType: 'div' }),\n sendButtonMotion: presenceMotionSlot<{}>(props.sendButtonMotion, {\n elementType: SendButtonMotion,\n defaultProps: {\n visible: !props.isSending,\n unmountOnExit: true,\n onMotionFinish: () => setIsSendMotionRunning(false),\n onMotionStart: () => setIsSendMotionRunning(true),\n },\n }),\n stopButtonMotion: presenceMotionSlot<{}>(props.stopButtonMotion, {\n elementType: StopButtonMotion,\n defaultProps: {\n visible: props.isSending,\n unmountOnExit: true,\n onMotionFinish: () => setIsStopMotionRunning(false),\n onMotionStart: () => setIsStopMotionRunning(true),\n },\n }),\n stopBackgroundMotion: presenceMotionSlot<{}>(props.stopBackgroundMotion, {\n elementType: CircleButtonMotion,\n defaultProps: {\n visible: designVersion === 'next' ? visible : props.isSending,\n unmountOnExit: true,\n },\n }),\n isButtonMotionRunning,\n isSendIconFilled: props.isSendIconFilled,\n isSending: props.isSending,\n designVersion,\n mode,\n };\n\n return state;\n};\n"],"names":["useSendButton_unstable","SendIcon","bundleIcon","SendFilled","SendRegular","SendIconV2Canvas","ArrowRight24Filled","ArrowRight24Regular","SendIconV2Sidecar","ArrowRight20Filled","ArrowRight20Regular","props","ref","React","useState","setIsSendMotionRunning","isStopMotionRunning","isButtonMotionRunning","isSendMotionRunning","useDesignVersion","designVersion","useCopilotMode","mode","visible","setVisible","mountRef","useCallback","elem","finalRef","buttonState","useButton_unstable","shape","undefined","appearance","disabled","type","icon","isSendIconFilled","createElement","state","components","root","sendIcon","stopIcon","stopBackground","sendButtonMotion","stopButtonMotion","StopButtonMotion","stopBackgroundMotion","CircleButtonMotion","slot","always","elementType","defaultProps","children","Stop24Filled","Stop20Filled","Stop16Filled","SendButtonMotion","unmountOnExit","onMotionFinish","onMotionStart","setIsStopMotionRunning","isSending"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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gBAAS;mBAC1B3C,MAAAA,SAAAA;;QAEFE;;IAGA,OAAAiB"}
@@ -0,0 +1,299 @@
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
+ sendButtonClassNames: function() {
13
+ return sendButtonClassNames;
14
+ },
15
+ useSendButtonStyles_unstable: function() {
16
+ return useSendButtonStyles_unstable;
17
+ }
18
+ });
19
+ const _reactcomponents = require("@fluentui/react-components");
20
+ const sendButtonClassNames = {
21
+ root: 'fai-SendButton',
22
+ sendIcon: 'fai-SendButton__sendIcon',
23
+ stopIcon: 'fai-SendButton__stopIcon',
24
+ stopBackground: 'fai-SendButton__stopBackground',
25
+ sendButtonMotion: 'fai-SendButton__sendButtonMotion',
26
+ stopButtonMotion: 'fai-SendButton__stopButtonMotion',
27
+ stopBackgroundMotion: 'fai-SendButton__stopBackgroundMotion'
28
+ };
29
+ /**
30
+ * Styles for the root slot
31
+ */ const useStyles = (0, _reactcomponents.__styles)({
32
+ root: {
33
+ mc9l5x: "f22iagw",
34
+ a9b677: "f1szoe96",
35
+ Bf4jedk: "fwbmr0d",
36
+ Bqenvij: "f1d2rq10",
37
+ Bt984gj: "f122n59",
38
+ Byoj8tv: 0,
39
+ uwmqm3: 0,
40
+ z189sj: 0,
41
+ z8tnut: 0,
42
+ B0ocmuz: "f1mk8lai"
43
+ },
44
+ baseIconButton: {
45
+ qhf8xq: "f1euv43f",
46
+ Bt984gj: "f122n59",
47
+ mc9l5x: "ftuwxu6",
48
+ Brf1p80: "f4d9j23",
49
+ Be2twd7: "f1pp30po",
50
+ Bqenvij: "fjamq6b",
51
+ a9b677: "f64fuq3"
52
+ },
53
+ disabled: {
54
+ sj55zd: "f1s2aq7o"
55
+ },
56
+ iconFilled: {
57
+ sj55zd: "f1oyzx04",
58
+ Bi91k9c: "f1m1wcaq"
59
+ },
60
+ stopBackground: {
61
+ qhf8xq: "f1euv43f",
62
+ a9b677: "f2q8o33",
63
+ Bqenvij: "fwk23hs",
64
+ Beyfa6y: 0,
65
+ Bbmb7ep: 0,
66
+ Btl43ni: 0,
67
+ B7oj6ja: 0,
68
+ Dimara: "f44lkw9",
69
+ De3pzq: "f16xkysk"
70
+ }
71
+ }, {
72
+ d: [
73
+ ".f22iagw{display:flex;}",
74
+ ".f1szoe96{width:32px;}",
75
+ ".fwbmr0d{min-width:32px;}",
76
+ ".f1d2rq10{height:32px;}",
77
+ ".f122n59{align-items:center;}",
78
+ [
79
+ ".f1mk8lai{padding:0;}",
80
+ {
81
+ p: -1
82
+ }
83
+ ],
84
+ ".f1euv43f{position:absolute;}",
85
+ ".ftuwxu6{display:inline-flex;}",
86
+ ".f4d9j23{justify-content:center;}",
87
+ ".f1pp30po{font-size:var(--fontSizeBase500);}",
88
+ ".fjamq6b{height:20px;}",
89
+ ".f64fuq3{width:20px;}",
90
+ ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
91
+ ".f1oyzx04{color:var(--colorCompoundBrandBackground);}",
92
+ ".f2q8o33{width:inherit;}",
93
+ ".fwk23hs{height:inherit;}",
94
+ [
95
+ ".f44lkw9{border-radius:var(--borderRadiusCircular);}",
96
+ {
97
+ p: -1
98
+ }
99
+ ],
100
+ ".f16xkysk{background-color:var(--colorBrandBackground2);}"
101
+ ],
102
+ h: [
103
+ ".f1m1wcaq:hover{color:var(--colorCompoundBrandBackgroundHover);}"
104
+ ]
105
+ });
106
+ const useNextStyles = (0, _reactcomponents.__styles)({
107
+ baseIconButton: {
108
+ mc9l5x: "ftuwxu6",
109
+ Brf1p80: "f4d9j23",
110
+ Bw0ie65: 0,
111
+ Br312pm: 0,
112
+ nk6f5a: 0,
113
+ Ijaq50: 0,
114
+ Bq1tomu: "fwzfryc",
115
+ qhf8xq: "f1tmlkn4",
116
+ Bj3rh1h: "f19g0ac"
117
+ },
118
+ sendIconFilled: {
119
+ sj55zd: "f1oyzx04"
120
+ },
121
+ stopIconFilled: {
122
+ sj55zd: "f1phragk"
123
+ },
124
+ stopBackground: {
125
+ Bw0ie65: 0,
126
+ Br312pm: 0,
127
+ nk6f5a: 0,
128
+ Ijaq50: 0,
129
+ Bq1tomu: "fwzfryc",
130
+ Bqenvij: "f1l02sjl",
131
+ a9b677: "fly5x3f",
132
+ Beyfa6y: 0,
133
+ Bbmb7ep: 0,
134
+ Btl43ni: 0,
135
+ B7oj6ja: 0,
136
+ Dimara: "f44lkw9",
137
+ De3pzq: "f16xkysk"
138
+ },
139
+ stopBackgroundSending: {
140
+ De3pzq: "ffp7eso"
141
+ }
142
+ }, {
143
+ d: [
144
+ ".ftuwxu6{display:inline-flex;}",
145
+ ".f4d9j23{justify-content:center;}",
146
+ [
147
+ ".fwzfryc{grid-area:button;}",
148
+ {
149
+ p: -1
150
+ }
151
+ ],
152
+ ".f1tmlkn4{position:initial;}",
153
+ ".f19g0ac{z-index:1;}",
154
+ ".f1oyzx04{color:var(--colorCompoundBrandBackground);}",
155
+ ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",
156
+ [
157
+ ".fwzfryc{grid-area:button;}",
158
+ {
159
+ p: -1
160
+ }
161
+ ],
162
+ ".f1l02sjl{height:100%;}",
163
+ ".fly5x3f{width:100%;}",
164
+ [
165
+ ".f44lkw9{border-radius:var(--borderRadiusCircular);}",
166
+ {
167
+ p: -1
168
+ }
169
+ ],
170
+ ".f16xkysk{background-color:var(--colorBrandBackground2);}",
171
+ ".ffp7eso{background-color:var(--colorBrandBackground);}"
172
+ ]
173
+ });
174
+ const useRootNextStyles = (0, _reactcomponents.__styles)({
175
+ root: {
176
+ mc9l5x: "f13qh94s",
177
+ zoa1oz: "f9o42qa",
178
+ wkccdc: "f1u7ey36",
179
+ Budl1dq: "f1c2z91y",
180
+ B7hvi0a: "f1oiokrs",
181
+ Bt984gj: "f122n59",
182
+ Byoj8tv: 0,
183
+ uwmqm3: 0,
184
+ z189sj: 0,
185
+ z8tnut: 0,
186
+ B0ocmuz: "fv5o1b5",
187
+ Bgfg5da: 0,
188
+ B9xav0g: 0,
189
+ oivjwe: 0,
190
+ Bn0qgzm: 0,
191
+ B4g9neb: 0,
192
+ zhjwy3: 0,
193
+ wvpqe5: 0,
194
+ ibv6hh: 0,
195
+ u1mtju: 0,
196
+ h3c5rm: 0,
197
+ vrafjx: 0,
198
+ Bekrc4i: 0,
199
+ i8vvqc: 0,
200
+ g2u3we: 0,
201
+ icvyot: 0,
202
+ B4j52fo: 0,
203
+ irswps: "f3bhgqh",
204
+ qhf8xq: "f10pi13n",
205
+ Bfpq7zp: 0,
206
+ g9k6zt: 0,
207
+ Bn4voq9: 0,
208
+ giviqs: "f1pz6nmm",
209
+ j6ew2k: "f43rluz"
210
+ },
211
+ canvas: {
212
+ Bf4jedk: "f12clzc2",
213
+ Bqenvij: "fbhnoac"
214
+ },
215
+ sidecar: {
216
+ Bf4jedk: "fwbmr0d",
217
+ Bqenvij: "f1d2rq10"
218
+ },
219
+ notSending: {
220
+ Bmdhgnd: "f1hzdlu9",
221
+ yc1b9o: "f147vv5y",
222
+ f30giq: "f876z59"
223
+ },
224
+ sending: {
225
+ Bmdhgnd: "fiaw31n",
226
+ f30giq: "f3l45fr"
227
+ }
228
+ }, {
229
+ d: [
230
+ ".f13qh94s{display:grid;}",
231
+ ".f9o42qa{grid-template-areas:\"button\";}",
232
+ ".f1u7ey36{grid-template-rows:1fr;}",
233
+ ".f1c2z91y{grid-template-columns:1fr;}",
234
+ ".f1oiokrs{justify-items:center;}",
235
+ ".f122n59{align-items:center;}",
236
+ [
237
+ ".fv5o1b5{padding:var(--spacingVerticalNone);}",
238
+ {
239
+ p: -1
240
+ }
241
+ ],
242
+ [
243
+ ".f3bhgqh{border:none;}",
244
+ {
245
+ p: -2
246
+ }
247
+ ],
248
+ ".f10pi13n{position:relative;}",
249
+ [
250
+ ".f1pz6nmm[data-fui-focus-visible]{outline:var(--strokeWidthThick) solid var(--colorTransparentStroke);}",
251
+ {
252
+ p: -1
253
+ }
254
+ ],
255
+ ".f43rluz[data-fui-focus-visible]{box-shadow:0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2);}",
256
+ ".f12clzc2{min-width:40px;}",
257
+ ".fbhnoac{height:40px;}",
258
+ ".fwbmr0d{min-width:32px;}",
259
+ ".f1d2rq10{height:32px;}"
260
+ ],
261
+ h: [
262
+ ".f1hzdlu9:hover .fai-SendButton__stopBackground{background-color:var(--colorBrandBackground2Hover);}",
263
+ ".f147vv5y:hover .fai-SendButton__sendIcon,.f147vv5y:hover.fai-SendButton__stopIcon{color:var(--colorCompoundBrandBackground);}",
264
+ ".fiaw31n:hover .fai-SendButton__stopBackground{background-color:var(--colorBrandBackgroundHover);}"
265
+ ],
266
+ a: [
267
+ ".f876z59:active .fai-SendButton__stopBackground{background-color:var(--colorBrandBackground2Pressed);}",
268
+ ".f3l45fr:active .fai-SendButton__stopBackground{background-color:var(--colorBrandBackgroundPressed);}"
269
+ ]
270
+ });
271
+ const useSendButtonStyles_unstable = (state)=>{
272
+ 'use no memo';
273
+ const { isSendIconFilled, isSending, disabled, designVersion, mode } = state;
274
+ const styles = useStyles();
275
+ const nextStyles = useNextStyles();
276
+ const rootNextStyles = useRootNextStyles();
277
+ const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;
278
+ const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;
279
+ state.root.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.root, designVersion === 'next' ? rootNextStyles.root : styles.root, isSendIconFilled && sendIconFilledStyle, (state.isButtonMotionRunning || isSending) && sendIconFilledStyle, designVersion === 'next' && rootNextStyles[mode], designVersion === 'next' && rootNextStyles.root, !disabled && designVersion === 'next' && !isSending && rootNextStyles.notSending, !disabled && designVersion === 'next' && isSending && rootNextStyles.sending, disabled && styles.disabled, state.root.className);
280
+ if (state.sendIcon) {
281
+ state.sendIcon.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.sendIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, state.sendIcon.className);
282
+ }
283
+ if (state.stopIcon) {
284
+ state.stopIcon.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.stopIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, stopIconFilledStyle, state.stopIcon.className);
285
+ }
286
+ if (state.stopBackground) {
287
+ state.stopBackground.className = (0, _reactcomponents.mergeClasses)(sendButtonClassNames.stopBackground, designVersion === 'next' ? nextStyles.stopBackground : styles.stopBackground, designVersion === 'next' && isSending && nextStyles.stopBackgroundSending, state.stopBackground.className);
288
+ }
289
+ // Add style hooks from button
290
+ (0, _reactcomponents.useButtonStyles_unstable)({
291
+ ...state,
292
+ components: {
293
+ ...state.components,
294
+ icon: 'span'
295
+ },
296
+ iconOnly: false
297
+ });
298
+ return state;
299
+ }; //# sourceMappingURL=useSendButtonStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useSendButtonStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n mergeClasses,\n useButtonStyles_unstable,\n createCustomFocusIndicatorStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nimport type { SendButtonSlots, SendButtonState } from './SendButton.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const sendButtonClassNames: SlotClassNames<SendButtonSlots> = {\n root: 'fai-SendButton',\n sendIcon: 'fai-SendButton__sendIcon',\n stopIcon: 'fai-SendButton__stopIcon',\n stopBackground: 'fai-SendButton__stopBackground',\n sendButtonMotion: 'fai-SendButton__sendButtonMotion',\n stopButtonMotion: 'fai-SendButton__stopButtonMotion',\n stopBackgroundMotion: 'fai-SendButton__stopBackgroundMotion',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n width: '32px',\n minWidth: '32px',\n height: '32px',\n alignItems: 'center',\n padding: '0',\n },\n\n baseIconButton: {\n position: 'absolute',\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n fontSize: tokens.fontSizeBase500, // 20px\n height: '20px',\n width: '20px',\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n iconFilled: {\n color: tokens.colorCompoundBrandBackground,\n ':hover': {\n color: tokens.colorCompoundBrandBackgroundHover,\n },\n },\n\n stopBackground: {\n position: 'absolute',\n width: 'inherit',\n height: 'inherit',\n borderRadius: tokens.borderRadiusCircular,\n /** To-do: Change to backgroundColor: var(--Brand-Background-Tint-Rest, #EBEFFF);*/\n backgroundColor: tokens.colorBrandBackground2,\n },\n});\n\nconst useNextStyles = makeStyles({\n baseIconButton: {\n display: 'inline-flex',\n justifyContent: 'center',\n gridArea: 'button',\n position: 'initial',\n zIndex: 1,\n },\n\n sendIconFilled: {\n color: tokens.colorCompoundBrandBackground,\n },\n\n stopIconFilled: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n stopBackground: {\n gridArea: 'button',\n height: '100%',\n width: '100%',\n borderRadius: tokens.borderRadiusCircular,\n /** To-do: Change to backgroundColor: var(--Brand-Background-Tint-Rest, #EBEFFF);*/\n backgroundColor: tokens.colorBrandBackground2,\n },\n\n stopBackgroundSending: {\n backgroundColor: tokens.colorBrandBackground,\n },\n});\nconst useRootNextStyles = makeStyles({\n root: {\n display: 'grid',\n gridTemplateAreas: `\"button\"`,\n gridTemplateRows: '1fr',\n gridTemplateColumns: '1fr',\n justifyItems: 'center',\n alignItems: 'center',\n padding: tokens.spacingVerticalNone,\n border: 'none',\n position: 'relative',\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n boxShadow: `0 0 0 ${tokens.strokeWidthThick} ${tokens.colorStrokeFocus2}`,\n }),\n },\n\n canvas: {\n minWidth: '40px',\n height: '40px',\n },\n\n sidecar: {\n minWidth: '32px',\n height: '32px',\n },\n\n notSending: {\n ':hover': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n\n [`& .${sendButtonClassNames.sendIcon},.${sendButtonClassNames.stopIcon}`]: {\n color: tokens.colorCompoundBrandBackground,\n },\n },\n ':active': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n },\n },\n\n sending: {\n ':hover': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackgroundHover,\n },\n },\n ':active': {\n [`& .${sendButtonClassNames.stopBackground}`]: {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n },\n },\n },\n});\n\n/**\n * Apply styling to the SendButton slots based on the state\n */\nexport const useSendButtonStyles_unstable = (state: SendButtonState): SendButtonState => {\n 'use no memo';\n const { isSendIconFilled, isSending, disabled, designVersion, mode } = state;\n\n const styles = useStyles();\n const nextStyles = useNextStyles();\n const rootNextStyles = useRootNextStyles();\n\n const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;\n const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;\n\n state.root.className = mergeClasses(\n sendButtonClassNames.root,\n designVersion === 'next' ? rootNextStyles.root : styles.root,\n isSendIconFilled && sendIconFilledStyle,\n (state.isButtonMotionRunning || isSending) && sendIconFilledStyle,\n designVersion === 'next' && rootNextStyles[mode],\n designVersion === 'next' && rootNextStyles.root,\n !disabled && designVersion === 'next' && !isSending && rootNextStyles.notSending,\n !disabled && designVersion === 'next' && isSending && rootNextStyles.sending,\n disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.sendIcon) {\n state.sendIcon.className = mergeClasses(\n sendButtonClassNames.sendIcon,\n designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton,\n state.sendIcon.className,\n );\n }\n\n if (state.stopIcon) {\n state.stopIcon.className = mergeClasses(\n sendButtonClassNames.stopIcon,\n designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton,\n stopIconFilledStyle,\n state.stopIcon.className,\n );\n }\n\n if (state.stopBackground) {\n state.stopBackground.className = mergeClasses(\n sendButtonClassNames.stopBackground,\n designVersion === 'next' ? nextStyles.stopBackground : styles.stopBackground,\n designVersion === 'next' && isSending && nextStyles.stopBackgroundSending,\n state.stopBackground.className,\n );\n }\n\n // Add style hooks from button\n useButtonStyles_unstable({ ...state, components: { ...state.components, icon: 'span' }, iconOnly: false });\n\n return state;\n};\n"],"names":["sendButtonClassNames","root","sendIcon","stopIcon","stopBackground","sendButtonMotion","stopButtonMotion","stopBackgroundMotion","__styles","display","width","minWidth","height","alignItems","padding","Byoj8tv","baseIconButton","position","tokens","mc9l5x","disabled","color","Bqenvij","iconFilled","borderRadius","Beyfa6y","Bbmb7ep","useNextStyles","justifyContent","gridArea","sendIconFilled","colorCompoundBrandBackground","p","stopIconFilled","nk6f5a","stopBackgroundSending","backgroundColor","qhf8xq","Bj3rh1h","gridTemplateRows","gridTemplateColumns","border","createCustomFocusIndicatorStyle","outline","boxShadow","canvas","Dimara","sidecar","De3pzq","wkccdc","sending","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","isSendIconFilled","vrafjx","styles","Bekrc4i","nextStyles","i8vvqc","rootNextStyles","g2u3we","sendIconFilledStyle","icvyot","stopIconFilledStyle","state","irswps","Bfpq7zp","g9k6zt","giviqs","j6ew2k","Bf4jedk","useButtonStyles_unstable","components","icon","iconOnly","Bmdhgnd","yc1b9o","f30giq"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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iD,QAAA;QAEAC,SAAS;iBACP;iBACG;;gBAED;gBACF;gBACA;iBACG;;iBAED;gBACF;QACFC,SAAA;QACFC,SAAA;QAEAC,QAAA;;QAGAC,QAAO;QACLC,QAAA;QACAC,QAAQC;QAERC,QAAMC;QACNC,SAAMC;QACNC,QAAMC;QAENC,QAAMC;QACNC,QAAMC;QAENC,SAAMnE;QAaNoE,QAAID;gBACFA;QAKFE,SAAA;QAEAC,QAAIH;iBACFA;QAMFI,QAAA;QAEAC,QAAIL;;YAOJ;QAEAM,SAAA;QACAC,SAAAA;;aAAqCC;iBAAc;iBAAqBC;;gBAAgBC;QAAgBC,SAAA;QAExGC,QAAOZ;QACPa,QAAA"}
@@ -0,0 +1,29 @@
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
+ SendButton: function() {
13
+ return _SendButton.SendButton;
14
+ },
15
+ renderSendButton_unstable: function() {
16
+ return _SendButton.renderSendButton_unstable;
17
+ },
18
+ sendButtonClassNames: function() {
19
+ return _SendButton.sendButtonClassNames;
20
+ },
21
+ useSendButtonStyles_unstable: function() {
22
+ return _SendButton.useSendButtonStyles_unstable;
23
+ },
24
+ useSendButton_unstable: function() {
25
+ return _SendButton.useSendButton_unstable;
26
+ }
27
+ });
28
+ const _SendButton = require("./SendButton");
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { SendButtonProps, SendButtonSlots, SendButtonState } from './SendButton';\nexport {\n SendButton,\n renderSendButton_unstable,\n sendButtonClassNames,\n useSendButtonStyles_unstable,\n useSendButton_unstable,\n} from './SendButton';\n"],"names":["SendButton","renderSendButton_unstable","sendButtonClassNames","useSendButtonStyles_unstable","useSendButton_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,UAAU;eAAVA,sBAAU;;IACVC,yBAAyB;eAAzBA,qCAAyB;;IACzBC,oBAAoB;eAApBA,gCAAoB;;IACpBC,4BAA4B;eAA5BA,wCAA4B;;IAC5BC,sBAAsB;eAAtBA,kCAAsB;;;4BACjB"}
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@fluentui-copilot/react-send-button",
3
+ "version": "0.0.0-nightly-20250416-0405-24e1479b.1",
4
+ "description": "Fluent AI control for the send button used in ChatInput and PromptInput.",
5
+ "main": "lib-commonjs/index.js",
6
+ "module": "lib/index.js",
7
+ "typings": "./dist/index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/microsoft/fluentai"
12
+ },
13
+ "license": "MIT",
14
+ "dependencies": {
15
+ "@fluentui-copilot/react-provider": "^0.0.0-nightly-20250416-0405-24e1479b.1",
16
+ "@fluentui-copilot/react-utilities": "^0.0.0-nightly-20250416-0405-24e1479b.1",
17
+ "@fluentui-copilot/tokens": "^0.0.0-nightly-20250416-0405-24e1479b.1",
18
+ "@swc/helpers": "^0.5.1"
19
+ },
20
+ "peerDependencies": {
21
+ "@fluentui/react-components": ">=9.55.1 <10.0.0",
22
+ "@fluentui/react-icons": ">=2.0.260 <3.0.0",
23
+ "@fluentui/react-jsx-runtime": ">=9.0.45 <10.0.0",
24
+ "@fluentui/react-motion": ">=9.6.0 <10.0.0",
25
+ "@fluentui/react-shared-contexts": ">=9.20.2 <10.0.0",
26
+ "@types/react": ">=16.14.0 <19.0.0",
27
+ "@types/react-dom": ">=16.9.8 <19.0.0",
28
+ "react": ">=16.14.0 <19.0.0",
29
+ "react-dom": ">=16.14.0 <19.0.0"
30
+ },
31
+ "beachball": {},
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "node": "./lib-commonjs/index.js",
36
+ "import": "./lib/index.js",
37
+ "require": "./lib-commonjs/index.js"
38
+ },
39
+ "./package.json": "./package.json"
40
+ }
41
+ }