rafters 0.0.7 → 0.0.9

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.
@@ -0,0 +1,61 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Registry Types
5
+ *
6
+ * Types for component and primitive registry items.
7
+ * Compatible with shadcn-style registry format.
8
+ */
9
+
10
+ /**
11
+ * A single file in a registry item
12
+ * Framework inferred from extension: .tsx=React, .vue=Vue, .svelte=Svelte
13
+ */
14
+ declare const RegistryFileSchema: z.ZodObject<{
15
+ path: z.ZodString;
16
+ content: z.ZodString;
17
+ dependencies: z.ZodArray<z.ZodString>;
18
+ devDependencies: z.ZodDefault<z.ZodArray<z.ZodString>>;
19
+ }, z.core.$strip>;
20
+ type RegistryFile = z.infer<typeof RegistryFileSchema>;
21
+ /**
22
+ * Item type in registry
23
+ */
24
+ declare const RegistryItemTypeSchema: z.ZodEnum<{
25
+ "registry:ui": "registry:ui";
26
+ "registry:primitive": "registry:primitive";
27
+ "registry:composite": "registry:composite";
28
+ }>;
29
+ type RegistryItemType = z.infer<typeof RegistryItemTypeSchema>;
30
+ /**
31
+ * A component or primitive in the registry
32
+ */
33
+ declare const RegistryItemSchema: z.ZodObject<{
34
+ name: z.ZodString;
35
+ type: z.ZodEnum<{
36
+ "registry:ui": "registry:ui";
37
+ "registry:primitive": "registry:primitive";
38
+ "registry:composite": "registry:composite";
39
+ }>;
40
+ description: z.ZodOptional<z.ZodString>;
41
+ primitives: z.ZodArray<z.ZodString>;
42
+ files: z.ZodArray<z.ZodObject<{
43
+ path: z.ZodString;
44
+ content: z.ZodString;
45
+ dependencies: z.ZodArray<z.ZodString>;
46
+ devDependencies: z.ZodDefault<z.ZodArray<z.ZodString>>;
47
+ }, z.core.$strip>>;
48
+ }, z.core.$strip>;
49
+ type RegistryItem = z.infer<typeof RegistryItemSchema>;
50
+ /**
51
+ * Registry index listing available components and primitives
52
+ */
53
+ declare const RegistryIndexSchema: z.ZodObject<{
54
+ name: z.ZodString;
55
+ homepage: z.ZodString;
56
+ components: z.ZodArray<z.ZodString>;
57
+ primitives: z.ZodArray<z.ZodString>;
58
+ }, z.core.$strip>;
59
+ type RegistryIndex = z.infer<typeof RegistryIndexSchema>;
60
+
61
+ export { type RegistryFile, RegistryFileSchema, type RegistryIndex, RegistryIndexSchema, type RegistryItem, RegistryItemSchema, type RegistryItemType, RegistryItemTypeSchema };
@@ -0,0 +1,34 @@
1
+ // src/registry/types.ts
2
+ import { z } from "zod";
3
+ var RegistryFileSchema = z.object({
4
+ path: z.string(),
5
+ content: z.string(),
6
+ dependencies: z.array(z.string()),
7
+ // e.g., ["lodash@4.17.21"] - versioned
8
+ devDependencies: z.array(z.string()).default([])
9
+ // e.g., ["vitest"] - from @devDependencies JSDoc
10
+ });
11
+ var RegistryItemTypeSchema = z.enum([
12
+ "registry:ui",
13
+ "registry:primitive",
14
+ "registry:composite"
15
+ ]);
16
+ var RegistryItemSchema = z.object({
17
+ name: z.string(),
18
+ type: RegistryItemTypeSchema,
19
+ description: z.string().optional(),
20
+ primitives: z.array(z.string()),
21
+ files: z.array(RegistryFileSchema)
22
+ });
23
+ var RegistryIndexSchema = z.object({
24
+ name: z.string(),
25
+ homepage: z.string(),
26
+ components: z.array(z.string()),
27
+ primitives: z.array(z.string())
28
+ });
29
+ export {
30
+ RegistryFileSchema,
31
+ RegistryIndexSchema,
32
+ RegistryItemSchema,
33
+ RegistryItemTypeSchema
34
+ };
package/package.json CHANGED
@@ -1,17 +1,33 @@
1
1
  {
2
2
  "name": "rafters",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "CLI for Rafters design system - scaffold tokens and add components",
5
+ "license": "MIT",
5
6
  "type": "module",
6
7
  "bin": {
7
8
  "rafters": "./dist/index.js"
8
9
  },
9
10
  "exports": {
10
- ".": "./dist/index.js"
11
+ ".": "./dist/index.js",
12
+ "./registry/types": {
13
+ "types": "./dist/registry/types.d.ts",
14
+ "import": "./dist/registry/types.js"
15
+ }
11
16
  },
12
17
  "files": [
13
- "dist"
18
+ "dist",
19
+ "LICENSE"
14
20
  ],
21
+ "scripts": {
22
+ "build": "tsup",
23
+ "dev": "tsup --watch",
24
+ "test": "pnpm run test:bdd && pnpm run test:unit",
25
+ "test:bdd": "bddgen && playwright test",
26
+ "test:unit": "vitest run",
27
+ "test:watch": "vitest",
28
+ "typecheck": "tsc --noEmit",
29
+ "clean": "rm -rf dist .turbo"
30
+ },
15
31
  "dependencies": {
16
32
  "@antfu/ni": "^28.1.0",
17
33
  "@inquirer/prompts": "^8.2.0",
@@ -21,28 +37,18 @@
21
37
  "ora": "^9.0.0"
22
38
  },
23
39
  "devDependencies": {
24
- "@playwright/test": "^1.56.0",
25
- "@types/node": "24.10.0",
26
- "playwright-bdd": "^8.4.2",
40
+ "@playwright/test": "catalog:",
41
+ "@rafters/design-tokens": "workspace:*",
42
+ "@rafters/shared": "workspace:*",
43
+ "@types/node": "catalog:",
44
+ "playwright-bdd": "catalog:",
27
45
  "tsup": "^8.0.0",
28
46
  "tsx": "^4.21.0",
29
- "typescript": "5.9.3",
30
- "vitest": "^3.2.0",
31
- "zocker": "^3.0.0",
32
- "@rafters/design-tokens": "0.0.1",
33
- "@rafters/shared": "0.0.1"
47
+ "typescript": "catalog:",
48
+ "vitest": "catalog:",
49
+ "zocker": "catalog:"
34
50
  },
35
51
  "publishConfig": {
36
52
  "access": "public"
37
- },
38
- "scripts": {
39
- "build": "tsup",
40
- "dev": "tsup --watch",
41
- "test": "pnpm run test:bdd && pnpm run test:unit",
42
- "test:bdd": "bddgen && playwright test",
43
- "test:unit": "vitest run",
44
- "test:watch": "vitest",
45
- "typecheck": "tsc --noEmit",
46
- "clean": "rm -rf dist .turbo"
47
53
  }
48
- }
54
+ }