@panphora/clayjs 1.3.0 → 1.4.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 +3 -2
- package/dist/clay.standalone.js +1595 -828
- package/entries/sap.js +1 -1
- package/package.json +1 -1
- package/src/core/admin-contenteditable.js +4 -1
- package/src/core/admin-inputs.js +23 -13
- package/src/core/admin-onclick.js +5 -0
- package/src/core/is-edit-mode.js +7 -2
- package/src/core/save.js +13 -1
- package/src/core/snapshot.js +44 -1
- package/src/core/source-map.js +246 -38
- package/src/loader-logic.js +8 -2
- package/src/loader.js +2 -0
- package/src/plugins/ai-edit.js +625 -0
- package/src/plugins/source.js +150 -66
- package/src/sync/live-sync.js +3 -0
- package/src/vendor/control-serialize.vendor.js +10 -6
- package/src/vendor/hyper-morph.vendor.js +2 -2
package/README.md
CHANGED
|
@@ -51,13 +51,14 @@ query params on the script URL:
|
|
|
51
51
|
<script src="https://clayjs.com/v1/clay.js?plugins=sync,cms&exclude=indicator"></script>
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
- `?plugins=` — add optional plugins: `sync`, `cms`, `undo`, `sortable`, `indicator`, `quickcrop`, `upload`, `wire`, `demo`.
|
|
54
|
+
- `?plugins=` — add optional plugins: `sync`, `cms`, `undo`, `sortable`, `indicator`, `quickcrop`, `upload`, `wire`, `ai-edit`, `demo`.
|
|
55
55
|
Only `richclay` loads by default, and only in edit mode. `cms` brings `quickcrop` with it, because
|
|
56
56
|
the CMS uses it for `data-hcms-crop` image fields.
|
|
57
57
|
- `?exclude=` — drop a plugin that would otherwise load (a default, or one another plugin pulled in).
|
|
58
58
|
- `?editmode=false` — force view mode (URL param wins over everything else).
|
|
59
59
|
|
|
60
|
-
Edit mode is decided in this order: the `?editmode` param, then `
|
|
60
|
+
Edit mode is decided in this order: the `?editmode` param, then a `viewonly` attribute
|
|
61
|
+
on `<html>` (a page that never saves itself), then `window.clayEditMode`,
|
|
61
62
|
then a save token stamped on `<html>` by the host, then the platform's owner cookie. Hosts
|
|
62
63
|
and save tokens are covered in [the reference](https://github.com/panphora/clayjs/blob/main/docs/reference.md) and on
|
|
63
64
|
[clayjs.com/docs](https://clayjs.com/docs#editmode).
|