app-studio 0.2.7 → 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.
@@ -408,10 +408,7 @@ const ThemeProvider = _ref => {
408
408
  children
409
409
  } = _ref;
410
410
  // Fusion profonde des thèmes par défaut avec ceux fournis
411
- const mergedTheme = deepMerge({
412
- main: defaultThemeMain,
413
- components: {}
414
- }, theme);
411
+ const mergedTheme = deepMerge(defaultThemeMain, theme);
415
412
  // Fusion profonde des couleurs par défaut avec celles fournies
416
413
  const mergedColors = deepMerge({
417
414
  main: defaultColors,
@@ -423,6 +420,9 @@ const ThemeProvider = _ref => {
423
420
  * @param name - Le nom de la couleur à récupérer.
424
421
  * @returns La valeur de couleur résolue ou le nom original si non trouvé.
425
422
  */
423
+ console.log({
424
+ mergedTheme
425
+ });
426
426
  const getColor = name => {
427
427
  if (name === 'transparent') return name;
428
428
  try {
@@ -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 = (props, getColor, mediaQueries, devices) => {
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
- const value = props[property];
873
- if (typeof value === 'object' && value !== null) {
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 = applyStyle(nestedProps, getColor, mediaQueries, devices);
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, getColor, mediaQueries, devices, depth,
882
+ const applyStyle = function (props, mediaQueries, devices, depth,
897
883
  // Add a depth parameter
898
884
  maxDepth // Set a maximum depth
899
885
  ) {
@@ -975,7 +961,7 @@ maxDepth // Set a maximum depth
975
961
  if (!styleProps[`&:${event}`]) {
976
962
  styleProps[`&:${event}`] = {};
977
963
  }
978
- const nestedResult = computeStyleProps(value[event], getColor, mediaQueries, devices);
964
+ const nestedResult = computeStyleProps(value[event]);
979
965
  Object.assign(styleProps[`&:${event}`], nestedResult.styleProps);
980
966
  keyframesList.push(...(nestedResult.keyframes || []));
981
967
  }
@@ -987,7 +973,7 @@ maxDepth // Set a maximum depth
987
973
  if (!styleProps[mediaQuery]) {
988
974
  styleProps[mediaQuery] = {};
989
975
  }
990
- const nestedResult = computeStyleProps(mediaValue, getColor, mediaQueries, devices);
976
+ const nestedResult = computeStyleProps(mediaValue);
991
977
  Object.assign(styleProps[mediaQuery], nestedResult.styleProps);
992
978
  keyframesList.push(...(nestedResult.keyframes || []));
993
979
  } else if (devices[screenOrDevices]) {
@@ -998,7 +984,7 @@ maxDepth // Set a maximum depth
998
984
  if (!styleProps[mediaQuery]) {
999
985
  styleProps[mediaQuery] = {};
1000
986
  }
1001
- const nestedResult = computeStyleProps(mediaValue, getColor, mediaQueries, devices);
987
+ const nestedResult = computeStyleProps(mediaValue);
1002
988
  Object.assign(styleProps[mediaQuery], nestedResult.styleProps);
1003
989
  keyframesList.push(...(nestedResult.keyframes || []));
1004
990
  }
@@ -1013,7 +999,7 @@ maxDepth // Set a maximum depth
1013
999
  media,
1014
1000
  ...nestedProps
1015
1001
  } = value;
1016
- const nestedResult = computeStyleProps(nestedProps, getColor, mediaQueries, devices);
1002
+ const nestedResult = computeStyleProps(nestedProps);
1017
1003
  styleProps[property] = nestedResult.styleProps;
1018
1004
  keyframesList.push(...(nestedResult.keyframes || []));
1019
1005
  }
@@ -1032,7 +1018,7 @@ const getStyledProps = (props, getColor, mediaQueries, devices) => {
1032
1018
  const {
1033
1019
  styleProps,
1034
1020
  keyframes
1035
- } = applyStyle(props, getColor, mediaQueries, devices);
1021
+ } = applyStyle(props, mediaQueries, devices);
1036
1022
  const className = generateClassName(styleProps);
1037
1023
  let cssRules = [];
1038
1024
  if (cssRulesCache.has(className)) {