@marvalt/wadapter 2.3.21 → 2.3.22
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.
- package/dist/index.d.ts +51 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +132 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +136 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/theme-styles.d.ts +50 -0
- package/dist/utils/theme-styles.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license GPL-3.0-or-later
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the MarVAlt Open SDK.
|
|
5
|
+
* Copyright (c) 2025 Vibune Pty Ltd.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
15
|
+
* See the GNU General Public License for more details.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* List of popular Google Fonts (for detection and validation)
|
|
19
|
+
*/
|
|
20
|
+
export declare const GOOGLE_FONTS: readonly ["Montserrat", "Open Sans", "Roboto", "Lato", "Poppins", "Source Sans Pro", "Raleway", "Oswald", "Playfair Display", "Merriweather", "Ubuntu", "Nunito", "Inter", "Work Sans", "Crimson Text", "Libre Baskerville", "PT Sans", "PT Serif", "Dancing Script", "Bebas Neue", "Fira Sans", "Noto Sans", "Noto Serif", "Rubik", "Mukta", "Cabin", "Dosis", "Arimo", "Titillium Web"];
|
|
21
|
+
/**
|
|
22
|
+
* Sanitize font name - removes "family" prefix and cleans the name
|
|
23
|
+
*
|
|
24
|
+
* @param fontName - Font name to sanitize
|
|
25
|
+
* @returns Sanitized font name
|
|
26
|
+
*/
|
|
27
|
+
export declare function sanitizeFontName(fontName: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Format font-family CSS value with quotes and fallback
|
|
30
|
+
*
|
|
31
|
+
* @param fontName - Font name to format
|
|
32
|
+
* @param fallback - Fallback font (default: 'sans-serif')
|
|
33
|
+
* @returns Formatted font-family CSS value
|
|
34
|
+
*/
|
|
35
|
+
export declare function formatFontFamily(fontName: string, fallback?: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Load Google Font dynamically via link tag
|
|
38
|
+
*
|
|
39
|
+
* @param fontName - Google Font name to load
|
|
40
|
+
* @param weights - Font weights to load (default: 400, 500, 600, 700)
|
|
41
|
+
*/
|
|
42
|
+
export declare function loadGoogleFont(fontName: string, weights?: number[]): void;
|
|
43
|
+
/**
|
|
44
|
+
* Check if a font name is a Google Font
|
|
45
|
+
*
|
|
46
|
+
* @param fontName - Font name to check
|
|
47
|
+
* @returns True if the font is a Google Font
|
|
48
|
+
*/
|
|
49
|
+
export declare function isGoogleFont(fontName: string): boolean;
|
|
50
|
+
//# sourceMappingURL=theme-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-styles.d.ts","sourceRoot":"","sources":["../../src/utils/theme-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,2XA8Bf,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOzD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAqB,GAAG,MAAM,CAU1F;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,MAAM,EAAyB,GACvC,IAAI,CAqCN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAStD"}
|
package/package.json
CHANGED