@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.
@@ -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) return resolveStaticValue(source.innerHTML, context.scope) ?? "";
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