shadcn-ember 0.0.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.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # shadcn-ember
2
+
3
+ A CLI for adding components to your Ember.js project.
4
+
5
+ ## Usage
6
+
7
+ Use the `init` command to initialize dependencies for a new project.
8
+
9
+ The `init` command installs dependencies, adds the `cn` util, configures `tailwind.config.js`, and CSS variables for the project.
10
+
11
+ ```bash
12
+ npx shadcn-ember init
13
+ ```
14
+
15
+ ## add
16
+
17
+ Use the `add` command to add components to your project.
18
+
19
+ The `add` command adds a component to your project and installs all required dependencies.
20
+
21
+ ```bash
22
+ npx shadcn-ember add [component]
23
+ ```
24
+
25
+ ### Example
26
+
27
+ ```bash
28
+ npx shadcn-ember add alert-dialog
29
+ ```
30
+
31
+ You can also run the command without any arguments to view a list of all available components:
32
+
33
+ ```bash
34
+ npx shadcn-ember add
35
+ ```
36
+
37
+ ## Documentation
38
+
39
+ Visit http://shadcn-ember.com to view the documentation.
40
+
41
+ ## Aknowledgements
42
+
43
+ This is a fork of `shadcn-vue` CLI, adapted for Ember.
44
+
45
+ ## License
46
+
47
+ Licensed under the [MIT license](https://github.com/IgnaceMaes/shadcn-ember/blob/main/LICENSE).
@@ -0,0 +1,313 @@
1
+ import { h as registryItemSchema, r as configSchema, u as registryIndexSchema } from "./index-DxzyGeF-.js";
2
+ import { z } from "zod";
3
+
4
+ //#region src/utils/get-config.d.ts
5
+
6
+ type Config = z.infer<typeof configSchema>;
7
+ //#endregion
8
+ //#region src/registry/api.d.ts
9
+ declare function getRegistry(name: string, options?: {
10
+ config?: Partial<Config>;
11
+ useCache?: boolean;
12
+ }): Promise<{
13
+ name: string;
14
+ homepage: string;
15
+ items: {
16
+ name: string;
17
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
18
+ description?: string | undefined;
19
+ title?: string | undefined;
20
+ $schema?: string | undefined;
21
+ extends?: string | undefined;
22
+ author?: string | undefined;
23
+ dependencies?: string[] | undefined;
24
+ devDependencies?: string[] | undefined;
25
+ registryDependencies?: string[] | undefined;
26
+ files?: ({
27
+ type: "registry:page" | "registry:file";
28
+ path: string;
29
+ target: string;
30
+ content?: string | undefined;
31
+ } | {
32
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
33
+ path: string;
34
+ content?: string | undefined;
35
+ target?: string | undefined;
36
+ })[] | undefined;
37
+ tailwind?: {
38
+ config?: {
39
+ theme?: Record<string, any> | undefined;
40
+ content?: string[] | undefined;
41
+ plugins?: string[] | undefined;
42
+ } | undefined;
43
+ } | undefined;
44
+ cssVars?: {
45
+ theme?: Record<string, string> | undefined;
46
+ light?: Record<string, string> | undefined;
47
+ dark?: Record<string, string> | undefined;
48
+ } | undefined;
49
+ css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
50
+ envVars?: Record<string, string> | undefined;
51
+ meta?: Record<string, any> | undefined;
52
+ docs?: string | undefined;
53
+ categories?: string[] | undefined;
54
+ }[];
55
+ }>;
56
+ declare function getRegistryItems(items: string[], options?: {
57
+ config?: Partial<Config>;
58
+ useCache?: boolean;
59
+ }): Promise<{
60
+ name: string;
61
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
62
+ description?: string | undefined;
63
+ title?: string | undefined;
64
+ $schema?: string | undefined;
65
+ extends?: string | undefined;
66
+ author?: string | undefined;
67
+ dependencies?: string[] | undefined;
68
+ devDependencies?: string[] | undefined;
69
+ registryDependencies?: string[] | undefined;
70
+ files?: ({
71
+ type: "registry:page" | "registry:file";
72
+ path: string;
73
+ target: string;
74
+ content?: string | undefined;
75
+ } | {
76
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
77
+ path: string;
78
+ content?: string | undefined;
79
+ target?: string | undefined;
80
+ })[] | undefined;
81
+ tailwind?: {
82
+ config?: {
83
+ theme?: Record<string, any> | undefined;
84
+ content?: string[] | undefined;
85
+ plugins?: string[] | undefined;
86
+ } | undefined;
87
+ } | undefined;
88
+ cssVars?: {
89
+ theme?: Record<string, string> | undefined;
90
+ light?: Record<string, string> | undefined;
91
+ dark?: Record<string, string> | undefined;
92
+ } | undefined;
93
+ css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
94
+ envVars?: Record<string, string> | undefined;
95
+ meta?: Record<string, any> | undefined;
96
+ docs?: string | undefined;
97
+ categories?: string[] | undefined;
98
+ }[]>;
99
+ declare function resolveRegistryItems(items: string[], options?: {
100
+ config?: Partial<Config>;
101
+ useCache?: boolean;
102
+ }): Promise<{
103
+ dependencies?: string[] | undefined;
104
+ devDependencies?: string[] | undefined;
105
+ files?: ({
106
+ type: "registry:page" | "registry:file";
107
+ path: string;
108
+ target: string;
109
+ content?: string | undefined;
110
+ } | {
111
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
112
+ path: string;
113
+ content?: string | undefined;
114
+ target?: string | undefined;
115
+ })[] | undefined;
116
+ tailwind?: {
117
+ config?: {
118
+ theme?: Record<string, any> | undefined;
119
+ content?: string[] | undefined;
120
+ plugins?: string[] | undefined;
121
+ } | undefined;
122
+ } | undefined;
123
+ cssVars?: {
124
+ theme?: Record<string, string> | undefined;
125
+ light?: Record<string, string> | undefined;
126
+ dark?: Record<string, string> | undefined;
127
+ } | undefined;
128
+ css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
129
+ envVars?: Record<string, string> | undefined;
130
+ docs?: string | undefined;
131
+ } | null>;
132
+ declare function getRegistriesConfig(cwd: string): Promise<{
133
+ registries: Record<string, string | {
134
+ url: string;
135
+ params?: Record<string, string> | undefined;
136
+ headers?: Record<string, string> | undefined;
137
+ }>;
138
+ }>;
139
+ declare function getShadcnRegistryIndex(): Promise<{
140
+ name: string;
141
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
142
+ description?: string | undefined;
143
+ title?: string | undefined;
144
+ $schema?: string | undefined;
145
+ extends?: string | undefined;
146
+ author?: string | undefined;
147
+ dependencies?: string[] | undefined;
148
+ devDependencies?: string[] | undefined;
149
+ registryDependencies?: string[] | undefined;
150
+ files?: ({
151
+ type: "registry:page" | "registry:file";
152
+ path: string;
153
+ target: string;
154
+ content?: string | undefined;
155
+ } | {
156
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
157
+ path: string;
158
+ content?: string | undefined;
159
+ target?: string | undefined;
160
+ })[] | undefined;
161
+ tailwind?: {
162
+ config?: {
163
+ theme?: Record<string, any> | undefined;
164
+ content?: string[] | undefined;
165
+ plugins?: string[] | undefined;
166
+ } | undefined;
167
+ } | undefined;
168
+ cssVars?: {
169
+ theme?: Record<string, string> | undefined;
170
+ light?: Record<string, string> | undefined;
171
+ dark?: Record<string, string> | undefined;
172
+ } | undefined;
173
+ css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
174
+ envVars?: Record<string, string> | undefined;
175
+ meta?: Record<string, any> | undefined;
176
+ docs?: string | undefined;
177
+ categories?: string[] | undefined;
178
+ }[] | undefined>;
179
+ declare function getRegistryStyles(): Promise<{
180
+ name: string;
181
+ label: string;
182
+ }[]>;
183
+ declare function getRegistryIcons(): Promise<Record<string, Record<string, string>>>;
184
+ declare function getRegistryBaseColors(): Promise<readonly [{
185
+ readonly name: "neutral";
186
+ readonly label: "Neutral";
187
+ }, {
188
+ readonly name: "gray";
189
+ readonly label: "Gray";
190
+ }, {
191
+ readonly name: "zinc";
192
+ readonly label: "Zinc";
193
+ }, {
194
+ readonly name: "stone";
195
+ readonly label: "Stone";
196
+ }, {
197
+ readonly name: "slate";
198
+ readonly label: "Slate";
199
+ }]>;
200
+ declare function getRegistryBaseColor(baseColor: string): Promise<{
201
+ cssVars: {
202
+ theme?: Record<string, string> | undefined;
203
+ light?: Record<string, string> | undefined;
204
+ dark?: Record<string, string> | undefined;
205
+ };
206
+ inlineColors: {
207
+ light: Record<string, string>;
208
+ dark: Record<string, string>;
209
+ };
210
+ inlineColorsTemplate: string;
211
+ cssVarsTemplate: string;
212
+ cssVarsV4?: {
213
+ theme?: Record<string, string> | undefined;
214
+ light?: Record<string, string> | undefined;
215
+ dark?: Record<string, string> | undefined;
216
+ } | undefined;
217
+ } | undefined>;
218
+ /**
219
+ * @deprecated This function is deprecated and will be removed in a future version.
220
+ */
221
+ declare function resolveTree(index: z.infer<typeof registryIndexSchema>, names: string[]): Promise<{
222
+ name: string;
223
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
224
+ description?: string | undefined;
225
+ title?: string | undefined;
226
+ $schema?: string | undefined;
227
+ extends?: string | undefined;
228
+ author?: string | undefined;
229
+ dependencies?: string[] | undefined;
230
+ devDependencies?: string[] | undefined;
231
+ registryDependencies?: string[] | undefined;
232
+ files?: ({
233
+ type: "registry:page" | "registry:file";
234
+ path: string;
235
+ target: string;
236
+ content?: string | undefined;
237
+ } | {
238
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
239
+ path: string;
240
+ content?: string | undefined;
241
+ target?: string | undefined;
242
+ })[] | undefined;
243
+ tailwind?: {
244
+ config?: {
245
+ theme?: Record<string, any> | undefined;
246
+ content?: string[] | undefined;
247
+ plugins?: string[] | undefined;
248
+ } | undefined;
249
+ } | undefined;
250
+ cssVars?: {
251
+ theme?: Record<string, string> | undefined;
252
+ light?: Record<string, string> | undefined;
253
+ dark?: Record<string, string> | undefined;
254
+ } | undefined;
255
+ css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
256
+ envVars?: Record<string, string> | undefined;
257
+ meta?: Record<string, any> | undefined;
258
+ docs?: string | undefined;
259
+ categories?: string[] | undefined;
260
+ }[]>;
261
+ /**
262
+ * @deprecated This function is deprecated and will be removed in a future version.
263
+ */
264
+ declare function fetchTree(style: string, tree: z.infer<typeof registryIndexSchema>): Promise<{
265
+ name: string;
266
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:page" | "registry:file" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
267
+ description?: string | undefined;
268
+ title?: string | undefined;
269
+ $schema?: string | undefined;
270
+ extends?: string | undefined;
271
+ author?: string | undefined;
272
+ dependencies?: string[] | undefined;
273
+ devDependencies?: string[] | undefined;
274
+ registryDependencies?: string[] | undefined;
275
+ files?: ({
276
+ type: "registry:page" | "registry:file";
277
+ path: string;
278
+ target: string;
279
+ content?: string | undefined;
280
+ } | {
281
+ type: "registry:lib" | "registry:block" | "registry:component" | "registry:ui" | "registry:hook" | "registry:composable" | "registry:theme" | "registry:style" | "registry:item" | "registry:example" | "registry:internal";
282
+ path: string;
283
+ content?: string | undefined;
284
+ target?: string | undefined;
285
+ })[] | undefined;
286
+ tailwind?: {
287
+ config?: {
288
+ theme?: Record<string, any> | undefined;
289
+ content?: string[] | undefined;
290
+ plugins?: string[] | undefined;
291
+ } | undefined;
292
+ } | undefined;
293
+ cssVars?: {
294
+ theme?: Record<string, string> | undefined;
295
+ light?: Record<string, string> | undefined;
296
+ dark?: Record<string, string> | undefined;
297
+ } | undefined;
298
+ css?: Record<string, string | Record<string, string | Record<string, string>>> | undefined;
299
+ envVars?: Record<string, string> | undefined;
300
+ meta?: Record<string, any> | undefined;
301
+ docs?: string | undefined;
302
+ categories?: string[] | undefined;
303
+ }[]>;
304
+ /**
305
+ * @deprecated This function is deprecated and will be removed in a future version.
306
+ */
307
+ declare function getItemTargetPath(config: Config, item: Pick<z.infer<typeof registryItemSchema>, "type">, override?: string): Promise<string | null>;
308
+ declare function getRegistriesIndex(options?: {
309
+ useCache?: boolean;
310
+ }): Promise<Record<string, string>>;
311
+ //#endregion
312
+ export { getRegistry as a, getRegistryIcons as c, getShadcnRegistryIndex as d, resolveRegistryItems as f, getRegistriesIndex as i, getRegistryItems as l, Config as m, getItemTargetPath as n, getRegistryBaseColor as o, resolveTree as p, getRegistriesConfig as r, getRegistryBaseColors as s, fetchTree as t, getRegistryStyles as u };
313
+ //# sourceMappingURL=api-BAwrG8sa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-BAwrG8sa.d.ts","names":[],"sources":["../src/utils/get-config.ts","../src/registry/api.ts"],"sourcesContent":[],"mappings":";;;;;AC4CqB,KDrBT,MAAA,GAAS,CAAA,CAAE,KCqBF,CAAA,ODrBe,YCqBf,CAAA;;;iBAHC,WAAA;EDlBV,MAAA,CAAA,ECqBC,ODrBK,CCqBG,MDrBe,CAAA;;ICuBjC;;EALmB,QAAA,EAAA,MAAW;EAGZ,KAAA,EAAA;IAAR,IAAA,EAAA,MAAA;;;;;;;;;;IAEV,KAAA,CAAA,EAAA,CAAA;MAAA,IAAA,EAAA,eAAA,GAAA,eAAA;MAgDmB,IAAA,EAAA,MAAgB;MAGjB,MAAA,EAAA,MAAA;MAAR,OAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;;;;;;;;;QAEV,OAAA,CAAA,EAAA,MAAA,EAAA,GAAA,SAAA;QAAA,OAAA,CAAA,EAAA,MAAA,EAAA,GAAA,SAAA;MASmB,CAAA,GAAA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