meno-core 1.0.48 → 1.0.50

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 (89) hide show
  1. package/build-astro.ts +6 -2
  2. package/dist/build-static.js +7 -7
  3. package/dist/chunks/{chunk-D5E3OKSL.js → chunk-56EUSC6D.js} +5 -5
  4. package/dist/chunks/{chunk-3FHJUHAS.js → chunk-7NIC4I3V.js} +300 -43
  5. package/dist/chunks/chunk-7NIC4I3V.js.map +7 -0
  6. package/dist/chunks/{chunk-B2RTLDXY.js → chunk-AZQYF6KE.js} +132 -1
  7. package/dist/chunks/chunk-AZQYF6KE.js.map +7 -0
  8. package/dist/chunks/{chunk-TPQ7APVQ.js → chunk-CVLFID6V.js} +473 -73
  9. package/dist/chunks/chunk-CVLFID6V.js.map +7 -0
  10. package/dist/chunks/{chunk-NP76N4HQ.js → chunk-EDQSMAMP.js} +13 -2
  11. package/dist/chunks/{chunk-NP76N4HQ.js.map → chunk-EDQSMAMP.js.map} +2 -2
  12. package/dist/chunks/{chunk-RQSTH2BS.js → chunk-H4JSCDNW.js} +2 -2
  13. package/dist/chunks/{chunk-EK4KESLU.js → chunk-J23ZX5AP.js} +8 -2
  14. package/dist/chunks/{chunk-EK4KESLU.js.map → chunk-J23ZX5AP.js.map} +2 -2
  15. package/dist/chunks/{chunk-UUA5LEWF.js → chunk-LPVETICS.js} +156 -8
  16. package/dist/chunks/chunk-LPVETICS.js.map +7 -0
  17. package/dist/chunks/{chunk-BJRKEPMP.js → chunk-PQ2HRXDR.js} +5 -2
  18. package/dist/chunks/chunk-PQ2HRXDR.js.map +7 -0
  19. package/dist/chunks/{chunk-NKUV77SR.js → chunk-YWJJD5D6.js} +133 -37
  20. package/dist/chunks/chunk-YWJJD5D6.js.map +7 -0
  21. package/dist/chunks/{configService-IGJEC3MC.js → configService-VOY2MY2K.js} +3 -3
  22. package/dist/entries/server-router.js +9 -9
  23. package/dist/entries/server-router.js.map +2 -2
  24. package/dist/lib/client/index.js +92 -32
  25. package/dist/lib/client/index.js.map +3 -3
  26. package/dist/lib/server/index.js +14 -12
  27. package/dist/lib/server/index.js.map +2 -2
  28. package/dist/lib/shared/index.js +46 -10
  29. package/dist/lib/shared/index.js.map +3 -3
  30. package/entries/server-router.tsx +6 -2
  31. package/lib/client/core/ComponentBuilder.test.ts +34 -0
  32. package/lib/client/core/ComponentBuilder.ts +33 -4
  33. package/lib/client/core/builders/embedBuilder.ts +28 -7
  34. package/lib/client/core/builders/linkNodeBuilder.ts +28 -7
  35. package/lib/client/core/builders/localeListBuilder.ts +30 -11
  36. package/lib/client/styles/StyleInjector.ts +3 -2
  37. package/lib/client/templateEngine.ts +24 -0
  38. package/lib/client/theme.ts +4 -4
  39. package/lib/server/cssGenerator.test.ts +64 -1
  40. package/lib/server/cssGenerator.ts +48 -9
  41. package/lib/server/fileWatcher.test.ts +134 -0
  42. package/lib/server/fileWatcher.ts +100 -32
  43. package/lib/server/jsonLoader.ts +1 -0
  44. package/lib/server/providers/fileSystemCMSProvider.test.ts +163 -0
  45. package/lib/server/providers/fileSystemCMSProvider.ts +240 -19
  46. package/lib/server/routes/index.ts +1 -1
  47. package/lib/server/routes/pages.ts +23 -1
  48. package/lib/server/services/cmsService.test.ts +246 -0
  49. package/lib/server/services/cmsService.ts +122 -5
  50. package/lib/server/services/configService.ts +6 -0
  51. package/lib/server/services/fileWatcherService.ts +17 -0
  52. package/lib/server/ssr/attributeBuilder.ts +41 -0
  53. package/lib/server/ssr/htmlGenerator.test.ts +113 -0
  54. package/lib/server/ssr/htmlGenerator.ts +62 -7
  55. package/lib/server/ssr/liveReloadIntegration.test.ts +209 -0
  56. package/lib/server/ssr/ssrRenderer.test.ts +564 -0
  57. package/lib/server/ssr/ssrRenderer.ts +228 -49
  58. package/lib/server/webflow/buildWebflow.ts +1 -1
  59. package/lib/server/websocketManager.test.ts +61 -6
  60. package/lib/server/websocketManager.ts +25 -1
  61. package/lib/shared/cssGeneration.test.ts +267 -1
  62. package/lib/shared/cssGeneration.ts +240 -18
  63. package/lib/shared/cssProperties.test.ts +275 -1
  64. package/lib/shared/cssProperties.ts +223 -7
  65. package/lib/shared/interfaces/contentProvider.ts +39 -6
  66. package/lib/shared/pathSecurity.ts +16 -0
  67. package/lib/shared/responsiveScaling.test.ts +143 -0
  68. package/lib/shared/responsiveScaling.ts +253 -2
  69. package/lib/shared/themeDefaults.test.ts +3 -3
  70. package/lib/shared/themeDefaults.ts +3 -3
  71. package/lib/shared/types/api.ts +10 -1
  72. package/lib/shared/types/cms.ts +46 -12
  73. package/lib/shared/types/index.ts +1 -0
  74. package/lib/shared/utilityClassConfig.ts +3 -0
  75. package/lib/shared/utilityClassMapper.test.ts +123 -0
  76. package/lib/shared/utilityClassMapper.ts +179 -8
  77. package/lib/shared/validation/schemas.test.ts +93 -0
  78. package/lib/shared/validation/schemas.ts +71 -16
  79. package/lib/shared/validation/validators.ts +26 -1
  80. package/package.json +1 -1
  81. package/dist/chunks/chunk-3FHJUHAS.js.map +0 -7
  82. package/dist/chunks/chunk-B2RTLDXY.js.map +0 -7
  83. package/dist/chunks/chunk-BJRKEPMP.js.map +0 -7
  84. package/dist/chunks/chunk-NKUV77SR.js.map +0 -7
  85. package/dist/chunks/chunk-TPQ7APVQ.js.map +0 -7
  86. package/dist/chunks/chunk-UUA5LEWF.js.map +0 -7
  87. /package/dist/chunks/{chunk-D5E3OKSL.js.map → chunk-56EUSC6D.js.map} +0 -0
  88. /package/dist/chunks/{chunk-RQSTH2BS.js.map → chunk-H4JSCDNW.js.map} +0 -0
  89. /package/dist/chunks/{configService-IGJEC3MC.js.map → configService-VOY2MY2K.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "../../chunks/chunk-4OFZP5NQ.js";
4
4
  import {
5
5
  buildStaticPages
6
- } from "../../chunks/chunk-D5E3OKSL.js";
6
+ } from "../../chunks/chunk-56EUSC6D.js";
7
7
  import {
8
8
  ComponentService,
9
9
  EnumService,
@@ -32,7 +32,7 @@ import {
32
32
  logResponseTime,
33
33
  withErrorHandling,
34
34
  withLogging
35
- } from "../../chunks/chunk-NKUV77SR.js";
35
+ } from "../../chunks/chunk-YWJJD5D6.js";
36
36
  import {
37
37
  CMSService,
38
38
  ColorService,
@@ -83,11 +83,11 @@ import {
83
83
  styleToString,
84
84
  translatePath,
85
85
  variableService
86
- } from "../../chunks/chunk-TPQ7APVQ.js";
86
+ } from "../../chunks/chunk-CVLFID6V.js";
87
87
  import {
88
88
  ConfigService,
89
89
  configService
90
- } from "../../chunks/chunk-BJRKEPMP.js";
90
+ } from "../../chunks/chunk-PQ2HRXDR.js";
91
91
  import {
92
92
  bundleFile,
93
93
  createRuntimeServer,
@@ -116,16 +116,16 @@ import {
116
116
  spawnProcess,
117
117
  writeFile
118
118
  } from "../../chunks/chunk-WQFG7PAH.js";
119
- import "../../chunks/chunk-RQSTH2BS.js";
119
+ import "../../chunks/chunk-H4JSCDNW.js";
120
120
  import {
121
121
  resolvePaletteColor
122
- } from "../../chunks/chunk-EK4KESLU.js";
122
+ } from "../../chunks/chunk-J23ZX5AP.js";
123
123
  import {
124
124
  hasTemplates,
125
125
  isHtmlMapping,
126
126
  processCodeTemplates,
127
127
  resolveHtmlMapping
128
- } from "../../chunks/chunk-NP76N4HQ.js";
128
+ } from "../../chunks/chunk-EDQSMAMP.js";
129
129
  import {
130
130
  addItemUrl,
131
131
  buildTemplateContext,
@@ -144,7 +144,7 @@ import {
144
144
  resolvePropsFromDefinition,
145
145
  shortHash,
146
146
  singularize
147
- } from "../../chunks/chunk-3FHJUHAS.js";
147
+ } from "../../chunks/chunk-7NIC4I3V.js";
148
148
  import {
149
149
  DEFAULT_BREAKPOINTS,
150
150
  DEFAULT_I18N_CONFIG,
@@ -154,7 +154,7 @@ import {
154
154
  resolveI18nValue,
155
155
  resolveVariableValueAtBreakpoint,
156
156
  scalePropertyValue
157
- } from "../../chunks/chunk-B2RTLDXY.js";
157
+ } from "../../chunks/chunk-AZQYF6KE.js";
158
158
  import "../../chunks/chunk-UB44F4Z2.js";
159
159
  import {
160
160
  HMR_ROUTE,
@@ -3127,9 +3127,11 @@ async function buildAstroProject(projectRoot, outputDir) {
3127
3127
  const defaultTheme = themeConfig.default || "light";
3128
3128
  const customCode = configService.getCustomCode();
3129
3129
  const iconsConfig = await loadIconsConfig();
3130
- const faviconTag = iconsConfig.favicon ? `<link rel="icon" href="${iconsConfig.favicon.replace(/"/g, "&quot;")}" />` : "";
3130
+ const hasDarkFavicon = !!(iconsConfig.favicon && iconsConfig.faviconDark);
3131
+ const faviconTag = iconsConfig.favicon ? `<link rel="icon" href="${iconsConfig.favicon.replace(/"/g, "&quot;")}"${hasDarkFavicon ? ' media="(prefers-color-scheme: light)"' : ""} />` : "";
3132
+ const faviconDarkTag = iconsConfig.faviconDark ? `<link rel="icon" href="${iconsConfig.faviconDark.replace(/"/g, "&quot;")}" media="(prefers-color-scheme: dark)" />` : "";
3131
3133
  const appleTouchIconTag = iconsConfig.appleTouchIcon ? `<link rel="apple-touch-icon" href="${iconsConfig.appleTouchIcon.replace(/"/g, "&quot;")}" />` : "";
3132
- const iconTagsHtml = [faviconTag, appleTouchIconTag].filter(Boolean).join("\n ");
3134
+ const iconTagsHtml = [faviconTag, faviconDarkTag, appleTouchIconTag].filter(Boolean).join("\n ");
3133
3135
  const remConversionConfig = configService.getRemConversion();
3134
3136
  const templatesDir = projectPaths.templates();
3135
3137
  const templateSchemas = [];
@@ -5495,7 +5497,7 @@ async function buildWebflowPayload(options) {
5495
5497
  const pageName = file.replace(".json", "");
5496
5498
  for (const localeConfig of localesToBuild) {
5497
5499
  const locale = localeConfig.code;
5498
- let itemSlug = item[cmsSchema.slugField] ?? item._slug ?? item._id;
5500
+ let itemSlug = item[cmsSchema.slugField] ?? item._slug ?? item._filename ?? item._id;
5499
5501
  if (isI18nValue(itemSlug)) {
5500
5502
  itemSlug = resolveI18nValue(itemSlug, locale, i18nConfig);
5501
5503
  }