meno-core 1.0.43 → 1.0.45

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 (59) hide show
  1. package/dist/bin/cli.js +1 -1
  2. package/dist/build-static.js +8 -8
  3. package/dist/chunks/{chunk-KPNSCQNA.js → chunk-5ZASE4IG.js} +53 -10
  4. package/dist/chunks/chunk-5ZASE4IG.js.map +7 -0
  5. package/dist/chunks/{chunk-5RFOQU7L.js → chunk-BZQKEJQY.js} +11 -23
  6. package/dist/chunks/chunk-BZQKEJQY.js.map +7 -0
  7. package/dist/chunks/{chunk-OLNQMCSR.js → chunk-F7MA62WG.js} +3 -3
  8. package/dist/chunks/{chunk-2NBGG2LJ.js → chunk-GYF3ABI3.js} +87 -2
  9. package/dist/chunks/{chunk-2NBGG2LJ.js.map → chunk-GYF3ABI3.js.map} +2 -2
  10. package/dist/chunks/{chunk-46AVQA4V.js → chunk-IF3RATBY.js} +2 -2
  11. package/dist/chunks/{chunk-S2HXJTAF.js → chunk-KITQJYZV.js} +5 -1
  12. package/dist/chunks/chunk-KITQJYZV.js.map +7 -0
  13. package/dist/chunks/{chunk-BXB6AX76.js → chunk-NZTSJS5C.js} +6 -3
  14. package/dist/chunks/chunk-NZTSJS5C.js.map +7 -0
  15. package/dist/chunks/{chunk-U5BZ6DDD.js → chunk-OUNJ76QM.js} +5 -5
  16. package/dist/chunks/{chunk-JPOTVYM3.js → chunk-TVH3TC2T.js} +8 -8
  17. package/dist/chunks/{chunk-YEJVSNVF.js → chunk-WQSG5WHC.js} +13 -2
  18. package/dist/chunks/chunk-WQSG5WHC.js.map +7 -0
  19. package/dist/chunks/{chunk-X5SH4HXS.js → chunk-XSWR3QLI.js} +33 -1
  20. package/dist/chunks/chunk-XSWR3QLI.js.map +7 -0
  21. package/dist/chunks/{configService-KYO3TXDS.js → configService-6KTT6GRT.js} +3 -3
  22. package/dist/chunks/{constants-34NUGHQR.js → constants-L5IKLB6U.js} +2 -2
  23. package/dist/entries/server-router.js +9 -9
  24. package/dist/lib/client/index.js +5 -5
  25. package/dist/lib/server/index.js +10 -10
  26. package/dist/lib/shared/index.js +10 -6
  27. package/dist/lib/shared/index.js.map +1 -1
  28. package/dist/lib/test-utils/index.js +1 -1
  29. package/lib/server/services/configService.ts +13 -0
  30. package/lib/server/ssr/htmlGenerator.ts +4 -1
  31. package/lib/server/ssr/ssrRenderer.test.ts +8 -7
  32. package/lib/server/ssr/ssrRenderer.ts +4 -21
  33. package/lib/shared/constants.ts +8 -2
  34. package/lib/shared/cssGeneration.ts +11 -0
  35. package/lib/shared/cssProperties.ts +97 -2
  36. package/lib/shared/nodeUtils.ts +28 -0
  37. package/lib/shared/responsiveScaling.test.ts +20 -3
  38. package/lib/shared/responsiveScaling.ts +55 -1
  39. package/lib/shared/responsiveStyleUtils.test.ts +7 -8
  40. package/lib/shared/responsiveStyleUtils.ts +6 -7
  41. package/lib/shared/types/components.ts +1 -1
  42. package/lib/shared/types/variables.test.ts +9 -2
  43. package/lib/shared/types/variables.ts +5 -1
  44. package/lib/shared/utilityClassMapper.ts +14 -1
  45. package/lib/shared/validation/propValidator.ts +6 -0
  46. package/lib/shared/validation/schemas.ts +2 -2
  47. package/package.json +1 -1
  48. package/dist/chunks/chunk-5RFOQU7L.js.map +0 -7
  49. package/dist/chunks/chunk-BXB6AX76.js.map +0 -7
  50. package/dist/chunks/chunk-KPNSCQNA.js.map +0 -7
  51. package/dist/chunks/chunk-S2HXJTAF.js.map +0 -7
  52. package/dist/chunks/chunk-X5SH4HXS.js.map +0 -7
  53. package/dist/chunks/chunk-YEJVSNVF.js.map +0 -7
  54. /package/dist/chunks/{chunk-OLNQMCSR.js.map → chunk-F7MA62WG.js.map} +0 -0
  55. /package/dist/chunks/{chunk-46AVQA4V.js.map → chunk-IF3RATBY.js.map} +0 -0
  56. /package/dist/chunks/{chunk-U5BZ6DDD.js.map → chunk-OUNJ76QM.js.map} +0 -0
  57. /package/dist/chunks/{chunk-JPOTVYM3.js.map → chunk-TVH3TC2T.js.map} +0 -0
  58. /package/dist/chunks/{configService-KYO3TXDS.js.map → configService-6KTT6GRT.js.map} +0 -0
  59. /package/dist/chunks/{constants-34NUGHQR.js.map → constants-L5IKLB6U.js.map} +0 -0
package/dist/bin/cli.js CHANGED
@@ -82,7 +82,7 @@ function getMatchingHeaders(pathname, headersMap) {
82
82
  return result;
83
83
  }
84
84
  async function startStaticServer(distPath) {
85
- const { SERVE_PORT } = await import("../chunks/constants-34NUGHQR.js");
85
+ const { SERVE_PORT } = await import("../chunks/constants-L5IKLB6U.js");
86
86
  const headersMap = parseHeadersFile(distPath);
87
87
  const server = await createRuntimeServer({
88
88
  port: SERVE_PORT,
@@ -9,17 +9,17 @@ import {
9
9
  hashContent,
10
10
  injectTrackingScript,
11
11
  isCMSPage
12
- } from "./chunks/chunk-U5BZ6DDD.js";
13
- import "./chunks/chunk-5RFOQU7L.js";
14
- import "./chunks/chunk-YEJVSNVF.js";
12
+ } from "./chunks/chunk-OUNJ76QM.js";
13
+ import "./chunks/chunk-BZQKEJQY.js";
14
+ import "./chunks/chunk-WQSG5WHC.js";
15
15
  import "./chunks/chunk-5Z5VQRTJ.js";
16
16
  import "./chunks/chunk-WQFG7PAH.js";
17
- import "./chunks/chunk-S2HXJTAF.js";
18
- import "./chunks/chunk-OLNQMCSR.js";
19
- import "./chunks/chunk-KPNSCQNA.js";
20
- import "./chunks/chunk-X5SH4HXS.js";
17
+ import "./chunks/chunk-KITQJYZV.js";
18
+ import "./chunks/chunk-F7MA62WG.js";
19
+ import "./chunks/chunk-5ZASE4IG.js";
20
+ import "./chunks/chunk-XSWR3QLI.js";
21
21
  import "./chunks/chunk-UB44F4Z2.js";
22
- import "./chunks/chunk-BXB6AX76.js";
22
+ import "./chunks/chunk-NZTSJS5C.js";
23
23
  import "./chunks/chunk-KSBZ2L7C.js";
24
24
  export {
25
25
  buildCMSItemPath,
@@ -10,7 +10,7 @@ import {
10
10
  resolveI18nValue,
11
11
  scalePropertyValue,
12
12
  shouldConvertProperty
13
- } from "./chunk-X5SH4HXS.js";
13
+ } from "./chunk-XSWR3QLI.js";
14
14
  import {
15
15
  isTiptapDocument,
16
16
  tiptapToHtml
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  NODE_TYPE,
20
20
  init_constants
21
- } from "./chunk-BXB6AX76.js";
21
+ } from "./chunk-NZTSJS5C.js";
22
22
  import {
23
23
  __esm,
24
24
  __export,
@@ -32,8 +32,8 @@ var init_schemas = __esm({
32
32
  "lib/shared/validation/schemas.ts"() {
33
33
  "use strict";
34
34
  init_constants();
35
- BasePropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text"]);
36
- PropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "list"]);
35
+ BasePropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "embed"]);
36
+ PropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "embed", "list"]);
37
37
  BasePropDefinitionSchema = z.object({
38
38
  type: BasePropTypeSchema,
39
39
  default: z.union([z.string(), z.number(), z.boolean(), z.object({ href: z.string(), target: z.string().optional() })]).optional(),
@@ -2278,10 +2278,9 @@ function mergeResponsiveStyles(responsiveStyle, strategy = "all", viewportWidth,
2278
2278
  return merged;
2279
2279
  }
2280
2280
  const breakpointEntries = Object.entries(breakpointValues);
2281
- breakpointEntries.sort((a, b) => a[1] - b[1]);
2282
- const activeBreakpointValue = breakpointValues[activeBreakpoint];
2281
+ breakpointEntries.sort((a, b) => b[1] - a[1]);
2283
2282
  for (const [name, value] of breakpointEntries) {
2284
- if (value <= activeBreakpointValue && responsiveStyle[name]) {
2283
+ if (viewportWidth <= value && responsiveStyle[name]) {
2285
2284
  Object.assign(merged, responsiveStyle[name]);
2286
2285
  }
2287
2286
  }
@@ -2397,6 +2396,25 @@ function isLikelyComponentTag(tag) {
2397
2396
  function isSlotMarker(node) {
2398
2397
  return node?.type === NODE_TYPE.SLOT;
2399
2398
  }
2399
+ function componentHasSlot(def) {
2400
+ const structure = def?.component?.structure;
2401
+ if (!structure) return false;
2402
+ return structureContainsSlot(structure);
2403
+ }
2404
+ function structureContainsSlot(node) {
2405
+ if (node == null) return false;
2406
+ if (Array.isArray(node)) {
2407
+ for (const item of node) {
2408
+ if (structureContainsSlot(item)) return true;
2409
+ }
2410
+ return false;
2411
+ }
2412
+ if (typeof node !== "object") return false;
2413
+ const obj = node;
2414
+ if (obj.type === NODE_TYPE.SLOT) return true;
2415
+ if (obj.children !== void 0) return structureContainsSlot(obj.children);
2416
+ return false;
2417
+ }
2400
2418
  function isEmbedNode(node) {
2401
2419
  return node?.type === NODE_TYPE.EMBED;
2402
2420
  }
@@ -2601,6 +2619,10 @@ function validateSingleProp(propName, propDef, value) {
2601
2619
  coercedValue = value;
2602
2620
  typeValid = typeof value === "string";
2603
2621
  break;
2622
+ case "embed":
2623
+ coercedValue = value;
2624
+ typeValid = typeof value === "string";
2625
+ break;
2604
2626
  case "list":
2605
2627
  coercedValue = value;
2606
2628
  typeValid = Array.isArray(value) || isI18nValue(value);
@@ -3242,7 +3264,16 @@ function propertyValueToClass(prop, value) {
3242
3264
  registerDynamicStyle(className2, cssProperty, value);
3243
3265
  return className2;
3244
3266
  }
3245
- const stringValue = String(value);
3267
+ let stringValue = String(value);
3268
+ if (prop === "fontFamily") {
3269
+ stringValue = stringValue.split(",").map((font) => {
3270
+ const trimmed = font.trim();
3271
+ if (trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'")) {
3272
+ return trimmed.slice(1, -1);
3273
+ }
3274
+ return trimmed;
3275
+ }).join(", ");
3276
+ }
3246
3277
  let className = null;
3247
3278
  if (specialValueMappings[prop]) {
3248
3279
  const mapping = specialValueMappings[prop];
@@ -3837,7 +3868,18 @@ var AUTO_RESPONSIVE_TYPE_MAP = {
3837
3868
  "font-size": "fontSize",
3838
3869
  "gap": "gap",
3839
3870
  "row-gap": "gap",
3840
- "column-gap": "gap"
3871
+ "column-gap": "gap",
3872
+ "border-radius": "borderRadius",
3873
+ "border-top-left-radius": "borderRadius",
3874
+ "border-top-right-radius": "borderRadius",
3875
+ "border-bottom-left-radius": "borderRadius",
3876
+ "border-bottom-right-radius": "borderRadius",
3877
+ "width": "size",
3878
+ "height": "size",
3879
+ "max-width": "size",
3880
+ "max-height": "size",
3881
+ "min-width": "size",
3882
+ "min-height": "size"
3841
3883
  };
3842
3884
  function escapeCSSClassName(className) {
3843
3885
  return className.replace(/[.#[\](){};<>+~:,%\/\s]/g, "\\$&");
@@ -4468,6 +4510,7 @@ export {
4468
4510
  extractNodeProperties,
4469
4511
  isLikelyComponentTag,
4470
4512
  isSlotMarker,
4513
+ componentHasSlot,
4471
4514
  isEmbedNode,
4472
4515
  isLinkNode,
4473
4516
  isLocaleListNode,
@@ -4544,4 +4587,4 @@ export {
4544
4587
  generateInteractiveCSS,
4545
4588
  generateAllInteractiveCSS
4546
4589
  };
4547
- //# sourceMappingURL=chunk-KPNSCQNA.js.map
4590
+ //# sourceMappingURL=chunk-5ZASE4IG.js.map