fashionable 0.1.0 → 0.2.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 (111) hide show
  1. package/README.md +276 -0
  2. package/dist/calc/index.d.mts +2 -0
  3. package/dist/calc/index.mjs +1 -334
  4. package/dist/data/index.d.mts +208 -0
  5. package/dist/data/index.mjs +696 -0
  6. package/dist/data/index.mjs.map +1 -0
  7. package/dist/declaration/index.d.mts +2 -0
  8. package/dist/declaration/index.mjs +2 -2
  9. package/dist/declaration/index.mjs.map +1 -1
  10. package/dist/fontFace/index.d.mts +2 -0
  11. package/dist/fontFace/index.mjs +10 -8
  12. package/dist/fontFace/index.mjs.map +1 -1
  13. package/dist/property/index.d.mts +2 -0
  14. package/dist/property/index.mjs +13 -9
  15. package/dist/property/index.mjs.map +1 -1
  16. package/dist/query/index.d.mts +2 -0
  17. package/dist/query/index.mjs +6 -5
  18. package/dist/query/index.mjs.map +1 -1
  19. package/dist/rule/index.d.mts +2 -0
  20. package/dist/rule/index.mjs +19 -2
  21. package/dist/rule/index.mjs.map +1 -1
  22. package/dist/selector/index.d.mts +2 -0
  23. package/dist/selector/index.mjs +2 -2
  24. package/dist/shared/calc-Cih4o2r7.mjs +1145 -0
  25. package/dist/shared/calc-Cih4o2r7.mjs.map +1 -0
  26. package/dist/shared/color-BvNJ2YqL.d.mts +590 -0
  27. package/dist/shared/color.internal-Dts5ycTm.mjs +450 -0
  28. package/dist/shared/color.internal-Dts5ycTm.mjs.map +1 -0
  29. package/dist/shared/declaration-1DlO_ltT.d.mts +166 -0
  30. package/dist/shared/{declaration.internal-DvZknsDc.mjs → declaration.internal-wLB4ssxC.mjs} +4 -4
  31. package/dist/shared/declaration.internal-wLB4ssxC.mjs.map +1 -0
  32. package/dist/shared/{equal-C96LR7p4.mjs → equal-U9G5LhtL.mjs} +2 -14
  33. package/dist/shared/{equal-C96LR7p4.mjs.map → equal-U9G5LhtL.mjs.map} +1 -1
  34. package/dist/shared/fontFaceRule-C7nYgH6X.d.mts +294 -0
  35. package/dist/shared/{fontFaceRule.internal-CgnEJbNS.mjs → fontFaceRule.internal-D5u48TUO.mjs} +51 -10
  36. package/dist/shared/fontFaceRule.internal-D5u48TUO.mjs.map +1 -0
  37. package/dist/shared/index-BvtwY4FQ.d.mts +841 -0
  38. package/dist/shared/mediaQuery-BYR1z-iD.d.mts +145 -0
  39. package/dist/shared/{mediaQuery.internal-BZF1beZO.mjs → mediaQuery.internal-B6iuMd75.mjs} +2 -2
  40. package/dist/shared/{mediaQuery.internal-BZF1beZO.mjs.map → mediaQuery.internal-B6iuMd75.mjs.map} +1 -1
  41. package/dist/shared/mediaRule-BDB4WCYy.d.mts +558 -0
  42. package/dist/shared/precision.internal-0lv1nEpF.mjs +40 -0
  43. package/dist/shared/precision.internal-0lv1nEpF.mjs.map +1 -0
  44. package/dist/shared/propertyRule-BbkFh9b9.d.mts +466 -0
  45. package/dist/shared/{propertyRule.internal-BY1ghubC.mjs → propertyRule.internal-Bc_HrfcL.mjs} +4 -4
  46. package/dist/shared/propertyRule.internal-Bc_HrfcL.mjs.map +1 -0
  47. package/dist/shared/rolldown-runtime-D7D4PA-g.mjs +13 -0
  48. package/dist/shared/{ruleSet.internal-DQjyPgko.mjs → ruleSet.internal-DodzVMUU.mjs} +13 -7
  49. package/dist/shared/{ruleSet.internal-DQjyPgko.mjs.map → ruleSet.internal-DodzVMUU.mjs.map} +1 -1
  50. package/dist/shared/selector-HZY-W6l6.d.mts +346 -0
  51. package/dist/shared/{selector.internal-BLQtVoIM.mjs → selector.internal-ESe9s0IH.mjs} +2 -2
  52. package/dist/shared/{selector.internal-BLQtVoIM.mjs.map → selector.internal-ESe9s0IH.mjs.map} +1 -1
  53. package/dist/shared/utils-BKm298I-.d.mts +179 -0
  54. package/dist/stylesheet/index.d.mts +316 -0
  55. package/dist/stylesheet/index.mjs +50 -11
  56. package/dist/stylesheet/index.mjs.map +1 -1
  57. package/dist/utils.d.mts +2 -0
  58. package/package.json +16 -16
  59. package/dist/calc/calc.d.ts +0 -425
  60. package/dist/calc/calc.internal.d.ts +0 -2
  61. package/dist/calc/index.d.ts +0 -6
  62. package/dist/calc/index.mjs.map +0 -1
  63. package/dist/calc/precision.d.ts +0 -72
  64. package/dist/calc/precision.internal.d.ts +0 -2
  65. package/dist/color/color.d.ts +0 -121
  66. package/dist/color/color.internal.d.ts +0 -2
  67. package/dist/color/index.d.ts +0 -3
  68. package/dist/color/index.mjs +0 -73
  69. package/dist/color/index.mjs.map +0 -1
  70. package/dist/declaration/declaration.d.ts +0 -159
  71. package/dist/declaration/declaration.internal.d.ts +0 -2
  72. package/dist/declaration/index.d.ts +0 -3
  73. package/dist/fontFace/fontFaceRule.d.ts +0 -257
  74. package/dist/fontFace/fontFaceRule.internal.d.ts +0 -4
  75. package/dist/fontFace/index.d.ts +0 -3
  76. package/dist/internal/equal.d.ts +0 -13
  77. package/dist/internal/format.d.ts +0 -6
  78. package/dist/internal/refs.d.ts +0 -8
  79. package/dist/internal/render.d.ts +0 -6
  80. package/dist/property/index.d.ts +0 -6
  81. package/dist/property/propertyRule.d.ts +0 -174
  82. package/dist/property/propertyRule.internal.d.ts +0 -2
  83. package/dist/property/propertySyntax.d.ts +0 -282
  84. package/dist/property/propertySyntax.internal.d.ts +0 -2
  85. package/dist/query/index.d.ts +0 -3
  86. package/dist/query/mediaQuery.d.ts +0 -134
  87. package/dist/query/mediaQuery.internal.d.ts +0 -2
  88. package/dist/rule/index.d.ts +0 -9
  89. package/dist/rule/mediaRule.d.ts +0 -115
  90. package/dist/rule/mediaRule.internal.d.ts +0 -2
  91. package/dist/rule/rule.internal.d.ts +0 -13
  92. package/dist/rule/ruleSet.d.ts +0 -249
  93. package/dist/rule/ruleSet.internal.d.ts +0 -2
  94. package/dist/rule/styleRule.d.ts +0 -110
  95. package/dist/rule/styleRule.internal.d.ts +0 -2
  96. package/dist/selector/index.d.ts +0 -6
  97. package/dist/selector/selector.d.ts +0 -243
  98. package/dist/selector/selector.internal.d.ts +0 -2
  99. package/dist/selector/specificity.d.ts +0 -92
  100. package/dist/selector/specificity.internal.d.ts +0 -2
  101. package/dist/shared/calc.internal-C1g_NRsl.mjs +0 -568
  102. package/dist/shared/calc.internal-C1g_NRsl.mjs.map +0 -1
  103. package/dist/shared/color.internal-D7P91Rvv.mjs +0 -100
  104. package/dist/shared/color.internal-D7P91Rvv.mjs.map +0 -1
  105. package/dist/shared/declaration.internal-DvZknsDc.mjs.map +0 -1
  106. package/dist/shared/fontFaceRule.internal-CgnEJbNS.mjs.map +0 -1
  107. package/dist/shared/propertyRule.internal-BY1ghubC.mjs.map +0 -1
  108. package/dist/stylesheet/index.d.ts +0 -3
  109. package/dist/stylesheet/stylesheet.d.ts +0 -275
  110. package/dist/stylesheet/stylesheet.internal.d.ts +0 -2
  111. package/dist/utils.d.ts +0 -176
@@ -0,0 +1,208 @@
1
+ import { C as Vmin, S as Vmax, T as units_d_exports, _ as Percentage$1, b as Rem, c as Precision, d as Angle$1, f as ChannelLeaf, g as Percent, h as Length$1, m as Em, p as Deg, r as Calc, v as Px, w as Vw, x as Vh, y as Rad } from "../shared/index-BvtwY4FQ.mjs";
2
+ import { a as colorSpace_d_exports, i as hueInterpolation_d_exports, n as color_d_exports, r as keywords_d_exports } from "../shared/color-BvNJ2YqL.mjs";
3
+ declare namespace angle_d_exports {
4
+ export { Angle, deg, rad };
5
+ }
6
+ /**
7
+ * An `<angle>` expression: a `Calc` of angle kind, in any angle unit. Names the
8
+ * dimension without spelling `Calc<Refs, 'angle', Unit.Angle>` — `Angle.rad(2)`
9
+ * produces one, and it composes with every `Calc` combinator (subtracting two
10
+ * angles is an angle, scaling by a number stays an angle). `Refs` unions the
11
+ * unbound reference names, as on `Calc`.
12
+ *
13
+ * The leaf is the widened `Unit.Angle`, so every specific angle expression is
14
+ * assignable to it; a constructor narrows it (`Angle.rad` carries `Unit.Rad`).
15
+ *
16
+ * @since 0.2.0
17
+ */
18
+ type Angle<Refs extends string = string> = Calc<Refs, 'angle', Angle$1>;
19
+ /**
20
+ * An angle in `rad` (radians). Radians are the numeric measure of an angle, so
21
+ * a radian-only expression solves with no unit context.
22
+ *
23
+ * @param value - The angle in radians.
24
+ * @param precision - Optional serialization precision.
25
+ * @returns A `rad` angle expression.
26
+ * @example
27
+ * ```ts
28
+ * Calc.serialize(Angle.rad(1.5708)) // '1.5708rad'
29
+ * ```
30
+ * @since 0.2.0
31
+ */
32
+ declare const rad: (value: number, precision?: Precision) => Calc<never, 'angle', Rad>;
33
+ /**
34
+ * An angle in `deg` (degrees). Degrees lower to radians at solve (`180deg` is
35
+ * `pi`), a fixed ratio, so a degree-only expression solves with no unit context.
36
+ *
37
+ * @param value - The angle in degrees.
38
+ * @param precision - Optional serialization precision.
39
+ * @returns A `deg` angle expression.
40
+ * @example
41
+ * ```ts
42
+ * Calc.serialize(Angle.deg(45)) // '45deg'
43
+ * ```
44
+ * @since 0.2.0
45
+ */
46
+ declare const deg: (value: number, precision?: Precision) => Calc<never, 'angle', Deg>;
47
+ declare namespace channels_d_exports {
48
+ export { Alpha, B, C, G, H, L, R };
49
+ }
50
+ /**
51
+ * The `l` origin channel — lightness in `oklch`. Serializes bare as `l`.
52
+ *
53
+ * @since 0.2.0
54
+ */
55
+ declare const L: Calc<never, 'number', ChannelLeaf<'l'>>;
56
+ /**
57
+ * The `c` origin channel — chroma in `oklch`. Serializes bare as `c`.
58
+ *
59
+ * @since 0.2.0
60
+ */
61
+ declare const C: Calc<never, 'number', ChannelLeaf<'c'>>;
62
+ /**
63
+ * The `h` origin channel — hue in `oklch`, in degrees. Serializes bare as `h`.
64
+ *
65
+ * @since 0.2.0
66
+ */
67
+ declare const H: Calc<never, 'number', ChannelLeaf<'h'>>;
68
+ /**
69
+ * The `r` origin channel — red in `color(srgb ...)`. Serializes bare as `r`.
70
+ *
71
+ * @since 0.2.0
72
+ */
73
+ declare const R: Calc<never, 'number', ChannelLeaf<'r'>>;
74
+ /**
75
+ * The `g` origin channel — green in `color(srgb ...)`. Serializes bare as `g`.
76
+ *
77
+ * @since 0.2.0
78
+ */
79
+ declare const G: Calc<never, 'number', ChannelLeaf<'g'>>;
80
+ /**
81
+ * The `b` origin channel — blue in `color(srgb ...)`. Serializes bare as `b`.
82
+ *
83
+ * @since 0.2.0
84
+ */
85
+ declare const B: Calc<never, 'number', ChannelLeaf<'b'>>;
86
+ /**
87
+ * The `alpha` origin channel — the opacity of the `from` origin, in `oklch`
88
+ * and `color(srgb ...)` alike. Serializes bare as `alpha`.
89
+ *
90
+ * @since 0.2.0
91
+ */
92
+ declare const Alpha: Calc<never, 'number', ChannelLeaf<'alpha'>>;
93
+ declare namespace length_d_exports {
94
+ export { Length, em, px, rem, vh, vmax, vmin, vw };
95
+ }
96
+ /**
97
+ * A `<length>` expression: a `Calc` of length kind, in any length unit. Names
98
+ * the dimension without spelling `Calc<Refs, 'length', Unit.Length>` —
99
+ * `Length.px(16)` produces one, and it composes with every `Calc` combinator
100
+ * (adding two lengths is a length, dividing one by another is a number). `Refs`
101
+ * unions the unbound reference names, as on `Calc`.
102
+ *
103
+ * The leaf is the widened `Unit.Length`, so a mixed-unit sum
104
+ * (`Calc.add(Length.px(16), Length.vw(2))`) and every single-unit length are
105
+ * alike assignable to it.
106
+ *
107
+ * @since 0.2.0
108
+ */
109
+ type Length<Refs extends string = string> = Calc<Refs, 'length', Length$1>;
110
+ /**
111
+ * A length in `px` (absolute pixels).
112
+ *
113
+ * @param value - The pixel count.
114
+ * @param precision - Optional serialization precision.
115
+ * @returns A `px` length expression.
116
+ * @example
117
+ * ```ts
118
+ * Calc.serialize(Length.px(16)) // '16px'
119
+ * ```
120
+ * @since 0.2.0
121
+ */
122
+ declare const px: (value: number, precision?: Precision) => Calc<never, 'length', Px>;
123
+ /**
124
+ * A length in `rem` (relative to the root font size).
125
+ *
126
+ * @param value - The multiple of the root font size.
127
+ * @param precision - Optional serialization precision.
128
+ * @returns A `rem` length expression.
129
+ * @since 0.2.0
130
+ */
131
+ declare const rem: (value: number, precision?: Precision) => Calc<never, 'length', Rem>;
132
+ /**
133
+ * A length in `em` (relative to the element font size).
134
+ *
135
+ * @param value - The multiple of the element font size.
136
+ * @param precision - Optional serialization precision.
137
+ * @returns An `em` length expression.
138
+ * @since 0.2.0
139
+ */
140
+ declare const em: (value: number, precision?: Precision) => Calc<never, 'length', Em>;
141
+ /**
142
+ * A length in `vw` (1% of the viewport width).
143
+ *
144
+ * @param value - The percentage of viewport width.
145
+ * @param precision - Optional serialization precision.
146
+ * @returns A `vw` length expression.
147
+ * @since 0.2.0
148
+ */
149
+ declare const vw: (value: number, precision?: Precision) => Calc<never, 'length', Vw>;
150
+ /**
151
+ * A length in `vh` (1% of the viewport height).
152
+ *
153
+ * @param value - The percentage of viewport height.
154
+ * @param precision - Optional serialization precision.
155
+ * @returns A `vh` length expression.
156
+ * @since 0.2.0
157
+ */
158
+ declare const vh: (value: number, precision?: Precision) => Calc<never, 'length', Vh>;
159
+ /**
160
+ * A length in `vmin` (1% of the smaller viewport axis).
161
+ *
162
+ * @param value - The percentage of the smaller viewport axis.
163
+ * @param precision - Optional serialization precision.
164
+ * @returns A `vmin` length expression.
165
+ * @since 0.2.0
166
+ */
167
+ declare const vmin: (value: number, precision?: Precision) => Calc<never, 'length', Vmin>;
168
+ /**
169
+ * A length in `vmax` (1% of the larger viewport axis).
170
+ *
171
+ * @param value - The percentage of the larger viewport axis.
172
+ * @param precision - Optional serialization precision.
173
+ * @returns A `vmax` length expression.
174
+ * @since 0.2.0
175
+ */
176
+ declare const vmax: (value: number, precision?: Precision) => Calc<never, 'length', Vmax>;
177
+ declare namespace percentage_d_exports {
178
+ export { Percentage, of };
179
+ }
180
+ /**
181
+ * A `<percentage>` expression: a `Calc` of percentage kind. Names the dimension
182
+ * without spelling `Calc<Refs, 'percentage', Unit.Percentage>` —
183
+ * `Percentage.of(40)` produces one, and it composes with every `Calc`
184
+ * combinator (adding two percentages is a percentage, one over another is a
185
+ * number). `Refs` unions the unbound reference names, as on `Calc`.
186
+ *
187
+ * @since 0.2.0
188
+ */
189
+ type Percentage<Refs extends string = string> = Calc<Refs, 'percentage', Percentage$1>;
190
+ /**
191
+ * A percentage — a number rendered with a trailing `%`. `Percentage.of(40)`
192
+ * serializes as `40%`. The value passes through unrounded; the optional
193
+ * `Precision` pins serialization exactly as `Calc.of` does.
194
+ *
195
+ * @param value - The percentage magnitude (`40` for `40%`, not `0.4`).
196
+ * @param precision - Optional serialization precision.
197
+ * @returns A `<percentage>` expression.
198
+ * @example
199
+ * ```ts
200
+ * Calc.serialize(Percentage.of(40)) // '40%'
201
+ * Calc.serialize(Calc.add(Percentage.of(20), Percentage.of(5))) // '25%'
202
+ * ```
203
+ * @since 0.2.0
204
+ */
205
+ declare const of: (value: number, precision?: Precision) => Calc<never, 'percentage', Percent>;
206
+ //#endregion
207
+ export { angle_d_exports as Angle, channels_d_exports as Channel, color_d_exports as Color, colorSpace_d_exports as ColorSpace, hueInterpolation_d_exports as HueInterpolation, keywords_d_exports as Keyword, length_d_exports as Length, percentage_d_exports as Percentage, units_d_exports as Unit };
208
+ //# sourceMappingURL=index.d.mts.map