@decantr/registry 1.0.1 → 1.0.3

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.
@@ -1 +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":[]}
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 /**\n * v2.1 Tier C1. Declared runtime interactions this pattern MUST implement.\n * Surfaced as a checkbox checklist in the per-page execution pack; enforced\n * by `decantr check --strict` (C5 guard rule). Each value maps to a\n * canonical implementation (treatment class + handler pattern) — see the\n * Interaction Requirements table in scaffolded DECANTR.md. Before this\n * field, motion/interactivity lived only as prose philosophy that cold\n * LLMs routinely categorized as \"nice to have\" and skipped.\n */\n interactions?: string[];\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 = ['pattern', 'theme', 'blueprint', 'archetype', 'shell'] 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?: {\n preference?: string;\n reduce_motion?: boolean;\n entrance?: string;\n timing?: string;\n durations?: Record<string, string>;\n };\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?: {\n prefer: string[];\n avoid: string[];\n default_presets?: Record<string, string>;\n };\n decorator_definitions?: Record<\n string,\n {\n description: string;\n intent: string;\n suggested_properties?: Record<string, string>;\n pairs_with?: string[];\n usage?: string[];\n }\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 = ['official', 'community', 'organization'] 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 = ['authored', 'benchmark', 'hybrid'] 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\n 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 shell?: string;\n patternIds: string[];\n }>;\n }> {\n packType: 'scaffold';\n}\n\nexport interface ReviewExecutionPack\n 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 shell?: string;\n patternIds: string[];\n }>;\n focusAreas: string[];\n workflow: string[];\n }> {\n packType: 'review';\n}\n\nexport interface SectionExecutionPack\n 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 shell?: string;\n patternIds: string[];\n }>;\n }> {\n packType: 'section';\n}\n\nexport interface PageExecutionPack\n 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\n 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 shell?: 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":";AAmQO,IAAM,gBAAgB,CAAC,WAAW,SAAS,aAAa,aAAa,OAAO;AAI5E,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,7 +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';
3
- import { LayoutItem } from '@decantr/essence-spec';
4
1
  export { PublicContentSort, RegistryAPIClient, RegistryAPIClientOptions, RegistryAPIError, RegistryClient, RegistryClientOptions, SearchResult, comparePublicContent, createRegistryClient, normalizePublicContentSort, sortPublicContent } from './client.js';
2
+ import { P as PatternPreset, a as Pattern, C as ContentType, R as ResolvedContent, A as Archetype, T as Theme, B as Blueprint, S as Shell, b as PatternIO } from './content-types-Clwipgq9.js';
3
+ 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-Clwipgq9.js';
4
+ import { LayoutItem } from '@decantr/essence-spec';
5
+
6
+ interface ResolvedPreset {
7
+ preset: string;
8
+ layout: PatternPreset['layout'];
9
+ code: PatternPreset['code'];
10
+ }
11
+ declare function resolvePatternPreset(pattern: Pattern, explicitPreset?: string, themeDefaultPresets?: Record<string, string>): ResolvedPreset;
5
12
 
6
13
  type ContentMap = {
7
14
  pattern: Pattern;
@@ -19,13 +26,6 @@ interface ContentResolver {
19
26
  }
20
27
  declare function createResolver(options: ResolverOptions): ContentResolver;
21
28
 
22
- interface ResolvedPreset {
23
- preset: string;
24
- layout: PatternPreset['layout'];
25
- code: PatternPreset['code'];
26
- }
27
- declare function resolvePatternPreset(pattern: Pattern, explicitPreset?: string, themeDefaultPresets?: Record<string, string>): ResolvedPreset;
28
-
29
29
  type HookType = 'search' | 'filter' | 'selection' | 'sort';
30
30
  interface WiringSignal {
31
31
  name: string;