feat(plot): Chunk #5 story whiteboard, timeline & plot beats
Story whiteboard built on React Flow v11: free-form canvas of typed nodes (character, world, chapter, note, image, group) with draggable leads-to/contrasts/causes edges, cross-link selectors (chapter/entity), linked-node badges, and an "Add beats to board" import from the plot. Plot beats feature set: - Status/locking (draft/revised/locked) with a progress bar - Beat templates (three-act, save-the-cat, seven-point, custom) - Timeline route with search/chapter/character filters - Entity cross-links (entityIds) on beats and board nodes - getBoard added to the StorageAdapter contract (local + server) and REST endpoints; loadBoard now restores persisted board state Storage & server: - PlotBeat type (status, entityIds) across core types, Dexie schema, and server mapping/routes/migration (002_plot_beats.sql) - SQLite-safe column names (beat_order, entity_ids) - Server seed data for plot beats UI: accent Button variant, Badge variants, plot/timeline/whiteboard stylesheets. Tests: templates module, plot-beat store round-trip, board getBoard. typecheck, lint, test, and build all green.
This commit is contained in:
@@ -298,6 +298,8 @@ body {
|
||||
.ps-btn-lg { padding: 10px 20px; font-size: 15px; }
|
||||
.ps-btn-primary { background: var(--ps-accent); color: var(--ps-accent-contrast); }
|
||||
.ps-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
|
||||
.ps-btn-accent { background: var(--ps-accent); color: var(--ps-accent-contrast); border-color: var(--ps-accent); }
|
||||
.ps-btn-accent:hover:not(:disabled) { filter: brightness(1.08); }
|
||||
.ps-btn-secondary { background: var(--ps-surface-2); border-color: var(--ps-border); color: var(--ps-text); }
|
||||
.ps-btn-secondary:hover:not(:disabled) { background: var(--ps-border); }
|
||||
.ps-btn-ghost { background: transparent; color: var(--ps-text); }
|
||||
|
||||
@@ -3,8 +3,9 @@ export type BadgeVariant = "neutral" | "accent" | "success" | "danger" | "warnin
|
||||
export interface BadgeProps {
|
||||
children: string;
|
||||
variant?: BadgeVariant;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export function Badge({ children, variant = "neutral" }: BadgeProps) {
|
||||
return <span className={`ps-badge ps-badge-${variant}`}>{children}</span>;
|
||||
export function Badge({ children, variant = "neutral", title }: BadgeProps) {
|
||||
return <span className={`ps-badge ps-badge-${variant}`} title={title}>{children}</span>;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { type ButtonHTMLAttributes } from "react";
|
||||
|
||||
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
|
||||
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "accent";
|
||||
export type ButtonSize = "sm" | "md" | "lg";
|
||||
|
||||
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
|
||||
Reference in New Issue
Block a user