astro-portabletext@0.4.0
github-actions
released this
26 Sep 03:28
·
260 commits
to main
since this release
Minor Changes
-
1c102cf: Feat: Made
mergeComponents
andtoPlainText
functions available to be used. -
f8b9a06: Removed deprecated types
-
c6cbd3b: Redefined
Block
type with propertystyle
set tonormal
.style
is set tonormal
whenundefined
during render phase.- Depreacted
BlockStyle
in favour forBlock
.
-
a6bfa8e: Feat: Made
Block
,List
,ListItem
andMark
components available to be used to help extend custom components. -
11ffafc: BREAKING Changed
NodeType
type fromenum
tostring
- This effects
PortableText
proponMissingComponent
handler
- This effects
-
d1b38ea: BREAKING
Props<N>
typeN
parameter should extendTypedObject
.- import type { Props as $ } from "astro-portabletext/types"; + import type { Props as $, TypedObject } from "astro-portabletext/types"; - interface Greet { + interface Greet extends TypedObject { greeting: string; }; export type Props = $<Greet>;
-
9753535: BREAKING Brings in consistent naming, which reflects Portable Text node types.
T NodeType
- type NodeType = "block" | "blockStyle" | "listStyle" | "listItemStyle" | "mark"; + type NodeType = "type" | "block" | "list" | "listItem" | "mark";
T PortableTextComponents
Property Counterpart type unknownType block unknownBlockStyleunknownBlocklist unknownList listItem unknownListItem mark unknownMark hardBreak PortableText
<PortableText components={{ - unknownBlockStyle: /* custom component */; + unknownBlock: /* custom component */; }} >
Patch Changes
- 8644be2: Fixes [object Generator] output error