@pageboard/html 0.14.16 → 0.14.17

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.
@@ -44,6 +44,19 @@ exports.segment = {
44
44
  type: 'boolean',
45
45
  default: false
46
46
  },
47
+ size: {
48
+ title: 'Size',
49
+ anyOf: [{
50
+ const: 'mini',
51
+ title: 'Mini'
52
+ }, {
53
+ type: 'null',
54
+ title: 'Normal'
55
+ }, {
56
+ const: 'large',
57
+ title: 'Large'
58
+ }]
59
+ },
47
60
  attached: {
48
61
  title: 'Attached',
49
62
  anyOf: [{
@@ -80,7 +93,7 @@ exports.segment = {
80
93
  contents: "block+",
81
94
  group: "block",
82
95
  icon: '<b class="icon">Seg</b>',
83
- html: '<div class="ui [raised] [disabled] [inverted] [padded] [compact] [circular] [basic] [attached|switch:both: |post: attached] [align|post: aligned] segment"></div>',
96
+ html: '<div class="ui [size] [raised] [disabled] [inverted] [padded] [compact] [circular] [basic] [attached|switch:both: |post: attached] [align|post: aligned] segment"></div>',
84
97
  stylesheets: [
85
98
  '../lib/components/segment.css'
86
99
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.14.16",
3
+ "version": "0.14.17",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "repository": {
package/ui/image.js CHANGED
@@ -146,7 +146,7 @@ const HTMLElementImageConstructor = Superclass => class extends Superclass {
146
146
  const curSrc = loc.toString();
147
147
  if (curSrc != this.currentSrc) {
148
148
  this.classList.add('loading');
149
- this.#defer?.reject();
149
+ this.#defer?.resolve();
150
150
  this.#defer = new Deferred();
151
151
  img.setAttribute('src', curSrc);
152
152
  return this.#defer;
package/ui/layout.js CHANGED
@@ -56,11 +56,11 @@ class HTMLElementLayout extends Page.create(HTMLDivElement) {
56
56
  } catch(e) {
57
57
  // pass
58
58
  }
59
- this.#defer?.reject();
59
+ this.#defer?.resolve();
60
60
  this.#defer = new Deferred();
61
61
  const img = new Image();
62
62
  img.addEventListener('load', this.#defer.resolve);
63
- img.addEventListener('error', this.#defer.reject);
63
+ img.addEventListener('error', e => this.#defer.reject(new Error(this.currentSrc)));
64
64
  img.src = curSrc;
65
65
  this.style.backgroundImage = `url("${curSrc}")`;
66
66
  return this.#defer;