meno-core 1.0.39 → 1.0.41

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 (67) hide show
  1. package/bin/cli.ts +33 -0
  2. package/build-astro.ts +172 -69
  3. package/dist/bin/cli.js +30 -2
  4. package/dist/bin/cli.js.map +2 -2
  5. package/dist/build-static.js +7 -7
  6. package/dist/chunks/{chunk-WK5XLASY.js → chunk-EQOSDQS2.js} +4 -4
  7. package/dist/chunks/{chunk-AIXKUVNG.js → chunk-IBR2F4IL.js} +4 -5
  8. package/dist/chunks/{chunk-AIXKUVNG.js.map → chunk-IBR2F4IL.js.map} +2 -2
  9. package/dist/chunks/{chunk-NV25WXCA.js → chunk-IGVQF5GY.js} +11 -7
  10. package/dist/chunks/chunk-IGVQF5GY.js.map +7 -0
  11. package/dist/chunks/{chunk-KULPBDC7.js → chunk-LBWIHPN7.js} +9 -3
  12. package/dist/chunks/chunk-LBWIHPN7.js.map +7 -0
  13. package/dist/chunks/{chunk-A6KWUEA6.js → chunk-MKB2J6AD.js} +9 -1
  14. package/dist/chunks/chunk-MKB2J6AD.js.map +7 -0
  15. package/dist/chunks/{chunk-P3FX5HJM.js → chunk-S2HXJTAF.js} +1 -1
  16. package/dist/chunks/chunk-S2HXJTAF.js.map +7 -0
  17. package/dist/chunks/{chunk-W6HDII4T.js → chunk-SK3TLNUP.js} +140 -114
  18. package/dist/chunks/chunk-SK3TLNUP.js.map +7 -0
  19. package/dist/chunks/{chunk-HNAS6BSS.js → chunk-SNUROC7E.js} +56 -6
  20. package/dist/chunks/{chunk-HNAS6BSS.js.map → chunk-SNUROC7E.js.map} +3 -3
  21. package/dist/chunks/{configService-TXBNUBBL.js → configService-MICL4S2L.js} +2 -2
  22. package/dist/chunks/{constants-5CRJRQNR.js → constants-ZEU4TZCA.js} +2 -2
  23. package/dist/entries/server-router.js +7 -7
  24. package/dist/lib/client/index.js +11 -6
  25. package/dist/lib/client/index.js.map +2 -2
  26. package/dist/lib/server/index.js +507 -1587
  27. package/dist/lib/server/index.js.map +4 -4
  28. package/dist/lib/shared/index.js +3 -3
  29. package/dist/lib/test-utils/index.js +1 -1
  30. package/lib/client/core/ComponentBuilder.ts +1 -1
  31. package/lib/client/core/builders/embedBuilder.ts +2 -2
  32. package/lib/client/routing/Router.tsx +6 -0
  33. package/lib/client/templateEngine.test.ts +178 -0
  34. package/lib/client/templateEngine.ts +1 -2
  35. package/lib/server/astro/cmsPageEmitter.ts +420 -0
  36. package/lib/server/astro/componentEmitter.ts +150 -17
  37. package/lib/server/astro/nodeToAstro.test.ts +1101 -0
  38. package/lib/server/astro/nodeToAstro.ts +869 -37
  39. package/lib/server/astro/pageEmitter.ts +43 -3
  40. package/lib/server/astro/tailwindMapper.ts +69 -8
  41. package/lib/server/astro/templateTransformer.ts +107 -0
  42. package/lib/server/index.ts +26 -3
  43. package/lib/server/routes/api/components.ts +62 -0
  44. package/lib/server/routes/api/core-routes.ts +8 -0
  45. package/lib/server/services/configService.ts +12 -0
  46. package/lib/server/ssr/htmlGenerator.ts +0 -5
  47. package/lib/server/ssr/imageMetadata.ts +3 -3
  48. package/lib/server/ssr/ssrRenderer.ts +78 -29
  49. package/lib/server/webflow/buildWebflow.ts +415 -0
  50. package/lib/server/webflow/index.ts +22 -0
  51. package/lib/server/webflow/nodeToWebflow.ts +423 -0
  52. package/lib/server/webflow/styleMapper.ts +241 -0
  53. package/lib/server/webflow/types.ts +196 -0
  54. package/lib/shared/constants.ts +4 -0
  55. package/lib/shared/types/components.ts +9 -4
  56. package/lib/shared/validation/propValidator.ts +2 -1
  57. package/lib/shared/validation/schemas.ts +4 -1
  58. package/package.json +1 -1
  59. package/templates/index-router.html +0 -5
  60. package/dist/chunks/chunk-A6KWUEA6.js.map +0 -7
  61. package/dist/chunks/chunk-KULPBDC7.js.map +0 -7
  62. package/dist/chunks/chunk-NV25WXCA.js.map +0 -7
  63. package/dist/chunks/chunk-P3FX5HJM.js.map +0 -7
  64. package/dist/chunks/chunk-W6HDII4T.js.map +0 -7
  65. /package/dist/chunks/{chunk-WK5XLASY.js.map → chunk-EQOSDQS2.js.map} +0 -0
  66. /package/dist/chunks/{configService-TXBNUBBL.js.map → configService-MICL4S2L.js.map} +0 -0
  67. /package/dist/chunks/{constants-5CRJRQNR.js.map → constants-ZEU4TZCA.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ConfigService,
3
3
  configService
4
- } from "./chunk-A6KWUEA6.js";
4
+ } from "./chunk-MKB2J6AD.js";
5
5
  import "./chunk-YSZ5IUFM.js";
6
6
  import "./chunk-WQFG7PAH.js";
7
7
  import "./chunk-PGH3ATYI.js";
@@ -10,4 +10,4 @@ export {
10
10
  ConfigService,
11
11
  configService
12
12
  };
13
- //# sourceMappingURL=configService-TXBNUBBL.js.map
13
+ //# sourceMappingURL=configService-MICL4S2L.js.map
@@ -19,7 +19,7 @@ import {
19
19
  TREE_SCROLL_DELAY_MS,
20
20
  WEBSOCKET_STATES,
21
21
  init_constants
22
- } from "./chunk-KULPBDC7.js";
22
+ } from "./chunk-LBWIHPN7.js";
23
23
  import "./chunk-KSBZ2L7C.js";
24
24
  init_constants();
25
25
  export {
@@ -43,4 +43,4 @@ export {
43
43
  TREE_SCROLL_DELAY_MS,
44
44
  WEBSOCKET_STATES
45
45
  };
46
- //# sourceMappingURL=constants-5CRJRQNR.js.map
46
+ //# sourceMappingURL=constants-ZEU4TZCA.js.map
@@ -6,27 +6,27 @@ import {
6
6
  PageService,
7
7
  WebSocketManager,
8
8
  createServer
9
- } from "../chunks/chunk-HNAS6BSS.js";
9
+ } from "../chunks/chunk-SNUROC7E.js";
10
10
  import {
11
11
  CMSService,
12
12
  FileSystemCMSProvider,
13
13
  loadProjectConfig,
14
14
  migrateTemplatesDirectory
15
- } from "../chunks/chunk-W6HDII4T.js";
15
+ } from "../chunks/chunk-SK3TLNUP.js";
16
16
  import {
17
17
  configService
18
- } from "../chunks/chunk-A6KWUEA6.js";
18
+ } from "../chunks/chunk-MKB2J6AD.js";
19
19
  import {
20
20
  projectPaths
21
21
  } from "../chunks/chunk-YSZ5IUFM.js";
22
22
  import "../chunks/chunk-WQFG7PAH.js";
23
23
  import "../chunks/chunk-LIHJ6OUH.js";
24
- import "../chunks/chunk-P3FX5HJM.js";
25
- import "../chunks/chunk-AIXKUVNG.js";
26
- import "../chunks/chunk-NV25WXCA.js";
24
+ import "../chunks/chunk-S2HXJTAF.js";
25
+ import "../chunks/chunk-IBR2F4IL.js";
26
+ import "../chunks/chunk-IGVQF5GY.js";
27
27
  import "../chunks/chunk-PGH3ATYI.js";
28
28
  import "../chunks/chunk-UB44F4Z2.js";
29
- import "../chunks/chunk-KULPBDC7.js";
29
+ import "../chunks/chunk-LBWIHPN7.js";
30
30
  import "../chunks/chunk-KSBZ2L7C.js";
31
31
 
32
32
  // entries/server-router.tsx
@@ -12,7 +12,7 @@ import {
12
12
  resolveLinkMapping,
13
13
  resolveStyleMapping,
14
14
  skipEmptyTemplateAttributes
15
- } from "../../chunks/chunk-AIXKUVNG.js";
15
+ } from "../../chunks/chunk-IBR2F4IL.js";
16
16
  import {
17
17
  filterCSSProperties,
18
18
  logNetworkError,
@@ -56,7 +56,7 @@ import {
56
56
  singularize,
57
57
  sortClassesByPropertyOrder,
58
58
  validatePageData
59
- } from "../../chunks/chunk-NV25WXCA.js";
59
+ } from "../../chunks/chunk-IGVQF5GY.js";
60
60
  import {
61
61
  DEFAULT_BREAKPOINTS,
62
62
  DEFAULT_I18N_CONFIG,
@@ -79,7 +79,7 @@ import {
79
79
  NOT_FOUND_TIMEOUT_MS,
80
80
  RAW_HTML_PREFIX,
81
81
  init_constants
82
- } from "../../chunks/chunk-KULPBDC7.js";
82
+ } from "../../chunks/chunk-LBWIHPN7.js";
83
83
  import "../../chunks/chunk-KSBZ2L7C.js";
84
84
 
85
85
  // lib/client/core/ComponentBuilder.ts
@@ -683,8 +683,8 @@ function hasCMSTemplate(text) {
683
683
  import { createElement as h2 } from "react";
684
684
  import DOMPurify from "isomorphic-dompurify";
685
685
  var SANITIZE_CONFIG = {
686
- ALLOWED_TAGS: ["svg", "path", "circle", "rect", "line", "polyline", "polygon", "g", "text", "tspan", "image", "defs", "use", "linearGradient", "radialGradient", "stop", "clipPath", "mask", "pattern", "marker", "symbol", "a", "div", "span", "p", "br", "button", "img", "iframe", "video", "audio", "source", "canvas", "b", "i", "u", "strong", "em", "sub", "sup", "mark", "s", "small", "del", "ins", "q", "abbr", "code", "pre", "blockquote", "ul", "ol", "li", "h1", "h2", "h3", "h4", "h5", "h6"],
687
- ALLOWED_ATTR: ["class", "id", "style", "width", "height", "viewBox", "xmlns", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray", "stroke-dashoffset", "d", "cx", "cy", "r", "x", "y", "x1", "y1", "x2", "y2", "points", "href", "src", "alt", "target", "rel", "data-*", "aria-*", "transform", "opacity", "fill-opacity", "stroke-opacity", "font-size", "font-family", "text-anchor", "dominant-baseline", "offset", "stop-color", "stop-opacity", "frameborder", "allowfullscreen", "allow", "title"],
686
+ ALLOWED_TAGS: ["svg", "path", "circle", "rect", "line", "polyline", "polygon", "g", "text", "tspan", "image", "defs", "use", "linearGradient", "radialGradient", "stop", "clipPath", "mask", "pattern", "marker", "symbol", "a", "div", "span", "p", "br", "button", "img", "iframe", "video", "audio", "source", "canvas", "b", "i", "u", "strong", "em", "sub", "sup", "mark", "s", "small", "del", "ins", "q", "abbr", "code", "pre", "blockquote", "ul", "ol", "li", "h1", "h2", "h3", "h4", "h5", "h6", "style", "animate", "animateTransform", "animateMotion", "set"],
687
+ ALLOWED_ATTR: ["class", "id", "style", "width", "height", "viewBox", "xmlns", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray", "stroke-dashoffset", "d", "cx", "cy", "r", "x", "y", "x1", "y1", "x2", "y2", "points", "href", "src", "alt", "target", "rel", "data-*", "aria-*", "transform", "opacity", "fill-opacity", "stroke-opacity", "font-size", "font-family", "text-anchor", "dominant-baseline", "offset", "stop-color", "stop-opacity", "frameborder", "allowfullscreen", "allow", "title", "attributeName", "values", "dur", "begin", "end", "repeatCount", "repeatDur", "keyTimes", "keySplines", "calcMode", "from", "to", "by", "additive", "accumulate", "type", "rotate", "keyPoints", "path"],
688
688
  KEEP_CONTENT: true
689
689
  };
690
690
  function buildEmbed(node, ctx, deps) {
@@ -2069,7 +2069,7 @@ var ComponentBuilder = class {
2069
2069
  if (utilityClasses.length > 0) {
2070
2070
  const existingClassName = props.className || "";
2071
2071
  const classArray = existingClassName ? existingClassName.split(/\s+/) : [];
2072
- return { ...props, className: [...classArray, ...utilityClasses].filter(Boolean).join(" ") };
2072
+ return { ...props, className: [...classArray, ...utilityClasses].filter(Boolean).join(" "), style: processedStyle };
2073
2073
  }
2074
2074
  }
2075
2075
  return props;
@@ -3833,6 +3833,11 @@ function Router(props = {}) {
3833
3833
  useEffect2(() => {
3834
3834
  if (typeof window === "undefined") return;
3835
3835
  const handleMessage = (event) => {
3836
+ if (event.data?.type === IFRAME_MESSAGE_TYPES.CSS_VARIABLE_UPDATE) {
3837
+ const { name, value } = event.data;
3838
+ document.documentElement.style.setProperty(name, value);
3839
+ return;
3840
+ }
3836
3841
  if (event.data?.type === IFRAME_MESSAGE_TYPES.INTERACTIVE_CSS_UPDATE) {
3837
3842
  const css = event.data.css;
3838
3843
  const styleId = "interactive-styles";