meno-core 1.0.44 → 1.0.45
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/dist/bin/cli.js +1 -1
- package/dist/build-static.js +8 -8
- package/dist/chunks/{chunk-KPNSCQNA.js → chunk-5ZASE4IG.js} +53 -10
- package/dist/chunks/chunk-5ZASE4IG.js.map +7 -0
- package/dist/chunks/{chunk-3XXLBUYA.js → chunk-BZQKEJQY.js} +9 -8
- package/dist/chunks/{chunk-3XXLBUYA.js.map → chunk-BZQKEJQY.js.map} +2 -2
- package/dist/chunks/{chunk-OLNQMCSR.js → chunk-F7MA62WG.js} +3 -3
- package/dist/chunks/{chunk-2NBGG2LJ.js → chunk-GYF3ABI3.js} +87 -2
- package/dist/chunks/{chunk-2NBGG2LJ.js.map → chunk-GYF3ABI3.js.map} +2 -2
- package/dist/chunks/{chunk-46AVQA4V.js → chunk-IF3RATBY.js} +2 -2
- package/dist/chunks/{chunk-S2HXJTAF.js → chunk-KITQJYZV.js} +5 -1
- package/dist/chunks/chunk-KITQJYZV.js.map +7 -0
- package/dist/chunks/{chunk-BXB6AX76.js → chunk-NZTSJS5C.js} +6 -3
- package/dist/chunks/chunk-NZTSJS5C.js.map +7 -0
- package/dist/chunks/{chunk-G3WIPJN3.js → chunk-OUNJ76QM.js} +5 -5
- package/dist/chunks/{chunk-5TJA272J.js → chunk-TVH3TC2T.js} +8 -8
- package/dist/chunks/{chunk-YEJVSNVF.js → chunk-WQSG5WHC.js} +13 -2
- package/dist/chunks/chunk-WQSG5WHC.js.map +7 -0
- package/dist/chunks/{chunk-X5SH4HXS.js → chunk-XSWR3QLI.js} +33 -1
- package/dist/chunks/chunk-XSWR3QLI.js.map +7 -0
- package/dist/chunks/{configService-KYO3TXDS.js → configService-6KTT6GRT.js} +3 -3
- package/dist/chunks/{constants-34NUGHQR.js → constants-L5IKLB6U.js} +2 -2
- package/dist/entries/server-router.js +9 -9
- package/dist/lib/client/index.js +5 -5
- package/dist/lib/server/index.js +10 -10
- package/dist/lib/shared/index.js +10 -6
- package/dist/lib/shared/index.js.map +1 -1
- package/dist/lib/test-utils/index.js +1 -1
- package/lib/server/services/configService.ts +13 -0
- package/lib/server/ssr/htmlGenerator.ts +4 -1
- package/lib/shared/constants.ts +8 -2
- package/lib/shared/cssGeneration.ts +11 -0
- package/lib/shared/cssProperties.ts +97 -2
- package/lib/shared/nodeUtils.ts +28 -0
- package/lib/shared/responsiveScaling.test.ts +20 -3
- package/lib/shared/responsiveScaling.ts +55 -1
- package/lib/shared/responsiveStyleUtils.test.ts +7 -8
- package/lib/shared/responsiveStyleUtils.ts +6 -7
- package/lib/shared/types/components.ts +1 -1
- package/lib/shared/types/variables.test.ts +9 -2
- package/lib/shared/types/variables.ts +5 -1
- package/lib/shared/utilityClassMapper.ts +14 -1
- package/lib/shared/validation/propValidator.ts +6 -0
- package/lib/shared/validation/schemas.ts +2 -2
- package/package.json +1 -1
- package/dist/chunks/chunk-BXB6AX76.js.map +0 -7
- package/dist/chunks/chunk-KPNSCQNA.js.map +0 -7
- package/dist/chunks/chunk-S2HXJTAF.js.map +0 -7
- package/dist/chunks/chunk-X5SH4HXS.js.map +0 -7
- package/dist/chunks/chunk-YEJVSNVF.js.map +0 -7
- /package/dist/chunks/{chunk-OLNQMCSR.js.map → chunk-F7MA62WG.js.map} +0 -0
- /package/dist/chunks/{chunk-46AVQA4V.js.map → chunk-IF3RATBY.js.map} +0 -0
- /package/dist/chunks/{chunk-G3WIPJN3.js.map → chunk-OUNJ76QM.js.map} +0 -0
- /package/dist/chunks/{chunk-5TJA272J.js.map → chunk-TVH3TC2T.js.map} +0 -0
- /package/dist/chunks/{configService-KYO3TXDS.js.map → configService-6KTT6GRT.js.map} +0 -0
- /package/dist/chunks/{constants-34NUGHQR.js.map → constants-L5IKLB6U.js.map} +0 -0
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-L5IKLB6U.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-OUNJ76QM.js";
|
|
13
|
+
import "./chunks/chunk-BZQKEJQY.js";
|
|
14
|
+
import "./chunks/chunk-WQSG5WHC.js";
|
|
15
15
|
import "./chunks/chunk-5Z5VQRTJ.js";
|
|
16
16
|
import "./chunks/chunk-WQFG7PAH.js";
|
|
17
|
-
import "./chunks/chunk-
|
|
18
|
-
import "./chunks/chunk-
|
|
19
|
-
import "./chunks/chunk-
|
|
20
|
-
import "./chunks/chunk-
|
|
17
|
+
import "./chunks/chunk-KITQJYZV.js";
|
|
18
|
+
import "./chunks/chunk-F7MA62WG.js";
|
|
19
|
+
import "./chunks/chunk-5ZASE4IG.js";
|
|
20
|
+
import "./chunks/chunk-XSWR3QLI.js";
|
|
21
21
|
import "./chunks/chunk-UB44F4Z2.js";
|
|
22
|
-
import "./chunks/chunk-
|
|
22
|
+
import "./chunks/chunk-NZTSJS5C.js";
|
|
23
23
|
import "./chunks/chunk-KSBZ2L7C.js";
|
|
24
24
|
export {
|
|
25
25
|
buildCMSItemPath,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
resolveI18nValue,
|
|
11
11
|
scalePropertyValue,
|
|
12
12
|
shouldConvertProperty
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XSWR3QLI.js";
|
|
14
14
|
import {
|
|
15
15
|
isTiptapDocument,
|
|
16
16
|
tiptapToHtml
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
NODE_TYPE,
|
|
20
20
|
init_constants
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-NZTSJS5C.js";
|
|
22
22
|
import {
|
|
23
23
|
__esm,
|
|
24
24
|
__export,
|
|
@@ -32,8 +32,8 @@ var init_schemas = __esm({
|
|
|
32
32
|
"lib/shared/validation/schemas.ts"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
init_constants();
|
|
35
|
-
BasePropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text"]);
|
|
36
|
-
PropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "list"]);
|
|
35
|
+
BasePropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "embed"]);
|
|
36
|
+
PropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "embed", "list"]);
|
|
37
37
|
BasePropDefinitionSchema = z.object({
|
|
38
38
|
type: BasePropTypeSchema,
|
|
39
39
|
default: z.union([z.string(), z.number(), z.boolean(), z.object({ href: z.string(), target: z.string().optional() })]).optional(),
|
|
@@ -2278,10 +2278,9 @@ function mergeResponsiveStyles(responsiveStyle, strategy = "all", viewportWidth,
|
|
|
2278
2278
|
return merged;
|
|
2279
2279
|
}
|
|
2280
2280
|
const breakpointEntries = Object.entries(breakpointValues);
|
|
2281
|
-
breakpointEntries.sort((a, b) =>
|
|
2282
|
-
const activeBreakpointValue = breakpointValues[activeBreakpoint];
|
|
2281
|
+
breakpointEntries.sort((a, b) => b[1] - a[1]);
|
|
2283
2282
|
for (const [name, value] of breakpointEntries) {
|
|
2284
|
-
if (
|
|
2283
|
+
if (viewportWidth <= value && responsiveStyle[name]) {
|
|
2285
2284
|
Object.assign(merged, responsiveStyle[name]);
|
|
2286
2285
|
}
|
|
2287
2286
|
}
|
|
@@ -2397,6 +2396,25 @@ function isLikelyComponentTag(tag) {
|
|
|
2397
2396
|
function isSlotMarker(node) {
|
|
2398
2397
|
return node?.type === NODE_TYPE.SLOT;
|
|
2399
2398
|
}
|
|
2399
|
+
function componentHasSlot(def) {
|
|
2400
|
+
const structure = def?.component?.structure;
|
|
2401
|
+
if (!structure) return false;
|
|
2402
|
+
return structureContainsSlot(structure);
|
|
2403
|
+
}
|
|
2404
|
+
function structureContainsSlot(node) {
|
|
2405
|
+
if (node == null) return false;
|
|
2406
|
+
if (Array.isArray(node)) {
|
|
2407
|
+
for (const item of node) {
|
|
2408
|
+
if (structureContainsSlot(item)) return true;
|
|
2409
|
+
}
|
|
2410
|
+
return false;
|
|
2411
|
+
}
|
|
2412
|
+
if (typeof node !== "object") return false;
|
|
2413
|
+
const obj = node;
|
|
2414
|
+
if (obj.type === NODE_TYPE.SLOT) return true;
|
|
2415
|
+
if (obj.children !== void 0) return structureContainsSlot(obj.children);
|
|
2416
|
+
return false;
|
|
2417
|
+
}
|
|
2400
2418
|
function isEmbedNode(node) {
|
|
2401
2419
|
return node?.type === NODE_TYPE.EMBED;
|
|
2402
2420
|
}
|
|
@@ -2601,6 +2619,10 @@ function validateSingleProp(propName, propDef, value) {
|
|
|
2601
2619
|
coercedValue = value;
|
|
2602
2620
|
typeValid = typeof value === "string";
|
|
2603
2621
|
break;
|
|
2622
|
+
case "embed":
|
|
2623
|
+
coercedValue = value;
|
|
2624
|
+
typeValid = typeof value === "string";
|
|
2625
|
+
break;
|
|
2604
2626
|
case "list":
|
|
2605
2627
|
coercedValue = value;
|
|
2606
2628
|
typeValid = Array.isArray(value) || isI18nValue(value);
|
|
@@ -3242,7 +3264,16 @@ function propertyValueToClass(prop, value) {
|
|
|
3242
3264
|
registerDynamicStyle(className2, cssProperty, value);
|
|
3243
3265
|
return className2;
|
|
3244
3266
|
}
|
|
3245
|
-
|
|
3267
|
+
let stringValue = String(value);
|
|
3268
|
+
if (prop === "fontFamily") {
|
|
3269
|
+
stringValue = stringValue.split(",").map((font) => {
|
|
3270
|
+
const trimmed = font.trim();
|
|
3271
|
+
if (trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'")) {
|
|
3272
|
+
return trimmed.slice(1, -1);
|
|
3273
|
+
}
|
|
3274
|
+
return trimmed;
|
|
3275
|
+
}).join(", ");
|
|
3276
|
+
}
|
|
3246
3277
|
let className = null;
|
|
3247
3278
|
if (specialValueMappings[prop]) {
|
|
3248
3279
|
const mapping = specialValueMappings[prop];
|
|
@@ -3837,7 +3868,18 @@ var AUTO_RESPONSIVE_TYPE_MAP = {
|
|
|
3837
3868
|
"font-size": "fontSize",
|
|
3838
3869
|
"gap": "gap",
|
|
3839
3870
|
"row-gap": "gap",
|
|
3840
|
-
"column-gap": "gap"
|
|
3871
|
+
"column-gap": "gap",
|
|
3872
|
+
"border-radius": "borderRadius",
|
|
3873
|
+
"border-top-left-radius": "borderRadius",
|
|
3874
|
+
"border-top-right-radius": "borderRadius",
|
|
3875
|
+
"border-bottom-left-radius": "borderRadius",
|
|
3876
|
+
"border-bottom-right-radius": "borderRadius",
|
|
3877
|
+
"width": "size",
|
|
3878
|
+
"height": "size",
|
|
3879
|
+
"max-width": "size",
|
|
3880
|
+
"max-height": "size",
|
|
3881
|
+
"min-width": "size",
|
|
3882
|
+
"min-height": "size"
|
|
3841
3883
|
};
|
|
3842
3884
|
function escapeCSSClassName(className) {
|
|
3843
3885
|
return className.replace(/[.#[\](){};<>+~:,%\/\s]/g, "\\$&");
|
|
@@ -4468,6 +4510,7 @@ export {
|
|
|
4468
4510
|
extractNodeProperties,
|
|
4469
4511
|
isLikelyComponentTag,
|
|
4470
4512
|
isSlotMarker,
|
|
4513
|
+
componentHasSlot,
|
|
4471
4514
|
isEmbedNode,
|
|
4472
4515
|
isLinkNode,
|
|
4473
4516
|
isLocaleListNode,
|
|
@@ -4544,4 +4587,4 @@ export {
|
|
|
4544
4587
|
generateInteractiveCSS,
|
|
4545
4588
|
generateAllInteractiveCSS
|
|
4546
4589
|
};
|
|
4547
|
-
//# sourceMappingURL=chunk-
|
|
4590
|
+
//# sourceMappingURL=chunk-5ZASE4IG.js.map
|