@fluentui-copilot/react-editor-input 0.3.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@fluentui-copilot/react-editor-input",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 10 Dec 2024 20:20:52 GMT",
5
+ "date": "Thu, 09 Jan 2025 01:14:53 GMT",
6
+ "tag": "@fluentui-copilot/react-editor-input_v0.4.0",
7
+ "version": "0.4.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "owcampbe@microsoft.com",
12
+ "package": "@fluentui-copilot/react-editor-input",
13
+ "commit": "856e63b772356be87b7ae256c65472369610ee6b",
14
+ "comment": "fix: Set text-align: start to allow Lexical to decide on RTL/LTR."
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 18 Dec 2024 08:55:42 GMT",
21
+ "tag": "@fluentui-copilot/react-editor-input_v0.3.4",
22
+ "version": "0.3.4",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "makotom@microsoft.com",
27
+ "package": "@fluentui-copilot/react-editor-input",
28
+ "commit": "cc179462507d13546b93c6330be325014286998c",
29
+ "comment": "chore: Banning * exports."
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Tue, 10 Dec 2024 20:22:06 GMT",
6
36
  "tag": "@fluentui-copilot/react-editor-input_v0.3.3",
7
37
  "version": "0.3.3",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,30 @@
1
1
  # Change Log - @fluentui-copilot/react-editor-input
2
2
 
3
- This log was last generated on Tue, 10 Dec 2024 20:20:52 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 09 Jan 2025 01:14:53 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.4.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-editor-input_v0.4.0)
8
+
9
+ Thu, 09 Jan 2025 01:14:53 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-editor-input_v0.3.4..@fluentui-copilot/react-editor-input_v0.4.0)
11
+
12
+ ### Patches
13
+
14
+ - fix: Set text-align: start to allow Lexical to decide on RTL/LTR. ([PR #2509](https://github.com/microsoft/fluentai/pull/2509) by owcampbe@microsoft.com)
15
+
16
+ ## [0.3.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-editor-input_v0.3.4)
17
+
18
+ Wed, 18 Dec 2024 08:55:42 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-editor-input_v0.3.3..@fluentui-copilot/react-editor-input_v0.3.4)
20
+
21
+ ### Patches
22
+
23
+ - chore: Banning * exports. ([PR #2477](https://github.com/microsoft/fluentai/pull/2477) by makotom@microsoft.com)
24
+
7
25
  ## [0.3.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-editor-input_v0.3.3)
8
26
 
9
- Tue, 10 Dec 2024 20:20:52 GMT
27
+ Tue, 10 Dec 2024 20:22:06 GMT
10
28
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-editor-input_v0.3.1..@fluentui-copilot/react-editor-input_v0.3.3)
11
29
 
12
30
  ### Patches
@@ -1,2 +1,2 @@
1
- export * from './components/EditorInput/index';
1
+ export { EditorInput, editorInputClassNames, renderEditorInput_unstable, useEditorInputStyles_unstable, useEditorInput_unstable, useInputClassName, useLexicalStyles, usePlaceholderClassName } from './components/EditorInput/index';
2
2
  //# sourceMappingURL=EditorInput.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["EditorInput.ts"],"sourcesContent":["export * from './components/EditorInput/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,iCAAiC"}
1
+ {"version":3,"sources":["EditorInput.ts"],"sourcesContent":["export type { EditorInputProps, EditorInputSlots, EditorInputState, EditorInputValueData } from './components/EditorInput/index';\nexport { EditorInput, editorInputClassNames, renderEditorInput_unstable, useEditorInputStyles_unstable, useEditorInput_unstable, useInputClassName, useLexicalStyles, usePlaceholderClassName } from './components/EditorInput/index';\n"],"names":["EditorInput","editorInputClassNames","renderEditorInput_unstable","useEditorInputStyles_unstable","useEditorInput_unstable","useInputClassName","useLexicalStyles","usePlaceholderClassName"],"rangeMappings":"","mappings":"AACA,SAASA,WAAW,EAAEC,qBAAqB,EAAEC,0BAA0B,EAAEC,6BAA6B,EAAEC,uBAAuB,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,uBAAuB,QAAQ,iCAAiC"}
@@ -1,6 +1,5 @@
1
- export * from './EditorInput';
2
- export * from './EditorInput.types';
3
- export * from './renderEditorInput';
4
- export * from './useEditorInput';
5
- export * from './useEditorInputStyles.styles';
1
+ export { EditorInput } from './EditorInput';
2
+ export { renderEditorInput_unstable } from './renderEditorInput';
3
+ export { useEditorInput_unstable } from './useEditorInput';
4
+ export { editorInputClassNames, useEditorInputStyles_unstable, useInputClassName, useLexicalStyles, usePlaceholderClassName } from './useEditorInputStyles.styles';
6
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './EditorInput';\nexport * from './EditorInput.types';\nexport * from './renderEditorInput';\nexport * from './useEditorInput';\nexport * from './useEditorInputStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,gCAAgC"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { EditorInput } from './EditorInput';\nexport type { EditorInputProps, EditorInputSlots, EditorInputState, EditorInputValueData } from './EditorInput.types';\nexport { renderEditorInput_unstable } from './renderEditorInput';\nexport { useEditorInput_unstable } from './useEditorInput';\nexport { editorInputClassNames, useEditorInputStyles_unstable, useInputClassName, useLexicalStyles, usePlaceholderClassName } from './useEditorInputStyles.styles';\n"],"names":["EditorInput","renderEditorInput_unstable","useEditorInput_unstable","editorInputClassNames","useEditorInputStyles_unstable","useInputClassName","useLexicalStyles","usePlaceholderClassName"],"rangeMappings":";;;","mappings":"AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAE5C,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,qBAAqB,EAAEC,6BAA6B,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,uBAAuB,QAAQ,gCAAgC"}
@@ -14,12 +14,13 @@ export const useLexicalStyles = __styles({
14
14
  Frg6f3: 0,
15
15
  t21cq0: 0,
16
16
  B6of3ja: 0,
17
- B74szlk: "f1s184ao"
17
+ B74szlk: "f1s184ao",
18
+ fsow6f: "fpgzoln"
18
19
  }
19
20
  }, {
20
21
  d: [[".f1s184ao{margin:0;}", {
21
22
  p: -1
22
- }]]
23
+ }], ".fpgzoln{text-align:start;}"]
23
24
  });
24
25
  export const usePlaceholderClassName = __resetStyles("rrmx5oh", null, {
25
26
  r: [".rrmx5oh{z-index:0;grid-area:1/1/1/1;color:var(--colorNeutralForeground4);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}"],
@@ -1 +1 @@
1
- {"version":3,"sources":["useEditorInputStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport type { EditorInputSlots, EditorInputState } from './EditorInput.types';\n\nexport const editorInputClassNames: SlotClassNames<EditorInputSlots> = {\n root: 'fai-EditorInput',\n input: 'fai-EditorInput__input',\n placeholderValue: 'fai-EditorInput__placeholderValue',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'inline-grid',\n whiteSpace: 'pre-wrap',\n});\n\nexport const useLexicalStyles = makeStyles({\n paragraph: {\n margin: 0,\n },\n});\n\nexport const usePlaceholderClassName = makeResetStyles({\n zIndex: 0,\n gridArea: '1 / 1 / 1 / 1',\n\n color: tokens.colorNeutralForeground4,\n ...typographyStyles.body1,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n});\n\nexport const useInputClassName = makeResetStyles({\n gridArea: '1 / 1 / 1 / 1',\n zIndex: 1,\n width: '100%',\n});\n\nconst useStyles = makeStyles({\n placeholderDisabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n});\n/**\n * Apply styling to the EditorInput slots based on the state\n */\nexport const useEditorInputStyles_unstable = (state: EditorInputState): EditorInputState => {\n 'use no memo';\n\n const { disabled } = state;\n const placeholderClassName = usePlaceholderClassName();\n const rootClassName = useRootClassName();\n const inputClassName = useInputClassName();\n const styles = useStyles();\n\n state.root.className = mergeClasses(editorInputClassNames.root, rootClassName, state.root.className);\n\n state.input.className = mergeClasses(editorInputClassNames.input, inputClassName, state.input.className);\n\n state.lexicalInitialConfig = {\n ...state.lexicalInitialConfig,\n theme: { ...useLexicalStyles(), ...state.lexicalInitialConfig.theme },\n };\n\n if (state.placeholderValue) {\n state.placeholderValue.className = mergeClasses(\n editorInputClassNames.placeholderValue,\n placeholderClassName,\n disabled && styles.placeholderDisabled,\n state.placeholderValue.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","typographyStyles","editorInputClassNames","root","input","placeholderValue","useRootClassName","display","whiteSpace","useLexicalStyles","paragraph","margin","usePlaceholderClassName","zIndex","gridArea","color","colorNeutralForeground4","body1","useInputClassName","width","useStyles","placeholderDisabled","colorNeutralForegroundDisabled","useEditorInputStyles_unstable","state","disabled","placeholderClassName","rootClassName","inputClassName","styles","className","lexicalInitialConfig","theme"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAE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QAC1BmB,MAAMnB,gBAAgB,CAACyB,SAAS,GAAG/B,aACjCG,sBAAsBG,gBAAgB,EACtCqB,sBACAD,YAAYI,OAAOR,mBAAmB,EACtCG,MAAMnB,gBAAgB,CAACyB,SAAS;IAEpC;IAEA,OAAON;AACT,EAAE"}
1
+ {"version":3,"sources":["useEditorInputStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport type { EditorInputSlots, EditorInputState } from './EditorInput.types';\n\nexport const editorInputClassNames: SlotClassNames<EditorInputSlots> = {\n root: 'fai-EditorInput',\n input: 'fai-EditorInput__input',\n placeholderValue: 'fai-EditorInput__placeholderValue',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'inline-grid',\n whiteSpace: 'pre-wrap',\n});\n\nexport const useLexicalStyles = makeStyles({\n paragraph: {\n margin: 0,\n textAlign: 'start',\n },\n});\n\nexport const usePlaceholderClassName = makeResetStyles({\n zIndex: 0,\n gridArea: '1 / 1 / 1 / 1',\n\n color: tokens.colorNeutralForeground4,\n ...typographyStyles.body1,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n});\n\nexport const useInputClassName = makeResetStyles({\n gridArea: '1 / 1 / 1 / 1',\n zIndex: 1,\n width: '100%',\n});\n\nconst useStyles = makeStyles({\n placeholderDisabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n});\n/**\n * Apply styling to the EditorInput slots based on the state\n */\nexport const useEditorInputStyles_unstable = (state: EditorInputState): EditorInputState => {\n 'use no memo';\n\n const { disabled } = state;\n const placeholderClassName = usePlaceholderClassName();\n const rootClassName = useRootClassName();\n const inputClassName = useInputClassName();\n const styles = useStyles();\n\n state.root.className = mergeClasses(editorInputClassNames.root, rootClassName, state.root.className);\n\n state.input.className = mergeClasses(editorInputClassNames.input, inputClassName, state.input.className);\n\n state.lexicalInitialConfig = {\n ...state.lexicalInitialConfig,\n theme: { ...useLexicalStyles(), ...state.lexicalInitialConfig.theme },\n };\n\n if (state.placeholderValue) {\n state.placeholderValue.className = mergeClasses(\n editorInputClassNames.placeholderValue,\n placeholderClassName,\n disabled && styles.placeholderDisabled,\n state.placeholderValue.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","typographyStyles","editorInputClassNames","root","input","placeholderValue","useRootClassName","display","whiteSpace","useLexicalStyles","paragraph","margin","textAlign","usePlaceholderClassName","zIndex","gridArea","color","colorNeutralForeground4","body1","useInputClassName","width","useStyles","placeholderDisabled","colorNeutralForegroundDisabled","useEditorInputStyles_unstable","state","disabled","placeholderClassName","rootClassName","inputClassName","styles","className","lexicalInitialConfig","theme"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAIjH,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;IACNC,OAAO;IACPC,kBAAkB;AACpB,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBT,gBAAgB;IACvCU,SAAS;IACTC,YAAY;AACd;AAEA,OAAO,MAAMC,mBAAmBX,WAAW;IACzCY,WAAW;QACTC,QAAQ;QACRC,WAAW;IACb;AACF,GAAG;AAEH,OAAO,MAAMC,0BAA0BhB,gBAAgB;IACrDiB,QAAQ;IACRC,UAAU;IAEVC,OAAOhB,OAAOiB,uBAAuB;IACrC,GAAGhB,iBAAiBiB,KAAK;IAEzB,kCAAkC;QAChCF,OAAO;IACT;AACF,GAAG;AAEH,OAAO,MAAMG,oBAAoBtB,gBAAgB;IAC/CkB,UAAU;IACVD,QAAQ;IACRM,OAAO;AACT,GAAG;AAEH,MAAMC,YAAYvB,WAAW;IAC3BwB,qBAAqB;QACnBN,OAAOhB,OAAOuB,8BAA8B;IAC9C;AACF;AACA;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5C;IAEA,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IACrB,MAAME,uBAAuBd;IAC7B,MAAMe,gBAAgBtB;IACtB,MAAMuB,iBAAiBV;IACvB,MAAMW,SAAST;IAEfI,MAAMtB,IAAI,CAAC4B,SAAS,GAAGhC,aAAaG,sBAAsBC,IAAI,EAAEyB,eAAeH,MAAMtB,IAAI,CAAC4B,SAAS;IAEnGN,MAAMrB,KAAK,CAAC2B,SAAS,GAAGhC,aAAaG,sBAAsBE,KAAK,EAAEyB,gBAAgBJ,MAAMrB,KAAK,CAAC2B,SAAS;IAEvGN,MAAMO,oBAAoB,GAAG;QAC3B,GAAGP,MAAMO,oBAAoB;QAC7BC,OAAO;YAAE,GAAGxB,kBAAkB;YAAE,GAAGgB,MAAMO,oBAAoB,CAACC,KAAK;QAAC;IACtE;IAEA,IAAIR,MAAMpB,gBAAgB,EAAE;QAC1BoB,MAAMpB,gBAAgB,CAAC0B,SAAS,GAAGhC,aACjCG,sBAAsBG,gBAAgB,EACtCsB,sBACAD,YAAYI,OAAOR,mBAAmB,EACtCG,MAAMpB,gBAAgB,CAAC0B,SAAS;IAEpC;IAEA,OAAON;AACT,EAAE"}
@@ -2,6 +2,37 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./components/EditorInput/index"), exports);
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
+ EditorInput: function() {
13
+ return _index.EditorInput;
14
+ },
15
+ editorInputClassNames: function() {
16
+ return _index.editorInputClassNames;
17
+ },
18
+ renderEditorInput_unstable: function() {
19
+ return _index.renderEditorInput_unstable;
20
+ },
21
+ useEditorInputStyles_unstable: function() {
22
+ return _index.useEditorInputStyles_unstable;
23
+ },
24
+ useEditorInput_unstable: function() {
25
+ return _index.useEditorInput_unstable;
26
+ },
27
+ useInputClassName: function() {
28
+ return _index.useInputClassName;
29
+ },
30
+ useLexicalStyles: function() {
31
+ return _index.useLexicalStyles;
32
+ },
33
+ usePlaceholderClassName: function() {
34
+ return _index.usePlaceholderClassName;
35
+ }
36
+ });
37
+ const _index = require("./components/EditorInput/index");
7
38
  //# sourceMappingURL=EditorInput.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["EditorInput.ts"],"sourcesContent":["export * from './components/EditorInput/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["EditorInput.ts"],"sourcesContent":["export type { EditorInputProps, EditorInputSlots, EditorInputState, EditorInputValueData } from './components/EditorInput/index';\nexport { EditorInput, editorInputClassNames, renderEditorInput_unstable, useEditorInputStyles_unstable, useEditorInput_unstable, useInputClassName, useLexicalStyles, usePlaceholderClassName } from './components/EditorInput/index';\n"],"names":["EditorInput","editorInputClassNames","renderEditorInput_unstable","useEditorInputStyles_unstable","useEditorInput_unstable","useInputClassName","useLexicalStyles","usePlaceholderClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,WAAW;eAAXA,kBAAW;;IAAEC,qBAAqB;eAArBA,4BAAqB;;IAAEC,0BAA0B;eAA1BA,iCAA0B;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;IAAEC,gBAAgB;eAAhBA,uBAAgB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;;uBAAQ"}
@@ -2,10 +2,40 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./EditorInput"), exports);
7
- _export_star._(require("./EditorInput.types"), exports);
8
- _export_star._(require("./renderEditorInput"), exports);
9
- _export_star._(require("./useEditorInput"), exports);
10
- _export_star._(require("./useEditorInputStyles.styles"), exports);
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
+ EditorInput: function() {
13
+ return _EditorInput.EditorInput;
14
+ },
15
+ editorInputClassNames: function() {
16
+ return _useEditorInputStylesstyles.editorInputClassNames;
17
+ },
18
+ renderEditorInput_unstable: function() {
19
+ return _renderEditorInput.renderEditorInput_unstable;
20
+ },
21
+ useEditorInputStyles_unstable: function() {
22
+ return _useEditorInputStylesstyles.useEditorInputStyles_unstable;
23
+ },
24
+ useEditorInput_unstable: function() {
25
+ return _useEditorInput.useEditorInput_unstable;
26
+ },
27
+ useInputClassName: function() {
28
+ return _useEditorInputStylesstyles.useInputClassName;
29
+ },
30
+ useLexicalStyles: function() {
31
+ return _useEditorInputStylesstyles.useLexicalStyles;
32
+ },
33
+ usePlaceholderClassName: function() {
34
+ return _useEditorInputStylesstyles.usePlaceholderClassName;
35
+ }
36
+ });
37
+ const _EditorInput = require("./EditorInput");
38
+ const _renderEditorInput = require("./renderEditorInput");
39
+ const _useEditorInput = require("./useEditorInput");
40
+ const _useEditorInputStylesstyles = require("./useEditorInputStyles.styles");
11
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './EditorInput';\nexport * from './EditorInput.types';\nexport * from './renderEditorInput';\nexport * from './useEditorInput';\nexport * from './useEditorInputStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { EditorInput } from './EditorInput';\nexport type { EditorInputProps, EditorInputSlots, EditorInputState, EditorInputValueData } from './EditorInput.types';\nexport { renderEditorInput_unstable } from './renderEditorInput';\nexport { useEditorInput_unstable } from './useEditorInput';\nexport { editorInputClassNames, useEditorInputStyles_unstable, useInputClassName, useLexicalStyles, usePlaceholderClassName } from './useEditorInputStyles.styles';\n"],"names":["EditorInput","editorInputClassNames","renderEditorInput_unstable","useEditorInputStyles_unstable","useEditorInput_unstable","useInputClassName","useLexicalStyles","usePlaceholderClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAIXC,qBAAqB;eAArBA,iDAAqB;;IAFrBC,0BAA0B;eAA1BA,6CAA0B;;IAEHC,6BAA6B;eAA7BA,yDAA6B;;IADpDC,uBAAuB;eAAvBA,uCAAuB;;IAC+BC,iBAAiB;eAAjBA,6CAAiB;;IAAEC,gBAAgB;eAAhBA,4CAAgB;;IAAEC,uBAAuB;eAAvBA,mDAAuB;;;6BAJ/F;mCAEe;gCACH;4CAC2F"}
@@ -42,7 +42,8 @@ const useLexicalStyles = (0, _reactcomponents.__styles)({
42
42
  Frg6f3: 0,
43
43
  t21cq0: 0,
44
44
  B6of3ja: 0,
45
- B74szlk: "f1s184ao"
45
+ B74szlk: "f1s184ao",
46
+ fsow6f: "fpgzoln"
46
47
  }
47
48
  }, {
48
49
  d: [
@@ -51,7 +52,8 @@ const useLexicalStyles = (0, _reactcomponents.__styles)({
51
52
  {
52
53
  p: -1
53
54
  }
54
- ]
55
+ ],
56
+ ".fpgzoln{text-align:start;}"
55
57
  ]
56
58
  });
57
59
  const usePlaceholderClassName = (0, _reactcomponents.__resetStyles)("rrmx5oh", null, {
@@ -1 +1 @@
1
- {"version":3,"sources":["useEditorInputStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport type { EditorInputSlots, EditorInputState } from './EditorInput.types';\n\nexport const editorInputClassNames: SlotClassNames<EditorInputSlots> = {\n root: 'fai-EditorInput',\n input: 'fai-EditorInput__input',\n placeholderValue: 'fai-EditorInput__placeholderValue',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'inline-grid',\n whiteSpace: 'pre-wrap',\n});\n\nexport const useLexicalStyles = makeStyles({\n paragraph: {\n margin: 0,\n },\n});\n\nexport const usePlaceholderClassName = makeResetStyles({\n zIndex: 0,\n gridArea: '1 / 1 / 1 / 1',\n\n color: tokens.colorNeutralForeground4,\n ...typographyStyles.body1,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n});\n\nexport const useInputClassName = makeResetStyles({\n gridArea: '1 / 1 / 1 / 1',\n zIndex: 1,\n width: '100%',\n});\n\nconst useStyles = makeStyles({\n placeholderDisabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n});\n/**\n * Apply styling to the EditorInput slots based on the state\n */\nexport const useEditorInputStyles_unstable = (state: EditorInputState): EditorInputState => {\n 'use no memo';\n\n const { disabled } = state;\n const placeholderClassName = usePlaceholderClassName();\n const rootClassName = useRootClassName();\n const inputClassName = useInputClassName();\n const styles = useStyles();\n\n state.root.className = mergeClasses(editorInputClassNames.root, rootClassName, state.root.className);\n\n state.input.className = mergeClasses(editorInputClassNames.input, inputClassName, state.input.className);\n\n state.lexicalInitialConfig = {\n ...state.lexicalInitialConfig,\n theme: { ...useLexicalStyles(), ...state.lexicalInitialConfig.theme },\n };\n\n if (state.placeholderValue) {\n state.placeholderValue.className = mergeClasses(\n editorInputClassNames.placeholderValue,\n placeholderClassName,\n disabled && styles.placeholderDisabled,\n state.placeholderValue.className,\n );\n }\n\n return state;\n};\n"],"names":["editorInputClassNames","useEditorInputStyles_unstable","gridArea","whiteSpace","color","root","input","placeholderValue","display","__resetStyles","__styles","paragraph","jrapky","margin","B6of3ja","B74szlk","s","zIndex","sj55zd","disabled","rootClassName","state","placeholderClassName","useStyles","useRootClassName","useInputClassName","lexicalInitialConfig","className","theme","mergeClasses","inputClassName","useLexicalStyles","styles","placehol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AAA;YAEA,GAAIV,MAAMd,oBAAkB,CAAAqB,KAAA;;;QAS5BP,MAAOA,gBAAAA,EAAAA;QACPA,MAAAd,gBAAA,CAAAoB,SAAA,GAAAE,IAAAA,6BAAA,EAAA7B,sBAAAO,gBAAA,EAAAe,sBAAAH,YAAAa,OAAAC,mBAAA,EAAAZ,MAAAd,gBAAA,CAAAoB,SAAA"}
1
+ {"version":3,"sources":["useEditorInputStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport type { EditorInputSlots, EditorInputState } from './EditorInput.types';\n\nexport const editorInputClassNames: SlotClassNames<EditorInputSlots> = {\n root: 'fai-EditorInput',\n input: 'fai-EditorInput__input',\n placeholderValue: 'fai-EditorInput__placeholderValue',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootClassName = makeResetStyles({\n display: 'inline-grid',\n whiteSpace: 'pre-wrap',\n});\n\nexport const useLexicalStyles = makeStyles({\n paragraph: {\n margin: 0,\n textAlign: 'start',\n },\n});\n\nexport const usePlaceholderClassName = makeResetStyles({\n zIndex: 0,\n gridArea: '1 / 1 / 1 / 1',\n\n color: tokens.colorNeutralForeground4,\n ...typographyStyles.body1,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n});\n\nexport const useInputClassName = makeResetStyles({\n gridArea: '1 / 1 / 1 / 1',\n zIndex: 1,\n width: '100%',\n});\n\nconst useStyles = makeStyles({\n placeholderDisabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n});\n/**\n * Apply styling to the EditorInput slots based on the state\n */\nexport const useEditorInputStyles_unstable = (state: EditorInputState): EditorInputState => {\n 'use no memo';\n\n const { disabled } = state;\n const placeholderClassName = usePlaceholderClassName();\n const rootClassName = useRootClassName();\n const inputClassName = useInputClassName();\n const styles = useStyles();\n\n state.root.className = mergeClasses(editorInputClassNames.root, rootClassName, state.root.className);\n\n state.input.className = mergeClasses(editorInputClassNames.input, inputClassName, state.input.className);\n\n state.lexicalInitialConfig = {\n ...state.lexicalInitialConfig,\n theme: { ...useLexicalStyles(), ...state.lexicalInitialConfig.theme },\n };\n\n if (state.placeholderValue) {\n state.placeholderValue.className = mergeClasses(\n editorInputClassNames.placeholderValue,\n placeholderClassName,\n disabled && styles.placeholderDisabled,\n state.placeholderValue.className,\n );\n }\n\n return state;\n};\n"],"names":["editorInputClassNames","useEditorInputStyles_unstable","gridArea","whiteSpace","color","root","input","placeholderValue","display","__resetStyles","__styles","paragraph","jrapky","margin","textAlign","B74szlk","fsow6f","s","zIndex","sj55zd","disabled","rootClassName","state","placeholderClassName","useStyles","useRootClassName","useInputClassName","lexicalInitialConfig","className","theme","mergeClasses","inputClassName","useLexicalStyles","styles","placeholderDisabled"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,qBAAAA;eAAAA;;IA+CNC,6BAAMA;eAANA;;IAbLC,iBAAU;eAAVA;;IAvBAC,gBAAY;eAAZA;;IAkBEC,uBAAO;eAAPA;;;iCAjCwE;AAIrE,MAAMJ,wBAA0D;UACrEK;WACAC;sBACAC;AACF;AAEA;;CAEC,SAECC,mBAASC,IAAAA,8BAAA,EAAA,YAAA,MAAA;IAAA;CAAA;AACTN,MAAAA,mBAAYO,IAAAA,yBAAA,EAAA;IACdC,WAAA;QAEAC,QAAO;QACLD,QAAAA;gBACEE;iBACAC;QACFC,SAAA;QACCC,QAAA;IAEH;;OAEEd;QAAAA;YAAAA;YAAU;gBAEVE,GAAAA,CAAAA;;SACA;QAAA;KAAyB;;MAGvBA,0BAAOK,IAAAA,8BAAA,EAAA,WAAA,MAAA;OACT;QAAA;KAAA;IACFQ,GAAG;QAAA;KAAA;AAEH;AACEf,MAAAA,oBAAUO,IAAAA,8BAAA,EAAA,YAAA,MAAA;IAAA;CAAA;MACVS,YAAQR,IAAAA,yBAAA,EAAA;yBACD;QACNS,QAAA;IAEH;;;;KAEgD;;AAMhD,MAAOlB,gCAAMA,CAAAA;;UAIX,EACAmB,QAAMC,KACNC;UACAC,uBAAeC;UAEfF,gBAAoBG;UAEpBH,iBAAqBI;UAErBJ,SAAMK;UACJtB,IAAGiB,CAAAA,SAAMK,GAAAA,IAAAA,6BAAoB,EAAA3B,sBAAAK,IAAA,EAAAgB,eAAAC,MAAAjB,IAAA,CAAAuB,SAAA;UAC7BC,KAAAA,CAAAA,SAAO,GAAAC,IAAAA,6BAAA,EAAA9B,sBAAAM,KAAA,EAAAyB,gBAAAT,MAAAhB,KAAA,CAAAsB,SAAA;8BAAKI,GAAAA;iBAAoBL,oBAASA;eAA2B;YACtE,GAAAK,kBAAA;YAEA,GAAIV,MAAMf,oBAAkB,CAAAsB,KAAA;;;QAS5BP,MAAOA,gBAAAA,EAAAA;QACPA,MAAAf,gBAAA,CAAAqB,SAAA,GAAAE,IAAAA,6BAAA,EAAA9B,sBAAAO,gBAAA,EAAAgB,sBAAAH,YAAAa,OAAAC,mBAAA,EAAAZ,MAAAf,gBAAA,CAAAqB,SAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-editor-input",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "a base rich editor input.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,9 +12,9 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui-copilot/chat-input-plugins": "^0.3.3",
16
- "@fluentui-copilot/react-chat-input-plugins": "^0.3.3",
17
- "@fluentui-copilot/react-text-editor": "^0.3.2",
15
+ "@fluentui-copilot/chat-input-plugins": "^0.4.0",
16
+ "@fluentui-copilot/react-chat-input-plugins": "^0.4.0",
17
+ "@fluentui-copilot/react-text-editor": "^0.4.0",
18
18
  "@swc/helpers": "^0.5.1"
19
19
  },
20
20
  "peerDependencies": {