Bot releases are hidden (Show)
Published by dmerckx about 2 years ago
The exports of the alinea package are restructed. This is a breaking change
because the input fields are no longer exposed directly but bundled in the
"alinea" namespace. A few less used exports were removed and can be
found in the @alinea
packages.
Client code is shielded from being included server side when compiling with
the "worker" condition enabled.
Initial support for selecting external links in the link field. The RichText
ui component is adjusted to correctly render links. A custom component or tag
can be passed to render links.
<RichText a={<a className="custom-link" />} doc={doc} />
<RichText a={CustomLinkComponent} doc={doc} />
typeNamespace
. It did not take the namespace into account, butThe alinea cli will now forward commands placed after the serve or generate
commands. It will wait until the alinea package is generated before doing so
to make sure userland code can always depend on the package being available.
It also simplifies running the dashboard and development server without
requiring tools like npm-run-all. In practice, for a next.js website, this
means one can configure scripts like so:
{
"scripts": {
"dev": "alinea serve -- next dev",
"build": "alinea generate -- next build"
}
}
Added a button to mark text as small within the rich text editor
New UI buttons to insert rows in any position in a list field
User preferences get a dedicated popover
Previews can register a listener and implement their own refetch mechanism.
The communication happens via messages which work cross-origin.
// For any environment
import {registerPreview} from '@alinea/preview'
registerPreview({
refetch() {
// Reload server data
}
})
// A react hook is available
import {usePreview} from '@alinea/preview/react'
const {isPreviewing} = usePreview({
refetch() {
// Reload server data & redraw
}
})
// A hook specifically for next.js, which refetches static/server props
import {useNextPreview} from '@alinea/preview/next'
const {isPreviewing} = useNextPreview()
Published by dmerckx over 2 years ago
alinea
object that bundles the previouslyA RichText react component is exposed from @alinea/ui to render rich text
values
Auto-close navigation sidebar only for small screens (< 768px)
Update number field styles to use updated css variable names
Select fields configuration can now be set using the configure
method. This
helps type inference for the initial value.
select('Level', {
info: 'Info',
warning: 'Warning'
}).configure({
initialValue: 'info'
})