meno-core 1.1.3 → 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 (50) hide show
  1. package/dist/chunks/{chunk-LOZL5HOF.js → chunk-UOF4MCAD.js} +64 -2
  2. package/dist/chunks/chunk-UOF4MCAD.js.map +7 -0
  3. package/dist/chunks/{chunk-3JXK2QFU.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 +1267 -233
  7. package/dist/lib/server/index.js.map +4 -4
  8. package/dist/lib/shared/index.js +3 -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/theme.test.ts +2 -2
  13. package/lib/client/theme.ts +28 -26
  14. package/lib/server/createServer.ts +5 -1
  15. package/lib/server/cssAudit.test.ts +270 -0
  16. package/lib/server/cssAudit.ts +815 -0
  17. package/lib/server/deMirror.test.ts +61 -0
  18. package/lib/server/deMirror.ts +317 -0
  19. package/lib/server/fileWatcher.test.ts +23 -0
  20. package/lib/server/fileWatcher.ts +6 -1
  21. package/lib/server/index.ts +19 -0
  22. package/lib/server/routes/api/core-routes.ts +18 -0
  23. package/lib/server/routes/api/cssAudit.test.ts +101 -0
  24. package/lib/server/routes/api/cssAudit.ts +138 -0
  25. package/lib/server/routes/api/deMirror.test.ts +105 -0
  26. package/lib/server/routes/api/deMirror.ts +127 -0
  27. package/lib/server/routes/api/pages.ts +2 -2
  28. package/lib/server/services/componentService.test.ts +43 -0
  29. package/lib/server/services/componentService.ts +49 -12
  30. package/lib/server/services/pageService.test.ts +15 -0
  31. package/lib/server/services/pageService.ts +44 -22
  32. package/lib/server/ssr/htmlGenerator.test.ts +29 -0
  33. package/lib/server/ssr/htmlGenerator.ts +83 -3
  34. package/lib/server/themeCssCodec.test.ts +67 -0
  35. package/lib/server/themeCssCodec.ts +67 -5
  36. package/lib/server/webflow/templateWrapper.ts +54 -0
  37. package/lib/shared/cssGeneration.test.ts +28 -0
  38. package/lib/shared/interfaces/contentProvider.ts +9 -0
  39. package/lib/shared/types/cms.ts +1 -0
  40. package/lib/shared/utilityClassConfig.ts +2 -0
  41. package/lib/shared/utilityClassMapper.test.ts +53 -0
  42. package/lib/shared/utilityClassNames.ts +74 -0
  43. package/lib/shared/utils/fileUtils.ts +11 -0
  44. package/lib/shared/validation/schemas.ts +1 -0
  45. package/lib/shared/viewportUnits.test.ts +34 -1
  46. package/lib/shared/viewportUnits.ts +43 -0
  47. package/package.json +3 -1
  48. package/vite.config.ts +4 -1
  49. package/dist/chunks/chunk-LOZL5HOF.js.map +0 -7
  50. /package/dist/chunks/{chunk-3JXK2QFU.js.map → chunk-ZEDLSHYQ.js.map} +0 -0
@@ -515,7 +515,9 @@ var init_schemas = __esm({
515
515
  options: z.array(z.string()).optional(),
516
516
  accept: z.string().optional(),
517
517
  collection: z.string().optional(),
518
- multiple: z.boolean().optional()
518
+ multiple: z.boolean().optional(),
519
+ editor: z.enum(["basic", "extended"]).optional()
520
+ // For 'rich-text' type: selects the render helper (Basic → richText(); Extended → richTextWithComponents())
519
521
  }).passthrough();
520
522
  CMSClientDataStrategySchema = z.enum(["auto", "inline", "static"]);
521
523
  CMSClientDataConfigSchema = z.object({
@@ -3956,6 +3958,8 @@ var prefixToCSSProperty = {
3956
3958
  "border-r": "border-right",
3957
3959
  "border-b": "border-bottom",
3958
3960
  "border-l": "border-left",
3961
+ "border-x": "border-inline",
3962
+ "border-y": "border-block",
3959
3963
  rounded: "border-radius",
3960
3964
  "rounded-tl": "border-top-left-radius",
3961
3965
  "rounded-tr": "border-top-right-radius",
@@ -5046,6 +5050,38 @@ function negateCssValue(root, value) {
5046
5050
  }
5047
5051
  return /^\d/.test(value) ? `-${value}` : null;
5048
5052
  }
5053
+ var BORDER_SIDE_PROPERTY = {
5054
+ border: "border",
5055
+ "border-t": "border-top",
5056
+ "border-r": "border-right",
5057
+ "border-b": "border-bottom",
5058
+ "border-l": "border-left",
5059
+ "border-x": "border-inline",
5060
+ "border-y": "border-block"
5061
+ };
5062
+ var BORDER_STYLE_KEYWORDS = /* @__PURE__ */ new Set(["solid", "dashed", "dotted", "double", "none", "hidden"]);
5063
+ var BORDER_STYLE = "solid";
5064
+ function parseBorderClass(root, rest) {
5065
+ if (root !== "border") {
5066
+ const sideProp2 = BORDER_SIDE_PROPERTY[root];
5067
+ if (sideProp2 && /^\d+$/.test(rest)) {
5068
+ return { property: sideProp2, value: `${rest}px ${BORDER_STYLE}`, root, kind: "numeric" };
5069
+ }
5070
+ return null;
5071
+ }
5072
+ const sideRoot = `border-${rest}`;
5073
+ const sideProp = BORDER_SIDE_PROPERTY[sideRoot];
5074
+ if (sideProp) {
5075
+ return { property: sideProp, value: `1px ${BORDER_STYLE}`, root: sideRoot, kind: "keyword" };
5076
+ }
5077
+ if (/^\d+$/.test(rest)) {
5078
+ return { property: "border", value: `${rest}px ${BORDER_STYLE}`, root: "border", kind: "numeric" };
5079
+ }
5080
+ if (BORDER_STYLE_KEYWORDS.has(rest)) {
5081
+ return { property: "border-style", value: rest, root: "border", kind: "keyword" };
5082
+ }
5083
+ return null;
5084
+ }
5049
5085
  function parseUtilityClass(className, knownTokens) {
5050
5086
  const stat = staticUtilityReverse[className];
5051
5087
  if (stat) {
@@ -5059,6 +5095,9 @@ function parseUtilityClass(className, knownTokens) {
5059
5095
  kind: "keyword"
5060
5096
  };
5061
5097
  }
5098
+ if (className === "border") {
5099
+ return { property: "border", value: `1px ${BORDER_STYLE}`, root: "border", kind: "keyword" };
5100
+ }
5062
5101
  if (className.startsWith("-") && className.length > 1) {
5063
5102
  const positive = parseUtilityClass(className.slice(1), knownTokens);
5064
5103
  if (positive?.root && positive.value != null && NEGATABLE_ROOTS.has(positive.root)) {
@@ -5112,6 +5151,10 @@ function parseRootValue(root, rest, knownTokens) {
5112
5151
  }
5113
5152
  return { property, value, root, kind: "var" };
5114
5153
  }
5154
+ if (root === "border" || BORDER_SIDE_PROPERTY[root]) {
5155
+ const border = parseBorderClass(root, rest);
5156
+ if (border) return border;
5157
+ }
5115
5158
  const keyword = keywordValues[root]?.[rest];
5116
5159
  if (keyword !== void 0) {
5117
5160
  return { property: resolveRootProperty(root, keyword), value: keyword, root, kind: "keyword" };
@@ -5980,6 +6023,24 @@ function rewriteViewportUnits(input) {
5980
6023
  return `calc(var(--design-${unit}, 1${unit}) * ${num})`;
5981
6024
  });
5982
6025
  }
6026
+ function rewriteViewportUnitsInStylesheet(css) {
6027
+ if (!css) return css;
6028
+ let out = "";
6029
+ let seg = "";
6030
+ for (let i = 0; i < css.length; i++) {
6031
+ const ch = css[i];
6032
+ if (ch === "{") {
6033
+ out += seg + ch;
6034
+ seg = "";
6035
+ } else if (ch === "}") {
6036
+ out += rewriteViewportUnits(seg) + ch;
6037
+ seg = "";
6038
+ } else {
6039
+ seg += ch;
6040
+ }
6041
+ }
6042
+ return out + seg;
6043
+ }
5983
6044
  var DESIGN_VIEWPORT_VARS = [
5984
6045
  "--design-vh",
5985
6046
  "--design-svh",
@@ -6853,6 +6914,7 @@ export {
6853
6914
  normalizePath,
6854
6915
  isCurrentLink,
6855
6916
  rewriteViewportUnits,
6917
+ rewriteViewportUnitsInStylesheet,
6856
6918
  DESIGN_VIEWPORT_VARS,
6857
6919
  toFriendlyError,
6858
6920
  sortClassesByPropertyOrder,
@@ -6865,4 +6927,4 @@ export {
6865
6927
  generateInteractiveCSS,
6866
6928
  generateAllInteractiveCSS
6867
6929
  };
6868
- //# sourceMappingURL=chunk-LOZL5HOF.js.map
6930
+ //# sourceMappingURL=chunk-UOF4MCAD.js.map