@themarioga/grid-editor 9.0.0-beta.6 → 9.0.0-beta.7

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +25 -12
  3. package/dist/grideditor.bundle.min.js +2 -2
  4. package/dist/grideditor.d.ts +7 -2
  5. package/dist/grideditor.esm.js +55 -7
  6. package/dist/grideditor.js +55 -7
  7. package/dist/grideditor.min.js +1 -1
  8. package/dist/grideditor.min.js.map +3 -3
  9. package/dist/locales/grideditor.es.esm.js +1 -0
  10. package/dist/locales/grideditor.es.js +1 -0
  11. package/dist/locales/grideditor.es.min.js +1 -1
  12. package/dist/locales/grideditor.es.min.js.map +2 -2
  13. package/dist/plugins/grideditor.accordion.esm.js +9 -0
  14. package/dist/plugins/grideditor.accordion.js +9 -0
  15. package/dist/plugins/grideditor.accordion.min.js +1 -1
  16. package/dist/plugins/grideditor.accordion.min.js.map +3 -3
  17. package/dist/plugins/grideditor.card.min.js +1 -1
  18. package/dist/plugins/grideditor.card.min.js.map +1 -1
  19. package/dist/plugins/grideditor.carousel.esm.js +3 -0
  20. package/dist/plugins/grideditor.carousel.js +3 -0
  21. package/dist/plugins/grideditor.carousel.min.js +1 -1
  22. package/dist/plugins/grideditor.carousel.min.js.map +3 -3
  23. package/dist/plugins/grideditor.ckeditor.esm.js +9 -0
  24. package/dist/plugins/grideditor.ckeditor.js +9 -0
  25. package/dist/plugins/grideditor.ckeditor.min.js +1 -1
  26. package/dist/plugins/grideditor.ckeditor.min.js.map +3 -3
  27. package/dist/plugins/grideditor.clipboard.esm.js +44 -7
  28. package/dist/plugins/grideditor.clipboard.js +44 -7
  29. package/dist/plugins/grideditor.clipboard.min.js +1 -1
  30. package/dist/plugins/grideditor.clipboard.min.js.map +3 -3
  31. package/dist/plugins/grideditor.codemirror-inline.min.js.map +1 -1
  32. package/dist/plugins/grideditor.codemirror.min.js.map +1 -1
  33. package/dist/plugins/grideditor.elements.esm.js +3 -0
  34. package/dist/plugins/grideditor.elements.js +3 -0
  35. package/dist/plugins/grideditor.elements.min.js +1 -1
  36. package/dist/plugins/grideditor.elements.min.js.map +3 -3
  37. package/dist/plugins/grideditor.gutters.min.js.map +1 -1
  38. package/dist/plugins/grideditor.history.esm.js +1 -1
  39. package/dist/plugins/grideditor.history.js +1 -1
  40. package/dist/plugins/grideditor.history.min.js +1 -1
  41. package/dist/plugins/grideditor.history.min.js.map +2 -2
  42. package/dist/plugins/grideditor.inline-style.min.js.map +1 -1
  43. package/dist/plugins/grideditor.offcanvas.min.js.map +1 -1
  44. package/dist/plugins/grideditor.order.min.js +1 -1
  45. package/dist/plugins/grideditor.order.min.js.map +1 -1
  46. package/dist/plugins/grideditor.popup.min.js.map +1 -1
  47. package/dist/plugins/grideditor.sections.esm.js +9 -0
  48. package/dist/plugins/grideditor.sections.js +9 -0
  49. package/dist/plugins/grideditor.sections.min.js +1 -1
  50. package/dist/plugins/grideditor.sections.min.js.map +3 -3
  51. package/dist/plugins/grideditor.summernote.esm.js +9 -0
  52. package/dist/plugins/grideditor.summernote.js +9 -0
  53. package/dist/plugins/grideditor.summernote.min.js +1 -1
  54. package/dist/plugins/grideditor.summernote.min.js.map +3 -3
  55. package/dist/plugins/grideditor.tabs.esm.js +3 -0
  56. package/dist/plugins/grideditor.tabs.js +3 -0
  57. package/dist/plugins/grideditor.tabs.min.js +1 -1
  58. package/dist/plugins/grideditor.tabs.min.js.map +3 -3
  59. package/dist/plugins/grideditor.tinymce.esm.js +9 -0
  60. package/dist/plugins/grideditor.tinymce.js +9 -0
  61. package/dist/plugins/grideditor.tinymce.min.js +1 -1
  62. package/dist/plugins/grideditor.tinymce.min.js.map +3 -3
  63. package/docs/events.md +6 -1
  64. package/docs/locale-keys.md +1 -0
  65. package/docs/plugins.md +2 -1
  66. package/example/clipboard.html +7 -4
  67. package/package.json +1 -1
  68. package/src/js/dom.js +6 -0
  69. package/src/js/grideditor.js +58 -6
  70. package/src/js/locales/grideditor.es.js +1 -0
  71. package/src/js/plugins/grideditor.clipboard.js +61 -11
  72. package/src/js/plugins/grideditor.history.js +3 -3
  73. package/types/grideditor.d.ts +7 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
 
8
+ ## [9.0.0-beta.7] - 2026-10-21
9
+
10
+ ### Added
11
+ - clipboard: cut. A *Cut* tool beside *Copy* in every drawer that has it, and
12
+ Ctrl+X (⌘X) on the target, with `active_target`. It copies the node and
13
+ removes it as its delete tool does, without asking whatever `confirm_delete`
14
+ says. It is all or nothing: a `before-delete` that turns it away leaves the
15
+ clipboard as it was. The target goes to what held the node before it leaves,
16
+ so a paste right after puts it back. The `before-delete` and `after-delete`
17
+ of a cut have `source: 'cut'`, and `after-copy` has `cut`, true for a cut.
18
+ - The plugin handle's `ge.removeNode(node, { source, confirm, before })`: a node
19
+ removed as its own delete tool does, as asked.
20
+
21
+ ### Changed
22
+ - The plugin handle's `ge.setActiveTarget(null)` takes the target away, and
23
+ answers `true`.
24
+
25
+ ### Fixed
26
+ - history: deleting a node with its tool was two steps, one of them the canvas
27
+ halfway through the node's exit animation. A node animating out is marked
28
+ `ge-leaving` while it goes, and history waits for it: a delete, and a cut,
29
+ is one step. The mark never reaches `getHtml`.
30
+
8
31
  ## [9.0.0-beta.6] - 2026-10-21
9
32
 
10
33
  ### Changed
package/README.md CHANGED
@@ -817,8 +817,8 @@ A plugin:
817
817
  <script src="grid-editor/dist/plugins/grideditor.clipboard.min.js"></script>
818
818
  ```
819
819
 
820
- Every row, column, section, text, container and element gets a *Copy* tool in its
821
- drawer. While something is copied, a *Paste* tool shows wherever it can go, and
820
+ Every row, column, section, text, container and element gets a *Copy* tool and a
821
+ *Cut* tool in its drawer. While something is copied, a *Paste* tool shows wherever it can go, and
822
822
  nowhere else:
823
823
 
824
824
  | Copied | Pasted into |
@@ -853,17 +853,30 @@ A paste is an add like any other: `before-add-*` and `after-add-*` with
853
853
  `source: 'paste'`, and canceling the first turns it away. A copy fires
854
854
  `grideditor:after-copy`.
855
855
 
856
+ *Cut* is a copy and a delete in one: what it copies is what *Copy* would, and the
857
+ node goes out as its delete tool would take it, but without asking, whatever
858
+ `confirm_delete` says. It is all or nothing: if a `before-delete` handler turns
859
+ the delete away, nothing is copied and the clipboard keeps what it had. A cut
860
+ fires `before-delete`, `after-copy` (with `cut: true`) and `after-delete`, and
861
+ the two deletes have `source: 'cut'`. With `active_target`, the target goes to
862
+ what held the node - a text's column, a column's row, a row's column or section,
863
+ a container's pane's container - so a paste right after puts it back there; a
864
+ top-level row or section leaves no target. A cut is one step for the history
865
+ plugin, and what was cut stays in the clipboard after an undo. Tabs and
866
+ accordion items have no *Cut*, as they have no *Copy*.
867
+
856
868
  With `active_target` - which `settings_panel: 'sidebar'` turns on - there are
857
- shortcuts too, Ctrl+C and Ctrl+V (⌘C and ⌘V on a Mac). Ctrl+C copies the
858
- target, as its *Copy* tool would, whatever its level: a container, a row, an
859
- element, a text. Ctrl+V pastes into the target as the toolbar adds to it - at
860
- the end of what it holds, in the row or the column it lacks, a section after
861
- the block it is in. With no target, they do nothing. They go to the editor used last, and leave
862
- the keys to the browser while a field or a text is being edited, while text
863
- is selected (for Ctrl+C), while a settings panel, a dialog or the delete
864
- confirmation is open, and outside editing. They use the same store as the
865
- tools: the system clipboard is not read or written. `after-copy` says
866
- `source: 'shortcut'` for a copy made with them.
869
+ shortcuts too, Ctrl+C, Ctrl+X and Ctrl+V (⌘C, ⌘X and ⌘V on a Mac). Ctrl+C copies
870
+ the target, as its *Copy* tool would, whatever its level: a container, a row, an
871
+ element, a text. Ctrl+X cuts it, as its *Cut* tool would. Ctrl+V pastes into the
872
+ target as the toolbar adds to it - at the end of what it holds, in the row or the
873
+ column it lacks, a section after the block it is in. With no target, they do
874
+ nothing. They go to the editor used last, and leave the keys to the browser while
875
+ a field or a text is being edited, while text is selected (for Ctrl+C and
876
+ Ctrl+X), while a settings panel, a dialog or the delete confirmation is open, and
877
+ outside editing. They use the same store as the tools: the system clipboard is
878
+ not read or written. `after-copy` says `source: 'shortcut'` for a copy or a cut
879
+ made with them.
867
880
 
868
881
  __`clipboard`:__ `{ shortcuts }`, the plugin's settings. `shortcuts` defaults to
869
882
  `active_target`; `false` turns them off, and `true` without `active_target`