@themarioga/grid-editor 8.0.0-beta.3 → 8.0.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 +23 -0
  2. package/README.md +9 -9
  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 +8 -8
  7. package/dist/grideditor.esm.js +7 -1
  8. package/dist/grideditor.js +7 -1
  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 +69 -68
  14. package/dist/locales/grideditor.es.js +69 -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} +184 -184
  19. package/dist/plugins/{grideditor.style.js → grideditor.inline-style.js} +182 -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 +81 -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 +8 -0
  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 +25 -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 +69 -68
  43. package/src/js/plugins/grideditor.alignment.js +1 -1
  44. package/src/js/plugins/grideditor.inline-style.js +185 -0
  45. package/src/less/grideditor.less +43 -25
  46. package/types/grideditor.d.ts +8 -8
  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
@@ -128,7 +128,7 @@
128
128
  return !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length);
129
129
  }
130
130
 
131
- // src/js/style/spacing.js
131
+ // src/js/inline-style/spacing.js
132
132
  Object.assign(GridEditor.locales.en, {
133
133
  "utility.padding": "Padding",
134
134
  "utility.margin": "Margin",
@@ -355,7 +355,7 @@
355
355
  };
356
356
  }
357
357
 
358
- // src/js/style/textalign.js
358
+ // src/js/inline-style/textalign.js
359
359
  Object.assign(GridEditor.locales.en, {
360
360
  "utility.text_align": "Text alignment",
361
361
  "utility.text_start": "Start",
@@ -395,7 +395,7 @@
395
395
  };
396
396
  }
397
397
 
398
- // src/js/style/display.js
398
+ // src/js/inline-style/display.js
399
399
  Object.assign(GridEditor.locales.en, {
400
400
  "utility.display": "Display",
401
401
  "utility.visibility_hidden": "Hidden",
@@ -547,7 +547,7 @@
547
547
  };
548
548
  }
549
549
 
550
- // src/js/style/flex.js
550
+ // src/js/inline-style/flex.js
551
551
  Object.assign(GridEditor.locales.en, {
552
552
  "utility.flex_direction": "Direction",
553
553
  "utility.flex_wrap": "Wrap",
@@ -682,7 +682,7 @@
682
682
  };
683
683
  }
684
684
 
685
- // src/js/style/float.js
685
+ // src/js/inline-style/float.js
686
686
  Object.assign(GridEditor.locales.en, {
687
687
  "utility.float": "Float",
688
688
  "utility.float_start": "Start",
@@ -716,7 +716,7 @@
716
716
  };
717
717
  }
718
718
 
719
- // src/js/style/sticky.js
719
+ // src/js/inline-style/sticky.js
720
720
  Object.assign(GridEditor.locales.en, {
721
721
  "utility.sticky": "Sticky"
722
722
  });
@@ -744,7 +744,7 @@
744
744
  };
745
745
  }
746
746
 
747
- // src/js/style/drawerflow.js
747
+ // src/js/inline-style/drawerflow.js
748
748
  var NODES2 = ".row, .column, .ge-element, [data-ge-container]";
749
749
  var OUT_CLASS = "ge-drawer-out";
750
750
  var OUT_ATTR = "data-ge-drawer-out";
@@ -838,7 +838,7 @@
838
838
  };
839
839
  }
840
840
 
841
- // src/js/style/sections.js
841
+ // src/js/inline-style/sections.js
842
842
  var COLORS = ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark"];
843
843
  var SIDES2 = ["top", "end", "bottom", "start"];
844
844
  var OPACITIES = ["10", "25", "50", "75", "100"];
@@ -864,14 +864,14 @@
864
864
  var SECTIONS = [
865
865
  {
866
866
  key: "size",
867
- labelKey: "style.section_size",
867
+ labelKey: "inline_style.section_size",
868
868
  properties: [
869
- prop("width", { labelKey: "style.prop_width", notOn: NOT_ON_COLUMN }),
870
- prop("height", { labelKey: "style.prop_height", notOn: NOT_ON_COLUMN }),
871
- prop("min-width", { labelKey: "style.prop_min_width" }),
872
- prop("min-height", { labelKey: "style.prop_min_height" }),
873
- prop("max-width", { labelKey: "style.prop_max_width" }),
874
- prop("max-height", { labelKey: "style.prop_max_height" })
869
+ prop("width", { labelKey: "inline_style.prop_width", notOn: NOT_ON_COLUMN }),
870
+ prop("height", { labelKey: "inline_style.prop_height", notOn: NOT_ON_COLUMN }),
871
+ prop("min-width", { labelKey: "inline_style.prop_min_width" }),
872
+ prop("min-height", { labelKey: "inline_style.prop_min_height" }),
873
+ prop("max-width", { labelKey: "inline_style.prop_max_width" }),
874
+ prop("max-height", { labelKey: "inline_style.prop_max_height" })
875
875
  ],
876
876
  catalog: [
877
877
  group(each("w-", ["25", "50", "75", "100", "auto"]), true, NOT_ON_COLUMN),
@@ -884,29 +884,29 @@
884
884
  },
885
885
  {
886
886
  key: "spacing",
887
- labelKey: "style.section_spacing",
887
+ labelKey: "inline_style.section_spacing",
888
888
  properties: [
889
- prop("margin-top", { labelKey: "style.prop_margin_top" }),
890
- prop("margin-right", { labelKey: "style.prop_margin_right" }),
891
- prop("margin-bottom", { labelKey: "style.prop_margin_bottom" }),
892
- prop("margin-left", { labelKey: "style.prop_margin_left" }),
893
- prop("padding-top", { labelKey: "style.prop_padding_top" }),
894
- prop("padding-right", { labelKey: "style.prop_padding_right" }),
895
- prop("padding-bottom", { labelKey: "style.prop_padding_bottom" }),
896
- prop("padding-left", { labelKey: "style.prop_padding_left" })
889
+ prop("margin-top", { labelKey: "inline_style.prop_margin_top" }),
890
+ prop("margin-right", { labelKey: "inline_style.prop_margin_right" }),
891
+ prop("margin-bottom", { labelKey: "inline_style.prop_margin_bottom" }),
892
+ prop("margin-left", { labelKey: "inline_style.prop_margin_left" }),
893
+ prop("padding-top", { labelKey: "inline_style.prop_padding_top" }),
894
+ prop("padding-right", { labelKey: "inline_style.prop_padding_right" }),
895
+ prop("padding-bottom", { labelKey: "inline_style.prop_padding_bottom" }),
896
+ prop("padding-left", { labelKey: "inline_style.prop_padding_left" })
897
897
  ],
898
898
  catalog: [],
899
899
  parts: ["spacing"]
900
900
  },
901
901
  {
902
902
  key: "border",
903
- labelKey: "style.section_border",
903
+ labelKey: "inline_style.section_border",
904
904
  properties: [
905
- prop("border-width", { labelKey: "style.prop_border_width" }),
906
- prop("border-style", { labelKey: "style.prop_border_style", type: "select", values: ["none", "solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset"] }),
907
- prop("border-color", { labelKey: "style.prop_border_color", type: "color" }),
908
- prop("border-radius", { labelKey: "style.prop_border_radius" }),
909
- prop("box-shadow", { labelKey: "style.prop_box_shadow", type: "shadow" })
905
+ prop("border-width", { labelKey: "inline_style.prop_border_width" }),
906
+ prop("border-style", { labelKey: "inline_style.prop_border_style", type: "select", values: ["none", "solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset"] }),
907
+ prop("border-color", { labelKey: "inline_style.prop_border_color", type: "color" }),
908
+ prop("border-radius", { labelKey: "inline_style.prop_border_radius" }),
909
+ prop("box-shadow", { labelKey: "inline_style.prop_box_shadow", type: "shadow" })
910
910
  ],
911
911
  catalog: [
912
912
  group(["border", "border-0"].concat(each("border-", SIDES2), each("border-", SIDES2, "-0")), false),
@@ -921,13 +921,13 @@
921
921
  },
922
922
  {
923
923
  key: "background",
924
- labelKey: "style.section_background",
924
+ labelKey: "inline_style.section_background",
925
925
  properties: [
926
- prop("background-color", { labelKey: "style.prop_background_color", type: "color" }),
927
- prop("background-image", { labelKey: "style.prop_background_image", type: "url" }),
928
- prop("background-size", { labelKey: "style.prop_background_size" }),
929
- prop("background-position", { labelKey: "style.prop_background_position" }),
930
- prop("background-repeat", { labelKey: "style.prop_background_repeat", type: "select", values: ["repeat", "no-repeat", "repeat-x", "repeat-y", "space", "round"] })
926
+ prop("background-color", { labelKey: "inline_style.prop_background_color", type: "color" }),
927
+ prop("background-image", { labelKey: "inline_style.prop_background_image", type: "url" }),
928
+ prop("background-size", { labelKey: "inline_style.prop_background_size" }),
929
+ prop("background-position", { labelKey: "inline_style.prop_background_position" }),
930
+ prop("background-repeat", { labelKey: "inline_style.prop_background_repeat", type: "select", values: ["repeat", "no-repeat", "repeat-x", "repeat-y", "space", "round"] })
931
931
  ],
932
932
  catalog: [
933
933
  group(each("bg-", COLORS.concat(["body", "body-secondary", "body-tertiary", "white", "black", "transparent"])).concat(each("bg-", COLORS, "-subtle"), each("text-bg-", COLORS))),
@@ -938,12 +938,12 @@
938
938
  },
939
939
  {
940
940
  key: "text",
941
- labelKey: "style.section_text",
941
+ labelKey: "inline_style.section_text",
942
942
  properties: [
943
- prop("color", { labelKey: "style.prop_color", type: "color" }),
944
- prop("font-size", { labelKey: "style.prop_font_size" }),
945
- prop("text-align", { labelKey: "style.prop_text_align", type: "select", values: ["start", "center", "end", "left", "right", "justify"] }),
946
- prop("text-shadow", { labelKey: "style.prop_text_shadow", type: "shadow" })
943
+ prop("color", { labelKey: "inline_style.prop_color", type: "color" }),
944
+ prop("font-size", { labelKey: "inline_style.prop_font_size" }),
945
+ prop("text-align", { labelKey: "inline_style.prop_text_align", type: "select", values: ["start", "center", "end", "left", "right", "justify"] }),
946
+ prop("text-shadow", { labelKey: "inline_style.prop_text_shadow", type: "shadow" })
947
947
  ],
948
948
  catalog: [
949
949
  group(each("text-", COLORS.concat(["body", "body-secondary", "body-tertiary", "white", "black"])).concat(each("text-", COLORS, "-emphasis"), ["text-body-emphasis"])),
@@ -955,15 +955,15 @@
955
955
  },
956
956
  {
957
957
  key: "typography",
958
- labelKey: "style.section_typography",
958
+ labelKey: "inline_style.section_typography",
959
959
  properties: [
960
- prop("font-family", { labelKey: "style.prop_font_family" }),
961
- prop("font-weight", { labelKey: "style.prop_font_weight", type: "select", values: ["100", "200", "300", "400", "500", "600", "700", "800", "900", "normal", "bold", "lighter", "bolder"] }),
962
- prop("font-style", { labelKey: "style.prop_font_style", type: "select", values: ["normal", "italic", "oblique"] }),
963
- prop("line-height", { labelKey: "style.prop_line_height" }),
964
- prop("letter-spacing", { labelKey: "style.prop_letter_spacing" }),
965
- prop("text-transform", { labelKey: "style.prop_text_transform", type: "select", values: ["none", "uppercase", "lowercase", "capitalize"] }),
966
- prop("text-decoration", { labelKey: "style.prop_text_decoration", type: "select", values: ["none", "underline", "line-through", "overline"] })
960
+ prop("font-family", { labelKey: "inline_style.prop_font_family" }),
961
+ 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"] }),
962
+ prop("font-style", { labelKey: "inline_style.prop_font_style", type: "select", values: ["normal", "italic", "oblique"] }),
963
+ prop("line-height", { labelKey: "inline_style.prop_line_height" }),
964
+ prop("letter-spacing", { labelKey: "inline_style.prop_letter_spacing" }),
965
+ prop("text-transform", { labelKey: "inline_style.prop_text_transform", type: "select", values: ["none", "uppercase", "lowercase", "capitalize"] }),
966
+ prop("text-decoration", { labelKey: "inline_style.prop_text_decoration", type: "select", values: ["none", "underline", "line-through", "overline"] })
967
967
  ],
968
968
  catalog: [
969
969
  group(each("fw-", ["lighter", "light", "normal", "medium", "semibold", "bold", "bolder"])),
@@ -978,12 +978,12 @@
978
978
  },
979
979
  {
980
980
  key: "display",
981
- labelKey: "style.section_display",
981
+ labelKey: "inline_style.section_display",
982
982
  properties: [
983
- prop("display", { labelKey: "style.prop_display", type: "select", values: ["none", "block", "inline", "inline-block", "flex", "inline-flex", "grid", "inline-grid"] }),
984
- prop("opacity", { labelKey: "style.prop_opacity" }),
985
- prop("overflow", { labelKey: "style.prop_overflow", type: "select", values: ["visible", "hidden", "auto", "scroll", "clip"] }),
986
- prop("visibility", { labelKey: "style.prop_visibility", type: "select", values: ["visible", "hidden"] })
983
+ prop("display", { labelKey: "inline_style.prop_display", type: "select", values: ["none", "block", "inline", "inline-block", "flex", "inline-flex", "grid", "inline-grid"] }),
984
+ prop("opacity", { labelKey: "inline_style.prop_opacity" }),
985
+ prop("overflow", { labelKey: "inline_style.prop_overflow", type: "select", values: ["visible", "hidden", "auto", "scroll", "clip"] }),
986
+ prop("visibility", { labelKey: "inline_style.prop_visibility", type: "select", values: ["visible", "hidden"] })
987
987
  ],
988
988
  catalog: [
989
989
  group(each("opacity-", ["0", "25", "50", "75", "100"])),
@@ -994,7 +994,7 @@
994
994
  },
995
995
  {
996
996
  key: "flex",
997
- labelKey: "style.section_flex",
997
+ labelKey: "inline_style.section_flex",
998
998
  properties: [],
999
999
  catalog: [
1000
1000
  group(["vstack", "hstack"], true, ["row"])
@@ -1003,14 +1003,14 @@
1003
1003
  },
1004
1004
  {
1005
1005
  key: "position",
1006
- labelKey: "style.section_position",
1006
+ labelKey: "inline_style.section_position",
1007
1007
  properties: [
1008
- prop("position", { labelKey: "style.prop_position", type: "select", values: ["static", "relative", "absolute", "fixed", "sticky"] }),
1009
- prop("top", { labelKey: "style.prop_top", notOn: NOT_ON_COLUMN }),
1010
- prop("right", { labelKey: "style.prop_right", notOn: NOT_ON_COLUMN }),
1011
- prop("bottom", { labelKey: "style.prop_bottom", notOn: NOT_ON_COLUMN }),
1012
- prop("left", { labelKey: "style.prop_left", notOn: NOT_ON_COLUMN }),
1013
- prop("z-index", { labelKey: "style.prop_z_index" })
1008
+ prop("position", { labelKey: "inline_style.prop_position", type: "select", values: ["static", "relative", "absolute", "fixed", "sticky"] }),
1009
+ prop("top", { labelKey: "inline_style.prop_top", notOn: NOT_ON_COLUMN }),
1010
+ prop("right", { labelKey: "inline_style.prop_right", notOn: NOT_ON_COLUMN }),
1011
+ prop("bottom", { labelKey: "inline_style.prop_bottom", notOn: NOT_ON_COLUMN }),
1012
+ prop("left", { labelKey: "inline_style.prop_left", notOn: NOT_ON_COLUMN }),
1013
+ prop("z-index", { labelKey: "inline_style.prop_z_index" })
1014
1014
  ],
1015
1015
  catalog: [
1016
1016
  group(each("position-", ["static", "relative", "absolute", "fixed", "sticky"])),
@@ -1026,7 +1026,7 @@
1026
1026
  },
1027
1027
  {
1028
1028
  key: "custom",
1029
- labelKey: "style.section_custom",
1029
+ labelKey: "inline_style.section_custom",
1030
1030
  properties: [],
1031
1031
  catalog: [],
1032
1032
  parts: [],
@@ -1110,12 +1110,12 @@
1110
1110
  })[0] || null;
1111
1111
  }
1112
1112
 
1113
- // src/js/style/options.js
1113
+ // src/js/inline-style/options.js
1114
1114
  function resolveSections(ge, given) {
1115
1115
  var resolved = {};
1116
1116
  Object.keys(given || {}).forEach(function(key) {
1117
1117
  if (!section(key)) {
1118
- ge.warn('style.sections: there is no "' + key + '" section: ignored');
1118
+ ge.warn('inline_style.sections: there is no "' + key + '" section: ignored');
1119
1119
  }
1120
1120
  });
1121
1121
  SECTIONS.forEach(function(each2) {
@@ -1132,7 +1132,7 @@
1132
1132
  if (Array.isArray(option.properties)) {
1133
1133
  option.properties.forEach(function(name) {
1134
1134
  if (own.indexOf(name) === -1) {
1135
- ge.warn("style.sections." + each2.key + ': "' + name + '" is not one of its properties: ignored');
1135
+ ge.warn("inline_style.sections." + each2.key + ': "' + name + '" is not one of its properties: ignored');
1136
1136
  }
1137
1137
  });
1138
1138
  properties = option.properties.filter(function(name) {
@@ -1150,7 +1150,7 @@
1150
1150
  return resolved;
1151
1151
  }
1152
1152
  function resolveOptions(ge) {
1153
- var style = ge.settings.style || {};
1153
+ var style = ge.settings.inline_style || {};
1154
1154
  return {
1155
1155
  sections: resolveSections(ge, style.sections),
1156
1156
  spacing: style.spacing,
@@ -1158,7 +1158,7 @@
1158
1158
  };
1159
1159
  }
1160
1160
 
1161
- // src/js/style/fields.js
1161
+ // src/js/inline-style/fields.js
1162
1162
  var renderers = /* @__PURE__ */ new WeakMap();
1163
1163
  var fieldCounter = 0;
1164
1164
  function classesOf(node) {
@@ -1179,7 +1179,7 @@
1179
1179
  if (ok) {
1180
1180
  input.removeAttribute("title");
1181
1181
  } else {
1182
- input.setAttribute("title", ge.t("style.invalid"));
1182
+ input.setAttribute("title", ge.t("inline_style.invalid"));
1183
1183
  }
1184
1184
  }
1185
1185
  function fill(input, value) {
@@ -1205,7 +1205,7 @@
1205
1205
  return "#" + hex.toLowerCase();
1206
1206
  }
1207
1207
  function colorControl(onValue) {
1208
- var box = element("div", { "class": "input-group input-group-sm ge-style-color" });
1208
+ var box = element("div", { "class": "input-group input-group-sm ge-inline-style-color" });
1209
1209
  var picker = box.appendChild(element("input", { type: "color", "class": "form-control form-control-color" }));
1210
1210
  var text = box.appendChild(textInput());
1211
1211
  picker.addEventListener("input", function() {
@@ -1277,10 +1277,10 @@
1277
1277
  }
1278
1278
  var LENGTH = /^-?(?:\d*\.)?\d+(?:[a-z%]+)?$/i;
1279
1279
  var SHADOW_PARTS = [
1280
- { name: "x", labelKey: "style.shadow_x" },
1281
- { name: "y", labelKey: "style.shadow_y" },
1282
- { name: "blur", labelKey: "style.shadow_blur" },
1283
- { name: "spread", labelKey: "style.shadow_spread" }
1280
+ { name: "x", labelKey: "inline_style.shadow_x" },
1281
+ { name: "y", labelKey: "inline_style.shadow_y" },
1282
+ { name: "blur", labelKey: "inline_style.shadow_blur" },
1283
+ { name: "spread", labelKey: "inline_style.shadow_spread" }
1284
1284
  ];
1285
1285
  function parseShadow(value, box) {
1286
1286
  value = value.trim();
@@ -1332,7 +1332,7 @@
1332
1332
  }
1333
1333
  function shadowControl(ge, node, property, changed) {
1334
1334
  var box = property === "box-shadow";
1335
- var holder = element("div", { "class": "ge-style-shadow" });
1335
+ var holder = element("div", { "class": "ge-inline-style-shadow" });
1336
1336
  var textMode = false;
1337
1337
  function writeValue(value, input) {
1338
1338
  var ok = write(ge, node, property, value);
@@ -1344,17 +1344,17 @@
1344
1344
  }
1345
1345
  function builder(parts) {
1346
1346
  holder.innerHTML = "";
1347
- var grid = holder.appendChild(element("div", { "class": "ge-style-shadow-builder" }));
1347
+ var grid = holder.appendChild(element("div", { "class": "ge-inline-style-shadow-builder" }));
1348
1348
  var names = box ? SHADOW_PARTS : SHADOW_PARTS.slice(0, 3);
1349
1349
  var inputs = names.map(function(part, i) {
1350
- var cell = grid.appendChild(element("label", { "class": "ge-style-shadow-part" }));
1351
- cell.appendChild(element("span", { "class": "ge-style-shadow-label" }, ge.t(part.labelKey)));
1352
- var input = cell.appendChild(textInput("ge-style-shadow-" + part.name));
1350
+ var cell = grid.appendChild(element("label", { "class": "ge-inline-style-shadow-part" }));
1351
+ cell.appendChild(element("span", { "class": "ge-inline-style-shadow-label" }, ge.t(part.labelKey)));
1352
+ var input = cell.appendChild(textInput("ge-inline-style-shadow-" + part.name));
1353
1353
  input.value = parts.lengths[i] || "";
1354
1354
  return input;
1355
1355
  });
1356
- var colorCell = grid.appendChild(element("label", { "class": "ge-style-shadow-part ge-style-shadow-color" }));
1357
- colorCell.appendChild(element("span", { "class": "ge-style-shadow-label" }, ge.t("style.shadow_color")));
1356
+ var colorCell = grid.appendChild(element("label", { "class": "ge-inline-style-shadow-part ge-inline-style-shadow-color" }));
1357
+ colorCell.appendChild(element("span", { "class": "ge-inline-style-shadow-label" }, ge.t("inline_style.shadow_color")));
1358
1358
  var color = colorControl(function() {
1359
1359
  update();
1360
1360
  });
@@ -1362,9 +1362,9 @@
1362
1362
  color.set(parts.color);
1363
1363
  var inset = null;
1364
1364
  if (box) {
1365
- var insetCell = grid.appendChild(element("label", { "class": "form-check ge-style-shadow-inset" }));
1365
+ var insetCell = grid.appendChild(element("label", { "class": "form-check ge-inline-style-shadow-inset" }));
1366
1366
  inset = insetCell.appendChild(element("input", { type: "checkbox", "class": "form-check-input" }));
1367
- insetCell.appendChild(element("span", { "class": "form-check-label" }, ge.t("style.shadow_inset")));
1367
+ insetCell.appendChild(element("span", { "class": "form-check-label" }, ge.t("inline_style.shadow_inset")));
1368
1368
  inset.checked = parts.inset;
1369
1369
  inset.addEventListener("change", function() {
1370
1370
  update();
@@ -1375,7 +1375,7 @@
1375
1375
  update();
1376
1376
  });
1377
1377
  });
1378
- var toText = holder.appendChild(element("a", { href: "#", "class": "ge-style-shadow-mode" }, ge.t("style.shadow_text_mode")));
1378
+ var toText = holder.appendChild(element("a", { href: "#", "class": "ge-inline-style-shadow-mode" }, ge.t("inline_style.shadow_text_mode")));
1379
1379
  toText.addEventListener("click", function(e) {
1380
1380
  e.preventDefault();
1381
1381
  textMode = true;
@@ -1394,7 +1394,7 @@
1394
1394
  }
1395
1395
  function text(value) {
1396
1396
  holder.innerHTML = "";
1397
- var input = holder.appendChild(textInput("ge-style-shadow-text"));
1397
+ var input = holder.appendChild(textInput("ge-inline-style-shadow-text"));
1398
1398
  input.value = value;
1399
1399
  input.addEventListener("change", function() {
1400
1400
  if (input.value.trim() === "") {
@@ -1414,7 +1414,7 @@
1414
1414
  }
1415
1415
  var value = ge.hostStyle(node, property).value;
1416
1416
  var parts = parseShadow(value, box);
1417
- if (value === shown && holder.firstChild && textMode === !!holder.querySelector(".ge-style-shadow-text")) {
1417
+ if (value === shown && holder.firstChild && textMode === !!holder.querySelector(".ge-inline-style-shadow-text")) {
1418
1418
  return;
1419
1419
  }
1420
1420
  shown = value;
@@ -1430,8 +1430,8 @@
1430
1430
  } };
1431
1431
  }
1432
1432
  function createStyleField(ge, node, property, changed) {
1433
- var field = element("div", { "class": "ge-style-field", "data-ge-style-property": property.name });
1434
- var label = field.appendChild(element("label", { "class": "ge-style-label" }, ge.t(property.labelKey)));
1433
+ var field = element("div", { "class": "ge-inline-style-field", "data-ge-inline-style-property": property.name });
1434
+ var label = field.appendChild(element("label", { "class": "ge-inline-style-label" }, ge.t(property.labelKey)));
1435
1435
  var render;
1436
1436
  function current() {
1437
1437
  return ge.hostStyle(node, property.name).value;
@@ -1492,15 +1492,15 @@
1492
1492
  }
1493
1493
  var control = field.querySelector("input, select");
1494
1494
  if (control) {
1495
- control.id = "ge-style-field-" + ++fieldCounter;
1495
+ control.id = "ge-inline-style-field-" + ++fieldCounter;
1496
1496
  label.setAttribute("for", control.id);
1497
1497
  }
1498
- field.appendChild(element("small", { "class": "ge-style-note ge-style-overridden" }));
1498
+ field.appendChild(element("small", { "class": "ge-inline-style-note ge-inline-style-overridden" }));
1499
1499
  renderers.set(field, function() {
1500
1500
  render();
1501
1501
  var winner = current() ? overriding(property.name, classesOf(node)) : null;
1502
- var note = child(field, ".ge-style-overridden");
1503
- note.textContent = winner ? ge.t("style.overridden", { "class": winner }) : "";
1502
+ var note = child(field, ".ge-inline-style-overridden");
1503
+ note.textContent = winner ? ge.t("inline_style.overridden", { "class": winner }) : "";
1504
1504
  toggle(note, !!winner);
1505
1505
  });
1506
1506
  renderStyleField(field);
@@ -1513,7 +1513,7 @@
1513
1513
  }
1514
1514
  }
1515
1515
 
1516
- // src/js/style/catalog.js
1516
+ // src/js/inline-style/catalog.js
1517
1517
  function classesOf2(node) {
1518
1518
  return (node.getAttribute("class") || "").split(/\s+/).filter(Boolean);
1519
1519
  }
@@ -1543,14 +1543,14 @@
1543
1543
  if (!offered.length) {
1544
1544
  return null;
1545
1545
  }
1546
- var box = element("div", { "class": "ge-style-catalog" });
1547
- box.appendChild(element("span", { "class": "ge-style-label" }, ge.t("style.catalog")));
1546
+ var box = element("div", { "class": "ge-inline-style-catalog" });
1547
+ box.appendChild(element("span", { "class": "ge-inline-style-label" }, ge.t("inline_style.catalog")));
1548
1548
  offered.forEach(function(group2) {
1549
- var row = box.appendChild(element("div", { "class": "ge-style-chips" }));
1549
+ var row = box.appendChild(element("div", { "class": "ge-inline-style-chips" }));
1550
1550
  group2.classes.forEach(function(name) {
1551
1551
  var chip = row.appendChild(element("button", {
1552
1552
  type: "button",
1553
- "class": "btn btn-sm btn-outline-secondary ge-style-chip",
1553
+ "class": "btn btn-sm btn-outline-secondary ge-inline-style-chip",
1554
1554
  "data-ge-class": name,
1555
1555
  "aria-pressed": "false"
1556
1556
  }, name));
@@ -1564,14 +1564,14 @@
1564
1564
  }
1565
1565
  function renderCatalog(box, node) {
1566
1566
  var classes = classesOf2(node);
1567
- all(box, ".ge-style-chip").forEach(function(chip) {
1567
+ all(box, ".ge-inline-style-chip").forEach(function(chip) {
1568
1568
  var on = classes.indexOf(chip.getAttribute("data-ge-class")) !== -1;
1569
1569
  toggleClass(chip, "active", on);
1570
1570
  chip.setAttribute("aria-pressed", on ? "true" : "false");
1571
1571
  });
1572
1572
  }
1573
1573
 
1574
- // src/js/style/custom.js
1574
+ // src/js/inline-style/custom.js
1575
1575
  function longhands(property) {
1576
1576
  var probe = document.createElement("div").style;
1577
1577
  var list = [];
@@ -1593,12 +1593,12 @@
1593
1593
  covered[longhand] = true;
1594
1594
  });
1595
1595
  });
1596
- var box = element("div", { "class": "ge-style-custom" });
1596
+ var box = element("div", { "class": "ge-inline-style-custom" });
1597
1597
  var textarea = box.appendChild(element("textarea", {
1598
- "class": "form-control form-control-sm font-monospace ge-style-custom-css",
1598
+ "class": "form-control form-control-sm font-monospace ge-inline-style-custom-css",
1599
1599
  rows: "4",
1600
1600
  spellcheck: "false",
1601
- "aria-label": ge.t("style.section_custom")
1601
+ "aria-label": ge.t("inline_style.section_custom")
1602
1602
  }));
1603
1603
  function free() {
1604
1604
  var style = declaration(ge.hostStyle(node));
@@ -1636,7 +1636,7 @@
1636
1636
  return { element: box, render };
1637
1637
  }
1638
1638
 
1639
- // src/js/style/accordion.js
1639
+ // src/js/inline-style/accordion.js
1640
1640
  function takesInlineStyle(node, kind) {
1641
1641
  if (kind === "row" || kind === "column" || kind === "element" || kind === "section") {
1642
1642
  return true;
@@ -1667,7 +1667,7 @@
1667
1667
  if (fields.length < 2) {
1668
1668
  return fields[0] || null;
1669
1669
  }
1670
- var box = element("div", { "class": "ge-style-part-fields" });
1670
+ var box = element("div", { "class": "ge-inline-style-part-fields" });
1671
1671
  fields.forEach(function(field) {
1672
1672
  box.appendChild(field);
1673
1673
  });
@@ -1675,7 +1675,7 @@
1675
1675
  }
1676
1676
  function createAccordion(ge, node, kind, context) {
1677
1677
  var inline = takesInlineStyle(node, kind);
1678
- var accordion = element("div", { "class": "accordion ge-style" });
1678
+ var accordion = element("div", { "class": "accordion ge-inline-style" });
1679
1679
  var fields = [];
1680
1680
  var catalogs = [];
1681
1681
  var notes = [];
@@ -1685,7 +1685,7 @@
1685
1685
  render();
1686
1686
  };
1687
1687
  function item(key, labelKey) {
1688
- var entry = accordion.appendChild(element("div", { "class": "accordion-item", "data-ge-style-section": key }));
1688
+ var entry = accordion.appendChild(element("div", { "class": "accordion-item", "data-ge-inline-style-section": key }));
1689
1689
  var header = entry.appendChild(element("h2", { "class": "accordion-header" }));
1690
1690
  var button = header.appendChild(element("button", {
1691
1691
  type: "button",
@@ -1728,12 +1728,12 @@
1728
1728
  }
1729
1729
  var body = item(key, section2.labelKey).body;
1730
1730
  parts.forEach(function(part) {
1731
- body.appendChild(addClass(part, "ge-style-part"));
1731
+ body.appendChild(addClass(part, "ge-inline-style-part"));
1732
1732
  });
1733
1733
  if (properties.length) {
1734
- var note = body.appendChild(element("small", { "class": "ge-style-note ge-style-all-sizes" }, ge.t("style.all_sizes")));
1734
+ var note = body.appendChild(element("small", { "class": "ge-inline-style-note ge-inline-style-all-sizes" }, ge.t("inline_style.all_sizes")));
1735
1735
  notes.push(note);
1736
- var grid = body.appendChild(element("div", { "class": "ge-style-fields" }));
1736
+ var grid = body.appendChild(element("div", { "class": "ge-inline-style-fields" }));
1737
1737
  properties.forEach(function(property) {
1738
1738
  var field = createStyleField(ge, node, property, changed);
1739
1739
  fields.push(field);
@@ -1747,7 +1747,7 @@
1747
1747
  });
1748
1748
  if (customItem) {
1749
1749
  custom = createCustom(ge, node, fields.map(function(field) {
1750
- return field.getAttribute("data-ge-style-property");
1750
+ return field.getAttribute("data-ge-inline-style-property");
1751
1751
  }), changed);
1752
1752
  customItem.body.appendChild(custom.element);
1753
1753
  accordion.appendChild(customItem.entry);
@@ -1757,7 +1757,7 @@
1757
1757
  }
1758
1758
  function open(key) {
1759
1759
  all(accordion, ".accordion-item").forEach(function(entry) {
1760
- toggle2(entry, entry.getAttribute("data-ge-style-section") === key);
1760
+ toggle2(entry, entry.getAttribute("data-ge-inline-style-section") === key);
1761
1761
  });
1762
1762
  }
1763
1763
  open(context.state.open);
@@ -1777,79 +1777,79 @@
1777
1777
  return { element: accordion, render, open };
1778
1778
  }
1779
1779
 
1780
- // src/js/plugins/grideditor.style.js
1780
+ // src/js/plugins/grideditor.inline-style.js
1781
1781
  Object.assign(GridEditor.locales.en, {
1782
- "style.section_title": "Style",
1783
- "style.dialog_title": "Style: {kind}",
1784
- "style.section_size": "Size",
1785
- "style.section_spacing": "Spacing",
1786
- "style.section_border": "Border",
1787
- "style.section_background": "Background",
1788
- "style.section_text": "Text",
1789
- "style.section_typography": "Typography",
1790
- "style.section_display": "Display",
1791
- "style.section_flex": "Flex",
1792
- "style.section_position": "Position",
1793
- "style.section_custom": "Custom css",
1794
- "style.all_sizes": "Applies to every size",
1795
- "style.overridden": "The class {class} takes priority over this value",
1796
- "style.invalid": "Not a value this property takes",
1797
- "style.catalog": "Bootstrap classes",
1798
- "style.shadow_x": "X",
1799
- "style.shadow_y": "Y",
1800
- "style.shadow_blur": "Blur",
1801
- "style.shadow_spread": "Spread",
1802
- "style.shadow_color": "Color",
1803
- "style.shadow_inset": "Inset",
1804
- "style.shadow_text_mode": "Edit as text",
1805
- "style.prop_width": "Width",
1806
- "style.prop_height": "Height",
1807
- "style.prop_min_width": "Min width",
1808
- "style.prop_min_height": "Min height",
1809
- "style.prop_max_width": "Max width",
1810
- "style.prop_max_height": "Max height",
1811
- "style.prop_margin_top": "Margin top",
1812
- "style.prop_margin_right": "Margin right",
1813
- "style.prop_margin_bottom": "Margin bottom",
1814
- "style.prop_margin_left": "Margin left",
1815
- "style.prop_padding_top": "Padding top",
1816
- "style.prop_padding_right": "Padding right",
1817
- "style.prop_padding_bottom": "Padding bottom",
1818
- "style.prop_padding_left": "Padding left",
1819
- "style.prop_border_width": "Border width",
1820
- "style.prop_border_style": "Border style",
1821
- "style.prop_border_color": "Border color",
1822
- "style.prop_border_radius": "Border radius",
1823
- "style.prop_box_shadow": "Shadow",
1824
- "style.prop_background_color": "Background color",
1825
- "style.prop_background_image": "Background image",
1826
- "style.prop_background_size": "Background size",
1827
- "style.prop_background_position": "Background position",
1828
- "style.prop_background_repeat": "Background repeat",
1829
- "style.prop_color": "Color",
1830
- "style.prop_font_size": "Font size",
1831
- "style.prop_text_align": "Text align",
1832
- "style.prop_text_shadow": "Text shadow",
1833
- "style.prop_font_family": "Font family",
1834
- "style.prop_font_weight": "Font weight",
1835
- "style.prop_font_style": "Font style",
1836
- "style.prop_line_height": "Line height",
1837
- "style.prop_letter_spacing": "Letter spacing",
1838
- "style.prop_text_transform": "Text transform",
1839
- "style.prop_text_decoration": "Text decoration",
1840
- "style.prop_display": "Display",
1841
- "style.prop_opacity": "Opacity",
1842
- "style.prop_overflow": "Overflow",
1843
- "style.prop_visibility": "Visibility",
1844
- "style.prop_position": "Position",
1845
- "style.prop_top": "Top",
1846
- "style.prop_right": "Right",
1847
- "style.prop_bottom": "Bottom",
1848
- "style.prop_left": "Left",
1849
- "style.prop_z_index": "Z-index"
1782
+ "inline_style.section_title": "Style",
1783
+ "inline_style.dialog_title": "Style: {kind}",
1784
+ "inline_style.section_size": "Size",
1785
+ "inline_style.section_spacing": "Spacing",
1786
+ "inline_style.section_border": "Border",
1787
+ "inline_style.section_background": "Background",
1788
+ "inline_style.section_text": "Text",
1789
+ "inline_style.section_typography": "Typography",
1790
+ "inline_style.section_display": "Display",
1791
+ "inline_style.section_flex": "Flex",
1792
+ "inline_style.section_position": "Position",
1793
+ "inline_style.section_custom": "Custom css",
1794
+ "inline_style.all_sizes": "Applies to every size",
1795
+ "inline_style.overridden": "The class {class} takes priority over this value",
1796
+ "inline_style.invalid": "Not a value this property takes",
1797
+ "inline_style.catalog": "Bootstrap classes",
1798
+ "inline_style.shadow_x": "X",
1799
+ "inline_style.shadow_y": "Y",
1800
+ "inline_style.shadow_blur": "Blur",
1801
+ "inline_style.shadow_spread": "Spread",
1802
+ "inline_style.shadow_color": "Color",
1803
+ "inline_style.shadow_inset": "Inset",
1804
+ "inline_style.shadow_text_mode": "Edit as text",
1805
+ "inline_style.prop_width": "Width",
1806
+ "inline_style.prop_height": "Height",
1807
+ "inline_style.prop_min_width": "Min width",
1808
+ "inline_style.prop_min_height": "Min height",
1809
+ "inline_style.prop_max_width": "Max width",
1810
+ "inline_style.prop_max_height": "Max height",
1811
+ "inline_style.prop_margin_top": "Margin top",
1812
+ "inline_style.prop_margin_right": "Margin right",
1813
+ "inline_style.prop_margin_bottom": "Margin bottom",
1814
+ "inline_style.prop_margin_left": "Margin left",
1815
+ "inline_style.prop_padding_top": "Padding top",
1816
+ "inline_style.prop_padding_right": "Padding right",
1817
+ "inline_style.prop_padding_bottom": "Padding bottom",
1818
+ "inline_style.prop_padding_left": "Padding left",
1819
+ "inline_style.prop_border_width": "Border width",
1820
+ "inline_style.prop_border_style": "Border style",
1821
+ "inline_style.prop_border_color": "Border color",
1822
+ "inline_style.prop_border_radius": "Border radius",
1823
+ "inline_style.prop_box_shadow": "Shadow",
1824
+ "inline_style.prop_background_color": "Background color",
1825
+ "inline_style.prop_background_image": "Background image",
1826
+ "inline_style.prop_background_size": "Background size",
1827
+ "inline_style.prop_background_position": "Background position",
1828
+ "inline_style.prop_background_repeat": "Background repeat",
1829
+ "inline_style.prop_color": "Color",
1830
+ "inline_style.prop_font_size": "Font size",
1831
+ "inline_style.prop_text_align": "Text align",
1832
+ "inline_style.prop_text_shadow": "Text shadow",
1833
+ "inline_style.prop_font_family": "Font family",
1834
+ "inline_style.prop_font_weight": "Font weight",
1835
+ "inline_style.prop_font_style": "Font style",
1836
+ "inline_style.prop_line_height": "Line height",
1837
+ "inline_style.prop_letter_spacing": "Letter spacing",
1838
+ "inline_style.prop_text_transform": "Text transform",
1839
+ "inline_style.prop_text_decoration": "Text decoration",
1840
+ "inline_style.prop_display": "Display",
1841
+ "inline_style.prop_opacity": "Opacity",
1842
+ "inline_style.prop_overflow": "Overflow",
1843
+ "inline_style.prop_visibility": "Visibility",
1844
+ "inline_style.prop_position": "Position",
1845
+ "inline_style.prop_top": "Top",
1846
+ "inline_style.prop_right": "Right",
1847
+ "inline_style.prop_bottom": "Bottom",
1848
+ "inline_style.prop_left": "Left",
1849
+ "inline_style.prop_z_index": "Z-index"
1850
1850
  });
1851
1851
  var PARTS = ["spacing", "textalign", "display", "flex", "float", "sticky", "drawerflow"];
1852
- GridEditor.utilities.style = function(ge) {
1852
+ GridEditor.utilities["inline-style"] = function(ge) {
1853
1853
  var options = resolveOptions(ge);
1854
1854
  var parts = {
1855
1855
  spacing: spacingPart(ge, options.spacing),
@@ -1895,7 +1895,7 @@
1895
1895
  return null;
1896
1896
  }
1897
1897
  accordions.push({ node, accordion });
1898
- return { labelKey: "style.section_title", titleKey: "style.dialog_title", body: accordion.element };
1898
+ return { labelKey: "inline_style.section_title", titleKey: "inline_style.dialog_title", body: accordion.element };
1899
1899
  },
1900
1900
  preview: function(node, kind, breakpoint) {
1901
1901
  return parts.spacing.preview(node, kind, breakpoint);