meno-core 1.0.42 → 1.0.43
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.
- package/build-astro.ts +2 -1
- package/build-static.ts +2 -0
- package/dist/bin/cli.js +1 -1
- package/dist/build-static.js +7 -7
- package/dist/chunks/{chunk-LIHJ6OUH.js → chunk-46AVQA4V.js} +2 -2
- package/dist/chunks/{chunk-UGHOL7IP.js → chunk-5RFOQU7L.js} +21 -11
- package/dist/chunks/{chunk-UGHOL7IP.js.map → chunk-5RFOQU7L.js.map} +2 -2
- package/dist/chunks/{chunk-DIYO4RBJ.js → chunk-BXB6AX76.js} +2 -7
- package/dist/chunks/{chunk-DIYO4RBJ.js.map → chunk-BXB6AX76.js.map} +2 -2
- package/dist/chunks/{chunk-YM5BJZYJ.js → chunk-JPOTVYM3.js} +12 -8
- package/dist/chunks/chunk-JPOTVYM3.js.map +7 -0
- package/dist/chunks/{chunk-ITVPRBD6.js → chunk-KPNSCQNA.js} +37 -21
- package/dist/chunks/chunk-KPNSCQNA.js.map +7 -0
- package/dist/chunks/{chunk-6AYGKR6Y.js → chunk-OLNQMCSR.js} +3 -3
- package/dist/chunks/{chunk-ACK7AURE.js → chunk-U5BZ6DDD.js} +7 -5
- package/dist/chunks/chunk-U5BZ6DDD.js.map +7 -0
- package/dist/chunks/{chunk-PGH3ATYI.js → chunk-X5SH4HXS.js} +88 -2
- package/dist/chunks/{chunk-PGH3ATYI.js.map → chunk-X5SH4HXS.js.map} +3 -3
- package/dist/chunks/{chunk-24KKYW25.js → chunk-YEJVSNVF.js} +21 -2
- package/dist/chunks/chunk-YEJVSNVF.js.map +7 -0
- package/dist/chunks/{configService-KK5JEQOZ.js → configService-KYO3TXDS.js} +3 -3
- package/dist/chunks/{constants-JOIPAAAA.js → constants-34NUGHQR.js} +2 -2
- package/dist/entries/server-router.js +8 -8
- package/dist/lib/client/index.js +29 -7
- package/dist/lib/client/index.js.map +3 -3
- package/dist/lib/server/index.js +11 -10
- package/dist/lib/server/index.js.map +2 -2
- package/dist/lib/shared/index.js +18 -4
- package/dist/lib/shared/index.js.map +2 -2
- package/dist/lib/test-utils/index.js +1 -1
- package/lib/client/responsiveStyleResolver.ts +31 -1
- package/lib/client/styles/StyleInjector.ts +3 -2
- package/lib/client/styles/UtilityClassCollector.ts +3 -2
- package/lib/server/routes/pages.ts +4 -0
- package/lib/server/services/configService.ts +25 -0
- package/lib/server/services/pageService.ts +1 -1
- package/lib/server/ssr/htmlGenerator.ts +20 -6
- package/lib/shared/constants.ts +1 -3
- package/lib/shared/cssGeneration.ts +30 -14
- package/lib/shared/index.ts +3 -0
- package/lib/shared/pxToRem.test.ts +115 -0
- package/lib/shared/pxToRem.ts +77 -0
- package/lib/shared/types/api.ts +14 -0
- package/lib/shared/types/index.ts +1 -0
- package/lib/shared/validation/schemas.ts +8 -0
- package/package.json +1 -1
- package/dist/chunks/chunk-24KKYW25.js.map +0 -7
- package/dist/chunks/chunk-ACK7AURE.js.map +0 -7
- package/dist/chunks/chunk-ITVPRBD6.js.map +0 -7
- package/dist/chunks/chunk-YM5BJZYJ.js.map +0 -7
- /package/dist/chunks/{chunk-LIHJ6OUH.js.map → chunk-46AVQA4V.js.map} +0 -0
- /package/dist/chunks/{chunk-6AYGKR6Y.js.map → chunk-OLNQMCSR.js.map} +0 -0
- /package/dist/chunks/{configService-KK5JEQOZ.js.map → configService-KYO3TXDS.js.map} +0 -0
- /package/dist/chunks/{constants-JOIPAAAA.js.map → constants-34NUGHQR.js.map} +0 -0
package/build-astro.ts
CHANGED
|
@@ -661,7 +661,8 @@ export async function buildAstroProject(
|
|
|
661
661
|
const fontCSS = generateFontCSS();
|
|
662
662
|
const themeColorCSS = generateThemeColorVariablesCSS(themeConfig);
|
|
663
663
|
const variablesCSS = generateVariablesCSS(variablesConfig, breakpoints, responsiveScales);
|
|
664
|
-
const
|
|
664
|
+
const remConversionConfig = configService.getRemConversion();
|
|
665
|
+
const interactiveCSS = generateAllInteractiveCSS(allInteractiveStyles, breakpoints, remConversionConfig);
|
|
665
666
|
const componentCSSCombined = Array.from(allComponentCSS).join('\n');
|
|
666
667
|
|
|
667
668
|
const baseCSS = `@layer base {
|
package/build-static.ts
CHANGED
|
@@ -454,6 +454,7 @@ async function buildCMSTemplates(
|
|
|
454
454
|
cmsService,
|
|
455
455
|
returnSeparateJS: true,
|
|
456
456
|
pageLibraries: pageData.meta?.libraries,
|
|
457
|
+
pageCustomCode: pageData.meta?.customCode,
|
|
457
458
|
clientDataCollections,
|
|
458
459
|
isProductionBuild: true,
|
|
459
460
|
}) as SSRHTMLResult;
|
|
@@ -876,6 +877,7 @@ export async function buildStaticPages(): Promise<void> {
|
|
|
876
877
|
cmsService,
|
|
877
878
|
returnSeparateJS: true,
|
|
878
879
|
pageLibraries: pageData.meta?.libraries,
|
|
880
|
+
pageCustomCode: pageData.meta?.customCode,
|
|
879
881
|
isProductionBuild: true,
|
|
880
882
|
}) as SSRHTMLResult;
|
|
881
883
|
|
package/dist/bin/cli.js
CHANGED
|
@@ -82,7 +82,7 @@ function getMatchingHeaders(pathname, headersMap) {
|
|
|
82
82
|
return result;
|
|
83
83
|
}
|
|
84
84
|
async function startStaticServer(distPath) {
|
|
85
|
-
const { SERVE_PORT } = await import("../chunks/constants-
|
|
85
|
+
const { SERVE_PORT } = await import("../chunks/constants-34NUGHQR.js");
|
|
86
86
|
const headersMap = parseHeadersFile(distPath);
|
|
87
87
|
const server = await createRuntimeServer({
|
|
88
88
|
port: SERVE_PORT,
|
package/dist/build-static.js
CHANGED
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
hashContent,
|
|
10
10
|
injectTrackingScript,
|
|
11
11
|
isCMSPage
|
|
12
|
-
} from "./chunks/chunk-
|
|
13
|
-
import "./chunks/chunk-
|
|
14
|
-
import "./chunks/chunk-
|
|
12
|
+
} from "./chunks/chunk-U5BZ6DDD.js";
|
|
13
|
+
import "./chunks/chunk-5RFOQU7L.js";
|
|
14
|
+
import "./chunks/chunk-YEJVSNVF.js";
|
|
15
15
|
import "./chunks/chunk-5Z5VQRTJ.js";
|
|
16
16
|
import "./chunks/chunk-WQFG7PAH.js";
|
|
17
17
|
import "./chunks/chunk-S2HXJTAF.js";
|
|
18
|
-
import "./chunks/chunk-
|
|
19
|
-
import "./chunks/chunk-
|
|
20
|
-
import "./chunks/chunk-
|
|
18
|
+
import "./chunks/chunk-OLNQMCSR.js";
|
|
19
|
+
import "./chunks/chunk-KPNSCQNA.js";
|
|
20
|
+
import "./chunks/chunk-X5SH4HXS.js";
|
|
21
21
|
import "./chunks/chunk-UB44F4Z2.js";
|
|
22
|
-
import "./chunks/chunk-
|
|
22
|
+
import "./chunks/chunk-BXB6AX76.js";
|
|
23
23
|
import "./chunks/chunk-KSBZ2L7C.js";
|
|
24
24
|
export {
|
|
25
25
|
buildCMSItemPath,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isI18nValue
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X5SH4HXS.js";
|
|
4
4
|
|
|
5
5
|
// lib/shared/slugify.ts
|
|
6
6
|
function slugify(text) {
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
generateUniqueFilename,
|
|
52
52
|
generateFilenameFromItem
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-46AVQA4V.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
configService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YEJVSNVF.js";
|
|
4
4
|
import {
|
|
5
5
|
projectPaths,
|
|
6
6
|
resolveProjectPath,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
processStructure,
|
|
24
24
|
resolveHtmlMapping,
|
|
25
25
|
skipEmptyTemplateAttributes
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OLNQMCSR.js";
|
|
27
27
|
import {
|
|
28
28
|
DEFAULT_PREFETCH_CONFIG,
|
|
29
29
|
SSRRegistry,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
singularize,
|
|
63
63
|
validateCMSItem,
|
|
64
64
|
validateComponentDefinition
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-KPNSCQNA.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_BREAKPOINTS,
|
|
68
68
|
DEFAULT_I18N_CONFIG,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
normalizeBreakpointConfig,
|
|
75
75
|
resolveI18nValue,
|
|
76
76
|
scalePropertyValue
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-X5SH4HXS.js";
|
|
78
78
|
import {
|
|
79
79
|
isTiptapDocument,
|
|
80
80
|
tiptapToHtml
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
NODE_TYPE,
|
|
84
84
|
RAW_HTML_PREFIX,
|
|
85
85
|
init_constants
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-BXB6AX76.js";
|
|
87
87
|
import {
|
|
88
88
|
__require
|
|
89
89
|
} from "./chunk-KSBZ2L7C.js";
|
|
@@ -3303,6 +3303,7 @@ async function generateSSRHTML(pageDataOrOptions, globalComponents = {}, pagePat
|
|
|
3303
3303
|
cmsTemplatePath,
|
|
3304
3304
|
returnSeparateJS = false,
|
|
3305
3305
|
pageLibraries,
|
|
3306
|
+
pageCustomCode,
|
|
3306
3307
|
clientDataCollections,
|
|
3307
3308
|
injectLiveReload = false,
|
|
3308
3309
|
isEditor = false,
|
|
@@ -3338,6 +3339,12 @@ async function generateSSRHTML(pageDataOrOptions, globalComponents = {}, pagePat
|
|
|
3338
3339
|
}
|
|
3339
3340
|
await configService.load();
|
|
3340
3341
|
const globalLibraries = configService.getLibraries() || { js: [], css: [] };
|
|
3342
|
+
const globalCustomCode = configService.getCustomCode();
|
|
3343
|
+
const mergedCustomCode = {
|
|
3344
|
+
head: [globalCustomCode.head, pageCustomCode?.head].filter(Boolean).join("\n"),
|
|
3345
|
+
bodyStart: [globalCustomCode.bodyStart, pageCustomCode?.bodyStart].filter(Boolean).join("\n"),
|
|
3346
|
+
bodyEnd: [globalCustomCode.bodyEnd, pageCustomCode?.bodyEnd].filter(Boolean).join("\n")
|
|
3347
|
+
};
|
|
3341
3348
|
const componentLibraries = collectComponentLibraries(components, pageData.components || {});
|
|
3342
3349
|
const globalPlusComponent = mergeLibraries(globalLibraries, componentLibraries) || { js: [], css: [] };
|
|
3343
3350
|
const mergedRaw = mergeLibraries(globalPlusComponent, pageLibraries) || { js: [], css: [] };
|
|
@@ -3418,8 +3425,9 @@ ${escapedJavaScript}
|
|
|
3418
3425
|
const responsiveScalesConfig = await loadResponsiveScalesConfig();
|
|
3419
3426
|
const variablesConfig = await variableService.loadConfig();
|
|
3420
3427
|
const variablesCSS = generateVariablesCSS(variablesConfig, breakpointConfig, responsiveScalesConfig);
|
|
3421
|
-
const
|
|
3422
|
-
const
|
|
3428
|
+
const remConversionConfig = configService.getRemConversion();
|
|
3429
|
+
const utilityCSS = generateUtilityCSS(usedUtilityClasses, breakpointConfig, responsiveScalesConfig, remConversionConfig);
|
|
3430
|
+
const interactiveCSS = rendered.interactiveStylesMap.size > 0 ? generateAllInteractiveCSS(rendered.interactiveStylesMap, breakpointConfig, remConversionConfig) : "";
|
|
3423
3431
|
printMissingStyleWarnings(false);
|
|
3424
3432
|
const baseCSS = `* {
|
|
3425
3433
|
margin: 0;
|
|
@@ -3446,6 +3454,8 @@ picture {
|
|
|
3446
3454
|
}
|
|
3447
3455
|
.oem {
|
|
3448
3456
|
display: inline-block;
|
|
3457
|
+
vertical-align: top;
|
|
3458
|
+
line-height: 0;
|
|
3449
3459
|
}`;
|
|
3450
3460
|
const combinedCSS = [
|
|
3451
3461
|
fontCSS,
|
|
@@ -3487,13 +3497,13 @@ picture {
|
|
|
3487
3497
|
<meta charset="UTF-8">
|
|
3488
3498
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
3489
3499
|
${iconTags ? iconTags + "\n " : ""}${scriptPreloadTag ? scriptPreloadTag + "\n " : ""}${imagePreloadTags ? imagePreloadTags + "\n " : ""}${fontPreloadTags ? fontPreloadTags + "\n " : ""}${libraryTags.headCSS ? libraryTags.headCSS + "\n " : ""}${libraryTags.headJS ? libraryTags.headJS + "\n " : ""}${rendered.meta}
|
|
3490
|
-
${configInlineScript}${cmsInlineScript}${clientDataScripts}<style id="meno-styles">${styleContent}</style
|
|
3500
|
+
${configInlineScript}${cmsInlineScript}${clientDataScripts}<style id="meno-styles">${styleContent}</style>${mergedCustomCode.head ? "\n " + mergedCustomCode.head : ""}
|
|
3491
3501
|
</head>
|
|
3492
|
-
<body
|
|
3502
|
+
<body>${mergedCustomCode.bodyStart ? "\n " + mergedCustomCode.bodyStart : ""}
|
|
3493
3503
|
<div id="root">
|
|
3494
3504
|
${rendered.html}
|
|
3495
3505
|
</div>
|
|
3496
|
-
${clientScript}${componentScript}${libraryTags.bodyEndJS ? "\n " + libraryTags.bodyEndJS : ""}${liveReloadScript ? "\n " + liveReloadScript : ""}${scrollHandlerScript ? "\n " + scrollHandlerScript : ""}
|
|
3506
|
+
${clientScript}${componentScript}${libraryTags.bodyEndJS ? "\n " + libraryTags.bodyEndJS : ""}${liveReloadScript ? "\n " + liveReloadScript : ""}${scrollHandlerScript ? "\n " + scrollHandlerScript : ""}${mergedCustomCode.bodyEnd ? "\n " + mergedCustomCode.bodyEnd : ""}
|
|
3497
3507
|
</body>
|
|
3498
3508
|
</html>`;
|
|
3499
3509
|
if (returnSeparateJS) {
|
|
@@ -5967,4 +5977,4 @@ export {
|
|
|
5967
5977
|
FileSystemCMSProvider,
|
|
5968
5978
|
migrateTemplatesDirectory
|
|
5969
5979
|
};
|
|
5970
|
-
//# sourceMappingURL=chunk-
|
|
5980
|
+
//# sourceMappingURL=chunk-5RFOQU7L.js.map
|