meno-core 1.0.49 → 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 (53) hide show
  1. package/build-astro.ts +6 -2
  2. package/dist/build-static.js +5 -5
  3. package/dist/chunks/{chunk-JER5NQVM.js → chunk-56EUSC6D.js} +4 -4
  4. package/dist/chunks/{chunk-S2CX6HFM.js → chunk-7NIC4I3V.js} +42 -20
  5. package/dist/chunks/chunk-7NIC4I3V.js.map +7 -0
  6. package/dist/chunks/{chunk-EQYDSPBB.js → chunk-CVLFID6V.js} +64 -20
  7. package/dist/chunks/chunk-CVLFID6V.js.map +7 -0
  8. package/dist/chunks/{chunk-LKAGAQ3M.js → chunk-EDQSMAMP.js} +13 -2
  9. package/dist/chunks/{chunk-LKAGAQ3M.js.map → chunk-EDQSMAMP.js.map} +2 -2
  10. package/dist/chunks/{chunk-6IVUG7FY.js → chunk-LPVETICS.js} +19 -2
  11. package/dist/chunks/{chunk-6IVUG7FY.js.map → chunk-LPVETICS.js.map} +2 -2
  12. package/dist/chunks/{chunk-KPU2XHOS.js → chunk-PQ2HRXDR.js} +1 -1
  13. package/dist/chunks/chunk-PQ2HRXDR.js.map +7 -0
  14. package/dist/chunks/{chunk-CHD5UCFF.js → chunk-YWJJD5D6.js} +116 -32
  15. package/dist/chunks/chunk-YWJJD5D6.js.map +7 -0
  16. package/dist/chunks/{configService-CCA6AIDI.js → configService-VOY2MY2K.js} +2 -2
  17. package/dist/entries/server-router.js +5 -5
  18. package/dist/lib/client/index.js +41 -15
  19. package/dist/lib/client/index.js.map +3 -3
  20. package/dist/lib/server/index.js +11 -9
  21. package/dist/lib/server/index.js.map +2 -2
  22. package/dist/lib/shared/index.js +2 -2
  23. package/lib/client/core/ComponentBuilder.test.ts +34 -0
  24. package/lib/client/core/ComponentBuilder.ts +25 -3
  25. package/lib/client/core/builders/embedBuilder.ts +13 -5
  26. package/lib/client/core/builders/linkNodeBuilder.ts +13 -5
  27. package/lib/client/core/builders/localeListBuilder.ts +13 -5
  28. package/lib/client/templateEngine.ts +24 -0
  29. package/lib/server/fileWatcher.test.ts +134 -0
  30. package/lib/server/fileWatcher.ts +100 -32
  31. package/lib/server/jsonLoader.ts +1 -0
  32. package/lib/server/providers/fileSystemCMSProvider.ts +46 -14
  33. package/lib/server/services/configService.ts +1 -0
  34. package/lib/server/services/fileWatcherService.ts +17 -0
  35. package/lib/server/ssr/htmlGenerator.ts +11 -3
  36. package/lib/server/ssr/ssrRenderer.test.ts +258 -0
  37. package/lib/server/ssr/ssrRenderer.ts +46 -5
  38. package/lib/server/webflow/buildWebflow.ts +1 -1
  39. package/lib/server/websocketManager.test.ts +61 -6
  40. package/lib/server/websocketManager.ts +25 -1
  41. package/lib/shared/cssProperties.test.ts +28 -0
  42. package/lib/shared/cssProperties.ts +27 -1
  43. package/lib/shared/types/api.ts +10 -1
  44. package/lib/shared/types/cms.ts +18 -9
  45. package/lib/shared/validation/schemas.test.ts +93 -0
  46. package/lib/shared/validation/schemas.ts +56 -15
  47. package/package.json +1 -1
  48. package/dist/chunks/chunk-CHD5UCFF.js.map +0 -7
  49. package/dist/chunks/chunk-EQYDSPBB.js.map +0 -7
  50. package/dist/chunks/chunk-KPU2XHOS.js.map +0 -7
  51. package/dist/chunks/chunk-S2CX6HFM.js.map +0 -7
  52. /package/dist/chunks/{chunk-JER5NQVM.js.map → chunk-56EUSC6D.js.map} +0 -0
  53. /package/dist/chunks/{configService-CCA6AIDI.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-JER5NQVM.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-CHD5UCFF.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-EQYDSPBB.js";
86
+ } from "../../chunks/chunk-CVLFID6V.js";
87
87
  import {
88
88
  ConfigService,
89
89
  configService
90
- } from "../../chunks/chunk-KPU2XHOS.js";
90
+ } from "../../chunks/chunk-PQ2HRXDR.js";
91
91
  import {
92
92
  bundleFile,
93
93
  createRuntimeServer,
@@ -125,7 +125,7 @@ import {
125
125
  isHtmlMapping,
126
126
  processCodeTemplates,
127
127
  resolveHtmlMapping
128
- } from "../../chunks/chunk-LKAGAQ3M.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-S2CX6HFM.js";
147
+ } from "../../chunks/chunk-7NIC4I3V.js";
148
148
  import {
149
149
  DEFAULT_BREAKPOINTS,
150
150
  DEFAULT_I18N_CONFIG,
@@ -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
  }