@webstudio-is/css-data 0.60.0 → 0.62.0

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/lib/html.js ADDED
@@ -0,0 +1,501 @@
1
+ const displayBlock = {
2
+ property: "display",
3
+ value: { type: "keyword", value: "block" }
4
+ };
5
+ const mt1em = {
6
+ property: "marginTop",
7
+ value: { type: "unit", value: 1, unit: "em" }
8
+ };
9
+ const mb1em = {
10
+ property: "marginBottom",
11
+ value: { type: "unit", value: 1, unit: "em" }
12
+ };
13
+ const ml40px = {
14
+ property: "marginLeft",
15
+ value: { type: "unit", value: 40, unit: "px" }
16
+ };
17
+ const mr40px = {
18
+ property: "marginRight",
19
+ value: { type: "unit", value: 40, unit: "px" }
20
+ };
21
+ const pl40px = {
22
+ property: "paddingLeft",
23
+ value: { type: "unit", value: 40, unit: "px" }
24
+ };
25
+ const fontWeightBold = {
26
+ property: "fontWeight",
27
+ // in browsers defined as bold
28
+ // though builder accepts only numeric values
29
+ value: { type: "keyword", value: "700" }
30
+ };
31
+ const fontStyleItalic = {
32
+ property: "fontStyle",
33
+ value: { type: "keyword", value: "italic" }
34
+ };
35
+ const pt1px = {
36
+ property: "paddingTop",
37
+ value: { type: "unit", value: 1, unit: "px" }
38
+ };
39
+ const pr1px = {
40
+ property: "paddingRight",
41
+ value: { type: "unit", value: 1, unit: "px" }
42
+ };
43
+ const pb1px = {
44
+ property: "paddingBottom",
45
+ value: { type: "unit", value: 1, unit: "px" }
46
+ };
47
+ const pl1px = {
48
+ property: "paddingLeft",
49
+ value: { type: "unit", value: 1, unit: "px" }
50
+ };
51
+ const article = [displayBlock];
52
+ const body = [
53
+ displayBlock,
54
+ {
55
+ property: "marginTop",
56
+ value: { type: "unit", value: 8, unit: "px" }
57
+ },
58
+ {
59
+ property: "marginRight",
60
+ value: { type: "unit", value: 8, unit: "px" }
61
+ },
62
+ {
63
+ property: "marginBottom",
64
+ value: { type: "unit", value: 8, unit: "px" }
65
+ },
66
+ {
67
+ property: "marginLeft",
68
+ value: { type: "unit", value: 8, unit: "px" }
69
+ }
70
+ ];
71
+ const p = [displayBlock, mt1em, mb1em];
72
+ const dd = [displayBlock, ml40px];
73
+ const blockquote = [displayBlock, mt1em, mb1em, ml40px, mr40px];
74
+ const address = [displayBlock, fontStyleItalic];
75
+ const h1 = [
76
+ displayBlock,
77
+ fontWeightBold,
78
+ {
79
+ property: "fontSize",
80
+ value: { type: "unit", value: 2, unit: "em" }
81
+ },
82
+ {
83
+ property: "marginTop",
84
+ value: { type: "unit", value: 0.67, unit: "em" }
85
+ },
86
+ {
87
+ property: "marginBottom",
88
+ value: { type: "unit", value: 0.67, unit: "em" }
89
+ }
90
+ ];
91
+ const h2 = [
92
+ displayBlock,
93
+ fontWeightBold,
94
+ {
95
+ property: "fontSize",
96
+ value: { type: "unit", value: 1.5, unit: "em" }
97
+ },
98
+ {
99
+ property: "marginTop",
100
+ value: { type: "unit", value: 0.83, unit: "em" }
101
+ },
102
+ {
103
+ property: "marginBottom",
104
+ value: { type: "unit", value: 0.83, unit: "em" }
105
+ }
106
+ ];
107
+ const h3 = [
108
+ displayBlock,
109
+ fontWeightBold,
110
+ {
111
+ property: "fontSize",
112
+ value: { type: "unit", value: 1.17, unit: "em" }
113
+ },
114
+ {
115
+ property: "marginTop",
116
+ value: { type: "unit", value: 1, unit: "em" }
117
+ },
118
+ {
119
+ property: "marginBottom",
120
+ value: { type: "unit", value: 1, unit: "em" }
121
+ }
122
+ ];
123
+ const h4 = [
124
+ displayBlock,
125
+ fontWeightBold,
126
+ {
127
+ property: "marginTop",
128
+ value: { type: "unit", value: 1.33, unit: "em" }
129
+ },
130
+ {
131
+ property: "marginBottom",
132
+ value: { type: "unit", value: 1.33, unit: "em" }
133
+ }
134
+ ];
135
+ const h5 = [
136
+ displayBlock,
137
+ fontWeightBold,
138
+ {
139
+ property: "fontSize",
140
+ value: { type: "unit", value: 0.83, unit: "em" }
141
+ },
142
+ {
143
+ property: "marginTop",
144
+ value: { type: "unit", value: 1.67, unit: "em" }
145
+ },
146
+ {
147
+ property: "marginBottom",
148
+ value: { type: "unit", value: 1.67, unit: "em" }
149
+ }
150
+ ];
151
+ const h6 = [
152
+ displayBlock,
153
+ fontWeightBold,
154
+ {
155
+ property: "fontSize",
156
+ value: { type: "unit", value: 0.67, unit: "em" }
157
+ },
158
+ {
159
+ property: "marginTop",
160
+ value: { type: "unit", value: 2.33, unit: "em" }
161
+ },
162
+ {
163
+ property: "marginBottom",
164
+ value: { type: "unit", value: 2.33, unit: "em" }
165
+ }
166
+ ];
167
+ const pre = [
168
+ displayBlock,
169
+ {
170
+ property: "whiteSpace",
171
+ value: { type: "keyword", value: "pre" }
172
+ },
173
+ mt1em,
174
+ mb1em
175
+ ];
176
+ const table = [
177
+ {
178
+ property: "display",
179
+ value: { type: "keyword", value: "table" }
180
+ },
181
+ {
182
+ property: "borderSpacing",
183
+ value: { type: "unit", value: 2, unit: "px" }
184
+ },
185
+ {
186
+ property: "borderCollapse",
187
+ value: { type: "keyword", value: "separate" }
188
+ },
189
+ {
190
+ property: "boxSizing",
191
+ value: { type: "keyword", value: "border-box" }
192
+ },
193
+ {
194
+ property: "borderSpacing",
195
+ value: { type: "unit", value: 0, unit: "number" }
196
+ }
197
+ ];
198
+ const caption = [
199
+ {
200
+ property: "display",
201
+ value: { type: "keyword", value: "table" }
202
+ },
203
+ {
204
+ property: "textAlign",
205
+ value: { type: "keyword", value: "center" }
206
+ }
207
+ ];
208
+ const tr = [
209
+ {
210
+ property: "display",
211
+ value: { type: "keyword", value: "table-row" }
212
+ },
213
+ {
214
+ property: "verticalAlign",
215
+ value: { type: "keyword", value: "inherit" }
216
+ }
217
+ ];
218
+ const col = [
219
+ {
220
+ property: "display",
221
+ value: { type: "keyword", value: "table-column" }
222
+ }
223
+ ];
224
+ const colgroup = [
225
+ {
226
+ property: "display",
227
+ value: { type: "keyword", value: "table-column-group" }
228
+ }
229
+ ];
230
+ const tbody = [
231
+ {
232
+ property: "display",
233
+ value: { type: "keyword", value: "table-row-group" }
234
+ },
235
+ {
236
+ property: "verticalAlign",
237
+ value: { type: "keyword", value: "middle" }
238
+ }
239
+ ];
240
+ const thead = [
241
+ {
242
+ property: "display",
243
+ value: { type: "keyword", value: "table-header-group" }
244
+ },
245
+ {
246
+ property: "verticalAlign",
247
+ value: { type: "keyword", value: "middle" }
248
+ }
249
+ ];
250
+ const tfoot = [
251
+ {
252
+ property: "display",
253
+ value: { type: "keyword", value: "table-footer-group" }
254
+ },
255
+ {
256
+ property: "verticalAlign",
257
+ value: { type: "keyword", value: "middle" }
258
+ }
259
+ ];
260
+ const td = [
261
+ {
262
+ property: "display",
263
+ value: { type: "keyword", value: "table-cell" }
264
+ },
265
+ {
266
+ property: "verticalAlign",
267
+ value: { type: "keyword", value: "inherit" }
268
+ },
269
+ {
270
+ property: "textAlign",
271
+ value: { type: "keyword", value: "unset" }
272
+ },
273
+ pt1px,
274
+ pr1px,
275
+ pb1px,
276
+ pl1px
277
+ ];
278
+ const th = [
279
+ {
280
+ property: "display",
281
+ value: { type: "keyword", value: "table-cell" }
282
+ },
283
+ {
284
+ property: "verticalAlign",
285
+ value: { type: "keyword", value: "inherit" }
286
+ },
287
+ fontWeightBold,
288
+ pt1px,
289
+ pr1px,
290
+ pb1px,
291
+ pl1px
292
+ ];
293
+ const b = [
294
+ // in firefox defined as bolder
295
+ fontWeightBold
296
+ ];
297
+ const i = [fontStyleItalic];
298
+ const code = [
299
+ {
300
+ property: "fontFamily",
301
+ // in firefox defined as -moz-fixed
302
+ value: { type: "fontFamily", value: ["monospace"] }
303
+ }
304
+ ];
305
+ const mark = [
306
+ {
307
+ property: "backgroundColor",
308
+ // in firefox defined as Mark
309
+ value: { type: "keyword", value: "yellow" }
310
+ },
311
+ {
312
+ property: "color",
313
+ // in firefox defined as MarkText
314
+ value: { type: "keyword", value: "black" }
315
+ }
316
+ ];
317
+ const u = [
318
+ {
319
+ property: "textDecorationStyle",
320
+ value: { type: "keyword", value: "underline" }
321
+ }
322
+ ];
323
+ const s = [
324
+ {
325
+ property: "textDecorationStyle",
326
+ value: { type: "keyword", value: "line-through" }
327
+ }
328
+ ];
329
+ const sub = [
330
+ {
331
+ property: "verticalAlign",
332
+ value: { type: "keyword", value: "sub" }
333
+ },
334
+ {
335
+ property: "fontSize",
336
+ value: { type: "keyword", value: "smaller" }
337
+ }
338
+ ];
339
+ const sup = [
340
+ {
341
+ property: "verticalAlign",
342
+ value: { type: "keyword", value: "super" }
343
+ },
344
+ {
345
+ property: "fontSize",
346
+ value: { type: "keyword", value: "smaller" }
347
+ }
348
+ ];
349
+ const ul = [
350
+ displayBlock,
351
+ {
352
+ property: "listStyleType",
353
+ value: { type: "keyword", value: "disc" }
354
+ },
355
+ mt1em,
356
+ mb1em,
357
+ pl40px
358
+ ];
359
+ const ol = [
360
+ displayBlock,
361
+ {
362
+ property: "listStyleType",
363
+ value: { type: "keyword", value: "decimal" }
364
+ },
365
+ mt1em,
366
+ mb1em,
367
+ pl40px
368
+ ];
369
+ const li = [
370
+ {
371
+ property: "display",
372
+ value: { type: "keyword", value: "list-item" }
373
+ },
374
+ {
375
+ property: "textAlign",
376
+ value: { type: "keyword", value: "match-parent" }
377
+ }
378
+ ];
379
+ const hr = [
380
+ {
381
+ property: "color",
382
+ value: { type: "keyword", value: "gray" }
383
+ },
384
+ {
385
+ property: "borderTopWidth",
386
+ value: { type: "unit", value: 1, unit: "px" }
387
+ },
388
+ {
389
+ property: "borderRightWidth",
390
+ value: { type: "unit", value: 1, unit: "px" }
391
+ },
392
+ {
393
+ property: "borderBottomWidth",
394
+ value: { type: "unit", value: 1, unit: "px" }
395
+ },
396
+ {
397
+ property: "borderLeftWidth",
398
+ value: { type: "unit", value: 1, unit: "px" }
399
+ },
400
+ {
401
+ property: "borderTopStyle",
402
+ value: { type: "keyword", value: "inset" }
403
+ },
404
+ {
405
+ property: "borderRightStyle",
406
+ value: { type: "keyword", value: "inset" }
407
+ },
408
+ {
409
+ property: "borderBottomStyle",
410
+ value: { type: "keyword", value: "inset" }
411
+ },
412
+ {
413
+ property: "borderLeftStyle",
414
+ value: { type: "keyword", value: "inset" }
415
+ },
416
+ {
417
+ property: "marginTop",
418
+ value: { type: "unit", value: 0.5, unit: "em" }
419
+ },
420
+ {
421
+ property: "marginBottom",
422
+ value: { type: "unit", value: 0.5, unit: "em" }
423
+ },
424
+ {
425
+ property: "marginLeft",
426
+ value: { type: "keyword", value: "auto" }
427
+ },
428
+ {
429
+ property: "marginRight",
430
+ value: { type: "keyword", value: "auto" }
431
+ },
432
+ // firefox only
433
+ {
434
+ property: "overflow",
435
+ value: { type: "keyword", value: "hidden" }
436
+ },
437
+ /* This is not really per spec but all browsers define it */
438
+ displayBlock
439
+ ];
440
+ export {
441
+ address,
442
+ article,
443
+ article as aside,
444
+ b,
445
+ blockquote,
446
+ body,
447
+ caption,
448
+ i as cite,
449
+ code,
450
+ col,
451
+ colgroup,
452
+ dd,
453
+ s as del,
454
+ article as details,
455
+ i as dfn,
456
+ article as div,
457
+ p as dl,
458
+ article as dt,
459
+ i as em,
460
+ article as figcaption,
461
+ blockquote as figure,
462
+ article as footer,
463
+ article as form,
464
+ h1,
465
+ h2,
466
+ h3,
467
+ h4,
468
+ h5,
469
+ h6,
470
+ article as header,
471
+ article as hgroup,
472
+ hr,
473
+ article as html,
474
+ i,
475
+ u as ins,
476
+ code as kbd,
477
+ li,
478
+ article as main,
479
+ mark,
480
+ article as nav,
481
+ ol,
482
+ p,
483
+ pre,
484
+ s,
485
+ code as samp,
486
+ article as section,
487
+ b as strong,
488
+ sub,
489
+ article as summary,
490
+ sup,
491
+ table,
492
+ tbody,
493
+ td,
494
+ tfoot,
495
+ th,
496
+ thead,
497
+ tr,
498
+ u,
499
+ ul,
500
+ i as var
501
+ };
package/lib/index.js CHANGED
@@ -1,4 +1,11 @@
1
+ import * as exportedHtml from "./html";
2
+ const html = exportedHtml;
1
3
  export * from "./__generated__/keyword-values";
2
- export * from "./__generated__/properties";
3
4
  export * from "./__generated__/units";
4
5
  export * from "./schema";
6
+ import { properties as generatedProperties } from "./__generated__/properties";
7
+ const properties = generatedProperties;
8
+ export {
9
+ html,
10
+ properties
11
+ };
@@ -139,7 +139,7 @@ export declare const keywordValues: {
139
139
  readonly fontVariantLigatures: readonly ["normal", "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual", "initial", "inherit", "unset"];
140
140
  readonly fontVariantNumeric: readonly ["normal", "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", "stacked-fractions", "ordinal", "slashed-zero", "initial", "inherit", "unset"];
141
141
  readonly fontVariantPosition: readonly ["normal", "sub", "super", "initial", "inherit", "unset"];
142
- readonly fontWeight: readonly ["normal", "bold", "bolder", "lighter", "initial", "inherit", "unset"];
142
+ readonly fontWeight: readonly ["400", "700", "bolder", "lighter", "initial", "inherit", "unset"];
143
143
  readonly forcedColorAdjust: readonly ["auto", "none", "initial", "inherit", "unset"];
144
144
  readonly gridAutoColumns: readonly ["min-content", "max-content", "auto", "initial", "inherit", "unset"];
145
145
  readonly gridAutoFlow: readonly ["row", "column", "dense", "initial", "inherit", "unset"];