All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
sync.fieldUpdatenow defaults totrue, so live field sync works without opting in; set it tofalseto keep the save-then-reload flow
- The field-update path no longer logs to the console unless
debugis set; these three logs were ungated and are now on by default for every consumer
- Scalar list field support (
isListupdates): String/ID/Enumeration/Int/Float/Boolean/Date/DateTime lists now update live instead of being withheld by Studio data-hygraph-list-indexattribute and thelistIndexoption oncreatePreviewAttributes, to have each list item patched individuallyscalarListSynccapability in thereadymessage, which is how Studio decides whether list updates are safe to sendpreview:field-updatedis now emitted after the built-in updater applies a change, andpreview:update-failedwhen it cannot; the update event detail carriescomponentChain,isList,fieldType, andtransformedValue
- A whole-list binding renders its items joined with
,; a binding that has child elements is refused (reported viapreview:update-failed) rather than having its markup overwritten
- Enhanced README with comprehensive explanations of
data-hygraph-component-chainattribute - Added detailed examples for single-level and deeply nested components
- Clarified the relationship between
data-hygraph-entry-idand component chains - Added examples for union/modular components with multiple component types
- Included GraphQL query examples showing how to extract
instanceIdvalues - Improved component chain documentation with helper function usage examples
1.0.0 - 2024-11-13
- Initial stable release of Hygraph Preview SDK
- React component (
HygraphPreview) with framework-native refresh support - Core JavaScript SDK (
Preview) for vanilla JavaScript and custom frameworks - Support for Next.js (App Router & Pages Router), Remix, Vue 3, and vanilla JavaScript
- Data attribute system for marking editable content (
data-hygraph-entry-id,data-hygraph-field-api-id) - Component chain support for nested and repeatable components
- Edit button overlays for intuitive content navigation
- Field focus synchronization with Hygraph Studio
- Real-time field updates (optional)
- Event system for save callbacks and content updates
- TypeScript support with full type definitions
- Multiple bundle formats (ESM, CommonJS, UMD)
- Helper functions:
createPreviewAttributes,createComponentChainLink,withFieldPath - Comprehensive documentation and examples for all supported frameworks
- Zero-flicker content updates using framework-specific refresh mechanisms
- Automatic element detection via MutationObserver
- Dual mode operation (iframe and standalone)
- Configurable overlay styling and positioning
- Rich text format preferences (HTML, Markdown, Text)
- Debug mode for development
- Customizable allowed origins for security