@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,212 @@
1
+ import { __styles, mergeClasses, useButtonStyles_unstable, createCustomFocusIndicatorStyle } from '@fluentui/react-components';
2
+ import { tokens } from '@fluentui-copilot/tokens';
3
+ export const sendButtonClassNames = {
4
+ root: 'fai-SendButton',
5
+ sendIcon: 'fai-SendButton__sendIcon',
6
+ stopIcon: 'fai-SendButton__stopIcon',
7
+ stopBackground: 'fai-SendButton__stopBackground',
8
+ sendButtonMotion: 'fai-SendButton__sendButtonMotion',
9
+ stopButtonMotion: 'fai-SendButton__stopButtonMotion',
10
+ stopBackgroundMotion: 'fai-SendButton__stopBackgroundMotion'
11
+ };
12
+ /**
13
+ * Styles for the root slot
14
+ */
15
+ const useStyles = __styles({
16
+ root: {
17
+ mc9l5x: "f22iagw",
18
+ a9b677: "f1szoe96",
19
+ Bf4jedk: "fwbmr0d",
20
+ Bqenvij: "f1d2rq10",
21
+ Bt984gj: "f122n59",
22
+ Byoj8tv: 0,
23
+ uwmqm3: 0,
24
+ z189sj: 0,
25
+ z8tnut: 0,
26
+ B0ocmuz: "f1mk8lai"
27
+ },
28
+ baseIconButton: {
29
+ qhf8xq: "f1euv43f",
30
+ Bt984gj: "f122n59",
31
+ mc9l5x: "ftuwxu6",
32
+ Brf1p80: "f4d9j23",
33
+ Be2twd7: "f1pp30po",
34
+ Bqenvij: "fjamq6b",
35
+ a9b677: "f64fuq3"
36
+ },
37
+ disabled: {
38
+ sj55zd: "f1s2aq7o"
39
+ },
40
+ iconFilled: {
41
+ sj55zd: "f1oyzx04",
42
+ Bi91k9c: "f1m1wcaq"
43
+ },
44
+ stopBackground: {
45
+ qhf8xq: "f1euv43f",
46
+ a9b677: "f2q8o33",
47
+ Bqenvij: "fwk23hs",
48
+ Beyfa6y: 0,
49
+ Bbmb7ep: 0,
50
+ Btl43ni: 0,
51
+ B7oj6ja: 0,
52
+ Dimara: "f44lkw9",
53
+ De3pzq: "f16xkysk"
54
+ }
55
+ }, {
56
+ d: [".f22iagw{display:flex;}", ".f1szoe96{width:32px;}", ".fwbmr0d{min-width:32px;}", ".f1d2rq10{height:32px;}", ".f122n59{align-items:center;}", [".f1mk8lai{padding:0;}", {
57
+ p: -1
58
+ }], ".f1euv43f{position:absolute;}", ".ftuwxu6{display:inline-flex;}", ".f4d9j23{justify-content:center;}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1oyzx04{color:var(--colorCompoundBrandBackground);}", ".f2q8o33{width:inherit;}", ".fwk23hs{height:inherit;}", [".f44lkw9{border-radius:var(--borderRadiusCircular);}", {
59
+ p: -1
60
+ }], ".f16xkysk{background-color:var(--colorBrandBackground2);}"],
61
+ h: [".f1m1wcaq:hover{color:var(--colorCompoundBrandBackgroundHover);}"]
62
+ });
63
+ const useNextStyles = __styles({
64
+ baseIconButton: {
65
+ mc9l5x: "ftuwxu6",
66
+ Brf1p80: "f4d9j23",
67
+ Bw0ie65: 0,
68
+ Br312pm: 0,
69
+ nk6f5a: 0,
70
+ Ijaq50: 0,
71
+ Bq1tomu: "fwzfryc",
72
+ qhf8xq: "f1tmlkn4",
73
+ Bj3rh1h: "f19g0ac"
74
+ },
75
+ sendIconFilled: {
76
+ sj55zd: "f1oyzx04"
77
+ },
78
+ stopIconFilled: {
79
+ sj55zd: "f1phragk"
80
+ },
81
+ stopBackground: {
82
+ Bw0ie65: 0,
83
+ Br312pm: 0,
84
+ nk6f5a: 0,
85
+ Ijaq50: 0,
86
+ Bq1tomu: "fwzfryc",
87
+ Bqenvij: "f1l02sjl",
88
+ a9b677: "fly5x3f",
89
+ Beyfa6y: 0,
90
+ Bbmb7ep: 0,
91
+ Btl43ni: 0,
92
+ B7oj6ja: 0,
93
+ Dimara: "f44lkw9",
94
+ De3pzq: "f16xkysk"
95
+ },
96
+ stopBackgroundSending: {
97
+ De3pzq: "ffp7eso"
98
+ }
99
+ }, {
100
+ d: [".ftuwxu6{display:inline-flex;}", ".f4d9j23{justify-content:center;}", [".fwzfryc{grid-area:button;}", {
101
+ p: -1
102
+ }], ".f1tmlkn4{position:initial;}", ".f19g0ac{z-index:1;}", ".f1oyzx04{color:var(--colorCompoundBrandBackground);}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", [".fwzfryc{grid-area:button;}", {
103
+ p: -1
104
+ }], ".f1l02sjl{height:100%;}", ".fly5x3f{width:100%;}", [".f44lkw9{border-radius:var(--borderRadiusCircular);}", {
105
+ p: -1
106
+ }], ".f16xkysk{background-color:var(--colorBrandBackground2);}", ".ffp7eso{background-color:var(--colorBrandBackground);}"]
107
+ });
108
+ const useRootNextStyles = __styles({
109
+ root: {
110
+ mc9l5x: "f13qh94s",
111
+ zoa1oz: "f9o42qa",
112
+ wkccdc: "f1u7ey36",
113
+ Budl1dq: "f1c2z91y",
114
+ B7hvi0a: "f1oiokrs",
115
+ Bt984gj: "f122n59",
116
+ Byoj8tv: 0,
117
+ uwmqm3: 0,
118
+ z189sj: 0,
119
+ z8tnut: 0,
120
+ B0ocmuz: "fv5o1b5",
121
+ Bgfg5da: 0,
122
+ B9xav0g: 0,
123
+ oivjwe: 0,
124
+ Bn0qgzm: 0,
125
+ B4g9neb: 0,
126
+ zhjwy3: 0,
127
+ wvpqe5: 0,
128
+ ibv6hh: 0,
129
+ u1mtju: 0,
130
+ h3c5rm: 0,
131
+ vrafjx: 0,
132
+ Bekrc4i: 0,
133
+ i8vvqc: 0,
134
+ g2u3we: 0,
135
+ icvyot: 0,
136
+ B4j52fo: 0,
137
+ irswps: "f3bhgqh",
138
+ qhf8xq: "f10pi13n",
139
+ Bfpq7zp: 0,
140
+ g9k6zt: 0,
141
+ Bn4voq9: 0,
142
+ giviqs: "f1pz6nmm",
143
+ j6ew2k: "f43rluz"
144
+ },
145
+ canvas: {
146
+ Bf4jedk: "f12clzc2",
147
+ Bqenvij: "fbhnoac"
148
+ },
149
+ sidecar: {
150
+ Bf4jedk: "fwbmr0d",
151
+ Bqenvij: "f1d2rq10"
152
+ },
153
+ notSending: {
154
+ Bmdhgnd: "f1hzdlu9",
155
+ yc1b9o: "f147vv5y",
156
+ f30giq: "f876z59"
157
+ },
158
+ sending: {
159
+ Bmdhgnd: "fiaw31n",
160
+ f30giq: "f3l45fr"
161
+ }
162
+ }, {
163
+ d: [".f13qh94s{display:grid;}", ".f9o42qa{grid-template-areas:\"button\";}", ".f1u7ey36{grid-template-rows:1fr;}", ".f1c2z91y{grid-template-columns:1fr;}", ".f1oiokrs{justify-items:center;}", ".f122n59{align-items:center;}", [".fv5o1b5{padding:var(--spacingVerticalNone);}", {
164
+ p: -1
165
+ }], [".f3bhgqh{border:none;}", {
166
+ p: -2
167
+ }], ".f10pi13n{position:relative;}", [".f1pz6nmm[data-fui-focus-visible]{outline:var(--strokeWidthThick) solid var(--colorTransparentStroke);}", {
168
+ p: -1
169
+ }], ".f43rluz[data-fui-focus-visible]{box-shadow:0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2);}", ".f12clzc2{min-width:40px;}", ".fbhnoac{height:40px;}", ".fwbmr0d{min-width:32px;}", ".f1d2rq10{height:32px;}"],
170
+ h: [".f1hzdlu9:hover .fai-SendButton__stopBackground{background-color:var(--colorBrandBackground2Hover);}", ".f147vv5y:hover .fai-SendButton__sendIcon,.f147vv5y:hover.fai-SendButton__stopIcon{color:var(--colorCompoundBrandBackground);}", ".fiaw31n:hover .fai-SendButton__stopBackground{background-color:var(--colorBrandBackgroundHover);}"],
171
+ a: [".f876z59:active .fai-SendButton__stopBackground{background-color:var(--colorBrandBackground2Pressed);}", ".f3l45fr:active .fai-SendButton__stopBackground{background-color:var(--colorBrandBackgroundPressed);}"]
172
+ });
173
+ /**
174
+ * Apply styling to the SendButton slots based on the state
175
+ */
176
+ export const useSendButtonStyles_unstable = state => {
177
+ 'use no memo';
178
+
179
+ const {
180
+ isSendIconFilled,
181
+ isSending,
182
+ disabled,
183
+ designVersion,
184
+ mode
185
+ } = state;
186
+ const styles = useStyles();
187
+ const nextStyles = useNextStyles();
188
+ const rootNextStyles = useRootNextStyles();
189
+ const sendIconFilledStyle = designVersion === 'next' ? nextStyles.sendIconFilled : styles.iconFilled;
190
+ const stopIconFilledStyle = designVersion === 'next' ? nextStyles.stopIconFilled : styles.iconFilled;
191
+ state.root.className = 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);
192
+ if (state.sendIcon) {
193
+ state.sendIcon.className = mergeClasses(sendButtonClassNames.sendIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, state.sendIcon.className);
194
+ }
195
+ if (state.stopIcon) {
196
+ state.stopIcon.className = mergeClasses(sendButtonClassNames.stopIcon, designVersion === 'next' ? nextStyles.baseIconButton : styles.baseIconButton, stopIconFilledStyle, state.stopIcon.className);
197
+ }
198
+ if (state.stopBackground) {
199
+ state.stopBackground.className = mergeClasses(sendButtonClassNames.stopBackground, designVersion === 'next' ? nextStyles.stopBackground : styles.stopBackground, designVersion === 'next' && isSending && nextStyles.stopBackgroundSending, state.stopBackground.className);
200
+ }
201
+ // Add style hooks from button
202
+ useButtonStyles_unstable({
203
+ ...state,
204
+ components: {
205
+ ...state.components,
206
+ icon: 'span'
207
+ },
208
+ iconOnly: false
209
+ });
210
+ return state;
211
+ };
212
+ //# 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":["makeStyles","mergeClasses","useButtonStyles_unstable","createCustomFocusIndicatorStyle","tokens","sendButtonClassNames","root","sendIcon","stopIcon","stopBackground","sendButtonMotion","stopButtonMotion","stopBackgroundMotion","useStyles","display","width","minWidth","height","alignItems","padding","baseIconButton","position","justifyContent","fontSize","fontSizeBase500","disabled","color","colorNeutralForegroundDisabled","iconFilled","colorCompoundBrandBackground","colorCompoundBrandBackgroundHover","borderRadius","borderRadiusCircular","backgroundColor","colorBrandBackground2","useNextStyles","gridArea","zIndex","sendIconFilled","stopIconFilled","colorNeutralForegroundOnBrand","stopBackgroundSending","colorBrandBackground","useRootNextStyles","gridTemplateAreas","gridTemplateRows","gridTemplateColumns","justifyItems","spacingVerticalNone","border","outline","strokeWidthThick","colorTransparentStroke","boxShadow","colorStrokeFocus2","canvas","sidecar","notSending","colorBrandBackground2Hover","colorBrandBackground2Pressed","sending","colorBrandBackgroundHover","colorBrandBackgroundPressed","useSendButtonStyles_unstable","state","isSendIconFilled","isSending","designVersion","mode","styles","nextStyles","rootNextStyles","sendIconFilledStyle","stopIconFilledStyle","className","isButtonMotionRunning","components","icon","iconOnly"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,UAAU,EACVC,YAAY,EACZC,wBAAwB,EACxBC,+BAA+B,QAC1B,6BAA6B;AACpC,SAASC,MAAM,QAAQ,2BAA2B;AAKlD,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,UAAU;IACVC,UAAU;IACVC,gBAAgB;IAChBC,kBAAkB;IAClBC,kBAAkB;IAClBC,sBAAsB;AACxB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYb,WAAW;IAC3BM,MAAM;QACJQ,SAAS;QACTC,OAAO;QACPC,UAAU;QACVC,QAAQ;QACRC,YAAY;QACZC,SAAS;IACX;IAEAC,gBAAgB;QACdC,UAAU;QACVH,YAAY;QACZJ,SAAS;QACTQ,gBAAgB;QAChBC,UAAUnB,OAAOoB,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;AACT,EAAE"}
package/lib/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { SendButton, renderSendButton_unstable, sendButtonClassNames, useSendButtonStyles_unstable, useSendButton_unstable } from './SendButton';
2
+ //# 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":"AACA,SACEA,UAAU,EACVC,yBAAyB,EACzBC,oBAAoB,EACpBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe"}
@@ -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("./components/SendButton");
29
+ //# sourceMappingURL=SendButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["SendButton.ts"],"sourcesContent":["export {\n SendButton,\n renderSendButton_unstable,\n useSendButton_unstable,\n sendButtonClassNames,\n useSendButtonStyles_unstable,\n} from './components/SendButton';\nexport type { SendButtonProps, SendButtonSlots, SendButtonState } from './components/SendButton';\n"],"names":["SendButton","renderSendButton_unstable","sendButtonClassNames","useSendButtonStyles_unstable","useSendButton_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,UAAU;eAAVA,sBAAU;;IACVC,yBAAyB;eAAzBA,qCAAyB;;IAEzBC,oBAAoB;eAApBA,gCAAoB;;IACpBC,4BAA4B;eAA5BA,wCAA4B;;IAF5BC,sBAAsB;eAAtBA,kCAAsB;;;4BAGjB"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "SendButton", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return SendButton;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _useSendButton = require("./useSendButton");
14
+ const _renderSendButton = require("./renderSendButton");
15
+ const _useSendButtonStylesstyles = require("./useSendButtonStyles.styles");
16
+ const SendButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
+ const state = (0, _useSendButton.useSendButton_unstable)(props, ref);
18
+ (0, _useSendButtonStylesstyles.useSendButtonStyles_unstable)(state);
19
+ return (0, _renderSendButton.renderSendButton_unstable)(state);
20
+ });
21
+ SendButton.displayName = 'SendButton'; //# sourceMappingURL=SendButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["SendButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSendButton_unstable } from './useSendButton';\nimport { renderSendButton_unstable } from './renderSendButton';\nimport { useSendButtonStyles_unstable } from './useSendButtonStyles.styles';\nimport type { SendButtonProps } from './SendButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// SendButton component - TODO: add more docs\nexport const SendButton: ForwardRefComponent<SendButtonProps> = React.forwardRef((props, ref) => {\n const state = useSendButton_unstable(props, ref);\n\n useSendButtonStyles_unstable(state);\n return renderSendButton_unstable(state);\n});\n\nSendButton.displayName = 'SendButton';\n"],"names":["SendButton","React","forwardRef","props","state","useSendButton_unstable","useSendButtonStyles_unstable","renderSendButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;+BACgB;kCACG;2CACG;AAKtC,MAAMA,aAAAA,WAAAA,GAAAA,OAAmDC,UAAMC,CAAU,CAACC,OAACA;UAChFC,QAAMA,IAAAA,qCAAQC,EAAAA,OAAuBF;+DAErCG,EAAAA;WACAC,IAAAA,2CAAOA,EAAAA;AACT;AAEAP,WAAWQ,WAAW,GAAG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * State used in rendering SendButton
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ //# sourceMappingURL=SendButton.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["SendButton.types.ts"],"sourcesContent":["import type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ButtonProps, ButtonState, ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { PresenceMotionSlotProps } from '@fluentui/react-motion';\nexport type SendButtonSlots = {\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n sendIcon: NonNullable<Slot<'span'>>;\n stopIcon?: Slot<'span'>;\n /** Stop button's circle background */\n stopBackground: NonNullable<Slot<'div'>>;\n sendButtonMotion: NonNullable<Slot<PresenceMotionSlotProps>>;\n stopButtonMotion: NonNullable<Slot<PresenceMotionSlotProps>>;\n stopBackgroundMotion: NonNullable<Slot<PresenceMotionSlotProps>>;\n};\n\n/**\n * SendButton Props\n */\nexport type SendButtonProps = ComponentProps<Partial<SendButtonSlots>> &\n Pick<ButtonProps, 'appearance' | 'disabled' | 'disabledFocusable' | 'iconPosition' | 'shape' | 'size'> &\n DesignVersion &\n CopilotMode & {\n /**\n * Checks whether query is sending.\n */\n isSending?: boolean;\n isSendIconFilled?: boolean;\n };\n\n/**\n * State used in rendering SendButton\n */\nexport type SendButtonState = ComponentState<SendButtonSlots> &\n Pick<ButtonState, 'appearance' | 'disabled' | 'disabledFocusable' | 'iconPosition' | 'shape' | 'size'> &\n Pick<SendButtonProps, 'isSendIconFilled' | 'isSending'> &\n Pick<Required<SendButtonProps>, 'designVersion' | 'mode'> & {\n isButtonMotionRunning?: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AA6BA;;CAEC"}
@@ -0,0 +1,233 @@
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
+ CircleButtonMotion: function() {
13
+ return CircleButtonMotion;
14
+ },
15
+ SendButtonMotion: function() {
16
+ return SendButtonMotion;
17
+ },
18
+ StopButtonMotion: function() {
19
+ return StopButtonMotion;
20
+ }
21
+ });
22
+ const _reactcomponents = require("@fluentui/react-components");
23
+ const scaleSend = 1.2;
24
+ const startScaleStop = 0.5;
25
+ const scaleStop = 1.2;
26
+ const startScaleCircle = 0.1;
27
+ const scaleCircle = 1.1;
28
+ const motionSpeedMultiplier = 1;
29
+ const sendMotion = ()=>{
30
+ const enterKeyframes = [
31
+ {
32
+ keyframes: [
33
+ {
34
+ transform: `scale(0)`
35
+ }
36
+ ],
37
+ duration: 0
38
+ },
39
+ {
40
+ keyframes: [
41
+ {
42
+ transform: `scale(0)`
43
+ },
44
+ {
45
+ transform: `scale(${scaleSend})`
46
+ }
47
+ ],
48
+ duration: _reactcomponents.motionTokens.durationNormal * motionSpeedMultiplier,
49
+ easing: _reactcomponents.motionTokens.curveDecelerateMax,
50
+ delay: _reactcomponents.motionTokens.durationSlow * motionSpeedMultiplier
51
+ },
52
+ {
53
+ keyframes: [
54
+ {
55
+ transform: `scale(${scaleSend})`
56
+ },
57
+ {
58
+ transform: 'scale(1)'
59
+ }
60
+ ],
61
+ duration: _reactcomponents.motionTokens.durationSlow * motionSpeedMultiplier,
62
+ easing: _reactcomponents.motionTokens.curveDecelerateMid,
63
+ delay: (_reactcomponents.motionTokens.durationSlow + _reactcomponents.motionTokens.durationNormal) * motionSpeedMultiplier
64
+ }
65
+ ];
66
+ const exitKeyframes = [
67
+ {
68
+ keyframes: [
69
+ {
70
+ transform: `scale(1)`
71
+ },
72
+ {
73
+ transform: `scale(0)`
74
+ }
75
+ ],
76
+ duration: _reactcomponents.motionTokens.durationFast * motionSpeedMultiplier,
77
+ easing: _reactcomponents.motionTokens.curveDecelerateMid
78
+ }
79
+ ];
80
+ return {
81
+ enter: enterKeyframes,
82
+ exit: exitKeyframes
83
+ };
84
+ };
85
+ const stopMotion = ()=>{
86
+ const enterKeyframes = [
87
+ {
88
+ keyframes: [
89
+ {
90
+ opacity: 0
91
+ }
92
+ ],
93
+ duration: 0
94
+ },
95
+ {
96
+ keyframes: [
97
+ {
98
+ opacity: 1
99
+ }
100
+ ],
101
+ duration: 0,
102
+ delay: 30 * motionSpeedMultiplier
103
+ },
104
+ {
105
+ keyframes: [
106
+ {
107
+ transform: `scale(${startScaleStop})`
108
+ },
109
+ {
110
+ transform: `scale(1)`
111
+ }
112
+ ],
113
+ duration: _reactcomponents.motionTokens.durationSlower * motionSpeedMultiplier,
114
+ easing: _reactcomponents.motionTokens.curveDecelerateMid
115
+ }
116
+ ];
117
+ const exitKeyframes = [
118
+ {
119
+ keyframes: [
120
+ {
121
+ transform: `scale(1)`
122
+ },
123
+ {
124
+ transform: `scale(${scaleStop})`
125
+ }
126
+ ],
127
+ duration: _reactcomponents.motionTokens.durationFast * motionSpeedMultiplier,
128
+ easing: _reactcomponents.motionTokens.curveDecelerateMax,
129
+ delay: _reactcomponents.motionTokens.durationUltraFast * motionSpeedMultiplier
130
+ },
131
+ {
132
+ keyframes: [
133
+ {
134
+ transform: `scale(${scaleStop})`
135
+ },
136
+ {
137
+ transform: 'scale(0)'
138
+ }
139
+ ],
140
+ duration: _reactcomponents.motionTokens.durationFaster,
141
+ easing: _reactcomponents.motionTokens.curveDecelerateMin,
142
+ delay: (_reactcomponents.motionTokens.durationUltraFast + _reactcomponents.motionTokens.durationFast) * motionSpeedMultiplier
143
+ }
144
+ ];
145
+ return {
146
+ enter: enterKeyframes,
147
+ exit: exitKeyframes
148
+ };
149
+ };
150
+ const circleMotion = ()=>{
151
+ const enterKeyframes = [
152
+ {
153
+ keyframes: [
154
+ {
155
+ opacity: 0
156
+ }
157
+ ],
158
+ duration: 0
159
+ },
160
+ {
161
+ keyframes: [
162
+ {
163
+ opacity: 0
164
+ },
165
+ {
166
+ opacity: 1
167
+ }
168
+ ],
169
+ duration: 0,
170
+ delay: _reactcomponents.motionTokens.durationFaster * motionSpeedMultiplier
171
+ },
172
+ {
173
+ keyframes: [
174
+ {
175
+ transform: `scale(${startScaleCircle})`
176
+ },
177
+ {
178
+ transform: `scale(${scaleCircle})`
179
+ }
180
+ ],
181
+ duration: _reactcomponents.motionTokens.durationSlow * motionSpeedMultiplier,
182
+ easing: _reactcomponents.motionTokens.curveDecelerateMax,
183
+ delay: _reactcomponents.motionTokens.durationFaster * motionSpeedMultiplier
184
+ },
185
+ {
186
+ keyframes: [
187
+ {
188
+ transform: `scale(${scaleCircle})`
189
+ },
190
+ {
191
+ transform: `scale(1)`
192
+ }
193
+ ],
194
+ duration: _reactcomponents.motionTokens.durationNormal * motionSpeedMultiplier,
195
+ easing: _reactcomponents.motionTokens.curveDecelerateMin,
196
+ delay: (_reactcomponents.motionTokens.durationSlow + _reactcomponents.motionTokens.durationFaster) * motionSpeedMultiplier
197
+ }
198
+ ];
199
+ const exitKeyframes = [
200
+ {
201
+ keyframes: [
202
+ {
203
+ transform: `scale(1)`
204
+ },
205
+ {
206
+ transform: `scale(${scaleCircle})`
207
+ }
208
+ ],
209
+ duration: _reactcomponents.motionTokens.durationFast * motionSpeedMultiplier,
210
+ easing: _reactcomponents.motionTokens.curveDecelerateMax
211
+ },
212
+ {
213
+ keyframes: [
214
+ {
215
+ transform: `scale(${scaleCircle})`
216
+ },
217
+ {
218
+ transform: 'scale(0)'
219
+ }
220
+ ],
221
+ duration: _reactcomponents.motionTokens.durationFaster * motionSpeedMultiplier,
222
+ easing: _reactcomponents.motionTokens.curveDecelerateMin,
223
+ delay: _reactcomponents.motionTokens.durationFast * motionSpeedMultiplier
224
+ }
225
+ ];
226
+ return {
227
+ enter: enterKeyframes,
228
+ exit: exitKeyframes
229
+ };
230
+ };
231
+ const SendButtonMotion = (0, _reactcomponents.createPresenceComponent)(sendMotion);
232
+ const StopButtonMotion = (0, _reactcomponents.createPresenceComponent)(stopMotion);
233
+ const CircleButtonMotion = (0, _reactcomponents.createPresenceComponent)(circleMotion); //# sourceMappingURL=buttonMotion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["buttonMotion.ts"],"sourcesContent":["import type { PresenceMotionFn } from '@fluentui/react-components';\nimport { createPresenceComponent, motionTokens } from '@fluentui/react-components';\n\nconst scaleSend = 1.2;\nconst startScaleStop = 0.5;\nconst scaleStop = 1.2;\nconst startScaleCircle = 0.1;\nconst scaleCircle = 1.1;\n\nconst motionSpeedMultiplier = 1;\n\nconst sendMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ transform: `scale(0)` }],\n duration: 0,\n },\n {\n keyframes: [{ transform: `scale(0)` }, { transform: `scale(${scaleSend})` }],\n duration: motionTokens.durationNormal * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationSlow * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleSend})` }, { transform: 'scale(1)' }],\n duration: motionTokens.durationSlow * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n delay: (motionTokens.durationSlow + motionTokens.durationNormal) * motionSpeedMultiplier,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(0)` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\n\nconst stopMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ opacity: 0 }],\n duration: 0,\n },\n {\n keyframes: [{ opacity: 1 }],\n duration: 0,\n delay: 30 * motionSpeedMultiplier, // non-standard motion duration\n },\n {\n keyframes: [{ transform: `scale(${startScaleStop})` }, { transform: `scale(1)` }],\n duration: motionTokens.durationSlower * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMid,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(${scaleStop})` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationUltraFast * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleStop})` }, { transform: 'scale(0)' }],\n duration: motionTokens.durationFaster,\n easing: motionTokens.curveDecelerateMin,\n delay: (motionTokens.durationUltraFast + motionTokens.durationFast) * motionSpeedMultiplier,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\n\nconst circleMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ opacity: 0 }],\n duration: 0,\n },\n {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n duration: 0,\n delay: motionTokens.durationFaster * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${startScaleCircle})` }, { transform: `scale(${scaleCircle})` }],\n duration: motionTokens.durationSlow * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n delay: motionTokens.durationFaster * motionSpeedMultiplier,\n },\n {\n keyframes: [{ transform: `scale(${scaleCircle})` }, { transform: `scale(1)` }],\n duration: motionTokens.durationNormal * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMin,\n delay: (motionTokens.durationSlow + motionTokens.durationFaster) * motionSpeedMultiplier,\n },\n ];\n\n const exitKeyframes = [\n {\n keyframes: [{ transform: `scale(1)` }, { transform: `scale(${scaleCircle})` }],\n duration: motionTokens.durationFast * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMax,\n },\n {\n keyframes: [{ transform: `scale(${scaleCircle})` }, { transform: 'scale(0)' }],\n duration: motionTokens.durationFaster * motionSpeedMultiplier,\n easing: motionTokens.curveDecelerateMin,\n delay: motionTokens.durationFast * motionSpeedMultiplier,\n },\n ];\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\nexport const SendButtonMotion = createPresenceComponent(sendMotion);\nexport const StopButtonMotion = createPresenceComponent(stopMotion);\nexport const CircleButtonMotion = createPresenceComponent(circleMotion);\n"],"names":["CircleButtonMotion","duration","delay","motionTokens","scaleSend","startScaleStop","scaleStop","startScaleCircle","scaleCircle","motionSpeedMultiplier","sendMotion","enterKeyframes","keyframes","durationNormal","transform","durationSlow","curveDecelerateMid","durationFast","exitKeyframes","stopMotion","durationSlower","curveDecelerateMax","durationUltraFast","durationFaster","curveDecelerateMin","opacity","easing","enter","circleMotion","createPresenceComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA8FIA,kBAAA;eAAAA;;IAFEC,gBAAU;eAAVA;;IACAC,gBAAOC;eAAPD;;;iCA5FgD;AAEtD,MAAME,YAAY;AAClB,MAAMC,iBAAiB;AACvB,MAAMC,YAAY;AAClB,MAAM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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 _renderSendButton.renderSendButton_unstable;
17
+ },
18
+ sendButtonClassNames: function() {
19
+ return _useSendButtonStylesstyles.sendButtonClassNames;
20
+ },
21
+ useSendButtonStyles_unstable: function() {
22
+ return _useSendButtonStylesstyles.useSendButtonStyles_unstable;
23
+ },
24
+ useSendButton_unstable: function() {
25
+ return _useSendButton.useSendButton_unstable;
26
+ }
27
+ });
28
+ const _SendButton = require("./SendButton");
29
+ const _renderSendButton = require("./renderSendButton");
30
+ const _useSendButton = require("./useSendButton");
31
+ const _useSendButtonStylesstyles = require("./useSendButtonStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { SendButton } from './SendButton';\nexport type { SendButtonProps, SendButtonSlots, SendButtonState } from './SendButton.types';\nexport { renderSendButton_unstable } from './renderSendButton';\nexport { useSendButton_unstable } from './useSendButton';\nexport { sendButtonClassNames, useSendButtonStyles_unstable } from './useSendButtonStyles.styles';\n"],"names":["SendButton","renderSendButton_unstable","sendButtonClassNames","useSendButtonStyles_unstable","useSendButton_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAEVC,yBAAyB;eAAzBA,2CAAyB;;IAEzBC,oBAAoB;eAApBA,+CAAoB;;IAAEC,4BAA4B;eAA5BA,uDAA4B;;IADlDC,sBAAsB;eAAtBA,qCAAsB;;;4BAHJ;kCAEe;+BACH;2CAC4B"}