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.
- package/dist/chunks/{chunk-NUP7H7D3.js → chunk-7ZLF4NE5.js} +2 -2
- package/dist/chunks/{chunk-2IIQK7T3.js → chunk-J4IPTP5X.js} +393 -3
- package/dist/chunks/{chunk-2IIQK7T3.js.map → chunk-J4IPTP5X.js.map} +3 -3
- package/dist/lib/client/index.js +2 -2
- package/dist/lib/server/index.js +14 -5
- package/dist/lib/server/index.js.map +2 -2
- package/dist/lib/shared/index.js +5 -1
- package/dist/lib/shared/index.js.map +2 -2
- package/lib/server/ssr/htmlGenerator.ts +18 -2
- package/lib/server/ssr/ssrRenderer.test.ts +25 -0
- package/lib/server/ssr/ssrRenderer.ts +12 -2
- package/lib/shared/cssGeneration.test.ts +10 -0
- package/lib/shared/cssGeneration.ts +10 -8
- package/lib/shared/index.ts +6 -0
- package/lib/shared/interactiveStyles.test.ts +3 -1
- package/lib/shared/tailwindThemeScale.ts +256 -0
- package/lib/shared/utilityClassConfig.ts +116 -0
- package/lib/shared/utilityClassMapper.test.ts +148 -0
- package/lib/shared/utilityClassMapper.ts +33 -0
- package/lib/shared/utilityClassNames.ts +146 -0
- package/package.json +1 -1
- /package/dist/chunks/{chunk-NUP7H7D3.js.map → chunk-7ZLF4NE5.js.map} +0 -0
package/dist/lib/client/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveLinkMapping,
|
|
14
14
|
resolveStyleMapping,
|
|
15
15
|
skipEmptyTemplateAttributes
|
|
16
|
-
} from "../../chunks/chunk-
|
|
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-
|
|
75
|
+
} from "../../chunks/chunk-J4IPTP5X.js";
|
|
76
76
|
import {
|
|
77
77
|
DEFAULT_I18N_CONFIG,
|
|
78
78
|
isI18nValue,
|
package/dist/lib/server/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
processStructure,
|
|
32
32
|
resolveHtmlMapping,
|
|
33
33
|
skipEmptyTemplateAttributes
|
|
34
|
-
} from "../../chunks/chunk-
|
|
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-
|
|
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
|
|
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,
|