@tokenoftrust/storefront-runner 7.8.6 → 7.8.7
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.
|
@@ -145,7 +145,7 @@ export async function resolveTenantRouting(
|
|
|
145
145
|
if (selfMatch && hostSegments[1] === "preview") {
|
|
146
146
|
return {
|
|
147
147
|
tenant: byHost,
|
|
148
|
-
basePath:
|
|
148
|
+
basePath: "",
|
|
149
149
|
renderPath: normalizePath(hostSegments.slice(1).join("/")),
|
|
150
150
|
};
|
|
151
151
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "7.8.
|
|
3
|
+
"version": "7.8.7",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
|
|
6
6
|
"packageManager": "pnpm@11.9.0",
|
|
@@ -531,7 +531,88 @@ function adoptCssReferences(refs: ExtractedReference[], cssRefs: readonly Extrac
|
|
|
531
531
|
for (const ref of cssRefs) refs.push(afterBase ? { ...ref, afterBase: true } : ref);
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
-
|
|
534
|
+
/**
|
|
535
|
+
* CSS custom properties the platform always provides on every page (`themeToCssVars` in
|
|
536
|
+
* `apps/storefront/src/themes/schema.ts` and `@theme` / `@layer base` in `styles/global.css`).
|
|
537
|
+
* None of these ever resolve to an image URL, so a tenant stylesheet that reads `var(--color-bg)`
|
|
538
|
+
* or `var(--font-display)` in a `background` or `font` declaration is never deferred as an
|
|
539
|
+
* unknown image variable.
|
|
540
|
+
*/
|
|
541
|
+
const PLATFORM_CUSTOM_PROPERTIES = [
|
|
542
|
+
"--color-bg",
|
|
543
|
+
"--color-surface",
|
|
544
|
+
"--color-surface-2",
|
|
545
|
+
"--color-text",
|
|
546
|
+
"--color-muted",
|
|
547
|
+
"--color-primary",
|
|
548
|
+
"--color-primary-contrast",
|
|
549
|
+
"--color-primary-hover",
|
|
550
|
+
"--color-accent",
|
|
551
|
+
"--color-accent-ink",
|
|
552
|
+
"--color-accent-contrast",
|
|
553
|
+
"--color-accent-hover",
|
|
554
|
+
"--color-border",
|
|
555
|
+
"--color-field-border",
|
|
556
|
+
"--color-success",
|
|
557
|
+
"--color-sale",
|
|
558
|
+
"--color-warning",
|
|
559
|
+
"--color-error",
|
|
560
|
+
"--color-info",
|
|
561
|
+
"--color-focus-ring",
|
|
562
|
+
"--color-disabled",
|
|
563
|
+
"--color-disabled-contrast",
|
|
564
|
+
"--color-star",
|
|
565
|
+
"--color-cta",
|
|
566
|
+
"--color-cta-hover",
|
|
567
|
+
"--color-cta-contrast",
|
|
568
|
+
"--color-trust",
|
|
569
|
+
"--color-hero-eyebrow",
|
|
570
|
+
"--font-display",
|
|
571
|
+
"--font-body",
|
|
572
|
+
"--font-mono",
|
|
573
|
+
"--type-scale",
|
|
574
|
+
"--type-tracking",
|
|
575
|
+
"--fs-xs",
|
|
576
|
+
"--fs-sm",
|
|
577
|
+
"--fs-base",
|
|
578
|
+
"--fs-md",
|
|
579
|
+
"--fs-lg",
|
|
580
|
+
"--fs-xl",
|
|
581
|
+
"--fs-2xl",
|
|
582
|
+
"--fs-3xl",
|
|
583
|
+
"--fs-4xl",
|
|
584
|
+
"--fs-5xl",
|
|
585
|
+
"--heading-hero",
|
|
586
|
+
"--heading-h1",
|
|
587
|
+
"--heading-h2",
|
|
588
|
+
"--heading-h3",
|
|
589
|
+
"--space-base",
|
|
590
|
+
"--space-0",
|
|
591
|
+
"--space-1",
|
|
592
|
+
"--space-2",
|
|
593
|
+
"--space-3",
|
|
594
|
+
"--space-4",
|
|
595
|
+
"--space-5",
|
|
596
|
+
"--space-6",
|
|
597
|
+
"--space-7",
|
|
598
|
+
"--space-8",
|
|
599
|
+
"--space-9",
|
|
600
|
+
"--container-max",
|
|
601
|
+
"--section-rhythm",
|
|
602
|
+
"--radius-sm",
|
|
603
|
+
"--radius-md",
|
|
604
|
+
"--radius-lg",
|
|
605
|
+
"--radius-full",
|
|
606
|
+
"--border-thin",
|
|
607
|
+
"--border-medium",
|
|
608
|
+
"--border-thick",
|
|
609
|
+
"--shadow-sm",
|
|
610
|
+
"--shadow-md",
|
|
611
|
+
"--shadow-lg",
|
|
612
|
+
"--tap-target",
|
|
613
|
+
] as const;
|
|
614
|
+
|
|
615
|
+
const NO_DECLARED_CUSTOM_PROPERTIES: ReadonlySet<string> = new Set(PLATFORM_CUSTOM_PROPERTIES);
|
|
535
616
|
|
|
536
617
|
/**
|
|
537
618
|
* CSS extraction uses a JavaScript parser because this module is imported by
|
|
@@ -1496,7 +1577,7 @@ function rawCssChunksInHtml(html: string): Array<{ css: string; kind: "styleshee
|
|
|
1496
1577
|
* captured at the declaration itself.
|
|
1497
1578
|
*/
|
|
1498
1579
|
export function collectDeclaredCustomProperties(artifacts: readonly ImageDependencyArtifact[]): Set<string> {
|
|
1499
|
-
const declared = new Set<string>();
|
|
1580
|
+
const declared = new Set<string>(PLATFORM_CUSTOM_PROPERTIES);
|
|
1500
1581
|
for (const artifact of artifacts) {
|
|
1501
1582
|
const kind = inferKind(artifact);
|
|
1502
1583
|
if (kind === "css") {
|