* fix: Allow PDF embed width and height to change independently
Adds an aspect ratio lock toggle to the media dimension toolbar for PDF
embeds, renders PDFs at their stored aspect ratio, and keeps that ratio
when drag resizing.
* feat: Add corner resize handles to PDF embeds and persist aspect ratio lock
Stores the lock as an optional attachment attribute, where unset means
locked, so side handles change only the width of unlocked PDFs.
* feat: Consistent resize handles for images, videos, PDFs and embeds
All media get side, bottom and corner handles driven by one lock rule.
Images and videos stay locked. PDFs and embeds can be unlocked to resize
each axis independently.
* feat: Show width, height and lock in the embed toolbar
* feat: Start embeds unlocked and step media dimensions with arrow keys
Embeds start with an unlocked aspect ratio so full-width embeds can still
be made taller, while PDFs start locked. Up and down arrows step the
dimension inputs by 1, or 10 with shift.
* fix: Align the aspect ratio padlock with the dimension digits
* fix: Move the aspect ratio lock closer to the dimension inputs
* fix: Show the aspect ratio lock state in its tooltip
The document container and editor exposed their measured widths as inherited
CSS variables, so each frame of a width animation restyled every element in
the document. Full width blocks now use a container unit, and media resizing
measures the editor content width when it is needed.
* React 19 upgrade
Bumps react and react-dom to 19.2.8, with the dependency changes React 19
requires: react-is 19, @types/react 19, @types/react-dom 19,
react-helmet-async 3 and react-avatar-editor 15 (which now ships its own
types). framer-motion moves to 13 — its v6 types reference React.ReactHTML,
removed from @types/react 19.
The type changes fall into a few classes:
- The global JSX namespace is gone, so JSX.Element becomes React.JSX.Element
and the custom element declarations move into a module augmentation.
- useRef() now requires an initial value.
- A ref created with a null initial value is typed nullable, so consumers
that accept one are widened to RefObject<T | null>.
- React.ReactChild was removed; tooltips take React.ReactNode.
- Ref callbacks may only return a cleanup function. react-dnd connectors
return the connected node, so useDragRef and useDropRef wrap useDrag and
useDrop and hand back a ref callback.
react-i18next stays on v12: i18next 23 drops compatibilityJSON "v3", which
would rewrite all 64 _plural keys across every locale.
outline-icons, oy-vey and react-waypoint have no release that lists React 19
as a peer. All three render correctly under it; the install reports them as
unmet peers.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Remove react-helmet and forwardRef
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat(editor): support image corner drag resizing with aspect ratio lock
- Implement circular corner drag handles (ResizeTopLeft, ResizeTopRight, ResizeBottomLeft, ResizeBottomRight) using theme selection color.
- Update useDragResize hook to track coordinates as {x,y} object and handle aspect-ratio locked sizing for corner drags.
- Set overflow: visible on ImageWrapper to prevent corner handles from being clipped, and fade them in on hover.
* refactor(editor): simplify ResizeCorner styles by removing background and shadow properties
* fix(editor): fix corner resize speed and sync inputs in real-time
* fix(editor): improve corner resize cursor tracking and drag cursors
Project corner drag deltas onto the aspect-ratio vector so resizing
follows the pointer at 1x speed. Add a body class and global cursor
styles during image/media resize drags.
* refactor(editor): use relative import path inside shared directory
* fix(editor): resolve typescript type mismatch on dragging property in PDF component
* fix: Remove unused grid snapping from element resizing
Horizontal resizing snapped widths to a 5% grid, which is no longer
desired. Replace the only remaining use of the gridSnap prop (the
minimum-width clamp) with a named constant and drop the prop entirely.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Remove resize lag by disabling size transition while dragging
The width/height CSS transition on resizable elements existed to smooth
the discrete jumps from grid snapping. With pixel-by-pixel resizing the
element perpetually animates toward a target ~150ms in the future, so it
visibly trails the cursor. Disable the transition while actively dragging
and restore it afterwards so snap-back and collaborative size changes
still animate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Constrain image resizing to editor edge instead of snapping to natural size
When dragging an element past the editor bounds, the full-width sentinel
forced the width to the natural size. For images narrower than the editor
this snapped them back to their (smaller) natural width at the boundary.
Only use the natural-width sentinel when the image is genuinely wider than
the editor; otherwise constrain to the editor edge.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* PR feedback
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Natural embed resizing, closes#11924
* fix: Make embed height snap and min height configurable props
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add double-click resize functionality to image and video resize handles
- Add handleDoubleClick function to useDragResize hook that toggles between fit-width and original size
- Update Image and Video components to use double-click handlers on resize handles
- Maintain aspect ratio when resizing via double-click
- Fit-width size is calculated as minimum of container width and natural width
- Fix ESLint warnings for useEffect dependencies
* simplify
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>