refactor(joint-react): align Paper options naming with react-plus#3353
Merged
Conversation
Mirror the `@joint/react-plus` convention so the two packages name the same concepts the same way: - Add and export `PaperOptions = dia.Paper.Options` — a named type for the `options` escape-hatch prop (was an inline type with no public name). Symmetric with react-plus `<Component>Options`. - Rename the supported-props base `PortalPaperOptions` -> `PaperSupportedOptions` (internal; not exported), matching react-plus `<Component>SupportedOptions`. No behavior change; `PaperProps` is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
samuelgja
approved these changes
Jun 11, 2026
Use the canonical exported `DefaultLink` type directly (with `| undefined`, since the `defaultLink` prop is optional and the helper handles the absent case) instead of the internal `PaperSupportedOptions` base or a `PaperProps['defaultLink']` indexed access. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3db0b79 to
b90cf93
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Follow-up to #3351.
@joint/react-plusnames component config consistently —<Component>Optionsfor the rawoptionsescape-hatch type,<Component>SupportedOptionsfor the curated supported-props base. Core's<Paper>diverged: no named type for the escape hatch (inlineoptions?: dia.Paper.Options), and its base wasPortalPaperOptions. This aligns the two packages.What
PaperOptions = dia.Paper.Options— a named type for theoptionsescape-hatch prop; theoptions?:field now references it. Mirrors react-plus<Component>Options. Exported from the root barrel under the<Paper/>block.PortalPaperOptions→PaperSupportedOptions(internal — not exported, no external consumer). Matches react-plus<Component>SupportedOptions. Updated the two internal references (PaperProps extends …, anduse-create-portal-paper.tsx).defaultLinkhelper with the publicDefaultLinktype —use-create-portal-paper.tsx'screateDefaultLinkCallbacknow takesDefaultLink | undefined(the canonical exported type + explicit optionality, since the prop is optional and the helper handles the absent case) instead of an internal-base reference.Compatibility
No behavior change.
PaperPropsunchanged. The renamed base was never public.Verification
tsc --noEmitonjoint-react: 0 errors.Related
🤖 Generated with Claude Code