@decantr/registry 1.0.0-beta.9 → 1.0.0

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,2 @@
1
+ export { c as API_CONTENT_TYPES, d as API_CONTENT_TYPE_TO_CONTENT_TYPE, e as ApiContentType, o as CONTENT_TYPES, p as CONTENT_TYPE_TO_API_CONTENT_TYPE, C as ContentType, aB as isApiContentType, aD as isContentType } from './content-types-BJFuxWNj.js';
2
+ import '@decantr/essence-spec';
@@ -0,0 +1,44 @@
1
+ // src/types.ts
2
+ var CONTENT_TYPES = [
3
+ "pattern",
4
+ "theme",
5
+ "blueprint",
6
+ "archetype",
7
+ "shell"
8
+ ];
9
+ var API_CONTENT_TYPES = [
10
+ "patterns",
11
+ "themes",
12
+ "blueprints",
13
+ "archetypes",
14
+ "shells"
15
+ ];
16
+ var CONTENT_TYPE_TO_API_CONTENT_TYPE = {
17
+ pattern: "patterns",
18
+ theme: "themes",
19
+ blueprint: "blueprints",
20
+ archetype: "archetypes",
21
+ shell: "shells"
22
+ };
23
+ var API_CONTENT_TYPE_TO_CONTENT_TYPE = {
24
+ patterns: "pattern",
25
+ themes: "theme",
26
+ blueprints: "blueprint",
27
+ archetypes: "archetype",
28
+ shells: "shell"
29
+ };
30
+ function isContentType(value) {
31
+ return CONTENT_TYPES.includes(value);
32
+ }
33
+ function isApiContentType(value) {
34
+ return API_CONTENT_TYPES.includes(value);
35
+ }
36
+ export {
37
+ API_CONTENT_TYPES,
38
+ API_CONTENT_TYPE_TO_CONTENT_TYPE,
39
+ CONTENT_TYPES,
40
+ CONTENT_TYPE_TO_API_CONTENT_TYPE,
41
+ isApiContentType,
42
+ isContentType
43
+ };
44
+ //# sourceMappingURL=content-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { EssenceFile } from '@decantr/essence-spec';\n\n// --- Pattern ---\nexport interface PatternLayoutSpec {\n layout: string;\n atoms: string;\n slots?: Record<string, string>;\n}\n\nexport interface PatternCodeSpec {\n imports?: string;\n example?: string;\n}\n\nexport interface PatternPreset {\n description: string;\n components?: string[];\n layout: PatternLayoutSpec;\n code?: PatternCodeSpec;\n}\n\nexport interface PatternIO {\n produces?: string[];\n consumes?: string[];\n actions?: string[];\n}\n\nexport interface Pattern {\n id: string;\n version: string;\n name: string;\n description: string;\n tags: string[];\n components: string[];\n default_preset: string;\n presets: Record<string, PatternPreset>;\n contained?: boolean;\n io?: PatternIO;\n code?: PatternCodeSpec;\n default_layout?: PatternLayoutSpec;\n visual_brief?: string;\n composition?: Record<string, string>;\n motion?: {\n micro?: Record<string, string>;\n transitions?: Record<string, string>;\n ambient?: Record<string, string>;\n };\n responsive?: {\n mobile?: string;\n tablet?: string;\n desktop?: string;\n };\n accessibility?: {\n role?: string;\n 'aria-label'?: string;\n keyboard?: string[];\n announcements?: string[];\n focus_management?: string;\n };\n layout_hints?: Record<string, string>;\n category?: string;\n}\n\n// --- Archetype ---\nexport type ArchetypeRole = 'primary' | 'gateway' | 'public' | 'auxiliary';\n\nexport interface PatternReferenceObject {\n pattern: string;\n preset?: string;\n as?: string;\n}\n\nexport type PatternReference = string | PatternReferenceObject;\n\nexport interface LayoutGroup {\n cols: PatternReference[];\n at?: string;\n span?: Record<string, number>;\n}\n\nexport type LayoutItem = PatternReference | LayoutGroup;\n\nexport interface ContentDependencies {\n [kind: string]: Record<string, string>;\n}\n\nexport interface ArchetypePage {\n id: string;\n default_layout: LayoutItem[];\n shell: string;\n description?: string;\n patterns?: PatternReference[];\n}\n\nexport interface SeoHints {\n schema_org?: string[];\n meta_priorities?: string[];\n}\n\nexport interface ArchetypeSuggestedTheme {\n ids?: string[];\n modes?: string[];\n shapes?: string[];\n}\n\nexport interface ArchetypeHeroCustomization {\n style?: string;\n elements?: string[];\n background?: string;\n [key: string]: unknown;\n}\n\nexport interface Archetype {\n $schema?: string;\n id: string;\n version: string;\n decantr_compat?: string;\n name: string;\n description: string;\n tags: string[];\n role: ArchetypeRole;\n pages: ArchetypePage[];\n features: string[];\n dependencies?: ContentDependencies;\n seo_hints?: SeoHints;\n classification?: {\n triggers: { primary: string[]; secondary: string[]; negative: string[] };\n implies: string[];\n weight: number;\n tier: string;\n };\n page_briefs?: Record<string, string>;\n suggested_theme?: ArchetypeSuggestedTheme;\n shells?: Record<string, string>;\n personality?: string[];\n hero_customization?: ArchetypeHeroCustomization;\n}\n\n// --- Theme substructures (absorbed from former Recipe type) ---\nexport interface ThemeSpatial {\n density_bias: number;\n content_gap_shift: number;\n section_padding: string;\n card_wrapping: 'always' | 'minimal' | 'none';\n surface_override: string | null;\n}\n\nexport interface ThemeEffects {\n enabled: boolean;\n intensity: 'subtle' | 'moderate' | 'bold';\n type_mapping: Record<string, string[]>;\n component_fallback: Record<string, string>;\n intensity_values?: Record<string, Record<string, string>>;\n}\n\nexport interface ThemeShell {\n preferred: string[];\n nav_style: string;\n root?: string;\n nav?: string;\n header?: string;\n dimensions?: { navWidth?: string; headerHeight?: string };\n}\n\n// --- Blueprint ---\nexport type ComposeEntry = string | { archetype: string; prefix: string; role?: ArchetypeRole };\n\nexport interface BlueprintRoute {\n shell?: string;\n archetype?: string;\n page?: string;\n}\n\nexport interface BlueprintNavigationHotkey {\n key: string;\n route?: string;\n label?: string;\n}\n\nexport interface BlueprintNavigation {\n command_palette?: boolean;\n hotkeys?: BlueprintNavigationHotkey[];\n}\n\nexport interface BlueprintOverrides {\n features_add?: string[];\n features_remove?: string[];\n pages_remove?: string[];\n pages?: Record<string, Record<string, unknown>>;\n}\n\nexport interface Blueprint {\n $schema?: string;\n id: string;\n version?: string;\n decantr_compat?: string;\n name: string;\n description?: string;\n tags?: string[];\n archetype?: string;\n compose?: ComposeEntry[];\n theme: { id: string; mode?: string; shape?: string };\n personality?: string | string[];\n features?: string[];\n routes?: Record<string, BlueprintRoute>;\n overrides?: BlueprintOverrides;\n seo_hints?: SeoHints;\n navigation?: BlueprintNavigation;\n dependencies?: ContentDependencies;\n suggested_themes?: string[];\n design_constraints?: Record<string, unknown>;\n voice?: {\n tone?: string;\n cta_verbs?: string[];\n avoid?: string[];\n empty_states?: string;\n errors?: string;\n loading?: string;\n metrics_format?: string;\n };\n responsive_strategy?: {\n breakpoints?: string[];\n navigation?: Record<string, string>;\n data_display?: Record<string, string>;\n };\n}\n\n// --- Shell ---\nexport interface Shell {\n id: string;\n name: string;\n description?: string;\n root?: string;\n nav?: string;\n header?: string;\n nav_style?: string;\n dimensions?: {\n navWidth?: string;\n headerHeight?: string;\n };\n internal_layout?: Record<string, unknown>;\n layout?: string;\n atoms?: string;\n config?: Record<string, unknown>;\n guidance?: Record<string, string>;\n code?: { imports?: string; example?: string };\n}\n\n// --- Content Resolution ---\nexport const CONTENT_TYPES = [\n 'pattern',\n 'theme',\n 'blueprint',\n 'archetype',\n 'shell',\n] as const;\n\nexport type ContentType = (typeof CONTENT_TYPES)[number];\n\nexport const API_CONTENT_TYPES = [\n 'patterns',\n 'themes',\n 'blueprints',\n 'archetypes',\n 'shells',\n] as const;\n\nexport type ApiContentType = (typeof API_CONTENT_TYPES)[number];\n\nexport const CONTENT_TYPE_TO_API_CONTENT_TYPE: Record<ContentType, ApiContentType> = {\n pattern: 'patterns',\n theme: 'themes',\n blueprint: 'blueprints',\n archetype: 'archetypes',\n shell: 'shells',\n};\n\nexport const API_CONTENT_TYPE_TO_CONTENT_TYPE: Record<ApiContentType, ContentType> = {\n patterns: 'pattern',\n themes: 'theme',\n blueprints: 'blueprint',\n archetypes: 'archetype',\n shells: 'shell',\n};\n\nexport function isContentType(value: string): value is ContentType {\n return CONTENT_TYPES.includes(value as ContentType);\n}\n\nexport function isApiContentType(value: string): value is ApiContentType {\n return API_CONTENT_TYPES.includes(value as ApiContentType);\n}\n\nexport interface ResolvedContent<T> {\n item: T;\n source: 'local' | 'core';\n path: string;\n}\n\n// --- Theme ---\n\nexport type CvdMode = 'deuteranopia' | 'protanopia' | 'tritanopia' | 'achromatopsia';\n\nexport interface ThemeTokens {\n base?: Record<string, string>;\n cvd?: Partial<Record<CvdMode, Record<string, string>>>;\n}\n\nexport interface Theme {\n id: string;\n name: string;\n description?: string;\n tags?: string[];\n personality?: string;\n seed?: Record<string, string>;\n palette?: Record<string, Record<string, string>>;\n modes?: string[];\n shapes?: string[];\n cvd_support?: CvdMode[];\n tokens?: ThemeTokens;\n decantr_compat?: string;\n source?: string;\n // Absorbed from former Recipe type\n decorators?: Record<string, string>;\n treatments?: Record<string, Record<string, string>>;\n spatial?: ThemeSpatial;\n shell?: ThemeShell;\n effects?: ThemeEffects;\n motion?: { preference?: string; reduce_motion?: boolean; entrance?: string; timing?: string; durations?: Record<string, string> };\n typography?: { scale?: string; heading_weight?: number; body_weight?: number; mono?: string };\n radius?: { philosophy?: string; base?: number };\n compositions?: Record<string, { shell: string; description: string; effects?: string[] }>;\n pattern_preferences?: { prefer: string[]; avoid: string[]; default_presets?: Record<string, string> };\n decorator_definitions?: Record<string, {\n description: string;\n intent: string;\n suggested_properties?: Record<string, string>;\n pairs_with?: string[];\n usage?: string[];\n }>;\n}\n\n// --- API Client Types ---\n\nexport interface ContentListResponse<T = Record<string, unknown>> {\n items: T[];\n total: number;\n limit?: number;\n offset?: number;\n}\n\nexport type ContentVerificationStatus =\n | 'unknown'\n | 'pending'\n | 'build-green'\n | 'build-red'\n | 'smoke-green'\n | 'smoke-red';\n\nexport type ContentBenchmarkConfidence = 'none' | 'low' | 'medium' | 'high';\nexport type ContentConfidenceTier = 'low' | 'medium' | 'high' | 'verified';\n\nexport type ContentGoldenUsage = 'none' | 'showcase' | 'shortlisted';\nexport const PUBLIC_CONTENT_SOURCES = [\n 'official',\n 'community',\n 'organization',\n] as const;\n\nexport type PublicContentSource = (typeof PUBLIC_CONTENT_SOURCES)[number];\n\nexport function isPublicContentSource(value: string): value is PublicContentSource {\n return PUBLIC_CONTENT_SOURCES.includes(value as PublicContentSource);\n}\n\nexport const CONTENT_INTELLIGENCE_SOURCES = [\n 'authored',\n 'benchmark',\n 'hybrid',\n] as const;\n\nexport type ContentIntelligenceSource = 'authored' | 'benchmark' | 'hybrid';\n\nexport function isContentIntelligenceSource(value: string): value is ContentIntelligenceSource {\n return CONTENT_INTELLIGENCE_SOURCES.includes(value as ContentIntelligenceSource);\n}\n\nexport interface ContentIntelligenceMetadata {\n source: ContentIntelligenceSource;\n verification_status: ContentVerificationStatus;\n last_verified_at?: string | null;\n target_coverage: string[];\n benchmark_confidence: ContentBenchmarkConfidence;\n confidence_tier: ContentConfidenceTier;\n golden_usage: ContentGoldenUsage;\n quality_score: number | null;\n confidence_score: number | null;\n recommended: boolean;\n evidence: string[];\n recommendation_reasons: string[];\n recommendation_blockers: string[];\n benchmark?: {\n classification?: ShowcaseVerificationEntry['classification'];\n target?: string | null;\n drift_signal?: ShowcaseVerificationEntry['drift']['signal'];\n build_passed?: boolean | null;\n smoke_passed?: boolean | null;\n };\n}\n\nexport interface PublicContentSummary {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n version?: string;\n name?: string;\n description?: string;\n published_at?: string;\n owner_name?: string | null;\n owner_username?: string | null;\n thumbnail_url?: string | null;\n intelligence?: ContentIntelligenceMetadata | null;\n}\n\nexport interface PublicContentRecord<TData = Record<string, unknown>> {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n version: string;\n data: TData;\n visibility: 'public' | 'private';\n status: 'pending' | 'approved' | 'rejected' | 'published';\n created_at: string;\n updated_at: string;\n published_at?: string;\n owner_name?: string | null;\n owner_username?: string | null;\n thumbnail_url?: string | null;\n intelligence?: ContentIntelligenceMetadata | null;\n}\n\nexport interface ContentItem extends PublicContentRecord<Record<string, unknown>> {}\n\nexport interface OwnedContentSummary extends PublicContentSummary {\n visibility: 'public' | 'private';\n status: 'pending' | 'approved' | 'rejected' | 'published';\n created_at: string;\n updated_at: string;\n}\n\nexport interface PublicUserProfile {\n username: string;\n display_name: string | null;\n reputation_score: number;\n tier: 'free' | 'pro' | 'team' | 'enterprise';\n created_at: string;\n content_count: number;\n content_counts: Record<string, number>;\n}\n\nexport interface PublishPayload {\n type: ApiContentType;\n slug: string;\n namespace: string;\n version: string;\n data: Record<string, unknown>;\n visibility?: 'public' | 'private';\n}\n\nexport interface PublishResponse {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n status: string;\n}\n\nexport interface SearchParams {\n q: string;\n type?: string;\n namespace?: string;\n source?: PublicContentSource;\n sort?: string;\n recommended?: boolean;\n intelligenceSource?: ContentIntelligenceSource;\n limit?: number;\n offset?: number;\n}\n\nexport interface SearchResponse {\n results: PublicContentSummary[];\n total: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface RegistryIntelligenceSummaryBucket {\n total_public_items: number;\n with_intelligence: number;\n recommended: number;\n authored: number;\n benchmark: number;\n hybrid: number;\n missing_source: number;\n smoke_green: number;\n build_green: number;\n high_confidence: number;\n verified_confidence: number;\n}\n\nexport interface RegistryIntelligenceSummaryResponse {\n $schema: string;\n generated_at: string;\n namespace: string | null;\n totals: RegistryIntelligenceSummaryBucket;\n by_type: Record<ContentType, RegistryIntelligenceSummaryBucket>;\n}\n\nexport interface UserProfile {\n id: string;\n email: string;\n tier: 'free' | 'pro' | 'team' | 'enterprise';\n reputation_score: number;\n trusted: boolean;\n}\n\nexport interface ShowcaseVerificationEntry {\n slug: string;\n target: string | null;\n classification: 'pending' | 'A' | 'B' | 'C' | 'D';\n verificationStatus: 'pending' | 'build-green' | 'build-red' | 'smoke-green' | 'smoke-red';\n build: {\n passed: boolean | null;\n durationMs: number;\n };\n smoke: {\n passed: boolean | null;\n durationMs: number;\n rootDocumentOk: boolean;\n titleOk: boolean;\n langOk: boolean;\n viewportOk: boolean;\n charsetOk: boolean;\n cspSignalOk: boolean;\n inlineScriptCount: number;\n inlineEventHandlerCount: number;\n externalScriptsWithoutIntegrityCount: number;\n externalScriptsWithIntegrityMissingCrossoriginCount: number;\n externalStylesheetsWithoutIntegrityCount: number;\n externalStylesheetsWithIntegrityMissingCrossoriginCount: number;\n externalScriptsWithInsecureTransportCount: number;\n externalStylesheetsWithInsecureTransportCount: number;\n externalMediaSourcesWithInsecureTransportCount: number;\n externalBlankLinksWithoutRelCount: number;\n externalIframesWithoutSandboxCount: number;\n externalIframesWithInsecureTransportCount: number;\n jsEvalSignalCount: number;\n jsHtmlInjectionSignalCount: number;\n jsInsecureTransportSignalCount: number;\n jsSecretSignalCount: number;\n assetCount: number;\n assetsPassed: number;\n routeHintsChecked: string[];\n routeHintsMatched: number;\n routeHintsCoverageOk: boolean;\n routeDocumentsChecked: number;\n routeDocumentsPassed: number;\n routeDocumentsHardenedCount: number;\n routeDocumentsCoverageOk: boolean;\n routeDocumentsHardeningOk: boolean;\n fullRouteCoverageOk: boolean;\n totalAssetBytes: number;\n jsAssetBytes: number;\n cssAssetBytes: number;\n largestAssetPath: string | null;\n largestAssetBytes: number;\n failures: string[];\n };\n drift: {\n signal: 'lower' | 'moderate' | 'elevated';\n penalty: number;\n inlineStyleCount: number;\n hardcodedColorCount: number;\n utilityLeakageCount: number;\n decantrTreatmentCount: number;\n hasPackManifest: boolean;\n hasDist: boolean;\n };\n}\n\nexport interface ShowcaseShortlistSummary {\n appCount: number;\n passedBuilds: number;\n failedBuilds: number;\n averageDurationMs: number;\n passedSmokes: number;\n failedSmokes: number;\n averageSmokeDurationMs: number;\n appsWithTitleOkCount: number;\n appsWithLangOkCount: number;\n appsWithViewportOkCount: number;\n appsWithCharsetOkCount: number;\n appsWithoutInlineScriptsCount: number;\n appsWithCspSignalCount: number;\n appsWithExternalScriptIntegrityCount: number;\n appsWithExternalScriptCrossoriginCount: number;\n appsWithExternalStylesheetIntegrityCount: number;\n appsWithExternalStylesheetCrossoriginCount: number;\n appsWithRouteCoverageCount: number;\n appsWithFullRouteCoverageCount: number;\n averageTotalAssetBytes: number;\n averageJsAssetBytes: number;\n averageCssAssetBytes: number;\n lowerDriftCount: number;\n moderateDriftCount: number;\n elevatedDriftCount: number;\n withPackManifestCount: number;\n}\n\nexport interface ShowcaseManifestEntry {\n slug: string;\n status: string;\n classification: string;\n origin?: string | null;\n target?: string | null;\n goldenCandidate?: string | boolean;\n notes?: string | null;\n url?: string | null;\n verification?: ShowcaseVerificationEntry | null;\n}\n\nexport interface ShowcaseManifestResponse {\n total: number;\n shortlisted: number;\n apps: ShowcaseManifestEntry[];\n}\n\nexport interface ShowcaseShortlistResponse {\n generatedAt: string | null;\n summary: ShowcaseShortlistSummary | null;\n apps: ShowcaseManifestEntry[];\n}\n\nexport interface ShowcaseShortlistReport {\n $schema: string;\n generatedAt: string;\n dryRun: boolean;\n summary: ShowcaseShortlistSummary;\n results: ShowcaseVerificationEntry[];\n}\n\nexport interface HostedFileCritiqueRequest {\n essence: EssenceFile;\n code: string;\n filePath?: string;\n treatmentsCss?: string;\n}\n\nexport interface HostedDistSnapshot {\n indexHtml: string;\n assets?: Record<string, string>;\n}\n\nexport interface HostedSourceSnapshot {\n files: Record<string, string>;\n}\n\nexport interface HostedProjectAuditRequest {\n essence: EssenceFile;\n dist?: HostedDistSnapshot;\n sources?: HostedSourceSnapshot;\n}\n\nexport type ExecutionPackType = 'scaffold' | 'section' | 'page' | 'mutation' | 'review';\n\nexport interface ExecutionPackTarget {\n platform: 'web';\n framework: string | null;\n runtime: string | null;\n adapter: string;\n}\n\nexport interface ExecutionPackScope {\n appId: string;\n pageIds: string[];\n patternIds: string[];\n}\n\nexport interface ExecutionPackExample {\n id: string;\n label: string;\n language: string;\n snippet: string;\n}\n\nexport interface ExecutionPackAntiPattern {\n id: string;\n summary: string;\n guidance: string;\n}\n\nexport interface ExecutionPackSuccessCheck {\n id: string;\n label: string;\n severity: 'error' | 'warn' | 'info';\n}\n\nexport interface ExecutionPackTokenBudget {\n target: number;\n max: number;\n strategy: string[];\n}\n\nexport interface ExecutionPackBase<TData = Record<string, unknown>> {\n $schema: string;\n packVersion: '1.0.0';\n packType: ExecutionPackType;\n objective: string;\n target: ExecutionPackTarget;\n preset: string | null;\n scope: ExecutionPackScope;\n requiredSetup: string[];\n allowedVocabulary: string[];\n examples: ExecutionPackExample[];\n antiPatterns: ExecutionPackAntiPattern[];\n successChecks: ExecutionPackSuccessCheck[];\n tokenBudget: ExecutionPackTokenBudget;\n data: TData;\n renderedMarkdown: string;\n}\n\nexport interface PackManifestEntry {\n id: string;\n markdown: string;\n json: string;\n}\n\nexport interface PackManifestSectionEntry extends PackManifestEntry {\n pageIds: string[];\n}\n\nexport interface PackManifestPageEntry extends PackManifestEntry {\n sectionId: string | null;\n sectionRole: string | null;\n}\n\nexport interface PackManifestMutationEntry extends PackManifestEntry {\n mutationType: 'add-page' | 'modify';\n}\n\nexport interface ExecutionPackManifest {\n $schema: string;\n version: '1.0.0';\n generatedAt: string;\n scaffold: PackManifestEntry | null;\n review: PackManifestEntry | null;\n sections: PackManifestSectionEntry[];\n pages: PackManifestPageEntry[];\n mutations: PackManifestMutationEntry[];\n}\n\nexport interface ScaffoldExecutionPack extends ExecutionPackBase<{\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n patternIds: string[];\n }>;\n}> {\n packType: 'scaffold';\n}\n\nexport interface ReviewExecutionPack extends ExecutionPackBase<{\n reviewType: 'app';\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n patternIds: string[];\n }>;\n focusAreas: string[];\n workflow: string[];\n}> {\n packType: 'review';\n}\n\nexport interface SectionExecutionPack extends ExecutionPackBase<{\n sectionId: string;\n role: string;\n shell: string;\n description: string;\n features: string[];\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routes: Array<{\n pageId: string;\n path: string;\n patternIds: string[];\n }>;\n}> {\n packType: 'section';\n}\n\nexport interface PageExecutionPack extends ExecutionPackBase<{\n pageId: string;\n path: string;\n shell: string;\n sectionId: string | null;\n sectionRole: string | null;\n features: string[];\n surface: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n wiringSignals: string[];\n patterns: Array<{\n id: string;\n alias: string;\n preset: string;\n layout: string;\n }>;\n}> {\n packType: 'page';\n}\n\nexport interface MutationExecutionPack extends ExecutionPackBase<{\n mutationType: 'add-page' | 'modify';\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n patternIds: string[];\n }>;\n workflow: string[];\n}> {\n packType: 'mutation';\n}\n\nexport interface ExecutionPackBundleResponse {\n $schema: string;\n generatedAt: string;\n sourceEssenceVersion: string;\n manifest: ExecutionPackManifest;\n scaffold: ScaffoldExecutionPack;\n review: ReviewExecutionPack;\n sections: SectionExecutionPack[];\n pages: PageExecutionPack[];\n mutations: MutationExecutionPack[];\n}\n\nexport interface HostedSelectedExecutionPackRequest {\n essence: EssenceFile;\n pack_type: ExecutionPackType;\n id?: string;\n}\n\nexport interface SelectedExecutionPackResponse {\n $schema: string;\n generatedAt: string;\n sourceEssenceVersion: string;\n manifest: ExecutionPackManifest;\n selector: {\n packType: ExecutionPackType;\n id: string | null;\n };\n pack:\n | ScaffoldExecutionPack\n | ReviewExecutionPack\n | SectionExecutionPack\n | PageExecutionPack\n | MutationExecutionPack;\n}\n\nexport type VerificationSeverity = 'error' | 'warn' | 'info';\n\nexport interface VerificationFinding {\n id: string;\n category: string;\n severity: VerificationSeverity;\n message: string;\n evidence: string[];\n target?: string;\n file?: string;\n rule?: string;\n suggestedFix?: string;\n}\n\nexport interface VerificationScore {\n category: string;\n focusArea: string;\n score: number;\n details: string;\n suggestions: string[];\n}\n\nexport interface FileCritiqueReport {\n $schema: string;\n file: string;\n overall: number;\n scores: VerificationScore[];\n findings: VerificationFinding[];\n focusAreas: string[];\n reviewPack: ReviewExecutionPack | null;\n}\n\nexport interface ProjectAuditRuntimeAudit {\n distPresent: boolean;\n indexPresent: boolean;\n checked: boolean;\n passed: boolean | null;\n rootDocumentOk: boolean;\n titleOk: boolean;\n langOk: boolean;\n viewportOk: boolean;\n charsetOk: boolean;\n cspSignalOk: boolean;\n inlineScriptCount: number;\n inlineEventHandlerCount: number;\n externalScriptsWithoutIntegrityCount: number;\n externalScriptsWithIntegrityMissingCrossoriginCount: number;\n externalStylesheetsWithoutIntegrityCount: number;\n externalStylesheetsWithIntegrityMissingCrossoriginCount: number;\n externalScriptsWithInsecureTransportCount: number;\n externalStylesheetsWithInsecureTransportCount: number;\n externalMediaSourcesWithInsecureTransportCount: number;\n externalBlankLinksWithoutRelCount: number;\n externalIframesWithoutSandboxCount: number;\n externalIframesWithInsecureTransportCount: number;\n jsEvalSignalCount: number;\n jsHtmlInjectionSignalCount: number;\n jsInsecureTransportSignalCount: number;\n jsSecretSignalCount: number;\n assetCount: number;\n assetsPassed: number;\n routeHintsChecked: string[];\n routeHintsMatched: number;\n routeHintsCoverageOk: boolean;\n routeDocumentsChecked: number;\n routeDocumentsPassed: number;\n routeDocumentsHardenedCount: number;\n routeDocumentsCoverageOk: boolean;\n routeDocumentsHardeningOk: boolean;\n fullRouteCoverageOk: boolean;\n totalAssetBytes: number;\n jsAssetBytes: number;\n cssAssetBytes: number;\n largestAssetPath: string | null;\n largestAssetBytes: number;\n failures: string[];\n}\n\nexport interface ProjectAuditSummary {\n errorCount: number;\n warnCount: number;\n infoCount: number;\n essenceVersion: string | null;\n reviewPackPresent: boolean;\n packManifestPresent: boolean;\n runtimeAuditChecked: boolean;\n runtimePassed: boolean | null;\n pageCount: number;\n}\n\nexport interface ProjectAuditReport {\n $schema: string;\n projectRoot: string;\n valid: boolean;\n essence: EssenceFile | null;\n reviewPack: ReviewExecutionPack | null;\n packManifest: ExecutionPackManifest | null;\n runtimeAudit: ProjectAuditRuntimeAudit;\n findings: VerificationFinding[];\n summary: ProjectAuditSummary;\n}\n"],"mappings":";AAyPO,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,IAAM,mCAAwE;AAAA,EACnF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,WAAW;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AACT;AAEO,IAAM,mCAAwE;AAAA,EACnF,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,QAAQ;AACV;AAEO,SAAS,cAAc,OAAqC;AACjE,SAAO,cAAc,SAAS,KAAoB;AACpD;AAEO,SAAS,iBAAiB,OAAwC;AACvE,SAAO,kBAAkB,SAAS,KAAuB;AAC3D;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,243 +1,14 @@
1
+ import { C as ContentType, R as ResolvedContent, P as Pattern, A as Archetype, T as Theme, B as Blueprint, S as Shell, a as PatternPreset, b as PatternIO } from './content-types-BJFuxWNj.js';
2
+ export { c as API_CONTENT_TYPES, d as API_CONTENT_TYPE_TO_CONTENT_TYPE, e as ApiContentType, f as ArchetypeHeroCustomization, g as ArchetypePage, h as ArchetypeRole, i as ArchetypeSuggestedTheme, j as BlueprintNavigation, k as BlueprintNavigationHotkey, l as BlueprintOverrides, m as BlueprintRoute, n as CONTENT_INTELLIGENCE_SOURCES, o as CONTENT_TYPES, p as CONTENT_TYPE_TO_API_CONTENT_TYPE, q as ComposeEntry, r as ContentBenchmarkConfidence, s as ContentDependencies, t as ContentGoldenUsage, u as ContentIntelligenceMetadata, v as ContentIntelligenceSource, w as ContentItem, x as ContentListResponse, y as ContentVerificationStatus, z as CvdMode, E as ExecutionPackAntiPattern, D as ExecutionPackBase, F as ExecutionPackBundleResponse, G as ExecutionPackExample, H as ExecutionPackManifest, I as ExecutionPackScope, J as ExecutionPackSuccessCheck, K as ExecutionPackTarget, L as ExecutionPackTokenBudget, M as ExecutionPackType, N as FileCritiqueReport, O as HostedDistSnapshot, Q as HostedFileCritiqueRequest, U as HostedProjectAuditRequest, V as LayoutGroup, W as LayoutItem, X as MutationExecutionPack, Y as OwnedContentSummary, Z as PUBLIC_CONTENT_SOURCES, _ as PackManifestEntry, $ as PackManifestMutationEntry, a0 as PackManifestPageEntry, a1 as PackManifestSectionEntry, a2 as PageExecutionPack, a3 as PatternCodeSpec, a4 as PatternLayoutSpec, a5 as PatternReference, a6 as PatternReferenceObject, a7 as ProjectAuditReport, a8 as ProjectAuditRuntimeAudit, a9 as ProjectAuditSummary, aa as PublicContentRecord, ab as PublicContentSource, ac as PublicContentSummary, ad as PublicUserProfile, ae as PublishPayload, af as PublishResponse, ag as RegistryIntelligenceSummaryBucket, ah as RegistryIntelligenceSummaryResponse, ai as ReviewExecutionPack, aj as ScaffoldExecutionPack, ak as SearchParams, al as SearchResponse, am as SectionExecutionPack, an as ShowcaseManifestEntry, ao as ShowcaseManifestResponse, ap as ShowcaseShortlistReport, aq as ShowcaseShortlistResponse, ar as ShowcaseShortlistSummary, as as ShowcaseVerificationEntry, at as ThemeEffects, au as ThemeShell, av as ThemeSpatial, aw as ThemeTokens, ax as UserProfile, ay as VerificationFinding, az as VerificationScore, aA as VerificationSeverity, aB as isApiContentType, aC as isContentIntelligenceSource, aD as isContentType, aE as isPublicContentSource } from './content-types-BJFuxWNj.js';
1
3
  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
- pattern: string;
39
- preset?: string;
40
- as?: string;
41
- })[];
42
- shell: string;
43
- }
44
- interface SeoHints {
45
- schema_org?: string[];
46
- meta_priorities?: string[];
47
- }
48
- interface Archetype {
49
- id: string;
50
- version: string;
51
- name: string;
52
- description: string;
53
- tags: string[];
54
- pages: ArchetypePage[];
55
- features: string[];
56
- dependencies: {
57
- patterns: Record<string, string>;
58
- recipes: Record<string, string>;
59
- };
60
- seo_hints?: SeoHints;
61
- }
62
- interface RecipeSpatialHints {
63
- density_bias: number;
64
- content_gap_shift: number;
65
- section_padding: string;
66
- card_wrapping: 'always' | 'minimal' | 'none';
67
- surface_override: string | null;
68
- }
69
- interface RecipeVisualEffects {
70
- enabled: boolean;
71
- intensity: 'subtle' | 'moderate' | 'bold';
72
- type_mapping: Record<string, string[]>;
73
- component_fallback: Record<string, string>;
74
- intensity_values?: Record<string, Record<string, string>>;
75
- }
76
- interface RecipeShell {
77
- preferred: string[];
78
- nav_style: string;
79
- root?: string;
80
- nav?: string;
81
- header?: string;
82
- dimensions?: {
83
- navWidth?: string;
84
- headerHeight?: string;
85
- };
86
- }
87
- interface Recipe {
88
- id: string;
89
- style: string;
90
- mode: string;
91
- schema_version: string;
92
- spatial_hints: RecipeSpatialHints;
93
- shell: RecipeShell;
94
- visual_effects: RecipeVisualEffects;
95
- pattern_preferences: {
96
- prefer: string[];
97
- avoid: string[];
98
- default_presets?: Record<string, string>;
99
- };
100
- pattern_overrides?: Record<string, {
101
- background?: string[];
102
- }>;
103
- /** Maps CSS class selectors (e.g. "d-surface") to property override objects (e.g. {"background": "rgba(31,31,35,0.8)"}). */
104
- treatment_overrides?: Record<string, Record<string, string>>;
105
- animation?: {
106
- entrance?: string;
107
- micro?: string;
108
- };
109
- }
110
- type ArchetypeRole = 'primary' | 'gateway' | 'public' | 'auxiliary';
111
- type ComposeEntry = string | {
112
- archetype: string;
113
- prefix: string;
114
- role?: ArchetypeRole;
115
- };
116
- interface Blueprint {
117
- id: string;
118
- name: string;
119
- description?: string;
120
- archetype: string;
121
- compose?: ComposeEntry[];
122
- theme: {
123
- style: string;
124
- recipe?: string;
125
- mode?: string;
126
- shape?: string;
127
- };
128
- personality?: string;
129
- pages: Array<{
130
- id: string;
131
- layout: string[];
132
- shell?: string;
133
- }>;
134
- features?: string[];
135
- version?: string;
136
- }
137
- interface Shell {
138
- id: string;
139
- name: string;
140
- description?: string;
141
- root?: string;
142
- nav?: string;
143
- header?: string;
144
- nav_style?: string;
145
- dimensions?: {
146
- navWidth?: string;
147
- headerHeight?: string;
148
- };
149
- }
150
- type ContentType = 'pattern' | 'archetype' | 'recipe' | 'theme' | 'blueprint';
151
- interface ResolvedContent<T> {
152
- item: T;
153
- source: 'local' | 'core';
154
- path: string;
155
- }
156
- type CvdMode = 'deuteranopia' | 'protanopia' | 'tritanopia' | 'achromatopsia';
157
- interface ThemeTokens {
158
- base?: Record<string, string>;
159
- cvd?: Partial<Record<CvdMode, Record<string, string>>>;
160
- }
161
- interface Theme {
162
- id: string;
163
- name: string;
164
- description?: string;
165
- tags?: string[];
166
- personality?: string;
167
- seed?: Record<string, string>;
168
- modes?: string[];
169
- shapes?: string[];
170
- cvd_support?: CvdMode[];
171
- tokens?: ThemeTokens;
172
- decantr_compat?: string;
173
- source?: string;
174
- }
175
- type ApiContentType = 'patterns' | 'recipes' | 'themes' | 'blueprints' | 'archetypes' | 'shells';
176
- interface ContentListResponse<T = Record<string, unknown>> {
177
- items: T[];
178
- total: number;
179
- }
180
- interface ContentItem {
181
- id: string;
182
- slug: string;
183
- namespace: string;
184
- type: string;
185
- version: string;
186
- data: Record<string, unknown>;
187
- visibility: 'public' | 'private';
188
- status: 'pending' | 'approved' | 'rejected' | 'published';
189
- created_at: string;
190
- updated_at: string;
191
- published_at?: string;
192
- }
193
- interface PublishPayload {
194
- type: ApiContentType;
195
- slug: string;
196
- namespace: string;
197
- version: string;
198
- data: Record<string, unknown>;
199
- visibility?: 'public' | 'private';
200
- }
201
- interface PublishResponse {
202
- id: string;
203
- slug: string;
204
- namespace: string;
205
- type: string;
206
- status: string;
207
- }
208
- interface SearchParams {
209
- q: string;
210
- type?: string;
211
- namespace?: string;
212
- limit?: number;
213
- offset?: number;
214
- }
215
- interface SearchResponse {
216
- results: Array<{
217
- id: string;
218
- type: string;
219
- slug: string;
220
- namespace: string;
221
- name: string;
222
- description: string;
223
- version: string;
224
- }>;
225
- total: number;
226
- }
227
- interface UserProfile {
228
- id: string;
229
- email: string;
230
- tier: 'free' | 'pro' | 'team' | 'enterprise';
231
- reputation_score: number;
232
- trusted: boolean;
233
- }
4
+ export { PublicContentSort, RegistryAPIClient, RegistryAPIClientOptions, RegistryAPIError, RegistryClient, RegistryClientOptions, SearchResult, comparePublicContent, createRegistryClient, normalizePublicContentSort, sortPublicContent } from './client.js';
234
5
 
235
6
  type ContentMap = {
236
7
  pattern: Pattern;
237
8
  archetype: Archetype;
238
- recipe: Recipe;
239
- theme: Record<string, unknown>;
9
+ theme: Theme;
240
10
  blueprint: Blueprint;
11
+ shell: Shell;
241
12
  };
242
13
  interface ResolverOptions {
243
14
  contentRoot: string;
@@ -253,7 +24,7 @@ interface ResolvedPreset {
253
24
  layout: PatternPreset['layout'];
254
25
  code: PatternPreset['code'];
255
26
  }
256
- declare function resolvePatternPreset(pattern: Pattern, explicitPreset?: string, recipeDefaultPresets?: Record<string, string>): ResolvedPreset;
27
+ declare function resolvePatternPreset(pattern: Pattern, explicitPreset?: string, themeDefaultPresets?: Record<string, string>): ResolvedPreset;
257
28
 
258
29
  type HookType = 'search' | 'filter' | 'selection' | 'sort';
259
30
  interface WiringSignal {
@@ -307,59 +78,4 @@ declare function buildIOMap(entries: PatternIOEntry[]): Map<string, PatternIO>;
307
78
  */
308
79
  declare function detectWirings(layout: LayoutItem[], patternIOMap?: Map<string, PatternIO>): WiringResult[];
309
80
 
310
- interface RegistryAPIClientOptions {
311
- baseUrl?: string;
312
- apiKey?: string;
313
- timeoutMs?: number;
314
- cacheTtlMs?: number;
315
- }
316
- declare class RegistryAPIClient {
317
- private baseUrl;
318
- private apiKey;
319
- private timeoutMs;
320
- private cacheTtlMs;
321
- private cache;
322
- constructor(options?: RegistryAPIClientOptions);
323
- private buildHeaders;
324
- private fetchWithTimeout;
325
- private request;
326
- private getCached;
327
- private setCache;
328
- clearCache(): void;
329
- checkHealth(): Promise<boolean>;
330
- listContent<T = Record<string, unknown>>(type: ApiContentType, params?: {
331
- namespace?: string;
332
- limit?: number;
333
- offset?: number;
334
- }): Promise<ContentListResponse<T>>;
335
- getContent<T = Record<string, unknown>>(type: ApiContentType, namespace: string, slug: string): Promise<T>;
336
- getPattern(namespace: string, slug: string): Promise<Pattern>;
337
- getArchetype(namespace: string, slug: string): Promise<Archetype>;
338
- getRecipe(namespace: string, slug: string): Promise<Recipe>;
339
- getTheme(namespace: string, slug: string): Promise<Theme>;
340
- getBlueprint(namespace: string, slug: string): Promise<Blueprint>;
341
- getShell(namespace: string, slug: string): Promise<Shell>;
342
- search(params: SearchParams): Promise<SearchResponse>;
343
- getProfile(): Promise<UserProfile>;
344
- publishContent(payload: PublishPayload): Promise<PublishResponse>;
345
- getMyContent(): Promise<ContentListResponse<ContentItem>>;
346
- getSchema(name?: string): Promise<Record<string, unknown>>;
347
- }
348
- interface RegistryClientOptions {
349
- baseUrl?: string;
350
- }
351
- interface SearchResult {
352
- id: string;
353
- type: string;
354
- name: string;
355
- description: string;
356
- version: string;
357
- tags: string[];
358
- }
359
- interface RegistryClient {
360
- search(query: string, type?: string): Promise<SearchResult[]>;
361
- fetch(type: string, id: string, version?: string): Promise<unknown>;
362
- }
363
- declare function createRegistryClient(options?: RegistryClientOptions): RegistryClient;
364
-
365
- export { type ApiContentType, type Archetype, type ArchetypePage, type ArchetypeRole, type Blueprint, type ComposeEntry, type ContentItem, type ContentListResponse, type ContentResolver, type ContentType, type HookType, type IOWiringEdge, type Pattern, type PatternIO, type PatternIOEntry, type PatternPreset, type PublishPayload, type PublishResponse, type Recipe, type RecipeShell, type RecipeSpatialHints, type RecipeVisualEffects, RegistryAPIClient, type RegistryAPIClientOptions, type RegistryClient, type RegistryClientOptions, type ResolvedContent, type ResolvedPreset, type ResolverOptions, type SearchParams, type SearchResponse, type SearchResult, type Shell, type UserProfile, WIRING_RULES, type WiringResult, type WiringRule, type WiringSignal, buildIOMap, createRegistryClient, createResolver, deriveIOWirings, detectWirings, resolvePatternPreset };
81
+ export { Archetype, Blueprint, type ContentResolver, ContentType, type HookType, type IOWiringEdge, Pattern, PatternIO, type PatternIOEntry, PatternPreset, ResolvedContent, type ResolvedPreset, type ResolverOptions, Shell, Theme, WIRING_RULES, type WiringResult, type WiringRule, type WiringSignal, buildIOMap, createResolver, deriveIOWirings, detectWirings, resolvePatternPreset };