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.
Files changed (52) hide show
  1. package/dist/bin/cli.js +1 -1
  2. package/dist/chunks/{chunk-XTKNX4FW.js → chunk-AMNAKQAI.js} +25 -11
  3. package/dist/chunks/{chunk-XTKNX4FW.js.map → chunk-AMNAKQAI.js.map} +2 -2
  4. package/dist/chunks/{chunk-YMBUSHII.js → chunk-CG3O7H5V.js} +9 -4
  5. package/dist/chunks/chunk-CG3O7H5V.js.map +7 -0
  6. package/dist/chunks/{chunk-4ZRU52J2.js → chunk-EJ6QOX7C.js} +14 -10
  7. package/dist/chunks/chunk-EJ6QOX7C.js.map +7 -0
  8. package/dist/chunks/{chunk-KX2LPIZZ.js → chunk-EKB7GGQK.js} +223 -38
  9. package/dist/chunks/chunk-EKB7GGQK.js.map +7 -0
  10. package/dist/chunks/{chunk-WOJS25K3.js → chunk-G6OXV2IV.js} +2 -2
  11. package/dist/lib/client/index.js +9 -5
  12. package/dist/lib/client/index.js.map +2 -2
  13. package/dist/lib/server/index.js +14 -5
  14. package/dist/lib/server/index.js.map +2 -2
  15. package/dist/lib/shared/index.js +18 -6
  16. package/dist/lib/shared/index.js.map +2 -2
  17. package/lib/client/core/ComponentBuilder.test.ts +40 -0
  18. package/lib/client/core/ComponentBuilder.ts +8 -1
  19. package/lib/server/routes/static.test.ts +67 -0
  20. package/lib/server/routes/static.ts +9 -1
  21. package/lib/server/ssr/htmlGenerator.ts +7 -0
  22. package/lib/server/ssr/ssrRenderer.test.ts +31 -0
  23. package/lib/server/ssr/ssrRenderer.ts +8 -1
  24. package/lib/shared/cssGeneration.test.ts +150 -9
  25. package/lib/shared/cssGeneration.ts +116 -31
  26. package/lib/shared/cssProperties.ts +40 -14
  27. package/lib/shared/i18n.test.ts +21 -0
  28. package/lib/shared/i18n.ts +24 -10
  29. package/lib/shared/nodeUtils.test.ts +22 -0
  30. package/lib/shared/nodeUtils.ts +39 -4
  31. package/lib/shared/permissions.test.ts +46 -6
  32. package/lib/shared/permissions.ts +14 -2
  33. package/lib/shared/pxToRem.ts +2 -0
  34. package/lib/shared/responsiveScaling.test.ts +19 -0
  35. package/lib/shared/responsiveScaling.ts +8 -3
  36. package/lib/shared/styleUtils.ts +53 -0
  37. package/lib/shared/tailwindThemeScale.ts +91 -0
  38. package/lib/shared/types/components.ts +45 -7
  39. package/lib/shared/types/index.ts +1 -0
  40. package/lib/shared/types/permissions.ts +27 -11
  41. package/lib/shared/utilityClassMapper.test.ts +105 -0
  42. package/lib/shared/utilityClassMapper.ts +43 -5
  43. package/lib/shared/utilityClassNames.ts +14 -1
  44. package/lib/shared/validation/propValidator.test.ts +47 -0
  45. package/lib/shared/validation/propValidator.ts +8 -0
  46. package/lib/shared/validation/schemas.test.ts +149 -16
  47. package/lib/shared/validation/schemas.ts +101 -5
  48. package/package.json +1 -1
  49. package/dist/chunks/chunk-4ZRU52J2.js.map +0 -7
  50. package/dist/chunks/chunk-KX2LPIZZ.js.map +0 -7
  51. package/dist/chunks/chunk-YMBUSHII.js.map +0 -7
  52. /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-KX2LPIZZ.js";
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-WOJS25K3.js.map
840
+ //# sourceMappingURL=chunk-G6OXV2IV.js.map
@@ -15,10 +15,10 @@ import {
15
15
  resolveLinkMapping,
16
16
  resolveStyleMapping,
17
17
  skipEmptyTemplateAttributes
18
- } from "../../chunks/chunk-WOJS25K3.js";
18
+ } from "../../chunks/chunk-G6OXV2IV.js";
19
19
  import {
20
20
  filterCSSProperties
21
- } from "../../chunks/chunk-XTKNX4FW.js";
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-KX2LPIZZ.js";
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-4ZRU52J2.js";
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];