feat: wire page options through aggregate AI flow
This commit is contained in:
@@ -11,6 +11,7 @@ export type PageOptionSurface =
|
||||
| "inspector_only";
|
||||
|
||||
export type PageOptionRuntimeSupport = "wired" | "planned" | "ui_only";
|
||||
export type PageOptionPanelPolicy = "keep" | "downgrade" | "global_only";
|
||||
|
||||
export type PageOptionSemanticDescriptor = {
|
||||
surfaces: PageOptionSurface[];
|
||||
@@ -98,6 +99,25 @@ export type LeptosTiptapRuntimePageOptions = {
|
||||
embedDefaultBlockId: string | null;
|
||||
};
|
||||
|
||||
export const PAGE_OPTION_PANEL_POLICY: Record<
|
||||
BooleanPageOptionKey | "pageFont" | "layoutDensity" | "showStructure" | "embedDefaultBlockId",
|
||||
PageOptionPanelPolicy
|
||||
> = {
|
||||
wideLayout: "keep",
|
||||
smallText: "keep",
|
||||
showHeadingNumbers: "keep",
|
||||
showToc: "keep",
|
||||
showStructure: "global_only",
|
||||
protectEditing: "downgrade",
|
||||
showWordCount: "keep",
|
||||
collapseBacklinks: "keep",
|
||||
pageFont: "keep",
|
||||
layoutDensity: "keep",
|
||||
hideChildPages: "keep",
|
||||
showBlockRefCount: "downgrade",
|
||||
embedDefaultBlockId: "keep",
|
||||
};
|
||||
|
||||
export function pickLeptosTiptapRuntimePageOptions(
|
||||
pageOptions: PageOptionsState,
|
||||
): LeptosTiptapRuntimePageOptions {
|
||||
|
||||
Reference in New Issue
Block a user