app-studio 0.2.8 → 0.2.10
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/dist/appstudio.cjs.development.js +5 -22
- package/dist/appstudio.cjs.development.js.map +1 -1
- package/dist/appstudio.cjs.production.min.js +1 -1
- package/dist/appstudio.cjs.production.min.js.map +1 -1
- package/dist/appstudio.esm.js +5 -22
- package/dist/appstudio.esm.js.map +1 -1
- package/dist/appstudio.umd.development.js +5 -22
- package/dist/appstudio.umd.development.js.map +1 -1
- package/dist/appstudio.umd.production.min.js +1 -1
- package/dist/appstudio.umd.production.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -810,7 +810,7 @@ const generateCssRules = (selector, styles, getColor, mediaQueries) => {
|
|
|
810
810
|
return rules;
|
|
811
811
|
};
|
|
812
812
|
// Function to apply styles to a component
|
|
813
|
-
const computeStyleProps =
|
|
813
|
+
const computeStyleProps = props => {
|
|
814
814
|
const styleProps = {};
|
|
815
815
|
const keyframesList = [];
|
|
816
816
|
// Gestion de la taille de l'élément
|
|
@@ -869,22 +869,8 @@ const computeStyleProps = (props, getColor, mediaQueries, devices) => {
|
|
|
869
869
|
}
|
|
870
870
|
Object.keys(props).forEach(property => {
|
|
871
871
|
if (property !== 'style' && (isStyleProp(property) || extraKeys.has(property))) {
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
// For other nested styles, exclude 'on' and 'media'
|
|
875
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
876
|
-
const {
|
|
877
|
-
on,
|
|
878
|
-
media,
|
|
879
|
-
...nestedProps
|
|
880
|
-
} = value;
|
|
881
|
-
const nestedResult = computeStyleProps(nestedProps);
|
|
882
|
-
styleProps[property] = nestedResult.styleProps;
|
|
883
|
-
keyframesList.push(...(nestedResult.keyframes || []));
|
|
884
|
-
} else {
|
|
885
|
-
// Simple style property
|
|
886
|
-
styleProps[property] = value;
|
|
887
|
-
}
|
|
872
|
+
// Simple style property
|
|
873
|
+
styleProps[property] = props[property];
|
|
888
874
|
}
|
|
889
875
|
});
|
|
890
876
|
return {
|
|
@@ -893,7 +879,7 @@ const computeStyleProps = (props, getColor, mediaQueries, devices) => {
|
|
|
893
879
|
};
|
|
894
880
|
};
|
|
895
881
|
// Function to apply styles to a component
|
|
896
|
-
const applyStyle = function (props,
|
|
882
|
+
const applyStyle = function (props, mediaQueries, devices, depth,
|
|
897
883
|
// Add a depth parameter
|
|
898
884
|
maxDepth // Set a maximum depth
|
|
899
885
|
) {
|
|
@@ -1023,9 +1009,6 @@ maxDepth // Set a maximum depth
|
|
|
1023
1009
|
}
|
|
1024
1010
|
}
|
|
1025
1011
|
});
|
|
1026
|
-
console.log({
|
|
1027
|
-
styleProps
|
|
1028
|
-
});
|
|
1029
1012
|
return {
|
|
1030
1013
|
styleProps,
|
|
1031
1014
|
keyframes: keyframesList
|
|
@@ -1035,7 +1018,7 @@ const getStyledProps = (props, getColor, mediaQueries, devices) => {
|
|
|
1035
1018
|
const {
|
|
1036
1019
|
styleProps,
|
|
1037
1020
|
keyframes
|
|
1038
|
-
} = applyStyle(props,
|
|
1021
|
+
} = applyStyle(props, mediaQueries, devices);
|
|
1039
1022
|
const className = generateClassName(styleProps);
|
|
1040
1023
|
let cssRules = [];
|
|
1041
1024
|
if (cssRulesCache.has(className)) {
|