coveragebook_components 0.6.1 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/app.css +252 -212
  3. data/app/assets/build/coco/app.js +19 -2
  4. data/app/assets/build/coco/book.css +466 -218
  5. data/app/assets/build/coco/icons/custom/eye-off-red.svg +17 -0
  6. data/app/assets/build/coco/icons/custom/google-sso.svg +9 -0
  7. data/app/assets/build/coco/icons/custom/layout-overlay.svg +7 -0
  8. data/app/assets/build/coco/icons/custom/layout-split.svg +8 -0
  9. data/app/assets/build/coco/icons/custom/layout-stacked.svg +7 -0
  10. data/app/assets/build/coco/icons/custom/microsoft-sso.svg +11 -0
  11. data/app/assets/build/coco/icons/custom/montage.svg +10 -0
  12. data/app/assets/css/base/utils/icons.css +6 -5
  13. data/app/assets/css/book.css +1 -0
  14. data/app/assets/custom_icons/other/eye-off-red.svg +17 -0
  15. data/app/assets/custom_icons/other/google-sso.svg +9 -0
  16. data/app/assets/custom_icons/other/layout-overlay.svg +7 -0
  17. data/app/assets/custom_icons/other/layout-split.svg +8 -0
  18. data/app/assets/custom_icons/other/layout-stacked.svg +7 -0
  19. data/app/assets/custom_icons/other/microsoft-sso.svg +11 -0
  20. data/app/assets/custom_icons/other/montage.svg +10 -0
  21. data/app/components/coco/app/blocks/slide_editor/slide_editor.css +27 -18
  22. data/app/components/coco/app/blocks/slide_editor/slide_editor.html.erb +8 -4
  23. data/app/components/coco/app/blocks/slide_editor/slide_editor.js +23 -0
  24. data/app/components/coco/app/elements/seamless_textarea/seamless_textarea.js +1 -1
  25. data/app/components/coco/base/icon/icon.css +6 -2
  26. data/app/components/coco/base/icon/icon.html.erb +1 -1
  27. data/app/components/coco/base/icon/icon.rb +32 -9
  28. data/app/components/coco/book/blocks/slides/editable_slide/editable_slide.css +156 -140
  29. data/app/components/coco/book/blocks/slides/editable_slide/editable_slide.html.erb +25 -21
  30. data/lib/coco.rb +1 -1
  31. metadata +16 -2
@@ -14604,7 +14604,7 @@
14604
14604
  var package_default = {
14605
14605
  name: "coveragebook-components",
14606
14606
  type: "module",
14607
- version: "0.6.1",
14607
+ version: "0.6.3",
14608
14608
  main: "index.js",
14609
14609
  repository: "git@github.com:coveragebook/coco.git",
14610
14610
  author: "Mark Perkins <mark@coveragebook.com>",
@@ -29721,6 +29721,15 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
29721
29721
  });
29722
29722
  this.ready = true;
29723
29723
  });
29724
+ this.$watch("history.undoable", (undoable) => {
29725
+ if (undoable) {
29726
+ window.onbeforeunload = () => {
29727
+ return true;
29728
+ };
29729
+ } else {
29730
+ window.onbeforeunload = null;
29731
+ }
29732
+ });
29724
29733
  },
29725
29734
  undo(name, value) {
29726
29735
  this[name] = value;
@@ -29806,6 +29815,14 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
29806
29815
  }
29807
29816
  input.files = dataTransfer.files;
29808
29817
  },
29818
+ handleSlideClick(event) {
29819
+ if (Array.from(event.target.classList).includes("slide-text")) {
29820
+ event.target.querySelector("textarea").focus();
29821
+ }
29822
+ },
29823
+ get blankTextAreasList() {
29824
+ return ["title", "text1", "text2"].map((textareaName) => this[textareaName] === "" ? textareaName : "").join(" ").trim();
29825
+ },
29809
29826
  get hasBgImage() {
29810
29827
  return !!(this.bgImage && this.bgImage.data);
29811
29828
  },
@@ -31977,7 +31994,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
31977
31994
  const styles = window.getComputedStyle(textarea);
31978
31995
  const fontSize = styles.getPropertyValue("font-size");
31979
31996
  textarea.style.height = "4px";
31980
- let newHeight = textarea.scrollHeight - parseInt(fontSize, 10) * 0.16;
31997
+ let newHeight = textarea.scrollHeight;
31981
31998
  textarea.style.height = `${newHeight}px`;
31982
31999
  if (this.height !== newHeight) {
31983
32000
  this.height = newHeight;