@stacksjs/stx 0.2.181 → 0.2.182

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/process.js CHANGED
@@ -41,7 +41,7 @@ import { processDynamicComponents } from "./dynamic-components.js";
41
41
  import { dedupeScopedStyles, processScopedStyles } from "./style-scoping.js";
42
42
  import { injectColorModeBootScript, normalizeCriticalHeadOrder } from "./color-mode-boot.js";
43
43
  import { injectBuildId } from "./build-id.js";
44
- import { applyHtmlAttrs, ensureDocumentShell, hasDocumentShell, injectCloakStyle, injectConfigHeadTags, mergeHtmlAttrs, startsDocument } from "./document-shell.js";
44
+ import { applyHtmlAttrs, ensureDocumentShell, hasDocumentShell, injectCloakStyle, injectConfigHeadTags, mergeHtmlAttrs, metaDedupKey, startsDocument } from "./document-shell.js";
45
45
  import { hasSignalsSyntax, convertSignalDirectivesToAttributes, convertSignalLoopsToAttributes, preEvalLiteralReactiveIfs, processSignals } from "./signal-processing.js";
46
46
  import { processComponents } from "./component-renderer.js";
47
47
  import { processInlineAssets } from "./inline-assets.js";
@@ -275,10 +275,13 @@ export async function processDirectives(template, context, filePath, options, de
275
275
  pageHeadTitle = rawTitleMatch[1].trim();
276
276
  pageHeadRaw = pageHeadRaw.replace(rawTitleMatch[0], "").trim();
277
277
  }
278
- const sectionTitle = context.__sections?.title, pageTitle = runtimeHead.title || pageHeadTitle || sectionTitle, titleIsHtml = !runtimeHead.title && (!!pageHeadTitle || !!sectionTitle), headConfig = {
278
+ const sectionTitle = context.__sections?.title, pageTitle = runtimeHead.title || pageHeadTitle || sectionTitle, titleIsHtml = !runtimeHead.title && (!!pageHeadTitle || !!sectionTitle), runtimeMeta = runtimeHead.meta || [], overriddenMetaKeys = new Set(runtimeMeta.map((m) => metaDedupKey(m)).filter(Boolean)), headConfig = {
279
279
  ...baseHeadConfig,
280
280
  ...pageTitle && { title: pageTitle },
281
- meta: [...baseHeadConfig.meta || [], ...runtimeHead.meta || []],
281
+ meta: [
282
+ ...(baseHeadConfig.meta || []).filter((m) => !overriddenMetaKeys.has(metaDedupKey(m))),
283
+ ...runtimeMeta
284
+ ],
282
285
  link: [...baseHeadConfig.link || [], ...runtimeHead.link || []],
283
286
  script: [...baseHeadConfig.script || [], ...runtimeHead.script || []],
284
287
  headRaw: [baseHeadConfig.headRaw, pageHeadRaw].filter(Boolean).join(`