@stacksjs/types 0.38.3 → 0.39.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 (2) hide show
  1. package/dist/ui.d.ts +38 -1
  2. package/package.json +1 -1
package/dist/ui.d.ts CHANGED
@@ -1,4 +1,13 @@
1
1
  import type { UserShortcuts } from 'unocss';
2
+ export declare type Font = 'inter' | 'mona' | 'hubot';
3
+ export declare type Icon = 'heroicon-outline' | 'heroicon-solid';
4
+ export declare type WebFontsProviders = 'google' | 'bunny' | 'fontshare' | 'none';
5
+ export interface WebFontMeta {
6
+ name: string;
7
+ weights?: (string | number)[];
8
+ italic?: boolean;
9
+ provider?: WebFontsProviders;
10
+ }
2
11
  /**
3
12
  * ### UI Engine Options
4
13
  *
@@ -101,6 +110,34 @@ export interface UiOptions {
101
110
  * ```
102
111
  */
103
112
  reset?: ResetPreset;
113
+ /**
114
+ * ### Fonts
115
+ *
116
+ * Define the local fonts you want to use. By default, Stacks provides
117
+ * support for several local font providers. You may set this value
118
+ * to `null` if you prefer not utilize any local fonts.
119
+ *
120
+ * @see https://stacks.ow3.org/fonts
121
+ * @example
122
+ * ```ts
123
+ * fonts: 'mona-lisa'
124
+ * ```
125
+ */
126
+ fonts?: Record<string, WebFontMeta | string | (WebFontMeta | string)[]>;
127
+ /**
128
+ * ### Web Fonts
129
+ *
130
+ * Define the web fonts you want to use. By default, Stacks provides
131
+ * support for several web font providers. You may set this value
132
+ * to `null` if you prefer not utilize any web fonts.
133
+ *
134
+ * @see https://stacks.ow3.org/fonts
135
+ * @example
136
+ * ```ts
137
+ * webFonts: 'inter'
138
+ * ```
139
+ */
140
+ webFonts?: Record<string, WebFontMeta | string | (WebFontMeta | string)[]>;
104
141
  /**
105
142
  * ### Icon Sets
106
143
  *
@@ -119,7 +156,7 @@ export interface UiOptions {
119
156
  * <i class="i-heroicons-outline-book-open w-8 h-8 text-gray-500" aria-hidden="true" />
120
157
  * ```
121
158
  */
122
- icons: Record<string, () => Promise<any>>;
159
+ icons: Icon | Icon[];
123
160
  }
124
161
  export declare type Shortcuts = UserShortcuts;
125
162
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.38.3",
4
+ "version": "0.39.0",
5
5
  "packageManager": "pnpm@7.15.0",
6
6
  "description": "The Stacks framework types.",
7
7
  "author": "Chris Breuer",