meno-core 1.1.0 → 1.1.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.
@@ -13,7 +13,7 @@ import {
13
13
  resolveLinkMapping,
14
14
  resolveStyleMapping,
15
15
  skipEmptyTemplateAttributes
16
- } from "../../chunks/chunk-NUP7H7D3.js";
16
+ } from "../../chunks/chunk-7ZLF4NE5.js";
17
17
  import {
18
18
  filterCSSProperties
19
19
  } from "../../chunks/chunk-XTKNX4FW.js";
@@ -72,7 +72,7 @@ import {
72
72
  sortClassesByPropertyOrder,
73
73
  toFriendlyError,
74
74
  validatePageData
75
- } from "../../chunks/chunk-2IIQK7T3.js";
75
+ } from "../../chunks/chunk-J4IPTP5X.js";
76
76
  import {
77
77
  DEFAULT_I18N_CONFIG,
78
78
  isI18nValue,
@@ -31,7 +31,7 @@ import {
31
31
  processStructure,
32
32
  resolveHtmlMapping,
33
33
  skipEmptyTemplateAttributes
34
- } from "../../chunks/chunk-NUP7H7D3.js";
34
+ } from "../../chunks/chunk-7ZLF4NE5.js";
35
35
  import {
36
36
  DEFAULT_BREAKPOINTS,
37
37
  DEFAULT_FLUID_RANGE,
@@ -90,7 +90,7 @@ import {
90
90
  validateCMSDraftItem,
91
91
  validateCMSItem,
92
92
  validateComponentDefinition
93
- } from "../../chunks/chunk-2IIQK7T3.js";
93
+ } from "../../chunks/chunk-J4IPTP5X.js";
94
94
  import {
95
95
  DEFAULT_I18N_CONFIG,
96
96
  buildLocalizedPath,
@@ -4237,7 +4237,8 @@ async function renderNode(node, ctx) {
4237
4237
  const nodeAttributesWithoutClass = { ...nodeAttributes };
4238
4238
  delete nodeAttributesWithoutClass.className;
4239
4239
  delete nodeAttributesWithoutClass.class;
4240
- const allClassNames = [elementClass, attrClassName, ...utilityClasses].filter(Boolean);
4240
+ const instanceClassName = typeof nodeProps.class === "string" ? nodeProps.class : "";
4241
+ const allClassNames = [elementClass, attrClassName, ...utilityClasses, instanceClassName].filter(Boolean);
4241
4242
  const mergedClassName = allClassNames.length > 0 ? allClassNames.join(" ") : "";
4242
4243
  const propsWithStyleAndAttrs = {
4243
4244
  ...nodeProps,
@@ -5043,17 +5044,25 @@ ${escapedJavaScript}
5043
5044
  const themeConfig = await colorService.loadThemeConfig();
5044
5045
  const themeColorVariablesCSS = generateThemeColorVariablesCSS(themeConfig);
5045
5046
  const componentCSS = rendered.componentCSS || "";
5046
- const usedUtilityClasses = extractUtilityClassesFromHTML(rendered.html);
5047
5047
  const breakpointConfig = await loadBreakpointConfig();
5048
5048
  const responsiveScalesConfig = configService.getResponsiveScales();
5049
5049
  const variablesConfig = await variableService.loadConfig();
5050
5050
  const variablesCSS = generateVariablesCSS(variablesConfig, breakpointConfig, responsiveScalesConfig);
5051
5051
  const remConversionConfig = configService.getRemConversion();
5052
+ const knownTokens = /* @__PURE__ */ new Set();
5053
+ for (const theme of Object.values(themeConfig.themes)) {
5054
+ for (const name of Object.keys(theme.colors)) knownTokens.add(name);
5055
+ }
5056
+ for (const variable of variablesConfig.variables) {
5057
+ if (variable.cssVar) knownTokens.add(variable.cssVar.replace(/^--/, ""));
5058
+ }
5059
+ const usedUtilityClasses = extractUtilityClassesFromHTML(rendered.html, knownTokens);
5052
5060
  const utilityCSS = generateUtilityCSS(
5053
5061
  usedUtilityClasses,
5054
5062
  breakpointConfig,
5055
5063
  responsiveScalesConfig,
5056
- remConversionConfig
5064
+ remConversionConfig,
5065
+ knownTokens
5057
5066
  );
5058
5067
  const interactiveCSS = rendered.interactiveStylesMap.size > 0 ? generateAllInteractiveCSS(
5059
5068
  rendered.interactiveStylesMap,