@fluentui-copilot/react-editor-input 0.5.4 → 0.5.5

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 (44) hide show
  1. package/CHANGELOG.json +15 -0
  2. package/CHANGELOG.md +10 -1
  3. package/dist/index.d.ts +47 -0
  4. package/lib/AnimatedPlaceholder.js +1 -0
  5. package/lib/AnimatedPlaceholder.js.map +1 -0
  6. package/lib/components/AnimatedPlaceholder/AnimatedPlaceholder.js +10 -0
  7. package/lib/components/AnimatedPlaceholder/AnimatedPlaceholder.js.map +1 -0
  8. package/lib/components/AnimatedPlaceholder/AnimatedPlaceholder.types.js +3 -0
  9. package/lib/components/AnimatedPlaceholder/AnimatedPlaceholder.types.js.map +1 -0
  10. package/lib/components/AnimatedPlaceholder/index.js +4 -0
  11. package/lib/components/AnimatedPlaceholder/index.js.map +1 -0
  12. package/lib/components/AnimatedPlaceholder/placeholderMotion.js +46 -0
  13. package/lib/components/AnimatedPlaceholder/placeholderMotion.js.map +1 -0
  14. package/lib/components/AnimatedPlaceholder/renderAnimatedPlaceholder.js +12 -0
  15. package/lib/components/AnimatedPlaceholder/renderAnimatedPlaceholder.js.map +1 -0
  16. package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholder.js +54 -0
  17. package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholder.js.map +1 -0
  18. package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.js +23 -0
  19. package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.js.map +1 -0
  20. package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.raw.js +21 -0
  21. package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.raw.js.map +1 -0
  22. package/lib/index.js +1 -0
  23. package/lib/index.js.map +1 -1
  24. package/lib-commonjs/AnimatedPlaceholder.js +28 -0
  25. package/lib-commonjs/AnimatedPlaceholder.js.map +1 -0
  26. package/lib-commonjs/components/AnimatedPlaceholder/AnimatedPlaceholder.js +21 -0
  27. package/lib-commonjs/components/AnimatedPlaceholder/AnimatedPlaceholder.js.map +1 -0
  28. package/lib-commonjs/components/AnimatedPlaceholder/AnimatedPlaceholder.types.js +6 -0
  29. package/lib-commonjs/components/AnimatedPlaceholder/AnimatedPlaceholder.types.js.map +1 -0
  30. package/lib-commonjs/components/AnimatedPlaceholder/index.js +31 -0
  31. package/lib-commonjs/components/AnimatedPlaceholder/index.js.map +1 -0
  32. package/lib-commonjs/components/AnimatedPlaceholder/placeholderMotion.js +56 -0
  33. package/lib-commonjs/components/AnimatedPlaceholder/placeholderMotion.js.map +1 -0
  34. package/lib-commonjs/components/AnimatedPlaceholder/renderAnimatedPlaceholder.js +20 -0
  35. package/lib-commonjs/components/AnimatedPlaceholder/renderAnimatedPlaceholder.js.map +1 -0
  36. package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholder.js +57 -0
  37. package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholder.js.map +1 -0
  38. package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.js +37 -0
  39. package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.js.map +1 -0
  40. package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.raw.js +37 -0
  41. package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.raw.js.map +1 -0
  42. package/lib-commonjs/index.js +16 -0
  43. package/lib-commonjs/index.js.map +1 -1
  44. package/package.json +2 -1
package/CHANGELOG.json CHANGED
@@ -1,6 +1,21 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-editor-input",
3
3
  "entries": [
4
+ {
5
+ "date": "Fri, 05 Sep 2025 00:07:07 GMT",
6
+ "tag": "@fluentui-copilot/react-editor-input_v0.5.5",
7
+ "version": "0.5.5",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "jiangemma@microsoft.com",
12
+ "package": "@fluentui-copilot/react-editor-input",
13
+ "commit": "3bb39358e1657bb8aaf054a8a6047d5567067b2e",
14
+ "comment": "feat: Implement new AnimatedPlaceholder component"
15
+ }
16
+ ]
17
+ }
18
+ },
4
19
  {
5
20
  "date": "Thu, 17 Jul 2025 17:49:26 GMT",
6
21
  "tag": "@fluentui-copilot/react-editor-input_v0.5.3",
package/CHANGELOG.md CHANGED
@@ -1,9 +1,18 @@
1
1
  # Change Log - @fluentui-copilot/react-editor-input
2
2
 
3
- This log was last generated on Thu, 17 Jul 2025 17:49:26 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 05 Sep 2025 00:07:07 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.5.5](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-editor-input_v0.5.5)
8
+
9
+ Fri, 05 Sep 2025 00:07:07 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-editor-input_v0.5.3..@fluentui-copilot/react-editor-input_v0.5.5)
11
+
12
+ ### Patches
13
+
14
+ - feat: Implement new AnimatedPlaceholder component ([PR #3317](https://github.com/microsoft/fluentai/pull/3317) by jiangemma@microsoft.com)
15
+
7
16
  ## [0.5.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-editor-input_v0.5.3)
8
17
 
9
18
  Thu, 17 Jul 2025 17:49:26 GMT
package/dist/index.d.ts CHANGED
@@ -6,10 +6,36 @@ import type { ForwardRefComponent } from '@fluentui/react-components';
6
6
  import type { InitialConfigType } from '@fluentui-copilot/react-text-editor';
7
7
  import type { LexicalEditor } from '@fluentui-copilot/react-text-editor';
8
8
  import type { LexicalPlainTextPlugin } from '@fluentui-copilot/react-text-editor';
9
+ import type { PresenceMotionSlotProps } from '@fluentui/react-motion';
9
10
  import * as React_2 from 'react';
10
11
  import type { Slot } from '@fluentui/react-components';
11
12
  import type { SlotClassNames } from '@fluentui/react-components';
12
13
 
14
+ export declare const AnimatedPlaceholder: ForwardRefComponent<AnimatedPlaceholderProps>;
15
+
16
+ export declare const animatedPlaceholderClassNames: SlotClassNames<Omit<AnimatedPlaceholderSlots, 'motion'>>;
17
+
18
+ /**
19
+ * AnimatedPlaceholder Props
20
+ */
21
+ export declare type AnimatedPlaceholderProps = ComponentProps<Partial<AnimatedPlaceholderSlots>> & {
22
+ /**
23
+ * The placeholder value to animate.
24
+ */
25
+ placeholderValue: string;
26
+ };
27
+
28
+ export declare type AnimatedPlaceholderSlots = {
29
+ root: NonNullable<Slot<'div'>>;
30
+ motion: NonNullable<Slot<PresenceMotionSlotProps>>;
31
+ placeholder: NonNullable<Slot<'div'>>;
32
+ };
33
+
34
+ /**
35
+ * State used in rendering AnimatedPlaceholder
36
+ */
37
+ export declare type AnimatedPlaceholderState = ComponentState<AnimatedPlaceholderSlots>;
38
+
13
39
  export declare const EditorInput: ForwardRefComponent<EditorInputProps>;
14
40
 
15
41
  export declare const editorInputClassNames: SlotClassNames<EditorInputSlots>;
@@ -93,11 +119,32 @@ export declare type EditorInputValueData = {
93
119
  value: string;
94
120
  };
95
121
 
122
+ /**
123
+ * Render the final JSX of AnimatedPlaceholder
124
+ */
125
+ export declare const renderAnimatedPlaceholder_unstable: (state: AnimatedPlaceholderState) => JSX.Element;
126
+
96
127
  /**
97
128
  * Render the final JSX of EditorInput
98
129
  */
99
130
  export declare const renderEditorInput_unstable: (state: EditorInputState) => JSX.Element;
100
131
 
132
+ /**
133
+ * Create the state required to render AnimatedPlaceholder.
134
+ *
135
+ * The returned state can be modified with hooks such as useAnimatedPlaceholderStyles_unstable,
136
+ * before being passed to renderAnimatedPlaceholder_unstable.
137
+ *
138
+ * @param props - props from this instance of AnimatedPlaceholder
139
+ * @param ref - reference to root HTMLElement of AnimatedPlaceholder
140
+ */
141
+ export declare const useAnimatedPlaceholder_unstable: (props: AnimatedPlaceholderProps, ref: React_2.Ref<HTMLDivElement>) => AnimatedPlaceholderState;
142
+
143
+ /**
144
+ * Apply styling to the AnimatedPlaceholder slots based on the state
145
+ */
146
+ export declare const useAnimatedPlaceholderStyles_unstable: (state: AnimatedPlaceholderState) => AnimatedPlaceholderState;
147
+
101
148
  /**
102
149
  * Create the state required to render EditorInput.
103
150
  *
@@ -0,0 +1 @@
1
+ export { AnimatedPlaceholder, renderAnimatedPlaceholder_unstable, useAnimatedPlaceholder_unstable, animatedPlaceholderClassNames, useAnimatedPlaceholderStyles_unstable } from './components/AnimatedPlaceholder/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AnimatedPlaceholder.ts"],"sourcesContent":["export {\n AnimatedPlaceholder,\n renderAnimatedPlaceholder_unstable,\n useAnimatedPlaceholder_unstable,\n animatedPlaceholderClassNames,\n useAnimatedPlaceholderStyles_unstable,\n} from './components/AnimatedPlaceholder/index';\nexport type {\n AnimatedPlaceholderProps,\n AnimatedPlaceholderSlots,\n AnimatedPlaceholderState,\n} from './components/AnimatedPlaceholder/index';\n"],"names":["AnimatedPlaceholder","renderAnimatedPlaceholder_unstable","useAnimatedPlaceholder_unstable","animatedPlaceholderClassNames","useAnimatedPlaceholderStyles_unstable"],"rangeMappings":"","mappings":"AAAA,SACEA,mBAAmB,EACnBC,kCAAkC,EAClCC,+BAA+B,EAC/BC,6BAA6B,EAC7BC,qCAAqC,QAChC,yCAAyC"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { useAnimatedPlaceholder_unstable } from './useAnimatedPlaceholder';
3
+ import { renderAnimatedPlaceholder_unstable } from './renderAnimatedPlaceholder';
4
+ import { useAnimatedPlaceholderStyles_unstable } from './useAnimatedPlaceholderStyles.styles';
5
+ export const AnimatedPlaceholder = /*#__PURE__*/ React.forwardRef((props, ref)=>{
6
+ const state = useAnimatedPlaceholder_unstable(props, ref);
7
+ useAnimatedPlaceholderStyles_unstable(state);
8
+ return renderAnimatedPlaceholder_unstable(state);
9
+ });
10
+ AnimatedPlaceholder.displayName = 'AnimatedPlaceholder';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AnimatedPlaceholder.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAnimatedPlaceholder_unstable } from './useAnimatedPlaceholder';\nimport { renderAnimatedPlaceholder_unstable } from './renderAnimatedPlaceholder';\nimport { useAnimatedPlaceholderStyles_unstable } from './useAnimatedPlaceholderStyles.styles';\nimport type { AnimatedPlaceholderProps } from './AnimatedPlaceholder.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AnimatedPlaceholder: ForwardRefComponent<AnimatedPlaceholderProps> = React.forwardRef((props, ref) => {\n const state = useAnimatedPlaceholder_unstable(props, ref);\n\n useAnimatedPlaceholderStyles_unstable(state);\n return renderAnimatedPlaceholder_unstable(state);\n});\n\nAnimatedPlaceholder.displayName = 'AnimatedPlaceholder';\n"],"names":["React","useAnimatedPlaceholder_unstable","renderAnimatedPlaceholder_unstable","useAnimatedPlaceholderStyles_unstable","AnimatedPlaceholder","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,8BAA8B;AACjF,SAASC,qCAAqC,QAAQ,wCAAwC;AAI9F,OAAO,MAAMC,oCAAqEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACzG,MAAMC,QAAQP,gCAAgCK,OAAOC;IAErDJ,sCAAsCK;IACtC,OAAON,mCAAmCM;AAC5C,GAAG;AAEHJ,oBAAoBK,WAAW,GAAG"}
@@ -0,0 +1,3 @@
1
+ /**
2
+ * State used in rendering AnimatedPlaceholder
3
+ */ export { };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AnimatedPlaceholder.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { PresenceMotionSlotProps } from '@fluentui/react-motion';\n\nexport type AnimatedPlaceholderSlots = {\n root: NonNullable<Slot<'div'>>;\n motion: NonNullable<Slot<PresenceMotionSlotProps>>;\n placeholder: NonNullable<Slot<'div'>>;\n};\n\n/**\n * AnimatedPlaceholder Props\n */\nexport type AnimatedPlaceholderProps = ComponentProps<Partial<AnimatedPlaceholderSlots>> & {\n /**\n * The placeholder value to animate.\n */\n placeholderValue: string;\n};\n\n/**\n * State used in rendering AnimatedPlaceholder\n */\nexport type AnimatedPlaceholderState = ComponentState<AnimatedPlaceholderSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC,GACD,WAAgF"}
@@ -0,0 +1,4 @@
1
+ export { AnimatedPlaceholder } from './AnimatedPlaceholder';
2
+ export { renderAnimatedPlaceholder_unstable } from './renderAnimatedPlaceholder';
3
+ export { useAnimatedPlaceholder_unstable } from './useAnimatedPlaceholder';
4
+ export { animatedPlaceholderClassNames, useAnimatedPlaceholderStyles_unstable } from './useAnimatedPlaceholderStyles.styles';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { AnimatedPlaceholder } from './AnimatedPlaceholder';\nexport type {\n AnimatedPlaceholderProps,\n AnimatedPlaceholderSlots,\n AnimatedPlaceholderState,\n} from './AnimatedPlaceholder.types';\nexport { renderAnimatedPlaceholder_unstable } from './renderAnimatedPlaceholder';\nexport { useAnimatedPlaceholder_unstable } from './useAnimatedPlaceholder';\nexport {\n animatedPlaceholderClassNames,\n useAnimatedPlaceholderStyles_unstable,\n} from './useAnimatedPlaceholderStyles.styles';\n"],"names":["AnimatedPlaceholder","renderAnimatedPlaceholder_unstable","useAnimatedPlaceholder_unstable","animatedPlaceholderClassNames","useAnimatedPlaceholderStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,mBAAmB,QAAQ,wBAAwB;AAM5D,SAASC,kCAAkC,QAAQ,8BAA8B;AACjF,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SACEC,6BAA6B,EAC7BC,qCAAqC,QAChC,wCAAwC"}
@@ -0,0 +1,46 @@
1
+ import { createPresenceComponent, motionTokens } from '@fluentui/react-motion';
2
+ const placeholderMotion = ()=>{
3
+ const enterKeyframes = [
4
+ {
5
+ keyframes: [
6
+ {
7
+ opacity: 0
8
+ },
9
+ {
10
+ opacity: 1
11
+ }
12
+ ],
13
+ duration: motionTokens.durationFaster,
14
+ easing: motionTokens.curveLinear
15
+ },
16
+ {
17
+ keyframes: [
18
+ {
19
+ transform: 'translateY(10px)'
20
+ },
21
+ {
22
+ transform: 'translateY(0)'
23
+ }
24
+ ],
25
+ duration: motionTokens.durationNormal,
26
+ easing: motionTokens.curveDecelerateMid
27
+ }
28
+ ];
29
+ const exitKeyframes = {
30
+ keyframes: [
31
+ {
32
+ opacity: 1
33
+ },
34
+ {
35
+ opacity: 0
36
+ }
37
+ ],
38
+ duration: motionTokens.durationFaster,
39
+ easing: motionTokens.curveLinear
40
+ };
41
+ return {
42
+ enter: enterKeyframes,
43
+ exit: exitKeyframes
44
+ };
45
+ };
46
+ export const PlaceholderMotion = createPresenceComponent(placeholderMotion);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["placeholderMotion.ts"],"sourcesContent":["import { type PresenceMotionFn, createPresenceComponent, motionTokens } from '@fluentui/react-motion';\n\nconst placeholderMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n duration: motionTokens.durationFaster,\n easing: motionTokens.curveLinear,\n },\n {\n keyframes: [{ transform: 'translateY(10px)' }, { transform: 'translateY(0)' }],\n duration: motionTokens.durationNormal,\n easing: motionTokens.curveDecelerateMid,\n },\n ];\n const exitKeyframes = {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n duration: motionTokens.durationFaster,\n easing: motionTokens.curveLinear,\n };\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\n\nexport const PlaceholderMotion: ReturnType<typeof createPresenceComponent<{}>> =\n createPresenceComponent(placeholderMotion);\n"],"names":["createPresenceComponent","motionTokens","placeholderMotion","enterKeyframes","keyframes","opacity","duration","durationFaster","easing","curveLinear","transform","durationNormal","curveDecelerateMid","exitKeyframes","enter","exit","PlaceholderMotion"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAAgCA,uBAAuB,EAAEC,YAAY,QAAQ,yBAAyB;AAEtG,MAAMC,oBAAsC;IAC1C,MAAMC,iBAAiB;QACrB;YACEC,WAAW;gBAAC;oBAAEC,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;aAAE;YAC3CC,UAAUL,aAAaM,cAAc;YACrCC,QAAQP,aAAaQ,WAAW;QAClC;QACA;YACEL,WAAW;gBAAC;oBAAEM,WAAW;gBAAmB;gBAAG;oBAAEA,WAAW;gBAAgB;aAAE;YAC9EJ,UAAUL,aAAaU,cAAc;YACrCH,QAAQP,aAAaW,kBAAkB;QACzC;KACD;IACD,MAAMC,gBAAgB;QACpBT,WAAW;YAAC;gBAAEC,SAAS;YAAE;YAAG;gBAAEA,SAAS;YAAE;SAAE;QAC3CC,UAAUL,aAAaM,cAAc;QACrCC,QAAQP,aAAaQ,WAAW;IAClC;IAEA,OAAO;QACLK,OAAOX;QACPY,MAAMF;IACR;AACF;AAEA,OAAO,MAAMG,oBACXhB,wBAAwBE,mBAAmB"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from '@fluentui/react-components';
3
+ /**
4
+ * Render the final JSX of AnimatedPlaceholder
5
+ */ export const renderAnimatedPlaceholder_unstable = (state)=>{
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ _jsx(state.root, {
8
+ children: /*#__PURE__*/ _jsx(state.motion, {
9
+ children: /*#__PURE__*/ _jsx(state.placeholder, {})
10
+ })
11
+ });
12
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderAnimatedPlaceholder.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AnimatedPlaceholderState, AnimatedPlaceholderSlots } from './AnimatedPlaceholder.types';\n\n/**\n * Render the final JSX of AnimatedPlaceholder\n */\nexport const renderAnimatedPlaceholder_unstable = (state: AnimatedPlaceholderState) => {\n assertSlots<AnimatedPlaceholderSlots>(state);\n\n return (\n <state.root>\n <state.motion>\n <state.placeholder />\n </state.motion>\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAnimatedPlaceholder_unstable","state","root","motion","placeholder"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjDF,YAAsCE;IAEtC,qBACE,KAACA,MAAMC,IAAI;kBACT,cAAA,KAACD,MAAME,MAAM;sBACX,cAAA,KAACF,MAAMG,WAAW;;;AAI1B,EAAE"}
@@ -0,0 +1,54 @@
1
+ import * as React from 'react';
2
+ import { getIntrinsicElementProps, slot } from '@fluentui/react-components';
3
+ import { PlaceholderMotion } from './placeholderMotion';
4
+ import { presenceMotionSlot } from '@fluentui/react-motion';
5
+ /**
6
+ * Create the state required to render AnimatedPlaceholder.
7
+ *
8
+ * The returned state can be modified with hooks such as useAnimatedPlaceholderStyles_unstable,
9
+ * before being passed to renderAnimatedPlaceholder_unstable.
10
+ *
11
+ * @param props - props from this instance of AnimatedPlaceholder
12
+ * @param ref - reference to root HTMLElement of AnimatedPlaceholder
13
+ */ export const useAnimatedPlaceholder_unstable = (props, ref)=>{
14
+ const { placeholderValue } = props;
15
+ const [placeholder, setPlaceholder] = React.useState(placeholderValue);
16
+ const [visible, setVisible] = React.useState(true);
17
+ React.useEffect(()=>{
18
+ if (placeholderValue !== placeholder) {
19
+ setVisible(false);
20
+ }
21
+ }, [
22
+ placeholder,
23
+ placeholderValue
24
+ ]);
25
+ const onMotionFinish = ()=>{
26
+ setPlaceholder(placeholderValue);
27
+ setVisible(true);
28
+ };
29
+ return {
30
+ components: {
31
+ root: 'div',
32
+ motion: PlaceholderMotion,
33
+ placeholder: 'div'
34
+ },
35
+ root: slot.always(getIntrinsicElementProps('div', {
36
+ ref,
37
+ ...props
38
+ }), {
39
+ elementType: 'div'
40
+ }),
41
+ motion: presenceMotionSlot(props.motion, {
42
+ elementType: PlaceholderMotion,
43
+ defaultProps: {
44
+ visible: visible,
45
+ onMotionFinish: onMotionFinish
46
+ }
47
+ }),
48
+ placeholder: slot.always(getIntrinsicElementProps('div', {
49
+ children: placeholder
50
+ }), {
51
+ elementType: 'div'
52
+ })
53
+ };
54
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAnimatedPlaceholder.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport type { AnimatedPlaceholderProps, AnimatedPlaceholderState } from './AnimatedPlaceholder.types';\nimport { PlaceholderMotion } from './placeholderMotion';\nimport { type PresenceMotionSlotProps, presenceMotionSlot } from '@fluentui/react-motion';\n\n/**\n * Create the state required to render AnimatedPlaceholder.\n *\n * The returned state can be modified with hooks such as useAnimatedPlaceholderStyles_unstable,\n * before being passed to renderAnimatedPlaceholder_unstable.\n *\n * @param props - props from this instance of AnimatedPlaceholder\n * @param ref - reference to root HTMLElement of AnimatedPlaceholder\n */\nexport const useAnimatedPlaceholder_unstable = (\n props: AnimatedPlaceholderProps,\n ref: React.Ref<HTMLDivElement>,\n): AnimatedPlaceholderState => {\n const { placeholderValue } = props;\n\n const [placeholder, setPlaceholder] = React.useState(placeholderValue);\n const [visible, setVisible] = React.useState(true);\n\n React.useEffect(() => {\n if (placeholderValue !== placeholder) {\n setVisible(false);\n }\n }, [placeholder, placeholderValue]);\n\n const onMotionFinish = () => {\n setPlaceholder(placeholderValue);\n setVisible(true);\n };\n\n return {\n components: {\n root: 'div',\n motion: PlaceholderMotion as React.FC<PresenceMotionSlotProps>,\n placeholder: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n motion: presenceMotionSlot<{}>(props.motion, {\n elementType: PlaceholderMotion,\n defaultProps: {\n visible: visible,\n onMotionFinish: onMotionFinish,\n },\n }),\n placeholder: slot.always(\n getIntrinsicElementProps('div', {\n children: placeholder,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","PlaceholderMotion","presenceMotionSlot","useAnimatedPlaceholder_unstable","props","ref","placeholderValue","placeholder","setPlaceholder","useState","visible","setVisible","useEffect","onMotionFinish","components","root","motion","always","elementType","defaultProps","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,6BAA6B;AAE5E,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAAuCC,kBAAkB,QAAQ,yBAAyB;AAE1F;;;;;;;;CAQC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEA,MAAM,EAAEC,gBAAgB,EAAE,GAAGF;IAE7B,MAAM,CAACG,aAAaC,eAAe,GAAGV,MAAMW,QAAQ,CAACH;IACrD,MAAM,CAACI,SAASC,WAAW,GAAGb,MAAMW,QAAQ,CAAC;IAE7CX,MAAMc,SAAS,CAAC;QACd,IAAIN,qBAAqBC,aAAa;YACpCI,WAAW;QACb;IACF,GAAG;QAACJ;QAAaD;KAAiB;IAElC,MAAMO,iBAAiB;QACrBL,eAAeF;QACfK,WAAW;IACb;IAEA,OAAO;QACLG,YAAY;YACVC,MAAM;YACNC,QAAQf;YACRM,aAAa;QACf;QACAQ,MAAMf,KAAKiB,MAAM,CACflB,yBAAyB,OAAO;YAC9BM;YACA,GAAGD,KAAK;QACV,IACA;YAAEc,aAAa;QAAM;QAEvBF,QAAQd,mBAAuBE,MAAMY,MAAM,EAAE;YAC3CE,aAAajB;YACbkB,cAAc;gBACZT,SAASA;gBACTG,gBAAgBA;YAClB;QACF;QACAN,aAAaP,KAAKiB,MAAM,CACtBlB,yBAAyB,OAAO;YAC9BqB,UAAUb;QACZ,IACA;YAAEW,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -0,0 +1,23 @@
1
+ import { __resetStyles, mergeClasses } from '@fluentui/react-components';
2
+ export const animatedPlaceholderClassNames = {
3
+ root: 'fai-AnimatedPlaceholder',
4
+ placeholder: 'fai-AnimatedPlaceholder__placeholder'
5
+ };
6
+ /**
7
+ * Styles for the root slot
8
+ */
9
+ const useRootClassNames = __resetStyles("r7ukxtn", null, [".r7ukxtn{overflow:clip;}"]);
10
+ /**
11
+ * Apply styling to the AnimatedPlaceholder slots based on the state
12
+ */
13
+ export const useAnimatedPlaceholderStyles_unstable = state => {
14
+ 'use no memo';
15
+
16
+ const rootClassNames = useRootClassNames();
17
+ state.root.className = mergeClasses(animatedPlaceholderClassNames.root, rootClassNames, state.root.className);
18
+ if (state.placeholder) {
19
+ state.placeholder.className = mergeClasses(animatedPlaceholderClassNames.placeholder, state.placeholder.className);
20
+ }
21
+ return state;
22
+ };
23
+ //# sourceMappingURL=useAnimatedPlaceholderStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAnimatedPlaceholderStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport type { AnimatedPlaceholderSlots, AnimatedPlaceholderState } from './AnimatedPlaceholder.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const animatedPlaceholderClassNames: SlotClassNames<Omit<AnimatedPlaceholderSlots, 'motion'>> = {\n root: 'fai-AnimatedPlaceholder',\n placeholder: 'fai-AnimatedPlaceholder__placeholder',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassNames = makeResetStyles({\n overflow: 'clip',\n});\n\n/**\n * Apply styling to the AnimatedPlaceholder slots based on the state\n */\nexport const useAnimatedPlaceholderStyles_unstable = (state: AnimatedPlaceholderState): AnimatedPlaceholderState => {\n 'use no memo';\n\n const rootClassNames = useRootClassNames();\n state.root.className = mergeClasses(animatedPlaceholderClassNames.root, rootClassNames, state.root.className);\n\n if (state.placeholder) {\n state.placeholder.className = mergeClasses(animatedPlaceholderClassNames.placeholder, state.placeholder.className);\n }\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","animatedPlaceholderClassNames","root","placeholder","useRootClassNames","overflow","useAnimatedPlaceholderStyles_unstable","state","rootClassNames","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,6BAA6B;AAI3E,OAAO,MAAMC,gCAA0F;IACrGC,MAAM;IACNC,aAAa;AACf,EAAE;AAEF;;CAEC,GACD,MAAMC,oBAAoBL,gBAAgB;IACxCM,UAAU;AACZ;AAEA;;CAEC,GACD,OAAO,MAAMC,wCAAwC,CAACC;IACpD;IAEA,MAAMC,iBAAiBJ;IACvBG,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,8BAA8BC,IAAI,EAAEM,gBAAgBD,MAAML,IAAI,CAACO,SAAS;IAE5G,IAAIF,MAAMJ,WAAW,EAAE;QACrBI,MAAMJ,WAAW,CAACM,SAAS,GAAGT,aAAaC,8BAA8BE,WAAW,EAAEI,MAAMJ,WAAW,CAACM,SAAS;IACnH;IAEA,OAAOF;AACT,EAAE"}
@@ -0,0 +1,21 @@
1
+ import { makeResetStyles, mergeClasses } from '@fluentui/react-components';
2
+ export const animatedPlaceholderClassNames = {
3
+ root: 'fai-AnimatedPlaceholder',
4
+ placeholder: 'fai-AnimatedPlaceholder__placeholder'
5
+ };
6
+ /**
7
+ * Styles for the root slot
8
+ */ const useRootClassNames = makeResetStyles({
9
+ overflow: 'clip'
10
+ });
11
+ /**
12
+ * Apply styling to the AnimatedPlaceholder slots based on the state
13
+ */ export const useAnimatedPlaceholderStyles_unstable = (state)=>{
14
+ 'use no memo';
15
+ const rootClassNames = useRootClassNames();
16
+ state.root.className = mergeClasses(animatedPlaceholderClassNames.root, rootClassNames, state.root.className);
17
+ if (state.placeholder) {
18
+ state.placeholder.className = mergeClasses(animatedPlaceholderClassNames.placeholder, state.placeholder.className);
19
+ }
20
+ return state;
21
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAnimatedPlaceholderStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport type { AnimatedPlaceholderSlots, AnimatedPlaceholderState } from './AnimatedPlaceholder.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const animatedPlaceholderClassNames: SlotClassNames<Omit<AnimatedPlaceholderSlots, 'motion'>> = {\n root: 'fai-AnimatedPlaceholder',\n placeholder: 'fai-AnimatedPlaceholder__placeholder',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassNames = makeResetStyles({\n overflow: 'clip',\n});\n\n/**\n * Apply styling to the AnimatedPlaceholder slots based on the state\n */\nexport const useAnimatedPlaceholderStyles_unstable = (state: AnimatedPlaceholderState): AnimatedPlaceholderState => {\n 'use no memo';\n\n const rootClassNames = useRootClassNames();\n state.root.className = mergeClasses(animatedPlaceholderClassNames.root, rootClassNames, state.root.className);\n\n if (state.placeholder) {\n state.placeholder.className = mergeClasses(animatedPlaceholderClassNames.placeholder, state.placeholder.className);\n }\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","animatedPlaceholderClassNames","root","placeholder","useRootClassNames","overflow","useAnimatedPlaceholderStyles_unstable","state","rootClassNames","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,6BAA6B;AAI3E,OAAO,MAAMC,gCAA0F;IACrGC,MAAM;IACNC,aAAa;AACf,EAAE;AAEF;;CAEC,GACD,MAAMC,oBAAoBL,gBAAgB;IACxCM,UAAU;AACZ;AAEA;;CAEC,GACD,OAAO,MAAMC,wCAAwC,CAACC;IACpD;IAEA,MAAMC,iBAAiBJ;IACvBG,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,8BAA8BC,IAAI,EAAEM,gBAAgBD,MAAML,IAAI,CAACO,SAAS;IAE5G,IAAIF,MAAMJ,WAAW,EAAE;QACrBI,MAAMJ,WAAW,CAACM,SAAS,GAAGT,aAAaC,8BAA8BE,WAAW,EAAEI,MAAMJ,WAAW,CAACM,SAAS;IACnH;IAEA,OAAOF;AACT,EAAE"}
package/lib/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export { EditorInput, editorInputClassNames, renderEditorInput_unstable, useEditorInputStyles_unstable, useEditorInput_unstable } from './EditorInput';
2
+ export { AnimatedPlaceholder, renderAnimatedPlaceholder_unstable, useAnimatedPlaceholder_unstable, animatedPlaceholderClassNames, useAnimatedPlaceholderStyles_unstable } from './AnimatedPlaceholder';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type { EditorInputProps, EditorInputSlots, EditorInputState, EditorInputValueData } from './EditorInput';\nexport {\n EditorInput,\n editorInputClassNames,\n renderEditorInput_unstable,\n useEditorInputStyles_unstable,\n useEditorInput_unstable,\n} from './EditorInput';\n"],"names":["EditorInput","editorInputClassNames","renderEditorInput_unstable","useEditorInputStyles_unstable","useEditorInput_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,gBAAgB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { EditorInputProps, EditorInputSlots, EditorInputState, EditorInputValueData } from './EditorInput';\nexport {\n EditorInput,\n editorInputClassNames,\n renderEditorInput_unstable,\n useEditorInputStyles_unstable,\n useEditorInput_unstable,\n} from './EditorInput';\n\nexport {\n AnimatedPlaceholder,\n renderAnimatedPlaceholder_unstable,\n useAnimatedPlaceholder_unstable,\n animatedPlaceholderClassNames,\n useAnimatedPlaceholderStyles_unstable,\n} from './AnimatedPlaceholder';\nexport type {\n AnimatedPlaceholderProps,\n AnimatedPlaceholderSlots,\n AnimatedPlaceholderState,\n} from './AnimatedPlaceholder';\n"],"names":["EditorInput","editorInputClassNames","renderEditorInput_unstable","useEditorInputStyles_unstable","useEditorInput_unstable","AnimatedPlaceholder","renderAnimatedPlaceholder_unstable","useAnimatedPlaceholder_unstable","animatedPlaceholderClassNames","useAnimatedPlaceholderStyles_unstable"],"rangeMappings":";","mappings":"AACA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,gBAAgB;AAEvB,SACEC,mBAAmB,EACnBC,kCAAkC,EAClCC,+BAA+B,EAC/BC,6BAA6B,EAC7BC,qCAAqC,QAChC,wBAAwB"}
@@ -0,0 +1,28 @@
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
+ AnimatedPlaceholder: function() {
13
+ return _index.AnimatedPlaceholder;
14
+ },
15
+ animatedPlaceholderClassNames: function() {
16
+ return _index.animatedPlaceholderClassNames;
17
+ },
18
+ renderAnimatedPlaceholder_unstable: function() {
19
+ return _index.renderAnimatedPlaceholder_unstable;
20
+ },
21
+ useAnimatedPlaceholderStyles_unstable: function() {
22
+ return _index.useAnimatedPlaceholderStyles_unstable;
23
+ },
24
+ useAnimatedPlaceholder_unstable: function() {
25
+ return _index.useAnimatedPlaceholder_unstable;
26
+ }
27
+ });
28
+ const _index = require("./components/AnimatedPlaceholder/index");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AnimatedPlaceholder.ts"],"sourcesContent":["export {\n AnimatedPlaceholder,\n renderAnimatedPlaceholder_unstable,\n useAnimatedPlaceholder_unstable,\n animatedPlaceholderClassNames,\n useAnimatedPlaceholderStyles_unstable,\n} from './components/AnimatedPlaceholder/index';\nexport type {\n AnimatedPlaceholderProps,\n AnimatedPlaceholderSlots,\n AnimatedPlaceholderState,\n} from './components/AnimatedPlaceholder/index';\n"],"names":["AnimatedPlaceholder","animatedPlaceholderClassNames","renderAnimatedPlaceholder_unstable","useAnimatedPlaceholderStyles_unstable","useAnimatedPlaceholder_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,mBAAmB;eAAnBA,0BAAmB;;IAGnBC,6BAA6B;eAA7BA,oCAA6B;;IAF7BC,kCAAkC;eAAlCA,yCAAkC;;IAGlCC,qCAAqC;eAArCA,4CAAqC;;IAFrCC,+BAA+B;eAA/BA,sCAA+B;;;uBAG1B"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AnimatedPlaceholder", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AnimatedPlaceholder;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _useAnimatedPlaceholder = require("./useAnimatedPlaceholder");
14
+ const _renderAnimatedPlaceholder = require("./renderAnimatedPlaceholder");
15
+ const _useAnimatedPlaceholderStylesstyles = require("./useAnimatedPlaceholderStyles.styles");
16
+ const AnimatedPlaceholder = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
+ const state = (0, _useAnimatedPlaceholder.useAnimatedPlaceholder_unstable)(props, ref);
18
+ (0, _useAnimatedPlaceholderStylesstyles.useAnimatedPlaceholderStyles_unstable)(state);
19
+ return (0, _renderAnimatedPlaceholder.renderAnimatedPlaceholder_unstable)(state);
20
+ });
21
+ AnimatedPlaceholder.displayName = 'AnimatedPlaceholder';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AnimatedPlaceholder.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAnimatedPlaceholder_unstable } from './useAnimatedPlaceholder';\nimport { renderAnimatedPlaceholder_unstable } from './renderAnimatedPlaceholder';\nimport { useAnimatedPlaceholderStyles_unstable } from './useAnimatedPlaceholderStyles.styles';\nimport type { AnimatedPlaceholderProps } from './AnimatedPlaceholder.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AnimatedPlaceholder: ForwardRefComponent<AnimatedPlaceholderProps> = React.forwardRef((props, ref) => {\n const state = useAnimatedPlaceholder_unstable(props, ref);\n\n useAnimatedPlaceholderStyles_unstable(state);\n return renderAnimatedPlaceholder_unstable(state);\n});\n\nAnimatedPlaceholder.displayName = 'AnimatedPlaceholder';\n"],"names":["AnimatedPlaceholder","React","forwardRef","props","ref","state","useAnimatedPlaceholder_unstable","useAnimatedPlaceholderStyles_unstable","renderAnimatedPlaceholder_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;;iEAPU;wCACyB;2CACG;oDACG;AAI/C,MAAMA,sBAAAA,WAAAA,GAAqEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACzG,MAAMC,QAAQC,IAAAA,uDAAAA,EAAgCH,OAAOC;IAErDG,IAAAA,yEAAAA,EAAsCF;IACtC,OAAOG,IAAAA,6DAAAA,EAAmCH;AAC5C;AAEAL,oBAAoBS,WAAW,GAAG"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * State used in rendering AnimatedPlaceholder
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AnimatedPlaceholder.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { PresenceMotionSlotProps } from '@fluentui/react-motion';\n\nexport type AnimatedPlaceholderSlots = {\n root: NonNullable<Slot<'div'>>;\n motion: NonNullable<Slot<PresenceMotionSlotProps>>;\n placeholder: NonNullable<Slot<'div'>>;\n};\n\n/**\n * AnimatedPlaceholder Props\n */\nexport type AnimatedPlaceholderProps = ComponentProps<Partial<AnimatedPlaceholderSlots>> & {\n /**\n * The placeholder value to animate.\n */\n placeholderValue: string;\n};\n\n/**\n * State used in rendering AnimatedPlaceholder\n */\nexport type AnimatedPlaceholderState = ComponentState<AnimatedPlaceholderSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC"}
@@ -0,0 +1,31 @@
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
+ AnimatedPlaceholder: function() {
13
+ return _AnimatedPlaceholder.AnimatedPlaceholder;
14
+ },
15
+ animatedPlaceholderClassNames: function() {
16
+ return _useAnimatedPlaceholderStylesstyles.animatedPlaceholderClassNames;
17
+ },
18
+ renderAnimatedPlaceholder_unstable: function() {
19
+ return _renderAnimatedPlaceholder.renderAnimatedPlaceholder_unstable;
20
+ },
21
+ useAnimatedPlaceholderStyles_unstable: function() {
22
+ return _useAnimatedPlaceholderStylesstyles.useAnimatedPlaceholderStyles_unstable;
23
+ },
24
+ useAnimatedPlaceholder_unstable: function() {
25
+ return _useAnimatedPlaceholder.useAnimatedPlaceholder_unstable;
26
+ }
27
+ });
28
+ const _AnimatedPlaceholder = require("./AnimatedPlaceholder");
29
+ const _renderAnimatedPlaceholder = require("./renderAnimatedPlaceholder");
30
+ const _useAnimatedPlaceholder = require("./useAnimatedPlaceholder");
31
+ const _useAnimatedPlaceholderStylesstyles = require("./useAnimatedPlaceholderStyles.styles");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { AnimatedPlaceholder } from './AnimatedPlaceholder';\nexport type {\n AnimatedPlaceholderProps,\n AnimatedPlaceholderSlots,\n AnimatedPlaceholderState,\n} from './AnimatedPlaceholder.types';\nexport { renderAnimatedPlaceholder_unstable } from './renderAnimatedPlaceholder';\nexport { useAnimatedPlaceholder_unstable } from './useAnimatedPlaceholder';\nexport {\n animatedPlaceholderClassNames,\n useAnimatedPlaceholderStyles_unstable,\n} from './useAnimatedPlaceholderStyles.styles';\n"],"names":["AnimatedPlaceholder","animatedPlaceholderClassNames","renderAnimatedPlaceholder_unstable","useAnimatedPlaceholderStyles_unstable","useAnimatedPlaceholder_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,mBAAmB;eAAnBA,wCAAmB;;IAS1BC,6BAA6B;eAA7BA,iEAA6B;;IAHtBC,kCAAkC;eAAlCA,6DAAkC;;IAIzCC,qCAAqC;eAArCA,yEAAqC;;IAH9BC,+BAA+B;eAA/BA,uDAA+B;;;qCAPJ;2CAMe;wCACH;oDAIzC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PlaceholderMotion", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PlaceholderMotion;
9
+ }
10
+ });
11
+ const _reactmotion = require("@fluentui/react-motion");
12
+ const placeholderMotion = ()=>{
13
+ const enterKeyframes = [
14
+ {
15
+ keyframes: [
16
+ {
17
+ opacity: 0
18
+ },
19
+ {
20
+ opacity: 1
21
+ }
22
+ ],
23
+ duration: _reactmotion.motionTokens.durationFaster,
24
+ easing: _reactmotion.motionTokens.curveLinear
25
+ },
26
+ {
27
+ keyframes: [
28
+ {
29
+ transform: 'translateY(10px)'
30
+ },
31
+ {
32
+ transform: 'translateY(0)'
33
+ }
34
+ ],
35
+ duration: _reactmotion.motionTokens.durationNormal,
36
+ easing: _reactmotion.motionTokens.curveDecelerateMid
37
+ }
38
+ ];
39
+ const exitKeyframes = {
40
+ keyframes: [
41
+ {
42
+ opacity: 1
43
+ },
44
+ {
45
+ opacity: 0
46
+ }
47
+ ],
48
+ duration: _reactmotion.motionTokens.durationFaster,
49
+ easing: _reactmotion.motionTokens.curveLinear
50
+ };
51
+ return {
52
+ enter: enterKeyframes,
53
+ exit: exitKeyframes
54
+ };
55
+ };
56
+ const PlaceholderMotion = (0, _reactmotion.createPresenceComponent)(placeholderMotion);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["placeholderMotion.ts"],"sourcesContent":["import { type PresenceMotionFn, createPresenceComponent, motionTokens } from '@fluentui/react-motion';\n\nconst placeholderMotion: PresenceMotionFn = () => {\n const enterKeyframes = [\n {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n duration: motionTokens.durationFaster,\n easing: motionTokens.curveLinear,\n },\n {\n keyframes: [{ transform: 'translateY(10px)' }, { transform: 'translateY(0)' }],\n duration: motionTokens.durationNormal,\n easing: motionTokens.curveDecelerateMid,\n },\n ];\n const exitKeyframes = {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n duration: motionTokens.durationFaster,\n easing: motionTokens.curveLinear,\n };\n\n return {\n enter: enterKeyframes,\n exit: exitKeyframes,\n };\n};\n\nexport const PlaceholderMotion: ReturnType<typeof createPresenceComponent<{}>> =\n createPresenceComponent(placeholderMotion);\n"],"names":["PlaceholderMotion","placeholderMotion","enterKeyframes","keyframes","opacity","duration","motionTokens","durationFaster","easing","curveLinear","transform","durationNormal","curveDecelerateMid","exitKeyframes","enter","exit","createPresenceComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA2BaA;;;eAAAA;;;6BA3BgE;AAE7E,MAAMC,oBAAsC;IAC1C,MAAMC,iBAAiB;QACrB;YACEC,WAAW;gBAAC;oBAAEC,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;aAAE;YAC3CC,UAAUC,yBAAAA,CAAaC,cAAc;YACrCC,QAAQF,yBAAAA,CAAaG,WAAW;QAClC;QACA;YACEN,WAAW;gBAAC;oBAAEO,WAAW;gBAAmB;gBAAG;oBAAEA,WAAW;gBAAgB;aAAE;YAC9EL,UAAUC,yBAAAA,CAAaK,cAAc;YACrCH,QAAQF,yBAAAA,CAAaM,kBAAkB;QACzC;KACD;IACD,MAAMC,gBAAgB;QACpBV,WAAW;YAAC;gBAAEC,SAAS;YAAE;YAAG;gBAAEA,SAAS;YAAE;SAAE;QAC3CC,UAAUC,yBAAAA,CAAaC,cAAc;QACrCC,QAAQF,yBAAAA,CAAaG,WAAW;IAClC;IAEA,OAAO;QACLK,OAAOZ;QACPa,MAAMF;IACR;AACF;AAEO,MAAMb,oBACXgB,IAAAA,oCAAAA,EAAwBf"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderAnimatedPlaceholder_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderAnimatedPlaceholder_unstable;
9
+ }
10
+ });
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactcomponents = require("@fluentui/react-components");
13
+ const renderAnimatedPlaceholder_unstable = (state)=>{
14
+ (0, _reactcomponents.assertSlots)(state);
15
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {
16
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.motion, {
17
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.placeholder, {})
18
+ })
19
+ });
20
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderAnimatedPlaceholder.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AnimatedPlaceholderState, AnimatedPlaceholderSlots } from './AnimatedPlaceholder.types';\n\n/**\n * Render the final JSX of AnimatedPlaceholder\n */\nexport const renderAnimatedPlaceholder_unstable = (state: AnimatedPlaceholderState) => {\n assertSlots<AnimatedPlaceholderSlots>(state);\n\n return (\n <state.root>\n <state.motion>\n <state.placeholder />\n </state.motion>\n </state.root>\n );\n};\n"],"names":["renderAnimatedPlaceholder_unstable","state","assertSlots","_jsx","root","motion","placeholder"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;iCAE4B;AAMrB,MAAMA,qCAAqC,CAACC;IACjDC,IAAAA,4BAAAA,EAAsCD;IAEtC,OAAA,WAAA,GACEE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA;kBACT,WAAA,GAAAD,IAAAA,eAAA,EAACF,MAAMI,MAAM,EAAA;sBACX,WAAA,GAAAF,IAAAA,eAAA,EAACF,MAAMK,WAAW,EAAA,CAAA;;;AAI1B"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useAnimatedPlaceholder_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useAnimatedPlaceholder_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 _placeholderMotion = require("./placeholderMotion");
15
+ const _reactmotion = require("@fluentui/react-motion");
16
+ const useAnimatedPlaceholder_unstable = (props, ref)=>{
17
+ const { placeholderValue } = props;
18
+ const [placeholder, setPlaceholder] = _react.useState(placeholderValue);
19
+ const [visible, setVisible] = _react.useState(true);
20
+ _react.useEffect(()=>{
21
+ if (placeholderValue !== placeholder) {
22
+ setVisible(false);
23
+ }
24
+ }, [
25
+ placeholder,
26
+ placeholderValue
27
+ ]);
28
+ const onMotionFinish = ()=>{
29
+ setPlaceholder(placeholderValue);
30
+ setVisible(true);
31
+ };
32
+ return {
33
+ components: {
34
+ root: 'div',
35
+ motion: _placeholderMotion.PlaceholderMotion,
36
+ placeholder: 'div'
37
+ },
38
+ root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
39
+ ref,
40
+ ...props
41
+ }), {
42
+ elementType: 'div'
43
+ }),
44
+ motion: (0, _reactmotion.presenceMotionSlot)(props.motion, {
45
+ elementType: _placeholderMotion.PlaceholderMotion,
46
+ defaultProps: {
47
+ visible: visible,
48
+ onMotionFinish: onMotionFinish
49
+ }
50
+ }),
51
+ placeholder: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
52
+ children: placeholder
53
+ }), {
54
+ elementType: 'div'
55
+ })
56
+ };
57
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAnimatedPlaceholder.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport type { AnimatedPlaceholderProps, AnimatedPlaceholderState } from './AnimatedPlaceholder.types';\nimport { PlaceholderMotion } from './placeholderMotion';\nimport { type PresenceMotionSlotProps, presenceMotionSlot } from '@fluentui/react-motion';\n\n/**\n * Create the state required to render AnimatedPlaceholder.\n *\n * The returned state can be modified with hooks such as useAnimatedPlaceholderStyles_unstable,\n * before being passed to renderAnimatedPlaceholder_unstable.\n *\n * @param props - props from this instance of AnimatedPlaceholder\n * @param ref - reference to root HTMLElement of AnimatedPlaceholder\n */\nexport const useAnimatedPlaceholder_unstable = (\n props: AnimatedPlaceholderProps,\n ref: React.Ref<HTMLDivElement>,\n): AnimatedPlaceholderState => {\n const { placeholderValue } = props;\n\n const [placeholder, setPlaceholder] = React.useState(placeholderValue);\n const [visible, setVisible] = React.useState(true);\n\n React.useEffect(() => {\n if (placeholderValue !== placeholder) {\n setVisible(false);\n }\n }, [placeholder, placeholderValue]);\n\n const onMotionFinish = () => {\n setPlaceholder(placeholderValue);\n setVisible(true);\n };\n\n return {\n components: {\n root: 'div',\n motion: PlaceholderMotion as React.FC<PresenceMotionSlotProps>,\n placeholder: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n motion: presenceMotionSlot<{}>(props.motion, {\n elementType: PlaceholderMotion,\n defaultProps: {\n visible: visible,\n onMotionFinish: onMotionFinish,\n },\n }),\n placeholder: slot.always(\n getIntrinsicElementProps('div', {\n children: placeholder,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["useAnimatedPlaceholder_unstable","props","ref","placeholderValue","placeholder","setPlaceholder","React","useState","visible","setVisible","useEffect","onMotionFinish","components","root","motion","PlaceholderMotion","slot","always","getIntrinsicElementProps","elementType","presenceMotionSlot","defaultProps","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;iCACwB;mCAEb;6BAC+B;AAW1D,MAAMA,kCAAkC,CAC7CC,OACAC;IAEA,MAAM,EAAEC,gBAAgB,EAAE,GAAGF;IAE7B,MAAM,CAACG,aAAaC,eAAe,GAAGC,OAAMC,QAAQ,CAACJ;IACrD,MAAM,CAACK,SAASC,WAAW,GAAGH,OAAMC,QAAQ,CAAC;IAE7CD,OAAMI,SAAS,CAAC;QACd,IAAIP,qBAAqBC,aAAa;YACpCK,WAAW;QACb;IACF,GAAG;QAACL;QAAaD;KAAiB;IAElC,MAAMQ,iBAAiB;QACrBN,eAAeF;QACfM,WAAW;IACb;IAEA,OAAO;QACLG,YAAY;YACVC,MAAM;YACNC,QAAQC,oCAAAA;YACRX,aAAa;QACf;QACAS,MAAMG,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,OAAO;YAC9BhB;YACA,GAAGD,KAAK;QACV,IACA;YAAEkB,aAAa;QAAM;QAEvBL,QAAQM,IAAAA,+BAAAA,EAAuBnB,MAAMa,MAAM,EAAE;YAC3CK,aAAaJ,oCAAAA;YACbM,cAAc;gBACZb,SAASA;gBACTG,gBAAgBA;YAClB;QACF;QACAP,aAAaY,qBAAAA,CAAKC,MAAM,CACtBC,IAAAA,yCAAAA,EAAyB,OAAO;YAC9BI,UAAUlB;QACZ,IACA;YAAEe,aAAa;QAAM;IAEzB;AACF"}
@@ -0,0 +1,37 @@
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
+ animatedPlaceholderClassNames: function() {
13
+ return animatedPlaceholderClassNames;
14
+ },
15
+ useAnimatedPlaceholderStyles_unstable: function() {
16
+ return useAnimatedPlaceholderStyles_unstable;
17
+ }
18
+ });
19
+ const _reactcomponents = require("@fluentui/react-components");
20
+ const animatedPlaceholderClassNames = {
21
+ root: 'fai-AnimatedPlaceholder',
22
+ placeholder: 'fai-AnimatedPlaceholder__placeholder'
23
+ };
24
+ /**
25
+ * Styles for the root slot
26
+ */ const useRootClassNames = (0, _reactcomponents.__resetStyles)("r7ukxtn", null, [
27
+ ".r7ukxtn{overflow:clip;}"
28
+ ]);
29
+ const useAnimatedPlaceholderStyles_unstable = (state)=>{
30
+ 'use no memo';
31
+ const rootClassNames = useRootClassNames();
32
+ state.root.className = (0, _reactcomponents.mergeClasses)(animatedPlaceholderClassNames.root, rootClassNames, state.root.className);
33
+ if (state.placeholder) {
34
+ state.placeholder.className = (0, _reactcomponents.mergeClasses)(animatedPlaceholderClassNames.placeholder, state.placeholder.className);
35
+ }
36
+ return state;
37
+ }; //# sourceMappingURL=useAnimatedPlaceholderStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAnimatedPlaceholderStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport type { AnimatedPlaceholderSlots, AnimatedPlaceholderState } from './AnimatedPlaceholder.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const animatedPlaceholderClassNames: SlotClassNames<Omit<AnimatedPlaceholderSlots, 'motion'>> = {\n root: 'fai-AnimatedPlaceholder',\n placeholder: 'fai-AnimatedPlaceholder__placeholder',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassNames = makeResetStyles({\n overflow: 'clip',\n});\n\n/**\n * Apply styling to the AnimatedPlaceholder slots based on the state\n */\nexport const useAnimatedPlaceholderStyles_unstable = (state: AnimatedPlaceholderState): AnimatedPlaceholderState => {\n 'use no memo';\n\n const rootClassNames = useRootClassNames();\n state.root.className = mergeClasses(animatedPlaceholderClassNames.root, rootClassNames, state.root.className);\n\n if (state.placeholder) {\n state.placeholder.className = mergeClasses(animatedPlaceholderClassNames.placeholder, state.placeholder.className);\n }\n\n return state;\n};\n"],"names":["animatedPlaceholderClassNames","useAnimatedPlaceholderStyles_unstable","root","placeholder","overflow","__resetStyles","state","useRootClassNames","mergeClasses","rootClassNames","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,6BAAAA;eAAAA;;IAeNC,qCAAMA;eAANA;;;iCAnB+B;AAI/B,MAAMD,gCAA0F;UACrGE;iBACAC;AACF;AAEA;;CAEC,SAECC,oBAAUC,IAAAA,8BAAA,EAAA,WAAA,MAAA;IAAA;CAAA;AAMZ,MAAOJ,wCAAMA,CAAAA;;UAIXK,iBAAoBC;UAEhBD,IAAAA,CAAAA,SAAMH,GAAWK,IAAAA,6BAAE,EAAAR,8BAAAE,IAAA,EAAAO,gBAAAH,MAAAJ,IAAA,CAAAQ,SAAA;cACrBJ,WAAMH,EAAW;QACnBG,MAAAH,WAAA,CAAAO,SAAA,GAAAF,IAAAA,6BAAA,EAAAR,8BAAAG,WAAA,EAAAG,MAAAH,WAAA,CAAAO,SAAA;;IAGA,OAAAJ"}
@@ -0,0 +1,37 @@
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
+ animatedPlaceholderClassNames: function() {
13
+ return animatedPlaceholderClassNames;
14
+ },
15
+ useAnimatedPlaceholderStyles_unstable: function() {
16
+ return useAnimatedPlaceholderStyles_unstable;
17
+ }
18
+ });
19
+ const _reactcomponents = require("@fluentui/react-components");
20
+ const animatedPlaceholderClassNames = {
21
+ root: 'fai-AnimatedPlaceholder',
22
+ placeholder: 'fai-AnimatedPlaceholder__placeholder'
23
+ };
24
+ /**
25
+ * Styles for the root slot
26
+ */ const useRootClassNames = (0, _reactcomponents.makeResetStyles)({
27
+ overflow: 'clip'
28
+ });
29
+ const useAnimatedPlaceholderStyles_unstable = (state)=>{
30
+ 'use no memo';
31
+ const rootClassNames = useRootClassNames();
32
+ state.root.className = (0, _reactcomponents.mergeClasses)(animatedPlaceholderClassNames.root, rootClassNames, state.root.className);
33
+ if (state.placeholder) {
34
+ state.placeholder.className = (0, _reactcomponents.mergeClasses)(animatedPlaceholderClassNames.placeholder, state.placeholder.className);
35
+ }
36
+ return state;
37
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAnimatedPlaceholderStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport type { AnimatedPlaceholderSlots, AnimatedPlaceholderState } from './AnimatedPlaceholder.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const animatedPlaceholderClassNames: SlotClassNames<Omit<AnimatedPlaceholderSlots, 'motion'>> = {\n root: 'fai-AnimatedPlaceholder',\n placeholder: 'fai-AnimatedPlaceholder__placeholder',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassNames = makeResetStyles({\n overflow: 'clip',\n});\n\n/**\n * Apply styling to the AnimatedPlaceholder slots based on the state\n */\nexport const useAnimatedPlaceholderStyles_unstable = (state: AnimatedPlaceholderState): AnimatedPlaceholderState => {\n 'use no memo';\n\n const rootClassNames = useRootClassNames();\n state.root.className = mergeClasses(animatedPlaceholderClassNames.root, rootClassNames, state.root.className);\n\n if (state.placeholder) {\n state.placeholder.className = mergeClasses(animatedPlaceholderClassNames.placeholder, state.placeholder.className);\n }\n\n return state;\n};\n"],"names":["animatedPlaceholderClassNames","useAnimatedPlaceholderStyles_unstable","root","placeholder","useRootClassNames","makeResetStyles","overflow","state","rootClassNames","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,6BAAAA;eAAAA;;IAeAC,qCAAAA;eAAAA;;;iCAnBiC;AAIvC,MAAMD,gCAA0F;IACrGE,MAAM;IACNC,aAAa;AACf;AAEA;;CAEC,GACD,MAAMC,oBAAoBC,IAAAA,gCAAAA,EAAgB;IACxCC,UAAU;AACZ;AAKO,MAAML,wCAAwC,CAACM;IACpD;IAEA,MAAMC,iBAAiBJ;IACvBG,MAAML,IAAI,CAACO,SAAS,GAAGC,IAAAA,6BAAAA,EAAaV,8BAA8BE,IAAI,EAAEM,gBAAgBD,MAAML,IAAI,CAACO,SAAS;IAE5G,IAAIF,MAAMJ,WAAW,EAAE;QACrBI,MAAMJ,WAAW,CAACM,SAAS,GAAGC,IAAAA,6BAAAA,EAAaV,8BAA8BG,WAAW,EAAEI,MAAMJ,WAAW,CAACM,SAAS;IACnH;IAEA,OAAOF;AACT"}
@@ -9,15 +9,30 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ AnimatedPlaceholder: function() {
13
+ return _AnimatedPlaceholder.AnimatedPlaceholder;
14
+ },
12
15
  EditorInput: function() {
13
16
  return _EditorInput.EditorInput;
14
17
  },
18
+ animatedPlaceholderClassNames: function() {
19
+ return _AnimatedPlaceholder.animatedPlaceholderClassNames;
20
+ },
15
21
  editorInputClassNames: function() {
16
22
  return _EditorInput.editorInputClassNames;
17
23
  },
24
+ renderAnimatedPlaceholder_unstable: function() {
25
+ return _AnimatedPlaceholder.renderAnimatedPlaceholder_unstable;
26
+ },
18
27
  renderEditorInput_unstable: function() {
19
28
  return _EditorInput.renderEditorInput_unstable;
20
29
  },
30
+ useAnimatedPlaceholderStyles_unstable: function() {
31
+ return _AnimatedPlaceholder.useAnimatedPlaceholderStyles_unstable;
32
+ },
33
+ useAnimatedPlaceholder_unstable: function() {
34
+ return _AnimatedPlaceholder.useAnimatedPlaceholder_unstable;
35
+ },
21
36
  useEditorInputStyles_unstable: function() {
22
37
  return _EditorInput.useEditorInputStyles_unstable;
23
38
  },
@@ -26,3 +41,4 @@ _export(exports, {
26
41
  }
27
42
  });
28
43
  const _EditorInput = require("./EditorInput");
44
+ const _AnimatedPlaceholder = require("./AnimatedPlaceholder");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type { EditorInputProps, EditorInputSlots, EditorInputState, EditorInputValueData } from './EditorInput';\nexport {\n EditorInput,\n editorInputClassNames,\n renderEditorInput_unstable,\n useEditorInputStyles_unstable,\n useEditorInput_unstable,\n} from './EditorInput';\n"],"names":["EditorInput","editorInputClassNames","renderEditorInput_unstable","useEditorInputStyles_unstable","useEditorInput_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,WAAW;eAAXA,wBAAW;;IACXC,qBAAqB;eAArBA,kCAAqB;;IACrBC,0BAA0B;eAA1BA,uCAA0B;;IAC1BC,6BAA6B;eAA7BA,0CAA6B;;IAC7BC,uBAAuB;eAAvBA,oCAAuB;;;6BAClB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { EditorInputProps, EditorInputSlots, EditorInputState, EditorInputValueData } from './EditorInput';\nexport {\n EditorInput,\n editorInputClassNames,\n renderEditorInput_unstable,\n useEditorInputStyles_unstable,\n useEditorInput_unstable,\n} from './EditorInput';\n\nexport {\n AnimatedPlaceholder,\n renderAnimatedPlaceholder_unstable,\n useAnimatedPlaceholder_unstable,\n animatedPlaceholderClassNames,\n useAnimatedPlaceholderStyles_unstable,\n} from './AnimatedPlaceholder';\nexport type {\n AnimatedPlaceholderProps,\n AnimatedPlaceholderSlots,\n AnimatedPlaceholderState,\n} from './AnimatedPlaceholder';\n"],"names":["AnimatedPlaceholder","EditorInput","animatedPlaceholderClassNames","editorInputClassNames","renderAnimatedPlaceholder_unstable","renderEditorInput_unstable","useAnimatedPlaceholderStyles_unstable","useAnimatedPlaceholder_unstable","useEditorInputStyles_unstable","useEditorInput_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAUEA,mBAAmB;eAAnBA,wCAAmB;;IARnBC,WAAW;eAAXA,wBAAW;;IAWXC,6BAA6B;eAA7BA,kDAA6B;;IAV7BC,qBAAqB;eAArBA,kCAAqB;;IAQrBC,kCAAkC;eAAlCA,uDAAkC;;IAPlCC,0BAA0B;eAA1BA,uCAA0B;;IAU1BC,qCAAqC;eAArCA,0DAAqC;;IAFrCC,+BAA+B;eAA/BA,oDAA+B;;IAP/BC,6BAA6B;eAA7BA,0CAA6B;;IAC7BC,uBAAuB;eAAvBA,oCAAuB;;;6BAClB;qCAQA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-editor-input",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "a base rich editor input.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -21,6 +21,7 @@
21
21
  "peerDependencies": {
22
22
  "@fluentui/react-components": ">=9.66.0 <10.0.0",
23
23
  "@fluentui/react-jsx-runtime": ">=9.1.1 <10.0.0",
24
+ "@fluentui/react-motion": ">=9.8.1 <10.0.0",
24
25
  "@fluentui/react-utilities": ">=9.21.1 <10.0.0",
25
26
  "@types/react": ">=16.14.0 <19.0.0",
26
27
  "@types/react-dom": ">=16.9.8 <19.0.0",