@decantr/registry 1.0.0-beta.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.
@@ -0,0 +1,169 @@
1
+ import { LayoutItem } from '@decantr/essence-spec';
2
+
3
+ interface PatternPreset {
4
+ description: string;
5
+ layout: {
6
+ layout: 'row' | 'column' | 'grid' | 'hero';
7
+ atoms: string;
8
+ };
9
+ code: {
10
+ imports: string;
11
+ example: string;
12
+ };
13
+ }
14
+ interface PatternIO {
15
+ produces?: string[];
16
+ consumes?: string[];
17
+ actions?: string[];
18
+ }
19
+ interface Pattern {
20
+ id: string;
21
+ version: string;
22
+ name: string;
23
+ description: string;
24
+ tags: string[];
25
+ components: string[];
26
+ default_preset: string;
27
+ presets: Record<string, PatternPreset>;
28
+ contained?: boolean;
29
+ io?: PatternIO;
30
+ code?: {
31
+ imports: string;
32
+ example: string;
33
+ };
34
+ }
35
+ interface ArchetypePage {
36
+ id: string;
37
+ default_layout: string[];
38
+ shell: string;
39
+ }
40
+ interface Archetype {
41
+ id: string;
42
+ version: string;
43
+ name: string;
44
+ description: string;
45
+ tags: string[];
46
+ pages: ArchetypePage[];
47
+ features: string[];
48
+ dependencies: {
49
+ patterns: Record<string, string>;
50
+ recipes: Record<string, string>;
51
+ };
52
+ }
53
+ interface RecipeSpatialHints {
54
+ density_bias: number;
55
+ content_gap_shift: number;
56
+ section_padding: string;
57
+ card_wrapping: 'always' | 'minimal' | 'none';
58
+ surface_override: string | null;
59
+ }
60
+ interface RecipeVisualEffects {
61
+ enabled: boolean;
62
+ intensity: 'subtle' | 'moderate' | 'bold';
63
+ type_mapping: Record<string, string[]>;
64
+ component_fallback: Record<string, string>;
65
+ intensity_values?: Record<string, Record<string, string>>;
66
+ }
67
+ interface RecipeShell {
68
+ preferred: string[];
69
+ nav_style: string;
70
+ root?: string;
71
+ nav?: string;
72
+ header?: string;
73
+ dimensions?: {
74
+ navWidth?: string;
75
+ headerHeight?: string;
76
+ };
77
+ }
78
+ interface Recipe {
79
+ id: string;
80
+ style: string;
81
+ mode: string;
82
+ schema_version: string;
83
+ spatial_hints: RecipeSpatialHints;
84
+ shell: RecipeShell;
85
+ visual_effects: RecipeVisualEffects;
86
+ pattern_preferences: {
87
+ prefer: string[];
88
+ avoid: string[];
89
+ default_presets?: Record<string, string>;
90
+ };
91
+ pattern_overrides?: Record<string, {
92
+ background?: string[];
93
+ }>;
94
+ animation?: {
95
+ entrance?: string;
96
+ micro?: string;
97
+ };
98
+ }
99
+ type ContentType = 'pattern' | 'archetype' | 'recipe' | 'theme' | 'blueprint';
100
+ interface ResolvedContent<T> {
101
+ item: T;
102
+ source: 'local' | 'installed' | 'core';
103
+ path: string;
104
+ }
105
+
106
+ type ContentMap = {
107
+ pattern: Pattern;
108
+ archetype: Archetype;
109
+ recipe: Recipe;
110
+ theme: Record<string, unknown>;
111
+ blueprint: Record<string, unknown>;
112
+ };
113
+ interface ResolverOptions {
114
+ contentRoot: string;
115
+ overridePaths?: string[];
116
+ }
117
+ interface ContentResolver {
118
+ resolve<T extends ContentType>(type: T, id: string): Promise<ResolvedContent<ContentMap[T]> | null>;
119
+ }
120
+ declare function createResolver(options: ResolverOptions): ContentResolver;
121
+
122
+ interface ResolvedPreset {
123
+ preset: string;
124
+ layout: PatternPreset['layout'];
125
+ code: PatternPreset['code'];
126
+ }
127
+ declare function resolvePatternPreset(pattern: Pattern, explicitPreset?: string, recipeDefaultPresets?: Record<string, string>): ResolvedPreset;
128
+
129
+ type HookType = 'search' | 'filter' | 'selection' | 'sort';
130
+ interface WiringSignal {
131
+ name: string;
132
+ init: string;
133
+ hookType: HookType;
134
+ }
135
+ interface WiringRule {
136
+ pair: [string, string];
137
+ signals: WiringSignal[];
138
+ props: Record<string, Record<string, string>>;
139
+ hookProps: Record<string, Record<string, string>>;
140
+ }
141
+ interface WiringResult {
142
+ rule: WiringRule;
143
+ signals: WiringSignal[];
144
+ props: Record<string, Record<string, string>>;
145
+ hookProps: Record<string, Record<string, string>>;
146
+ }
147
+ declare const WIRING_RULES: WiringRule[];
148
+ declare function detectWirings(layout: LayoutItem[]): WiringResult[];
149
+
150
+ interface RegistryClientOptions {
151
+ baseUrl?: string;
152
+ cacheDir?: string;
153
+ cacheTtl?: number;
154
+ }
155
+ interface SearchResult {
156
+ id: string;
157
+ type: string;
158
+ name: string;
159
+ description: string;
160
+ version: string;
161
+ tags: string[];
162
+ }
163
+ interface RegistryClient {
164
+ search(query: string, type?: string): Promise<SearchResult[]>;
165
+ fetch(type: string, id: string, version?: string): Promise<unknown>;
166
+ }
167
+ declare function createRegistryClient(options?: RegistryClientOptions): RegistryClient;
168
+
169
+ export { type Archetype, type ArchetypePage, type ContentResolver, type ContentType, type HookType, type Pattern, type PatternIO, type PatternPreset, type Recipe, type RecipeShell, type RecipeSpatialHints, type RecipeVisualEffects, type RegistryClient, type RegistryClientOptions, type ResolvedContent, type ResolvedPreset, type ResolverOptions, type SearchResult, WIRING_RULES, type WiringResult, type WiringRule, type WiringSignal, createRegistryClient, createResolver, detectWirings, resolvePatternPreset };
package/dist/index.js ADDED
@@ -0,0 +1,151 @@
1
+ // src/resolver.ts
2
+ import { readFile } from "fs/promises";
3
+ import { join } from "path";
4
+ var TYPE_DIRS = {
5
+ pattern: "patterns",
6
+ archetype: "archetypes",
7
+ recipe: "recipes",
8
+ theme: "themes",
9
+ blueprint: "blueprints"
10
+ };
11
+ async function tryLoadJson(filePath) {
12
+ try {
13
+ const content = await readFile(filePath, "utf-8");
14
+ return JSON.parse(content);
15
+ } catch {
16
+ return null;
17
+ }
18
+ }
19
+ function createResolver(options) {
20
+ const { contentRoot, overridePaths = [] } = options;
21
+ return {
22
+ async resolve(type, id) {
23
+ const dir = TYPE_DIRS[type];
24
+ const fileName = `${id}.json`;
25
+ for (const overridePath of overridePaths) {
26
+ const filePath = join(overridePath, dir, fileName);
27
+ const item = await tryLoadJson(filePath);
28
+ if (item) return { item, source: "local", path: filePath };
29
+ }
30
+ const corePath = join(contentRoot, dir, fileName);
31
+ const coreItem = await tryLoadJson(corePath);
32
+ if (coreItem) return { item: coreItem, source: "core", path: corePath };
33
+ return null;
34
+ }
35
+ };
36
+ }
37
+
38
+ // src/pattern.ts
39
+ function resolvePatternPreset(pattern, explicitPreset, recipeDefaultPresets) {
40
+ const presets = pattern.presets;
41
+ const hasPresets = Object.keys(presets).length > 0;
42
+ if (!hasPresets) {
43
+ return {
44
+ preset: "",
45
+ layout: { layout: "row", atoms: "" },
46
+ code: pattern.code ?? { imports: "", example: "" }
47
+ };
48
+ }
49
+ let presetName = explicitPreset;
50
+ if (presetName && !presets[presetName]) presetName = void 0;
51
+ if (!presetName && recipeDefaultPresets?.[pattern.id]) {
52
+ const recipeName = recipeDefaultPresets[pattern.id];
53
+ if (presets[recipeName]) presetName = recipeName;
54
+ }
55
+ if (!presetName) presetName = pattern.default_preset;
56
+ if (!presetName || !presets[presetName]) presetName = Object.keys(presets)[0];
57
+ const preset = presets[presetName];
58
+ return { preset: presetName, layout: preset.layout, code: preset.code };
59
+ }
60
+
61
+ // src/wiring.ts
62
+ var WIRING_RULES = [
63
+ {
64
+ pair: ["filter-bar", "data-table"],
65
+ signals: [
66
+ { name: "pageSearch", init: "''", hookType: "search" },
67
+ { name: "pageStatus", init: "'all'", hookType: "filter" }
68
+ ],
69
+ props: {
70
+ "filter-bar": { onSearch: "setPageSearch", onCategory: "setPageStatus" },
71
+ "data-table": { search: "pageSearch", status: "pageStatus" }
72
+ },
73
+ hookProps: {
74
+ "filter-bar": { search: "search", filters: "filters" },
75
+ "data-table": { search: "search", filters: "filters" }
76
+ }
77
+ },
78
+ {
79
+ pair: ["filter-bar", "activity-feed"],
80
+ signals: [
81
+ { name: "pageSearch", init: "''", hookType: "search" },
82
+ { name: "pageView", init: "'all'", hookType: "filter" }
83
+ ],
84
+ props: {
85
+ "filter-bar": { onSearch: "setPageSearch", onView: "setPageView" },
86
+ "activity-feed": { search: "pageSearch", view: "pageView" }
87
+ },
88
+ hookProps: {
89
+ "filter-bar": { search: "search", filters: "filters" },
90
+ "activity-feed": { search: "search", filters: "filters" }
91
+ }
92
+ },
93
+ {
94
+ pair: ["filter-bar", "card-grid"],
95
+ signals: [
96
+ { name: "pageSearch", init: "''", hookType: "search" }
97
+ ],
98
+ props: {
99
+ "filter-bar": { onSearch: "setPageSearch" },
100
+ "card-grid": { search: "pageSearch" }
101
+ },
102
+ hookProps: {
103
+ "filter-bar": { search: "search" },
104
+ "card-grid": { search: "search" }
105
+ }
106
+ }
107
+ ];
108
+ function getPatternId(item) {
109
+ if (typeof item === "string") return item;
110
+ if ("pattern" in item) return item.pattern;
111
+ return null;
112
+ }
113
+ function detectWirings(layout) {
114
+ const patternIds = layout.map(getPatternId).filter((id) => id !== null);
115
+ const results = [];
116
+ for (const rule of WIRING_RULES) {
117
+ const [a, b] = rule.pair;
118
+ if (patternIds.includes(a) && patternIds.includes(b)) {
119
+ results.push({ rule, signals: rule.signals, props: rule.props, hookProps: rule.hookProps });
120
+ }
121
+ }
122
+ return results;
123
+ }
124
+
125
+ // src/client.ts
126
+ function createRegistryClient(options = {}) {
127
+ const baseUrl = options.baseUrl ?? "https://decantr-registry.fly.dev/v1";
128
+ return {
129
+ async search(query, type) {
130
+ const params = new URLSearchParams({ q: query });
131
+ if (type) params.set("type", type);
132
+ const res = await fetch(`${baseUrl}/search?${params}`);
133
+ if (!res.ok) return [];
134
+ return res.json();
135
+ },
136
+ async fetch(type, id, version) {
137
+ const url = version ? `${baseUrl}/content/${type}/${id}/${version}` : `${baseUrl}/content/${type}/${id}`;
138
+ const res = await fetch(url);
139
+ if (!res.ok) return null;
140
+ return res.json();
141
+ }
142
+ };
143
+ }
144
+ export {
145
+ WIRING_RULES,
146
+ createRegistryClient,
147
+ createResolver,
148
+ detectWirings,
149
+ resolvePatternPreset
150
+ };
151
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resolver.ts","../src/pattern.ts","../src/wiring.ts","../src/client.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport type { Pattern, Archetype, Recipe, ContentType, ResolvedContent } from './types.js';\n\ntype ContentMap = {\n pattern: Pattern;\n archetype: Archetype;\n recipe: Recipe;\n theme: Record<string, unknown>;\n blueprint: Record<string, unknown>;\n};\n\nexport interface ResolverOptions {\n contentRoot: string;\n overridePaths?: string[];\n}\n\nexport interface ContentResolver {\n resolve<T extends ContentType>(type: T, id: string): Promise<ResolvedContent<ContentMap[T]> | null>;\n}\n\nconst TYPE_DIRS: Record<ContentType, string> = {\n pattern: 'patterns',\n archetype: 'archetypes',\n recipe: 'recipes',\n theme: 'themes',\n blueprint: 'blueprints',\n};\n\nasync function tryLoadJson<T>(filePath: string): Promise<T | null> {\n try {\n const content = await readFile(filePath, 'utf-8');\n return JSON.parse(content) as T;\n } catch {\n return null;\n }\n}\n\nexport function createResolver(options: ResolverOptions): ContentResolver {\n const { contentRoot, overridePaths = [] } = options;\n return {\n async resolve<T extends ContentType>(type: T, id: string): Promise<ResolvedContent<ContentMap[T]> | null> {\n const dir = TYPE_DIRS[type];\n const fileName = `${id}.json`;\n for (const overridePath of overridePaths) {\n const filePath = join(overridePath, dir, fileName);\n const item = await tryLoadJson<ContentMap[T]>(filePath);\n if (item) return { item, source: 'local', path: filePath };\n }\n const corePath = join(contentRoot, dir, fileName);\n const coreItem = await tryLoadJson<ContentMap[T]>(corePath);\n if (coreItem) return { item: coreItem, source: 'core', path: corePath };\n return null;\n },\n };\n}\n","import type { Pattern, PatternPreset } from './types.js';\n\nexport interface ResolvedPreset {\n preset: string;\n layout: PatternPreset['layout'];\n code: PatternPreset['code'];\n}\n\nexport function resolvePatternPreset(\n pattern: Pattern,\n explicitPreset?: string,\n recipeDefaultPresets?: Record<string, string>,\n): ResolvedPreset {\n const presets = pattern.presets;\n const hasPresets = Object.keys(presets).length > 0;\n\n if (!hasPresets) {\n return {\n preset: '',\n layout: { layout: 'row', atoms: '' },\n code: pattern.code ?? { imports: '', example: '' },\n };\n }\n\n let presetName = explicitPreset;\n if (presetName && !presets[presetName]) presetName = undefined;\n if (!presetName && recipeDefaultPresets?.[pattern.id]) {\n const recipeName = recipeDefaultPresets[pattern.id];\n if (presets[recipeName]) presetName = recipeName;\n }\n if (!presetName) presetName = pattern.default_preset;\n if (!presetName || !presets[presetName]) presetName = Object.keys(presets)[0];\n\n const preset = presets[presetName];\n return { preset: presetName, layout: preset.layout, code: preset.code };\n}\n","import type { LayoutItem, PatternRef } from '@decantr/essence-spec';\n\n// AUTO: hookType classifies each signal for custom hook generation\nexport type HookType = 'search' | 'filter' | 'selection' | 'sort';\n\nexport interface WiringSignal { name: string; init: string; hookType: HookType }\n\nexport interface WiringRule {\n pair: [string, string];\n signals: WiringSignal[];\n props: Record<string, Record<string, string>>;\n // AUTO: hookProps maps pattern IDs to hook variable names passed as props\n hookProps: Record<string, Record<string, string>>;\n}\n\nexport interface WiringResult {\n rule: WiringRule;\n signals: WiringSignal[];\n props: Record<string, Record<string, string>>;\n hookProps: Record<string, Record<string, string>>;\n}\n\nexport const WIRING_RULES: WiringRule[] = [\n {\n pair: ['filter-bar', 'data-table'],\n signals: [\n { name: 'pageSearch', init: \"''\", hookType: 'search' },\n { name: 'pageStatus', init: \"'all'\", hookType: 'filter' },\n ],\n props: {\n 'filter-bar': { onSearch: 'setPageSearch', onCategory: 'setPageStatus' },\n 'data-table': { search: 'pageSearch', status: 'pageStatus' },\n },\n hookProps: {\n 'filter-bar': { search: 'search', filters: 'filters' },\n 'data-table': { search: 'search', filters: 'filters' },\n },\n },\n {\n pair: ['filter-bar', 'activity-feed'],\n signals: [\n { name: 'pageSearch', init: \"''\", hookType: 'search' },\n { name: 'pageView', init: \"'all'\", hookType: 'filter' },\n ],\n props: {\n 'filter-bar': { onSearch: 'setPageSearch', onView: 'setPageView' },\n 'activity-feed': { search: 'pageSearch', view: 'pageView' },\n },\n hookProps: {\n 'filter-bar': { search: 'search', filters: 'filters' },\n 'activity-feed': { search: 'search', filters: 'filters' },\n },\n },\n {\n pair: ['filter-bar', 'card-grid'],\n signals: [\n { name: 'pageSearch', init: \"''\", hookType: 'search' },\n ],\n props: {\n 'filter-bar': { onSearch: 'setPageSearch' },\n 'card-grid': { search: 'pageSearch' },\n },\n hookProps: {\n 'filter-bar': { search: 'search' },\n 'card-grid': { search: 'search' },\n },\n },\n];\n\nfunction getPatternId(item: LayoutItem): string | null {\n if (typeof item === 'string') return item;\n if ('pattern' in item) return (item as PatternRef).pattern;\n return null;\n}\n\nexport function detectWirings(layout: LayoutItem[]): WiringResult[] {\n const patternIds = layout.map(getPatternId).filter((id): id is string => id !== null);\n const results: WiringResult[] = [];\n for (const rule of WIRING_RULES) {\n const [a, b] = rule.pair;\n if (patternIds.includes(a) && patternIds.includes(b)) {\n results.push({ rule, signals: rule.signals, props: rule.props, hookProps: rule.hookProps });\n }\n }\n return results;\n}\n","export interface RegistryClientOptions {\n baseUrl?: string;\n cacheDir?: string;\n cacheTtl?: number;\n}\n\nexport interface SearchResult {\n id: string;\n type: string;\n name: string;\n description: string;\n version: string;\n tags: string[];\n}\n\nexport interface RegistryClient {\n search(query: string, type?: string): Promise<SearchResult[]>;\n fetch(type: string, id: string, version?: string): Promise<unknown>;\n}\n\nexport function createRegistryClient(options: RegistryClientOptions = {}): RegistryClient {\n const baseUrl = options.baseUrl ?? 'https://decantr-registry.fly.dev/v1';\n return {\n async search(query: string, type?: string): Promise<SearchResult[]> {\n const params = new URLSearchParams({ q: query });\n if (type) params.set('type', type);\n const res = await fetch(`${baseUrl}/search?${params}`);\n if (!res.ok) return [];\n return res.json() as Promise<SearchResult[]>;\n },\n async fetch(type: string, id: string, version?: string): Promise<unknown> {\n const url = version ? `${baseUrl}/content/${type}/${id}/${version}` : `${baseUrl}/content/${type}/${id}`;\n const res = await fetch(url);\n if (!res.ok) return null;\n return res.json();\n },\n };\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AAoBrB,IAAM,YAAyC;AAAA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,IACA,MAAM,MAAM,MAAc,IAAY,SAAoC;AACxE,YAAM,MAAM,UAAU,GAAG,OAAO,YAAY,IAAI,IAAI,EAAE,IAAI,OAAO,KAAK,GAAG,OAAO,YAAY,IAAI,IAAI,EAAE;AACtG,YAAM,MAAM,MAAM,MAAM,GAAG;AAC3B,UAAI,CAAC,IAAI,GAAI,QAAO;AACpB,aAAO,IAAI,KAAK;AAAA,IAClB;AAAA,EACF;AACF;","names":[]}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@decantr/registry",
3
+ "version": "1.0.0-beta.1",
4
+ "description": "Registry format, content resolver, and wiring rules for Decantr",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/decantr-ai/decantr.git",
9
+ "directory": "packages/registry"
10
+ },
11
+ "homepage": "https://decantr.ai",
12
+ "type": "module",
13
+ "main": "dist/index.js",
14
+ "types": "dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/index.js",
18
+ "types": "./dist/index.d.ts"
19
+ }
20
+ },
21
+ "files": ["dist"],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "scripts": {
26
+ "build": "tsup",
27
+ "test": "vitest run",
28
+ "test:watch": "vitest"
29
+ },
30
+ "dependencies": {
31
+ "@decantr/essence-spec": "workspace:*"
32
+ }
33
+ }