@mastors/core 1.1.0 → 2.0.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 (50) hide show
  1. package/README.md +12 -121
  2. package/dist/mastors-core.css +62 -1615
  3. package/dist/mastors-core.css.map +1 -1
  4. package/package.json +6 -8
  5. package/scss/abstracts/_maps.scss +9 -0
  6. package/scss/accessibility/_index.scss +0 -1
  7. package/scss/accessibility/_screen-reader.scss +1 -4
  8. package/scss/api/_index.scss +0 -1
  9. package/scss/base/_reset.scss +1 -1
  10. package/scss/config/_flags.scss +9 -9
  11. package/scss/functions/_color.scss +15 -32
  12. package/scss/functions/_em.scss +2 -2
  13. package/scss/functions/_index.scss +0 -6
  14. package/scss/functions/_math.scss +0 -19
  15. package/scss/functions/_string.scss +0 -35
  16. package/scss/generators/_class-generator.scss +42 -31
  17. package/scss/generators/_responsive-generator.scss +4 -0
  18. package/scss/helpers/_visually-hidden.scss +14 -27
  19. package/scss/mixins/_breakpoint.scss +3 -3
  20. package/scss/mixins/_transition.scss +1 -1
  21. package/scss/responsive/_engine.scss +5 -3
  22. package/scss/responsive/_fluid-type.scss +9 -8
  23. package/scss/semantic/_colors.scss +15 -15
  24. package/scss/semantic/_spacing.scss +5 -5
  25. package/scss/semantic/_typography.scss +5 -5
  26. package/scss/themes/_base-theme.scss +5 -0
  27. package/scss/themes/_dark.scss +7 -8
  28. package/scss/tokens/_color.scss +4 -8
  29. package/scss/tokens/_shadows.scss +9 -7
  30. package/scss/tokens/_sizing.scss +6 -3
  31. package/scss/tokens/_typography.scss +10 -9
  32. package/scss/utilities/_borders.scss +6 -4
  33. package/scss/utilities/_colors.scss +1 -1
  34. package/scss/utilities/_index.scss +0 -4
  35. package/scss/utilities/_sizing.scss +2 -2
  36. package/scss/variables/_global.scss +4 -4
  37. package/scss/variables/_grid.scss +3 -3
  38. package/scss/vendors/_index.scss +2 -0
  39. package/src/index.ts +11 -0
  40. package/src/tokens.ts +314 -0
  41. package/src/types.ts +52 -0
  42. package/postinstall.js +0 -41
  43. package/scripts/generate-tokens.js +0 -259
  44. package/scss/accessibility/_print.scss +0 -52
  45. package/scss/config/_index.scss +0 -12
  46. package/scss/functions/_vars.scss +0 -49
  47. package/scss/utilities/_animation.scss +0 -125
  48. package/scss/utilities/_interaction.scss +0 -156
  49. package/scss/utilities/_layout.scss +0 -162
  50. package/scss/utilities/_typography.scss +0 -163
@@ -21,9 +21,9 @@ $font-size-tokens: (
21
21
  ) !default;
22
22
 
23
23
  $font-family-tokens: (
24
- "sans": (system-ui, -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", sans-serif),
25
- "serif": ("Georgia", "Cambria", "Times New Roman", "Times", serif),
26
- "mono": (ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace),
24
+ "sans": (system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif),
25
+ "serif": (Georgia, Cambria, "Times New Roman", Times, serif),
26
+ "mono": (ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace),
27
27
  ) !default;
28
28
 
29
29
  $font-weight-tokens: (
@@ -50,14 +50,15 @@ $line-height-tokens: (
50
50
  $letter-spacing-tokens: (
51
51
  "tighter": -0.05em,
52
52
  "tight": -0.025em,
53
- "normal": 0,
53
+ "normal": 0em,
54
54
  "wide": 0.025em,
55
55
  "wider": 0.05em,
56
56
  "widest": 0.1em,
57
57
  ) !default;
58
58
 
59
- @function font-size($key) { @return map.get($font-size-tokens, $key); }
60
- @function font-family($key) { @return map.get($font-family-tokens, $key); }
61
- @function font-weight($key) { @return map.get($font-weight-tokens, $key); }
62
- @function line-height($key) { @return map.get($line-height-tokens, $key); }
63
- @function letter-spacing($key) { @return map.get($letter-spacing-tokens, $key); }
59
+ // Accessors
60
+ @function font-size($key) { @return map.get($font-size-tokens, $key); }
61
+ @function font-family($key) { @return map.get($font-family-tokens, $key); }
62
+ @function font-weight($key) { @return map.get($font-weight-tokens, $key); }
63
+ @function line-height($key) { @return map.get($line-height-tokens, $key); }
64
+ @function letter-spacing($key) { @return map.get($letter-spacing-tokens, $key); }
@@ -2,7 +2,6 @@
2
2
  // Border width, style, and radius utility classes.
3
3
  // ─────────────────────────────────────────────────────────────
4
4
 
5
- @use "sass:list";
6
5
  @use "../tokens/color" as ct;
7
6
  @use "../tokens/radii" as ra;
8
7
 
@@ -37,7 +36,10 @@
37
36
  // Shorthand: .rounded = base radius
38
37
  .rounded { border-radius: ra.radius("base"); }
39
38
 
40
- // Directional border radius
39
+ // Directional border radius — all sides, full token scale
40
+ // Generates: .rounded-t-{key}, .rounded-b-{key}, .rounded-l-{key}, .rounded-r-{key}
41
+ // (no border-radius shorthand here — directional rules must not have corner rounding
42
+ // on the unaffected corners, so border-radius is applied per-corner only)
41
43
  $-radius-sides: (
42
44
  "t": ("border-top-left-radius", "border-top-right-radius"),
43
45
  "b": ("border-bottom-left-radius", "border-bottom-right-radius"),
@@ -48,8 +50,8 @@ $-radius-sides: (
48
50
  @each $side, $props in $-radius-sides {
49
51
  @each $key, $val in ra.$radius-tokens {
50
52
  .rounded-#{$side}-#{$key} {
51
- #{list.nth($props, 1)}: $val;
52
- #{list.nth($props, 2)}: $val;
53
+ #{nth($props, 1)}: $val;
54
+ #{nth($props, 2)}: $val;
53
55
  }
54
56
  }
55
57
  }
@@ -13,7 +13,7 @@
13
13
 
14
14
  // Text color utilities — primitives (primary, neutral, success, warning, error, info)
15
15
  $-text-palettes: "primary", "neutral", "success", "warning", "error", "info";
16
- $-text-shades: "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950";
16
+ $-text-shades: "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950";
17
17
 
18
18
  @each $palette in $-text-palettes {
19
19
  @each $shade in $-text-shades {
@@ -14,7 +14,3 @@
14
14
  @forward "pointer-events";
15
15
  @forward "z-index";
16
16
  @forward "transform";
17
- @forward "typography";
18
- @forward "layout";
19
- @forward "interaction";
20
- @forward "animation";
@@ -15,7 +15,7 @@
15
15
  }
16
16
 
17
17
  // Min / max width
18
- .min-w-0 { min-width: 0; }
18
+ .min-w-0 { min-width: 0px; }
19
19
  .min-w-full { min-width: 100%; }
20
20
  .min-w-min { min-width: min-content; }
21
21
  .min-w-max { min-width: max-content; }
@@ -29,7 +29,7 @@
29
29
  .max-w-prose { max-width: 65ch; }
30
30
 
31
31
  // Min / max height
32
- .min-h-0 { min-height: 0; }
32
+ .min-h-0 { min-height: 0px; }
33
33
  .min-h-full { min-height: 100%; }
34
34
  .min-h-screen { min-height: 100vh; }
35
35
  .min-h-svh { min-height: 100svh; }
@@ -2,7 +2,7 @@
2
2
  // Top-level global SCSS variables (prefix, base font size, etc.)
3
3
  // ─────────────────────────────────────────────────────────────
4
4
 
5
- $mastors-prefix: "" !default; // e.g. "m-" → .m-flex
6
- $base-font-size: 16px !default;
7
- $base-line-height: 1.5 !default;
8
- $base-font-family: system-ui, -apple-system, sans-serif !default;
5
+ $mastors-prefix: "" !default; // e.g. "m-" → .m-flex
6
+ $base-font-size: 16px !default;
7
+ $base-line-height: 1.5 !default;
8
+ $base-font-family: system-ui, -apple-system, sans-serif !default;
@@ -2,6 +2,6 @@
2
2
  // Grid system configuration variables.
3
3
  // ─────────────────────────────────────────────────────────────
4
4
 
5
- $grid-columns: 12 !default;
6
- $grid-gutter: 1.5rem !default;
7
- $grid-row-gap: 1.5rem !default;
5
+ $grid-columns: 12 !default;
6
+ $grid-gutter: 1.5rem !default;
7
+ $grid-row-gap: 1.5rem !default;
@@ -4,11 +4,13 @@
4
4
 
5
5
  // INTENTIONAL STUB — reserved for third-party CSS overrides.
6
6
  // It is deliberately empty at v1.0.
7
+ //
7
8
  // How to add a vendor override:
8
9
  // 1. Create a partial: vendors/_<vendor-name>-overrides.scss
9
10
  // 2. Forward it here: @forward "<vendor-name>-overrides";
10
11
  // 3. Keep overrides scoped and minimal — prefer custom properties over
11
12
  // re-declarations wherever the vendor library supports them.
13
+ //
12
14
  // Example future entries:
13
15
  // @forward "normalize-overrides";
14
16
  // @forward "floating-ui-overrides";
package/src/index.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @mastors/core — src/index.ts
3
+ * JavaScript/TypeScript entry point.
4
+ *
5
+ * Exports runtime token values and TypeScript types for
6
+ * CSS-in-JS consumers, design tooling, and runtime token access.
7
+ * SCSS is imported separately via the scss/ directory.
8
+ */
9
+
10
+ export * from './types'
11
+ export * from './tokens'
package/src/tokens.ts ADDED
@@ -0,0 +1,314 @@
1
+ /**
2
+ * @mastors/core — src/tokens.ts
3
+ * JavaScript/TypeScript mirror of the SCSS design token maps.
4
+ *
5
+ * These values are the single source of truth for CSS-in-JS consumers,
6
+ * design tooling integrations, and runtime token access.
7
+ *
8
+ * Keep in sync with packages/core/scss/tokens/ when token values change.
9
+ * Future: a build-time extractor will auto-generate this from the SCSS maps.
10
+ */
11
+
12
+ // ─── Color ───────────────────────────────────────────────────────────────────
13
+
14
+ const colorTokens = {
15
+ primary: {
16
+ '50': '#eff6ff',
17
+ '100': '#dbeafe',
18
+ '200': '#bfdbfe',
19
+ '300': '#93c5fd',
20
+ '400': '#60a5fa',
21
+ '500': '#3b82f6',
22
+ '600': '#2563eb',
23
+ '700': '#1d4ed8',
24
+ '800': '#1e40af',
25
+ '900': '#1e3a8a',
26
+ '950': '#172554',
27
+ },
28
+ neutral: {
29
+ '50': '#f9fafb',
30
+ '100': '#f3f4f6',
31
+ '200': '#e5e7eb',
32
+ '300': '#d1d5db',
33
+ '400': '#9ca3af',
34
+ '500': '#6b7280',
35
+ '600': '#4b5563',
36
+ '700': '#374151',
37
+ '800': '#1f2937',
38
+ '900': '#111827',
39
+ '950': '#030712',
40
+ },
41
+ success: {
42
+ '50': '#f0fdf4',
43
+ '100': '#dcfce7',
44
+ '200': '#bbf7d0',
45
+ '300': '#86efac',
46
+ '400': '#4ade80',
47
+ '500': '#22c55e',
48
+ '600': '#16a34a',
49
+ '700': '#15803d',
50
+ '800': '#166534',
51
+ '900': '#14532d',
52
+ '950': '#052e16',
53
+ },
54
+ warning: {
55
+ '50': '#fffbeb',
56
+ '100': '#fef3c7',
57
+ '200': '#fde68a',
58
+ '300': '#fcd34d',
59
+ '400': '#fbbf24',
60
+ '500': '#f59e0b',
61
+ '600': '#d97706',
62
+ '700': '#b45309',
63
+ '800': '#92400e',
64
+ '900': '#78350f',
65
+ '950': '#451a03',
66
+ },
67
+ error: {
68
+ '50': '#fef2f2',
69
+ '100': '#fee2e2',
70
+ '200': '#fecaca',
71
+ '300': '#fca5a5',
72
+ '400': '#f87171',
73
+ '500': '#ef4444',
74
+ '600': '#dc2626',
75
+ '700': '#b91c1c',
76
+ '800': '#991b1b',
77
+ '900': '#7f1d1d',
78
+ '950': '#450a0a',
79
+ },
80
+ info: {
81
+ '50': '#ecfeff',
82
+ '100': '#cffafe',
83
+ '200': '#a5f3fc',
84
+ '300': '#67e8f9',
85
+ '400': '#22d3ee',
86
+ '500': '#06b6d4',
87
+ '600': '#0891b2',
88
+ '700': '#0e7490',
89
+ '800': '#155e75',
90
+ '900': '#164e63',
91
+ '950': '#083344',
92
+ },
93
+ white: '#ffffff',
94
+ black: '#000000',
95
+ transparent: 'transparent',
96
+ } as const
97
+
98
+ // ─── Spacing ─────────────────────────────────────────────────────────────────
99
+
100
+ const spacingTokens = {
101
+ '0': '0px',
102
+ 'px': '1px',
103
+ '0.5': '0.125rem',
104
+ '1': '0.25rem',
105
+ '1.5': '0.375rem',
106
+ '2': '0.5rem',
107
+ '2.5': '0.625rem',
108
+ '3': '0.75rem',
109
+ '3.5': '0.875rem',
110
+ '4': '1rem',
111
+ '5': '1.25rem',
112
+ '6': '1.5rem',
113
+ '7': '1.75rem',
114
+ '8': '2rem',
115
+ '9': '2.25rem',
116
+ '10': '2.5rem',
117
+ '11': '2.75rem',
118
+ '12': '3rem',
119
+ '14': '3.5rem',
120
+ '16': '4rem',
121
+ '20': '5rem',
122
+ '24': '6rem',
123
+ '28': '7rem',
124
+ '32': '8rem',
125
+ '36': '9rem',
126
+ '40': '10rem',
127
+ '44': '11rem',
128
+ '48': '12rem',
129
+ '52': '13rem',
130
+ '56': '14rem',
131
+ '60': '15rem',
132
+ '64': '16rem',
133
+ '72': '18rem',
134
+ '80': '20rem',
135
+ '96': '24rem',
136
+ } as const
137
+
138
+ // ─── Typography ──────────────────────────────────────────────────────────────
139
+
140
+ const fontSizeTokens = {
141
+ 'xs': '0.75rem',
142
+ 'sm': '0.875rem',
143
+ 'base': '1rem',
144
+ 'lg': '1.125rem',
145
+ 'xl': '1.25rem',
146
+ '2xl': '1.5rem',
147
+ '3xl': '1.875rem',
148
+ '4xl': '2.25rem',
149
+ '5xl': '3rem',
150
+ '6xl': '3.75rem',
151
+ '7xl': '4.5rem',
152
+ '8xl': '6rem',
153
+ '9xl': '8rem',
154
+ } as const
155
+
156
+ const fontFamilyTokens = {
157
+ sans: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
158
+ serif: 'Georgia, Cambria, "Times New Roman", Times, serif',
159
+ mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',
160
+ } as const
161
+
162
+ const fontWeightTokens = {
163
+ thin: '100',
164
+ extralight: '200',
165
+ light: '300',
166
+ normal: '400',
167
+ medium: '500',
168
+ semibold: '600',
169
+ bold: '700',
170
+ extrabold: '800',
171
+ black: '900',
172
+ } as const
173
+
174
+ const lineHeightTokens = {
175
+ none: '1',
176
+ tight: '1.25',
177
+ snug: '1.375',
178
+ normal: '1.5',
179
+ relaxed: '1.625',
180
+ loose: '2',
181
+ } as const
182
+
183
+ const letterSpacingTokens = {
184
+ tighter: '-0.05em',
185
+ tight: '-0.025em',
186
+ normal: '0em',
187
+ wide: '0.025em',
188
+ wider: '0.05em',
189
+ widest: '0.1em',
190
+ } as const
191
+
192
+ // ─── Border radius ───────────────────────────────────────────────────────────
193
+
194
+ const radiusTokens = {
195
+ none: '0px',
196
+ sm: '0.125rem',
197
+ base: '0.25rem',
198
+ md: '0.375rem',
199
+ lg: '0.5rem',
200
+ xl: '0.75rem',
201
+ '2xl': '1rem',
202
+ '3xl': '1.5rem',
203
+ full: '9999px',
204
+ } as const
205
+
206
+ // ─── Shadows ─────────────────────────────────────────────────────────────────
207
+
208
+ const shadowTokens = {
209
+ xs: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
210
+ sm: '0 1px 3px 0 rgb(0 0 0 / 0.10), 0 1px 2px -1px rgb(0 0 0 / 0.10)',
211
+ md: '0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10)',
212
+ lg: '0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10)',
213
+ xl: '0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10)',
214
+ '2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
215
+ inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
216
+ none: 'none',
217
+ } as const
218
+
219
+ // ─── Duration & easing ───────────────────────────────────────────────────────
220
+
221
+ const durationTokens = {
222
+ '75': '75ms',
223
+ '100': '100ms',
224
+ '150': '150ms',
225
+ '200': '200ms',
226
+ '300': '300ms',
227
+ '500': '500ms',
228
+ '700': '700ms',
229
+ '1000': '1000ms',
230
+ } as const
231
+
232
+ const easingTokens = {
233
+ linear: 'linear',
234
+ in: 'cubic-bezier(0.4, 0, 1, 1)',
235
+ out: 'cubic-bezier(0, 0, 0.2, 1)',
236
+ 'in-out':'cubic-bezier(0.4, 0, 0.2, 1)',
237
+ bounce: 'cubic-bezier(0.34, 1.56, 0.64, 1)',
238
+ } as const
239
+
240
+ // ─── Z-index ─────────────────────────────────────────────────────────────────
241
+
242
+ const zIndexTokens = {
243
+ base: 0,
244
+ raised: 10,
245
+ dropdown: 100,
246
+ sticky: 200,
247
+ overlay: 300,
248
+ modal: 400,
249
+ toast: 500,
250
+ tooltip: 600,
251
+ max: 9999,
252
+ } as const
253
+
254
+ // ─── Opacity ─────────────────────────────────────────────────────────────────
255
+
256
+ const opacityTokens = {
257
+ '0': 0,
258
+ '5': 0.05,
259
+ '10': 0.1,
260
+ '15': 0.15,
261
+ '20': 0.2,
262
+ '25': 0.25,
263
+ '30': 0.3,
264
+ '40': 0.4,
265
+ '50': 0.5,
266
+ '60': 0.6,
267
+ '70': 0.7,
268
+ '75': 0.75,
269
+ '80': 0.8,
270
+ '90': 0.9,
271
+ '95': 0.95,
272
+ '100': 1,
273
+ } as const
274
+
275
+ // ─── Exported tokens object ───────────────────────────────────────────────────
276
+
277
+ export const tokens = {
278
+ color: colorTokens,
279
+ spacing: spacingTokens,
280
+ fontSize: fontSizeTokens,
281
+ fontFamily: fontFamilyTokens,
282
+ fontWeight: fontWeightTokens,
283
+ lineHeight: lineHeightTokens,
284
+ letterSpacing: letterSpacingTokens,
285
+ radius: radiusTokens,
286
+ shadow: shadowTokens,
287
+ duration: durationTokens,
288
+ easing: easingTokens,
289
+ zIndex: zIndexTokens,
290
+ opacity: opacityTokens,
291
+ } as const
292
+
293
+ // ─── Types ───────────────────────────────────────────────────────────────────
294
+
295
+ export type Tokens = typeof tokens
296
+ export type ColorPalette = keyof typeof colorTokens
297
+ export type SpacingKey = keyof typeof spacingTokens
298
+ export type FontSizeKey = keyof typeof fontSizeTokens
299
+ export type FontFamilyKey = keyof typeof fontFamilyTokens
300
+ export type FontWeightKey = keyof typeof fontWeightTokens
301
+ export type LineHeightKey = keyof typeof lineHeightTokens
302
+ export type LetterSpacingKey = keyof typeof letterSpacingTokens
303
+ export type RadiusKey = keyof typeof radiusTokens
304
+ export type ShadowKey = keyof typeof shadowTokens
305
+ export type DurationKey = keyof typeof durationTokens
306
+ export type EasingKey = keyof typeof easingTokens
307
+ export type ZIndexKey = keyof typeof zIndexTokens
308
+ export type OpacityKey = keyof typeof opacityTokens
309
+
310
+ // Convenience: extract all shade keys from a palette (e.g. '50' | '100' | ...)
311
+ export type ColorShade<P extends ColorPalette> =
312
+ typeof colorTokens[P] extends Record<string, string>
313
+ ? keyof typeof colorTokens[P]
314
+ : never
package/src/types.ts ADDED
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @mastors/core — src/types.ts
3
+ * Shared TypeScript type definitions for the Mastors ecosystem.
4
+ */
5
+
6
+ export type MastorsConfig = {
7
+ prefix?: string
8
+ important?: boolean
9
+ darkMode?: 'class' | 'media'
10
+ rtl?: boolean
11
+ }
12
+
13
+ export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'
14
+
15
+ export type ThemeMode = 'light' | 'dark' | 'system'
16
+
17
+ export type ColorPaletteName = 'primary' | 'neutral' | 'success' | 'warning' | 'error' | 'info'
18
+ export type ColorShadeValue = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | '950'
19
+
20
+ export type SpacingScale =
21
+ | '0' | 'px' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4'
22
+ | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '16'
23
+ | '20' | '24' | '28' | '32' | '36' | '40' | '44' | '48' | '52'
24
+ | '56' | '60' | '64' | '72' | '80' | '96'
25
+
26
+ export type RadiusScale = 'none' | 'sm' | 'base' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full'
27
+
28
+ export type ShadowScale = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'inner' | 'none'
29
+
30
+ export type ZIndexScale = 'base' | 'raised' | 'dropdown' | 'sticky' | 'overlay' | 'modal' | 'toast' | 'tooltip' | 'max'
31
+
32
+ export type DurationScale = '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000'
33
+
34
+ export type EasingScale = 'linear' | 'in' | 'out' | 'in-out' | 'bounce'
35
+
36
+ export type FontSizeScale =
37
+ | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl'
38
+ | '5xl' | '6xl' | '7xl' | '8xl' | '9xl'
39
+
40
+ export type FontFamilyScale = 'sans' | 'serif' | 'mono'
41
+
42
+ export type FontWeightScale =
43
+ | 'thin' | 'extralight' | 'light' | 'normal' | 'medium'
44
+ | 'semibold' | 'bold' | 'extrabold' | 'black'
45
+
46
+ export type LineHeightScale = 'none' | 'tight' | 'snug' | 'normal' | 'relaxed' | 'loose'
47
+
48
+ export type LetterSpacingScale = 'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest'
49
+
50
+ export type OpacityScale =
51
+ | '0' | '5' | '10' | '15' | '20' | '25' | '30' | '40'
52
+ | '50' | '60' | '70' | '75' | '80' | '90' | '95' | '100'
package/postinstall.js DELETED
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
- // postinstall.js — Mastors ecosystem welcome script
3
- // Runs automatically after: npm install @mastors/core
4
-
5
- 'use strict'
6
-
7
- const RESET = '\x1b[0m'
8
- const BOLD = '\x1b[1m'
9
- const DIM = '\x1b[2m'
10
- const GREEN = '\x1b[32m'
11
- const CYAN = '\x1b[36m'
12
- const YELLOW = '\x1b[33m'
13
- const WHITE = '\x1b[37m'
14
- const GRAY = '\x1b[90m'
15
-
16
- function line(char = '─', len = 52) {
17
- return GRAY + char.repeat(len) + RESET
18
- }
19
-
20
- const message = `
21
- ${line()}
22
- ${BOLD}${WHITE} ✦ Thanks for installing Mastors!${RESET}
23
- ${line()}
24
-
25
- ${BOLD} Installed:${RESET}
26
- ${GREEN}✔${RESET} @mastors/core
27
-
28
- ${BOLD} Optional packages:${RESET}
29
- ${GREEN}✔${RESET} @mastors/flexer ${DIM}npm install @mastors/flexer${RESET}
30
- ${GREEN}✔${RESET} @mastors/gridder ${DIM}npm install @mastors/gridder${RESET}
31
- ${CYAN}◌${RESET} @mastors/typography ${GRAY}coming soon${RESET}
32
- ${CYAN}◌${RESET} @mastors/themes ${GRAY}coming soon${RESET}
33
- ${CYAN}◌${RESET} @mastors/animator ${GRAY}coming soon${RESET}
34
-
35
- ${BOLD} Documentation:${RESET}
36
- ${YELLOW}https://mastorscdn.kehem.com${RESET}
37
-
38
- ${line()}
39
- `
40
-
41
- process.stdout.write(message)