@webstudio-is/css-data 0.90.0 → 0.266.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.
Files changed (95) hide show
  1. package/lib/index.js +17534 -15
  2. package/lib/types/__generated__/animatable-properties.d.ts +1 -0
  3. package/lib/types/__generated__/html.d.ts +2 -0
  4. package/lib/types/__generated__/keyword-values.d.ts +4 -358
  5. package/lib/types/__generated__/properties.d.ts +10 -3674
  6. package/lib/types/__generated__/property-value-descriptions.d.ts +7 -5446
  7. package/lib/types/__generated__/pseudo-classes.d.ts +1 -0
  8. package/lib/types/__generated__/pseudo-elements.d.ts +1 -0
  9. package/lib/types/__generated__/pseudo-selector-descriptions.d.ts +2 -0
  10. package/lib/types/__generated__/shorthand-properties.d.ts +1 -0
  11. package/lib/types/css-tree.d.ts +772 -0
  12. package/lib/types/index.d.ts +18 -3680
  13. package/lib/types/media-condition-simulator.d.ts +7 -0
  14. package/lib/types/parse-css-value.d.ts +8 -3
  15. package/lib/types/parse-css.d.ts +75 -6
  16. package/lib/types/property-parsers/conic-gradient.d.ts +3 -0
  17. package/lib/types/property-parsers/gradient-utils.d.ts +20 -0
  18. package/lib/types/property-parsers/grid-template-areas.d.ts +21 -0
  19. package/lib/types/property-parsers/grid-template-tracks.d.ts +128 -0
  20. package/lib/types/property-parsers/index.d.ts +6 -2
  21. package/lib/types/property-parsers/linear-gradient.d.ts +4 -0
  22. package/lib/types/property-parsers/radial-gradient.d.ts +3 -0
  23. package/lib/types/property-parsers/types.d.ts +28 -0
  24. package/lib/types/selector-validation.d.ts +13 -0
  25. package/lib/types/shorthands.d.ts +2 -0
  26. package/package.json +29 -33
  27. package/lib/__generated__/keyword-values.js +0 -5255
  28. package/lib/__generated__/properties.js +0 -3697
  29. package/lib/__generated__/property-value-descriptions.js +0 -2740
  30. package/lib/__generated__/units.js +0 -65
  31. package/lib/cjs/__generated__/keyword-values.js +0 -5275
  32. package/lib/cjs/__generated__/properties.js +0 -3717
  33. package/lib/cjs/__generated__/property-value-descriptions.js +0 -2760
  34. package/lib/cjs/__generated__/units.js +0 -85
  35. package/lib/cjs/custom-data.js +0 -64
  36. package/lib/cjs/html-check.js +0 -25
  37. package/lib/cjs/html.js +0 -581
  38. package/lib/cjs/index.js +0 -48
  39. package/lib/cjs/package.json +0 -1
  40. package/lib/cjs/parse-css-value.js +0 -152
  41. package/lib/cjs/parse-css.js +0 -136
  42. package/lib/cjs/popularity-index.js +0 -4633
  43. package/lib/cjs/property-parsers/background.js +0 -119
  44. package/lib/cjs/property-parsers/box-shadow.js +0 -129
  45. package/lib/cjs/property-parsers/index.js +0 -19
  46. package/lib/cjs/property-parsers/parsers.js +0 -26
  47. package/lib/cjs/property-parsers/to-longhand.js +0 -24
  48. package/lib/cjs/schema.js +0 -135
  49. package/lib/custom-data.js +0 -44
  50. package/lib/html-check.js +0 -2
  51. package/lib/html.js +0 -561
  52. package/lib/parse-css-value.js +0 -122
  53. package/lib/parse-css.js +0 -106
  54. package/lib/popularity-index.js +0 -4613
  55. package/lib/property-parsers/background.js +0 -89
  56. package/lib/property-parsers/box-shadow.js +0 -99
  57. package/lib/property-parsers/index.js +0 -2
  58. package/lib/property-parsers/parsers.js +0 -6
  59. package/lib/property-parsers/to-longhand.js +0 -4
  60. package/lib/schema.js +0 -115
  61. package/lib/types/custom-data.d.ts +0 -15
  62. package/lib/types/html-check.d.ts +0 -1
  63. package/lib/types/html.d.ts +0 -62
  64. package/lib/types/parse-css-value.test.d.ts +0 -1
  65. package/lib/types/parse-css.test.d.ts +0 -1
  66. package/lib/types/popularity-index.d.ts +0 -6
  67. package/lib/types/property-parsers/background.d.ts +0 -11
  68. package/lib/types/property-parsers/background.test.d.ts +0 -1
  69. package/lib/types/property-parsers/box-shadow.d.ts +0 -3
  70. package/lib/types/property-parsers/box-shadow.test.d.ts +0 -1
  71. package/lib/types/property-parsers/parsers.d.ts +0 -2
  72. package/lib/types/property-parsers/to-longhand.d.ts +0 -1
  73. package/lib/types/schema.d.ts +0 -3243
  74. package/src/__generated__/keyword-values.ts +0 -5253
  75. package/src/__generated__/properties.ts +0 -3696
  76. package/src/__generated__/property-value-descriptions.ts +0 -4008
  77. package/src/__generated__/units.ts +0 -63
  78. package/src/custom-data.ts +0 -57
  79. package/src/html-check.ts +0 -8
  80. package/src/html.ts +0 -617
  81. package/src/index.ts +0 -25
  82. package/src/parse-css-value.test.ts +0 -136
  83. package/src/parse-css-value.ts +0 -157
  84. package/src/parse-css.test.ts +0 -101
  85. package/src/parse-css.ts +0 -137
  86. package/src/popularity-index.ts +0 -4611
  87. package/src/property-parsers/README.md +0 -11
  88. package/src/property-parsers/background.test.ts +0 -184
  89. package/src/property-parsers/background.ts +0 -147
  90. package/src/property-parsers/box-shadow.test.ts +0 -294
  91. package/src/property-parsers/box-shadow.ts +0 -130
  92. package/src/property-parsers/index.ts +0 -2
  93. package/src/property-parsers/parsers.ts +0 -5
  94. package/src/property-parsers/to-longhand.ts +0 -4
  95. package/src/schema.ts +0 -193
@@ -1,63 +0,0 @@
1
- // This file was generated by pnpm mdn-data
2
- export const units = {
3
- number: [],
4
- percentage: ["%"],
5
- angle: ["deg", "grad", "rad", "turn"],
6
- decibel: ["db"],
7
- flex: ["fr"],
8
- frequency: ["hz", "khz"],
9
- length: [
10
- "cm",
11
- "mm",
12
- "q",
13
- "in",
14
- "pt",
15
- "pc",
16
- "px",
17
- "em",
18
- "rem",
19
- "ex",
20
- "rex",
21
- "cap",
22
- "rcap",
23
- "ch",
24
- "rch",
25
- "ic",
26
- "ric",
27
- "lh",
28
- "rlh",
29
- "vw",
30
- "svw",
31
- "lvw",
32
- "dvw",
33
- "vh",
34
- "svh",
35
- "lvh",
36
- "dvh",
37
- "vi",
38
- "svi",
39
- "lvi",
40
- "dvi",
41
- "vb",
42
- "svb",
43
- "lvb",
44
- "dvb",
45
- "vmin",
46
- "svmin",
47
- "lvmin",
48
- "dvmin",
49
- "vmax",
50
- "svmax",
51
- "lvmax",
52
- "dvmax",
53
- "cqw",
54
- "cqh",
55
- "cqi",
56
- "cqb",
57
- "cqmin",
58
- "cqmax",
59
- ],
60
- resolution: ["dpi", "dpcm", "dppx", "x"],
61
- semitones: ["st"],
62
- time: ["s", "ms"],
63
- } as const;
@@ -1,57 +0,0 @@
1
- import type { StyleValue } from "./schema";
2
- import { popularityIndex } from "./popularity-index";
3
-
4
- // Data type used before we generate a the constants.
5
- type RawPropertyData = {
6
- unitGroups: string[];
7
- inherited: boolean;
8
- initial: StyleValue;
9
- popularity: number;
10
- appliesTo: string;
11
- };
12
-
13
- export const propertiesData: { [property: string]: RawPropertyData } = {};
14
- export const keywordValues: { [property: string]: Array<string> } = {};
15
-
16
- const getPopularityIndex = (property: string) =>
17
- popularityIndex.find((data) => data.property === property)?.dayPercentage ??
18
- 0;
19
-
20
- propertiesData.WebkitFontSmoothing = {
21
- unitGroups: [],
22
- inherited: true,
23
- initial: {
24
- type: "keyword",
25
- value: "auto",
26
- },
27
- popularity: getPopularityIndex("webkit-font-smoothing"),
28
- appliesTo: "allElements",
29
- };
30
- keywordValues.WebkitFontSmoothing = [
31
- "auto",
32
- "none",
33
- "antialiased",
34
- "subpixel-antialiased",
35
- ];
36
-
37
- propertiesData.MozOsxFontSmoothing = {
38
- unitGroups: [],
39
- inherited: true,
40
- initial: {
41
- type: "keyword",
42
- value: "auto",
43
- },
44
- popularity: getPopularityIndex("moz-osx-font-smoothing"),
45
- appliesTo: "allElements",
46
- };
47
- keywordValues.MozOsxFontSmoothing = ["auto", "grayscale"];
48
-
49
- keywordValues.listStyleType = [
50
- "disc",
51
- "circle",
52
- "square",
53
- "decimal",
54
- "georgian",
55
- "trad-chinese-informal",
56
- "kannada",
57
- ];
package/src/html-check.ts DELETED
@@ -1,8 +0,0 @@
1
- import * as html from "./html";
2
- import type { htmlTags as HtmlTags } from "html-tags";
3
-
4
- type ExportedTags = keyof typeof html;
5
-
6
- declare let exportedTags: ExportedTags;
7
-
8
- exportedTags satisfies HtmlTags;