meno-core 1.1.2 → 1.1.4

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 (57) hide show
  1. package/dist/chunks/{chunk-J4IPTP5X.js → chunk-UOF4MCAD.js} +92 -4
  2. package/dist/chunks/chunk-UOF4MCAD.js.map +7 -0
  3. package/dist/chunks/{chunk-7ZLF4NE5.js → chunk-ZEDLSHYQ.js} +2 -2
  4. package/dist/lib/client/index.js +46 -28
  5. package/dist/lib/client/index.js.map +2 -2
  6. package/dist/lib/server/index.js +1287 -236
  7. package/dist/lib/server/index.js.map +4 -4
  8. package/dist/lib/shared/index.js +5 -1
  9. package/dist/lib/shared/index.js.map +1 -1
  10. package/lib/client/core/ComponentBuilder.test.ts +32 -0
  11. package/lib/client/core/ComponentBuilder.ts +30 -0
  12. package/lib/client/scripts/formHandler.ts +17 -0
  13. package/lib/client/theme.test.ts +2 -2
  14. package/lib/client/theme.ts +28 -26
  15. package/lib/server/createServer.ts +5 -1
  16. package/lib/server/cssAudit.test.ts +270 -0
  17. package/lib/server/cssAudit.ts +815 -0
  18. package/lib/server/deMirror.test.ts +61 -0
  19. package/lib/server/deMirror.ts +317 -0
  20. package/lib/server/fileWatcher.test.ts +23 -0
  21. package/lib/server/fileWatcher.ts +6 -1
  22. package/lib/server/index.ts +19 -0
  23. package/lib/server/middleware/cors.test.ts +1 -1
  24. package/lib/server/middleware/cors.ts +1 -1
  25. package/lib/server/routes/api/core-routes.ts +18 -0
  26. package/lib/server/routes/api/cssAudit.test.ts +101 -0
  27. package/lib/server/routes/api/cssAudit.ts +138 -0
  28. package/lib/server/routes/api/deMirror.test.ts +105 -0
  29. package/lib/server/routes/api/deMirror.ts +127 -0
  30. package/lib/server/routes/api/functions.ts +2 -2
  31. package/lib/server/routes/api/pages.ts +2 -2
  32. package/lib/server/services/componentService.test.ts +43 -0
  33. package/lib/server/services/componentService.ts +49 -12
  34. package/lib/server/services/pageService.test.ts +15 -0
  35. package/lib/server/services/pageService.ts +44 -22
  36. package/lib/server/ssr/htmlGenerator.test.ts +29 -0
  37. package/lib/server/ssr/htmlGenerator.ts +83 -3
  38. package/lib/server/themeCssCodec.test.ts +67 -0
  39. package/lib/server/themeCssCodec.ts +67 -5
  40. package/lib/server/webflow/templateWrapper.ts +54 -0
  41. package/lib/shared/cssGeneration.test.ts +28 -0
  42. package/lib/shared/interfaces/contentProvider.ts +9 -0
  43. package/lib/shared/nodeUtils.ts +18 -0
  44. package/lib/shared/types/cms.ts +1 -0
  45. package/lib/shared/utilityClassConfig.ts +2 -0
  46. package/lib/shared/utilityClassMapper.test.ts +63 -0
  47. package/lib/shared/utilityClassMapper.ts +9 -1
  48. package/lib/shared/utilityClassNames.ts +74 -0
  49. package/lib/shared/utils/fileUtils.ts +11 -0
  50. package/lib/shared/validation/schemas.test.ts +78 -0
  51. package/lib/shared/validation/schemas.ts +54 -5
  52. package/lib/shared/viewportUnits.test.ts +34 -1
  53. package/lib/shared/viewportUnits.ts +43 -0
  54. package/package.json +3 -1
  55. package/vite.config.ts +4 -1
  56. package/dist/chunks/chunk-J4IPTP5X.js.map +0 -7
  57. /package/dist/chunks/{chunk-7ZLF4NE5.js.map → chunk-ZEDLSHYQ.js.map} +0 -0
@@ -16,7 +16,7 @@ import {
16
16
  normalizeStyle,
17
17
  richTextMarkerToHtml,
18
18
  safeEvaluate
19
- } from "./chunk-J4IPTP5X.js";
19
+ } from "./chunk-UOF4MCAD.js";
20
20
  import {
21
21
  NODE_TYPE,
22
22
  RAW_HTML_PREFIX,
@@ -805,4 +805,4 @@ export {
805
805
  skipEmptyTemplateAttributes,
806
806
  inlineSvgStyleRules
807
807
  };
808
- //# sourceMappingURL=chunk-7ZLF4NE5.js.map
808
+ //# sourceMappingURL=chunk-ZEDLSHYQ.js.map
@@ -13,7 +13,7 @@ import {
13
13
  resolveLinkMapping,
14
14
  resolveStyleMapping,
15
15
  skipEmptyTemplateAttributes
16
- } from "../../chunks/chunk-7ZLF4NE5.js";
16
+ } from "../../chunks/chunk-ZEDLSHYQ.js";
17
17
  import {
18
18
  filterCSSProperties
19
19
  } from "../../chunks/chunk-XTKNX4FW.js";
@@ -45,6 +45,7 @@ import {
45
45
  isCurrentLink,
46
46
  isCustomNode,
47
47
  isEmbedNode,
48
+ isHtmlNode,
48
49
  isIslandNode,
49
50
  isItemDraftForLocale,
50
51
  isLinkNode,
@@ -72,7 +73,7 @@ import {
72
73
  sortClassesByPropertyOrder,
73
74
  toFriendlyError,
74
75
  validatePageData
75
- } from "../../chunks/chunk-J4IPTP5X.js";
76
+ } from "../../chunks/chunk-UOF4MCAD.js";
76
77
  import {
77
78
  DEFAULT_I18N_CONFIG,
78
79
  isI18nValue,
@@ -2799,6 +2800,21 @@ var ComponentBuilder = class {
2799
2800
  if (finalProps.style && typeof finalProps.style === "object") {
2800
2801
  mergeNodeStyles(processedStructure, finalProps.style, viewportWidth);
2801
2802
  }
2803
+ const instanceClass = typeof finalProps.class === "string" ? finalProps.class : "";
2804
+ if (instanceClass) {
2805
+ const root = processedStructure;
2806
+ if (isHtmlNode(root) || isLinkNode(root)) {
2807
+ if (!root.attributes) root.attributes = {};
2808
+ const existing = root.attributes.class || "";
2809
+ root.attributes.class = existing ? `${existing} ${instanceClass}` : instanceClass;
2810
+ } else {
2811
+ if (!root.props) root.props = {};
2812
+ const existing = root.props.className || "";
2813
+ root.props.className = existing ? `${existing} ${instanceClass}` : instanceClass;
2814
+ }
2815
+ const tokens = instanceClass.split(/\s+/).filter(Boolean);
2816
+ if (tokens.length > 0) UtilityClassCollector.collect(tokens);
2817
+ }
2802
2818
  if (finalProps.onClick && isComponentNode(processedStructure)) {
2803
2819
  if (!processedStructure.props) processedStructure.props = {};
2804
2820
  processedStructure.props.onClick = this.createOnClickHandler(finalProps.onClick);
@@ -4948,20 +4964,21 @@ var lightThemeColors = {
4948
4964
  };
4949
4965
  var darkThemeColors = {
4950
4966
  sidebar: {
4951
- background: "#1e1e1e",
4952
- border: "#333333",
4953
- text: "#cccccc",
4954
- textSecondary: "#cccccc",
4955
- textMuted: "#888888",
4956
- headerBackground: "#2d2d2d",
4957
- tabActiveBackground: "#1e1e1e",
4958
- tabActiveBorder: "#007acc",
4967
+ // Codex dark (near-black neutral) palette
4968
+ background: "#0d0d0d",
4969
+ border: "#2a2a2a",
4970
+ text: "#ececec",
4971
+ textSecondary: "#b4b4b4",
4972
+ textMuted: "#8f8f8f",
4973
+ headerBackground: "#171717",
4974
+ tabActiveBackground: "#0d0d0d",
4975
+ tabActiveBorder: "#ececec",
4959
4976
  tabInactiveBackground: "transparent",
4960
- footerBackground: "#252526",
4961
- buttonPrimaryBackground: "#0e639c",
4977
+ footerBackground: "#171717",
4978
+ buttonPrimaryBackground: "#2f2f2f",
4962
4979
  buttonPrimaryColor: "#ffffff",
4963
- hoverBackground: "#2a2d2e",
4964
- selectedBackground: "#37373d",
4980
+ hoverBackground: "#1f1f1f",
4981
+ selectedBackground: "#2a2a2a",
4965
4982
  selectedText: "#ffffff"
4966
4983
  },
4967
4984
  scrollbar: {
@@ -4970,26 +4987,27 @@ var darkThemeColors = {
4970
4987
  thumbHover: "#4e4e4e"
4971
4988
  },
4972
4989
  propsPanel: {
4973
- background: "#1e1e1e",
4974
- backgroundSecondary: "#2d2d2d",
4975
- backgroundTertiary: "#252525",
4976
- border: "#333333",
4977
- borderSecondary: "#444444",
4978
- text: "#ebebeb",
4979
- textSecondary: "#cccccc",
4980
- textMuted: "#b0b0b0",
4990
+ // Codex dark (near-black neutral) palette — matches sidebar/topbar
4991
+ background: "#0d0d0d",
4992
+ backgroundSecondary: "#171717",
4993
+ backgroundTertiary: "#1f1f1f",
4994
+ border: "#2a2a2a",
4995
+ borderSecondary: "#333333",
4996
+ text: "#ececec",
4997
+ textSecondary: "#b4b4b4",
4998
+ textMuted: "#8f8f8f",
4981
4999
  codeString: "#ffffff",
4982
5000
  codeNumber: "#b5cea8",
4983
5001
  codeKey: "#9cdcfe",
4984
5002
  codeType: "#4ec9b0",
4985
- buttonPrimary: "#007acc",
4986
- buttonPrimaryHover: "#0098ff",
4987
- buttonSecondary: "#007acc",
5003
+ buttonPrimary: "#2f2f2f",
5004
+ buttonPrimaryHover: "#3a3a3a",
5005
+ buttonSecondary: "#b4b4b4",
4988
5006
  buttonDanger: "#f48771",
4989
5007
  buttonDangerHover: "#ff6b6b",
4990
- inputBackground: "#1e1e1e",
4991
- inputBorder: "#444444",
4992
- hoverBackground: "#2a2d2e",
5008
+ inputBackground: "#171717",
5009
+ inputBorder: "#2a2a2a",
5010
+ hoverBackground: "#1f1f1f",
4993
5011
  variableBackground: "#2a2a2a"
4994
5012
  }
4995
5013
  };