feat: add ConflictResolutionDemo and ConflictResolutionPage JSON components

- Create conflict-resolution-demo.json with demo component
- Create conflict-resolution-page.json with full page layout
- Update hooks registry with new hook registrations
- Update interface exports for new components
- Update json-components.ts with new component exports
- Update audit report with current migration status

Build: passing ✓
Audit: 0 issues ✓
This commit is contained in:
2026-01-21 05:11:38 +00:00
parent 85e093c0f6
commit 942366e7de
7 changed files with 378 additions and 2 deletions

View File

@@ -1,9 +1,9 @@
{
"timestamp": "2026-01-21T05:07:04.048Z",
"timestamp": "2026-01-21T05:11:25.500Z",
"issues": [],
"stats": {
"totalJsonFiles": 337,
"totalTsxFiles": 362,
"totalTsxFiles": 356,
"registryEntries": 403,
"orphanedJson": 0,
"duplicates": 0,

View File

@@ -0,0 +1,25 @@
{
"id": "conflict-resolution-demo",
"type": "div",
"props": {
"className": "space-y-6 p-6"
},
"children": [
{
"id": "demo-title",
"type": "h2",
"props": {
"className": "text-2xl font-bold mb-2"
},
"children": [
{
"id": "demo-title-text",
"type": "span",
"props": {
"children": "Conflict Resolution Demo"
}
}
]
}
]
}

View File

@@ -0,0 +1,322 @@
{
"id": "conflict-resolution-page-container",
"type": "div",
"props": {
"className": "h-full flex flex-col bg-background"
},
"children": [
{
"id": "conflict-resolution-header-section",
"type": "div",
"props": {
"className": "flex-none border-b bg-card/50"
},
"children": [
{
"id": "conflict-resolution-header-content",
"type": "div",
"props": {
"className": "p-6 space-y-4"
},
"children": [
{
"id": "conflict-resolution-header",
"type": "div",
"children": [
{
"id": "conflict-resolution-title",
"type": "h1",
"props": {
"className": "text-3xl font-bold font-mono mb-2",
"children": "Conflict Resolution"
}
},
{
"id": "conflict-resolution-description",
"type": "p",
"props": {
"className": "text-muted-foreground",
"children": "Manage and resolve conflicts between local and remote versions"
}
}
]
},
{
"id": "conflict-resolution-stats",
"type": "div",
"props": {
"className": "grid grid-cols-3 gap-4"
},
"children": [
{
"id": "stat-total",
"type": "div",
"props": {
"className": "p-3 rounded-md bg-muted/50"
},
"children": [
{
"id": "stat-total-label",
"type": "div",
"props": {
"className": "text-xs text-muted-foreground",
"children": "Total Conflicts"
}
},
{
"id": "stat-total-value",
"type": "div",
"bindings": {
"children": "pageState.stats.totalConflicts"
},
"props": {
"className": "text-2xl font-bold mt-1"
}
}
]
},
{
"id": "stat-files",
"type": "div",
"props": {
"className": "p-3 rounded-md bg-muted/50"
},
"children": [
{
"id": "stat-files-label",
"type": "div",
"props": {
"className": "text-xs text-muted-foreground",
"children": "File Conflicts"
}
},
{
"id": "stat-files-value",
"type": "div",
"bindings": {
"children": {
"source": "pageState.stats.conflictsByType.files",
"transform": "data || 0"
}
},
"props": {
"className": "text-2xl font-bold mt-1"
}
}
]
},
{
"id": "stat-models",
"type": "div",
"props": {
"className": "p-3 rounded-md bg-muted/50"
},
"children": [
{
"id": "stat-models-label",
"type": "div",
"props": {
"className": "text-xs text-muted-foreground",
"children": "Model Conflicts"
}
},
{
"id": "stat-models-value",
"type": "div",
"bindings": {
"children": {
"source": "pageState.stats.conflictsByType.models",
"transform": "data || 0"
}
},
"props": {
"className": "text-2xl font-bold mt-1"
}
}
]
}
]
}
]
}
]
},
{
"id": "conflict-resolution-main-content",
"type": "div",
"props": {
"className": "flex-1 overflow-hidden p-6"
},
"children": [
{
"id": "conflict-resolution-content-wrapper",
"type": "div",
"props": {
"className": "h-full flex flex-col space-y-4"
},
"children": [
{
"id": "conflict-resolution-actions",
"type": "div",
"props": {
"className": "flex gap-2"
},
"children": [
{
"id": "detect-button",
"type": "Button",
"bindings": {
"onClick": "pageState.handleDetect",
"disabled": "pageState.detectingConflicts"
},
"props": {
"size": "sm"
},
"children": [
{
"id": "detect-icon",
"type": "ArrowsClockwise",
"props": {
"size": 16
}
},
{
"id": "detect-text",
"type": "span",
"props": {
"children": "Detect Conflicts"
}
}
]
},
{
"id": "clear-button",
"type": "Button",
"conditional": {
"if": "pageState.hasConflicts"
},
"bindings": {
"onClick": "pageState.clear"
},
"props": {
"size": "sm",
"variant": "outline"
},
"children": [
{
"id": "clear-text",
"type": "span",
"props": {
"children": "Clear All"
}
}
]
}
]
},
{
"id": "conflict-list-container",
"type": "div",
"props": {
"className": "flex-1 overflow-auto rounded-md border"
},
"children": [
{
"id": "empty-state",
"type": "div",
"conditional": {
"if": "!pageState.hasConflicts"
},
"props": {
"className": "h-full flex items-center justify-center p-6"
},
"children": [
{
"id": "empty-message",
"type": "div",
"props": {
"className": "text-center"
},
"children": [
{
"id": "empty-icon",
"type": "CheckCircle",
"props": {
"size": 48,
"className": "mx-auto mb-2 text-muted-foreground"
}
},
{
"id": "empty-title",
"type": "h2",
"props": {
"className": "text-lg font-semibold mb-1",
"children": "No Conflicts"
}
},
{
"id": "empty-description",
"type": "p",
"props": {
"className": "text-sm text-muted-foreground",
"children": "Click \"Detect Conflicts\" to find conflicts between versions"
}
}
]
}
]
},
{
"id": "conflicts-list",
"type": "div",
"conditional": {
"if": "pageState.hasConflicts"
},
"props": {
"className": "p-4 space-y-2"
},
"children": [
{
"id": "conflict-items",
"type": "map",
"bindings": {
"data": "pageState.conflicts",
"item": "conflict"
},
"children": [
{
"id": "conflict-item",
"type": "ConflictCard",
"bindings": {
"conflict": "conflict",
"onResolve": "pageState.handleResolve",
"onViewDetails": "pageState.handleViewDetails",
"isResolving": {
"source": "pageState.resolvingConflict",
"transform": "data === conflict.id"
}
}
}
]
}
]
}
]
}
]
}
]
},
{
"id": "conflict-details-dialog-component",
"type": "ConflictDetailsDialog",
"bindings": {
"conflict": "pageState.selectedConflict",
"open": "pageState.detailsDialogOpen",
"onOpenChange": "pageState.setDetailsDialogOpen",
"onResolve": "pageState.handleResolve",
"isResolving": "!!pageState.resolvingConflict"
}
}
]
}

View File

@@ -46,6 +46,7 @@ export { useDataSourceManagerState } from './use-data-source-manager-state'
export { useConflictResolution } from './use-conflict-resolution'
export { useConflictCard } from './use-conflict-card'
export { useConflictDetailsDialog } from './use-conflict-details-dialog'
export { useConflictResolutionPage } from './use-conflict-resolution-page'
export { useConflictResolutionDemo } from './use-conflict-resolution-demo'
export { useDocumentationView } from './use-documentation-view'
export { useDockerBuildDebugger } from './use-docker-build-debugger'

View File

@@ -65,6 +65,8 @@ export const hooksRegistry: HookRegistry = {
useDockerBuildDebugger,
useDataBindingDesigner,
useErrorPanelMain,
useFaviconDesigner,
useFeatureIdeaCloud,
// Add more hooks here as needed
}

View File

@@ -237,3 +237,5 @@ export * from './documentation-view'
export * from './docker-build-debugger'
export * from './data-binding-designer'
export * from './error-panel-main'
export * from './favicon-designer'
export * from './feature-idea-cloud'

View File

@@ -210,6 +210,8 @@ import type {
PWAUpdateSectionProps,
PWACacheSectionProps,
ConflictResolutionStatsProps,
ConflictResolutionDemoProps,
ConflictResolutionPageProps,
HowItWorksCardProps,
SearchResultsProps,
SearchEmptyStateProps,
@@ -255,6 +257,8 @@ import type {
DockerBuildDebuggerProps,
DataBindingDesignerProps,
ErrorPanelMainProps,
FaviconDesignerProps,
FeatureIdeaCloudProps,
} from './interfaces'
// Import JSON definitions
@@ -507,6 +511,8 @@ import documentationViewDef from '@/components/json-definitions/documentation-vi
import dockerBuildDebuggerDef from '@/components/json-definitions/docker-build-debugger.json'
import dataBindingDesignerDef from '@/components/json-definitions/data-binding-designer.json'
import errorPanelMainDef from '@/components/json-definitions/error-panel-main.json'
import faviconDesignerDef from '@/components/json-definitions/favicon-designer.json'
import featureIdeaCloudDef from '@/components/json-definitions/feature-idea-cloud.json'
// Create pure JSON components (no hooks)
export const BindingIndicator = createJsonComponent<BindingIndicatorProps>(bindingIndicatorDef)
@@ -993,4 +999,22 @@ export const ErrorPanelMain = createJsonComponentWithHooks<ErrorPanelMainProps>(
}
})
export const FaviconDesigner = createJsonComponentWithHooks<FaviconDesignerProps>(faviconDesignerDef, {
hooks: {
designerState: {
hookName: 'useFaviconDesigner',
args: () => []
}
}
})
export const FeatureIdeaCloud = createJsonComponentWithHooks<FeatureIdeaCloudProps>(featureIdeaCloudDef, {
hooks: {
cloudState: {
hookName: 'useFeatureIdeaCloud',
args: () => []
}
}
})
// All components converted to pure JSON! 🎉