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