Releases: puckeditor/puck
v0.20.2
Bug Fixes
- add CommonJS export to emotion cache package.json (fbf3bd1)
- bypass resolveData cache when trigger is force (eea53e0)
- preserve selection when switching viewports and using zoom select (38514a1)
- prevent hidden category components from showing in 'Other' (8333eaf)
Contributors
Full Changelog: v0.20.1...v0.20.2
v0.20.1
Bug Fixes
- address type issues when using root (38076a9)
- don't widen getItemSummary type for array fields (92112b9)
- don't widen getItemSummary type for external fields (e58ac42)
- fix slots within array and object fields (b7fba1b)
- render spaces/line breaks consistently in inline text fields (6c58995)
- strip line breaks when pasting into inline text field (2533c55)
Full Changelog: v0.20.0...v0.20.1
v0.20.0
Puck 0.20 introduces inline text editing, overlay portals for interacting with components in the preview, resizable sidebars, and several other improvements that make the editor more flexible for both users and developers.
Read the Puck 0.20 release post for a list of all the new features, and the Puck 0.20 upgrade guide for upgrading from Puck 0.19.3.
Below is a summary of the main new features and the complete changelog.
Summary
- Inline text editing: edit
text
,textarea
, andcustom
fields directly in the canvas without using the sidebar. - FieldTransforms API: modify the values that fields pass to component render functions. It can be used to adjust the value, like applying
toUpperCase
to a string, or map it to a different type entirely. - Resizable sidebars: drag the borders of the editor sidebars to resize them. Sidebar widths can also be read programmatically via the internal PuckAPI.
- Custom overlays: customize how the overlay appears when a component is hovered or selected in the editor with the
componentOverlay
override. - Overlay portals: exclude component elements from the editor overlay so they remain interactive in the canvas.
Full changelog
Features
- add componentOverlay override (1a47857)
- add fieldTransform API for modifying field values rendering in canvas (e67152b)
- add inline text editing to custom fields (042f4b2)
- add inline text editing to text and textarea fields (ed7c12e)
- add no-external.css bundle without external fonts (d97af5e)
- add overlay portals for interactive UI under overlay (7d50c23)
- add setDeep convenience utility (676e2ab)
- enable resizing the sidebars (8909f8c)
- export SlotComponent type (d12fc3a)
- extend migrate function to support dynamic DropZones to slots (3da831b)
- make overrides optional in plugins (baed208)
- rename components & componentList overrides to drawer & drawerItem (e40fdfe)
- simplify generic type API on Config and ComponentConfig (04fc574)
- support object, null and undefined in select/radio options (6dace1c)
- support theming of font family (6cf56a8)
Bug Fixes
- add missing tiny-invariant dependency in remix recipe (d405985)
- address error when using disallow on a slot in root (93d525c)
- don't revert custom Drawer.Items during drag (0578004)
- ensure nested name is propagated to custom fields (f09540d)
- prevent field zoom on mobile devices (660fd08)
- prevent iframe hanging when stylesheets empty (ea0610a)
- reattach inline ref if element changes (ba585f9)
- remove erroneous get() API from usePuck (c119ed0)
- respect user generic in usePuck hook (6760121)
- respect user types in getItemBySelector and getItemById (f2d031f)
- retain DropZone content in interactive mode (d2e09bd)
- retain metadata in interactive preview mode (68dd73b)
- support user-defined fields in overrides (5cb4cc6)
- type object, array, and external field types correctly (f768aab)
- type user fields in overrides (54d71e3)
Contributors
v0.19.3
v0.19.2
Bug Fixes
- ensure setHistories resets the appState (7cccfdd)
- prevent icon buttons from submitting parent form (5f6f6d8)
- release ctrl/cmd when tab changes (37d387b)
- respect slot label in outline panel (cccf912)
New Contributors
- @coftad made their first contribution in #1144
- @FocusThen made their first contribution in #1148
Full Changelog: v0.19.1...v0.19.2
v0.19.1
v0.19.0
Puck 0.19 introduces the Slots API for nesting components using fields, along with major performance optimizations, a new metadata API, and various quality-of-life improvements.
Read the Puck 0.19 release post for a list of all the new features, and the Puck 0.19 upgrade guide for upgrading from Puck 0.18.3.
Summary
- Slots API:
slot
is a new field type you can use to nest components. Since slots are fields, you can fully leverage APIs likedefaultProps
andresolveData
to programmatically control nested content. walkTree
: a utility function for recursively traversing and updating the entire data payload, or just a singleComponentData
node. It can be used to inspect, update, or validate nested components.- Metadata API: inject data into all components in your config without using React context. The injected data is available in both
render
andresolveData
. - Selectors for
usePuck
: subscribe to the parts of the internal Puck API you need in order to avoid unnecessary re-renders using thecreateUsePuck
factory. useGetPuck
: access the latest Puck API within callbacks without triggering re-renders.
Full changelog
Features
- add convenience metadata API to fields (5fe936e)
- add getItem helpers to usePuck (ad947d8)
- add labelIcon param to all fields for custom label icons (24030a9)
- add mapSlots helper function for manipulating slot data (a27944f)
- add metadata API for passing data to every component (b9add22)
- add placeholder param for text, textarea and number fields (32a6f78)
- add react-router v7 recipe (706ea0c)
- add replaceRoot action to dispatcher (586eccd)
- add selector to usePuck for improved performance (8976e5f)
- add slots API (40bc2ee)
- add step parameter to number fields (0ea6ce4)
- add useGetPuck hook for getting latest internal PuckApi (1d9a47d)
- add visible param to show/hide fields (e5911f3)
- deprecate DropZone component (d54145d)
- export package.json for module federation (b918900)
- expose CustomFieldRender type for custom field render functions (8d459e4)
- expose RootConfig type (638e066)
- expose WithSlotProps type (6dc5101)
- provide
trigger
event to resolveData parameters (55b42ae) - rename mapSlots to walkTree (427e686)
- support slots in transformProps via optional config arg (7d59b94)
Performance Improvements
Bug Fixes
- account for transforms in overlays (22f5e3a)
- add missing
id
to changed type for resolvers (eb4f9d8) - avoid query selector collision with multiple iframes (2c1db86)
- bind array item to correct field when using multiple arrays (7e231b7)
- deeply check items before populating resolveData changed (db75e42)
- don't artificially constrain array items to container (36b5713)
- don't collide with parent if component contains drop zone (e7d2371)
- don't render array item until dropped (1dfc1b3)
- don't reset old values when modifying fields in other array items (ad78e98)
- don't track dragged headings in heading-outline-analyzer (2e1a24e)
- ensure array items can be opened on mobile (a60c81e)
- ensure file inputs work inside array fields (83f8f2d)
- ensure nested array fields are draggable (af4f756)
- export migrate util in RSC bundle (2568ac3)
- expose transformProps in server bundle (020071e)
- fix undo/redo hotkeys for Windows (a994207)
- prevent ActionBar clipping if it exceeds top bounds (56f23e8)
- prevent horizontal scroll on touch devices (cb4b6ee)
- prevent input-type fields from exceeding container boundaries (b22833e)
- prevent item from sometimes sticking to window during drag (e62832e)
- reflect resolveData value changes in fields (69dd799)
- remove erroneous React 17 from supported peer dependencies (46212f0)
- remove unexpected license from recipes (7010bdc)
- reorder array items more predictably (64c65c3)
- reset stacking context in Puck entry (6bf9c99)
- restore ability to drop between sibling zones (2807cba)
- restore field values during undo/redo (6917928)
- retain minimum height when ActionBar is empty (a52ccb9)
- set ready status more reliably when using strict mode (5a526d0)
- show correct styles when insert permission is disabled (f19cdca)
- show top border on array bu...
v0.18.3
Bug Fixes
- bind array item to correct field when using multiple arrays (934cfae)
- don't artificially constrain array items to container (648a235)
- don't render array item until dropped (94f5e23)
- don't reset old values when modifying fields in other array items (73c17b3)
- don't track dragged headings in heading-outline-analyzer (3c16391)
- ensure file inputs work inside array fields (746033f)
- ensure nested array fields are draggable (0bdd243)
- expose transformProps in server bundle (d234345)
- prevent ActionBar clipping if it exceeds top bounds (e8355f0)
- remove erroneous React 17 from supported peer dependencies (98ad734)
- reorder array items more predictably (659f2d8)
- show top border on array button when array empty (7442118)
New Contributors
- @christian-tchaikovsky made their first contribution in #956
v0.18.2
Bug Fixes
- add missing types for root render method (0f52caf)
- address ownerDocument permission error in Firefox (c22b3a9)
- address prop name collision regression (3a69ad4)
- correctly infer types when using Render with RSC (ad7fbf4)
- don't jump to end of textarea fields during change (36c27a9)
- don't trigger clicks when dropping array items (29a7f1d)
- don't trigger drag when interacting with array fields (c7cd341)
- ensure ctrl+i interactive toggle hotkey works on Windows (5db6f4d)
- ensure renderDropZone provided correctly to root render (b9ce5b7)
- fix RTL drag-and-drop behaviour (28f518a)
- improve behaviour of array drag-and-drop (565fabd)
- provide empty readOnly object instead of undefined to root resolveFields (8992a94)
- provide updated props to resolveFields (b7ff689)
- reinstate padding for external field filters (28ccfda)
- tidy up stale items on drag cancellation (de48691)
- update styles for RTL (23c8dda)
- use correct type for onChange args when overriding fieldTypes (daff71e)
New Contributors
- @FedericoBonel made their first contribution in #842
- @rv-bparise made their first contribution in #834
Full Changelog: v0.18.0...v0.18.2