Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency textarea-markdown-editor to v1 #121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 6, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
textarea-markdown-editor 0.1.13 -> 1.0.4 age adoption passing confidence

Release Notes

Resetand/markdown-textarea

v1.0.4

Compare Source

What's Changed

πŸ†• Added ordered-list-auto-correct-extension by @​Resetand in https://github.com/Resetand/textarea-markdown-editor/pull/15

Will handle enter keystroke, on which will autocorrect invalid ordered list patterns
1) some text -> 1. some text
1.1) some text -> 1.1. some text

Option is disabled by default, to enable add enableOrderedListAutoCorrectExtension: true option

<TextareaMarkdown
    options={{ enableOrderedListAutoCorrectExtension: true, ... }}
    ...
/>

Full Changelog: Resetand/textarea-markdown-editor@v1.0.3...v1.0.4

v1.0.3

Compare Source

What's Changed

🐞 Prevent URL paste markup handling if selected text is an URL by @​Resetand in https://github.com/Resetand/textarea-markdown-editor/pull/14

Full Changelog: Resetand/textarea-markdown-editor@v1.0.2...v1.0.3

v1.0.2

Compare Source

What's Changed

🐞 Fixed paste link which contains dashes in domain causes page freeze #​12
🐞 Fixed uncorrent pasting link inside a link markup

Full Changelog: Resetand/textarea-markdown-editor@v1.0.1...v1.0.2

v1.0.1

Compare Source

What's Changed

πŸ†• Added the ability to trigger custom commands with arguments (eg ref.trigger('[NAME]', ...args)) checkout the example here
πŸ†• Extend TextareaMarkdownRef by adding bultint Cursor prop (available by using ref.current.cursor)


PS πŸ€– made internal internal refactoring: added eslint, prettier and pre-commit hooks

Full Changelog: Resetand/textarea-markdown-editor@v1.0.0...v1.0.1

v1.0.0

Compare Source

What's Changed

Breaking changes ❗
  • πŸ†• Commands indent, unindent, enter, link-paste is no longer supported. you can access them by using options
    • enableIndentExtension - for indent / unindent commands
    • enableLinkPasteExtension - for link-paste
    • enablePrefixWrappingExtension - for enter
  • πŸ€– Cursor util significantly rewritten, checkout the built-in commands implementations to see a real world examples of using
  • πŸ›  WELL_KNOWN_COMMANDS renamed to BUILT_IN_COMMANDS
  • πŸ›  CommandDefine type renamed to Command
Other
  • πŸ”₯ You can specify custom wrapping prefixes using options.customPrefixWrapping, checkout the example
  • πŸ†• Supporting react 18 as peer-dependence
  • πŸ†• Added able to wrap selected inside order-list, unordered-list or quote markup
  • πŸ†• Added able to use this library without react via bootstrapTextareaMarkdown.
  • 🐞 Fixed link pasting require user permission to read clipboard, now it's handling event directly instead of rely on Clipboard api
  • 🐞 Fixed undo(ctrl+z) behavior doesn’t work properly
  • πŸ›  Got rid of react-trigger-change dependence
Cursor util migration guide

This utility is used internally by the library, and since version 1.0.0 it has been significantly redesigned to provide a simplified API

  • Cursor.raw is deprecated. You can use string directly as a parameter for all methods
  • Cursor.getLine(lineNumber?: number): string β†’ Cursor.lineAt(lineNumber: number): Line | null
  • Cursor.getIndentSize(lineNumber?: number): number is deprecated, you can define it by line.text.match(/^\s*/)?.[0].length
  • Cursor.getCurrentPosition(lineNumber?: number): TextAreaPosition β†’ Cursor.position: Position
  • Cursor.getText(): string β†’ Cursor.value: string
  • Cursor.setText(text: string): void β†’ Cursor.setValue(value: string): void
  • Cursor.getSelected(): string β†’ Cursor.selection: Selection | null
  • Cursor.spliceContent is is deprecated:
    • Cursor.replaceLine([lineNumber], null) to remove line
    • Cursor.replaceLine([lineNumber], 'new content') to replace line content
    • Cursor.insert('inserted content') to insert content at cursor position
  • Cusor.insertPrefix is deprecated
    • Cursor.replaceLine([lineNumber], 'prefix' + cursor.lineAt([lineNumber]).text) add prefix for specific line
    • Cursor.replaceCurrentLines((line, index) => '${index + 1}. ${line.text}') add prefix for all selected lines via callback
  • Cursor.wrapSelected(markup: string): void and Cursor. wrapSingleLineSelected(markup: string): void is deprecated
    • Cursor.wrap("@&#8203;") to wrap selected content with @
    • Cursor.wrap(['(', ')']) to wrap selected content with prefix( and suffix )

Typing reference:

type Line = {
    text: string;
    lineNumber: number;

    /** Index of the first character of the string */
    startsAt: number;

    /** Index of the end of the line (includes the characters up to) */
    endsAt: number;
};

type Selection = {
    /** List of lines that have been selected. Line is considered selected even if it is partially selected */
    lines: Line[];
    text: string;
    selectionStart: number;
    selectionEnd: number;
    selectionDirection: 'backward' | 'forward' | 'none';
};

type Position = {
    line: Line;
    cursorAt: number;
};

Checkout the built-in commands implementations to see a real world examples of using

Full Changelog: Resetand/textarea-markdown-editor@v0.1.13...v1.0.0


Configuration

πŸ“… Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants