@stacksjs/types 0.52.10 → 0.56.3

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 (81) hide show
  1. package/dist/index.d.ts +2111 -39
  2. package/dist/index.mjs +112 -39
  3. package/package.json +24 -18
  4. package/dist/app.d.ts +0 -108
  5. package/dist/app.mjs +0 -0
  6. package/dist/auto-imports.d.ts +0 -1
  7. package/dist/auto-imports.mjs +0 -0
  8. package/dist/build.d.ts +0 -2
  9. package/dist/build.mjs +0 -0
  10. package/dist/cache.d.ts +0 -69
  11. package/dist/cache.mjs +0 -0
  12. package/dist/cdn.d.ts +0 -15
  13. package/dist/cdn.mjs +0 -0
  14. package/dist/cli.d.ts +0 -280
  15. package/dist/cli.mjs +0 -88
  16. package/dist/components.d.ts +0 -60
  17. package/dist/components.mjs +0 -0
  18. package/dist/cron-jobs.d.ts +0 -16
  19. package/dist/cron-jobs.mjs +0 -0
  20. package/dist/database.d.ts +0 -32
  21. package/dist/database.mjs +0 -0
  22. package/dist/debug.d.ts +0 -6
  23. package/dist/debug.mjs +0 -0
  24. package/dist/deploy.d.ts +0 -9
  25. package/dist/deploy.mjs +0 -0
  26. package/dist/dns.d.ts +0 -43
  27. package/dist/dns.mjs +0 -0
  28. package/dist/docs.d.ts +0 -3
  29. package/dist/docs.mjs +0 -0
  30. package/dist/errors.d.ts +0 -1
  31. package/dist/errors.mjs +0 -6
  32. package/dist/events.d.ts +0 -22
  33. package/dist/events.mjs +0 -0
  34. package/dist/exit-code.d.ts +0 -10
  35. package/dist/exit-code.mjs +0 -6
  36. package/dist/fs.d.ts +0 -22
  37. package/dist/fs.mjs +0 -0
  38. package/dist/git.d.ts +0 -128
  39. package/dist/git.mjs +0 -0
  40. package/dist/hashing.d.ts +0 -102
  41. package/dist/hashing.mjs +0 -0
  42. package/dist/i18n.d.ts +0 -19
  43. package/dist/i18n.mjs +0 -0
  44. package/dist/inspect.d.ts +0 -9
  45. package/dist/inspect.mjs +0 -0
  46. package/dist/layout.d.ts +0 -7
  47. package/dist/layout.mjs +0 -0
  48. package/dist/library.d.ts +0 -132
  49. package/dist/library.mjs +0 -0
  50. package/dist/manifest.d.ts +0 -9
  51. package/dist/manifest.mjs +0 -0
  52. package/dist/markdown.d.ts +0 -167
  53. package/dist/markdown.mjs +0 -0
  54. package/dist/model.d.ts +0 -41
  55. package/dist/model.mjs +0 -0
  56. package/dist/notifications.d.ts +0 -164
  57. package/dist/notifications.mjs +0 -0
  58. package/dist/pages.d.ts +0 -10
  59. package/dist/pages.mjs +0 -0
  60. package/dist/payments.d.ts +0 -59
  61. package/dist/payments.mjs +0 -0
  62. package/dist/promise.d.ts +0 -1
  63. package/dist/promise.mjs +0 -0
  64. package/dist/pwa.d.ts +0 -7
  65. package/dist/pwa.mjs +0 -0
  66. package/dist/reactivity.d.ts +0 -1
  67. package/dist/reactivity.mjs +0 -0
  68. package/dist/router.d.ts +0 -42
  69. package/dist/router.mjs +0 -0
  70. package/dist/search-engine.d.ts +0 -143
  71. package/dist/search-engine.mjs +0 -0
  72. package/dist/ssg.d.ts +0 -2
  73. package/dist/ssg.mjs +0 -0
  74. package/dist/stacks.d.ts +0 -163
  75. package/dist/stacks.mjs +0 -0
  76. package/dist/tables.d.ts +0 -52
  77. package/dist/tables.mjs +0 -0
  78. package/dist/ui.d.ts +0 -180
  79. package/dist/ui.mjs +0 -0
  80. package/dist/utils.d.ts +0 -30
  81. package/dist/utils.mjs +0 -0
package/dist/ui.d.ts DELETED
@@ -1,180 +0,0 @@
1
- import type { UserShortcuts } from 'unocss';
2
- export type Font = 'inter' | 'mona' | 'hubot';
3
- export type Icon = 'heroicon-outline' | 'heroicon-solid';
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';
10
- export interface WebFontMeta {
11
- name: string;
12
- weights?: (string | number)[];
13
- italic?: boolean;
14
- provider?: WebFontsProviders;
15
- }
16
- /**
17
- * **UI Engine Options**
18
- *
19
- * This type defines all of your UI Engine options. Because Stacks is fully-typed, you may
20
- * hover any of the options below and the definitions will be provided. In case you
21
- * have any questions, feel free to reach out via Discord or GitHub Discussions.
22
- */
23
- export interface UiOptions {
24
- /**
25
- * **Shortcuts**
26
- *
27
- * Shortcuts provide you with the ability to combine
28
- * utility names for reusability purposes.
29
- *
30
- * @example
31
- * ```
32
- * shortcuts: {
33
- * 'btn': 'px-4 py-2 rounded text-white bg-blue-500',
34
- * 'btn-lg': 'btn px-6 py-3',
35
- * }
36
- * ```
37
- */
38
- shortcuts: Shortcuts;
39
- /**
40
- * **Safelist**
41
- *
42
- * Use the `safelist` option to ensure the generation of
43
- * those utility classes. This is useful when certain
44
- * class names don’t exist in your content files.
45
- *
46
- * @example
47
- * ```ts
48
- * safelist: [
49
- * 'btn',
50
- * 'btn-lg',
51
- * 'btn-blue',
52
- * 'btn-blue-500',
53
- * ]
54
- */
55
- safelist: string;
56
- /**
57
- * **Trigger String**
58
- *
59
- * The "trigger string" defines the class name markup
60
- * you want to add into your components.
61
- *
62
- * @default ':stx:'
63
- *
64
- * @example
65
- * ```ts
66
- * trigger: ':stx:'
67
- * ```
68
- */
69
- trigger?: string;
70
- /**
71
- * **Class Prefix**
72
- *
73
- * The prefix for the compiled class name. When transforming
74
- * all utility classes into a single class, this prefix
75
- * will be added to the generated CSS class name.
76
- *
77
- * @default 'stx-'
78
- *
79
- * @example
80
- * ```ts
81
- * prefix: 'stx-'
82
- * ```
83
- */
84
- classPrefix?: string;
85
- /**
86
- * **Hash Function**
87
- *
88
- * The hash function used to generate the class name.
89
- *
90
- * @example
91
- * ```ts
92
- * hash: (str: string) => {
93
- * return str
94
- * .split('')
95
- * .reduce((a, b) => {
96
- * a = ((a << 5) - a) + b.charCodeAt(0)
97
- * return a & a
98
- * }, 0)
99
- * .toString(36)
100
- * }
101
- */
102
- hashFn?: (str: string) => string;
103
- /**
104
- * **CSS Resets—Preset**
105
- *
106
- * Define a standard of reset CSS stylesheets. By default, the Tailwind
107
- * reset styles are utilized. You may set this value to `null`
108
- * if you prefer not applying any default stylesheets.
109
- *
110
- * @url https://www.npmjs.com/package/@unocss/reset
111
- * @todo preset needs to be added via a Vite plugin on development & build
112
- * @example
113
- * ```ts
114
- * reset: 'tailwind'
115
- * ```
116
- */
117
- reset?: ResetPreset;
118
- /**
119
- * **Fonts**
120
- *
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.
124
- *
125
- * @see https://stacks.ow3.org/fonts
126
- * @example applies the same font for all platforms _(web, email, desktop, and mobile)_
127
- * ```ts
128
- * fonts: {
129
- * title: 'Mona',
130
- * text: 'Hubot'
131
- * }
132
- * ```
133
- * @example
134
- * ```ts
135
- * fonts: {
136
- * web: {
137
- * title: 'Inter',
138
- * text: 'Mona'
139
- * },
140
- * desktop: {
141
- * title: 'Mona',
142
- * text: 'Inter'
143
- * },
144
- * }
145
- * ```
146
- */
147
- fonts?: Record<FontFor, FontInfo> | {
148
- [key in FontFor]: FontInfo;
149
- };
150
- useWebFonts?: boolean | WebFontsProviders;
151
- /**
152
- * **Icon Sets**
153
- *
154
- * This value defines the icon sets you want to use. When using icons, they
155
- * are displayed utilizing a technique called "icons in pure css."
156
- * Learn more here https://antfu.me/posts/icons-in-pure-css.
157
- *
158
- * @see https://stacks.ow3.org/config/icons — list of available icon sets
159
- * @todo implement this into Vite build flow
160
- * @example
161
- * ```ts
162
- * icons: ['heroicons']
163
- * ```
164
- * @example
165
- * ```html
166
- * <i class="i-heroicons-outline-book-open w-8 h-8 text-gray-500" aria-hidden="true" />
167
- * ```
168
- */
169
- icons: Icon | Icon[];
170
- }
171
- export type Shortcuts = UserShortcuts;
172
- /**
173
- * **Style Reset — Preset**
174
- *
175
- * This value sets the "reset preset." A preset defines certain
176
- * CSS defaults to be applied.
177
- *
178
- * @default "tailwind"
179
- */
180
- export type ResetPreset = 'tailwind' | 'normalize' | 'sanitize' | 'eric-meyer' | 'antfu' | null;
package/dist/ui.mjs DELETED
File without changes
package/dist/utils.d.ts DELETED
@@ -1,30 +0,0 @@
1
- /**
2
- * Null or whatever.
3
- */
4
- export type Nullable<T> = T | null | undefined;
5
- /**
6
- * Function
7
- */
8
- export type Fn<T = void> = () => T;
9
- /**
10
- * Array, or not yet
11
- */
12
- export type Arrayable<T> = T | Array<T>;
13
- /**
14
- * Constructor.
15
- */
16
- export type Constructor<T = void> = new (...args: any[]) => T;
17
- /**
18
- * Defines an intersection type of all union items.
19
- *
20
- * @param U Union of any types that will be intersected.
21
- * @returns U items intersected
22
- * @see https://stackoverflow.com/a/50375286/9259330
23
- */
24
- export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
25
- export type MergeInsertions<T> = T extends object ? {
26
- [K in keyof T]: MergeInsertions<T[K]>;
27
- } : T;
28
- export type DeepMerge<F, S> = MergeInsertions<{
29
- [K in keyof F | keyof S]: K extends keyof S & keyof F ? DeepMerge<F[K], S[K]> : K extends keyof S ? S[K] : K extends keyof F ? F[K] : never;
30
- }>;
package/dist/utils.mjs DELETED
File without changes