@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
@@ -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() === "") {
@@ -1406,6 +1406,14 @@
1406
1406
  }
1407
1407
  writeValue(input.value, input);
1408
1408
  });
1409
+ if (parseShadow(value, box)) {
1410
+ var toBuilder = holder.appendChild(element("a", { href: "#", "class": "ge-inline-style-shadow-mode" }, ge.t("inline_style.shadow_builder_mode")));
1411
+ toBuilder.addEventListener("click", function(e) {
1412
+ e.preventDefault();
1413
+ textMode = false;
1414
+ render();
1415
+ });
1416
+ }
1409
1417
  }
1410
1418
  var shown = null;
1411
1419
  function render() {
@@ -1414,7 +1422,7 @@
1414
1422
  }
1415
1423
  var value = ge.hostStyle(node, property).value;
1416
1424
  var parts = parseShadow(value, box);
1417
- if (value === shown && holder.firstChild && textMode === !!holder.querySelector(".ge-style-shadow-text")) {
1425
+ if (value === shown && holder.firstChild && textMode === !!holder.querySelector(".ge-inline-style-shadow-text")) {
1418
1426
  return;
1419
1427
  }
1420
1428
  shown = value;
@@ -1430,8 +1438,8 @@
1430
1438
  } };
1431
1439
  }
1432
1440
  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)));
1441
+ var field = element("div", { "class": "ge-inline-style-field", "data-ge-inline-style-property": property.name });
1442
+ var label = field.appendChild(element("label", { "class": "ge-inline-style-label" }, ge.t(property.labelKey)));
1435
1443
  var render;
1436
1444
  function current() {
1437
1445
  return ge.hostStyle(node, property.name).value;
@@ -1492,15 +1500,15 @@
1492
1500
  }
1493
1501
  var control = field.querySelector("input, select");
1494
1502
  if (control) {
1495
- control.id = "ge-style-field-" + ++fieldCounter;
1503
+ control.id = "ge-inline-style-field-" + ++fieldCounter;
1496
1504
  label.setAttribute("for", control.id);
1497
1505
  }
1498
- field.appendChild(element("small", { "class": "ge-style-note ge-style-overridden" }));
1506
+ field.appendChild(element("small", { "class": "ge-inline-style-note ge-inline-style-overridden" }));
1499
1507
  renderers.set(field, function() {
1500
1508
  render();
1501
1509
  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 }) : "";
1510
+ var note = child(field, ".ge-inline-style-overridden");
1511
+ note.textContent = winner ? ge.t("inline_style.overridden", { "class": winner }) : "";
1504
1512
  toggle(note, !!winner);
1505
1513
  });
1506
1514
  renderStyleField(field);
@@ -1513,7 +1521,7 @@
1513
1521
  }
1514
1522
  }
1515
1523
 
1516
- // src/js/style/catalog.js
1524
+ // src/js/inline-style/catalog.js
1517
1525
  function classesOf2(node) {
1518
1526
  return (node.getAttribute("class") || "").split(/\s+/).filter(Boolean);
1519
1527
  }
@@ -1543,14 +1551,14 @@
1543
1551
  if (!offered.length) {
1544
1552
  return null;
1545
1553
  }
1546
- var box = element("div", { "class": "ge-style-catalog" });
1547
- box.appendChild(element("span", { "class": "ge-style-label" }, ge.t("style.catalog")));
1554
+ var box = element("div", { "class": "ge-inline-style-catalog" });
1555
+ box.appendChild(element("span", { "class": "ge-inline-style-label" }, ge.t("inline_style.catalog")));
1548
1556
  offered.forEach(function(group2) {
1549
- var row = box.appendChild(element("div", { "class": "ge-style-chips" }));
1557
+ var row = box.appendChild(element("div", { "class": "ge-inline-style-chips" }));
1550
1558
  group2.classes.forEach(function(name) {
1551
1559
  var chip = row.appendChild(element("button", {
1552
1560
  type: "button",
1553
- "class": "btn btn-sm btn-outline-secondary ge-style-chip",
1561
+ "class": "btn btn-sm btn-outline-secondary ge-inline-style-chip",
1554
1562
  "data-ge-class": name,
1555
1563
  "aria-pressed": "false"
1556
1564
  }, name));
@@ -1564,14 +1572,14 @@
1564
1572
  }
1565
1573
  function renderCatalog(box, node) {
1566
1574
  var classes = classesOf2(node);
1567
- all(box, ".ge-style-chip").forEach(function(chip) {
1575
+ all(box, ".ge-inline-style-chip").forEach(function(chip) {
1568
1576
  var on = classes.indexOf(chip.getAttribute("data-ge-class")) !== -1;
1569
1577
  toggleClass(chip, "active", on);
1570
1578
  chip.setAttribute("aria-pressed", on ? "true" : "false");
1571
1579
  });
1572
1580
  }
1573
1581
 
1574
- // src/js/style/custom.js
1582
+ // src/js/inline-style/custom.js
1575
1583
  function longhands(property) {
1576
1584
  var probe = document.createElement("div").style;
1577
1585
  var list = [];
@@ -1593,12 +1601,12 @@
1593
1601
  covered[longhand] = true;
1594
1602
  });
1595
1603
  });
1596
- var box = element("div", { "class": "ge-style-custom" });
1604
+ var box = element("div", { "class": "ge-inline-style-custom" });
1597
1605
  var textarea = box.appendChild(element("textarea", {
1598
- "class": "form-control form-control-sm font-monospace ge-style-custom-css",
1606
+ "class": "form-control form-control-sm font-monospace ge-inline-style-custom-css",
1599
1607
  rows: "4",
1600
1608
  spellcheck: "false",
1601
- "aria-label": ge.t("style.section_custom")
1609
+ "aria-label": ge.t("inline_style.section_custom")
1602
1610
  }));
1603
1611
  function free() {
1604
1612
  var style = declaration(ge.hostStyle(node));
@@ -1636,7 +1644,7 @@
1636
1644
  return { element: box, render };
1637
1645
  }
1638
1646
 
1639
- // src/js/style/accordion.js
1647
+ // src/js/inline-style/accordion.js
1640
1648
  function takesInlineStyle(node, kind) {
1641
1649
  if (kind === "row" || kind === "column" || kind === "element" || kind === "section") {
1642
1650
  return true;
@@ -1667,7 +1675,7 @@
1667
1675
  if (fields.length < 2) {
1668
1676
  return fields[0] || null;
1669
1677
  }
1670
- var box = element("div", { "class": "ge-style-part-fields" });
1678
+ var box = element("div", { "class": "ge-inline-style-part-fields" });
1671
1679
  fields.forEach(function(field) {
1672
1680
  box.appendChild(field);
1673
1681
  });
@@ -1675,7 +1683,7 @@
1675
1683
  }
1676
1684
  function createAccordion(ge, node, kind, context) {
1677
1685
  var inline = takesInlineStyle(node, kind);
1678
- var accordion = element("div", { "class": "accordion ge-style" });
1686
+ var accordion = element("div", { "class": "accordion ge-inline-style" });
1679
1687
  var fields = [];
1680
1688
  var catalogs = [];
1681
1689
  var notes = [];
@@ -1685,7 +1693,7 @@
1685
1693
  render();
1686
1694
  };
1687
1695
  function item(key, labelKey) {
1688
- var entry = accordion.appendChild(element("div", { "class": "accordion-item", "data-ge-style-section": key }));
1696
+ var entry = accordion.appendChild(element("div", { "class": "accordion-item", "data-ge-inline-style-section": key }));
1689
1697
  var header = entry.appendChild(element("h2", { "class": "accordion-header" }));
1690
1698
  var button = header.appendChild(element("button", {
1691
1699
  type: "button",
@@ -1728,12 +1736,12 @@
1728
1736
  }
1729
1737
  var body = item(key, section2.labelKey).body;
1730
1738
  parts.forEach(function(part) {
1731
- body.appendChild(addClass(part, "ge-style-part"));
1739
+ body.appendChild(addClass(part, "ge-inline-style-part"));
1732
1740
  });
1733
1741
  if (properties.length) {
1734
- var note = body.appendChild(element("small", { "class": "ge-style-note ge-style-all-sizes" }, ge.t("style.all_sizes")));
1742
+ var note = body.appendChild(element("small", { "class": "ge-inline-style-note ge-inline-style-all-sizes" }, ge.t("inline_style.all_sizes")));
1735
1743
  notes.push(note);
1736
- var grid = body.appendChild(element("div", { "class": "ge-style-fields" }));
1744
+ var grid = body.appendChild(element("div", { "class": "ge-inline-style-fields" }));
1737
1745
  properties.forEach(function(property) {
1738
1746
  var field = createStyleField(ge, node, property, changed);
1739
1747
  fields.push(field);
@@ -1747,7 +1755,7 @@
1747
1755
  });
1748
1756
  if (customItem) {
1749
1757
  custom = createCustom(ge, node, fields.map(function(field) {
1750
- return field.getAttribute("data-ge-style-property");
1758
+ return field.getAttribute("data-ge-inline-style-property");
1751
1759
  }), changed);
1752
1760
  customItem.body.appendChild(custom.element);
1753
1761
  accordion.appendChild(customItem.entry);
@@ -1757,7 +1765,7 @@
1757
1765
  }
1758
1766
  function open(key) {
1759
1767
  all(accordion, ".accordion-item").forEach(function(entry) {
1760
- toggle2(entry, entry.getAttribute("data-ge-style-section") === key);
1768
+ toggle2(entry, entry.getAttribute("data-ge-inline-style-section") === key);
1761
1769
  });
1762
1770
  }
1763
1771
  open(context.state.open);
@@ -1777,79 +1785,80 @@
1777
1785
  return { element: accordion, render, open };
1778
1786
  }
1779
1787
 
1780
- // src/js/plugins/grideditor.style.js
1788
+ // src/js/plugins/grideditor.inline-style.js
1781
1789
  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"
1790
+ "inline_style.section_title": "Style",
1791
+ "inline_style.dialog_title": "Style: {kind}",
1792
+ "inline_style.section_size": "Size",
1793
+ "inline_style.section_spacing": "Spacing",
1794
+ "inline_style.section_border": "Border",
1795
+ "inline_style.section_background": "Background",
1796
+ "inline_style.section_text": "Text",
1797
+ "inline_style.section_typography": "Typography",
1798
+ "inline_style.section_display": "Display",
1799
+ "inline_style.section_flex": "Flex",
1800
+ "inline_style.section_position": "Position",
1801
+ "inline_style.section_custom": "Custom css",
1802
+ "inline_style.all_sizes": "Applies to every size",
1803
+ "inline_style.overridden": "The class {class} takes priority over this value",
1804
+ "inline_style.invalid": "Not a value this property takes",
1805
+ "inline_style.catalog": "Bootstrap classes",
1806
+ "inline_style.shadow_x": "X",
1807
+ "inline_style.shadow_y": "Y",
1808
+ "inline_style.shadow_blur": "Blur",
1809
+ "inline_style.shadow_spread": "Spread",
1810
+ "inline_style.shadow_color": "Color",
1811
+ "inline_style.shadow_inset": "Inset",
1812
+ "inline_style.shadow_text_mode": "Edit as text",
1813
+ "inline_style.shadow_builder_mode": "Edit with the builder",
1814
+ "inline_style.prop_width": "Width",
1815
+ "inline_style.prop_height": "Height",
1816
+ "inline_style.prop_min_width": "Min width",
1817
+ "inline_style.prop_min_height": "Min height",
1818
+ "inline_style.prop_max_width": "Max width",
1819
+ "inline_style.prop_max_height": "Max height",
1820
+ "inline_style.prop_margin_top": "Margin top",
1821
+ "inline_style.prop_margin_right": "Margin right",
1822
+ "inline_style.prop_margin_bottom": "Margin bottom",
1823
+ "inline_style.prop_margin_left": "Margin left",
1824
+ "inline_style.prop_padding_top": "Padding top",
1825
+ "inline_style.prop_padding_right": "Padding right",
1826
+ "inline_style.prop_padding_bottom": "Padding bottom",
1827
+ "inline_style.prop_padding_left": "Padding left",
1828
+ "inline_style.prop_border_width": "Border width",
1829
+ "inline_style.prop_border_style": "Border style",
1830
+ "inline_style.prop_border_color": "Border color",
1831
+ "inline_style.prop_border_radius": "Border radius",
1832
+ "inline_style.prop_box_shadow": "Shadow",
1833
+ "inline_style.prop_background_color": "Background color",
1834
+ "inline_style.prop_background_image": "Background image",
1835
+ "inline_style.prop_background_size": "Background size",
1836
+ "inline_style.prop_background_position": "Background position",
1837
+ "inline_style.prop_background_repeat": "Background repeat",
1838
+ "inline_style.prop_color": "Color",
1839
+ "inline_style.prop_font_size": "Font size",
1840
+ "inline_style.prop_text_align": "Text align",
1841
+ "inline_style.prop_text_shadow": "Text shadow",
1842
+ "inline_style.prop_font_family": "Font family",
1843
+ "inline_style.prop_font_weight": "Font weight",
1844
+ "inline_style.prop_font_style": "Font style",
1845
+ "inline_style.prop_line_height": "Line height",
1846
+ "inline_style.prop_letter_spacing": "Letter spacing",
1847
+ "inline_style.prop_text_transform": "Text transform",
1848
+ "inline_style.prop_text_decoration": "Text decoration",
1849
+ "inline_style.prop_display": "Display",
1850
+ "inline_style.prop_opacity": "Opacity",
1851
+ "inline_style.prop_overflow": "Overflow",
1852
+ "inline_style.prop_visibility": "Visibility",
1853
+ "inline_style.prop_position": "Position",
1854
+ "inline_style.prop_top": "Top",
1855
+ "inline_style.prop_right": "Right",
1856
+ "inline_style.prop_bottom": "Bottom",
1857
+ "inline_style.prop_left": "Left",
1858
+ "inline_style.prop_z_index": "Z-index"
1850
1859
  });
1851
1860
  var PARTS = ["spacing", "textalign", "display", "flex", "float", "sticky", "drawerflow"];
1852
- GridEditor.utilities.style = function(ge) {
1861
+ GridEditor.utilities["inline-style"] = function(ge) {
1853
1862
  var options = resolveOptions(ge);
1854
1863
  var parts = {
1855
1864
  spacing: spacingPart(ge, options.spacing),
@@ -1895,7 +1904,7 @@
1895
1904
  return null;
1896
1905
  }
1897
1906
  accordions.push({ node, accordion });
1898
- return { labelKey: "style.section_title", titleKey: "style.dialog_title", body: accordion.element };
1907
+ return { labelKey: "inline_style.section_title", titleKey: "inline_style.dialog_title", body: accordion.element };
1899
1908
  },
1900
1909
  preview: function(node, kind, breakpoint) {
1901
1910
  return parts.spacing.preview(node, kind, breakpoint);