Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
878f1a4 to
2924a54
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@platejs/autoformat@53.0.0
Major Changes
#4941 by @zbeyens – Deprecate
@platejs/autoformat. Markdown shortcuts and text substitutions are now authored asinputRuleson each feature plugin, andAutoformatPluginremains only as an inert compatibility export.Migration:
AutoformatPluginfrom your plugins and replace@platejs/autoformatafter migrating rules.AutoformatRulewith the matching rule factory on the plugin that owns the feature. See the table below.createTextSubstitutionInputRuleregistered on a localcreateSlatePlugin.rules[].querywithenabledon the rule factory call. Replace the global code-block guard with a per-pluginenabledcheck.enableUndoOnDelete— undo-on-delete is the built-in behavior.AutoformatRuledefinitions withcreateRuleFactoryfromplatejs.Rule Map
Basic blocks —
@platejs/basic-nodes{ match: '# '..'###### ', mode: 'block', type: KEYS.h1..h6 }HxPlugin.configure({ inputRules: [HeadingRules.markdown()] })— register on eachH1Plugin..H6Plugin{ match: '> ', mode: 'block', type: KEYS.blockquote }BlockquotePlugin.configure({ inputRules: [BlockquoteRules.markdown()] }){ match: ['---', '—-', '___ '], mode: 'block', type: KEYS.hr }HorizontalRulePlugin.configure({ inputRules: [HorizontalRuleRules.markdown({ variant: '-' }), HorizontalRuleRules.markdown({ variant: '_' })] })Basic marks —
@platejs/basic-nodes{ match: '**', mode: 'mark', type: KEYS.bold }BoldRules.markdown({ variant: '*' })BoldPlugin{ match: '__', mode: 'mark', type: KEYS.underline }UnderlineRules.markdown()UnderlinePlugin{ match: '*', mode: 'mark', type: KEYS.italic }ItalicRules.markdown({ variant: '*' })ItalicPlugin{ match: '_', mode: 'mark', type: KEYS.italic }ItalicRules.markdown({ variant: '_' })ItalicPlugin{ match: '`', mode: 'mark', type: KEYS.code }CodeRules.markdown()CodePlugin{ match: '~~', mode: 'mark', type: KEYS.strikethrough }StrikethroughRules.markdown()StrikethroughPlugin{ match: '~', mode: 'mark', type: KEYS.sub }SubscriptRules.markdown()SubscriptPlugin{ match: '^', mode: 'mark', type: KEYS.sup }SuperscriptRules.markdown()SuperscriptPlugin{ match: '==', mode: 'mark', type: KEYS.highlight }HighlightRules.markdown({ variant: '==' })HighlightPlugin{ match: '≡', mode: 'mark', type: KEYS.highlight }HighlightRules.markdown({ variant: '≡' })HighlightPlugin{ match: '***', mode: 'mark', type: [bold, italic] }MarkComboRules.markdown({ variant: 'boldItalic' })BoldPlugin{ match: '__*', mode: 'mark', type: [underline, italic] }MarkComboRules.markdown({ variant: 'italicUnderline' })BoldPlugin{ match: '__**', mode: 'mark', type: [underline, bold] }MarkComboRules.markdown({ variant: 'boldUnderline' })BoldPlugin{ match: '___***', mode: 'mark', type: [underline, bold, italic] }MarkComboRules.markdown({ variant: 'boldItalicUnderline' })BoldPluginRegister each family on its owning plugin:
Code block —
@platejs/code-block{ match: '```', mode: 'block', type: KEYS.codeBlock, format: insertEmptyCodeBlock }CodeBlockPlugin.configure({ inputRules: [CodeBlockRules.markdown({ on: 'match' })] })Lists —
@platejs/listand@platejs/list-classic{ match: ['- ', '* '], mode: 'block', format: toggleList(..., { listStyleType: KEYS.ul }) }BulletedListRules.markdown({ variant: '-' }),BulletedListRules.markdown({ variant: '*' }){ match: /^\d+\.$ |^\d+\)$ /, matchByRegex: true, format: toggleList(..., { listStyleType: KEYS.ol }) }OrderedListRules.markdown({ variant: '.' }),OrderedListRules.markdown({ variant: ')' }){ match: '[] ', mode: 'block', format: toggleList(..., { listStyleType: KEYS.listTodo }) }TaskListRules.markdown({ checked: false }){ match: '[x] ', mode: 'block', format: toggleList + setNodes({ checked: true }) }TaskListRules.markdown({ checked: true })Replace
@platejs/listwith@platejs/list-classicimports when using the classic list model. The factory names are identical.Math —
@platejs/math$…$InlineEquationPlugin.configure({ inputRules: [MathRules.markdown({ variant: '$' })] })$$…$$EquationPlugin.configure({ inputRules: [MathRules.markdown({ on: 'break', variant: '$$' })] })Link —
@platejs/link[text](url)markdownLinkRules.markdown()LinkRules.autolink({ variant: 'paste' })LinkRules.autolink({ variant: 'space' })LinkRules.autolink({ variant: 'break' })Text substitutions (arrows, fractions, legal, math operators, smart quotes)
Move these to a local
createSlatePluginwithcreateTextSubstitutionInputRule:Each pattern set is just data —
autoformatArrow,autoformatLegal,autoformatMath,autoformatPunctuation,autoformatSmartQuotes, andautoformatLegalHtmlfrom the old package map 1:1 ontopatternsarrays.AutoformatKitin the Plate registry is pre-built with all of them.Custom rules
Old
AutoformatRuleobjects have no direct replacement. Build a rule family withcreateRuleFactory:Option removals
enableUndoOnDelete— removed. Backspace on a rule-inserted node restores the source text by default.rules[].query— replaced byenabledon the rule factory call.rules[].preFormat/rules[].format— replaced by rule-familyformatandresolvecallbacks insidecreateRuleFactory.rules[].trigger— rule families set their own trigger. Override it with thetriggeroption on a customcreateRuleFactorycall.See the Autoformat doc for the kit path and the Plugin Input Rules guide for the full runtime.
@platejs/basic-nodes@53.0.0
Major Changes
#4941 by @zbeyens – Store blockquotes as container blocks with block children.
Lift every selected nested quoted block one level on
Shift+Tab.Reset headings to paragraphs on
Backspaceat block start before any merge.Migration:
editor.tf.blockquote.toggle()to wrap or unwrap blocks instead of retagging one text block in place.Backspaceinstead of jumping out of the quote.Backspaceat the start of a heading now resets the heading to a paragraph before any merge.@platejs/code-block@53.0.0
Major Changes
Backspaceat the start of a non-empty first code line inside the code block.Merge an empty inner code line into the previous code line instead of unwrapping the block.
@platejs/markdown@53.0.0
Major Changes
#4941 by @zbeyens – Round-trip blockquotes as nested block content instead of flat newline-packed text.
Serialize image titles from
node.titleinstead of copying the caption into the markdown title slot.Preserve MDX media attribute expressions during markdown serialization instead of stringifying them into JSON text.
Serialize plain URL links back to bare URL markdown instead of bracket-link form.
Round-trip footnote references and definitions as dedicated footnote nodes instead of collapsing them to plain-text fallback.
Migration:
blockquote.childrento contain block nodes such as paragraphs and lists., setnode.title. Images without a title now serialize as.width={640}, expect those expressions to stay as expressions instead of turning into quoted JSON.https://platejs.orgnow serialize as bare URLs instead of[https://platejs.org](https://platejs.org).@platejs/footnoteand includeBaseFootnoteReferencePluginandBaseFootnoteDefinitionPluginso footnote nodes have real editor semantics instead of falling back to unknown node types.Patch Changes
#4941 by @zbeyens – Write canonical date nodes as
<date value="..."/>and round-trip normalized media embed metadata#4941 by @zbeyens – Preserve unknown MDX and raw HTML block source more faithfully during markdown deserialization fallback
@platejs/table@53.0.0
Major Changes
selectAllfrom the current table to the whole document.@platejs/core@53.0.0
Minor Changes
liftas a break and delete rule action for blocks that should leave one ancestor level instead of resetting or exiting.Reset the trailing block to a paragraph when
splitResethandles selected heading text.Patch Changes
#4941 by @zbeyens – Add
createRuleFactoryfor building input rule families with overridable defaults and required options#4941 by @zbeyens – Add
useNavigationHighlight(path)for React node components that need thecurrent navigation-feedback target without reading plugin options directly
@platejs/footnote@53.0.0
Minor Changes
FootnoteReferencePlugin,FootnoteDefinitionPlugin, andFootnoteInputPluginfor real footnote nodes and inline[^comboboxinsertion in Plate editors.
@platejs/date@53.0.0
Patch Changes
YYYY-MM-DDvalues and preserve unparseable legacy text as fallback data@platejs/link@53.0.0
Patch Changes
@platejs/list@53.0.0
Patch Changes
variantandcheckedoptions@platejs/list-classic@53.0.0
Patch Changes
variantandcheckedoptions@platejs/media@53.0.0
Patch Changes
#4941 by @zbeyens – Support allowlisted Twitter/X embed snippet extraction in media embed URL transforms
#4941 by @zbeyens – Normalize supported media embeds into canonical provider metadata and preserve source URLs for embed editing
@platejs/slate@53.0.0
Patch Changes
081cbe9by @github-actions[bot] – Updatedslate,slate-dom.@platejs/toc@53.0.0
Patch Changes
#4941 by @zbeyens – Add active section state to
useTocElementStateso TOC elements can mark the current heading while the document scrolls#4941 by @zbeyens – Fix TOC activation to navigate without entering block-selection mode
@platejs/utils@53.0.0
Patch Changes
KEYS.footnoteDefinition,KEYS.footnoteReference, andKEYS.footnoteInput@platejs/ai@53.0.0
@platejs/basic-styles@53.0.0
@platejs/callout@53.0.0
@platejs/caption@53.0.0
@platejs/code-drawing@53.0.0
@platejs/combobox@53.0.0
@platejs/comment@53.0.0
@platejs/csv@53.0.0
@platejs/cursor@53.0.0
@platejs/diff@53.0.0
@platejs/dnd@53.0.0
@platejs/docx@53.0.0
@platejs/docx-io@53.0.0
@platejs/emoji@53.0.0
@platejs/excalidraw@53.0.0
@platejs/find-replace@53.0.0
@platejs/floating@53.0.0
@platejs/indent@53.0.0
@platejs/juice@53.0.0
@platejs/layout@53.0.0
@platejs/math@53.0.0
@platejs/mention@53.0.0
platejs@53.0.0
@platejs/playwright@53.0.0
@platejs/resizable@53.0.0
@platejs/selection@53.0.0
@platejs/slash-command@53.0.0
@platejs/suggestion@53.0.0
@platejs/tabbable@53.0.0
@platejs/tag@53.0.0
@platejs/test-utils@53.0.0
@platejs/toggle@53.0.0
@platejs/yjs@53.0.0