@pageboard/html 0.14.16 → 0.14.18
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.
- package/elements/paragraph.js +14 -1
- package/package.json +1 -1
- package/ui/image.js +2 -2
- package/ui/layout.js +1 -1
package/elements/paragraph.js
CHANGED
|
@@ -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
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?.
|
|
149
|
+
this.#defer?.resolve();
|
|
150
150
|
this.#defer = new Deferred();
|
|
151
151
|
img.setAttribute('src', curSrc);
|
|
152
152
|
return this.#defer;
|
|
@@ -157,7 +157,7 @@ const HTMLElementImageConstructor = Superclass => class extends Superclass {
|
|
|
157
157
|
this.classList.remove('loading');
|
|
158
158
|
}
|
|
159
159
|
captureError(e) {
|
|
160
|
-
this.#defer.reject(
|
|
160
|
+
this.#defer.reject(e);
|
|
161
161
|
this.classList.remove('loading');
|
|
162
162
|
this.classList.add('error');
|
|
163
163
|
this.placeholder(true);
|
package/ui/layout.js
CHANGED
|
@@ -56,7 +56,7 @@ class HTMLElementLayout extends Page.create(HTMLDivElement) {
|
|
|
56
56
|
} catch(e) {
|
|
57
57
|
// pass
|
|
58
58
|
}
|
|
59
|
-
this.#defer?.
|
|
59
|
+
this.#defer?.resolve();
|
|
60
60
|
this.#defer = new Deferred();
|
|
61
61
|
const img = new Image();
|
|
62
62
|
img.addEventListener('load', this.#defer.resolve);
|