@themarioga/grid-editor 8.0.0-beta.3 → 8.1.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +17 -11
  3. package/UPGRADING.md +21 -11
  4. package/dist/grideditor.bundle.min.js +3 -3
  5. package/dist/grideditor.css +52 -35
  6. package/dist/grideditor.d.ts +12 -9
  7. package/dist/grideditor.esm.js +44 -25
  8. package/dist/grideditor.js +44 -25
  9. package/dist/grideditor.min.css +1 -1
  10. package/dist/grideditor.min.css.map +1 -1
  11. package/dist/grideditor.min.js +2 -2
  12. package/dist/grideditor.min.js.map +3 -3
  13. package/dist/locales/grideditor.es.esm.js +70 -68
  14. package/dist/locales/grideditor.es.js +70 -68
  15. package/dist/locales/grideditor.es.min.js +1 -1
  16. package/dist/locales/grideditor.es.min.js.map +2 -2
  17. package/dist/plugins/grideditor.alignment.min.js.map +1 -1
  18. package/dist/plugins/{grideditor.style.esm.js → grideditor.inline-style.esm.js} +193 -184
  19. package/dist/plugins/{grideditor.style.js → grideditor.inline-style.js} +191 -182
  20. package/dist/plugins/grideditor.inline-style.min.js +4 -0
  21. package/dist/plugins/grideditor.inline-style.min.js.map +7 -0
  22. package/docs/locale-keys.md +82 -80
  23. package/docs/plugins.md +5 -5
  24. package/example/index.html +6 -6
  25. package/example/{style.html → inline-style.html} +5 -5
  26. package/example/utilities.html +3 -3
  27. package/package.json +1 -1
  28. package/src/js/grideditor.js +39 -22
  29. package/src/js/{style → inline-style}/accordion.js +9 -9
  30. package/src/js/{style → inline-style}/catalog.js +6 -6
  31. package/src/js/{style → inline-style}/custom.js +4 -4
  32. package/src/js/{style → inline-style}/display.js +2 -2
  33. package/src/js/{style → inline-style}/drawerflow.js +1 -1
  34. package/src/js/{style → inline-style}/fields.js +35 -25
  35. package/src/js/{style → inline-style}/flex.js +2 -2
  36. package/src/js/{style → inline-style}/float.js +2 -2
  37. package/src/js/{style → inline-style}/options.js +5 -5
  38. package/src/js/{style → inline-style}/sections.js +50 -50
  39. package/src/js/{style → inline-style}/spacing.js +2 -2
  40. package/src/js/{style → inline-style}/sticky.js +2 -2
  41. package/src/js/{style → inline-style}/textalign.js +2 -2
  42. package/src/js/locales/grideditor.es.js +70 -68
  43. package/src/js/plugins/grideditor.alignment.js +1 -1
  44. package/src/js/plugins/grideditor.inline-style.js +186 -0
  45. package/src/less/grideditor.less +43 -25
  46. package/types/grideditor.d.ts +12 -9
  47. package/dist/plugins/grideditor.style.min.js +0 -4
  48. package/dist/plugins/grideditor.style.min.js.map +0 -7
  49. package/src/js/plugins/grideditor.style.js +0 -185
package/CHANGELOG.md CHANGED
@@ -5,6 +5,46 @@ 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
+ ## [8.1.0] - 2026-09-30
9
+
10
+ ### Added
11
+ - `resize.tools`: `false` takes the narrower and wider tools (− +) out of
12
+ the columns' drawers, leaving the handle on the edge. With
13
+ `resize.enabled: false`, which takes the handle out, a column is resized
14
+ with the tools only; the default keeps both.
15
+ - `indent.tools`: `false` takes the indent tools out of the columns'
16
+ drawers. The offsets the markup has are kept, and `createColumn` still
17
+ takes one.
18
+
19
+ ### Fixed
20
+ - A shadow in the inline-style plugin's Border and Text sections, turned to
21
+ text with *Edit as text*, can go back to the builder: *Edit with the
22
+ builder* (`inline_style.shadow_builder_mode`), when the value is one
23
+ shadow or none.
24
+
25
+ ## [8.0.0] - 2026-09-30
26
+
27
+ The first stable 8.0: what 8.0.0-beta.1 to 8.0.0-beta.3 below brought, and
28
+ these changes on top of beta.3. See [UPGRADING.md](UPGRADING.md).
29
+
30
+ ### Changed
31
+ - **BREAKING:** The style plugin is renamed `inline-style`, with the same
32
+ behaviour: `grideditor.inline-style.js` (`plugins/inline-style` as a
33
+ module), `'inline-style'` in `plugins`, `GridEditor.utilities['inline-style']`,
34
+ the `inline_style` setting (`InlineStyleOptions` in the types), the
35
+ `inline_style.*` locale keys and the `ge-inline-style-*` classes and
36
+ attributes. There is no alias for the old names. `example/style.html` is
37
+ `example/inline-style.html`.
38
+ - A node's settings panel names each of its sections: a heading over the id,
39
+ the classes and the presets (`panel.section_general`, "Id and classes"),
40
+ and over each plugin's section - Style, Tabs - where it is in the panel
41
+ rather than behind a button. The sections are set off by a line.
42
+
43
+ ### Fixed
44
+ - A row's drawer starts at the row's edge, as a column's does: Bootstrap's
45
+ gutter padding for a row's children no longer pushes its tools in, nor its
46
+ max width keeps the drawer from reaching the other side.
47
+
8
48
  ## [8.0.0-beta.3] - 2026-09-30
9
49
 
10
50
  ### Added
package/README.md CHANGED
@@ -398,6 +398,10 @@ new GridEditor('#myGrid', {
398
398
 
399
399
  __`valid_col_offsets`:__ The same, for the indent buttons. Default `[0, 1, … 11]`.
400
400
 
401
+ __`indent`:__ The indent tools in a column's drawer. `indent: { tools: false }`
402
+ takes them out; the offsets the markup has are kept, and
403
+ `createColumn(size, { offset })` still indents. Default `{ tools: true }`.
404
+
401
405
  __`add_column`:__ What the add column tool in a row's drawer does. A click adds a column of `size`; holding the tool for `delay` milliseconds — with the pointer or with a finger — offers the widths in `valid_col_sizes` instead, marking the ones that no longer fit the row. Defaults:
402
406
 
403
407
  ```javascript
@@ -464,12 +468,14 @@ new GridEditor('#myGrid', {
464
468
 
465
469
  __`default_view`:__ The view the editor starts in. Default `'all'`, which writes one class for every breakpoint at once — what a layout that needs no per-device tuning wants.
466
470
 
467
- __`resize`:__ Resizing a column by dragging its edge. Defaults:
471
+ __`resize`:__ Resizing a column: by dragging its edge, and with the
472
+ narrower and wider tools (− +) in its drawer. Defaults:
468
473
 
469
474
  ```javascript
470
475
  new GridEditor('#myGrid', {
471
476
  resize: {
472
- enabled: true,
477
+ enabled: true, // the handle on the edge; false leaves the − + tools only
478
+ tools: true, // the − + tools; false leaves the handle only
473
479
  handles: 'e', // 'w' for a right to left page, 'e, w' for both
474
480
  balance: 'next', // the following column absorbs the change; false lets the row wrap
475
481
  },
@@ -560,13 +566,13 @@ __`element_tools`:__ Extra tools on every element drawer, same shape as `row_too
560
566
  See [example/elements.html](example/elements.html), which also shows the
561
567
  pattern for an element with no visual output of its own.
562
568
 
563
- ### Style
569
+ ### Inline style
564
570
 
565
571
  Inline css for rows, columns, containers, panes, elements and sections, and
566
572
  Bootstrap's classes for it. A plugin:
567
573
 
568
574
  ```html
569
- <script src="grid-editor/dist/plugins/grideditor.style.min.js"></script> <!-- after grideditor.elements -->
575
+ <script src="grid-editor/dist/plugins/grideditor.inline-style.min.js"></script> <!-- after grideditor.elements -->
570
576
  ```
571
577
 
572
578
  Each of those nodes gets a *Style* accordion in its settings panel, between
@@ -606,11 +612,11 @@ the node also sets says which class takes priority.
606
612
  With `settings_panel: 'popover'` or `'inline'` the panel has a *Style* button
607
613
  instead, which opens the accordion in a dialog.
608
614
 
609
- __`style`:__ Every section, unless you say otherwise.
615
+ __`inline_style`:__ Every section, unless you say otherwise.
610
616
 
611
617
  ```javascript
612
618
  new GridEditor('#myGrid', {
613
- style: {
619
+ inline_style: {
614
620
  sections: {
615
621
  position: false, // no Position section
616
622
  border: { properties: ['border-width', 'border-color'], catalog: false }, // two fields, no chips
@@ -634,18 +640,18 @@ A node that is flex or grid in the view you are in - a column with `d-flex`,
634
640
  a row with `flex-nowrap` - has its drawer on top, out of the flow, so the
635
641
  canvas lays out its content as the page will.
636
642
 
637
- See [example/style.html](example/style.html).
643
+ See [example/inline-style.html](example/inline-style.html).
638
644
 
639
645
  ### Responsive utilities
640
646
 
641
647
  Bootstrap's responsive utility classes, edited per breakpoint. The grid's are
642
- plugins of their own; the ones that style a node are the style plugin's, above.
648
+ plugins of their own; the ones that style a node are the inline-style plugin's, above.
643
649
 
644
650
  ```html
645
651
  <script src="grid-editor/dist/plugins/grideditor.order.min.js"></script>
646
652
  <script src="grid-editor/dist/plugins/grideditor.alignment.min.js"></script>
647
653
  <script src="grid-editor/dist/plugins/grideditor.gutters.min.js"></script>
648
- <script src="grid-editor/dist/plugins/grideditor.style.min.js"></script>
654
+ <script src="grid-editor/dist/plugins/grideditor.inline-style.min.js"></script>
649
655
  ```
650
656
 
651
657
  | Plugin | Classes | On |
@@ -653,10 +659,10 @@ plugins of their own; the ones that style a node are the style plugin's, above.
653
659
  | `order` | `order-{bp}-{first,0–5,last}` | columns |
654
660
  | `alignment` | `align-self-{bp}-*` | columns |
655
661
  | `gutters` | `g-{bp}-{0–5}`, `gx-{bp}-*`, `gy-{bp}-*` | rows |
656
- | `style` | display, flex (a row's `justify-content-*` and `align-items-*` among it), spacing, text alignment, sticky and float; see [Style](#style) | rows, columns, elements, containers, texts |
662
+ | `inline-style` | display, flex (a row's `justify-content-*` and `align-items-*` among it), spacing, text alignment, sticky and float; see [Inline style](#inline-style) | rows, columns, elements, containers, texts |
657
663
 
658
664
  A plugin puts a field in the *Responsive* section of each drawer's settings
659
- panel - or, for the style plugin, in its section of the *Style* accordion -
665
+ panel - or, for the inline-style plugin, in its section of the *Style* accordion -
660
666
  and some add a tool to the drawer. In a breakpoint view a change is
661
667
  written for that breakpoint alone, and the field says what it inherits and from
662
668
  where. In the all view it is written once, as the class with no breakpoint, and
package/UPGRADING.md CHANGED
@@ -4,16 +4,26 @@ Upgrading from grid-editor `7.x` to `8.0`
4
4
  8.0 takes out what kept pages, plugins and options of earlier versions
5
5
  working. Nothing it removes warns: an option that is gone is ignored like any
6
6
  option the editor does not know. The jQuery adapter stays, and so does the
7
- conversion of markup 5.x saved. `8.0.0-beta.2` is the first beta published
8
- (`8.0.0-beta.1` never was); install it with
9
- `npm install @themarioga/grid-editor@next`.
10
-
7
+ conversion of markup 5.x saved. From the `8.0.0` betas (on npm's `next`
8
+ tag), the one change to make is the first point below, the rename of the
9
+ style plugin.
10
+
11
+ * __The style plugin is `inline-style`.__ Its file is
12
+ `grideditor.inline-style.js` (`@themarioga/grid-editor/plugins/inline-style`
13
+ as a module), its name in `plugins` is `'inline-style'`, its setting is
14
+ `inline_style`, its locale keys are `inline_style.*` rather than `style.*`,
15
+ and its css classes and attributes are `ge-inline-style-*` rather than
16
+ `ge-style-*` - `[data-ge-inline-style-section="spacing"]` and the others.
17
+ What it does is the same. The old names are not an alias: `'style'` in
18
+ `plugins` is a plugin that is not loaded, and a `style` setting is not
19
+ read. This came in `8.0.0`, after the betas; the points below use the new
20
+ names.
11
21
  * __The spacing, textalign, visibility and float plugins are gone.__ Load
12
- `grideditor.style.js`, which has carried them since 7.3, and name it in the
22
+ `grideditor.inline-style.js`, which has carried them since 7.3, and name it in the
13
23
  `plugins` setting: `'spacing'`, `'textalign'`, `'visibility'` and `'float'`
14
24
  there are plugins that are not loaded now, and only get the usual warning.
15
25
  * __`utilities.spacing` and `utilities.visibility` are not read.__ They are
16
- `style.spacing` and `style.visibility`.
26
+ `inline_style.spacing` and `inline_style.visibility`.
17
27
  * __`replaces` on a plugin's factory does nothing.__ A plugin that stood in
18
28
  for another is loaded beside it, like any two plugins.
19
29
  * __`changeView`, `getUtility` and `setUtility` take a view key only.__ The
@@ -36,20 +46,20 @@ conversion of markup 5.x saved. `8.0.0-beta.2` is the first beta published
36
46
  `warning.oninit_removed` and `warning.plugin_6x`. A locale of your own
37
47
  can drop them.
38
48
 
39
- What `8.0.0-beta.2` adds to that:
49
+ 8.0 also changes what the inline-style plugin edits:
40
50
 
41
51
  * __The `visibility` utility is `display`.__ It edits every `d-{bp}-*`
42
52
  value now, not only hidden and shown: `setUtility(node, 'display', 'none',
43
53
  'md')`, and `before-utility` and `after-utility` say `family: 'display'`.
44
54
  `'visibility'` is a family no plugin declares, and gets the usual warning.
45
- The eye and `style.visibility.drawer` are as they were.
46
- * __A row's `justify-content-*` and `align-items-*` are the style plugin's.__
55
+ The eye and `inline_style.visibility.drawer` are as they were.
56
+ * __A row's `justify-content-*` and `align-items-*` are the inline-style plugin's.__
47
57
  They are in its Flex section, on rows and on anything made flex, and the
48
58
  alignment plugin keeps `align-self-*` only. A page that loads alignment
49
- without style has no field for them: load `grideditor.style.js`.
59
+ without inline-style has no field for them: load `grideditor.inline-style.js`.
50
60
  * __Locale keys:__ `utility.visibility` and `utility.visibility_shown` are
51
61
  gone, and `utility.display` is new; `utility.justify_content` and
52
- `utility.align_items` come with the style plugin now. The Flex section and
62
+ `utility.align_items` come with the inline-style plugin now. The Flex section and
53
63
  sticky bring keys of their own, listed in
54
64
  [docs/locale-keys.md](docs/locale-keys.md).
55
65