bestax-migrate 2.25.4 → 2.25.6
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/dist/sources/_shared/html/attributes.d.ts +96 -0
- package/dist/sources/_shared/html/attributes.d.ts.map +1 -0
- package/dist/sources/_shared/html/attributes.js +313 -0
- package/dist/sources/_shared/html/emit.d.ts +49 -0
- package/dist/sources/_shared/html/emit.d.ts.map +1 -0
- package/dist/sources/_shared/html/emit.js +355 -0
- package/dist/sources/_shared/html/parse.d.ts +54 -0
- package/dist/sources/_shared/html/parse.d.ts.map +1 -0
- package/dist/sources/_shared/html/parse.js +85 -0
- package/dist/sources/_shared/html/style.d.ts +61 -0
- package/dist/sources/_shared/html/style.d.ts.map +1 -0
- package/dist/sources/_shared/html/style.js +185 -0
- package/dist/sources/_shared/html/text.d.ts +43 -0
- package/dist/sources/_shared/html/text.d.ts.map +1 -0
- package/dist/sources/_shared/html/text.js +120 -0
- package/dist/sources/_shared/html/whitespace.d.ts +80 -0
- package/dist/sources/_shared/html/whitespace.d.ts.map +1 -0
- package/dist/sources/_shared/html/whitespace.js +409 -0
- package/dist/sources/bulma-classes/class-map.d.ts +3 -1
- package/dist/sources/bulma-classes/class-map.d.ts.map +1 -1
- package/dist/sources/bulma-classes/class-map.js +8 -1
- package/dist/sources/bulma-classes/display.d.ts +74 -0
- package/dist/sources/bulma-classes/display.d.ts.map +1 -0
- package/dist/sources/bulma-classes/display.js +215 -0
- package/dist/sources/bulma-classes/plan.js +7 -0
- package/dist/sources/bulma-classes/rules.d.ts.map +1 -1
- package/dist/sources/bulma-classes/rules.js +5 -0
- package/dist/sources/rbx/mapping.js +1 -1
- package/dist/sources/react-bulma-components/mapping.js +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which whitespace in an HTML tree renders, decided the way CSS lays it out.
|
|
3
|
+
*
|
|
4
|
+
* JSX has whitespace rules of its own, and they are not CSS's: it keeps a
|
|
5
|
+
* space between two tags on one line and drops every run with a line break
|
|
6
|
+
* in it. So the emitter needs to know, for each run of whitespace in the
|
|
7
|
+
* HTML, whether it renders at all. Inside `<pre>`, `<textarea>` and
|
|
8
|
+
* `<listing>`, under an inline `white-space` that preserves it, and in a
|
|
9
|
+
* script or a stylesheet, every character is kept exactly. Elsewhere a run
|
|
10
|
+
* is one space, and it renders nothing:
|
|
11
|
+
*
|
|
12
|
+
* - at the start or end of a line: the start or end of a block container,
|
|
13
|
+
* or beside a block-level box or a `<br>`, seen through inline elements;
|
|
14
|
+
* - right after another space, which it collapses into;
|
|
15
|
+
* - inside a flex or grid container, a `<select>`, `<head>` or `<html>`,
|
|
16
|
+
* where every child is a box of its own, so a text's edges are line
|
|
17
|
+
* edges too;
|
|
18
|
+
* - between the shapes of an SVG or MathML drawing, outside its text.
|
|
19
|
+
*
|
|
20
|
+
* A table, its rows, groups, cells and captions are block-level boxes and
|
|
21
|
+
* block containers, so a run between two of them renders nothing (the first
|
|
22
|
+
* rule). Inline content in a table, which only CSS can put there, sits in an
|
|
23
|
+
* anonymous cell, and a run inside it renders as it does in any block.
|
|
24
|
+
*
|
|
25
|
+
* Comments and `display: none` boxes render nothing, so a run is judged by
|
|
26
|
+
* what is beside them. An element's display comes from `displayOf`; the
|
|
27
|
+
* default reads an inline `style` and then the HTML UA stylesheet, which is
|
|
28
|
+
* where it stops: a page's own CSS can change any display, and the honest
|
|
29
|
+
* limit is that this reads no CSS file.
|
|
30
|
+
*/
|
|
31
|
+
import { childrenOf, isComment, isElement, isText, } from './parse.js';
|
|
32
|
+
import { applied, readStyle } from './style.js';
|
|
33
|
+
const HTML = 'http://www.w3.org/1999/xhtml';
|
|
34
|
+
/** ASCII whitespace, the only kind CSS collapses (not ` `). */
|
|
35
|
+
const RUNS = /[ \t\n\f\r]+|[^ \t\n\f\r]+/g;
|
|
36
|
+
const BLANK = /^[ \t\n\f\r]/;
|
|
37
|
+
/**
|
|
38
|
+
* Elements whose text is kept exactly: preformatted by the UA stylesheet, or
|
|
39
|
+
* raw text (a script, a stylesheet), which isn't text to lay out at all.
|
|
40
|
+
*/
|
|
41
|
+
const PREFORMATTED = new Set([
|
|
42
|
+
'pre',
|
|
43
|
+
'textarea',
|
|
44
|
+
'listing',
|
|
45
|
+
'xmp',
|
|
46
|
+
'plaintext',
|
|
47
|
+
'script',
|
|
48
|
+
'style',
|
|
49
|
+
'iframe',
|
|
50
|
+
'noembed',
|
|
51
|
+
'noframes',
|
|
52
|
+
]);
|
|
53
|
+
/** Elements whose children are each a box, whatever their display. */
|
|
54
|
+
const BOXES_ONLY = new Set(['select', 'datalist', 'optgroup', 'head', 'html']);
|
|
55
|
+
/** Foreign elements that hold text, which flows as it does in HTML. */
|
|
56
|
+
const FOREIGN_TEXT = new Set([
|
|
57
|
+
'text',
|
|
58
|
+
'tspan',
|
|
59
|
+
'textPath',
|
|
60
|
+
'title',
|
|
61
|
+
'desc',
|
|
62
|
+
'mi',
|
|
63
|
+
'mn',
|
|
64
|
+
'mo',
|
|
65
|
+
'ms',
|
|
66
|
+
'mtext',
|
|
67
|
+
]);
|
|
68
|
+
const FOREIGN_INLINE_TEXT = new Set(['tspan', 'textPath']);
|
|
69
|
+
/** Tags the UA stylesheet hides. */
|
|
70
|
+
const UA_NONE = new Set([
|
|
71
|
+
'area',
|
|
72
|
+
'base',
|
|
73
|
+
'basefont',
|
|
74
|
+
'datalist',
|
|
75
|
+
'head',
|
|
76
|
+
'link',
|
|
77
|
+
'meta',
|
|
78
|
+
'noembed',
|
|
79
|
+
'noframes',
|
|
80
|
+
'noscript',
|
|
81
|
+
'param',
|
|
82
|
+
'rp',
|
|
83
|
+
'script',
|
|
84
|
+
'style',
|
|
85
|
+
'template',
|
|
86
|
+
'title',
|
|
87
|
+
]);
|
|
88
|
+
/** Tags the UA stylesheet gives a display other than `inline`. */
|
|
89
|
+
const UA_DISPLAY = {
|
|
90
|
+
html: 'block',
|
|
91
|
+
body: 'block',
|
|
92
|
+
...Object.fromEntries([
|
|
93
|
+
'address',
|
|
94
|
+
'blockquote',
|
|
95
|
+
'center',
|
|
96
|
+
'dialog',
|
|
97
|
+
'div',
|
|
98
|
+
'figure',
|
|
99
|
+
'figcaption',
|
|
100
|
+
'footer',
|
|
101
|
+
'form',
|
|
102
|
+
'header',
|
|
103
|
+
'hr',
|
|
104
|
+
'legend',
|
|
105
|
+
'listing',
|
|
106
|
+
'main',
|
|
107
|
+
'p',
|
|
108
|
+
'plaintext',
|
|
109
|
+
'pre',
|
|
110
|
+
'search',
|
|
111
|
+
'xmp',
|
|
112
|
+
'article',
|
|
113
|
+
'aside',
|
|
114
|
+
'h1',
|
|
115
|
+
'h2',
|
|
116
|
+
'h3',
|
|
117
|
+
'h4',
|
|
118
|
+
'h5',
|
|
119
|
+
'h6',
|
|
120
|
+
'hgroup',
|
|
121
|
+
'nav',
|
|
122
|
+
'section',
|
|
123
|
+
'dir',
|
|
124
|
+
'dd',
|
|
125
|
+
'dl',
|
|
126
|
+
'dt',
|
|
127
|
+
'menu',
|
|
128
|
+
'ol',
|
|
129
|
+
'ul',
|
|
130
|
+
'fieldset',
|
|
131
|
+
'details',
|
|
132
|
+
'optgroup',
|
|
133
|
+
'option',
|
|
134
|
+
'frameset',
|
|
135
|
+
'frame',
|
|
136
|
+
].map(tag => [tag, 'block'])),
|
|
137
|
+
li: 'list-item',
|
|
138
|
+
summary: 'list-item',
|
|
139
|
+
table: 'table',
|
|
140
|
+
caption: 'table-caption',
|
|
141
|
+
colgroup: 'table-column-group',
|
|
142
|
+
col: 'table-column',
|
|
143
|
+
thead: 'table-header-group',
|
|
144
|
+
tbody: 'table-row-group',
|
|
145
|
+
tfoot: 'table-footer-group',
|
|
146
|
+
tr: 'table-row',
|
|
147
|
+
td: 'table-cell',
|
|
148
|
+
th: 'table-cell',
|
|
149
|
+
input: 'inline-block',
|
|
150
|
+
button: 'inline-block',
|
|
151
|
+
select: 'inline-block',
|
|
152
|
+
textarea: 'inline-block',
|
|
153
|
+
meter: 'inline-block',
|
|
154
|
+
progress: 'inline-block',
|
|
155
|
+
marquee: 'inline-block',
|
|
156
|
+
ruby: 'ruby',
|
|
157
|
+
rt: 'ruby-text',
|
|
158
|
+
};
|
|
159
|
+
function attribute(element, name) {
|
|
160
|
+
return element.attrs.find(attr => attr.name === name && !attr.prefix)?.value;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The value an element's inline `style` gives a property, picked as the
|
|
164
|
+
* written style object picks it (`style.ts`), so the two never disagree.
|
|
165
|
+
*/
|
|
166
|
+
function inlineStyle(element, property) {
|
|
167
|
+
const style = attribute(element, 'style');
|
|
168
|
+
if (style === undefined)
|
|
169
|
+
return undefined;
|
|
170
|
+
return applied(readStyle(style).declarations)
|
|
171
|
+
.get(property)
|
|
172
|
+
?.value.toLowerCase();
|
|
173
|
+
}
|
|
174
|
+
/** The display an element's own `style` attribute gives it. */
|
|
175
|
+
export function inlineStyleDisplay(element) {
|
|
176
|
+
return inlineStyle(element, 'display');
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The display the HTML spec's UA stylesheet gives an element: by its tag,
|
|
180
|
+
* and `none` for what it hides by attribute (`[hidden]`, a hidden input, a
|
|
181
|
+
* closed dialog). Undefined for an element in another namespace.
|
|
182
|
+
*/
|
|
183
|
+
export function uaDisplay(element) {
|
|
184
|
+
if (element.namespaceURI !== HTML)
|
|
185
|
+
return undefined;
|
|
186
|
+
const tag = element.tagName;
|
|
187
|
+
const hidden = attribute(element, 'hidden');
|
|
188
|
+
if (hidden !== undefined && hidden.toLowerCase() !== 'until-found') {
|
|
189
|
+
return 'none';
|
|
190
|
+
}
|
|
191
|
+
if (tag === 'input' &&
|
|
192
|
+
attribute(element, 'type')?.toLowerCase() === 'hidden') {
|
|
193
|
+
return 'none';
|
|
194
|
+
}
|
|
195
|
+
if (tag === 'dialog' && attribute(element, 'open') === undefined) {
|
|
196
|
+
return 'none';
|
|
197
|
+
}
|
|
198
|
+
if (UA_NONE.has(tag))
|
|
199
|
+
return 'none';
|
|
200
|
+
return UA_DISPLAY[tag] ?? 'inline';
|
|
201
|
+
}
|
|
202
|
+
/** The keywords a `display` value is made of. */
|
|
203
|
+
const DISPLAY_KEYWORDS = /^(?:none|contents|block|inline|run-in|flow|flow-root|table|flex|grid|ruby|list-item|inline-(?:block|table|flex|grid|list-item)|table-(?:row-group|header-group|footer-group|row|cell|column-group|column|caption)|ruby-(?:base|text|base-container|text-container))$/;
|
|
204
|
+
/**
|
|
205
|
+
* An inline `display`, when it is one CSS reads (otherwise the declaration
|
|
206
|
+
* is ignored), else the UA stylesheet's.
|
|
207
|
+
*/
|
|
208
|
+
export const defaultDisplayOf = element => {
|
|
209
|
+
const inline = inlineStyleDisplay(element);
|
|
210
|
+
const valid = inline !== undefined &&
|
|
211
|
+
inline.split(/\s+/).every(word => DISPLAY_KEYWORDS.test(word));
|
|
212
|
+
return valid ? inline : uaDisplay(element);
|
|
213
|
+
};
|
|
214
|
+
function boxOfDisplay(display) {
|
|
215
|
+
const words = (display ?? 'inline').trim().split(/\s+/);
|
|
216
|
+
const has = (...names) => names.some(name => words.includes(name));
|
|
217
|
+
if (has('none'))
|
|
218
|
+
return { outer: 'none', inner: 'block' };
|
|
219
|
+
const inline = has('inline') || words.some(word => word.startsWith('inline-'));
|
|
220
|
+
const boxes = words.some(word => /(?:^|-)(?:flex|grid)$/.test(word));
|
|
221
|
+
// A table and every part of one is a block among its siblings, and holds
|
|
222
|
+
// its content in lines of its own.
|
|
223
|
+
const table = words.some(word => /^(?:inline-)?table(?:-|$)/.test(word));
|
|
224
|
+
const block = boxes ||
|
|
225
|
+
table ||
|
|
226
|
+
has('block', 'flow-root', 'list-item') ||
|
|
227
|
+
words.some(word => word.startsWith('inline-'));
|
|
228
|
+
return {
|
|
229
|
+
outer: inline ? 'inline' : block ? 'block' : 'inline',
|
|
230
|
+
inner: boxes ? 'boxes' : block ? 'block' : 'inline',
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function boxOf(element, displayOf) {
|
|
234
|
+
const tag = element.tagName;
|
|
235
|
+
if (element.namespaceURI !== HTML) {
|
|
236
|
+
// An SVG or MathML root sits in HTML as an inline box; inside one, only
|
|
237
|
+
// text elements hold text.
|
|
238
|
+
const root = tag === 'svg' || tag === 'math';
|
|
239
|
+
const display = root ? (displayOf(element) ?? 'inline') : undefined;
|
|
240
|
+
const outer = display !== undefined
|
|
241
|
+
? boxOfDisplay(display).outer
|
|
242
|
+
: FOREIGN_INLINE_TEXT.has(tag)
|
|
243
|
+
? 'inline'
|
|
244
|
+
: 'block';
|
|
245
|
+
const inner = tag === 'foreignObject'
|
|
246
|
+
? 'block'
|
|
247
|
+
: FOREIGN_TEXT.has(tag)
|
|
248
|
+
? FOREIGN_INLINE_TEXT.has(tag)
|
|
249
|
+
? 'inline'
|
|
250
|
+
: 'block'
|
|
251
|
+
: 'boxes';
|
|
252
|
+
return { outer, inner, exact: tag === 'style' || tag === 'script' };
|
|
253
|
+
}
|
|
254
|
+
const { outer, inner } = boxOfDisplay(displayOf(element));
|
|
255
|
+
const space = inlineStyle(element, 'white-space');
|
|
256
|
+
return {
|
|
257
|
+
outer,
|
|
258
|
+
inner: BOXES_ONLY.has(tag) ? 'boxes' : inner,
|
|
259
|
+
exact: PREFORMATTED.has(tag) ||
|
|
260
|
+
(space !== undefined && !/^(?:normal|nowrap)$/.test(space)),
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
const BLOCK_FLOW = { before: 'line', endsLine: true };
|
|
264
|
+
/** The line a text node's run starts on, `offset` characters in. */
|
|
265
|
+
function lineAt(node, offset) {
|
|
266
|
+
const start = node.sourceCodeLocation?.startLine;
|
|
267
|
+
if (start === undefined)
|
|
268
|
+
return null;
|
|
269
|
+
return start + (node.value.slice(0, offset).match(/\n/g)?.length ?? 0);
|
|
270
|
+
}
|
|
271
|
+
function tokensOf(parent, inner, displayOf) {
|
|
272
|
+
const tokens = [];
|
|
273
|
+
for (const child of childrenOf(parent)) {
|
|
274
|
+
if (isText(child)) {
|
|
275
|
+
for (const match of child.value.matchAll(RUNS)) {
|
|
276
|
+
const line = lineAt(child, match.index);
|
|
277
|
+
tokens.push(BLANK.test(match[0])
|
|
278
|
+
? { kind: 'space', text: match[0], line }
|
|
279
|
+
: { kind: 'word', text: match[0], line });
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
else if (isElement(child)) {
|
|
283
|
+
const box = boxOf(child, displayOf);
|
|
284
|
+
// Among boxes every child is one, and a `<br>` ends a line as a block
|
|
285
|
+
// does, whatever its display says.
|
|
286
|
+
if (box.outer === 'inline' &&
|
|
287
|
+
(inner === 'boxes' || child.tagName === 'br')) {
|
|
288
|
+
box.outer = 'block';
|
|
289
|
+
}
|
|
290
|
+
tokens.push({ kind: 'node', node: child, box });
|
|
291
|
+
}
|
|
292
|
+
else if (isComment(child)) {
|
|
293
|
+
tokens.push({ kind: 'comment', node: child });
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return tokens;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Every element's and fragment's children as pieces, from `root` down.
|
|
300
|
+
* `root` is laid out as a block container, as a page's body is.
|
|
301
|
+
*/
|
|
302
|
+
export function layoutWhitespace(root, displayOf = defaultDisplayOf) {
|
|
303
|
+
const out = new Map();
|
|
304
|
+
const exactly = (parent) => {
|
|
305
|
+
const pieces = [];
|
|
306
|
+
for (const child of childrenOf(parent)) {
|
|
307
|
+
if (isText(child)) {
|
|
308
|
+
pieces.push({
|
|
309
|
+
kind: 'exact',
|
|
310
|
+
text: child.value,
|
|
311
|
+
line: lineAt(child, 0),
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
else if (isElement(child) || isComment(child)) {
|
|
315
|
+
pieces.push({ kind: 'node', node: child });
|
|
316
|
+
if (isElement(child))
|
|
317
|
+
exactly(child);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
out.set(parent, pieces);
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* Lay out a parent's children. Returns what ends its content's line, or
|
|
324
|
+
* null when nothing in it moved the line along.
|
|
325
|
+
*/
|
|
326
|
+
const layout = (parent, inner, flow) => {
|
|
327
|
+
if (inner !== 'inline')
|
|
328
|
+
flow = BLOCK_FLOW;
|
|
329
|
+
const tokens = tokensOf(parent, inner, displayOf);
|
|
330
|
+
// Right to left: a run is dropped when its line ends after it.
|
|
331
|
+
const endsLine = new Map();
|
|
332
|
+
let ending = flow.endsLine;
|
|
333
|
+
for (let i = tokens.length - 1; i >= 0; i--) {
|
|
334
|
+
const token = tokens[i];
|
|
335
|
+
if (token.kind === 'word') {
|
|
336
|
+
ending = false;
|
|
337
|
+
}
|
|
338
|
+
else if (token.kind === 'space') {
|
|
339
|
+
token.dropped = ending;
|
|
340
|
+
}
|
|
341
|
+
else if (token.kind === 'node' && token.box.outer === 'block') {
|
|
342
|
+
ending = true;
|
|
343
|
+
}
|
|
344
|
+
else if (token.kind === 'node' && token.box.outer === 'inline') {
|
|
345
|
+
endsLine.set(token.node, ending);
|
|
346
|
+
ending = false;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
// Left to right: and when its line starts before it, or a space does.
|
|
350
|
+
const pieces = [];
|
|
351
|
+
let before = flow.before;
|
|
352
|
+
let moved = false;
|
|
353
|
+
for (const token of tokens) {
|
|
354
|
+
if (token.kind === 'word') {
|
|
355
|
+
pieces.push(token);
|
|
356
|
+
before = 'content';
|
|
357
|
+
moved = true;
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
if (token.kind === 'space') {
|
|
361
|
+
const kept = !token.dropped && before === 'content';
|
|
362
|
+
pieces.push({
|
|
363
|
+
kind: 'space',
|
|
364
|
+
kept,
|
|
365
|
+
newlines: token.text.match(/\n/g)?.length ?? 0,
|
|
366
|
+
line: token.line,
|
|
367
|
+
});
|
|
368
|
+
if (kept) {
|
|
369
|
+
before = 'space';
|
|
370
|
+
moved = true;
|
|
371
|
+
}
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
pieces.push({ kind: 'node', node: token.node });
|
|
375
|
+
if (token.kind === 'comment')
|
|
376
|
+
continue;
|
|
377
|
+
const { node, box } = token;
|
|
378
|
+
if (box.exact) {
|
|
379
|
+
exactly(node);
|
|
380
|
+
}
|
|
381
|
+
else if (box.outer === 'inline' && box.inner === 'inline') {
|
|
382
|
+
const after = layout(node, 'inline', {
|
|
383
|
+
before,
|
|
384
|
+
endsLine: endsLine.get(node),
|
|
385
|
+
});
|
|
386
|
+
// An inline element with nothing in it can still show something (an
|
|
387
|
+
// icon font's glyph), so the line moves past it either way.
|
|
388
|
+
before = after ?? 'content';
|
|
389
|
+
moved = true;
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
layout(node, box.inner, BLOCK_FLOW);
|
|
394
|
+
}
|
|
395
|
+
if (box.outer === 'block') {
|
|
396
|
+
before = 'line';
|
|
397
|
+
moved = true;
|
|
398
|
+
}
|
|
399
|
+
else if (box.outer === 'inline') {
|
|
400
|
+
before = 'content';
|
|
401
|
+
moved = true;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
out.set(parent, pieces);
|
|
405
|
+
return moved ? before : null;
|
|
406
|
+
};
|
|
407
|
+
layout(root, 'block', BLOCK_FLOW);
|
|
408
|
+
return out;
|
|
409
|
+
}
|
|
@@ -38,7 +38,9 @@ export interface Modifier {
|
|
|
38
38
|
/**
|
|
39
39
|
* The prop renders this attribute too, unless the element sets its own
|
|
40
40
|
* (`Pagination.Link`'s `active` and `aria-current`), so the class converts
|
|
41
|
-
* only beside one written out, and stays a class otherwise.
|
|
41
|
+
* only beside one written out, and stays a class otherwise. On a child the
|
|
42
|
+
* target renders itself (`Menu.Item`'s `<a>`), there is no class to keep,
|
|
43
|
+
* so the element stays markup instead.
|
|
42
44
|
*/
|
|
43
45
|
readonly needsAttr?: {
|
|
44
46
|
readonly name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-map.d.ts","sourceRoot":"","sources":["../../../src/sources/bulma-classes/class-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,MAAM,GAChB;IAAE,QAAQ,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAE9E,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B
|
|
1
|
+
{"version":3,"file":"class-map.d.ts","sourceRoot":"","sources":["../../../src/sources/bulma-classes/class-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,MAAM,GAChB;IAAE,QAAQ,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG;IA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EZ,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;CAC3B;AA6DD,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAqHzD,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,CAS3C,CAAC;AAIH;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAyCA,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEnE;AAiBD,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE5D;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE7D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAGlE;AAED,qCAAqC;AACrC,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,MAAM,GACZ,QAAQ,GAAG,SAAS,CAEtB;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5D;AAED,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1D"}
|
|
@@ -1825,6 +1825,8 @@ function plain(why) {
|
|
|
1825
1825
|
export const PLACED = {
|
|
1826
1826
|
// `Menu.Item` renders the `<li>` and the `<a>` inside it together. Its
|
|
1827
1827
|
// helper props go on the `<a>`, so the `<li>`'s classes all stay classes.
|
|
1828
|
+
// `active` writes `aria-current="page"` on the `<a>` unless it has its own,
|
|
1829
|
+
// as `Pagination.Link`'s does.
|
|
1828
1830
|
'menu-list': {
|
|
1829
1831
|
...BASE,
|
|
1830
1832
|
target: 'Menu.Item',
|
|
@@ -1837,7 +1839,12 @@ export const PLACED = {
|
|
|
1837
1839
|
tag: 'a',
|
|
1838
1840
|
attributesOn: 'split',
|
|
1839
1841
|
elementProps: ['id', 'title', 'role', 'tabIndex', 'style', 'data-testid'],
|
|
1840
|
-
modifiers:
|
|
1842
|
+
modifiers: {
|
|
1843
|
+
'is-active': {
|
|
1844
|
+
writes: [{ prop: 'active' }],
|
|
1845
|
+
needsAttr: { name: 'aria-current', value: 'page' },
|
|
1846
|
+
},
|
|
1847
|
+
},
|
|
1841
1848
|
after: { tag: 'ul', target: 'Menu.List' },
|
|
1842
1849
|
},
|
|
1843
1850
|
ownProps: ['as', 'active'],
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The display Bulma's stylesheet gives an element, for the HTML input's
|
|
3
|
+
* whitespace. A whitespace-only run beside a block, flex or grid box renders
|
|
4
|
+
* nothing, so the converter can drop it, while one between inline boxes can
|
|
5
|
+
* be a space the page shows. The tag's own display is the converter's to
|
|
6
|
+
* know; this is what Bulma's classes make of it.
|
|
7
|
+
*
|
|
8
|
+
* Answered from the element's own tag and classes, so a rule that reaches it
|
|
9
|
+
* through an ancestor (`.tabs li`) or a state (`:hover`) is out of reach, as
|
|
10
|
+
* is the page's own CSS. `e2e/bulma-classes-display.test.ts` holds both
|
|
11
|
+
* tables to `bulma.css`, in both directions.
|
|
12
|
+
*
|
|
13
|
+
* Apart from `class-map.ts` because nothing here converts anything, and the
|
|
14
|
+
* MCP index and the ESLint plugin's metadata are generated from that table.
|
|
15
|
+
*/
|
|
16
|
+
export type BulmaDisplay = 'block' | 'flex' | 'grid' | 'inline' | 'inline-block' | 'inline-flex' | 'none';
|
|
17
|
+
/**
|
|
18
|
+
* A selector a media query gives a display other than its own: `base` is the
|
|
19
|
+
* one it has outside media queries, absent where it sets none (so the tag's
|
|
20
|
+
* holds), and `media` the one some viewports give it instead.
|
|
21
|
+
*/
|
|
22
|
+
export interface VaryingDisplay {
|
|
23
|
+
readonly base?: BulmaDisplay;
|
|
24
|
+
readonly media: BulmaDisplay;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Bulma's element and component rules that set a display, by selector: the
|
|
28
|
+
* classes all on the one element, after a tag where the rule names one
|
|
29
|
+
* (`div.icon-text`), with any class it must not have (`:not(.is-desktop)`).
|
|
30
|
+
* A plain display holds at every viewport; a media rule that restates it
|
|
31
|
+
* changes nothing.
|
|
32
|
+
*/
|
|
33
|
+
export declare const COMPONENT_DISPLAY: Readonly<Record<string, BulmaDisplay | VaryingDisplay>>;
|
|
34
|
+
/**
|
|
35
|
+
* The display helpers' rules, which are `!important`: each helper at every
|
|
36
|
+
* viewport, and its variant for each viewport (`is-flex-tablet`) at that one
|
|
37
|
+
* only.
|
|
38
|
+
*/
|
|
39
|
+
export declare const HELPER_DISPLAY: Readonly<Record<string, BulmaDisplay | VaryingDisplay>>;
|
|
40
|
+
export interface DisplayRule {
|
|
41
|
+
readonly tag: string | undefined;
|
|
42
|
+
readonly classes: readonly string[];
|
|
43
|
+
readonly without: readonly string[];
|
|
44
|
+
readonly display: BulmaDisplay;
|
|
45
|
+
readonly media: boolean;
|
|
46
|
+
/** `!important`, then classes, then a tag, as the cascade weighs them. */
|
|
47
|
+
readonly weight: number;
|
|
48
|
+
}
|
|
49
|
+
/** A display table's selectors, read as the rules the lookup weighs. */
|
|
50
|
+
export declare function rulesOf(table: Readonly<Record<string, BulmaDisplay | VaryingDisplay>>, important: boolean): DisplayRule[];
|
|
51
|
+
/**
|
|
52
|
+
* Every display Bulma's rules can give an element across viewports, or
|
|
53
|
+
* undefined when no rule sets one, so the tag's own holds. A set of one holds
|
|
54
|
+
* at every viewport. An `undefined` in the set stands for the tag's own at
|
|
55
|
+
* the viewports no rule reaches: `.columns` is the tag's on mobile and flex
|
|
56
|
+
* from tablet up.
|
|
57
|
+
*
|
|
58
|
+
* Weighed as the cascade weighs these selectors: an `!important` helper
|
|
59
|
+
* beats any component rule (`button is-block` is block), then the selector
|
|
60
|
+
* with more classes (`button is-fullwidth` is flex), then the one naming a
|
|
61
|
+
* tag. A media rule as weighty as the winner or more adds its display. Two
|
|
62
|
+
* equally weighty rules that disagree (`is-hidden is-flex`) both count,
|
|
63
|
+
* since only the stylesheet's order would settle them, and the tables don't
|
|
64
|
+
* keep it. So the set can hold a display the element never takes, but never
|
|
65
|
+
* misses one its own tag and classes give it, and whitespace beside the
|
|
66
|
+
* element can go when every display in the set drops it.
|
|
67
|
+
*
|
|
68
|
+
* `none` is no box at all (`.modal` until it is active), so a run beside one
|
|
69
|
+
* is beside whatever is past it. And these are displays alone: a box a rule
|
|
70
|
+
* also takes out of the flow (`.modal`'s `position: fixed`) still reads as
|
|
71
|
+
* its display here, though a run beside it is beside its neighbours.
|
|
72
|
+
*/
|
|
73
|
+
export declare function bulmaDisplay(tag: string, classes: Iterable<string>): ReadonlySet<BulmaDisplay | undefined> | undefined;
|
|
74
|
+
//# sourceMappingURL=display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../src/sources/bulma-classes/display.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,cAAc,GACd,aAAa,GACb,MAAM,CAAC;AAEX;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,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