@pageboard/html 0.14.36 → 0.14.37
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/inlines.js +2 -41
- package/package.json +1 -1
- package/ui/inlines.css +1 -15
package/elements/inlines.js
CHANGED
|
@@ -95,35 +95,7 @@ exports.style = {
|
|
|
95
95
|
group: "inline nolink",
|
|
96
96
|
tag: 'span.style',
|
|
97
97
|
properties: {
|
|
98
|
-
size:
|
|
99
|
-
title: 'Size',
|
|
100
|
-
default: null,
|
|
101
|
-
anyOf: [{
|
|
102
|
-
const: null,
|
|
103
|
-
title: 'Default',
|
|
104
|
-
icon: '<span class="icon">∅</span>'
|
|
105
|
-
}, {
|
|
106
|
-
const: 'tiny',
|
|
107
|
-
title: 'Tiny',
|
|
108
|
-
icon: '<span class="icon char" style="font-size:0.6em;margin-inline:0.6rem">aA</span>'
|
|
109
|
-
}, {
|
|
110
|
-
const: 'small',
|
|
111
|
-
title: 'Small',
|
|
112
|
-
icon: '<span class="icon char" style="font-size:0.8em;margin-inline:0.6rem">aA</span>'
|
|
113
|
-
}, {
|
|
114
|
-
const: 'base',
|
|
115
|
-
title: 'Base',
|
|
116
|
-
icon: '<span class="icon char" style="font-size:1em;margin-inline:0.6rem">aA</span>'
|
|
117
|
-
}, {
|
|
118
|
-
const: 'large',
|
|
119
|
-
title: 'Large',
|
|
120
|
-
icon: '<span class="icon char" style="font-size:1.2em;margin-inline:0.6rem">aA</span>'
|
|
121
|
-
}, {
|
|
122
|
-
const: 'extra',
|
|
123
|
-
title: 'Extra',
|
|
124
|
-
icon: '<span class="icon char" style="font-size:1.6em;margin-inline:0.6rem">aA</span>'
|
|
125
|
-
}]
|
|
126
|
-
},
|
|
98
|
+
size: exports.paragraph.properties.size,
|
|
127
99
|
transform: {
|
|
128
100
|
title: 'Transform',
|
|
129
101
|
default: null,
|
|
@@ -197,18 +169,7 @@ exports.style = {
|
|
|
197
169
|
nullable: true
|
|
198
170
|
}
|
|
199
171
|
},
|
|
200
|
-
parse:
|
|
201
|
-
const data = {};
|
|
202
|
-
for (const [key, schema] of Object.entries(this.properties)) {
|
|
203
|
-
if (schema.anyOf) for (const item of schema.anyOf) {
|
|
204
|
-
if (item.const && dom.classList.contains(item.const)) {
|
|
205
|
-
data[key] = item.const;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
if (dom.translate === false) data.idiom = true;
|
|
210
|
-
return data;
|
|
211
|
-
},
|
|
172
|
+
parse: exports.paragraph.parse,
|
|
212
173
|
html: '<span class="style [size] [transform] [color]" translate="[idiom|alt:no:]"></span>',
|
|
213
174
|
stylesheets: [
|
|
214
175
|
'../ui/inlines.css'
|
package/package.json
CHANGED
package/ui/inlines.css
CHANGED
|
@@ -37,18 +37,4 @@ span.blue {
|
|
|
37
37
|
span.purple {
|
|
38
38
|
color: purple;
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
font-size: 0.5715em;
|
|
42
|
-
}
|
|
43
|
-
span.small {
|
|
44
|
-
font-size: 0.8em;
|
|
45
|
-
}
|
|
46
|
-
span.base {
|
|
47
|
-
font-size: 1.2em;
|
|
48
|
-
}
|
|
49
|
-
span.large {
|
|
50
|
-
font-size: 1.6em;
|
|
51
|
-
}
|
|
52
|
-
span.extra {
|
|
53
|
-
font-size: 2em;
|
|
54
|
-
}
|
|
40
|
+
|