* wip
* fix: Position grips in merged cells from the rendered layout
* fix: Only merge row and column selections that cover whole rows or columns
* perf: Find merged cell spans without scanning the table map
* refactor: Extract helpers for cells starting in a row or column
* refactor: Attach observers in ref callbacks instead of effects
Use React 19 ref callback cleanup for the ResizeObserver in Scrollable and
PDF and the IntersectionObserver in useOnScreen, which now returns a ref
callback rather than taking a ref object.
* fix: Remove unused ts-expect-error directives
Moves lazyWithRetry to shared/utils so the editor's ColorSwatch and
Mentions components can use it instead of React.lazy, avoiding the
Suspense reveal throttle once the chunk is loaded.
React 18+ no longer warns on setState after unmount, so the guards in
useRequest, useIdle, ActionButton, useDocumentSave and MultiplayerEditor are
removed. The Mentions guards protect an editor transaction against a destroyed
node view, so they are replaced with an effect-scoped cancel flag. Both
useIsMounted hook files are deleted.
Closes#13839
* Validate awareness identity against connection context
* Validate awareness messages on the sending connection
* Encode real removal states and isolate ownership check in tests
* 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>
* fix: Allow document mentions to wrap
* fix: Prevent mention icons from shrinking
* fix: Preserve mention icon and text styles
* fix: Prevent Font Awesome icons from shrinking
* fix: Crash opening document menu on mobile
The heading numbering submenu added to the document display options is
rendered through the `append` slot of `DropdownMenu`. On desktop that slot
lands inside the menu content, but on mobile it is rendered into a drawer,
which has no menu root for the Radix submenu primitives to attach to — so
opening the document overflow menu on mobile threw "`MenuSub` must be used
within `Menu`" and took down the page.
Flatten the submenu into an inline group of options on mobile, matching the
toggles it sits alongside.
Fixes OUTLINE-CLOUD-D1X
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V5ExrfehTYgotb8d2aoMvK
* fix: Match heading prefix color to the heading anchor
The heading numbering prefix was drawn with the secondary text color while
the `#` anchor beside it uses the primary text color at 75% opacity. The
two read as the same tone in light mode, but diverge visibly in dark mode
where the primary text color is much brighter.
Draw the prefix from the same color and opacity as the anchor so the two
match in both themes.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V5ExrfehTYgotb8d2aoMvK
* fix: Heading prefix missing when printing
The print stylesheet hides the heading pseudo element to keep the H1–H6
level labels out of print. That pseudo element also carries the heading
numbering prefix, so printing or exporting a numbered document dropped its
numbers.
Qualify the print selectors the same way the level labels themselves are,
so only the labels are hidden and the prefix still prints.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V5ExrfehTYgotb8d2aoMvK
* Update Styles.ts
* Add heading numbering display preference for documents
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix isRemoteTransaction call for new signature on main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix inTable detection for headings after a nested table
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Move from deco to pseudoclass
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* wip: Epic support
* fix: Unfurl GitLab epics and group work items
Group-scoped work items are parsed as project issues, producing a project
path of `groups/<group>` and a 404 from the issues API. Parse the namespace
around the `/-/` separator instead, and fetch group-scoped resources via the
epics API.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Truncate long mention labels instead of wrapping
A mention with a long unfurled title wrapped the pill onto several lines.
Cap it to a single line and elide the label, keeping icons and the trailing
identifier intact.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Build the project path only for project-scoped resources
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Sanitize the embed toolbar link and anchor embed url matchers
The "Open" link in an embed's bottom bar wrote the node's href attribute
into the DOM without passing it through sanitizeUrl, so a javascript: url
in that attribute ran on click.
Two embed matchers, and the regex built from a team's embed integration
settings, were not anchored, so a javascript: url that contained a
supported url further along still matched an embed and reached that link.
* fix: Only emit a list style the editor renders
The listStyle attribute is written into a list-style-type declaration.
Its validator returned a boolean rather than throwing, which Prosemirror
ignores, so any string reached the style attribute and a crafted value
appended further CSS declarations to the element.
* fix: Sanitize the image urls carried in a mention's unfurl attribute
The unfurl attribute holds a cached copy of the unfurl response on the
node, and is used whenever the store has no live entry for the url. Its
favicon and avatar urls were written to an img src unchanged, so a
crafted mention made every reader's browser request a chosen host.
* fix: Render a heading level and highlight color that cannot be used
Both attributes are used unchecked when the node is rendered. rgba()
throws for a color it cannot parse, and a level outside of 1-6 produces
an invalid tag name, so either one stopped the whole document rendering
in the browser and on the server. The heading level also reached a
repeat() in the Markdown serializer, unbounded.
Fall back when rendering rather than when reading, so that a value
written through collaborative editing, which does not run the attribute
validators, is covered too.
The caption is editable DOM outside of the document, so ProseMirror handled
the drag against the document selection instead — moving unrelated content and
throwing a mismatched transaction as the caption commit landed mid-dispatch.
Fixes OUTLINE-CLOUD-AB8
* feat: Sticky first column in tables with a header column
When a table is wider than the available space, the first column now stays
in place while the table is scrolled horizontally, matching the existing
behaviour of the header row. Only applies when every cell in that column is
a header cell.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* perf: Cache header column lookup per node
updateClassList runs on every horizontal scroll event, so the first column
check is kept until the table node itself changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat: Highlight trigger text while suggestion menu is open
Adds an inline decoration around the trigger character and search term
while the block, emoji, or mention menu is open.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Multiplayer edits
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix: Consistently sanitize urls in editor components
Node attributes are authored content and cannot be assumed safe, but a few
render sinks were reading href and src straight from them. Applies the
existing sanitize helpers at the point of use in the attachment, PDF and
image components.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feedback
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* feat: Add onNotice callback to decouple shared editor from toast library
Shared editor code called sonner's toast directly. Introduce an onNotice
callback (defaulting to a toast) so the shared editor stays agnostic of the
host app's notification library.
* Add lint rule to prevent regression
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Images with a stored pixel width (e.g. from paste) set an inline
style="width: 1920px" on the image-wrapper and img elements. In tables
without explicit colwidth attributes the browser uses table-layout: auto,
which lets cells expand to the element's preferred width. The existing
max-width: 100% in the ImageWrapper styled-component cannot constrain
the wrapper because 100% of the already-expanded cell is also 1920px.
Changing to width: min(Npx, 100%) breaks the expansion: during auto
table layout the browser resolves 100% against the table's available
width rather than the cell's inflated size, so the element's
min-content contribution stays bounded and the cell no longer grows
beyond its share of the table width.
Fixes#12866
Co-authored-by: tsushanth <t.sushanth@gmail.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: Lightbox effect tweaks
* refactor
* refactor
* fix: Address review feedback on image lightbox
- Use useLayoutEffect in useHideElement to hide/restore before paint
- Intersperse separators between image hover actions to avoid orphaned dividers when Download is hidden in edit mode
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Cmd+A in image caption selects caption text, not whole document
* fix: Share caption Cmd+A select-all and fix placeholder rendering
Move the Cmd/Ctrl+A select-all handling into the shared Caption
component so image and video captions both select their own text
instead of the whole document. Also fix a stray brace in the caption
styles that corrupted the empty-caption placeholder rendering.
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: Checkbox list item margin click and nested "Hide completed"
Clicking the margin beside a checkbox now places the cursor at the start
of the list item instead of being a dead zone, and shows a text cursor.
The "Hide completed" toggle no longer appears on a parent checkbox list
when completed items live in a checkbox list nested via a regular list
(checkbox -> list -> checkbox); those inner lists manage their own toggle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Checkbox improvements
* fix: Address PR review on checkbox NodeView
- Remove the checkbox click listener in CheckboxItemView.destroy() to
avoid leaks when items are deleted/replaced.
- Globally escape "#" in the SSR fallback data URIs (replace all, not
just the first occurrence).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* fix: preserve nesting when toggling to/from checklist in nested lists
Converting a list to or from a checklist previously cleared all nodes and
re-wrapped them, which flattened any nested list structure. Convert the
list nodes in place instead, recursively mapping list and item types so
nesting is preserved.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* feat: convert plain list to checklist when typing checkbox marker
Typing "[ ] " at the start of an existing bullet or ordered list item now
converts the whole list to a checklist, preserving nested list structure,
reusing the in-place list conversion utility.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* fix: place cursor at start of item after checklist conversion
After converting a list to a checklist via the checkbox marker input rule,
position the selection at the start of the converted item so the user can
continue typing immediately.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* fix: remove vertical margin from checklist nested in a list
A checklist nested inside any list (bullet, ordered, or another checklist)
no longer carries the 1em vertical margin of a top-level checklist. Since
both list_item and checkbox_item render as li elements, target any
checklist-wrapper inside an li rather than only those inside another wrapper.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* fix: only highlight the closest list in the formatting toolbar
When the selection sits inside a nested list, the toolbar previously marked
both the inner list and any ancestor list of a different type as active,
because each list button walked the full ancestor chain. Highlight only the
list closest to the selection.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
* fix: consider node selections on lists in isListActive
When a list node is the target of a NodeSelection, findParentNode resolves
to its parent list rather than the selected node. Check the selected node
directly so the toolbar reflects the selected list.
https://claude.ai/code/session_01BGH191WyuL9SgQyjfJ3YsD
---------
Co-authored-by: Claude <noreply@anthropic.com>