All blocks

Page Editor

Collaborative document editor with a resizable pages tree and live block outline, formatting toolbar, page-width switcher, inline-editable structured blocks (headings, paragraphs, callouts, checklists, code snippets), collaborator presence, review comments, and share controls.

Saved
CLMSHS
RFC-019Edited 4 min ago · 215 words · 2 min read

1. Perceptual Contrast Guardrails

Every interactive surface must maintain at least 4.5:1 contrast for body typography and 3:1 for focus rings and control boundaries in both light and dark color schemes. Semantic elevation steps derive from the base OKLCH lightness ramp rather than opaque overlays so nested panels stay legible at every contrast setting.

Scope for the v4.2 token release
These rules apply to semanticColors.fgMuted, semanticColors.borderEmphasized, and every palette solid/contrast pair. Legacy hex aliases remain deprecated until Q3.

2. Reduced-Motion Fallbacks

Transient disclosures (menus, popovers, dialogs, and tree branches) animate opacity and subtle translation over 120–200ms using standard deceleration curves. When prefers-reduced-motion: reduce is active, spatial travel collapses to 0px and transition durations clamp to 0s.

semantic-motion.stylex.tsTypeScript
import * as stylex from "@stylexjs/stylex";

export const motionTokens = stylex.defineVars({
  durationFast: {
    default: "120ms",
    "@media (prefers-reduced-motion: reduce)": "0s",
  },
  durationModerate: {
    default: "200ms",
    "@media (prefers-reduced-motion: reduce)": "0s",
  },
  easingStandard: "cubic-bezier(0.2, 0, 0, 1)",
});

3. Rollout & Verification Checklist

Action items2/4 done
Add block:

    Install

    Source

    components/blocks/ui-sdk/page-editor.tsx

    Inspired by the Page Editor template from Astryx (MIT License · Copyright (c) 2026 Meta Platforms, Inc.).