Bot releases are hidden (Show)
Published by ifiokjr about 4 years ago
0400fbc8
#591 Thanks @ifiokjr! - Add support for nested content within ReactComponent
node views. Also support adding multiple components to the manager via the nodeViewComponents
setting. Currently ReactNodeView
components must be defined at initialization, and marks are not supported.
RemirrorProvider
.getRootProps
. Now you can add your own ref to the getRootProps({ ref })
function call which will be populated at the same time.Extension
's and Preset
's in with extensionValidityTest
.ReactSSRExtension
=> ReactSsrExtension
ReactComponentExtension.name
from reactNodeView
=> reactComponent
.NodeViewsExtension
=> NodeViewExtension
NodeViewsExtension
=> NodeViewExtension
SuggestExtension.name
from suggestions
=> suggest
c0dce043
#595 Thanks @ifiokjr! - Fix a bug on Chrome
which caused the autofocus="false" to trigger the autofocus action. Now autofocus
being falsey removes the attribute from the dom.
d5bbeb4e
#585 Thanks @ifiokjr! - Upgrade dependencies and linaria
.
d23a0434
#593 Thanks @ifiokjr! - Fix issue with focusing the editor after every command.
Updated dependencies [c0dce043
, d5bbeb4e
, d5bbeb4e
, 0400fbc8
, d23a0434
]:
Published by ifiokjr about 4 years ago
styled-components
and emotion
as requested💥 BREAKING CHANGE - Remove exports from @remirror/theme
.
createAtomClasses
defaultRemirrorAtoms
Published by ifiokjr about 4 years ago
ExtensionTag
with your own custom types and names to closeNodeGroup
and MarkGroup
which will be removed in a future version.
@remirror/core
.mutateTag
for creating custom tags in custom extensions.tags
as a replacement for the spec group.DynamicExtraAttributes
as mentioned inaction
method being passed to findChildren
, findTextNodes
,findInlineNodes
, findBlockNodes
, findChildrenByAttribute
, findChildrenByNode
,findChildrenByMark
and containsNodesOfType
.flattenNodeDescendants
. findChildren
is now the preferred method and automaticallyPublished by ifiokjr about 4 years ago
commands.insertText
. Closes #327.updateCaptured
which allows thelookbehind
regex in Safari and other browsers. Fixes #574.Published by ifiokjr about 4 years ago
Published by ifiokjr about 4 years ago
onChange
callback not being updated when using a controlled editor in StrictMode
.Published by ifiokjr about 4 years ago
AttributesWithClass
.selectTextOnClick
and default to false
. Previously the whole link would be selected when clicking on a link. Now it's configurable.ExtensionType
enum which is no longer used.emptyCoords
object from @remirror/extension-positioner
.usePositioner
hook which can override when a positioner should be set to active.NodeAttributes
and MarkAttributes
exports which can be extended in the Remirror.ExtraNodeAttributes
and Remirror.ExtraMarkAttributes
.isAllSelection
which checks if the user has selected everything in the active editor.Published by ifiokjr about 4 years ago
8c34030e: 💥 Remove property updateSelection
from the nodeInputRule
, markInputRule
and
plainInputRule
functions. You should use the new beforeDispatch
method instead.
Add new beforeDispatch
method to the nodeInputRule
, markInputRule
and plainInputRule
parameter. This method allows users to add extra steps to the transaction after a matching input
rule has been run and just before it is dispatched.
import { nodeInputRule } from 'remirror/core';
nodeInputRule({
type,
regexp: /abc/,
beforeDispatch: ({ tr }) => tr.insertText('hello'),
});
baf3f56d: Add ignoreWhitespace
option to markInputRule
for ignoring a matching input rule if
the capture groups is only whitespace. Apply to all wrapping input rules for MarkExtension
's in
the project
.
Fix #506 ItalicExtension
issue with input rule being greedy and capturing one preceding
character when activated within a text block.
3673a0f0: Fix #518 caused by the way the EditorWrapper
was setting up listeners to events from
the RemirrorManager
. Previously the failure became apparent when used in an uncontrolled editor
in StrictMode
.
Set the default CommandFunction
type parameter to be EditorSchema
for better code completion
when creating an extension.
baf3f56d: Add ignoreWhitespace
option to markInputRule
for ignoring a matching input rule if
the capture groups is only whitespace. Apply to all wrapping input rules for MarkExtension
's in
the project
.
Fix #506 ItalicExtension
issue with input rule being greedy and capturing one preceding
character when activated within a text block.
Updated dependencies [8c34030e]
Updated dependencies [3673a0f0]
Updated dependencies [8c34030e]
Updated dependencies [baf3f56d]
Published by ifiokjr about 4 years ago
areSchemaCompatible
to areSchemasCompatible
.Fix the controlled editor when used in StrictMode
.
8f9eb16c: Enable all
selection when setting initial content and focusing on the editor.
import { useRemirror } from 'remirror/react';
const { focus } = useRemirror();
focus('all');
markInputRule
doesn't reactivate previous marks when rules are nested and activated consecutively.Published by ifiokjr about 4 years ago
Published by ifiokjr about 4 years ago
remirror/extension/annotation
from remirror
.Published by ifiokjr about 4 years ago
UsePositionerHookReturn
and UseMultiPositionerHookReturn
toUsePositionerReturn
and UseMultiPositionerReturn
.Add active: boolean
property to UsePositionerHookReturn
.
Fix the floating emoji menu for the social editor and showcase. Now hidden when text selection
spans multiple characters.
338746fa: Pin @remirror/extension-annotation
version.
2d72ca94: Export Positioner
as a value. #441
Positioner.fromPositioner
Updated dependencies [4498814f]
Updated dependencies [2d72ca94]
Updated dependencies [898c62e0]
Published by ifiokjr about 4 years ago
e518ef1d: Rewrite the positioner extension with a new API for creating positioners.
Positioners now return an array of VirtualPositions
or an empty array if no positions extension.
@remirror/react
- Add useMultiPositioner
. @remirror/react
- Add virtualNode
property for
compatibility with popper-react
An example of creating a new positioner with the new API is below.
import { Positioner, Coords, hasStateChanged } from '@remirror/extension-positioner';
export const cursorPopupPositioner = Positioner.create<Coords>({
hasChanged: hasStateChanged,
/**
* Only active when the selection is empty (one character)
*/
getActive: (parameter) => {
const { state, view } = parameter;
if (!state.selection.empty) {
return [];
}
return [view.coordsAtPos(state.selection.from)];
},
getPosition(parameter) {
const { element, data: cursor } = parameter;
const parent = element.offsetParent;
if (!parent) {
return emptyVirtualPosition;
}
// The box in which the bubble menu is positioned, to use as an anchor
const parentBox = parent.getBoundingClientRect();
// The popup menu element
const elementBox = element.getBoundingClientRect();
const calculatedLeft = cursor.left - parentBox.left;
const calculatedRight = parentBox.right - cursor.right;
const bottom = Math.trunc(cursor.bottom - parentBox.top);
const top = Math.trunc(cursor.top - parentBox.top);
const rect = new DOMRect(cursor.left, cursor.top, 0, cursor.bottom - cursor.top);
const left =
calculatedLeft + elementBox.width > parentBox.width
? calculatedLeft - elementBox.width
: calculatedLeft;
const right =
calculatedRight + elementBox.width > parentBox.width
? calculatedRight - elementBox.width
: calculatedRight;
return { rect, right, left, bottom, top };
},
});
be9a9c17: Move all keymap functionality to KeymapExtension
from @remirror/core
. Remove all
references to @remirror/extension-base-keymap
.
isEmptyParagraphNode
and absoluteCoordinates
exports from@remirror/core-utils
.PlaceholderExtension
emptyNodeClass
option.a7037832: Use exact versions for @remirror
package dependencies
and peerDepedencies
.
Closes #435
dcccc5fc: Add browser entrypoint to packages and shrink bundle size.
231f664b: Upgrade dependencies.
6c6d524e: Remove use of export *
for better tree shaking.
Closes #406
Updated dependencies [6528323e]
Updated dependencies [206c1405]
Updated dependencies [f032db7e]
Updated dependencies [a7037832]
Updated dependencies [6e8b749a]
Updated dependencies [dcccc5fc]
Updated dependencies [231f664b]
Updated dependencies [982a6b15]
Updated dependencies [6c6d524e]
Updated dependencies [6c6d524e]
Updated dependencies [e518ef1d]
Updated dependencies [be9a9c17]
Updated dependencies [1918da2c]
Updated dependencies [2592b7b3]
Updated dependencies [720c9b43]
Published by ifiokjr about 4 years ago
cdc5b801: Add three new helpers to @remirror/core-utils
/ @remirror/core
: isStateEqual
,
areSchemaCompatible
and getRemirrorJSON
.
BREAKING: 💥 Rename getObjectNode
to getRemirrorJSON
.
0ff4fd5c: Default to inserting a new paragraph node after the HorizontalRuleExtension
.
BREAKING: 💥 Rename horizonalRule
command to insertHorizontalRule
.
Add a new option insertionNode
to the HorizontalRuleExtension
which sets the default node to
automatically append after insertion.
Update the css styles for the default hr
tag.
Closes #417
44516da4: Support chained
commands and multiple command updates in controlled editors.
Fixes #418
e5ea0c84: Add support for Handler
options with custom return values and early returns.
Previously handlers would ignore any return values. Now a handler will honour the return value.
The earlyReturn value can be specified in the static options using the extensionDecorator
.
Currently it only supports primitives. Support for a function to check the return value will be
added later.
08e51078: Add insertHardBreak
command.
Add inline documentation instructing developers to use the TrailingNodeExtension
when using
hardBreak
to exit a codeBlock
.
f91dcab1: 🎉 New extension @remirror/extension-events
.
This extension adds handlers for the events happening within the remirror editor. The extension is
part of the CorePreset
but it doesn't make it's handlers available to the preset. In order to
use the handlers you will need direct access to the EventsExtension
.
import { EventsExtension } from 'remirror/extension-events';
import { useExtension } from 'remirror/react';
const Editor = () => {
useExtension(
EventsExtension,
({ addHandler }) => {
addHandler('focus', () => log('focused'));
},
[],
);
};
To begin with the only events added are focus
and blur
.
0dd4d621: Prevent mid word emoji matches on colon press.
273d0a71: Hide social popups when the editor is blurred.
9d708c03: Reduce the AutoLinkExtension
priority and remove priority override for the mention and
emoji extensions.
a404f5a1: Add the option excludeExtensions
to CorePreset
's constructor
to exclude any
extensions.
Remove the option excludeHistory
from CorePreset
's constructor
.
e3d937f0: Support chaining for setBold
and removeBold
commands.
6c3b278b: Make sure the transaction
has all the latest updates if changed between
onStateUpdate
events. This allows chaining to be supported properly.
7477b935: Use NonChainableCommandFunction
annotation to indicate commands are not chainable.
Updated dependencies [cdc5b801]
Updated dependencies [0dd4d621]
Updated dependencies [0ff4fd5c]
Updated dependencies [273d0a71]
Updated dependencies [44516da4]
Updated dependencies [9d708c03]
Updated dependencies [e5ea0c84]
Updated dependencies [a404f5a1]
Updated dependencies [e3d937f0]
Updated dependencies [6c3b278b]
Updated dependencies [7477b935]
Updated dependencies [08e51078]
Updated dependencies [f91dcab1]
Published by ifiokjr over 4 years ago
@remirror/pm
- Update ProseMirror dependencies to the latest versions.Published by ifiokjr over 4 years ago
The whole API for remirror has completely changed. These pre-release versions are a breaking
change across all packages. The best way to know what's changed is to read the documentaion on the
new documentation site https://remirror.io
.
28bd8bea: This is a breaking change to the structure of published npm packages.
lib
to dist
7b817ac2: Rename all types and interfaces postfixed with Params
to use the postfix Parameter
.
If your code was importing any matching interface you will need to update the name.
09e990cb: Update EditorManager
/ ExtensionManager
name to be **RemirrorManager
.
Previously the useRemirror
hook only updated when the provider was updated. There are times when
you want to listen to specific changes from inside the editor.
The useRemirror
hook now takes an optional onChange
argument which is called on every change
to the editor state. With this you can react to updates in your editor and add some really cool
effects.
Add support for React.StrictMode
.
Previously, activating StrictMode
would cause the components to render twice and break
functionality of RemirrorProvider
due to an outdated check on whether getRootProps
had been
called. This check has been removed since it isn't needed anymore.
Published by ifiokjr almost 5 years ago
@remirror/react
, @remirror/editor-wysiwyg
, @remirror/editor-social
: New extensions
props on the RemirrorManager
for injecting additional extensions into prebuilt editors https://github.com/ifiokjr/remirror/pull/176.Published by ifiokjr about 5 years ago
jest-prosemirror
: New snapshot serializer exported as prosemirrorSerializer
.jest-prosemirror
: New debug
method which logs the editor's prettified html to the console.prosemirror-suggest
: Now supports ignoring activation characters to prevent matches from appearing in ignored sections.@remirror/extension-mention
: Fix a long standing bug where the editor crashes after deleting a single character mention.Published by ifiokjr about 5 years ago
🚀 @remirror/react-hooks
: New package for shared react hooks.
🚀 @remirror/react-portals
: New package for the remirror / react portals.
🚀 @remirror/react-node-view
: New package for prosemirror node views built with react components.
🚀 @remirror/dev
: New package developing extensions and components.
🚀 prosemirror-suggest
: New package for managing prosemirror suggestions.
🚀 test-keyboard
: New package for dispatching keyboard events.
🚀 @remirror/ui
, @remirror/ui-buttons
, @remirror/ui-dropdown
, @remirror/ui-icons
, @remirror/ui-menus
, @remirror/ui-modal
, @remirror/ui-text
: New packages and several utilities for managing the ui of a remirror editor.
🚀 @remirror/core
: Introduce the concept of meta tags for extensions. These allow an extension to tag itself and these tags are made available through the tag object which is passed to all extension methods.
🚀 @remirror/core
: Add a helpers
method to extensions. These are similar to commands except they don't have access to the view and shouldn't directly affect the editor. They can also return data and receive custom parameters. They can be accessed with manager.data.helpers.myHelper()
.
🚀 @remirror/core-extensions
: Add TrailingNodeExtension
to always append a specified node to the end of the dom.
@remirror/core
: Add getExtraAttrs
method to the extension which can be used in the (Mark/Node)Extension
.
🚀 @remirror/core
: Add DropCursorExtension
for a cursor to show up at the exact location an item will be dropped.
🚀 @remirror/core
: Add GapCursorExtension
for support of tricky to select locations.
Introduce new @builtin
annotation to show when an extension is included by default.
Introduce new @schema
annotation for extension options to indicated that an option should not be updated after creating or it will change the schema.
New command yarn generate:json
which auto generates json files for support/rollup/rollup.config.js
, support/storybook/.babelrc.js
, support/tsconfig.paths.json
and .size-limit.json
. Previously these were maintained manually.
💥 BREAKING @remirror/react-renderer
: Updated the name of @remirror/renderer-react
for consistency.
💥 BREAKING @remirror/core
: @emotion/core
is now a peerDependency
. When adding this library to your project you will need to yarn add @emotion/core
as well. This is required to prevent bugs with version conflicts within the EmotionThemeProvider.
💥 BREAKING @remirror/core
: deepMerge
now takes multiple parameters instead of one array of objects to merge.
💥 BREAKING @remirror/core
@remirror/core-extensions
and all extensions: Refactor ExtensionTypes with a whole set of helpers for better type checking and self documenting types. Now the remirror component can receive the List of Extensions and from this infer the nodes, marks and actions available on any editor. Currently this inference has only been added to the Wysiwyg editor but will be added to the Twitter editor and all future editors.
💥 BREAKING @remirror/core
@remirror/core-extensions
: Move ParagraphExtension
from core to core-extensions. The reason is to not pollute the core library with formatting methods which are primarily just for extensions.
💥 BREAKING @remirror/core
: Rename ExtensionType.EXTENSION = 'extension'
to ExtensionType.Plain = 'plain'
.
💥 BREAKING @remirror/ui
: Rename @remirror/react-components
to @remirror/ui
. It is now the base component that will be used for all ui related functionality.
💥 BREAKING @remirror/react-utils
: Refactor the type signature of node views and improve their design. Now node view takes attrs and options.
💥 BREAKING @remirror/react
: Rename NodeViewPortalComponent
to RemirrorPortals
since it now supports decorations.
💥 BREAKING @remirror/react
: Change the name of useRemirror
to useRemirrorContext
.
💥 BREAKING @remirror/editor-social
: Rename @remirror/editor-twitter
to @remirror/editor-social
for branding reasons.
💥 BREAKING @remirror/core
: Rename NodeViewPortalContainer
to PortalContainer
.
💥 BREAKING @remirror/core
: Refactor the type signature of SSRComponents to only take a node and options extraAttrs
configuration to enable parsing the dom.
💥 BREAKING jest-prosemirror
: Names of matchers have been changed. transformsPMNode
is now toTransformNode
and toEqualPMNode
is now toEqualProsemirrorNode
.
@remirror/core
: Update extraAttrs
configuration to enable parsing the dom.
@remirror/core
: Make default priority level for extensions 3
instead of 2
. A lower number means the extension is deemed more important and ordered earlier in lists.
@remirror/core-extensions
: Add extraAttrs
to the following extensions: LinkExtension
, ParagraphExtension
, HeadingExtension
.
@remirror/renderer-react
: Removed package.@remirror/react-utils
: Remove placeholder prop from the RemirrorManager
.@remirror/react
: Remove higher order components.@remirror/react
: Remove withoutEmotion
prop. This should now be configured via the RemirrorThemeProvider
component.Published by ifiokjr about 5 years ago