@stacksjs/types 0.70.86 → 0.70.87
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/package.json +19 -5
- package/src/ai.ts +0 -41
- package/src/analytics.ts +0 -58
- package/src/api.ts +0 -77
- package/src/app.ts +0 -189
- package/src/attributes.ts +0 -5
- package/src/auth.ts +0 -161
- package/src/auto-imports.ts +0 -8
- package/src/binary.ts +0 -13
- package/src/cache.ts +0 -325
- package/src/cdn.ts +0 -17
- package/src/chat.ts +0 -193
- package/src/cli.ts +0 -445
- package/src/cloud.ts +0 -381
- package/src/cms.ts +0 -14
- package/src/commerce.ts +0 -18
- package/src/components.ts +0 -62
- package/src/configure.ts +0 -13
- package/src/cors.ts +0 -86
- package/src/cron-jobs.ts +0 -146
- package/src/dashboard.ts +0 -218
- package/src/database.ts +0 -117
- package/src/dependencies.ts +0 -69
- package/src/deploy.ts +0 -17
- package/src/dns.ts +0 -470
- package/src/docs.ts +0 -27
- package/src/email.ts +0 -511
- package/src/env.ts +0 -1
- package/src/errors.ts +0 -110
- package/src/events.ts +0 -37
- package/src/exit-code.ts +0 -10
- package/src/file-systems.ts +0 -70
- package/src/git.ts +0 -133
- package/src/hashing.ts +0 -127
- package/src/helpers.ts +0 -9
- package/src/i18n.ts +0 -121
- package/src/index.ts +0 -80
- package/src/library.ts +0 -911
- package/src/logging.ts +0 -62
- package/src/manifest.ts +0 -9
- package/src/marketing.ts +0 -14
- package/src/model-dashboard-augmentation.ts +0 -51
- package/src/model-names.ts +0 -1
- package/src/model.ts +0 -353
- package/src/monitoring.ts +0 -14
- package/src/native.ts +0 -0
- package/src/notifications.ts +0 -153
- package/src/oauth.ts +0 -488
- package/src/pages.ts +0 -10
- package/src/payments.ts +0 -440
- package/src/phone.ts +0 -78
- package/src/ports.ts +0 -20
- package/src/promise.ts +0 -1
- package/src/push.ts +0 -143
- package/src/queue.ts +0 -413
- package/src/reactivity.ts +0 -1
- package/src/realtime.ts +0 -584
- package/src/request.ts +0 -541
- package/src/response.ts +0 -16
- package/src/router.ts +0 -124
- package/src/saas.ts +0 -33
- package/src/scheduler.ts +0 -1
- package/src/search-engine.ts +0 -251
- package/src/security.ts +0 -23
- package/src/server.ts +0 -16
- package/src/services.ts +0 -211
- package/src/settings-config.ts +0 -10
- package/src/sms.ts +0 -265
- package/src/stack-extensions.ts +0 -184
- package/src/stacks.ts +0 -339
- package/src/storage.ts +0 -173
- package/src/table-names.ts +0 -1
- package/src/tables.ts +0 -57
- package/src/team.ts +0 -8
- package/src/ui.ts +0 -197
- package/src/utils.ts +0 -46
package/src/ui.ts
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
// Local mirror of crosswind's `Options` shape so we don't bring crosswind
|
|
2
|
-
// into @stacksjs/types as a hard dependency. Apps that import these types
|
|
3
|
-
// only need the structural surface (shortcuts/theme/variants); when full
|
|
4
|
-
// crosswind type fidelity is needed, projects can import directly from
|
|
5
|
-
// `crosswind`.
|
|
6
|
-
interface CrosswindOptions {
|
|
7
|
-
shortcuts?: unknown
|
|
8
|
-
theme?: unknown
|
|
9
|
-
variants?: unknown
|
|
10
|
-
[key: string]: unknown
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type Font = 'inter' | 'mona' | 'hubot'
|
|
14
|
-
export type Icon = 'heroicons' | 'hugeicons'
|
|
15
|
-
export type WebFontsProviders = 'google' | 'bunny' | 'fontshare'
|
|
16
|
-
export type Shortcuts = CrosswindOptions['shortcuts']
|
|
17
|
-
|
|
18
|
-
export interface FontInfo {
|
|
19
|
-
title: string
|
|
20
|
-
text: string
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface WebFontMeta {
|
|
24
|
-
name: string
|
|
25
|
-
weights?: (string | number)[]
|
|
26
|
-
italic?: boolean
|
|
27
|
-
provider?: WebFontsProviders
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* **UI Engine Options**
|
|
32
|
-
*
|
|
33
|
-
* This type defines all of your UI Engine options. Because Stacks is fully-typed, you may
|
|
34
|
-
* hover any of the options below and the definitions will be provided. In case you
|
|
35
|
-
* have any questions, feel free to reach out via Discord or GitHub Discussions.
|
|
36
|
-
*/
|
|
37
|
-
export interface UiOptions {
|
|
38
|
-
/**
|
|
39
|
-
* **Shortcuts**
|
|
40
|
-
*
|
|
41
|
-
* Shortcuts provide you with the ability to combine
|
|
42
|
-
* utility names for reusability purposes.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```
|
|
46
|
-
* config: {
|
|
47
|
-
* shortcuts: {
|
|
48
|
-
* 'btn': 'px-4 py-2 rounded text-white bg-blue-500',
|
|
49
|
-
* 'btn-lg': 'btn px-6 py-3',
|
|
50
|
-
* }
|
|
51
|
-
* }
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
shortcuts: Shortcuts
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* **Safelist**
|
|
58
|
-
*
|
|
59
|
-
* Use the `safelist` option to ensure the generation of
|
|
60
|
-
* those utility classes. This is useful when certain
|
|
61
|
-
* class names don’t exist in your content files.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* safelist: [
|
|
66
|
-
* 'btn',
|
|
67
|
-
* 'btn-lg',
|
|
68
|
-
* 'btn-blue',
|
|
69
|
-
* 'btn-blue-500',
|
|
70
|
-
* ]
|
|
71
|
-
*/
|
|
72
|
-
safelist: string
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* **Trigger String**
|
|
76
|
-
*
|
|
77
|
-
* The "trigger string" defines the class name markup
|
|
78
|
-
* you want to add into your components.
|
|
79
|
-
*
|
|
80
|
-
* @default ':stx:'
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```ts
|
|
84
|
-
* trigger: ':stx:'
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
|
-
trigger?: string
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* **Class Prefix**
|
|
91
|
-
*
|
|
92
|
-
* The prefix for the compiled class name. When transforming
|
|
93
|
-
* all utility classes into a single class, this prefix
|
|
94
|
-
* will be added to the generated CSS class name.
|
|
95
|
-
*
|
|
96
|
-
* @default 'stx-'
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* ```ts
|
|
100
|
-
* prefix: 'stx-'
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
classPrefix?: string
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* **Hash Function**
|
|
107
|
-
*
|
|
108
|
-
* The hash function used to generate the class name.
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* ```ts
|
|
112
|
-
* hash: (str: string) => {
|
|
113
|
-
* return str
|
|
114
|
-
* .split('')
|
|
115
|
-
* .reduce((a, b) => {
|
|
116
|
-
* a = ((a << 5) - a) + b.charCodeAt(0)
|
|
117
|
-
* return a & a
|
|
118
|
-
* }, 0)
|
|
119
|
-
* .toString(36)
|
|
120
|
-
* }
|
|
121
|
-
*/
|
|
122
|
-
hashFn?: (str: string) => string
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* **CSS Resets—Preset**
|
|
126
|
-
*
|
|
127
|
-
* Define a standard of reset CSS stylesheets. By default, the Tailwind
|
|
128
|
-
* reset styles are utilized. You may set this value to `null`
|
|
129
|
-
* if you prefer not applying any default stylesheets.
|
|
130
|
-
*
|
|
131
|
-
* @url https://github.com/cwcss/crosswind
|
|
132
|
-
* @todo preset needs to be added via a Vite plugin on development & build
|
|
133
|
-
* @example
|
|
134
|
-
* ```ts
|
|
135
|
-
* reset: 'tailwind'
|
|
136
|
-
* ```
|
|
137
|
-
*/
|
|
138
|
-
reset?: ResetPreset
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* **Fonts**
|
|
142
|
-
*
|
|
143
|
-
* Define the fonts you want to use. By default, Stacks provides support
|
|
144
|
-
* for several local font providers. You may set this value to
|
|
145
|
-
* `null` if you prefer not utilize any local fonts.
|
|
146
|
-
*
|
|
147
|
-
* @see https://stacksjs.com/docs/fonts
|
|
148
|
-
* ```
|
|
149
|
-
*/
|
|
150
|
-
fonts?: any
|
|
151
|
-
|
|
152
|
-
useWebFonts?: boolean | WebFontsProviders
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* **Icon Sets**
|
|
156
|
-
*
|
|
157
|
-
* This value defines the icon sets you want to use. When using icons, they
|
|
158
|
-
* are displayed utilizing a technique called "icons in pure css."
|
|
159
|
-
* Learn more here https://antfu.me/posts/icons-in-pure-css.
|
|
160
|
-
*
|
|
161
|
-
* @see https://stacksjs.com/config/icons — list of available icon sets
|
|
162
|
-
* @todo implement this into Vite build flow
|
|
163
|
-
* @example
|
|
164
|
-
* ```ts
|
|
165
|
-
* icons: ['heroicons']
|
|
166
|
-
* ```
|
|
167
|
-
* @example
|
|
168
|
-
* ```html
|
|
169
|
-
* <i class="h-8 w-8 text-gray-500 i-hugeicons-outline-book-open" aria-hidden="true" />
|
|
170
|
-
* ```
|
|
171
|
-
*/
|
|
172
|
-
icons: Icon | Icon[]
|
|
173
|
-
// icons: Record<string, () => Promise<any>>
|
|
174
|
-
|
|
175
|
-
theme: CrosswindOptions['theme']
|
|
176
|
-
// plugins: CrosswindOptions['plugins']
|
|
177
|
-
// corePlugins: CrosswindOptions['corePlugins']
|
|
178
|
-
variants: CrosswindOptions['variants']
|
|
179
|
-
// darkMode: UserConfig['darkMode']
|
|
180
|
-
// extend: UserConfig['extend']
|
|
181
|
-
// screens: UserConfig['screens']
|
|
182
|
-
// spacing: UserConfig['spacing']
|
|
183
|
-
// backgroundColor: UserConfig['backgroundColor']
|
|
184
|
-
// backgroundImage: UserConfig['backgroundImage']
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export type UiConfig = Partial<UiOptions>
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* **Style Reset — Preset**
|
|
191
|
-
*
|
|
192
|
-
* This value sets the "reset preset." A preset defines certain
|
|
193
|
-
* CSS defaults to be applied.
|
|
194
|
-
*
|
|
195
|
-
* @default "tailwind"
|
|
196
|
-
*/
|
|
197
|
-
export type ResetPreset = 'tailwind' | 'normalize' | 'sanitize' | 'eric-meyer' | 'antfu' | null
|
package/src/utils.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Null or whatever.
|
|
3
|
-
*/
|
|
4
|
-
export type Nullable<T> = T | null | undefined
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Function
|
|
8
|
-
*/
|
|
9
|
-
export type Fn<T = void> = () => T
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Array, or not yet
|
|
13
|
-
*/
|
|
14
|
-
export type Arrayable<T> = T | Array<T>
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Constructor.
|
|
18
|
-
*/
|
|
19
|
-
export type Constructor<T = void> = new (..._args: any[]) => T
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Defines an intersection type of all union items.
|
|
23
|
-
*
|
|
24
|
-
* @param U Union of any types that will be intersected.
|
|
25
|
-
* @returns U items intersected
|
|
26
|
-
* @see https://stackoverflow.com/a/50375286/9259330
|
|
27
|
-
*/
|
|
28
|
-
export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void
|
|
29
|
-
? I
|
|
30
|
-
: never
|
|
31
|
-
|
|
32
|
-
export type MergeInsertions<T> = T extends object ? { [K in keyof T]: MergeInsertions<T[K]> } : T
|
|
33
|
-
|
|
34
|
-
export type DeepMerge<F, S> = MergeInsertions<{
|
|
35
|
-
[K in keyof F | keyof S]: K extends keyof S & keyof F
|
|
36
|
-
? DeepMerge<F[K], S[K]>
|
|
37
|
-
: K extends keyof S
|
|
38
|
-
? S[K]
|
|
39
|
-
: K extends keyof F
|
|
40
|
-
? F[K]
|
|
41
|
-
: never
|
|
42
|
-
}>
|
|
43
|
-
|
|
44
|
-
export type DeepPartial<T> = {
|
|
45
|
-
[P in keyof T]?: DeepPartial<T[P]>
|
|
46
|
-
}
|