@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
@@ -1,7 +1,7 @@
1
- // src/js/plugins/grideditor.style.js
1
+ // src/js/plugins/grideditor.inline-style.js
2
2
  import { GridEditor as GridEditor7 } from "../grideditor.esm.js";
3
3
 
4
- // src/js/style/spacing.js
4
+ // src/js/inline-style/spacing.js
5
5
  import { GridEditor } from "../grideditor.esm.js";
6
6
 
7
7
  // src/js/dom.js
@@ -127,7 +127,7 @@ function visible(node) {
127
127
  return !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length);
128
128
  }
129
129
 
130
- // src/js/style/spacing.js
130
+ // src/js/inline-style/spacing.js
131
131
  Object.assign(GridEditor.locales.en, {
132
132
  "utility.padding": "Padding",
133
133
  "utility.margin": "Margin",
@@ -354,7 +354,7 @@ function spacingPart(ge, given) {
354
354
  };
355
355
  }
356
356
 
357
- // src/js/style/textalign.js
357
+ // src/js/inline-style/textalign.js
358
358
  import { GridEditor as GridEditor2 } from "../grideditor.esm.js";
359
359
  Object.assign(GridEditor2.locales.en, {
360
360
  "utility.text_align": "Text alignment",
@@ -395,7 +395,7 @@ function textalignPart(ge) {
395
395
  };
396
396
  }
397
397
 
398
- // src/js/style/display.js
398
+ // src/js/inline-style/display.js
399
399
  import { GridEditor as GridEditor3 } from "../grideditor.esm.js";
400
400
  Object.assign(GridEditor3.locales.en, {
401
401
  "utility.display": "Display",
@@ -548,7 +548,7 @@ function displayPart(ge, given) {
548
548
  };
549
549
  }
550
550
 
551
- // src/js/style/flex.js
551
+ // src/js/inline-style/flex.js
552
552
  import { GridEditor as GridEditor4 } from "../grideditor.esm.js";
553
553
  Object.assign(GridEditor4.locales.en, {
554
554
  "utility.flex_direction": "Direction",
@@ -684,7 +684,7 @@ function flexPart(ge, spacing2) {
684
684
  };
685
685
  }
686
686
 
687
- // src/js/style/float.js
687
+ // src/js/inline-style/float.js
688
688
  import { GridEditor as GridEditor5 } from "../grideditor.esm.js";
689
689
  Object.assign(GridEditor5.locales.en, {
690
690
  "utility.float": "Float",
@@ -719,7 +719,7 @@ function floatPart(ge) {
719
719
  };
720
720
  }
721
721
 
722
- // src/js/style/sticky.js
722
+ // src/js/inline-style/sticky.js
723
723
  import { GridEditor as GridEditor6 } from "../grideditor.esm.js";
724
724
  Object.assign(GridEditor6.locales.en, {
725
725
  "utility.sticky": "Sticky"
@@ -748,7 +748,7 @@ function stickyPart(ge) {
748
748
  };
749
749
  }
750
750
 
751
- // src/js/style/drawerflow.js
751
+ // src/js/inline-style/drawerflow.js
752
752
  var NODES2 = ".row, .column, .ge-element, [data-ge-container]";
753
753
  var OUT_CLASS = "ge-drawer-out";
754
754
  var OUT_ATTR = "data-ge-drawer-out";
@@ -842,7 +842,7 @@ function drawerflowPart(ge) {
842
842
  };
843
843
  }
844
844
 
845
- // src/js/style/sections.js
845
+ // src/js/inline-style/sections.js
846
846
  var COLORS = ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark"];
847
847
  var SIDES2 = ["top", "end", "bottom", "start"];
848
848
  var OPACITIES = ["10", "25", "50", "75", "100"];
@@ -868,14 +868,14 @@ var ONLY_ON_ELEMENT = ["element"];
868
868
  var SECTIONS = [
869
869
  {
870
870
  key: "size",
871
- labelKey: "style.section_size",
871
+ labelKey: "inline_style.section_size",
872
872
  properties: [
873
- prop("width", { labelKey: "style.prop_width", notOn: NOT_ON_COLUMN }),
874
- prop("height", { labelKey: "style.prop_height", notOn: NOT_ON_COLUMN }),
875
- prop("min-width", { labelKey: "style.prop_min_width" }),
876
- prop("min-height", { labelKey: "style.prop_min_height" }),
877
- prop("max-width", { labelKey: "style.prop_max_width" }),
878
- prop("max-height", { labelKey: "style.prop_max_height" })
873
+ prop("width", { labelKey: "inline_style.prop_width", notOn: NOT_ON_COLUMN }),
874
+ prop("height", { labelKey: "inline_style.prop_height", notOn: NOT_ON_COLUMN }),
875
+ prop("min-width", { labelKey: "inline_style.prop_min_width" }),
876
+ prop("min-height", { labelKey: "inline_style.prop_min_height" }),
877
+ prop("max-width", { labelKey: "inline_style.prop_max_width" }),
878
+ prop("max-height", { labelKey: "inline_style.prop_max_height" })
879
879
  ],
880
880
  catalog: [
881
881
  group(each("w-", ["25", "50", "75", "100", "auto"]), true, NOT_ON_COLUMN),
@@ -888,29 +888,29 @@ var SECTIONS = [
888
888
  },
889
889
  {
890
890
  key: "spacing",
891
- labelKey: "style.section_spacing",
891
+ labelKey: "inline_style.section_spacing",
892
892
  properties: [
893
- prop("margin-top", { labelKey: "style.prop_margin_top" }),
894
- prop("margin-right", { labelKey: "style.prop_margin_right" }),
895
- prop("margin-bottom", { labelKey: "style.prop_margin_bottom" }),
896
- prop("margin-left", { labelKey: "style.prop_margin_left" }),
897
- prop("padding-top", { labelKey: "style.prop_padding_top" }),
898
- prop("padding-right", { labelKey: "style.prop_padding_right" }),
899
- prop("padding-bottom", { labelKey: "style.prop_padding_bottom" }),
900
- prop("padding-left", { labelKey: "style.prop_padding_left" })
893
+ prop("margin-top", { labelKey: "inline_style.prop_margin_top" }),
894
+ prop("margin-right", { labelKey: "inline_style.prop_margin_right" }),
895
+ prop("margin-bottom", { labelKey: "inline_style.prop_margin_bottom" }),
896
+ prop("margin-left", { labelKey: "inline_style.prop_margin_left" }),
897
+ prop("padding-top", { labelKey: "inline_style.prop_padding_top" }),
898
+ prop("padding-right", { labelKey: "inline_style.prop_padding_right" }),
899
+ prop("padding-bottom", { labelKey: "inline_style.prop_padding_bottom" }),
900
+ prop("padding-left", { labelKey: "inline_style.prop_padding_left" })
901
901
  ],
902
902
  catalog: [],
903
903
  parts: ["spacing"]
904
904
  },
905
905
  {
906
906
  key: "border",
907
- labelKey: "style.section_border",
907
+ labelKey: "inline_style.section_border",
908
908
  properties: [
909
- prop("border-width", { labelKey: "style.prop_border_width" }),
910
- prop("border-style", { labelKey: "style.prop_border_style", type: "select", values: ["none", "solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset"] }),
911
- prop("border-color", { labelKey: "style.prop_border_color", type: "color" }),
912
- prop("border-radius", { labelKey: "style.prop_border_radius" }),
913
- prop("box-shadow", { labelKey: "style.prop_box_shadow", type: "shadow" })
909
+ prop("border-width", { labelKey: "inline_style.prop_border_width" }),
910
+ prop("border-style", { labelKey: "inline_style.prop_border_style", type: "select", values: ["none", "solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset"] }),
911
+ prop("border-color", { labelKey: "inline_style.prop_border_color", type: "color" }),
912
+ prop("border-radius", { labelKey: "inline_style.prop_border_radius" }),
913
+ prop("box-shadow", { labelKey: "inline_style.prop_box_shadow", type: "shadow" })
914
914
  ],
915
915
  catalog: [
916
916
  group(["border", "border-0"].concat(each("border-", SIDES2), each("border-", SIDES2, "-0")), false),
@@ -925,13 +925,13 @@ var SECTIONS = [
925
925
  },
926
926
  {
927
927
  key: "background",
928
- labelKey: "style.section_background",
928
+ labelKey: "inline_style.section_background",
929
929
  properties: [
930
- prop("background-color", { labelKey: "style.prop_background_color", type: "color" }),
931
- prop("background-image", { labelKey: "style.prop_background_image", type: "url" }),
932
- prop("background-size", { labelKey: "style.prop_background_size" }),
933
- prop("background-position", { labelKey: "style.prop_background_position" }),
934
- prop("background-repeat", { labelKey: "style.prop_background_repeat", type: "select", values: ["repeat", "no-repeat", "repeat-x", "repeat-y", "space", "round"] })
930
+ prop("background-color", { labelKey: "inline_style.prop_background_color", type: "color" }),
931
+ prop("background-image", { labelKey: "inline_style.prop_background_image", type: "url" }),
932
+ prop("background-size", { labelKey: "inline_style.prop_background_size" }),
933
+ prop("background-position", { labelKey: "inline_style.prop_background_position" }),
934
+ prop("background-repeat", { labelKey: "inline_style.prop_background_repeat", type: "select", values: ["repeat", "no-repeat", "repeat-x", "repeat-y", "space", "round"] })
935
935
  ],
936
936
  catalog: [
937
937
  group(each("bg-", COLORS.concat(["body", "body-secondary", "body-tertiary", "white", "black", "transparent"])).concat(each("bg-", COLORS, "-subtle"), each("text-bg-", COLORS))),
@@ -942,12 +942,12 @@ var SECTIONS = [
942
942
  },
943
943
  {
944
944
  key: "text",
945
- labelKey: "style.section_text",
945
+ labelKey: "inline_style.section_text",
946
946
  properties: [
947
- prop("color", { labelKey: "style.prop_color", type: "color" }),
948
- prop("font-size", { labelKey: "style.prop_font_size" }),
949
- prop("text-align", { labelKey: "style.prop_text_align", type: "select", values: ["start", "center", "end", "left", "right", "justify"] }),
950
- prop("text-shadow", { labelKey: "style.prop_text_shadow", type: "shadow" })
947
+ prop("color", { labelKey: "inline_style.prop_color", type: "color" }),
948
+ prop("font-size", { labelKey: "inline_style.prop_font_size" }),
949
+ prop("text-align", { labelKey: "inline_style.prop_text_align", type: "select", values: ["start", "center", "end", "left", "right", "justify"] }),
950
+ prop("text-shadow", { labelKey: "inline_style.prop_text_shadow", type: "shadow" })
951
951
  ],
952
952
  catalog: [
953
953
  group(each("text-", COLORS.concat(["body", "body-secondary", "body-tertiary", "white", "black"])).concat(each("text-", COLORS, "-emphasis"), ["text-body-emphasis"])),
@@ -959,15 +959,15 @@ var SECTIONS = [
959
959
  },
960
960
  {
961
961
  key: "typography",
962
- labelKey: "style.section_typography",
962
+ labelKey: "inline_style.section_typography",
963
963
  properties: [
964
- prop("font-family", { labelKey: "style.prop_font_family" }),
965
- prop("font-weight", { labelKey: "style.prop_font_weight", type: "select", values: ["100", "200", "300", "400", "500", "600", "700", "800", "900", "normal", "bold", "lighter", "bolder"] }),
966
- prop("font-style", { labelKey: "style.prop_font_style", type: "select", values: ["normal", "italic", "oblique"] }),
967
- prop("line-height", { labelKey: "style.prop_line_height" }),
968
- prop("letter-spacing", { labelKey: "style.prop_letter_spacing" }),
969
- prop("text-transform", { labelKey: "style.prop_text_transform", type: "select", values: ["none", "uppercase", "lowercase", "capitalize"] }),
970
- prop("text-decoration", { labelKey: "style.prop_text_decoration", type: "select", values: ["none", "underline", "line-through", "overline"] })
964
+ prop("font-family", { labelKey: "inline_style.prop_font_family" }),
965
+ prop("font-weight", { labelKey: "inline_style.prop_font_weight", type: "select", values: ["100", "200", "300", "400", "500", "600", "700", "800", "900", "normal", "bold", "lighter", "bolder"] }),
966
+ prop("font-style", { labelKey: "inline_style.prop_font_style", type: "select", values: ["normal", "italic", "oblique"] }),
967
+ prop("line-height", { labelKey: "inline_style.prop_line_height" }),
968
+ prop("letter-spacing", { labelKey: "inline_style.prop_letter_spacing" }),
969
+ prop("text-transform", { labelKey: "inline_style.prop_text_transform", type: "select", values: ["none", "uppercase", "lowercase", "capitalize"] }),
970
+ prop("text-decoration", { labelKey: "inline_style.prop_text_decoration", type: "select", values: ["none", "underline", "line-through", "overline"] })
971
971
  ],
972
972
  catalog: [
973
973
  group(each("fw-", ["lighter", "light", "normal", "medium", "semibold", "bold", "bolder"])),
@@ -982,12 +982,12 @@ var SECTIONS = [
982
982
  },
983
983
  {
984
984
  key: "display",
985
- labelKey: "style.section_display",
985
+ labelKey: "inline_style.section_display",
986
986
  properties: [
987
- prop("display", { labelKey: "style.prop_display", type: "select", values: ["none", "block", "inline", "inline-block", "flex", "inline-flex", "grid", "inline-grid"] }),
988
- prop("opacity", { labelKey: "style.prop_opacity" }),
989
- prop("overflow", { labelKey: "style.prop_overflow", type: "select", values: ["visible", "hidden", "auto", "scroll", "clip"] }),
990
- prop("visibility", { labelKey: "style.prop_visibility", type: "select", values: ["visible", "hidden"] })
987
+ prop("display", { labelKey: "inline_style.prop_display", type: "select", values: ["none", "block", "inline", "inline-block", "flex", "inline-flex", "grid", "inline-grid"] }),
988
+ prop("opacity", { labelKey: "inline_style.prop_opacity" }),
989
+ prop("overflow", { labelKey: "inline_style.prop_overflow", type: "select", values: ["visible", "hidden", "auto", "scroll", "clip"] }),
990
+ prop("visibility", { labelKey: "inline_style.prop_visibility", type: "select", values: ["visible", "hidden"] })
991
991
  ],
992
992
  catalog: [
993
993
  group(each("opacity-", ["0", "25", "50", "75", "100"])),
@@ -998,7 +998,7 @@ var SECTIONS = [
998
998
  },
999
999
  {
1000
1000
  key: "flex",
1001
- labelKey: "style.section_flex",
1001
+ labelKey: "inline_style.section_flex",
1002
1002
  properties: [],
1003
1003
  catalog: [
1004
1004
  group(["vstack", "hstack"], true, ["row"])
@@ -1007,14 +1007,14 @@ var SECTIONS = [
1007
1007
  },
1008
1008
  {
1009
1009
  key: "position",
1010
- labelKey: "style.section_position",
1010
+ labelKey: "inline_style.section_position",
1011
1011
  properties: [
1012
- prop("position", { labelKey: "style.prop_position", type: "select", values: ["static", "relative", "absolute", "fixed", "sticky"] }),
1013
- prop("top", { labelKey: "style.prop_top", notOn: NOT_ON_COLUMN }),
1014
- prop("right", { labelKey: "style.prop_right", notOn: NOT_ON_COLUMN }),
1015
- prop("bottom", { labelKey: "style.prop_bottom", notOn: NOT_ON_COLUMN }),
1016
- prop("left", { labelKey: "style.prop_left", notOn: NOT_ON_COLUMN }),
1017
- prop("z-index", { labelKey: "style.prop_z_index" })
1012
+ prop("position", { labelKey: "inline_style.prop_position", type: "select", values: ["static", "relative", "absolute", "fixed", "sticky"] }),
1013
+ prop("top", { labelKey: "inline_style.prop_top", notOn: NOT_ON_COLUMN }),
1014
+ prop("right", { labelKey: "inline_style.prop_right", notOn: NOT_ON_COLUMN }),
1015
+ prop("bottom", { labelKey: "inline_style.prop_bottom", notOn: NOT_ON_COLUMN }),
1016
+ prop("left", { labelKey: "inline_style.prop_left", notOn: NOT_ON_COLUMN }),
1017
+ prop("z-index", { labelKey: "inline_style.prop_z_index" })
1018
1018
  ],
1019
1019
  catalog: [
1020
1020
  group(each("position-", ["static", "relative", "absolute", "fixed", "sticky"])),
@@ -1030,7 +1030,7 @@ var SECTIONS = [
1030
1030
  },
1031
1031
  {
1032
1032
  key: "custom",
1033
- labelKey: "style.section_custom",
1033
+ labelKey: "inline_style.section_custom",
1034
1034
  properties: [],
1035
1035
  catalog: [],
1036
1036
  parts: [],
@@ -1114,12 +1114,12 @@ function overriding(property, classes) {
1114
1114
  })[0] || null;
1115
1115
  }
1116
1116
 
1117
- // src/js/style/options.js
1117
+ // src/js/inline-style/options.js
1118
1118
  function resolveSections(ge, given) {
1119
1119
  var resolved = {};
1120
1120
  Object.keys(given || {}).forEach(function(key) {
1121
1121
  if (!section(key)) {
1122
- ge.warn('style.sections: there is no "' + key + '" section: ignored');
1122
+ ge.warn('inline_style.sections: there is no "' + key + '" section: ignored');
1123
1123
  }
1124
1124
  });
1125
1125
  SECTIONS.forEach(function(each2) {
@@ -1136,7 +1136,7 @@ function resolveSections(ge, given) {
1136
1136
  if (Array.isArray(option.properties)) {
1137
1137
  option.properties.forEach(function(name) {
1138
1138
  if (own.indexOf(name) === -1) {
1139
- ge.warn("style.sections." + each2.key + ': "' + name + '" is not one of its properties: ignored');
1139
+ ge.warn("inline_style.sections." + each2.key + ': "' + name + '" is not one of its properties: ignored');
1140
1140
  }
1141
1141
  });
1142
1142
  properties = option.properties.filter(function(name) {
@@ -1154,7 +1154,7 @@ function resolveSections(ge, given) {
1154
1154
  return resolved;
1155
1155
  }
1156
1156
  function resolveOptions(ge) {
1157
- var style = ge.settings.style || {};
1157
+ var style = ge.settings.inline_style || {};
1158
1158
  return {
1159
1159
  sections: resolveSections(ge, style.sections),
1160
1160
  spacing: style.spacing,
@@ -1162,7 +1162,7 @@ function resolveOptions(ge) {
1162
1162
  };
1163
1163
  }
1164
1164
 
1165
- // src/js/style/fields.js
1165
+ // src/js/inline-style/fields.js
1166
1166
  var renderers = /* @__PURE__ */ new WeakMap();
1167
1167
  var fieldCounter = 0;
1168
1168
  function classesOf(node) {
@@ -1183,7 +1183,7 @@ function mark(input, ok, ge) {
1183
1183
  if (ok) {
1184
1184
  input.removeAttribute("title");
1185
1185
  } else {
1186
- input.setAttribute("title", ge.t("style.invalid"));
1186
+ input.setAttribute("title", ge.t("inline_style.invalid"));
1187
1187
  }
1188
1188
  }
1189
1189
  function fill(input, value) {
@@ -1209,7 +1209,7 @@ function pickable(value) {
1209
1209
  return "#" + hex.toLowerCase();
1210
1210
  }
1211
1211
  function colorControl(onValue) {
1212
- var box = element("div", { "class": "input-group input-group-sm ge-style-color" });
1212
+ var box = element("div", { "class": "input-group input-group-sm ge-inline-style-color" });
1213
1213
  var picker = box.appendChild(element("input", { type: "color", "class": "form-control form-control-color" }));
1214
1214
  var text = box.appendChild(textInput());
1215
1215
  picker.addEventListener("input", function() {
@@ -1281,10 +1281,10 @@ function tokens(value) {
1281
1281
  }
1282
1282
  var LENGTH = /^-?(?:\d*\.)?\d+(?:[a-z%]+)?$/i;
1283
1283
  var SHADOW_PARTS = [
1284
- { name: "x", labelKey: "style.shadow_x" },
1285
- { name: "y", labelKey: "style.shadow_y" },
1286
- { name: "blur", labelKey: "style.shadow_blur" },
1287
- { name: "spread", labelKey: "style.shadow_spread" }
1284
+ { name: "x", labelKey: "inline_style.shadow_x" },
1285
+ { name: "y", labelKey: "inline_style.shadow_y" },
1286
+ { name: "blur", labelKey: "inline_style.shadow_blur" },
1287
+ { name: "spread", labelKey: "inline_style.shadow_spread" }
1288
1288
  ];
1289
1289
  function parseShadow(value, box) {
1290
1290
  value = value.trim();
@@ -1336,7 +1336,7 @@ function composeShadow(parts, box) {
1336
1336
  }
1337
1337
  function shadowControl(ge, node, property, changed) {
1338
1338
  var box = property === "box-shadow";
1339
- var holder = element("div", { "class": "ge-style-shadow" });
1339
+ var holder = element("div", { "class": "ge-inline-style-shadow" });
1340
1340
  var textMode = false;
1341
1341
  function writeValue(value, input) {
1342
1342
  var ok = write(ge, node, property, value);
@@ -1348,17 +1348,17 @@ function shadowControl(ge, node, property, changed) {
1348
1348
  }
1349
1349
  function builder(parts) {
1350
1350
  holder.innerHTML = "";
1351
- var grid = holder.appendChild(element("div", { "class": "ge-style-shadow-builder" }));
1351
+ var grid = holder.appendChild(element("div", { "class": "ge-inline-style-shadow-builder" }));
1352
1352
  var names = box ? SHADOW_PARTS : SHADOW_PARTS.slice(0, 3);
1353
1353
  var inputs = names.map(function(part, i) {
1354
- var cell = grid.appendChild(element("label", { "class": "ge-style-shadow-part" }));
1355
- cell.appendChild(element("span", { "class": "ge-style-shadow-label" }, ge.t(part.labelKey)));
1356
- var input = cell.appendChild(textInput("ge-style-shadow-" + part.name));
1354
+ var cell = grid.appendChild(element("label", { "class": "ge-inline-style-shadow-part" }));
1355
+ cell.appendChild(element("span", { "class": "ge-inline-style-shadow-label" }, ge.t(part.labelKey)));
1356
+ var input = cell.appendChild(textInput("ge-inline-style-shadow-" + part.name));
1357
1357
  input.value = parts.lengths[i] || "";
1358
1358
  return input;
1359
1359
  });
1360
- var colorCell = grid.appendChild(element("label", { "class": "ge-style-shadow-part ge-style-shadow-color" }));
1361
- colorCell.appendChild(element("span", { "class": "ge-style-shadow-label" }, ge.t("style.shadow_color")));
1360
+ var colorCell = grid.appendChild(element("label", { "class": "ge-inline-style-shadow-part ge-inline-style-shadow-color" }));
1361
+ colorCell.appendChild(element("span", { "class": "ge-inline-style-shadow-label" }, ge.t("inline_style.shadow_color")));
1362
1362
  var color = colorControl(function() {
1363
1363
  update();
1364
1364
  });
@@ -1366,9 +1366,9 @@ function shadowControl(ge, node, property, changed) {
1366
1366
  color.set(parts.color);
1367
1367
  var inset = null;
1368
1368
  if (box) {
1369
- var insetCell = grid.appendChild(element("label", { "class": "form-check ge-style-shadow-inset" }));
1369
+ var insetCell = grid.appendChild(element("label", { "class": "form-check ge-inline-style-shadow-inset" }));
1370
1370
  inset = insetCell.appendChild(element("input", { type: "checkbox", "class": "form-check-input" }));
1371
- insetCell.appendChild(element("span", { "class": "form-check-label" }, ge.t("style.shadow_inset")));
1371
+ insetCell.appendChild(element("span", { "class": "form-check-label" }, ge.t("inline_style.shadow_inset")));
1372
1372
  inset.checked = parts.inset;
1373
1373
  inset.addEventListener("change", function() {
1374
1374
  update();
@@ -1379,7 +1379,7 @@ function shadowControl(ge, node, property, changed) {
1379
1379
  update();
1380
1380
  });
1381
1381
  });
1382
- var toText = holder.appendChild(element("a", { href: "#", "class": "ge-style-shadow-mode" }, ge.t("style.shadow_text_mode")));
1382
+ var toText = holder.appendChild(element("a", { href: "#", "class": "ge-inline-style-shadow-mode" }, ge.t("inline_style.shadow_text_mode")));
1383
1383
  toText.addEventListener("click", function(e) {
1384
1384
  e.preventDefault();
1385
1385
  textMode = true;
@@ -1398,7 +1398,7 @@ function shadowControl(ge, node, property, changed) {
1398
1398
  }
1399
1399
  function text(value) {
1400
1400
  holder.innerHTML = "";
1401
- var input = holder.appendChild(textInput("ge-style-shadow-text"));
1401
+ var input = holder.appendChild(textInput("ge-inline-style-shadow-text"));
1402
1402
  input.value = value;
1403
1403
  input.addEventListener("change", function() {
1404
1404
  if (input.value.trim() === "") {
@@ -1410,6 +1410,14 @@ function shadowControl(ge, node, property, changed) {
1410
1410
  }
1411
1411
  writeValue(input.value, input);
1412
1412
  });
1413
+ if (parseShadow(value, box)) {
1414
+ var toBuilder = holder.appendChild(element("a", { href: "#", "class": "ge-inline-style-shadow-mode" }, ge.t("inline_style.shadow_builder_mode")));
1415
+ toBuilder.addEventListener("click", function(e) {
1416
+ e.preventDefault();
1417
+ textMode = false;
1418
+ render();
1419
+ });
1420
+ }
1413
1421
  }
1414
1422
  var shown = null;
1415
1423
  function render() {
@@ -1418,7 +1426,7 @@ function shadowControl(ge, node, property, changed) {
1418
1426
  }
1419
1427
  var value = ge.hostStyle(node, property).value;
1420
1428
  var parts = parseShadow(value, box);
1421
- if (value === shown && holder.firstChild && textMode === !!holder.querySelector(".ge-style-shadow-text")) {
1429
+ if (value === shown && holder.firstChild && textMode === !!holder.querySelector(".ge-inline-style-shadow-text")) {
1422
1430
  return;
1423
1431
  }
1424
1432
  shown = value;
@@ -1434,8 +1442,8 @@ function shadowControl(ge, node, property, changed) {
1434
1442
  } };
1435
1443
  }
1436
1444
  function createStyleField(ge, node, property, changed) {
1437
- var field = element("div", { "class": "ge-style-field", "data-ge-style-property": property.name });
1438
- var label = field.appendChild(element("label", { "class": "ge-style-label" }, ge.t(property.labelKey)));
1445
+ var field = element("div", { "class": "ge-inline-style-field", "data-ge-inline-style-property": property.name });
1446
+ var label = field.appendChild(element("label", { "class": "ge-inline-style-label" }, ge.t(property.labelKey)));
1439
1447
  var render;
1440
1448
  function current() {
1441
1449
  return ge.hostStyle(node, property.name).value;
@@ -1496,15 +1504,15 @@ function createStyleField(ge, node, property, changed) {
1496
1504
  }
1497
1505
  var control = field.querySelector("input, select");
1498
1506
  if (control) {
1499
- control.id = "ge-style-field-" + ++fieldCounter;
1507
+ control.id = "ge-inline-style-field-" + ++fieldCounter;
1500
1508
  label.setAttribute("for", control.id);
1501
1509
  }
1502
- field.appendChild(element("small", { "class": "ge-style-note ge-style-overridden" }));
1510
+ field.appendChild(element("small", { "class": "ge-inline-style-note ge-inline-style-overridden" }));
1503
1511
  renderers.set(field, function() {
1504
1512
  render();
1505
1513
  var winner = current() ? overriding(property.name, classesOf(node)) : null;
1506
- var note = child(field, ".ge-style-overridden");
1507
- note.textContent = winner ? ge.t("style.overridden", { "class": winner }) : "";
1514
+ var note = child(field, ".ge-inline-style-overridden");
1515
+ note.textContent = winner ? ge.t("inline_style.overridden", { "class": winner }) : "";
1508
1516
  toggle(note, !!winner);
1509
1517
  });
1510
1518
  renderStyleField(field);
@@ -1517,7 +1525,7 @@ function renderStyleField(field) {
1517
1525
  }
1518
1526
  }
1519
1527
 
1520
- // src/js/style/catalog.js
1528
+ // src/js/inline-style/catalog.js
1521
1529
  function classesOf2(node) {
1522
1530
  return (node.getAttribute("class") || "").split(/\s+/).filter(Boolean);
1523
1531
  }
@@ -1547,14 +1555,14 @@ function createCatalog(ge, node, kind, groups) {
1547
1555
  if (!offered.length) {
1548
1556
  return null;
1549
1557
  }
1550
- var box = element("div", { "class": "ge-style-catalog" });
1551
- box.appendChild(element("span", { "class": "ge-style-label" }, ge.t("style.catalog")));
1558
+ var box = element("div", { "class": "ge-inline-style-catalog" });
1559
+ box.appendChild(element("span", { "class": "ge-inline-style-label" }, ge.t("inline_style.catalog")));
1552
1560
  offered.forEach(function(group2) {
1553
- var row = box.appendChild(element("div", { "class": "ge-style-chips" }));
1561
+ var row = box.appendChild(element("div", { "class": "ge-inline-style-chips" }));
1554
1562
  group2.classes.forEach(function(name) {
1555
1563
  var chip = row.appendChild(element("button", {
1556
1564
  type: "button",
1557
- "class": "btn btn-sm btn-outline-secondary ge-style-chip",
1565
+ "class": "btn btn-sm btn-outline-secondary ge-inline-style-chip",
1558
1566
  "data-ge-class": name,
1559
1567
  "aria-pressed": "false"
1560
1568
  }, name));
@@ -1568,14 +1576,14 @@ function createCatalog(ge, node, kind, groups) {
1568
1576
  }
1569
1577
  function renderCatalog(box, node) {
1570
1578
  var classes = classesOf2(node);
1571
- all(box, ".ge-style-chip").forEach(function(chip) {
1579
+ all(box, ".ge-inline-style-chip").forEach(function(chip) {
1572
1580
  var on = classes.indexOf(chip.getAttribute("data-ge-class")) !== -1;
1573
1581
  toggleClass(chip, "active", on);
1574
1582
  chip.setAttribute("aria-pressed", on ? "true" : "false");
1575
1583
  });
1576
1584
  }
1577
1585
 
1578
- // src/js/style/custom.js
1586
+ // src/js/inline-style/custom.js
1579
1587
  function longhands(property) {
1580
1588
  var probe = document.createElement("div").style;
1581
1589
  var list = [];
@@ -1597,12 +1605,12 @@ function createCustom(ge, node, properties, changed) {
1597
1605
  covered[longhand] = true;
1598
1606
  });
1599
1607
  });
1600
- var box = element("div", { "class": "ge-style-custom" });
1608
+ var box = element("div", { "class": "ge-inline-style-custom" });
1601
1609
  var textarea = box.appendChild(element("textarea", {
1602
- "class": "form-control form-control-sm font-monospace ge-style-custom-css",
1610
+ "class": "form-control form-control-sm font-monospace ge-inline-style-custom-css",
1603
1611
  rows: "4",
1604
1612
  spellcheck: "false",
1605
- "aria-label": ge.t("style.section_custom")
1613
+ "aria-label": ge.t("inline_style.section_custom")
1606
1614
  }));
1607
1615
  function free() {
1608
1616
  var style = declaration(ge.hostStyle(node));
@@ -1640,7 +1648,7 @@ function createCustom(ge, node, properties, changed) {
1640
1648
  return { element: box, render };
1641
1649
  }
1642
1650
 
1643
- // src/js/style/accordion.js
1651
+ // src/js/inline-style/accordion.js
1644
1652
  function takesInlineStyle(node, kind) {
1645
1653
  if (kind === "row" || kind === "column" || kind === "element" || kind === "section") {
1646
1654
  return true;
@@ -1671,7 +1679,7 @@ function partContent(ge, part, node, kind) {
1671
1679
  if (fields.length < 2) {
1672
1680
  return fields[0] || null;
1673
1681
  }
1674
- var box = element("div", { "class": "ge-style-part-fields" });
1682
+ var box = element("div", { "class": "ge-inline-style-part-fields" });
1675
1683
  fields.forEach(function(field) {
1676
1684
  box.appendChild(field);
1677
1685
  });
@@ -1679,7 +1687,7 @@ function partContent(ge, part, node, kind) {
1679
1687
  }
1680
1688
  function createAccordion(ge, node, kind, context) {
1681
1689
  var inline = takesInlineStyle(node, kind);
1682
- var accordion = element("div", { "class": "accordion ge-style" });
1690
+ var accordion = element("div", { "class": "accordion ge-inline-style" });
1683
1691
  var fields = [];
1684
1692
  var catalogs = [];
1685
1693
  var notes = [];
@@ -1689,7 +1697,7 @@ function createAccordion(ge, node, kind, context) {
1689
1697
  render();
1690
1698
  };
1691
1699
  function item(key, labelKey) {
1692
- var entry = accordion.appendChild(element("div", { "class": "accordion-item", "data-ge-style-section": key }));
1700
+ var entry = accordion.appendChild(element("div", { "class": "accordion-item", "data-ge-inline-style-section": key }));
1693
1701
  var header = entry.appendChild(element("h2", { "class": "accordion-header" }));
1694
1702
  var button = header.appendChild(element("button", {
1695
1703
  type: "button",
@@ -1732,12 +1740,12 @@ function createAccordion(ge, node, kind, context) {
1732
1740
  }
1733
1741
  var body = item(key, section2.labelKey).body;
1734
1742
  parts.forEach(function(part) {
1735
- body.appendChild(addClass(part, "ge-style-part"));
1743
+ body.appendChild(addClass(part, "ge-inline-style-part"));
1736
1744
  });
1737
1745
  if (properties.length) {
1738
- var note = body.appendChild(element("small", { "class": "ge-style-note ge-style-all-sizes" }, ge.t("style.all_sizes")));
1746
+ var note = body.appendChild(element("small", { "class": "ge-inline-style-note ge-inline-style-all-sizes" }, ge.t("inline_style.all_sizes")));
1739
1747
  notes.push(note);
1740
- var grid = body.appendChild(element("div", { "class": "ge-style-fields" }));
1748
+ var grid = body.appendChild(element("div", { "class": "ge-inline-style-fields" }));
1741
1749
  properties.forEach(function(property) {
1742
1750
  var field = createStyleField(ge, node, property, changed);
1743
1751
  fields.push(field);
@@ -1751,7 +1759,7 @@ function createAccordion(ge, node, kind, context) {
1751
1759
  });
1752
1760
  if (customItem) {
1753
1761
  custom = createCustom(ge, node, fields.map(function(field) {
1754
- return field.getAttribute("data-ge-style-property");
1762
+ return field.getAttribute("data-ge-inline-style-property");
1755
1763
  }), changed);
1756
1764
  customItem.body.appendChild(custom.element);
1757
1765
  accordion.appendChild(customItem.entry);
@@ -1761,7 +1769,7 @@ function createAccordion(ge, node, kind, context) {
1761
1769
  }
1762
1770
  function open(key) {
1763
1771
  all(accordion, ".accordion-item").forEach(function(entry) {
1764
- toggle2(entry, entry.getAttribute("data-ge-style-section") === key);
1772
+ toggle2(entry, entry.getAttribute("data-ge-inline-style-section") === key);
1765
1773
  });
1766
1774
  }
1767
1775
  open(context.state.open);
@@ -1781,79 +1789,80 @@ function createAccordion(ge, node, kind, context) {
1781
1789
  return { element: accordion, render, open };
1782
1790
  }
1783
1791
 
1784
- // src/js/plugins/grideditor.style.js
1792
+ // src/js/plugins/grideditor.inline-style.js
1785
1793
  Object.assign(GridEditor7.locales.en, {
1786
- "style.section_title": "Style",
1787
- "style.dialog_title": "Style: {kind}",
1788
- "style.section_size": "Size",
1789
- "style.section_spacing": "Spacing",
1790
- "style.section_border": "Border",
1791
- "style.section_background": "Background",
1792
- "style.section_text": "Text",
1793
- "style.section_typography": "Typography",
1794
- "style.section_display": "Display",
1795
- "style.section_flex": "Flex",
1796
- "style.section_position": "Position",
1797
- "style.section_custom": "Custom css",
1798
- "style.all_sizes": "Applies to every size",
1799
- "style.overridden": "The class {class} takes priority over this value",
1800
- "style.invalid": "Not a value this property takes",
1801
- "style.catalog": "Bootstrap classes",
1802
- "style.shadow_x": "X",
1803
- "style.shadow_y": "Y",
1804
- "style.shadow_blur": "Blur",
1805
- "style.shadow_spread": "Spread",
1806
- "style.shadow_color": "Color",
1807
- "style.shadow_inset": "Inset",
1808
- "style.shadow_text_mode": "Edit as text",
1809
- "style.prop_width": "Width",
1810
- "style.prop_height": "Height",
1811
- "style.prop_min_width": "Min width",
1812
- "style.prop_min_height": "Min height",
1813
- "style.prop_max_width": "Max width",
1814
- "style.prop_max_height": "Max height",
1815
- "style.prop_margin_top": "Margin top",
1816
- "style.prop_margin_right": "Margin right",
1817
- "style.prop_margin_bottom": "Margin bottom",
1818
- "style.prop_margin_left": "Margin left",
1819
- "style.prop_padding_top": "Padding top",
1820
- "style.prop_padding_right": "Padding right",
1821
- "style.prop_padding_bottom": "Padding bottom",
1822
- "style.prop_padding_left": "Padding left",
1823
- "style.prop_border_width": "Border width",
1824
- "style.prop_border_style": "Border style",
1825
- "style.prop_border_color": "Border color",
1826
- "style.prop_border_radius": "Border radius",
1827
- "style.prop_box_shadow": "Shadow",
1828
- "style.prop_background_color": "Background color",
1829
- "style.prop_background_image": "Background image",
1830
- "style.prop_background_size": "Background size",
1831
- "style.prop_background_position": "Background position",
1832
- "style.prop_background_repeat": "Background repeat",
1833
- "style.prop_color": "Color",
1834
- "style.prop_font_size": "Font size",
1835
- "style.prop_text_align": "Text align",
1836
- "style.prop_text_shadow": "Text shadow",
1837
- "style.prop_font_family": "Font family",
1838
- "style.prop_font_weight": "Font weight",
1839
- "style.prop_font_style": "Font style",
1840
- "style.prop_line_height": "Line height",
1841
- "style.prop_letter_spacing": "Letter spacing",
1842
- "style.prop_text_transform": "Text transform",
1843
- "style.prop_text_decoration": "Text decoration",
1844
- "style.prop_display": "Display",
1845
- "style.prop_opacity": "Opacity",
1846
- "style.prop_overflow": "Overflow",
1847
- "style.prop_visibility": "Visibility",
1848
- "style.prop_position": "Position",
1849
- "style.prop_top": "Top",
1850
- "style.prop_right": "Right",
1851
- "style.prop_bottom": "Bottom",
1852
- "style.prop_left": "Left",
1853
- "style.prop_z_index": "Z-index"
1794
+ "inline_style.section_title": "Style",
1795
+ "inline_style.dialog_title": "Style: {kind}",
1796
+ "inline_style.section_size": "Size",
1797
+ "inline_style.section_spacing": "Spacing",
1798
+ "inline_style.section_border": "Border",
1799
+ "inline_style.section_background": "Background",
1800
+ "inline_style.section_text": "Text",
1801
+ "inline_style.section_typography": "Typography",
1802
+ "inline_style.section_display": "Display",
1803
+ "inline_style.section_flex": "Flex",
1804
+ "inline_style.section_position": "Position",
1805
+ "inline_style.section_custom": "Custom css",
1806
+ "inline_style.all_sizes": "Applies to every size",
1807
+ "inline_style.overridden": "The class {class} takes priority over this value",
1808
+ "inline_style.invalid": "Not a value this property takes",
1809
+ "inline_style.catalog": "Bootstrap classes",
1810
+ "inline_style.shadow_x": "X",
1811
+ "inline_style.shadow_y": "Y",
1812
+ "inline_style.shadow_blur": "Blur",
1813
+ "inline_style.shadow_spread": "Spread",
1814
+ "inline_style.shadow_color": "Color",
1815
+ "inline_style.shadow_inset": "Inset",
1816
+ "inline_style.shadow_text_mode": "Edit as text",
1817
+ "inline_style.shadow_builder_mode": "Edit with the builder",
1818
+ "inline_style.prop_width": "Width",
1819
+ "inline_style.prop_height": "Height",
1820
+ "inline_style.prop_min_width": "Min width",
1821
+ "inline_style.prop_min_height": "Min height",
1822
+ "inline_style.prop_max_width": "Max width",
1823
+ "inline_style.prop_max_height": "Max height",
1824
+ "inline_style.prop_margin_top": "Margin top",
1825
+ "inline_style.prop_margin_right": "Margin right",
1826
+ "inline_style.prop_margin_bottom": "Margin bottom",
1827
+ "inline_style.prop_margin_left": "Margin left",
1828
+ "inline_style.prop_padding_top": "Padding top",
1829
+ "inline_style.prop_padding_right": "Padding right",
1830
+ "inline_style.prop_padding_bottom": "Padding bottom",
1831
+ "inline_style.prop_padding_left": "Padding left",
1832
+ "inline_style.prop_border_width": "Border width",
1833
+ "inline_style.prop_border_style": "Border style",
1834
+ "inline_style.prop_border_color": "Border color",
1835
+ "inline_style.prop_border_radius": "Border radius",
1836
+ "inline_style.prop_box_shadow": "Shadow",
1837
+ "inline_style.prop_background_color": "Background color",
1838
+ "inline_style.prop_background_image": "Background image",
1839
+ "inline_style.prop_background_size": "Background size",
1840
+ "inline_style.prop_background_position": "Background position",
1841
+ "inline_style.prop_background_repeat": "Background repeat",
1842
+ "inline_style.prop_color": "Color",
1843
+ "inline_style.prop_font_size": "Font size",
1844
+ "inline_style.prop_text_align": "Text align",
1845
+ "inline_style.prop_text_shadow": "Text shadow",
1846
+ "inline_style.prop_font_family": "Font family",
1847
+ "inline_style.prop_font_weight": "Font weight",
1848
+ "inline_style.prop_font_style": "Font style",
1849
+ "inline_style.prop_line_height": "Line height",
1850
+ "inline_style.prop_letter_spacing": "Letter spacing",
1851
+ "inline_style.prop_text_transform": "Text transform",
1852
+ "inline_style.prop_text_decoration": "Text decoration",
1853
+ "inline_style.prop_display": "Display",
1854
+ "inline_style.prop_opacity": "Opacity",
1855
+ "inline_style.prop_overflow": "Overflow",
1856
+ "inline_style.prop_visibility": "Visibility",
1857
+ "inline_style.prop_position": "Position",
1858
+ "inline_style.prop_top": "Top",
1859
+ "inline_style.prop_right": "Right",
1860
+ "inline_style.prop_bottom": "Bottom",
1861
+ "inline_style.prop_left": "Left",
1862
+ "inline_style.prop_z_index": "Z-index"
1854
1863
  });
1855
1864
  var PARTS = ["spacing", "textalign", "display", "flex", "float", "sticky", "drawerflow"];
1856
- GridEditor7.utilities.style = function(ge) {
1865
+ GridEditor7.utilities["inline-style"] = function(ge) {
1857
1866
  var options = resolveOptions(ge);
1858
1867
  var parts = {
1859
1868
  spacing: spacingPart(ge, options.spacing),
@@ -1899,7 +1908,7 @@ GridEditor7.utilities.style = function(ge) {
1899
1908
  return null;
1900
1909
  }
1901
1910
  accordions.push({ node, accordion });
1902
- return { labelKey: "style.section_title", titleKey: "style.dialog_title", body: accordion.element };
1911
+ return { labelKey: "inline_style.section_title", titleKey: "inline_style.dialog_title", body: accordion.element };
1903
1912
  },
1904
1913
  preview: function(node, kind, breakpoint) {
1905
1914
  return parts.spacing.preview(node, kind, breakpoint);