@nebutra/tokens 0.1.3 → 3.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 (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/brands/README.md +66 -0
  3. package/brands/cosmos/DESIGN.md +356 -0
  4. package/brands/cosmos/brand.json +209 -0
  5. package/brands/cosmos/refero-tokens.json +312 -0
  6. package/brands/gsap/brand.json +1 -27
  7. package/brands/linear/DESIGN.md +478 -0
  8. package/brands/linear/brand.json +2 -19
  9. package/brands/notion/brand.json +2 -28
  10. package/brands/raycast/brand.json +2 -17
  11. package/brands/stripe/brand.json +1 -16
  12. package/brands/vanta/brand.json +1 -38
  13. package/brands/vercel/brand.json +1 -18
  14. package/dist/brand-package/index.d.ts +13 -7
  15. package/dist/brand-package/index.js +2290 -34
  16. package/dist/brand-package/index.js.map +1 -1
  17. package/dist/brand-package/use-brand.d.ts +1 -1
  18. package/dist/brand-package/use-brand.js +957 -5
  19. package/dist/brand-package/use-brand.js.map +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +2417 -22
  22. package/dist/index.js.map +1 -1
  23. package/dist/{use-brand-C8d4DPqE.d.ts → use-brand-ClmvK_lC.d.ts} +19 -3
  24. package/dist/values.d.ts +1192 -0
  25. package/dist/values.js +518 -0
  26. package/dist/values.js.map +1 -0
  27. package/package.json +16 -4
  28. package/recipe.css +36 -2
  29. package/skins/cosmos.css +239 -0
  30. package/skins/gsap.css +32 -20
  31. package/skins/linear.css +54 -17
  32. package/skins/notion.css +36 -25
  33. package/skins/raycast.css +37 -19
  34. package/skins/stripe.css +34 -15
  35. package/skins/vanta.css +34 -30
  36. package/skins/vercel.css +55 -19
  37. package/styles.css +492 -149
  38. package/dist/chunk-ALJTP5HL.js +0 -881
  39. package/dist/chunk-ALJTP5HL.js.map +0 -1
  40. package/dist/chunk-RGUJQOLH.js +0 -1582
  41. package/dist/chunk-RGUJQOLH.js.map +0 -1
@@ -15,7 +15,6 @@
15
15
  "muted": "240 20% 93%",
16
16
  "mutedForeground": "238 11% 48%",
17
17
  "border": "240 17% 11%",
18
- "input": "0 0% 100%",
19
18
  "ring": "268 95% 39%",
20
19
  "destructive": "0 72% 51%",
21
20
  "destructiveForeground": "0 0% 100%",
@@ -44,7 +43,6 @@
44
43
  "destructive": "0 72% 51%",
45
44
  "destructiveForeground": "0 0% 100%",
46
45
  "border": "240 17% 11%",
47
- "input": "0 0% 100%",
48
46
  "ring": "268 95% 39%",
49
47
  "warning": "44 100% 53%",
50
48
  "warningForeground": "240 17% 11%",
@@ -72,42 +70,7 @@
72
70
  "typography": {
73
71
  "fontSans": "'Inter Variable', 'Inter', ui-sans-serif, system-ui, sans-serif",
74
72
  "fontDisplay": "'Reckless', 'Source Serif 4', 'Lora', ui-serif, Georgia, serif",
75
- "headingWeight": 500,
76
- "faces": [
77
- {
78
- "family": "Inter Variable",
79
- "src": [
80
- {
81
- "url": "https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@latest/latin-wght-normal.woff2",
82
- "format": "woff2"
83
- }
84
- ],
85
- "weight": "100 900",
86
- "display": "swap"
87
- },
88
- {
89
- "family": "Reckless",
90
- "src": [
91
- {
92
- "url": "/brand-assets/reckless-regular.woff2",
93
- "format": "woff2"
94
- }
95
- ],
96
- "weight": 400,
97
- "display": "swap"
98
- },
99
- {
100
- "family": "Reckless",
101
- "src": [
102
- {
103
- "url": "/brand-assets/reckless-medium.woff2",
104
- "format": "woff2"
105
- }
106
- ],
107
- "weight": 500,
108
- "display": "swap"
109
- }
110
- ]
73
+ "headingWeight": 500
111
74
  },
112
75
  "motion": {
113
76
  "easeOut": "cubic-bezier(0.33, 1, 0.68, 1)",
@@ -21,7 +21,6 @@
21
21
  "destructive": "0 72% 51%",
22
22
  "destructiveForeground": "0 0% 100%",
23
23
  "border": "0 0% 92%",
24
- "input": "0 0% 100%",
25
24
  "ring": "0 0% 9%",
26
25
  "success": "133 50% 32%",
27
26
  "successForeground": "0 0% 100%",
@@ -48,7 +47,6 @@
48
47
  "destructive": "0 72% 51%",
49
48
  "destructiveForeground": "0 0% 100%",
50
49
  "border": "0 0% 92%",
51
- "input": "0 0% 100%",
52
50
  "ring": "0 0% 9%",
53
51
  "success": "133 50% 32%",
54
52
  "successForeground": "0 0% 100%",
@@ -75,7 +73,6 @@
75
73
  "destructive": "0 72% 51%",
76
74
  "destructiveForeground": "0 0% 100%",
77
75
  "border": "0 0% 16%",
78
- "input": "0 0% 4%",
79
76
  "ring": "0 0% 100%",
80
77
  "success": "133 49% 40%",
81
78
  "successForeground": "0 0% 100%",
@@ -106,20 +103,7 @@
106
103
  "fontSans": "'Geist Sans', 'Geist', ui-sans-serif, system-ui, sans-serif",
107
104
  "fontMono": "'Geist Mono', ui-monospace, Menlo, monospace",
108
105
  "fontDisplay": "'Geist Sans', 'Geist', ui-sans-serif, system-ui, sans-serif",
109
- "headingWeight": 450,
110
- "faces": [
111
- {
112
- "family": "Geist Sans",
113
- "src": [
114
- {
115
- "url": "https://cdn.jsdelivr.net/fontsource/fonts/geist-sans:vf@latest/latin-wght-normal.woff2",
116
- "format": "woff2"
117
- }
118
- ],
119
- "weight": "100 900",
120
- "display": "swap"
121
- }
122
- ]
106
+ "headingWeight": 450
123
107
  },
124
108
  "motion": {
125
109
  "easeOut": "cubic-bezier(0, 0, 0.2, 1)",
@@ -161,7 +145,6 @@
161
145
  "muted": "0 0% 92%",
162
146
  "mutedForeground": "0 0% 40%",
163
147
  "border": "0 0% 92%",
164
- "input": "0 0% 100%",
165
148
  "ring": "0 0% 9%",
166
149
  "destructive": "0 72% 51%",
167
150
  "destructiveForeground": "0 0% 100%",
@@ -1,5 +1,5 @@
1
- import { C as CompileResult, d as BrandPackage, m as ButtonDefaultStyle, E as ElevationStyle, D as Density, n as BrandPackageInput, o as BrandSemanticColors, a as BrandColorRoles, b as BrandElevationTokens, p as BrandModePalette } from '../use-brand-C8d4DPqE.js';
2
- export { A as ApplyBrandOptions, B as BRAND_STORAGE_KEY, q as BRAND_STYLE_ELEMENT_ID, s as BadgeDefaultStyle, t as BrandExtensions, c as BrandFontFace, v as BrandFontSource, w as BrandIframePreviewOptions, x as BrandModes, e as BrandRadii, f as BrandRecipe, y as BrandRecipeInput, z as BrandTypography, F as CssColor, H as HslChannels, U as UseBrandIframePreviewResult, G as UseBrandOptions, I as UseBrandResult, g as applyBrandCss, h as applyBrandPackage, i as applyBrandToIframe, j as clearBrand, k as getActiveBrandId, r as restorePersistedBrand, u as useBrand, l as useBrandIframePreview } from '../use-brand-C8d4DPqE.js';
1
+ import { C as CompileResult, e as BrandPackage, o as ButtonDefaultStyle, E as ElevationStyle, D as Density, p as BrandPackageInput, q as BrandSemanticColors, a as BrandColorRoles, b as BrandElevationTokens, s as BrandModePalette } from '../use-brand-ClmvK_lC.js';
2
+ export { A as ApplyBrandOptions, B as BRAND_STORAGE_KEY, t as BRAND_STYLE_ELEMENT_ID, v as BadgeDefaultStyle, w as BrandExtensions, c as BrandFontFace, x as BrandFontSource, d as BrandIframePreviewOptions, y as BrandModes, f as BrandRadii, g as BrandRecipe, z as BrandRecipeInput, F as BrandTypography, G as CssColor, H as HslChannels, I as UseBrandIframePreviewResult, U as UseBrandOptions, h as UseBrandResult, i as applyBrandCss, j as applyBrandPackage, l as clearBrand, m as getActiveBrandId, r as restorePersistedBrand } from '../use-brand-ClmvK_lC.js';
3
3
  import 'react';
4
4
 
5
5
  /**
@@ -43,19 +43,25 @@ type EmitBrandCssMode =
43
43
  | "scoped";
44
44
  interface EmitBrandCssOptions {
45
45
  /**
46
- * `global` (default): `:root` + `html[data-brand]` — one import recolors the app.
46
+ * `global` (default): `:root` + `<root>[data-brand]` — one import recolors the app.
47
47
  * Single-mode dark packs also include `.dark`.
48
48
  * Dual-mode packs (`modes.light` + `modes.dark`) emit separate light/dark color blocks.
49
- * `scoped`: only `html[data-brand]` (+ `html.dark[data-brand]` when dual).
49
+ * `scoped`: only `<root>[data-brand]` (+ `<root>.dark[data-brand]` when dual).
50
50
  */
51
51
  mode?: EmitBrandCssMode;
52
+ /**
53
+ * Element the carrier attaches to. Defaults to `html` — the app-level swap.
54
+ * A subtree preview passes its own root (e.g. `.theme-preview-artboard`) so
55
+ * the emitted CSS cannot leak out of the preview.
56
+ */
57
+ root?: string;
52
58
  }
53
59
  /** Global single-skin selector list — single-mode packs only. */
54
- declare function emitGlobalSkinSelector(brandId: string, darkDefault: boolean): string;
60
+ declare function emitGlobalSkinSelector(brandId: string, darkDefault: boolean, root?: string): string;
55
61
  /** Light mode selector (dual-mode). */
56
- declare function emitLightModeSelector(brandId: string, mode: EmitBrandCssMode): string;
62
+ declare function emitLightModeSelector(brandId: string, mode: EmitBrandCssMode, root?: string): string;
57
63
  /** Dark mode selector (dual-mode) — never paints light colors under .dark. */
58
- declare function emitDarkModeSelector(brandId: string, mode: EmitBrandCssMode): string;
64
+ declare function emitDarkModeSelector(brandId: string, mode: EmitBrandCssMode, root?: string): string;
59
65
  /**
60
66
  * Emit a single opt-in skin CSS file from a Brand Package.
61
67
  */