meno-core 1.0.46 → 1.0.48

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 (68) hide show
  1. package/build-astro.ts +13 -77
  2. package/dist/build-static.js +7 -7
  3. package/dist/chunks/{chunk-FED5MME6.js → chunk-3FHJUHAS.js} +5 -4
  4. package/dist/chunks/chunk-3FHJUHAS.js.map +7 -0
  5. package/dist/chunks/{chunk-XSWR3QLI.js → chunk-B2RTLDXY.js} +130 -130
  6. package/dist/chunks/chunk-B2RTLDXY.js.map +7 -0
  7. package/dist/chunks/{chunk-ZTKHJQ2Z.js → chunk-BJRKEPMP.js} +2 -2
  8. package/dist/chunks/{chunk-ORN7S4AP.js → chunk-D5E3OKSL.js} +5 -5
  9. package/dist/chunks/{chunk-KITQJYZV.js → chunk-EK4KESLU.js} +33 -3
  10. package/dist/chunks/chunk-EK4KESLU.js.map +7 -0
  11. package/dist/chunks/{chunk-C6U5T5S5.js → chunk-NKUV77SR.js} +43 -10
  12. package/dist/chunks/chunk-NKUV77SR.js.map +7 -0
  13. package/dist/chunks/{chunk-ZWYDT3QJ.js → chunk-NP76N4HQ.js} +4 -4
  14. package/dist/chunks/{chunk-ZWYDT3QJ.js.map → chunk-NP76N4HQ.js.map} +2 -2
  15. package/dist/chunks/{chunk-IF3RATBY.js → chunk-RQSTH2BS.js} +2 -2
  16. package/dist/chunks/{chunk-77ZB6353.js → chunk-TPQ7APVQ.js} +42 -86
  17. package/dist/chunks/chunk-TPQ7APVQ.js.map +7 -0
  18. package/dist/chunks/{configService-DYCUEURL.js → configService-IGJEC3MC.js} +3 -3
  19. package/dist/entries/server-router.js +8 -8
  20. package/dist/lib/client/index.js +16 -4
  21. package/dist/lib/client/index.js.map +2 -2
  22. package/dist/lib/server/index.js +1803 -383
  23. package/dist/lib/server/index.js.map +4 -4
  24. package/dist/lib/shared/index.js +8 -4
  25. package/dist/lib/shared/index.js.map +1 -1
  26. package/lib/client/core/ComponentBuilder.test.ts +38 -0
  27. package/lib/client/core/ComponentBuilder.ts +25 -1
  28. package/lib/server/astro/astroEmitHelpers.ts +5 -0
  29. package/lib/server/astro/cmsPageEmitter.ts +15 -2
  30. package/lib/server/astro/componentEmitter.ts +13 -5
  31. package/lib/server/astro/nodeToAstro.ts +23 -9
  32. package/lib/server/astro/pageEmitter.ts +15 -2
  33. package/lib/server/index.ts +1 -1
  34. package/lib/server/jsonLoader.test.ts +0 -17
  35. package/lib/server/jsonLoader.ts +0 -81
  36. package/lib/server/routes/api/variables.ts +4 -2
  37. package/lib/server/ssr/htmlGenerator.test.ts +4 -4
  38. package/lib/server/ssr/htmlGenerator.ts +7 -2
  39. package/lib/server/ssr/imageMetadata.ts +15 -9
  40. package/lib/server/ssr/ssrRenderer.test.ts +103 -1
  41. package/lib/server/ssr/ssrRenderer.ts +41 -35
  42. package/lib/server/utils/jsonLineMapper.test.ts +53 -1
  43. package/lib/server/utils/jsonLineMapper.ts +43 -3
  44. package/lib/server/webflow/buildWebflow.ts +343 -123
  45. package/lib/server/webflow/index.ts +1 -0
  46. package/lib/server/webflow/nodeToWebflow.test.ts +3170 -0
  47. package/lib/server/webflow/nodeToWebflow.ts +2141 -129
  48. package/lib/server/webflow/styleMapper.test.ts +389 -0
  49. package/lib/server/webflow/styleMapper.ts +517 -63
  50. package/lib/server/webflow/templateWrapper.ts +49 -0
  51. package/lib/server/webflow/types.ts +218 -18
  52. package/lib/shared/elementClassName.test.ts +15 -0
  53. package/lib/shared/elementClassName.ts +7 -3
  54. package/lib/shared/registry/nodeTypes/ListNodeType.ts +1 -1
  55. package/lib/shared/styleNodeUtils.test.ts +47 -1
  56. package/lib/shared/styleNodeUtils.ts +7 -7
  57. package/lib/shared/types/index.ts +1 -0
  58. package/lib/shared/types/variables.ts +37 -0
  59. package/package.json +1 -1
  60. package/dist/chunks/chunk-77ZB6353.js.map +0 -7
  61. package/dist/chunks/chunk-C6U5T5S5.js.map +0 -7
  62. package/dist/chunks/chunk-FED5MME6.js.map +0 -7
  63. package/dist/chunks/chunk-KITQJYZV.js.map +0 -7
  64. package/dist/chunks/chunk-XSWR3QLI.js.map +0 -7
  65. /package/dist/chunks/{chunk-ZTKHJQ2Z.js.map → chunk-BJRKEPMP.js.map} +0 -0
  66. /package/dist/chunks/{chunk-ORN7S4AP.js.map → chunk-D5E3OKSL.js.map} +0 -0
  67. /package/dist/chunks/{chunk-IF3RATBY.js.map → chunk-RQSTH2BS.js.map} +0 -0
  68. /package/dist/chunks/{configService-DYCUEURL.js.map → configService-IGJEC3MC.js.map} +0 -0
@@ -11,15 +11,14 @@ import {
11
11
  loadI18nConfig,
12
12
  loadJSONFile,
13
13
  loadProjectConfig,
14
- loadResponsiveScalesConfig,
15
14
  mapPageNameToPath,
16
15
  parseJSON,
17
16
  resolveSlugToPageId,
18
17
  variableService
19
- } from "./chunk-77ZB6353.js";
18
+ } from "./chunk-TPQ7APVQ.js";
20
19
  import {
21
20
  configService
22
- } from "./chunk-ZTKHJQ2Z.js";
21
+ } from "./chunk-BJRKEPMP.js";
23
22
  import {
24
23
  bundleFile,
25
24
  createRuntimeServer,
@@ -39,16 +38,16 @@ import {
39
38
  } from "./chunk-WQFG7PAH.js";
40
39
  import {
41
40
  extractStringValue
42
- } from "./chunk-IF3RATBY.js";
41
+ } from "./chunk-RQSTH2BS.js";
43
42
  import {
44
43
  isPathWithinRoot
45
- } from "./chunk-KITQJYZV.js";
44
+ } from "./chunk-EK4KESLU.js";
46
45
  import {
47
46
  addItemUrls
48
- } from "./chunk-FED5MME6.js";
47
+ } from "./chunk-3FHJUHAS.js";
49
48
  import {
50
49
  parseLocaleFromPath
51
- } from "./chunk-XSWR3QLI.js";
50
+ } from "./chunk-B2RTLDXY.js";
52
51
  import {
53
52
  API_ROUTES,
54
53
  HMR_ROUTE,
@@ -306,6 +305,13 @@ function buildLineMap(jsonText) {
306
305
  }
307
306
  return { start: startPos, end: pos };
308
307
  }
308
+ function recordTrackedRoot(path2) {
309
+ const { start, end } = parseValue(path2, true);
310
+ lineMap.set("", {
311
+ startLine: charToLine[start],
312
+ endLine: charToLine[end - 1] || charToLine[start]
313
+ });
314
+ }
309
315
  function parseObject(path2, trackChildren) {
310
316
  pos++;
311
317
  skipWhitespace();
@@ -316,7 +322,9 @@ function buildLineMap(jsonText) {
316
322
  pos++;
317
323
  skipWhitespace();
318
324
  if (key === "root" && path2.length === 0) {
319
- parseValue(path2, true);
325
+ recordTrackedRoot(path2);
326
+ } else if (key === "component" && path2.length === 0) {
327
+ parseComponentWrapper(path2);
320
328
  } else if (key === "children" && trackChildren) {
321
329
  parseValue(path2, true);
322
330
  } else {
@@ -328,6 +336,30 @@ function buildLineMap(jsonText) {
328
336
  }
329
337
  pos++;
330
338
  }
339
+ function parseComponentWrapper(path2) {
340
+ if (jsonText[pos] !== "{") {
341
+ parseValue(path2, false);
342
+ return;
343
+ }
344
+ pos++;
345
+ skipWhitespace();
346
+ while (pos < jsonText.length && jsonText[pos] !== "}") {
347
+ skipWhitespace();
348
+ const key = parseString();
349
+ skipWhitespace();
350
+ pos++;
351
+ skipWhitespace();
352
+ if (key === "structure") {
353
+ recordTrackedRoot(path2);
354
+ } else {
355
+ parseValue(path2, false);
356
+ }
357
+ skipWhitespace();
358
+ if (jsonText[pos] === ",") pos++;
359
+ skipWhitespace();
360
+ }
361
+ pos++;
362
+ }
331
363
  function parseArray(path2, trackChildren) {
332
364
  pos++;
333
365
  skipWhitespace();
@@ -2029,9 +2061,10 @@ async function handleVariablesStatusRoute() {
2029
2061
  return jsonResponse(result);
2030
2062
  }
2031
2063
  async function handleVariablesCSSRoute() {
2064
+ await configService.load();
2032
2065
  const variablesConfig = await variableService.loadConfig();
2033
2066
  const breakpointConfig = await loadBreakpointConfig();
2034
- const responsiveScalesConfig = await loadResponsiveScalesConfig();
2067
+ const responsiveScalesConfig = configService.getResponsiveScales();
2035
2068
  const css = generateVariablesCSS(variablesConfig, breakpointConfig, responsiveScalesConfig);
2036
2069
  return new Response(css, {
2037
2070
  headers: { "Content-Type": "text/css" }
@@ -3221,4 +3254,4 @@ export {
3221
3254
  createServer,
3222
3255
  FileSystemPageProvider
3223
3256
  };
3224
- //# sourceMappingURL=chunk-C6U5T5S5.js.map
3257
+ //# sourceMappingURL=chunk-NKUV77SR.js.map