@onereach/idw-ui-components 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,6 +16,16 @@ The host app must load Onereach styles / Tailwind (`@onereach/styles`) so utilit
16
16
  pnpm add @onereach/idw-ui-components
17
17
  ```
18
18
 
19
+ ## Card renderer formats
20
+
21
+ `CardRenderer` accepts `{ card }` with either `idw.card/1.0` or `idw.json-render/1.0`, and `{ templateId, data, renderer? }`. Templates use JSON-render by default; `renderer: 'idw-card'` selects the original renderer. Stored documents select their own format by `schema`.
22
+
23
+ The JSON-render 0.22.0 Vue registry delegates to the same `IdwCardElementView` and `IdwCardActionBar` used by the original renderer. It adds no presentation CSS. Both formats share IDW's required-field validation, form values, visibility, completed actions, nested show-card handling, host theme and emitted action events. Action side effects remain host-owned. The first catalog supports all five feed templates and `Input.Text`; use `idw-card` for other elements or nested layouts. Zod 4 is local to the JSON-render runtime; contracts retain Zod 3.
24
+
25
+ `resolveCardRendererSource` returns both the validated `document` and its canonical `card` projection. Hosts persisting a source must use `document`. See the [contracts package](../contracts/README.md#idw-cards) for schema discovery and graph restrictions.
26
+
27
+ Equivalent card refreshes preserve draft input values. Changed card content resets the form as before.
28
+
19
29
  ## Helpers
20
30
 
21
31
  ```typescript
@@ -417,3 +427,5 @@ List cards open through the native full-card opener; collapsed Show more is omit
417
427
  The optional expanded prop coordinates a host-owned state through update:expanded. Undefined retains independent operation. expand/collapse methods are exposed for existing comments/reactions navigation. The app FeedList defaults singleOpen to true; passing false restores independent cards.
418
428
 
419
429
  Motion uses shared FEED_MOTION behavior settings (expand 360ms/cubic-bezier(0.4,0,0.2,1), collapse 300ms/cubic-bezier(0.4,0,0.2,1)). A stable inner layout is revealed by animating shell height; interrupted motion preserves the current frame and reduced motion skips animation. The host scroller marks data-feed-scroll and disables scroll anchoring. Opening follows bottom overflow and keeps the header visible while a preceding card collapses in a single-open list; user wheel/touch/pointer input cancels following. No palette/font values or CSS token aliases are introduced.
430
+
431
+ Contracts import `zod/v3` explicitly (Zod >=3.25.76); the renderer bundles its Zod 4 dependency. This keeps consumer dependency optimization from merging incompatible bare Zod imports when both card formats are used together.