@panphora/clayjs 1.6.1 → 1.8.0

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
@@ -105,20 +105,21 @@ Three tiers. The first two are a promise; the third is not.
105
105
  | Tier | What it is | Promise |
106
106
  |---|---|---|
107
107
  | `clay.*` from `clay.js` | the everyday surface | stable |
108
- | `clay.*` from a satellite (`clay-ui`, `clay-utils`, `clay-dom`, `clay-events`, `clay-options`, `clay-internals`) | opt-in, one script tag each | stable |
108
+ | `clay.*` from a satellite (`clay-ui`, `clay-utils`, `clay-dom`, `clay-events`, `clay-options`, `clay-internals`, `clay-data`) | opt-in, one script tag each | stable |
109
109
  | anything else under `src/` | reachable by direct import, because `src/` ships | **may change in any release** |
110
110
 
111
111
  The contract starts at **1.0.0**: no name below changes without a major version.
112
112
 
113
- **`clay.js`** — `ready`, `save()`, `save.force()`, `getHTML()`, `addDocumentTransform(fn)`, `onSnapshot(fn)`,
113
+ **`clay.js`** — `ready`, `save()`, `save.force()`, `readData()`, `writeData()`, `getHTML()`, `addDocumentTransform(fn)`, `onSnapshot(fn)`,
114
114
  `toggleEditMode()`, `isEditMode`, `isOwner`, `Mutation`, `region`, `cacheBust(el)`, plus `undo` / `cms` / `morph` /
115
115
  `RichClay` / `quickcrop` when those plugins load. View mode keeps only the always-available members
116
- (`toggleEditMode`, `isEditMode`, `isOwner`, `Mutation`, `region`, `ready`); edit-only members are simply absent.
116
+ (`toggleEditMode`, `isEditMode`, `isOwner`, `Mutation`, `region`, `readData`, `writeData`, `ready`); edit-only members are simply absent.
117
117
 
118
118
  **Satellites** — one script tag each, and each resolves its own `clay.loaded.*` promise. `clay-ui` adds
119
119
  `toast`, `toastPersistent`, `ask`, `confirm`, `tell`, `snippet`, `modal`; `clay-utils` adds `clay.utils`
120
120
  (`throttle`, `debounce`, `cookie`, `slugify`, `copyToClipboard`); `clay-internals` adds `clay.internals`,
121
- the low-level surface for code that needs to sit *inside* the save lifecycle rather than call it.
121
+ the low-level surface for code that needs to sit *inside* the save lifecycle rather than call it; `clay-data`
122
+ adds `extractData` and `applyData` for live page JSON.
122
123
  `clay-events`, `clay-dom`, `clay-options` and `all.js` add HTML attributes and DOM helpers rather
123
124
  than members on `clay`.
124
125