meno-core 1.1.7 → 1.1.8
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/bin/cli.js +1 -1
- package/dist/chunks/{chunk-XTKNX4FW.js → chunk-AMNAKQAI.js} +25 -11
- package/dist/chunks/{chunk-XTKNX4FW.js.map → chunk-AMNAKQAI.js.map} +2 -2
- package/dist/chunks/{chunk-YMBUSHII.js → chunk-CG3O7H5V.js} +9 -4
- package/dist/chunks/chunk-CG3O7H5V.js.map +7 -0
- package/dist/chunks/{chunk-4ZRU52J2.js → chunk-EJ6QOX7C.js} +14 -10
- package/dist/chunks/chunk-EJ6QOX7C.js.map +7 -0
- package/dist/chunks/{chunk-KX2LPIZZ.js → chunk-EKB7GGQK.js} +223 -38
- package/dist/chunks/chunk-EKB7GGQK.js.map +7 -0
- package/dist/chunks/{chunk-WOJS25K3.js → chunk-G6OXV2IV.js} +2 -2
- package/dist/lib/client/index.js +9 -5
- package/dist/lib/client/index.js.map +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 +18 -6
- package/dist/lib/shared/index.js.map +2 -2
- package/lib/client/core/ComponentBuilder.test.ts +40 -0
- package/lib/client/core/ComponentBuilder.ts +8 -1
- package/lib/server/routes/static.test.ts +67 -0
- package/lib/server/routes/static.ts +9 -1
- package/lib/server/ssr/htmlGenerator.ts +7 -0
- package/lib/server/ssr/ssrRenderer.test.ts +31 -0
- package/lib/server/ssr/ssrRenderer.ts +8 -1
- package/lib/shared/cssGeneration.test.ts +150 -9
- package/lib/shared/cssGeneration.ts +116 -31
- package/lib/shared/cssProperties.ts +40 -14
- package/lib/shared/i18n.test.ts +21 -0
- package/lib/shared/i18n.ts +24 -10
- package/lib/shared/nodeUtils.test.ts +22 -0
- package/lib/shared/nodeUtils.ts +39 -4
- package/lib/shared/permissions.test.ts +46 -6
- package/lib/shared/permissions.ts +14 -2
- package/lib/shared/pxToRem.ts +2 -0
- package/lib/shared/responsiveScaling.test.ts +19 -0
- package/lib/shared/responsiveScaling.ts +8 -3
- package/lib/shared/styleUtils.ts +53 -0
- package/lib/shared/tailwindThemeScale.ts +91 -0
- package/lib/shared/types/components.ts +45 -7
- package/lib/shared/types/index.ts +1 -0
- package/lib/shared/types/permissions.ts +27 -11
- package/lib/shared/utilityClassMapper.test.ts +105 -0
- package/lib/shared/utilityClassMapper.ts +43 -5
- package/lib/shared/utilityClassNames.ts +14 -1
- package/lib/shared/validation/propValidator.test.ts +47 -0
- package/lib/shared/validation/propValidator.ts +8 -0
- package/lib/shared/validation/schemas.test.ts +149 -16
- package/lib/shared/validation/schemas.ts +101 -5
- package/package.json +1 -1
- package/dist/chunks/chunk-4ZRU52J2.js.map +0 -7
- package/dist/chunks/chunk-KX2LPIZZ.js.map +0 -7
- package/dist/chunks/chunk-YMBUSHII.js.map +0 -7
- /package/dist/chunks/{chunk-WOJS25K3.js.map → chunk-G6OXV2IV.js.map} +0 -0
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
normalizeStyle,
|
|
17
17
|
richTextMarkerToHtml,
|
|
18
18
|
safeEvaluate
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EKB7GGQK.js";
|
|
20
20
|
import {
|
|
21
21
|
NODE_TYPE,
|
|
22
22
|
RAW_HTML_PREFIX,
|
|
@@ -837,4 +837,4 @@ export {
|
|
|
837
837
|
skipEmptyTemplateAttributes,
|
|
838
838
|
inlineSvgStyleRules
|
|
839
839
|
};
|
|
840
|
-
//# sourceMappingURL=chunk-
|
|
840
|
+
//# sourceMappingURL=chunk-G6OXV2IV.js.map
|
package/dist/lib/client/index.js
CHANGED
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
resolveLinkMapping,
|
|
16
16
|
resolveStyleMapping,
|
|
17
17
|
skipEmptyTemplateAttributes
|
|
18
|
-
} from "../../chunks/chunk-
|
|
18
|
+
} from "../../chunks/chunk-G6OXV2IV.js";
|
|
19
19
|
import {
|
|
20
20
|
filterCSSProperties
|
|
21
|
-
} from "../../chunks/chunk-
|
|
21
|
+
} from "../../chunks/chunk-AMNAKQAI.js";
|
|
22
22
|
import {
|
|
23
23
|
BaseComponentRegistry,
|
|
24
24
|
DEFAULT_BREAKPOINTS,
|
|
@@ -67,6 +67,7 @@ import {
|
|
|
67
67
|
processItemPropsTemplate,
|
|
68
68
|
processItemTemplate,
|
|
69
69
|
resolveExtractedMappings,
|
|
70
|
+
resolveIfI18n,
|
|
70
71
|
resolveItemsTemplate,
|
|
71
72
|
resolvePropsFromDefinition,
|
|
72
73
|
responsiveStylesToClasses,
|
|
@@ -77,7 +78,7 @@ import {
|
|
|
77
78
|
stripClassOverriddenStyleProps,
|
|
78
79
|
toFriendlyError,
|
|
79
80
|
validatePageData
|
|
80
|
-
} from "../../chunks/chunk-
|
|
81
|
+
} from "../../chunks/chunk-EKB7GGQK.js";
|
|
81
82
|
import {
|
|
82
83
|
DEFAULT_I18N_CONFIG,
|
|
83
84
|
isI18nValue,
|
|
@@ -85,7 +86,7 @@ import {
|
|
|
85
86
|
parseLocaleFromPath,
|
|
86
87
|
resolveI18nValue,
|
|
87
88
|
setStoredLocale
|
|
88
|
-
} from "../../chunks/chunk-
|
|
89
|
+
} from "../../chunks/chunk-EJ6QOX7C.js";
|
|
89
90
|
import {
|
|
90
91
|
isTiptapDocument,
|
|
91
92
|
tiptapToHtml
|
|
@@ -2136,7 +2137,7 @@ var ComponentBuilder = class {
|
|
|
2136
2137
|
}
|
|
2137
2138
|
/**
|
|
2138
2139
|
* Evaluate the if condition on a node with full context.
|
|
2139
|
-
* Handles boolean, mapping, and string template values.
|
|
2140
|
+
* Handles boolean, localized (`_i18n`), mapping, and string template values.
|
|
2140
2141
|
* Returns true if node should be rendered, false if it should be skipped.
|
|
2141
2142
|
*/
|
|
2142
2143
|
evaluateIfCondition(node, ctx) {
|
|
@@ -2147,6 +2148,9 @@ var ComponentBuilder = class {
|
|
|
2147
2148
|
if (typeof ifValue === "boolean") {
|
|
2148
2149
|
return ifValue;
|
|
2149
2150
|
}
|
|
2151
|
+
if (isI18nValue(ifValue)) {
|
|
2152
|
+
return Boolean(resolveIfI18n(ifValue, ctx.cmsLocale || ctx.locale, ctx.i18nConfig));
|
|
2153
|
+
}
|
|
2150
2154
|
if (isBooleanMapping(ifValue)) {
|
|
2151
2155
|
const props = ctx.componentResolvedProps || {};
|
|
2152
2156
|
const propValue = props[ifValue.prop];
|