@ohhwells/bridge 0.1.31 → 0.1.32

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
@@ -182,6 +182,27 @@ Add `data-ohw-editable` and `data-ohw-key` to any element the studio owner shoul
182
182
  - Use `kebab-case`
183
183
  - Must be stable — changing a key orphans any saved content for that element
184
184
 
185
+ ### 6. Bridge-managed links (nav, footer, CTAs)
186
+
187
+ For links whose **destination URL** is edited in the canvas, use a plain `<a>` with `data-ohw-href-key`. Put the editable label on an inner span:
188
+
189
+ ```tsx
190
+ <a href="/book" data-ohw-href-key="nav-book-href" data-ohw-role="navbar-button">
191
+ <span data-ohw-editable="text" data-ohw-key="nav-book-label">
192
+ Book a Class
193
+ </span>
194
+ </a>
195
+ ```
196
+
197
+ | Attribute | Purpose |
198
+ |-----------|---------|
199
+ | `data-ohw-href-key` | Storage key for the link destination |
200
+ | `href` | Default URL for SSR / first paint |
201
+ | `data-ohw-key` + `data-ohw-editable` on inner span | Editable label text |
202
+ | `data-ohw-role="navbar-button"` | Navbar CTA — two-phase select + link-action toolbar |
203
+
204
+ The bridge persists and restores `href` values (including after React re-renders). No template-side wrapper component is required.
205
+
185
206
  ---
186
207
 
187
208
  ## SchedulingWidget (vibe-coder placement)