refactor(stylesheet): move Semantic CSS to the browser (#3329)

This commit is contained in:
Amruth Pillai
2026-08-16 16:50:27 +02:00
committed by GitHub
parent f848e57436
commit 9509b5bc2e
203 changed files with 11838 additions and 14842 deletions
-35
View File
@@ -1,44 +1,9 @@
import type { ResumeData } from "@reactive-resume/schema/resume/data";
import type { StylesheetMode, StylesheetSource } from "@reactive-resume/schema/resume/stylesheet";
import type { Template } from "@reactive-resume/schema/templates";
import type { ResolvedResumeRuntime } from "./resolve";
import { resolveResumeRuntime, resolveStylesheetMode } from "./resolve";
export type InspectResumePdfOptions = {
data: ResumeData;
template?: Template | undefined;
applied?: StylesheetSource | undefined;
mode?: StylesheetMode | undefined;
};
export type ResumePdfRenderResult<T> =
| { ok: true; value: T; diagnostics: ResolvedResumeRuntime["diagnostics"] }
| { ok: false; diagnostics: ResolvedResumeRuntime["diagnostics"] };
export const inspectResumePdf = ({
data,
template = data.metadata.template,
applied,
mode = resolveStylesheetMode(data),
}: InspectResumePdfOptions): ResolvedResumeRuntime =>
resolveResumeRuntime({
data,
template,
mode,
...(applied ? { applied } : {}),
});
export const hasSemanticErrors = ({ diagnostics }: Pick<ResolvedResumeRuntime, "diagnostics">): boolean =>
diagnostics.some(({ severity }) => severity === "error");
export type {
ResolvedResumeRuntime,
ResolveResumePresentationInput,
} from "./resolve";
export * from "./legacy-converter";
export * from "./legacy-parity";
export * from "./preflight-core";
export * from "./public-projection";
export {
resolveResumePresentation,
resolveResumeRuntime,