@pageboard/html 0.14.17 → 0.14.19
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/card.js +1 -1
- package/elements/form.js +3 -3
- package/elements/grid.js +2 -2
- package/elements/image.js +2 -2
- package/elements/inlines.js +8 -8
- package/elements/layout.js +50 -26
- package/elements/link.js +1 -1
- package/elements/medialist.js +1 -1
- package/elements/menu.js +4 -4
- package/elements/pagination.js +1 -1
- package/package.json +1 -1
- package/ui/image.js +2 -2
- package/ui/layout.css +87 -64
- package/ui/layout.js +1 -1
- package/ui/textarea.js +4 -2
package/elements/card.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.cards = {
|
|
|
10
10
|
properties: {
|
|
11
11
|
columns: {
|
|
12
12
|
title: 'Column count',
|
|
13
|
-
description: 'How many cards should exist in a row
|
|
13
|
+
description: 'How many cards should exist in a row\nzero for unknown',
|
|
14
14
|
type: 'integer',
|
|
15
15
|
minimum: 0,
|
|
16
16
|
default: 0
|
package/elements/form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
exports.query_form = {
|
|
2
|
-
priority: 0, // scripts must run before 'query' scripts
|
|
3
2
|
title: 'Form Query',
|
|
3
|
+
priority: 0, // scripts must run before 'query' scripts
|
|
4
4
|
icon: '<i class="write icon"></i>',
|
|
5
5
|
group: 'block form',
|
|
6
6
|
menu: "form",
|
|
@@ -66,8 +66,8 @@ exports.query_form = {
|
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
exports.api_form = {
|
|
69
|
-
priority: 0, // scripts must run before 'query' scripts
|
|
70
69
|
title: 'Form Submit',
|
|
70
|
+
priority: 0, // scripts must run before 'query' scripts
|
|
71
71
|
icon: '<i class="write icon"></i>',
|
|
72
72
|
group: 'block form',
|
|
73
73
|
menu: "form",
|
|
@@ -79,7 +79,7 @@ exports.api_form = {
|
|
|
79
79
|
properties: {
|
|
80
80
|
name: {
|
|
81
81
|
title: 'Name',
|
|
82
|
-
description:
|
|
82
|
+
description: "Used by query 'submit' or 'toggle'\nExposes /.api/form/$name",
|
|
83
83
|
type: 'string',
|
|
84
84
|
format: 'id',
|
|
85
85
|
nullable: true
|
package/elements/grid.js
CHANGED
|
@@ -36,7 +36,7 @@ exports.grid = {
|
|
|
36
36
|
},
|
|
37
37
|
columns: {
|
|
38
38
|
title: 'Columns Count',
|
|
39
|
-
description: 'Between 1 and 16,
|
|
39
|
+
description: 'Between 1 and 16, 0 for auto\nworks well with doubling',
|
|
40
40
|
type: "integer",
|
|
41
41
|
default: 0,
|
|
42
42
|
minimum: 0,
|
|
@@ -88,7 +88,7 @@ exports.grid_row = {
|
|
|
88
88
|
},
|
|
89
89
|
columns: {
|
|
90
90
|
title: 'Columns Count',
|
|
91
|
-
description: 'Between 1 and 16,
|
|
91
|
+
description: 'Between 1 and 16, 0 for auto\nworks well with doubling',
|
|
92
92
|
type: "integer",
|
|
93
93
|
default: 0,
|
|
94
94
|
minimum: 0,
|
package/elements/image.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.image = {
|
|
|
6
6
|
properties: {
|
|
7
7
|
alt: {
|
|
8
8
|
title: 'Alternative text',
|
|
9
|
-
description: 'Short contextual description
|
|
9
|
+
description: 'Short contextual description.\nLeave empty when used in links.',
|
|
10
10
|
type: "string"
|
|
11
11
|
},
|
|
12
12
|
url: {
|
|
@@ -145,8 +145,8 @@ exports.image = {
|
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
exports.inlineImage = {
|
|
148
|
-
priority: 12,
|
|
149
148
|
title: "Icon",
|
|
149
|
+
priority: 12,
|
|
150
150
|
icon: '<i class="icon image"></i>',
|
|
151
151
|
properties: {
|
|
152
152
|
url: {
|
package/elements/inlines.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
exports.strong = {
|
|
2
|
-
priority: 100,
|
|
3
2
|
title: "Strong",
|
|
3
|
+
priority: 100,
|
|
4
4
|
contents: "text*",
|
|
5
5
|
inplace: true,
|
|
6
6
|
inline: true,
|
|
@@ -11,8 +11,8 @@ exports.strong = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
exports.em = {
|
|
14
|
-
priority: 101,
|
|
15
14
|
title: "Emphasize",
|
|
15
|
+
priority: 101,
|
|
16
16
|
contents: "text*",
|
|
17
17
|
inline: true,
|
|
18
18
|
inplace: true,
|
|
@@ -23,8 +23,8 @@ exports.em = {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
exports.i = {
|
|
26
|
-
priority: 102,
|
|
27
26
|
title: "Italic",
|
|
27
|
+
priority: 102,
|
|
28
28
|
contents: "text*",
|
|
29
29
|
inline: true,
|
|
30
30
|
inplace: true,
|
|
@@ -35,8 +35,8 @@ exports.i = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
exports.light = {
|
|
38
|
-
priority: 103,
|
|
39
38
|
title: "Light",
|
|
39
|
+
priority: 103,
|
|
40
40
|
icon: '<i class="icon" style="font-weight:lighter">L</i>',
|
|
41
41
|
contents: "text*",
|
|
42
42
|
inline: true,
|
|
@@ -46,8 +46,8 @@ exports.light = {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports.sup = {
|
|
49
|
-
priority: 104,
|
|
50
49
|
title: "Sup",
|
|
50
|
+
priority: 104,
|
|
51
51
|
icon: '<i class="superscript icon"></i>',
|
|
52
52
|
contents: "text*",
|
|
53
53
|
inline: true,
|
|
@@ -58,8 +58,8 @@ exports.sup = {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
exports.sub = {
|
|
61
|
-
priority: 105,
|
|
62
61
|
title: "Inf",
|
|
62
|
+
priority: 105,
|
|
63
63
|
icon: '<i class="subscript icon"></i>',
|
|
64
64
|
contents: "text*",
|
|
65
65
|
inline: true,
|
|
@@ -70,8 +70,8 @@ exports.sub = {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
exports.strike = {
|
|
73
|
-
priority: 106,
|
|
74
73
|
title: "Strike",
|
|
74
|
+
priority: 106,
|
|
75
75
|
icon: '<i class="strikethrough icon"></i>',
|
|
76
76
|
contents: "text*",
|
|
77
77
|
inline: true,
|
|
@@ -82,8 +82,8 @@ exports.strike = {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
exports.style = {
|
|
85
|
-
priority: 99,
|
|
86
85
|
title: "Style",
|
|
86
|
+
priority: 99,
|
|
87
87
|
icon: '<i class="paint brush icon"></i>',
|
|
88
88
|
contents: "text*",
|
|
89
89
|
inline: true,
|
package/elements/layout.js
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
exports.units = {
|
|
2
|
+
properties: {
|
|
3
|
+
inline: {
|
|
4
|
+
title: 'Inline units',
|
|
5
|
+
anyOf: [
|
|
6
|
+
{ const: 'em' },
|
|
7
|
+
{ const: 'ch' },
|
|
8
|
+
{ const: 'vw' },
|
|
9
|
+
{ const: 'rem' },
|
|
10
|
+
{ const: 'px' }
|
|
11
|
+
],
|
|
12
|
+
default: 'em',
|
|
13
|
+
$helper: 'units'
|
|
14
|
+
},
|
|
15
|
+
block: {
|
|
16
|
+
title: 'Block units',
|
|
17
|
+
anyOf: [
|
|
18
|
+
{ const: 'rem' },
|
|
19
|
+
{ const: 'ex' },
|
|
20
|
+
{ const: 'vh' },
|
|
21
|
+
{ const: '%' },
|
|
22
|
+
{ const: 'em' },
|
|
23
|
+
{ const: 'px' }
|
|
24
|
+
],
|
|
25
|
+
default: 'rem',
|
|
26
|
+
$helper: 'units'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
1
31
|
exports.layout = {
|
|
2
32
|
title: "Layout",
|
|
3
33
|
icon: '<i class="icon move"></i>',
|
|
@@ -91,24 +121,7 @@ exports.layout = {
|
|
|
91
121
|
default: 0
|
|
92
122
|
},
|
|
93
123
|
heightUnits: {
|
|
94
|
-
|
|
95
|
-
default: 'em',
|
|
96
|
-
anyOf: [{
|
|
97
|
-
title: 'em',
|
|
98
|
-
const: 'em'
|
|
99
|
-
}, {
|
|
100
|
-
title: 'rem',
|
|
101
|
-
const: 'rem'
|
|
102
|
-
}, {
|
|
103
|
-
title: 'px',
|
|
104
|
-
const: 'px'
|
|
105
|
-
}, {
|
|
106
|
-
title: 'vh',
|
|
107
|
-
const: 'vh'
|
|
108
|
-
}, {
|
|
109
|
-
title: '%',
|
|
110
|
-
const: '%'
|
|
111
|
-
}]
|
|
124
|
+
$ref: "#/definitions/units/properties/data/properties/block"
|
|
112
125
|
},
|
|
113
126
|
margins: {
|
|
114
127
|
title: 'Margins',
|
|
@@ -117,25 +130,23 @@ exports.layout = {
|
|
|
117
130
|
properties: {
|
|
118
131
|
inline: {
|
|
119
132
|
title: 'Inline',
|
|
120
|
-
description: 'Units: em',
|
|
121
133
|
type: 'number',
|
|
122
134
|
default: 0,
|
|
123
135
|
multipleOf: 0.01,
|
|
124
136
|
nullable: true
|
|
125
137
|
},
|
|
126
138
|
inlineUnits: {
|
|
127
|
-
|
|
139
|
+
$ref: "#/definitions/units/properties/data/properties/inline"
|
|
128
140
|
},
|
|
129
141
|
block: {
|
|
130
142
|
title: 'Block',
|
|
131
|
-
description: 'Units: rem',
|
|
132
143
|
type: 'number',
|
|
133
144
|
default: 0,
|
|
134
145
|
multipleOf: 0.01,
|
|
135
146
|
nullable: true
|
|
136
147
|
},
|
|
137
148
|
blockUnits: {
|
|
138
|
-
|
|
149
|
+
$ref: "#/definitions/units/properties/data/properties/block"
|
|
139
150
|
}
|
|
140
151
|
}
|
|
141
152
|
},
|
|
@@ -146,7 +157,6 @@ exports.layout = {
|
|
|
146
157
|
properties: {
|
|
147
158
|
inline: {
|
|
148
159
|
title: 'Inline',
|
|
149
|
-
description: 'Units: em',
|
|
150
160
|
type: 'number',
|
|
151
161
|
default: 0,
|
|
152
162
|
minimum: 0,
|
|
@@ -154,11 +164,10 @@ exports.layout = {
|
|
|
154
164
|
nullable: true
|
|
155
165
|
},
|
|
156
166
|
inlineUnits: {
|
|
157
|
-
|
|
167
|
+
$ref: "#/definitions/units/properties/data/properties/inline"
|
|
158
168
|
},
|
|
159
169
|
block: {
|
|
160
170
|
title: 'Block',
|
|
161
|
-
description: 'Units: rem',
|
|
162
171
|
type: 'number',
|
|
163
172
|
default: 0,
|
|
164
173
|
minimum: 0,
|
|
@@ -166,7 +175,21 @@ exports.layout = {
|
|
|
166
175
|
nullable: true
|
|
167
176
|
},
|
|
168
177
|
blockUnits: {
|
|
169
|
-
|
|
178
|
+
$ref: "#/definitions/units/properties/data/properties/block"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
overlay: {
|
|
183
|
+
title: 'Overlay',
|
|
184
|
+
nullable: true,
|
|
185
|
+
properties: {
|
|
186
|
+
inline: {
|
|
187
|
+
title: 'Inline',
|
|
188
|
+
anyOf: [{ const: 'start', title: 'Start' }, { const: 'end', title: 'End' }]
|
|
189
|
+
},
|
|
190
|
+
block: {
|
|
191
|
+
title: 'Block',
|
|
192
|
+
anyOf: [{ const: 'start', title: 'Start' }, { const: 'end', title: 'End' }]
|
|
170
193
|
}
|
|
171
194
|
}
|
|
172
195
|
},
|
|
@@ -337,6 +360,7 @@ exports.layout = {
|
|
|
337
360
|
contents: "block+",
|
|
338
361
|
group: 'block',
|
|
339
362
|
html: `<div class="layout
|
|
363
|
+
[overlay.block|pre:overlay block-] [overlay.inline|pre:overlay inline-]
|
|
340
364
|
[width|switch:full:fullwidth:contained:ui container]
|
|
341
365
|
[horizontal]
|
|
342
366
|
[vertical]
|
package/elements/link.js
CHANGED
package/elements/medialist.js
CHANGED
package/elements/menu.js
CHANGED
|
@@ -79,8 +79,8 @@ exports.menu_group = {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
exports.menu_item_link = {
|
|
82
|
-
priority: 10,
|
|
83
82
|
title: "Inline",
|
|
83
|
+
priority: 10,
|
|
84
84
|
icon: '<b class="icon">Link</b>',
|
|
85
85
|
menu: "link",
|
|
86
86
|
context: "menu//",
|
|
@@ -133,8 +133,8 @@ exports.menu_item_block = { ...exports.menu_item_link,
|
|
|
133
133
|
};
|
|
134
134
|
|
|
135
135
|
exports.menu_item_text = {
|
|
136
|
-
priority: 11,
|
|
137
136
|
title: 'Text',
|
|
137
|
+
priority: 11,
|
|
138
138
|
icon: '<b class="icon">Item</b>',
|
|
139
139
|
menu: "link",
|
|
140
140
|
context: "menu//",
|
|
@@ -154,8 +154,8 @@ exports.menu_item_text = {
|
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
exports.menu_item_dropdown = {
|
|
157
|
-
priority: 11,
|
|
158
157
|
title: "Dropdown",
|
|
158
|
+
priority: 11,
|
|
159
159
|
icon: '<b class="icon">Drop</b>',
|
|
160
160
|
menu: "link",
|
|
161
161
|
context: "menu//",
|
|
@@ -197,8 +197,8 @@ exports.menu_item_dropdown = {
|
|
|
197
197
|
};
|
|
198
198
|
|
|
199
199
|
exports.menu_item_popup = {
|
|
200
|
-
priority: 11,
|
|
201
200
|
title: "Popup",
|
|
201
|
+
priority: 11,
|
|
202
202
|
icon: '<b class="icon">Pop</b>',
|
|
203
203
|
menu: "link",
|
|
204
204
|
context: "menu//",
|
package/elements/pagination.js
CHANGED
package/package.json
CHANGED
package/ui/image.js
CHANGED
|
@@ -153,11 +153,11 @@ const HTMLElementImageConstructor = Superclass => class extends Superclass {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
captureLoad() {
|
|
156
|
-
this.#defer
|
|
156
|
+
this.#defer?.resolve();
|
|
157
157
|
this.classList.remove('loading');
|
|
158
158
|
}
|
|
159
159
|
captureError(e) {
|
|
160
|
-
this.#defer
|
|
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.css
CHANGED
|
@@ -1,71 +1,94 @@
|
|
|
1
1
|
.layout {
|
|
2
2
|
display:flex;
|
|
3
3
|
flex: 0 0 auto;
|
|
4
|
-
|
|
5
|
-
.ui.container.layout {
|
|
6
|
-
display:flex;
|
|
7
|
-
flex: 1 0 auto;
|
|
8
|
-
}
|
|
9
|
-
.layout.wrap {
|
|
10
|
-
flex-wrap:wrap;
|
|
11
|
-
}
|
|
12
|
-
.layout.wrap-reverse {
|
|
13
|
-
flex-wrap:wrap-reverse;
|
|
14
|
-
}
|
|
15
|
-
.layout.column {
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items:stretch;
|
|
18
|
-
}
|
|
19
|
-
.layout.top {
|
|
20
|
-
align-items: flex-start;
|
|
21
|
-
}
|
|
22
|
-
.layout.vcenter {
|
|
23
|
-
align-items: center;
|
|
24
|
-
}
|
|
25
|
-
.layout.vbaseline {
|
|
26
|
-
align-items: baseline;
|
|
27
|
-
}
|
|
28
|
-
.layout.vstretch {
|
|
29
|
-
align-items: stretch;
|
|
30
|
-
}
|
|
31
|
-
.layout.bottom {
|
|
32
|
-
align-items: flex-end;
|
|
33
|
-
}
|
|
34
|
-
.layout.left {
|
|
35
|
-
justify-content: flex-start;
|
|
36
|
-
}
|
|
37
|
-
.layout.hcenter {
|
|
38
|
-
justify-content: center;
|
|
39
|
-
}
|
|
40
|
-
.layout.hbetween {
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
}
|
|
43
|
-
.layout.haround {
|
|
44
|
-
justify-content: space-around;
|
|
45
|
-
}
|
|
46
|
-
.layout.right {
|
|
47
|
-
justify-content: flex-end;
|
|
48
|
-
}
|
|
49
|
-
.layout.column > img,
|
|
50
|
-
.layout.column.left > img {
|
|
51
|
-
align-self:flex-start;
|
|
52
|
-
}
|
|
53
|
-
.layout.column.hcenter > img {
|
|
54
|
-
align-self:center;
|
|
55
|
-
}
|
|
56
|
-
.layout.column.right > img {
|
|
57
|
-
align-self:flex-end;
|
|
58
|
-
}
|
|
4
|
+
position:relative;
|
|
59
5
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
6
|
+
&.overlay {
|
|
7
|
+
position:absolute;
|
|
8
|
+
&.block-start {
|
|
9
|
+
top: 0;
|
|
10
|
+
}
|
|
11
|
+
&.block-end {
|
|
12
|
+
bottom: 0;
|
|
13
|
+
}
|
|
14
|
+
&.inline-start {
|
|
15
|
+
left: 0;
|
|
16
|
+
}
|
|
17
|
+
&.inline-end {
|
|
18
|
+
right: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
63
21
|
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
}
|
|
22
|
+
&.ui.container {
|
|
23
|
+
flex: 1 0 auto;
|
|
24
|
+
}
|
|
67
25
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
26
|
+
&.wrap {
|
|
27
|
+
flex-wrap:wrap;
|
|
28
|
+
}
|
|
71
29
|
|
|
30
|
+
&.wrap-reverse {
|
|
31
|
+
flex-wrap:wrap-reverse;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.column {
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items:stretch;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.top {
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
}
|
|
42
|
+
&.vcenter {
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
&.vbaseline {
|
|
46
|
+
align-items: baseline;
|
|
47
|
+
}
|
|
48
|
+
&.vstretch {
|
|
49
|
+
align-items: stretch;
|
|
50
|
+
}
|
|
51
|
+
&.bottom {
|
|
52
|
+
align-items: flex-end;
|
|
53
|
+
}
|
|
54
|
+
&.left {
|
|
55
|
+
justify-content: flex-start;
|
|
56
|
+
}
|
|
57
|
+
&.hcenter {
|
|
58
|
+
justify-content: center;
|
|
59
|
+
}
|
|
60
|
+
&.hbetween {
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
}
|
|
63
|
+
&.haround {
|
|
64
|
+
justify-content: space-around;
|
|
65
|
+
}
|
|
66
|
+
&.right {
|
|
67
|
+
justify-content: flex-end;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.column {
|
|
71
|
+
& > img,
|
|
72
|
+
&.left > img {
|
|
73
|
+
align-self:flex-start;
|
|
74
|
+
}
|
|
75
|
+
&.hcenter > img {
|
|
76
|
+
align-self:center;
|
|
77
|
+
}
|
|
78
|
+
&.right > img {
|
|
79
|
+
align-self:flex-end;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.fullwidth {
|
|
84
|
+
width:100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.inverted {
|
|
88
|
+
background: rgb(0 0 0 / 80%);
|
|
89
|
+
|
|
90
|
+
p {
|
|
91
|
+
color: white;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
package/ui/layout.js
CHANGED
|
@@ -60,7 +60,7 @@ class HTMLElementLayout extends Page.create(HTMLDivElement) {
|
|
|
60
60
|
this.#defer = new Deferred();
|
|
61
61
|
const img = new Image();
|
|
62
62
|
img.addEventListener('load', this.#defer.resolve);
|
|
63
|
-
img.addEventListener('error',
|
|
63
|
+
img.addEventListener('error', this.#defer.reject);
|
|
64
64
|
img.src = curSrc;
|
|
65
65
|
this.style.backgroundImage = `url("${curSrc}")`;
|
|
66
66
|
return this.#defer;
|
package/ui/textarea.js
CHANGED
|
@@ -13,8 +13,10 @@ class HTMLElementTextArea extends Page.create(HTMLTextAreaElement) {
|
|
|
13
13
|
delete this.style.height;
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
requestAnimationFrame(() => {
|
|
17
|
+
this.style.height = 0;
|
|
18
|
+
this.style.height = `calc(${this.scrollHeight}px + 1em)`;
|
|
19
|
+
});
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
|