@orion-ds/react 1.1.0 → 1.1.2

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.
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Font Configuration for Orion Design System
3
+ *
4
+ * This module provides font URLs and utilities for loading Google Fonts
5
+ * required by each brand in the design system.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * import { GOOGLE_FONTS_URL, BRAND_FONTS } from '@orion-ds/react';
10
+ *
11
+ * // Add to your HTML <head>
12
+ * <link href={GOOGLE_FONTS_URL} rel="stylesheet" />
13
+ *
14
+ * // Or check which fonts a brand needs
15
+ * console.log(BRAND_FONTS.lemon); // ['Fugaz One', 'Work Sans', 'JetBrains Mono']
16
+ * ```
17
+ */
18
+ import type { Brand } from '../hooks/useTheme';
19
+ /**
20
+ * Font families used by each brand
21
+ */
22
+ export declare const BRAND_FONTS: Record<Brand, string[]>;
23
+ /**
24
+ * All unique font families used across all brands
25
+ */
26
+ export declare const ALL_FONTS: readonly ["Libre Baskerville", "DM Sans", "Inter", "JetBrains Mono", "Work Sans", "Poppins", "Fugaz One"];
27
+ /**
28
+ * Google Fonts URL with all fonts needed for all brands
29
+ *
30
+ * Add this to your HTML <head>:
31
+ * ```html
32
+ * <link rel="preconnect" href="https://fonts.googleapis.com">
33
+ * <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
34
+ * <link href="https://fonts.googleapis.com/css2?family=..." rel="stylesheet">
35
+ * ```
36
+ */
37
+ export declare const GOOGLE_FONTS_URL: string;
38
+ /**
39
+ * Preconnect URLs for faster font loading
40
+ */
41
+ export declare const FONT_PRECONNECT_URLS: readonly ["https://fonts.googleapis.com", "https://fonts.gstatic.com"];
42
+ /**
43
+ * Check if a font is loaded in the document
44
+ */
45
+ export declare function isFontLoaded(fontFamily: string): boolean;
46
+ /**
47
+ * Check if all fonts for a brand are loaded
48
+ */
49
+ export declare function areBrandFontsLoaded(brand: Brand): boolean;
50
+ /**
51
+ * Get missing fonts for a brand
52
+ */
53
+ export declare function getMissingFonts(brand: Brand): string[];
54
+ /**
55
+ * Wait for fonts to be loaded
56
+ */
57
+ export declare function waitForFonts(fonts: string[]): Promise<boolean>;
58
+ /**
59
+ * Generate the HTML link tags for Google Fonts
60
+ */
61
+ export declare function getFontLinkTags(): string;
62
+ //# sourceMappingURL=fonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAM/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,2GAQZ,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,QASb,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,oBAAoB,wEAGvB,CAAC;AAEX;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CASxD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAGzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAGtD;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAWpE;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAIxC"}
@@ -4,4 +4,5 @@
4
4
  * Utility functions and helpers for using Orion components.
5
5
  */
6
6
  export * from './icons';
7
+ export { BRAND_FONTS, ALL_FONTS, GOOGLE_FONTS_URL, FONT_PRECONNECT_URLS, isFontLoaded, areBrandFontsLoaded, getMissingFonts, waitForFonts, getFontLinkTags, } from './fonts';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC;AAGxB,OAAO,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,eAAe,GAChB,MAAM,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-ds/react",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Orion Design System - React component library with 27 AI-ready components",
5
5
  "author": "Orion Design System Team",
6
6
  "main": "dist/index.cjs",
@@ -68,7 +68,7 @@
68
68
  "react-dom": "^19.2.4"
69
69
  },
70
70
  "dependencies": {
71
- "@orion-ds/core": "workspace:*",
71
+ "@orion-ds/core": "^1.1.0",
72
72
  "lucide-react": "^0.563.0"
73
73
  },
74
74
  "devDependencies": {