@stacksjs/types 0.47.0 → 0.47.1

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 +28 -18
  2. package/package.json +3 -3
package/dist/ui.d.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  import type { UserShortcuts } from 'unocss';
2
2
  export type Font = 'inter' | 'mona' | 'hubot';
3
3
  export type Icon = 'heroicon-outline' | 'heroicon-solid';
4
- export type WebFontsProviders = 'google' | 'bunny' | 'fontshare' | 'none';
4
+ export type WebFontsProviders = 'google' | 'bunny' | 'fontshare';
5
+ export interface FontInfo {
6
+ title: string;
7
+ text: string;
8
+ }
9
+ export type FontFor = 'email' | 'desktop' | 'mobile' | 'web';
5
10
  export interface WebFontMeta {
6
11
  name: string;
7
12
  weights?: (string | number)[];
@@ -113,31 +118,36 @@ export interface UiOptions {
113
118
  /**
114
119
  * **Fonts**
115
120
  *
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.
121
+ * Define the fonts you want to use. By default, Stacks provides support
122
+ * for several local font providers. You may set this value to
123
+ * `null` if you prefer not utilize any local fonts.
119
124
  *
120
125
  * @see https://stacks.ow3.org/fonts
121
- * @example
126
+ * @example applies the same font for all platforms _(web, email, desktop, and mobile)_
122
127
  * ```ts
123
- * fonts: 'mona-lisa'
128
+ * fonts: {
129
+ * title: 'Mona',
130
+ * text: 'Hubot'
131
+ * }
124
132
  * ```
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
133
  * @example
136
134
  * ```ts
137
- * webFonts: 'inter'
135
+ * fonts: {
136
+ * web: {
137
+ * title: 'Inter',
138
+ * text: 'Mona'
139
+ * },
140
+ * desktop: {
141
+ * title: 'Mona',
142
+ * text: 'Inter'
143
+ * },
144
+ * }
138
145
  * ```
139
146
  */
140
- webFonts?: Record<string, WebFontMeta | string | (WebFontMeta | string)[]>;
147
+ fonts?: Record<FontFor, FontInfo> | {
148
+ [key in FontFor]: FontInfo;
149
+ };
150
+ useWebFonts?: boolean | WebFontsProviders;
141
151
  /**
142
152
  * **Icon Sets**
143
153
  *
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.47.0",
5
- "packageManager": "pnpm@7.20.0",
4
+ "version": "0.47.1",
5
+ "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks framework types.",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "engines": {
36
36
  "node": ">=v18.12.1",
37
- "pnpm": ">=7.20.0"
37
+ "pnpm": ">=7.21.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@mdit-vue/plugin-component": "^0.11.2",