@fluentui-copilot/react-editor-input 0.0.0-nightly-20251002-0405-17b34fb7.1 → 0.0.0-nightly-20251010-0406-7df7c6d1.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.
- package/CHANGELOG.json +3 -3
- package/CHANGELOG.md +4 -4
- package/package.json +9 -9
- package/dist/index.d.ts +0 -165
- package/lib/AnimatedPlaceholder.js +0 -1
- package/lib/AnimatedPlaceholder.js.map +0 -1
- package/lib/EditorInput.js +0 -1
- package/lib/EditorInput.js.map +0 -1
- package/lib/components/AnimatedPlaceholder/AnimatedPlaceholder.js +0 -10
- package/lib/components/AnimatedPlaceholder/AnimatedPlaceholder.js.map +0 -1
- package/lib/components/AnimatedPlaceholder/AnimatedPlaceholder.types.js +0 -3
- package/lib/components/AnimatedPlaceholder/AnimatedPlaceholder.types.js.map +0 -1
- package/lib/components/AnimatedPlaceholder/index.js +0 -4
- package/lib/components/AnimatedPlaceholder/index.js.map +0 -1
- package/lib/components/AnimatedPlaceholder/placeholderMotion.js +0 -46
- package/lib/components/AnimatedPlaceholder/placeholderMotion.js.map +0 -1
- package/lib/components/AnimatedPlaceholder/renderAnimatedPlaceholder.js +0 -12
- package/lib/components/AnimatedPlaceholder/renderAnimatedPlaceholder.js.map +0 -1
- package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholder.js +0 -54
- package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholder.js.map +0 -1
- package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.js +0 -23
- package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.js.map +0 -1
- package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.raw.js +0 -21
- package/lib/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.raw.js.map +0 -1
- package/lib/components/EditorInput/EditorInput.js +0 -11
- package/lib/components/EditorInput/EditorInput.js.map +0 -1
- package/lib/components/EditorInput/EditorInput.types.js +0 -3
- package/lib/components/EditorInput/EditorInput.types.js.map +0 -1
- package/lib/components/EditorInput/index.js +0 -4
- package/lib/components/EditorInput/index.js.map +0 -1
- package/lib/components/EditorInput/renderEditorInput.js +0 -35
- package/lib/components/EditorInput/renderEditorInput.js.map +0 -1
- package/lib/components/EditorInput/useEditorInput.js +0 -159
- package/lib/components/EditorInput/useEditorInput.js.map +0 -1
- package/lib/components/EditorInput/useEditorInputStyles.styles.js +0 -65
- package/lib/components/EditorInput/useEditorInputStyles.styles.js.map +0 -1
- package/lib/components/EditorInput/useEditorInputStyles.styles.raw.js +0 -61
- package/lib/components/EditorInput/useEditorInputStyles.styles.raw.js.map +0 -1
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
- package/lib-commonjs/AnimatedPlaceholder.js +0 -28
- package/lib-commonjs/AnimatedPlaceholder.js.map +0 -1
- package/lib-commonjs/EditorInput.js +0 -37
- package/lib-commonjs/EditorInput.js.map +0 -1
- package/lib-commonjs/components/AnimatedPlaceholder/AnimatedPlaceholder.js +0 -21
- package/lib-commonjs/components/AnimatedPlaceholder/AnimatedPlaceholder.js.map +0 -1
- package/lib-commonjs/components/AnimatedPlaceholder/AnimatedPlaceholder.types.js +0 -6
- package/lib-commonjs/components/AnimatedPlaceholder/AnimatedPlaceholder.types.js.map +0 -1
- package/lib-commonjs/components/AnimatedPlaceholder/index.js +0 -31
- package/lib-commonjs/components/AnimatedPlaceholder/index.js.map +0 -1
- package/lib-commonjs/components/AnimatedPlaceholder/placeholderMotion.js +0 -56
- package/lib-commonjs/components/AnimatedPlaceholder/placeholderMotion.js.map +0 -1
- package/lib-commonjs/components/AnimatedPlaceholder/renderAnimatedPlaceholder.js +0 -20
- package/lib-commonjs/components/AnimatedPlaceholder/renderAnimatedPlaceholder.js.map +0 -1
- package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholder.js +0 -57
- package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholder.js.map +0 -1
- package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.js +0 -37
- package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.raw.js +0 -37
- package/lib-commonjs/components/AnimatedPlaceholder/useAnimatedPlaceholderStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/EditorInput/EditorInput.js +0 -21
- package/lib-commonjs/components/EditorInput/EditorInput.js.map +0 -1
- package/lib-commonjs/components/EditorInput/EditorInput.types.js +0 -6
- package/lib-commonjs/components/EditorInput/EditorInput.types.js.map +0 -1
- package/lib-commonjs/components/EditorInput/index.js +0 -40
- package/lib-commonjs/components/EditorInput/index.js.map +0 -1
- package/lib-commonjs/components/EditorInput/renderEditorInput.js +0 -43
- package/lib-commonjs/components/EditorInput/renderEditorInput.js.map +0 -1
- package/lib-commonjs/components/EditorInput/useEditorInput.js +0 -159
- package/lib-commonjs/components/EditorInput/useEditorInput.js.map +0 -1
- package/lib-commonjs/components/EditorInput/useEditorInputStyles.styles.js +0 -99
- package/lib-commonjs/components/EditorInput/useEditorInputStyles.styles.js.map +0 -1
- package/lib-commonjs/components/EditorInput/useEditorInputStyles.styles.raw.js +0 -86
- package/lib-commonjs/components/EditorInput/useEditorInputStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/index.js +0 -44
- package/lib-commonjs/index.js.map +0 -1
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
editorInputClassNames: function() {
|
|
13
|
-
return editorInputClassNames;
|
|
14
|
-
},
|
|
15
|
-
useEditorInputStyles_unstable: function() {
|
|
16
|
-
return useEditorInputStyles_unstable;
|
|
17
|
-
},
|
|
18
|
-
useInputClassName: function() {
|
|
19
|
-
return useInputClassName;
|
|
20
|
-
},
|
|
21
|
-
useLexicalStyles: function() {
|
|
22
|
-
return useLexicalStyles;
|
|
23
|
-
},
|
|
24
|
-
usePlaceholderClassName: function() {
|
|
25
|
-
return usePlaceholderClassName;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
29
|
-
const _tokens = require("@fluentui-copilot/tokens");
|
|
30
|
-
const editorInputClassNames = {
|
|
31
|
-
root: 'fai-EditorInput',
|
|
32
|
-
input: 'fai-EditorInput__input',
|
|
33
|
-
placeholderValue: 'fai-EditorInput__placeholderValue'
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Styles for the root slot
|
|
37
|
-
*/ const useRootClassName = (0, _reactcomponents.makeResetStyles)({
|
|
38
|
-
display: 'inline-grid',
|
|
39
|
-
whiteSpace: 'pre-wrap'
|
|
40
|
-
});
|
|
41
|
-
const useLexicalStyles = (0, _reactcomponents.makeStyles)({
|
|
42
|
-
paragraph: {
|
|
43
|
-
margin: 0,
|
|
44
|
-
textAlign: 'start'
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
const usePlaceholderClassName = (0, _reactcomponents.makeResetStyles)({
|
|
48
|
-
zIndex: 0,
|
|
49
|
-
gridArea: '1 / 1 / 1 / 1',
|
|
50
|
-
color: _tokens.tokens.colorNeutralForeground4,
|
|
51
|
-
..._tokens.typographyStyles.body1,
|
|
52
|
-
'@media (forced-colors: active)': {
|
|
53
|
-
color: 'GrayText'
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const useInputClassName = (0, _reactcomponents.makeResetStyles)({
|
|
57
|
-
gridArea: '1 / 1 / 1 / 1',
|
|
58
|
-
zIndex: 1,
|
|
59
|
-
width: '100%'
|
|
60
|
-
});
|
|
61
|
-
const useStyles = (0, _reactcomponents.makeStyles)({
|
|
62
|
-
placeholderDisabled: {
|
|
63
|
-
color: _tokens.tokens.colorNeutralForegroundDisabled
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
const useEditorInputStyles_unstable = (state)=>{
|
|
67
|
-
'use no memo';
|
|
68
|
-
const { disabled } = state;
|
|
69
|
-
const placeholderClassName = usePlaceholderClassName();
|
|
70
|
-
const rootClassName = useRootClassName();
|
|
71
|
-
const inputClassName = useInputClassName();
|
|
72
|
-
const styles = useStyles();
|
|
73
|
-
state.root.className = (0, _reactcomponents.mergeClasses)(editorInputClassNames.root, rootClassName, state.root.className);
|
|
74
|
-
state.input.className = (0, _reactcomponents.mergeClasses)(editorInputClassNames.input, inputClassName, state.input.className);
|
|
75
|
-
state.lexicalInitialConfig = {
|
|
76
|
-
...state.lexicalInitialConfig,
|
|
77
|
-
theme: {
|
|
78
|
-
...useLexicalStyles(),
|
|
79
|
-
...state.lexicalInitialConfig.theme
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
if (state.placeholderValue) {
|
|
83
|
-
state.placeholderValue.className = (0, _reactcomponents.mergeClasses)(editorInputClassNames.placeholderValue, placeholderClassName, disabled && styles.placeholderDisabled, state.placeholderValue.className);
|
|
84
|
-
}
|
|
85
|
-
return state;
|
|
86
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useEditorInputStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\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","useInputClassName","useLexicalStyles","usePlaceholderClassName","root","input","placeholderValue","useRootClassName","makeResetStyles","display","whiteSpace","makeStyles","paragraph","margin","textAlign","zIndex","gridArea","color","tokens","colorNeutralForeground4","typographyStyles","body1","width","useStyles","placeholderDisabled","colorNeutralForegroundDisabled","state","disabled","placeholderClassName","rootClassName","inputClassName","styles","className","mergeClasses","lexicalInitialConfig","theme"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;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AA,EAAalC,sBAAsBM,KAAK,EAAEyB,gBAAgBJ,MAAMrB,KAAK,CAAC2B,SAAS;IAEvGN,MAAMQ,oBAAoB,GAAG;QAC3B,GAAGR,MAAMQ,oBAAoB;QAC7BC,OAAO;YAAE,GAAGjC,kBAAkB;YAAE,GAAGwB,MAAMQ,oBAAoB,CAACC,KAAK;QAAC;IACtE;IAEA,IAAIT,MAAMpB,gBAAgB,EAAE;QAC1BoB,MAAMpB,gBAAgB,CAAC0B,SAAS,GAAGC,IAAAA,6BAAAA,EACjClC,sBAAsBO,gBAAgB,EACtCsB,sBACAD,YAAYI,OAAOP,mBAAmB,EACtCE,MAAMpB,gBAAgB,CAAC0B,SAAS;IAEpC;IAEA,OAAON;AACT"}
|
package/lib-commonjs/index.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
AnimatedPlaceholder: function() {
|
|
13
|
-
return _AnimatedPlaceholder.AnimatedPlaceholder;
|
|
14
|
-
},
|
|
15
|
-
EditorInput: function() {
|
|
16
|
-
return _EditorInput.EditorInput;
|
|
17
|
-
},
|
|
18
|
-
animatedPlaceholderClassNames: function() {
|
|
19
|
-
return _AnimatedPlaceholder.animatedPlaceholderClassNames;
|
|
20
|
-
},
|
|
21
|
-
editorInputClassNames: function() {
|
|
22
|
-
return _EditorInput.editorInputClassNames;
|
|
23
|
-
},
|
|
24
|
-
renderAnimatedPlaceholder_unstable: function() {
|
|
25
|
-
return _AnimatedPlaceholder.renderAnimatedPlaceholder_unstable;
|
|
26
|
-
},
|
|
27
|
-
renderEditorInput_unstable: function() {
|
|
28
|
-
return _EditorInput.renderEditorInput_unstable;
|
|
29
|
-
},
|
|
30
|
-
useAnimatedPlaceholderStyles_unstable: function() {
|
|
31
|
-
return _AnimatedPlaceholder.useAnimatedPlaceholderStyles_unstable;
|
|
32
|
-
},
|
|
33
|
-
useAnimatedPlaceholder_unstable: function() {
|
|
34
|
-
return _AnimatedPlaceholder.useAnimatedPlaceholder_unstable;
|
|
35
|
-
},
|
|
36
|
-
useEditorInputStyles_unstable: function() {
|
|
37
|
-
return _EditorInput.useEditorInputStyles_unstable;
|
|
38
|
-
},
|
|
39
|
-
useEditorInput_unstable: function() {
|
|
40
|
-
return _EditorInput.useEditorInput_unstable;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const _EditorInput = require("./EditorInput");
|
|
44
|
-
const _AnimatedPlaceholder = require("./AnimatedPlaceholder");
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|