rafters 0.0.57 → 0.0.58
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/dist/index.js +23 -2
- package/dist/registry/types.d.ts +33 -1
- package/dist/registry/types.js +14 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12565,6 +12565,17 @@ var RegistryFileSchema = external_exports.object({
|
|
|
12565
12565
|
// e.g., ["vitest"] - from @devDependencies JSDoc
|
|
12566
12566
|
});
|
|
12567
12567
|
var RegistryItemTypeSchema = external_exports.enum(["ui", "primitive", "composite"]);
|
|
12568
|
+
var RegistryItemIntelligenceSchema = external_exports.object({
|
|
12569
|
+
cognitiveLoad: external_exports.number().optional(),
|
|
12570
|
+
attentionEconomics: external_exports.string().optional(),
|
|
12571
|
+
trustBuilding: external_exports.string().optional(),
|
|
12572
|
+
accessibility: external_exports.string().optional(),
|
|
12573
|
+
semanticMeaning: external_exports.string().optional(),
|
|
12574
|
+
usagePatterns: external_exports.object({
|
|
12575
|
+
dos: external_exports.array(external_exports.string()).default([]),
|
|
12576
|
+
nevers: external_exports.array(external_exports.string()).default([])
|
|
12577
|
+
}).optional()
|
|
12578
|
+
});
|
|
12568
12579
|
var RegistryItemSchema = external_exports.object({
|
|
12569
12580
|
name: external_exports.string(),
|
|
12570
12581
|
type: RegistryItemTypeSchema,
|
|
@@ -12572,7 +12583,8 @@ var RegistryItemSchema = external_exports.object({
|
|
|
12572
12583
|
primitives: external_exports.array(external_exports.string()),
|
|
12573
12584
|
files: external_exports.array(RegistryFileSchema),
|
|
12574
12585
|
rules: external_exports.array(external_exports.string()).default([]),
|
|
12575
|
-
composites: external_exports.array(external_exports.string()).default([])
|
|
12586
|
+
composites: external_exports.array(external_exports.string()).default([]),
|
|
12587
|
+
intelligence: RegistryItemIntelligenceSchema.optional()
|
|
12576
12588
|
});
|
|
12577
12589
|
var RegistryIndexSchema = external_exports.object({
|
|
12578
12590
|
name: external_exports.string(),
|
|
@@ -30440,7 +30452,16 @@ var RaftersToolHandler = class {
|
|
|
30440
30452
|
type: item.type,
|
|
30441
30453
|
description: item.description,
|
|
30442
30454
|
primitives: item.primitives,
|
|
30443
|
-
rules: item.rules
|
|
30455
|
+
rules: item.rules,
|
|
30456
|
+
composites: item.composites,
|
|
30457
|
+
files: item.files,
|
|
30458
|
+
// The intelligence field carries the WHY of the component:
|
|
30459
|
+
// cognitive load, accessibility, do/never, semantic meaning.
|
|
30460
|
+
// Extracted from JSDoc by the registry generator and present
|
|
30461
|
+
// on every component JSON. Previously stripped by the schema
|
|
30462
|
+
// (not declared) and not referenced by the handler -- the
|
|
30463
|
+
// tool's whole reason for existing went missing somewhere.
|
|
30464
|
+
intelligence: item.intelligence
|
|
30444
30465
|
},
|
|
30445
30466
|
null,
|
|
30446
30467
|
2
|
package/dist/registry/types.d.ts
CHANGED
|
@@ -27,6 +27,27 @@ declare const RegistryItemTypeSchema: z.ZodEnum<{
|
|
|
27
27
|
composite: "composite";
|
|
28
28
|
}>;
|
|
29
29
|
type RegistryItemType = z.infer<typeof RegistryItemTypeSchema>;
|
|
30
|
+
/**
|
|
31
|
+
* Design intelligence carried per-component. The registry generator
|
|
32
|
+
* extracts these from JSDoc tags on the component source (see
|
|
33
|
+
* `@cognitive-load`, `@attention-economics`, `@trust-building`,
|
|
34
|
+
* `@accessibility`, `@semantic-meaning`, `@usage-patterns` in e.g.
|
|
35
|
+
* packages/ui/src/components/ui/button.tsx). Surfacing this is the
|
|
36
|
+
* whole point of rafters -- agents read the encoded judgment instead
|
|
37
|
+
* of guessing at the design surface.
|
|
38
|
+
*/
|
|
39
|
+
declare const RegistryItemIntelligenceSchema: z.ZodObject<{
|
|
40
|
+
cognitiveLoad: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
attentionEconomics: z.ZodOptional<z.ZodString>;
|
|
42
|
+
trustBuilding: z.ZodOptional<z.ZodString>;
|
|
43
|
+
accessibility: z.ZodOptional<z.ZodString>;
|
|
44
|
+
semanticMeaning: z.ZodOptional<z.ZodString>;
|
|
45
|
+
usagePatterns: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
dos: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
47
|
+
nevers: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
type RegistryItemIntelligence = z.infer<typeof RegistryItemIntelligenceSchema>;
|
|
30
51
|
/**
|
|
31
52
|
* A component or primitive in the registry
|
|
32
53
|
*/
|
|
@@ -47,6 +68,17 @@ declare const RegistryItemSchema: z.ZodObject<{
|
|
|
47
68
|
}, z.core.$strip>>;
|
|
48
69
|
rules: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
49
70
|
composites: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
71
|
+
intelligence: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
cognitiveLoad: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
attentionEconomics: z.ZodOptional<z.ZodString>;
|
|
74
|
+
trustBuilding: z.ZodOptional<z.ZodString>;
|
|
75
|
+
accessibility: z.ZodOptional<z.ZodString>;
|
|
76
|
+
semanticMeaning: z.ZodOptional<z.ZodString>;
|
|
77
|
+
usagePatterns: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
dos: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
79
|
+
nevers: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
50
82
|
}, z.core.$strip>;
|
|
51
83
|
type RegistryItem = z.infer<typeof RegistryItemSchema>;
|
|
52
84
|
/**
|
|
@@ -62,4 +94,4 @@ declare const RegistryIndexSchema: z.ZodObject<{
|
|
|
62
94
|
}, z.core.$strip>;
|
|
63
95
|
type RegistryIndex = z.infer<typeof RegistryIndexSchema>;
|
|
64
96
|
|
|
65
|
-
export { type RegistryFile, RegistryFileSchema, type RegistryIndex, RegistryIndexSchema, type RegistryItem, RegistryItemSchema, type RegistryItemType, RegistryItemTypeSchema };
|
|
97
|
+
export { type RegistryFile, RegistryFileSchema, type RegistryIndex, RegistryIndexSchema, type RegistryItem, type RegistryItemIntelligence, RegistryItemIntelligenceSchema, RegistryItemSchema, type RegistryItemType, RegistryItemTypeSchema };
|
package/dist/registry/types.js
CHANGED
|
@@ -9,6 +9,17 @@ var RegistryFileSchema = z.object({
|
|
|
9
9
|
// e.g., ["vitest"] - from @devDependencies JSDoc
|
|
10
10
|
});
|
|
11
11
|
var RegistryItemTypeSchema = z.enum(["ui", "primitive", "composite"]);
|
|
12
|
+
var RegistryItemIntelligenceSchema = z.object({
|
|
13
|
+
cognitiveLoad: z.number().optional(),
|
|
14
|
+
attentionEconomics: z.string().optional(),
|
|
15
|
+
trustBuilding: z.string().optional(),
|
|
16
|
+
accessibility: z.string().optional(),
|
|
17
|
+
semanticMeaning: z.string().optional(),
|
|
18
|
+
usagePatterns: z.object({
|
|
19
|
+
dos: z.array(z.string()).default([]),
|
|
20
|
+
nevers: z.array(z.string()).default([])
|
|
21
|
+
}).optional()
|
|
22
|
+
});
|
|
12
23
|
var RegistryItemSchema = z.object({
|
|
13
24
|
name: z.string(),
|
|
14
25
|
type: RegistryItemTypeSchema,
|
|
@@ -16,7 +27,8 @@ var RegistryItemSchema = z.object({
|
|
|
16
27
|
primitives: z.array(z.string()),
|
|
17
28
|
files: z.array(RegistryFileSchema),
|
|
18
29
|
rules: z.array(z.string()).default([]),
|
|
19
|
-
composites: z.array(z.string()).default([])
|
|
30
|
+
composites: z.array(z.string()).default([]),
|
|
31
|
+
intelligence: RegistryItemIntelligenceSchema.optional()
|
|
20
32
|
});
|
|
21
33
|
var RegistryIndexSchema = z.object({
|
|
22
34
|
name: z.string(),
|
|
@@ -29,6 +41,7 @@ var RegistryIndexSchema = z.object({
|
|
|
29
41
|
export {
|
|
30
42
|
RegistryFileSchema,
|
|
31
43
|
RegistryIndexSchema,
|
|
44
|
+
RegistryItemIntelligenceSchema,
|
|
32
45
|
RegistryItemSchema,
|
|
33
46
|
RegistryItemTypeSchema
|
|
34
47
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rafters",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.58",
|
|
4
4
|
"description": "Design Intelligence CLI. Scaffold tokens, import existing shadcn/Tailwind v4 sources, add components, and serve an MCP server so AI agents read decisions instead of guessing.",
|
|
5
5
|
"homepage": "https://rafters.studio",
|
|
6
6
|
"license": "MIT",
|