studiokit-scaffolding-js 4.5.4 → 4.5.5

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.
@@ -21,7 +21,7 @@ declare const Parchment: {
21
21
  };
22
22
  export interface ImageValue {
23
23
  src: string;
24
- alt: string;
24
+ alt?: string;
25
25
  width: string;
26
26
  height: string;
27
27
  }
@@ -62,8 +62,12 @@ var Image = /** @class */ (function (_super) {
62
62
  Image.create = function (value) {
63
63
  var _a, _b, _c;
64
64
  var node = _super.create.call(this, this.tagName);
65
- // Adding a default value for images already saved in the db
66
- node.setAttribute('alt', (_a = value.alt) !== null && _a !== void 0 ? _a : 'Statement Image');
65
+ if ((_a = value.alt) === null || _a === void 0 ? void 0 : _a.trim()) {
66
+ node.setAttribute('alt', value.alt);
67
+ }
68
+ else {
69
+ node.className = 'alt-text-missing';
70
+ }
67
71
  node.setAttribute('src', value.src);
68
72
  // Setting up the height and width to be reactive when an image is getting resize
69
73
  node.setAttribute('height', (_b = value.height) !== null && _b !== void 0 ? _b : 'auto');
@@ -75,7 +79,7 @@ var Image = /** @class */ (function (_super) {
75
79
  return {
76
80
  width: node.getAttribute('width'),
77
81
  height: node.getAttribute('height'),
78
- alt: node.getAttribute('alt'),
82
+ alt: node.getAttribute('alt') || undefined,
79
83
  src: node.getAttribute('src')
80
84
  };
81
85
  };
@@ -27,7 +27,7 @@
27
27
  --color-light-red: #f5ccd1;
28
28
  --color-dark-gold: #7d882d;
29
29
  --color-light-green: #e4f1d4;
30
- --color-orange: #ef7d2f;
30
+ --color-orange: #ee701b;
31
31
  --color-light-orange: #f8f5e6;
32
32
  --color-dark-yellow: #b2a44a;
33
33
  --color-dark-grey: #30363d;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studiokit-scaffolding-js",
3
- "version": "4.5.4",
3
+ "version": "4.5.5",
4
4
  "description": "Common scaffolding for Studio apps at Purdue",
5
5
  "repository": "https://gitlab.com/purdue-informatics/studiokit/studiokit-scaffolding-js",
6
6
  "license": "MIT",