AI media harness for planning, generating, and editing locally
TypeScript
Shared ui components draw Fluent icons
Bitti240eaeacf8c5
diff --git a/src/components/ui/ComboBox.tsx b/src/components/ui/ComboBox.tsxindex f118a85..f26c4c9 100644--- a/src/components/ui/ComboBox.tsx+++ b/src/components/ui/ComboBox.tsx@@ -33,7 +33,7 @@parseText={(text) => parsePercent(text)} options={presets} onChange={zoomTo} />*/-import { ChevronDown } from "lucide-react";+import { ChevronDown12 } from "./icons";import {Children, Fragment, isValidElement, useId, useLayoutEffect, useMemo, useRef, useState,type CSSProperties, type KeyboardEvent, type ReactElement, type ReactNode,@@ -298,7 +298,7 @@ function SelectComboBox<V extends ComboValue = string>(props: ComboBoxProps<V>)>{selected?.icon && <span className="ui-combo__icon" aria-hidden="true">{selected.icon}</span>}<span className={cx("ui-combo__value", !selected && "ui-combo__value--placeholder")}>{selected ? selected.label : placeholder ?? " "}</span>- <ChevronDown className="ui-combo__chevron" size={12} aria-hidden="true" />+ <ChevronDown12 className="ui-combo__chevron" aria-hidden="true" /></button>{name !== undefined && <input type="hidden" name={name} value={value === null || value === undefined ? "" : String(value)} />}{open && createPortal(@@ -498,7 +498,7 @@ function EditableComboBox<V extends ComboValue = string>(props: ComboBoxProps<V>onMouseDown={(event) => event.preventDefault()}onClick={() => { input.current?.focus(); if (open) close(); else openList(); }}>- <ChevronDown className="ui-combo__chevron" size={12} aria-hidden="true" />+ <ChevronDown12 className="ui-combo__chevron" aria-hidden="true" /></button></span>{name !== undefined && <input type="hidden" name={name} value={value === null || value === undefined ? "" : String(value)} />}diff --git a/src/components/ui/ContextMenu.tsx b/src/components/ui/ContextMenu.tsxindex 0e8cbb0..b80c78c 100644--- a/src/components/ui/ContextMenu.tsx+++ b/src/components/ui/ContextMenu.tsx@@ -17,9 +17,9 @@const menu = useContextMenu();<div onContextMenu={(e) => menu.open(e, [- { id: "rename", label: "Rename", icon: <Pencil size={16} />, shortcut: "F2", onSelect: rename },+ { id: "rename", label: "Rename", icon: <Rename16 />, shortcut: "F2", onSelect: rename },{ separator: true },- { id: "delete", label: "Delete", icon: <Trash2 size={16} />, shortcut: "Delete", onSelect: remove },+ { id: "delete", label: "Delete", icon: <Delete16 />, shortcut: "Delete", onSelect: remove },])} />{menu.element}@@ -35,7 +35,7 @@{ id: "move", label: "Move to", items: scenes.map((scene) => ({ label: scene.title, onSelect: … })) } */-import { Check, ChevronRight } from "lucide-react";+import { Check16, ChevronRight16 } from "./icons";import {useCallback, useEffect, useLayoutEffect, useRef, useState,type CSSProperties, type KeyboardEvent, type ReactNode, type SyntheticEvent,@@ -287,12 +287,12 @@ export function ContextMenu({>{hasGlyphColumn && (<span className="ui-menu__glyph" aria-hidden="true">- {checkable ? (entry.checked ? <Check size={16} /> : null) : entry.icon}+ {checkable ? (entry.checked ? <Check16 /> : null) : entry.icon}</span>)}<span className="ui-menu__label">{entry.label}</span>{entry.shortcut && !cascade && <kbd className="ui-menu__shortcut">{formatShortcut(entry.shortcut)}</kbd>}- {cascade && <ChevronRight className="ui-menu__chevron" size={16} aria-hidden="true" />}+ {cascade && <ChevronRight16 className="ui-menu__chevron" aria-hidden="true" />}</button>);})}diff --git a/src/components/ui/Controls.tsx b/src/components/ui/Controls.tsxindex 11e16b7..ee7c55f 100644--- a/src/components/ui/Controls.tsx+++ b/src/components/ui/Controls.tsx@@ -5,7 +5,7 @@already paints them Fluent); these components add the label layout,indeterminate state and the slider's filled track. */-import { ChevronDown } from "lucide-react";+import { ChevronDown16 } from "./icons";import {createContext, useContext, useEffect, useId, useRef,type ChangeEvent, type CSSProperties, type InputHTMLAttributes, type KeyboardEvent, type ReactNode,@@ -316,7 +316,7 @@ export function Expander({ header, description, icon, children, expanded, defaul<span className="ui-expander__title">{header}</span>{description && <span className="ui-expander__description">{description}</span>}</span>- <ChevronDown size={16} aria-hidden="true" className="ui-expander__chevron" />+ <ChevronDown16 aria-hidden="true" className="ui-expander__chevron" /></button><div id={contentId} className="ui-expander__content" hidden={!isOpen}>{children}</div></div>diff --git a/src/components/ui/InfoBar.tsx b/src/components/ui/InfoBar.tsxindex 608bc34..c34a9da 100644--- a/src/components/ui/InfoBar.tsx+++ b/src/components/ui/InfoBar.tsx@@ -9,7 +9,7 @@<InfoBar severity="success" title="Saved" message={path} action={<button className="secondary-button">Open folder</button>} />*/-import { Check, X } from "lucide-react";+import { Check10Filled, Dismiss10Filled, Dismiss16 } from "./icons";import type { ReactNode } from "react";import { cx } from "./internal";@@ -36,8 +36,8 @@ export interface InfoBarProps {export function SeverityGlyph({ severity }: { severity: InfoBarSeverity }) {return (<span className={cx("ui-severity-glyph", `ui-severity-glyph--${severity}`)} aria-hidden="true">- {severity === "success" ? <Check size={10} strokeWidth={3} />- : severity === "error" ? <X size={10} strokeWidth={3} />+ {severity === "success" ? <Check10Filled />+ : severity === "error" ? <Dismiss10Filled />: <span className="ui-severity-glyph__mark">{severity === "warning" ? "!" : "i"}</span>}</span>);@@ -55,7 +55,7 @@ export function InfoBar({ severity = "informational", title, message, children,{action && <div className="ui-infobar__action">{action}</div>}{onClose && (<button type="button" className="icon-button ui-infobar__close" aria-label={closeLabel} data-tooltip={closeLabel} onClick={onClose}>- <X size={16} />+ <Dismiss16 /></button>)}</div>diff --git a/src/components/ui/Pane.tsx b/src/components/ui/Pane.tsxindex 89a96eb..d3e7c6d 100644--- a/src/components/ui/Pane.tsx+++ b/src/components/ui/Pane.tsx@@ -6,12 +6,12 @@EmptyState says so and offers the way forward.<ItemHeader- color="var(--clip-generated)" icon={<Sparkles size={16} />}+ color="var(--clip-generated)" icon={<Sparkle16 />}name={<input className="ui-item-header__input" value={name} … aria-label="Clip name" />}meta="Generated video · V1 · 6.2 s"actions={<button className="icon-button" aria-label="More">…</button>} />- <EmptyState icon={<Film size={32} />} title="No media yet"+ <EmptyState icon={<Film32 />} title="No media yet"description="Import video, images or audio to use them on the timeline."action={<button className="secondary-button" …>Import</button>} />*/diff --git a/src/components/ui/PropRow.tsx b/src/components/ui/PropRow.tsxindex 8ab5de0..f5f7e48 100644--- a/src/components/ui/PropRow.tsx+++ b/src/components/ui/PropRow.tsx@@ -19,7 +19,7 @@</PropSection>*/-import { ChevronDown, RotateCcw } from "lucide-react";+import { ChevronDown12, Reset12 } from "./icons";import { useEffect, useId, useRef, useState, type PointerEvent, type ReactNode } from "react";import { cx } from "./internal";@@ -116,7 +116,7 @@ export function PropRow({ label, htmlFor, children, value, defaultValue, modifiedata-tooltip={resetLabel ?? "Reset to default"}onClick={onReset}>- <RotateCcw size={12} aria-hidden="true" />+ <Reset12 aria-hidden="true" /></button>) : <span className="ui-prop-row__reset-spacer" aria-hidden="true" />}</div>@@ -165,7 +165,7 @@ export function PropSection({ title, children, open, defaultOpen = true, onOpenC<section className={cx("ui-prop-section", isOpen && "ui-prop-section--open", className)}><div className="ui-prop-section__header"><button type="button" className="ui-prop-section__toggle" aria-expanded={isOpen} aria-controls={contentId} onClick={toggle}>- <ChevronDown size={12} aria-hidden="true" className="ui-prop-section__chevron" />+ <ChevronDown12 aria-hidden="true" className="ui-prop-section__chevron" /><span className="ui-prop-section__title">{title}</span>{summary !== undefined && summary !== null && summary !== false && <span className="ui-prop-section__summary">{summary}</span>}</button>diff --git a/src/components/ui/Settings.tsx b/src/components/ui/Settings.tsxindex bf5d4a5..c9dd8a1 100644--- a/src/components/ui/Settings.tsx+++ b/src/components/ui/Settings.tsx@@ -6,19 +6,19 @@4px apart inside a SettingsGroup, which can carry a 14px semibold heading.<SettingsGroup heading="Appearance">- <SettingsCard icon={<Palette size={20} />} header="Theme" description="Light, dark or follow Windows">+ <SettingsCard icon={<Palette20 />} header="Theme" description="Light, dark or follow Windows"><ComboBox value={theme} onChange={setTheme} options={themes} /></SettingsCard><SettingsCard header="About" description="Version 0.1.1" onClick={openAbout} /> // chevron<SettingsCard header="Documentation" href="https://…" /> // external glyph- <SettingsExpander icon={<Cpu size={20} />} header="GPU" description="…" control={<ToggleSwitch …/>}>+ <SettingsExpander icon={<Gpu20 />} header="GPU" description="…" control={<ToggleSwitch …/>}><SettingsRow header="Device">…</SettingsRow><SettingsRow header="Memory limit">…</SettingsRow></SettingsExpander></SettingsGroup>*/-import { ChevronDown, ChevronRight, ExternalLink } from "lucide-react";+import { ChevronDown16, ChevronRight16, OpenExternal16 } from "./icons";import { useId, useState, type ReactNode } from "react";import { cx } from "./internal";@@ -72,8 +72,8 @@ export function SettingsCard({ icon, header, description, children, onClick, hreconst trailing = (children || glyph !== "none") && (<span className="ui-settings-card__control">{children}- {glyph === "chevron" && <ChevronRight size={16} aria-hidden="true" className="ui-settings-card__glyph" />}- {glyph === "external" && <ExternalLink size={16} aria-hidden="true" className="ui-settings-card__glyph" />}+ {glyph === "chevron" && <ChevronRight16 aria-hidden="true" className="ui-settings-card__glyph" />}+ {glyph === "external" && <OpenExternal16 aria-hidden="true" className="ui-settings-card__glyph" />}</span>);const classes = cx("ui-settings-card", !icon && "ui-settings-card--no-icon", disabled && "ui-settings-card--disabled", className);@@ -154,7 +154,7 @@ export function SettingsExpander({ icon, header, description, control, children,</span><span className="ui-settings-card__control">{control && <span className="ui-settings-expander__control">{control}</span>}- <ChevronDown size={16} aria-hidden="true" className="ui-settings-expander__chevron" />+ <ChevronDown16 aria-hidden="true" className="ui-settings-expander__chevron" /></span></div><div id={contentId} className="ui-settings-expander__content" role="region" aria-labelledby={headerId} hidden={!isOpen}>diff --git a/src/components/ui/index.ts b/src/components/ui/index.tsindex 8cf2d99..3eebbc1 100644--- a/src/components/ui/index.ts+++ b/src/components/ui/index.ts@@ -52,7 +52,7 @@ItemHeader <ItemHeader color="var(--clip-video)" icon={…} name="Clip" | name={<input className="ui-item-header__input" …/>} meta="Video · V1 · 6.2 s" actions={…} chip? id? level? />— 48px, heads a pane that shows one selected thing.- EmptyState <EmptyState icon={<Film size={32}/>} title="No media yet" description="…" action={…} />+ EmptyState <EmptyState icon={<Film32 />} title="No media yet" description="…" action={…} />NavPane/NavItem <NavPane aria-label footer={…}><NavItem icon label selected badge onClick /></NavPane>Flyout <Flyout open anchor={buttonRef} onClose aria-label>…</Flyout> (light dismiss, acrylic).TextField <TextField value onChange={(v) => …} icon trailing={<button className="ui-textfield__button" …/>} />diff --git a/src/lib/commands.ts b/src/lib/commands.tsindex 2e2b81c..d37c1ca 100644--- a/src/lib/commands.ts+++ b/src/lib/commands.ts@@ -323,7 +323,7 @@ export function useShortcut((a menu item, a command bar button and the key all running the same thing):const save = useCommand({ id: "save", label: "Save", shortcut: "Ctrl+S", run: onSave });- <CommandBarButton {...save.buttonProps} icon={<Save size={16} />} />+ <CommandBarButton {...save.buttonProps} icon={<Save16 />} />It is a thin layer over useShortcut and needs no provider. */