@jxsuite/compiler 0.0.1 → 0.5.0
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/compiler.js +257 -90
- package/package.json +20 -9
- package/src/compiler.js +15 -4
- package/src/shared.js +251 -6
- package/src/site/content-loader.js +3 -3
- package/src/site/pages-discovery.js +20 -8
- package/src/site/site-build.js +178 -14
- package/src/targets/compile-client.js +9 -7
- package/src/targets/compile-element.js +57 -2
- package/src/targets/compile-markdown.js +942 -0
- package/src/targets/compile-static.js +3 -2
|
@@ -26,7 +26,7 @@ export function compileStaticPage(raw, opts) {
|
|
|
26
26
|
const { title, reactivitySrc, litHtmlSrc } = opts;
|
|
27
27
|
|
|
28
28
|
const rootContext = createCompileContext(raw, null, raw.state ?? {}, raw.$media ?? {});
|
|
29
|
-
const styleBlock = compileStyles(raw, raw.$media ?? {});
|
|
29
|
+
const styleBlock = compileStyles(raw, raw.$media ?? {}, opts.projectStyle ?? null);
|
|
30
30
|
/** @type {{ def: any; tagName: string; className: string }[]} */
|
|
31
31
|
const islands = [];
|
|
32
32
|
const bodyContent = compileNode(raw, false, raw, rootContext, islands);
|
|
@@ -140,7 +140,8 @@ function buildInnerWithIslands(def, raw, context, islands) {
|
|
|
140
140
|
const value = resolveStaticValue(source.textContent, context.scope);
|
|
141
141
|
return value == null ? "" : escapeHtml(String(value));
|
|
142
142
|
}
|
|
143
|
-
if (source.innerHTML)
|
|
143
|
+
if (source.innerHTML)
|
|
144
|
+
return resolveStaticValue(source.innerHTML, context.scope) ?? source.innerHTML;
|
|
144
145
|
if (Array.isArray(source.children)) {
|
|
145
146
|
const rawChildren = raw?.children;
|
|
146
147
|
return source.children
|