meno-core 1.0.45 → 1.0.47
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 +211 -124
- package/dist/bin/cli.js +2 -2
- package/dist/build-static.js +7 -7
- package/dist/chunks/{chunk-NZTSJS5C.js → chunk-2QK6U5UK.js} +3 -2
- package/dist/chunks/{chunk-NZTSJS5C.js.map → chunk-2QK6U5UK.js.map} +2 -2
- package/dist/chunks/{chunk-TVH3TC2T.js → chunk-47UNLQUU.js} +6 -6
- package/dist/chunks/{chunk-F7MA62WG.js → chunk-BCLGRZ3U.js} +5 -5
- package/dist/chunks/{chunk-F7MA62WG.js.map → chunk-BCLGRZ3U.js.map} +2 -2
- package/dist/chunks/{chunk-5ZASE4IG.js → chunk-FED5MME6.js} +234 -11
- package/dist/chunks/{chunk-5ZASE4IG.js.map → chunk-FED5MME6.js.map} +3 -3
- package/dist/chunks/{chunk-BZQKEJQY.js → chunk-FGUZOYJX.js} +49 -30
- package/dist/chunks/chunk-FGUZOYJX.js.map +7 -0
- package/dist/chunks/{chunk-5Z5VQRTJ.js → chunk-I7YIGZXT.js} +4 -4
- package/dist/chunks/{chunk-5Z5VQRTJ.js.map → chunk-I7YIGZXT.js.map} +2 -2
- package/dist/chunks/{chunk-OUNJ76QM.js → chunk-LJFB5EBT.js} +5 -5
- package/dist/chunks/{chunk-GYF3ABI3.js → chunk-UUA5LEWF.js} +3 -3
- package/dist/chunks/{chunk-GYF3ABI3.js.map → chunk-UUA5LEWF.js.map} +2 -2
- package/dist/chunks/{chunk-WQSG5WHC.js → chunk-ZTKHJQ2Z.js} +2 -2
- package/dist/chunks/{configService-6KTT6GRT.js → configService-DYCUEURL.js} +3 -3
- package/dist/chunks/{constants-L5IKLB6U.js → constants-GWBAD66U.js} +2 -2
- package/dist/entries/server-router.js +7 -7
- package/dist/lib/client/index.js +7 -5
- package/dist/lib/client/index.js.map +2 -2
- package/dist/lib/server/index.js +631 -208
- package/dist/lib/server/index.js.map +3 -3
- package/dist/lib/shared/index.js +7 -3
- package/dist/lib/shared/index.js.map +2 -2
- package/dist/lib/test-utils/index.js +1 -1
- package/lib/client/core/ComponentBuilder.test.ts +21 -0
- package/lib/client/core/ComponentBuilder.ts +8 -1
- package/lib/client/templateEngine.test.ts +64 -0
- package/lib/server/astro/astroEmitHelpers.ts +23 -0
- package/lib/server/astro/cmsPageEmitter.ts +46 -3
- package/lib/server/astro/componentEmitter.test.ts +59 -0
- package/lib/server/astro/componentEmitter.ts +53 -12
- package/lib/server/astro/cssCollector.ts +58 -11
- package/lib/server/astro/nodeToAstro.test.ts +397 -5
- package/lib/server/astro/nodeToAstro.ts +494 -65
- package/lib/server/astro/pageEmitter.ts +46 -3
- package/lib/server/astro/tailwindMapper.test.ts +119 -0
- package/lib/server/astro/tailwindMapper.ts +67 -1
- package/lib/server/runtime/httpServer.ts +12 -4
- package/lib/server/ssr/htmlGenerator.test.ts +3 -2
- package/lib/server/ssr/htmlGenerator.ts +6 -1
- package/lib/server/ssr/imageMetadata.ts +15 -9
- package/lib/server/ssr/jsCollector.ts +2 -2
- package/lib/server/ssr/ssrRenderer.test.ts +79 -0
- package/lib/server/ssr/ssrRenderer.ts +35 -20
- package/lib/shared/constants.ts +1 -0
- package/lib/shared/cssGeneration.test.ts +109 -3
- package/lib/shared/cssGeneration.ts +98 -13
- package/lib/shared/cssNamedColors.ts +47 -0
- package/lib/shared/cssProperties.ts +2 -2
- package/lib/shared/index.ts +1 -0
- package/lib/shared/styleNodeUtils.test.ts +47 -1
- package/lib/shared/styleNodeUtils.ts +7 -7
- package/package.json +1 -1
- package/dist/chunks/chunk-BZQKEJQY.js.map +0 -7
- /package/dist/chunks/{chunk-TVH3TC2T.js.map → chunk-47UNLQUU.js.map} +0 -0
- /package/dist/chunks/{chunk-OUNJ76QM.js.map → chunk-LJFB5EBT.js.map} +0 -0
- /package/dist/chunks/{chunk-WQSG5WHC.js.map → chunk-ZTKHJQ2Z.js.map} +0 -0
- /package/dist/chunks/{configService-6KTT6GRT.js.map → configService-DYCUEURL.js.map} +0 -0
- /package/dist/chunks/{constants-L5IKLB6U.js.map → constants-GWBAD66U.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { ComponentNode, HtmlNode, ComponentInstanceNode, StyleValue, ResponsiveStyleObject } from './types';
|
|
7
|
-
import { isComponentNode, isHtmlNode, isEmbedNode, isListNode } from './nodeUtils';
|
|
7
|
+
import { isComponentNode, isHtmlNode, isEmbedNode, isListNode, isLinkNode } from './nodeUtils';
|
|
8
8
|
import { isResponsiveStyle } from './styleUtils';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -26,8 +26,8 @@ export function applyStylesToNode(
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
node.props.style = { ...(node.props.style || {}), ...styles };
|
|
29
|
-
} else if (isHtmlNode(node) || isEmbedNode(node) || isListNode(node)) {
|
|
30
|
-
// HTML node, Embed node, and
|
|
29
|
+
} else if (isHtmlNode(node) || isEmbedNode(node) || isListNode(node) || isLinkNode(node)) {
|
|
30
|
+
// HTML node, Embed node, List node, and Link node: put styles at top level
|
|
31
31
|
node.style = styles as StyleValue;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -79,8 +79,8 @@ export function mergeNodeStyles(
|
|
|
79
79
|
): ComponentNode {
|
|
80
80
|
if (!instanceStyles) return node;
|
|
81
81
|
|
|
82
|
-
if (isHtmlNode(node) || isEmbedNode(node) || isListNode(node)) {
|
|
83
|
-
// For HTML nodes, Embed nodes, and
|
|
82
|
+
if (isHtmlNode(node) || isEmbedNode(node) || isListNode(node) || isLinkNode(node)) {
|
|
83
|
+
// For HTML nodes, Embed nodes, List nodes, and Link nodes: merge instance styles with existing top-level styles
|
|
84
84
|
const existingStyle = node.style;
|
|
85
85
|
if (existingStyle && typeof existingStyle === 'object') {
|
|
86
86
|
node.style = deepMergeStyles(existingStyle, instanceStyles);
|
|
@@ -117,8 +117,8 @@ export function extractStylesFromNode(
|
|
|
117
117
|
if (!style) return {};
|
|
118
118
|
|
|
119
119
|
return style as Record<string, string | number>;
|
|
120
|
-
} else if (isHtmlNode(node) || isEmbedNode(node)) {
|
|
121
|
-
// HTML node and
|
|
120
|
+
} else if (isHtmlNode(node) || isEmbedNode(node) || isLinkNode(node)) {
|
|
121
|
+
// HTML node, Embed node, and Link node: styles are at top level
|
|
122
122
|
const style = node.style;
|
|
123
123
|
if (!style) return {};
|
|
124
124
|
|