@stacksjs/types 0.58.71 → 0.58.72

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 (3) hide show
  1. package/package.json +5 -5
  2. package/src/router.ts +1 -1
  3. package/src/ui.ts +16 -24
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.58.71",
4
+ "version": "0.58.72",
5
5
  "description": "The Stacks framework types.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -62,7 +62,7 @@
62
62
  "@types/fs-extra": "^11.0.4",
63
63
  "@types/markdown-it-link-attributes": "^3.0.4",
64
64
  "@types/minimatch": "^5.1.2",
65
- "@types/node": "^20.11.17",
65
+ "@types/node": "^20.11.19",
66
66
  "@types/nprogress": "^0.2.3",
67
67
  "@vinejs/vine": "^1.7.1",
68
68
  "cac": "^6.7.14",
@@ -73,15 +73,15 @@
73
73
  "unocss": "^0.58.5",
74
74
  "unplugin-auto-import": "^0.17.5",
75
75
  "unplugin-vue-components": "^0.26.0",
76
- "vite": "^5.1.1",
76
+ "vite": "^5.1.3",
77
77
  "vite-plugin-inspect": "^0.8.3",
78
- "vite-plugin-pwa": "^0.18.1",
78
+ "vite-plugin-pwa": "^0.18.2",
79
79
  "vite-ssg": "^0.23.6",
80
80
  "vitepress": "1.0.0-rc.42",
81
81
  "vue": "^3.4.19"
82
82
  },
83
83
  "devDependencies": {
84
- "aws-cdk-lib": "^2.127.0",
84
+ "aws-cdk-lib": "^2.128.0",
85
85
  "typescript": "^5.3.3"
86
86
  }
87
87
  }
package/src/router.ts CHANGED
@@ -43,7 +43,7 @@ export interface Route {
43
43
  url: string // used synonymously with uri
44
44
  method: HttpMethod
45
45
  pattern: RegExp
46
- callback: RouteCallback | ActionName | Action
46
+ callback: RouteCallback | ActionName | Action | Promise<any> // we may be able to improve the `Promise<any>` if we could narrow this type `import('../app/Actions/BuddyAction')`
47
47
  paramNames: string[]
48
48
  middleware?: string | string[]
49
49
  statusCode?: StatusCode
package/src/ui.ts CHANGED
@@ -1,14 +1,15 @@
1
1
  import type { UserShortcuts } from 'unocss'
2
+ import type { UserConfig } from '@unocss/core'
2
3
 
3
4
  export type Font = 'inter' | 'mona' | 'hubot'
4
5
  export type Icon = 'heroicons'
5
6
  export type WebFontsProviders = 'google' | 'bunny' | 'fontshare'
7
+ export type Shortcuts = UserShortcuts
6
8
 
7
9
  export interface FontInfo {
8
10
  title: string
9
11
  text: string
10
12
  }
11
- export type FontFor = 'email' | 'desktop' | 'mobile' | 'web'
12
13
 
13
14
  export interface WebFontMeta {
14
15
  name: string
@@ -134,29 +135,10 @@ export interface UiOptions {
134
135
  * for several local font providers. You may set this value to
135
136
  * `null` if you prefer not utilize any local fonts.
136
137
  *
137
- * @see https://stacks.ow3.org/fonts
138
- * @example applies the same font for all platforms _(web, email, desktop, and mobile)_
139
- * ```ts
140
- * fonts: {
141
- * title: 'Mona',
142
- * text: 'Hubot'
143
- * }
144
- * ```
145
- * @example
146
- * ```ts
147
- * fonts: {
148
- * web: {
149
- * title: 'Inter',
150
- * text: 'Mona'
151
- * },
152
- * desktop: {
153
- * title: 'Mona',
154
- * text: 'Inter'
155
- * },
156
- * }
138
+ * @see https://stacksjs.org/docs/fonts
157
139
  * ```
158
140
  */
159
- fonts?: Record<FontFor, FontInfo> | { [key in FontFor]: FontInfo }
141
+ fonts?: any
160
142
 
161
143
  useWebFonts?: boolean | WebFontsProviders
162
144
 
@@ -180,12 +162,22 @@ export interface UiOptions {
180
162
  */
181
163
  icons: Icon | Icon[]
182
164
  // icons: Record<string, () => Promise<any>>
165
+
166
+ theme: UserConfig['theme']
167
+ // plugins: UserConfig['plugins']
168
+ // corePlugins: UserConfig['corePlugins']
169
+ variants: UserConfig['variants']
170
+ layers: UserConfig['layers']
171
+ // darkMode: UserConfig['darkMode']
172
+ // extend: UserConfig['extend']
173
+ // screens: UserConfig['screens']
174
+ // spacing: UserConfig['spacing']
175
+ // backgroundColor: UserConfig['backgroundColor']
176
+ // backgroundImage: UserConfig['backgroundImage']
183
177
  }
184
178
 
185
179
  export type UiConfig = Partial<UiOptions>
186
180
 
187
- export type Shortcuts = UserShortcuts
188
-
189
181
  /**
190
182
  * **Style Reset — Preset**
191
183
  *