The app could run a pipeline and had nowhere to keep what it was making. A project is an ordered list of scenes, one JSON file each, and it is the only part of the app that has to survive a reload. A scene owns its prompt text and the result it produced, and nothing else. v4's Scene grew three dozen fields; each belongs to the feature that needs it. Per scene length and fps are deliberately absent — a regenerate uses the project's values, so a scene cropped on the timeline comes back whole. The prompt box edits the current scene rather than holding its own copy, so what is on screen and what a run uses cannot disagree. app: the region toggles are named buttons in the timeline bar v4's arrangement. The kit's fallback is one glyph on a rail at each edge of the window, which is right for a kit that cannot know what its panels are called and wrong here, where they have names and a bar to put them in. A pressed toggle was styled only inside a button group, so a standalone one carried aria-pressed and looked identical either way. gallery.strip is selectable like its siblings: a filmstrip is the one shape whose whole job is saying which of these you are on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
22 lines
758 B
Python
22 lines
758 B
Python
"""Paths and constants. No logic, no imports from the rest of core."""
|
|
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parent.parent
|
|
|
|
APP_DIR = ROOT / "app"
|
|
MODULES_DIR = ROOT / "modules"
|
|
|
|
UI_PREFIX = "/funpack"
|
|
|
|
# Extension allowlists per served root. These are rule 1 ("a module never styles
|
|
# anything") enforced at the transport layer: a .css inside modules/ is a 404, so
|
|
# a module cannot ship a stylesheet even if someone writes one.
|
|
APP_EXTS = frozenset({".js", ".css", ".html", ".woff2", ".svg"})
|
|
MODULE_EXTS = frozenset({".js"})
|
|
|
|
# Where projects are kept. Inside the pack rather than ComfyUI's output tree: a
|
|
# project is FunPack's own state, and clearing outputs must not take a user's
|
|
# edits with it.
|
|
PROJECTS_DIR = ROOT / "projects"
|