115 Commits

Author SHA1 Message Date
Doruk Kavcioglu
c7d7c61e34
fix(inspector): make the full ItemRow opener a handoff region
Only the inner icon/text area of an ItemRow carried data-inspector-handoff, but
the whole [data-row-control] element handles the click. Clicking the row padding
or the gap before a trailing action dismissed the current inspector on pointerdown
and reopened another on click — the same flicker the handoff was meant to prevent.

- Mark the full clickable opener region as the handoff, gated on enabled rows only
  (disabled rows open nothing, so they keep normal dismissal).
- Give trailing actions (Remove, etc.) an explicit data-inspector-handoff-exclude
  that FloatingInspectorLayer checks first, so they retain normal dismissal.
2026-07-21 22:01:29 +03:00
Doruk Kavcioglu
08b4c31f54
refactor(inspector): keep the persistent host inside the keyed boundary and add owner-aware timeline policy
Follow-up to the persistent floating-inspector host. The host no longer needs to
outlive the selection boundary — a normal keyframe click may close the session —
so this pulls it back inside and replaces the cross-boundary lifetime machinery
with a narrower timeline policy.

- Move ActiveInspectorProvider and the single host back inside the selectionHash
  keyed boundary. Genuine selection changes (empty click, another layer, a keyframe
  click) now close the session via the keyed remount; the host stays non-keyed so it
  still persists across owner changes within one selection.
- Fix cross-owner handoff with a dedicated data-inspector-handoff attribute: pointerdown
  over an inspector-opening control no longer dismisses the current session, so state
  goes directly owner→owner without passing through null (which rebuilt the layer).
  Marked on the effect/shadow/transition/animation/export rows, the direct shadow/fill/
  stroke "+" buttons, and the color/fill swatches — not on dropdowns, remove buttons,
  or unrelated controls, which keep normal dismissal.
- Replace the selection-membership ownership effect with owner-aware drag detection:
  drags never touch Selected (clip.ts/keyframe.ts mutate it on click only), so query
  ClipDragOrigin/KeyframeDragOrigin and close only when a dragged clip/keyframe belongs
  to a different layer than ownerNodeEid. Playhead and current-layer drags preserve the
  full main+nested session; other-layer drags close it.
- Trim InspectorSession to what remains needed (drop triggerEl, triggerControlSelector,
  keepOpenWhile); keep ownerNodeEid solely for the timeline policy. Layer-less inspectors
  (background/export) pass null and keep normal dismissal.
2026-07-21 21:42:07 +03:00
Doruk Kavcioglu
16cf01e6a6
feat(inspector): host floating inspectors in one persistent, layer-owned session
Each floating inspector previously mounted its own Kobalte dialog under the
selection-hash keyed boundary. Switching owners (e.g. effect ↔ shadow) tore one
down and built another, causing a close/reopen flicker, and any timeline click
dismissed the open inspector.

Model a floating inspector and its nested pickers as one editing session owned by
a layer, hosted once and preserved across timeline interactions while that layer
stays selected — e.g. with a gradient fill and its stop picker open, scrubbing the
playhead or adjusting that layer's keyframes keeps both panels and their state.

- Single FloatingInspectorHost outside the keyed boundary: the layer/portal mounts
  once and persists; only the body and anchor swap reactively, killing the
  cross-owner teardown flicker.
- Keep/close driven by an ownership effect — close when the session's ownerNodeEid
  leaves selectedNodes(). Membership, not hash equality, so keyframe selection keeps
  it open; per-frame query flush means same-layer re-clicks never transient-close.
- FloatingInspector repositions on handoff without remounting: hold the previous
  position until a pre-paint microtask recomputes it, so no (8,8) flash.
- Session context defers [data-timeline-surface] interactions to the ownership
  effect; nested pickers inherit it. Non-timeline clicks keep normal dismissal;
  layer-less inspectors (background, export) opt out via ownerNodeEid: null.
- Migrate all 9 owners to open(session)/toggle(session) with body-only components
  that outlive their section, host-owned and id-driven.
2026-07-21 21:14:25 +03:00
Doruk Kavcioglu
f7463a8378
fix(inspector): order newest animation on top, matching other sections
Fill/Stroke/Shadow/Effects render their rows reversed so the newest item
sits at the top, but animations rendered in insertion order, adding new
ones at the bottom. Reverse each phase group's <For> so the newest lands
on top. Purely presentational — animations have no ItemIndex/reorder to
disturb, and the in-above-out grouping is unchanged.
2026-07-21 18:09:58 +03:00
Doruk Kavcioglu
bd3970b81c
feat(inspector): extend shared floating-inspector dismissal to export
Dismiss and single-active the export settings inspector, matching the
other inspectors.

- Replace the local open signal with useActiveInspector("export") keyed
  by the scene eid, so the panel dismisses on outside interaction and
  joins the single-active model.
- Wrap the section in a contents-only trigger boundary and put the panel
  in a FloatingInspectorLayer; the template row and add menu carry
  data-row-control, and a hidden title provides labelledBy since the
  header is a template Select. No bypass, per the FillPicker precedent
  for the many non-modal Selects.
- Open the inspector when a template is added, and close it when the
  settings disappear via useActiveInspectorInvalidation — the derived
  one-element list gives it the confirmedId tolerance so open-on-add
  isn't self-closed by the one-tick tag lag, and the panel is gated on
  hasSettings to avoid a flash on add.
2026-07-21 17:59:32 +03:00
Doruk Kavcioglu
913deb8b6c
feat(inspector): extend shared floating-inspector dismissal to transitions
Dismiss and single-active the transition inspector, matching the other
inspectors.

- Replace the local open signal with useActiveInspector("transition")
  keyed by the node eid, so the inspector dismisses on outside
  interaction and joins the single-active model.
- Wrap the section in a contents-only trigger boundary and move the
  panel into a FloatingInspectorLayer; the ItemRow control and the add
  menu carry data-row-control so clicking them doesn't dismiss it.
- Open the inspector when a transition is added, and close it when the
  transition disappears via useActiveInspectorInvalidation — the derived
  one-element list gives it the confirmedId tolerance so open-on-add
  isn't self-closed by the one-tick tag lag.
2026-07-21 17:40:04 +03:00
Doruk Kavcioglu
45eb63d93f
feat(inspector): extend shared floating-inspector dismissal to background color
Dismiss and single-active the background color picker, matching the
other inspectors.

- Replace the local open signal with useActiveInspector("background")
  keyed by a fixed sentinel id (the background has no entity), so the
  picker dismisses on outside interaction and joins the single-active
  model.
- Wrap the section in a contents-only trigger boundary and move the
  picker into a FloatingInspectorLayer; the data-row-control swatch is
  excluded so re-clicking it toggles the picker closed.
2026-07-21 17:13:32 +03:00
Doruk Kavcioglu
d4c349a570
feat(inspector): extend shared floating-inspector dismissal to caption colors
Dismiss and single-active the caption slot-color pickers, matching the
other inspectors.

- Replace the local openSlot signal with useActiveInspector("caption")
  keyed by slot index (guarded !== undefined so slot 0 works), so the
  picker dismisses on outside interaction and only one inspector is open
  at a time.
- Wrap the section in a contents-only trigger boundary and move the
  picker into a FloatingInspectorLayer; the data-row-control swatch is
  excluded so re-clicking toggles / another slot switches in place.
- Close the picker when its slot disappears via a preset change or undo.
2026-07-21 17:13:27 +03:00
Doruk Kavcioglu
b2b82d7815
fix(inspector): toggle shadow color picker on swatch re-click
Re-clicking the swatch closed then reopened the picker: the pointerdown
dismissed it and the click retoggled it open. Mark the ColorOpacityRow
swatch data-row-control and wire the sub-picker Layer's triggerRef/
selector to it (as the gradient stops do) so the swatch is excluded from
outside dismissal and the click toggles it once.
2026-07-20 23:32:01 +03:00
Doruk Kavcioglu
5ea45f11bf
feat(inspector): extend shared floating-inspector dismissal to animations
Dismiss and single-active the animations inspector: migrate the
Animations section onto the shared floating-inspector dismissal
architecture, matching Fill/Stroke/Shadow/Effects.

- Wrap the panel in a non-modal FloatingInspectorLayer so any genuine
  outside pointer interaction dismisses it (focus changes do not).
- Replace the local open signal with useActiveInspector("animation") so
  only one floating inspector is open across sections, and add
  useActiveInspectorInvalidation so the panel closes when its animation
  is deleted via undo.
- Wrap the section in a contents-only sectionRef as the trigger boundary
  and mark the add menu / rows with data-row-control, so re-clicking a
  trigger toggles/switches in place instead of dismiss-then-reopen; both
  the in and out row groups sit behind an empty-state guard.
- Open the newly added animation's inspector on add (parity with the
  other repeatable sections).
- Label the panel via a hidden FloatingInspectorTitle since its header is
  a phase Select, and use the IconButton composite for the row remove
  button.
2026-07-20 23:05:01 +03:00
Doruk Kavcioglu
db9c7eadf2
fix(inspector): keep color-area knob position when dropping on black
Dropping the color-area knob on the bottom edge (value 0) committed pure
black, and the draft re-sync then recomputed HSV from #000 — where
saturation is undefined and comes back as 0 — snapping the knob to the
bottom-left corner.

Preserve the previous saturation when value is 0, mirroring the existing
hue-preservation for the same information-loss case. The color still
correctly becomes black; only the spurious horizontal jump is removed.
2026-07-20 22:14:56 +03:00
Doruk Kavcioglu
61113da32e
fix(inspector): make color picker knobs clickable at extremes 2026-07-20 22:02:02 +03:00
Doruk Kavcioglu
2fc1a7caf5
fix(dashboard): match billing header bg to canvas 2026-07-20 21:37:13 +03:00
Doruk Kavcioglu
bfec93bcf1
feat(inspector): add empty state and stable min-height to asset fill picker
Give the asset fill picker a min-height floor so it no longer collapses
to a cramped panel when few or no assets exist, and add empty-state copy
matching the assets sidebar (minus the "drag here" line, since the picker
has no drop target).

- Add a "No assets" message ("Import from your computer, or generate
  something new with AI.") and a "No matching assets" state when a
  search/filter hides everything.
- Set min-h-52 on both the grid and the empty state so panel height stays
  consistent across all fill tabs and states.
- Move the footer separator out of the grid; as a grid child it floated
  mid-panel once the grid was taller than its content.
- Add content-start so a single asset row no longer stretches to fill the
  min-height, which had ballooned thumbnails and enlarged their hit areas
  (empty space below a row registered as a hover/click on the asset).
2026-07-20 21:14:06 +03:00
Doruk Kavcioglu
25a0df64d3
fix(inspector): dismiss gradient color picker when a stop menu opens
Right-clicking a stop left the picker open, and the stop menu could linger next
to it. Make the gradient stop menus (row, knob, track) modal like the app's
other context menus, and dismiss the picker on open via onOpenChange — Kobalte's
ContextMenu can't be controlled via `open`, only observed. Left-click
switch-in-place is unchanged.
2026-07-20 20:43:27 +03:00
Doruk Kavcioglu
d2e66fdfb6
fix(inspector): don't open stop menu when right-clicking gradient stop inputs
The whole stop row is a ContextMenuTrigger, so right-clicking its inputs opened the stop-management menu instead of leaving the fields alone. Add an onContextMenu handler on the offset, color, and opacity inputs that stops propagation (so the trigger's menu doesn't fire) and prevents default (so no native menu takes its place), making a right-click on an input a no-op while the rest of the row still opens the menu.
2026-07-20 20:08:52 +03:00
Doruk Kavcioglu
c16fc06f16
feat(inspector): show the stop-management menu on gradient stop rows too
Right-clicking a stop knob opened a menu but its row in the Stops list did
nothing. Extract the menu into a shared stopMenuItems(eid) helper and render it
for both, so they can't drift. The row's root becomes a ContextMenuTrigger with
the same attrs/handlers, leaving selection, drag, and layout unchanged.
2026-07-20 19:17:30 +03:00
Doruk Kavcioglu
cc4a8b805f
feat(inspector): richer gradient stop selection and stable picker layout
Improve how gradient stops are selected and how their color picker behaves:

- Click anywhere on a stop row to select it (not just the swatch), shown with
  a full-width selection band; stop rows now sit flush (no inter-row gap).
- While a stop's color picker is open, clicking another stop row or dragging
  another knob switches the picker to that stop in place instead of closing it;
  when closed, clicking a stop only selects it and never opens the picker.
- Fix uneven bottom spacing below the last stop: the row band's padding no
  longer stacks with the panel padding.
- Fix phantom bottom padding that appeared only while the picker was open — the
  overlay is now a sibling of the panel instead of a child of its gap-4 column,
  so its zero-height layout box no longer reserves gap.

Correct the misnamed --selection-muted-foreground token to --selection-muted
(it was never a foreground color; Figma names it selection-muted), register it
as a color utility, and use it for the selection band. Values unchanged.
2026-07-20 19:02:16 +03:00
Doruk Kavcioglu
ca0fd5a330
fix(inspector): toggle gradient stop color picker on swatch re-click
Re-clicking a stop's swatch left the picker open. Rename spawnColorPicker
to toggleColorPicker and mirror ActiveInspector.toggle on the local signal:
same swatch closes, a different one switches in place.
2026-07-20 17:41:22 +03:00
Doruk Kavcioglu
5ec093b48e
fix(inspector): gradient stops no longer jump, deselect, or flicker
Interacting with gradient stops had three visible glitches: clicking a
stop nudged it away from its position, the selection a click or drag
just made cleared itself immediately, and every value change flickered
the stop rows by remounting them.

- Pointer-down wrote the stop offset immediately, so merely clicking a
  stop (off-centre, or an animated stop displaying a keyframed value)
  snapped it and dirtied the document. Drags are now delta-based against
  the stop's displayed offset; a click writes nothing.
- Clicks bubbling up from handles and rows (including the click a
  completed drag emits) cleared the selection they had just made; the
  background handler now ignores non-direct clicks.
- <For> rows were reconciled by fresh objects from stops(), remounting
  every row (and its Keyframe) on any value change. Rows are now keyed
  by primitive eid.
- A drag could outlive its stop (deleted mid-gesture, undo) and keep
  writing to a dead or reused eid; writes are now gated on the eid
  still being this fill's live color stop.
- pointercancel applied its coordinates as a final move, teleporting
  the stop; the last real move is kept instead.
2026-07-20 03:57:51 +03:00
Doruk Kavcioglu
0f12bb2a9b
fix(inspector): switch gradient stop color picker in place, not remount
Clicking another stop swatch while the nested color picker was open
closed and reopened it with a visible flicker (and reset a dragged
panel's position). Kobalte's interact-outside fires on a capture-phase
document pointerdown, so the layer dismissed before the swatch click
could retarget it — the swatch's own stopPropagation can't intercept
capture listeners.

Mark stop swatches as trigger controls (triggerRef + [data-stop-swatch])
so the layer consumes the pointerdown, the same mechanism parent pickers
use for row controls. The click then just updates colorPickerStopEid and
ColorOpacityPicker re-syncs its drafts from props — no unmount.
2026-07-19 22:02:15 +03:00
Doruk Kavcioglu
42b8b14f89
fix(inspector): close active inspector when its entity is deleted by undo
Sections never reconciled the shared active-inspector id against their
entity lists, so undoing an add (or any deletion arriving via history)
left the floating inspector open on a dead, recyclable eid.

Add useActiveInspectorInvalidation to the shared active-inspector layer
and wire it into fills, strokes, shadows, and effects. The guard only
invalidates ids it has already observed in the list: Cache.* lists sync
one engine tick after the transaction, so a freshly added id briefly
lags the list and must not be treated as gone — otherwise open-on-add
would close the picker it just opened.
2026-07-19 22:02:11 +03:00
Doruk Kavcioglu
a84c6466e8
feat(ui): IconButton/MenuIconButton composites with explicit aria-labels
Icon-only buttons repeated the same Tooltip + TooltipTrigger + Button
wiring at every call site, and tooltip'd menu triggers additionally
required a fragile double-`as` nesting of DropdownMenuTrigger inside
TooltipTrigger. Encapsulate both in ui/icon-button.tsx and
ui/menu-icon-button.tsx and migrate 15 call sites (canvas toolbar,
asset panel, inspector sections, timeline layers).

Tooltip text and accessible name are deliberately decoupled: `tooltip`
carries the short visible hint, and `aria-label` — required by the
props type, so omitting it is a compile error — states what activating
the control does ("Blend mode" / "Change blend mode"). Generic labels
got specific names ("More options" -> "Open timeline options"), fixing
duplicate accessible names across the page. Tooltip copy is unchanged.
2026-07-19 03:01:46 +03:00
Doruk Kavcioglu
c673ef6e33
fix(ui): gate tooltip focus-open on keyboard modality, drop refocus patch
Kobalte opens a tooltip on any trigger focus, so a menu or popover
refocusing its trigger on close popped the tooltip open under the
cursor. The old workaround patched @kobalte/core to suppress trigger
refocus for modal dropdowns dismissed by outside click — hiding the
symptom by disabling standard focus-return.

Fix it at the correct link instead: the tooltip wrapper now opens on
focus only when the last input was keyboard-driven (tracked in
lib/input-modality.ts; :focus-visible is unreliable for programmatic
refocus). Kobalte's TooltipTrigger bails when e.defaultPrevented is
set but focus events are non-cancelable, so the wrapper shadows the
property directly (verified against @kobalte/core 0.13.12).

This makes the second patch hunk unnecessary: trigger refocus on
dismiss is restored (standard WAI-ARIA behavior) and the dependency
patch shrinks to the one fix unreachable from app code.
patches/README.md updated to match.
2026-07-19 03:01:46 +03:00
Doruk Kavcioglu
5fd9826931
fix(inspector): collapse nested picker branch on parent-inspector click
With a nested overlay open inside a color picker (the Hex/HSL/RGB Select),
clicking a control in the parent inspector dismissed only the top-most layer
(the Select) — Kobalte gates outside-dismissal to the top-most layer — leaving
the color picker open, so it took a second click to close.

Set bypassTopMostLayerCheck on the nested color pickers (Shadow, gradient Stop)
so a click in the parent inspector collapses the whole picker branch in one
interaction. Escape still peels one layer at a time, and clicks inside the
picker or its Select don't dismiss it.

bypassTopMostLayerCheck is an internal DismissableLayer prop forwarded by
Dialog.Content but absent from its public types (hence the @ts-expect-error).
2026-07-18 16:46:30 +03:00
Doruk Kavcioglu
3fb9e684d2
refactor(inspector): drop unused FloatingInspectorLayer modal prop
After the inspector-local picker overlays became non-modal, nothing passes
modal to FloatingInspectorLayer, so the prop is dead. Remove it and hardcode
the layer to non-modal.
2026-07-18 16:46:04 +03:00
Doruk Kavcioglu
e238dba546
fix(inspector): non-modal nested pickers so sibling controls stay one-click
Modal pickers set pointer-events:none outside themselves, so the parent
inspector's own controls were inert: clicking a sibling dismissed the picker
but didn't act (two clicks).

Rule: inspector-local child overlays are light-dismiss, not modal. Clicking a
sibling control inside the same parent inspector should dismiss the child
overlay and perform the clicked action in the same interaction.

Made non-modal: Stop + Shadow color pickers, color-type + gradient-type
Selects. Standalone row menus (Blend/Fit/Asset/Animations) stay modal —
separate policy.
2026-07-18 13:49:30 +03:00
Doruk Kavcioglu
06d9c71352
fix(inspector): one active floating inspector across repeatable sections
Fill/Stroke/Shadow/Effects each tracked their open item in independent local
signals, so adding or switching items relied on Kobalte's outside-dismissal to
close the previously open inspector. That was unreliable in two ways:

- Adding an item in another section left both inspectors open (the previous
  section's dismissal was gated by the add control's tooltip layer), stacking
  unrelated inspectors.
- Adding an item in the same section fired the open inspector's outside-dismiss
  on the "+" pointerdown (state -> null) before the add ran (null -> new id),
  tearing the host down and back up (A -> null -> B) — a visible flicker.

Restore a shared { owner, id } ownership context so one top-level inspector is
active across these sections: opening/creating an item deterministically
replaces whatever section was open (no stacking), and same-owner id changes
update the existing host in place instead of relying on dismissal.

To remove the same-section null-remount, extend each section's existing
triggerRef/data-row-control dismissal exclusion to cover its own add control:
wrap the PanelSection in a display:contents element (the header action and rows
live in separate fragment siblings with no shared ancestor) used as the
inspector's triggerRef, and tag the add control with data-row-control. No
FloatingInspectorLayer API change, no new marker.

Fill/Stroke keep their keyed picker remount (their sub-pickers read fillEid via
useQuery, which captures a static entity id); with the null gap gone this is a
single synchronous re-create rather than a closed-frame flicker. A remount-free
Fill/Stroke path would require making useQuery reactive and is left as a
follow-up.

Genuine outside clicks still dismiss; nested overlays (e.g. a Shadow's own
color picker) are unaffected.
2026-07-18 07:23:55 +03:00
Doruk Kavcioglu
d1191259db
fix(inspector): open the newly added item's inspector
Adding a Fill, Stroke, Shadow, or Effect created the entity but left the inspector pointed at the previously selected item. Capture the created eid from the history transaction and set the section's selected/open state to it, so the new item's inspector opens immediately.
2026-07-18 06:10:59 +03:00
Doruk Kavcioglu
611eda9479
fix(inspector): open nested color pickers as modal layers
The Shadow and gradient-stop color pickers rendered inside an already-open inspector didn't make the underlying inspector pointer-inert. Give FloatingInspectorLayer a `modal` option and open those nested pickers as modal Kobalte Dialog child layers, so the surface beneath becomes inert and the first outside interaction dismisses only the topmost picker. Real submenus, drag, focus, and dismissal behavior are unchanged.
2026-07-18 04:01:14 +03:00
Doruk Kavcioglu
85c8575d5a
fix(inspector): consume first outside click for nested picker overlays
Model interaction consumption for overlays nested inside floating pickers, and
unclip the color-picker knob.

- Make the picker-internal overlays modal (blend mode, fit mode, asset filter,
  color-format select, gradient-style select). Non-modal Kobalte overlays
  dismiss on outside pointerdown but do not consume the event, so the first
  outside click also focused/scrubbed/toggled/clicked the underlying target.
  Modal makes the rest of the page pointer-inert while one is open, so the
  first outside interaction dismisses only that topmost nested layer and a
  second interaction acts normally, deterministically across inputs, sliders,
  buttons, anchors, and the picker swatch trigger. preventScroll=false keeps
  the previous no-scroll-lock behavior.
- Move overflow-hidden off the color area onto an inner gradient wrapper so the
  drag knob is no longer clipped at the edges, leaving layout, dragging, and
  hit-testing unchanged.
2026-07-17 22:59:47 +03:00
Doruk Kavcioglu
7a3274f185
fix(inspector): consistent input, focus, and nested dismissal for pickers
Make floating-picker dismissal deterministic across target types and fix the
fill-row input/focus handling introduced during the Fill/Stroke rollout.

- Drive dismissal purely from pointer-outside by preventing the layer's
  focusOutside. Previously Kobalte gated pointerDownOutside by topmost layer
  but not focusOutside, so focus-moving targets (inputs, sliders, icon
  buttons) tore down the whole chain while empty space/labels/canvas only
  closed the topmost layer. Now every target type closes topmost-first.
- Mark only the FillItem swatch as the row trigger instead of the whole
  control, so the inline hex/opacity inputs and opacity slider dismiss an open
  picker (same or another fill) while the swatch still switches/toggles it.
- Blur and commit any focused text/numeric input when a picker or panel opens,
  moved from FillPicker to the shared FloatingInspector so it applies to all
  pickers (fill, shadow color, gradient stop, ...).
2026-07-17 22:34:26 +03:00
Doruk Kavcioglu
e0e04f54e4
fix(inspector): restore empty-state styling and topmost-first dismissal
Shadow and Effects regressed the same way as Stroke: the always-rendered
rows-boundary wrapper counted as content, so PanelSection un-muted the section
title and added phantom bottom padding when the section was empty. Render the
boundary only when rows exist, restoring the empty-state spacing and muted
title while keeping the dismissal boundary where it matters.

Also revert the nested-dropdown whole-chain dismissal (bypassTopMostLayerCheck)
and restore Kobalte's default topmost-first outside dismissal.
2026-07-17 22:10:33 +03:00
Doruk Kavcioglu
3d0a85fa48
feat(inspector): dismiss floating inspectors on outside interaction
Floating inspectors (color, shadow, effect, fill, stroke) previously closed
only via their X button or by clicking empty canvas. Introduce a shared
`FloatingInspectorLayer` that wraps each panel in a non-modal Kobalte Dialog,
so any genuine click outside the interaction chain dismisses it —
Figma/Framer-like — while everything inside stays usable.

Migrated: Shadow, Effects, Fill, Stroke (the row-based inspectors).

Dismissal
- Built on the public Kobalte Dialog and its shared compiled layer stack, so
  portaled Select/DropdownMenu/ContextMenu/Popover/Tooltip content is treated
  as "inside" automatically — no private DismissableLayer import, no DOM
  tagging of portals.
- One outside click dismisses the whole chain even when a nested dropdown
  (blend/fit mode, hex, asset filter) is open; clicks inside either layer
  remain usable.
- The trigger control is excluded, so re-clicking the active row toggles it
  instead of dismiss-then-reopen; the static row label stays a dismiss surface.
- Preserves drag, scrub, text editing, viewport clamping, fixed positioning,
  Escape, and owner-specific a11y labels.

In-place row switching
- Switching between sibling rows updates the open inspector without a
  dismiss/remount flicker, via a rows-region exclusion boundary plus reactive
  entity ids (Shadow/Effects) or a keyed remount for the deeper Fill/Stroke
  picker subtree.
- Nested sub-pickers (shadow color, gradient stop) dismiss on parent-row
  switch and never orphan across chain or cross-inspector transitions.

Remaining inspectors (Animations, Background, Caption, Transition, Export)
follow in later steps.
2026-07-17 22:02:11 +03:00
Doruk Kavcioglu
ffea4167ca
fix(keyframe): capture computed value when property unauthored
Adding the first keyframe on a property that was never explicitly set
captured `authored[eid] ?? 0`. For properties whose slot is unset, the
authored store reads undefined and fell back to 0 — even though the
displayed value came from the initialized Computed store (e.g. opacity 1).

Result: hitting "add keyframe" on a shape at 100% opacity wrote a 0-value
keyframe and collapsed opacity to 0. The same trap affected any non-zero
default (scale, stop.opacity, stroke.width).

Fall back to the computed (displayed) value before 0 in both
toggleKeyframeTrack and syncKeyframeTrack. No behavior change when the
property is already authored.
2026-07-17 13:50:35 +03:00
Doruk Kavcioglu
69843204e1
fix(ui): adopt font-strong for titles per Figma, fixing weight not applying
Following the Figma source, move the titles onto the semantic font-strong
token (--font-weight-strong: 450) instead of the raw font-450 utility, for
design-token consistency: the "Editor" inspector header, PanelSection
section titles, and the left sidebar project name.

This also fixes the "Editor" header not actually picking up its intended
450 weight — font-strong renders it correctly, matching the left sidebar's
asset title.
2026-07-17 00:25:12 +03:00
Doruk Kavcioglu
db2a288d6c
fix(inspector): Volume label color/size inconsistent with sibling labels
The Volume row label carried a stray text-xxs override — the only label
in the codebase to do so — which made it 10px instead of the standard
11px, and because tailwind-merge misreads the custom text-xxs token as a
color, it evicted the label's text-muted-foreground and rendered it
bright.

Drop the override (keeping the pt-1.5 alignment, matching the pattern
anchor-row already uses) so the label matches every sibling in both size
and muted color.
2026-07-17 00:04:01 +03:00
Doruk Kavcioglu
c6a0af4435
feat(inspector): mute collapsed section titles, foreground when populated
Following the Figma design, section titles are muted when the section is
empty and foreground once it has content.

Implemented with the :has() idiom PanelSection already uses for padding —
one line, no per-section wiring, no layout change.
2026-07-17 00:03:53 +03:00
Doruk Kavcioglu
4dab4ebcb6
fix(inspector): color+opacity row focus/scrub behaved inconsistently
The Shadow color+opacity row focused and selected its inputs on
pointerdown and never blurred them on drag, so scrubbing opacity left a
stray caret/selection and dragging over the hex wrongly stole focus —
unlike the other sliders.

Align it with FillItem/SliderInput: defer focus to pointerup (via the
root's existing pendingInputFocus path) and blur on drag start. Color-only
rows are unaffected.
2026-07-16 23:17:57 +03:00
Doruk Kavcioglu
4524aec186
feat(ui): refine slider drag knob — bug fix, UX, and styling consistency
Bug fix: SliderInput's knob was already designed to grow and strengthen
on drag — the group-data-[dragging=true] variants were in place — but
nothing ever set data-dragging, so that state could never trigger. The
styling sat dormant with no way to fire. Wire data-dragging to a real
isDragging signal so the intended drag behavior finally activates.

UX: the micro-interaction was already SliderInput's design intent — once
the bug fix makes it fire, the knob hides at rest and animates in
(h-0 → h-3 at 20% on hover, h-4 at 30% on drag, 150ms). A few style
tweaks refine it, and it's applied consistently across FillItem and
ColorOpacityRow too, so all three sliders read identically.
2026-07-16 23:04:38 +03:00
Doruk Kavcioglu
b5f855295e
fix(inspector): remove empty keyframe dead zone in color-opacity row
The opacity variant always rendered an (always-empty) keyframe slot,
leaving an 8px dead strip that stopped scrubbing and focused nothing.

Render the slot only when a keyframe is provided; otherwise fold the
8px gap into the opacity input (w-10 pr-2). The value stays put and
the strip becomes live — a small UX fix that keeps the row consistent.
2026-07-16 21:54:56 +03:00
Doruk Kavcioglu
695ec72f25
feat(inspector): align color-opacity row with the fill row
ColorOpacityRow (Background, Caption, Shadow color inputs) styled its
controls differently from the sibling FillItem: small per-control hit
targets with dead gaps, and an always-present border that left a faint
resting rim on the opacity variant.

Bring it in line: full-height, edge-to-edge hit zones (swatch and
keyframe full height, hex fills the middle, opacity hugs its value),
and the shared borderless base with an inset focus ring. Visible
positions unchanged; works for both variants.
2026-07-16 21:04:16 +03:00
Doruk Kavcioglu
100a6c93bc
feat(inspector): expand fill row hit areas to full-height zones
Each control in the fill row (swatch, hex, opacity, keyframe) only
exposed its own small element box as a hit target, leaving dead gaps
and thin vertical margins that did nothing when clicked.

Lay the row out as four edge-to-edge, full-height zones: the swatch
button and keyframe stretch to full height, the hex input takes the
whole middle via flex-1, and the opacity input hugs its value on the
right. Visible positions are unchanged — only the clickable areas
grow. No pointer-handler logic changed.
2026-07-16 20:09:55 +03:00
Doruk Kavcioglu
73df675451
fix(inspector): make fill row consistent with the shared slider input
The fill row (FillItem) styled its border differently from the
SliderInput used for opacity and other controls, so it looked
inconsistent in the inspector. It always reserved a 1px border and
relied on border-transparent at rest — but that reserved width
exposed the container's bg-input as a 1px rim around the inner fill,
producing an unwanted visible outline.

Align it with the slider input instead: drop the border and reuse
the same borderless base and inset focus-ring classes (border-none
+ after:ring-* shown on focus). The fill row now uses the same
styling approach as the slider input, matching it at rest and on
focus.
2026-07-16 19:15:51 +03:00
Doruk Kavcioglu
0bc64ad6ba
fix(soundboard): make volume meter track color consistent with input token
The meter track stacked a translucent bg-input wash over an opaque
bg-background base. That extra base made the track composite
differently from every other place the input token is used (e.g.
sidebar inputs), so it rendered an inconsistent color. Drop the
bg-background base so bg-input composites over the panel directly,
matching the rest of the app.

Also tidy the volume knob: bump 18px to 20px (w-5), shift to
-left-1 to stay centered, and remove its inner grip line (which
relied on the same bg-background).
2026-07-16 18:55:34 +03:00
konstantin-paulus
a8329f0274 Enhance dashboard components with improved styling and layout
Updated the DashboardProjectsView to include padding, modified the DashboardSearchBar for stronger border styling, and refined the DashboardCardButton and DashboardCardPreview components for better visual consistency. Additionally, introduced a class prop to the DashboardViewSection for flexible styling. These changes contribute to a more cohesive and polished user interface across the dashboard.
2026-07-16 13:58:55 +02:00
Konstantin Paulus
e1e6cbd634
Merge branch 'main' into bugfix/file-handle-types 2026-07-16 13:53:16 +02:00
konstantin-paulus
604394f9f3 Update dashboard and scene components with improved styling for better UI consistency
Refactor various components in the dashboard and scene initialization overlay to enhance visual appeal and user interaction. Changes include updating button and card background colors, adjusting separator styles, and modifying sidebar item active states. These updates contribute to a more cohesive and polished user interface across the application.
2026-07-16 13:51:03 +02:00
konstantin-paulus
3e6cc22718 Update button styling in Alignment component for improved visibility
Change the button class from "text-muted-foreground" to "text-foreground" in the Alignment component to enhance its visibility and ensure better user interaction. This update contributes to a more consistent and appealing user interface.
2026-07-16 11:57:46 +02:00
konstantin-paulus
aa2f5f0bce Refactor camera restoration logic and improve scaling in camera controller
Update the restoreWorld function to validate camera properties before applying them, ensuring only valid camera configurations are used. Introduce a fallback mechanism for the camera and background settings. In the camera controller, adjust the scaling logic to prevent zero or negative dimensions, enhancing stability and user experience. This change improves the robustness of the camera system and ensures a more reliable rendering process.
2026-07-16 11:32:59 +02:00