Merge pull request #60 from johndoe6345789/codex/move-seed-data-and-ui-copy-to-json

Extract DataBindingDesigner/UI copy into JSON and split DataSource components
This commit is contained in:
2026-01-18 00:45:35 +00:00
committed by GitHub
15 changed files with 786 additions and 442 deletions
+84
View File
@@ -0,0 +1,84 @@
{
"header": {
"title": "Data Binding Designer",
"description": "Connect UI components to KV storage and computed values"
},
"bindingsCard": {
"title": "Component Bindings",
"description": "Example components with data bindings",
"emptyState": "No bindings configured",
"actionLabel": "Bind"
},
"howItWorks": {
"title": "How It Works",
"steps": [
"Create data sources (KV store for persistence, static for constants)",
"Add computed sources to derive values from other sources",
"Bind component properties to data sources for reactive updates"
]
},
"seed": {
"dataSources": [
{
"id": "userProfile",
"type": "kv",
"key": "user-profile",
"defaultValue": {
"name": "John Doe",
"email": "john@example.com"
}
},
{
"id": "counter",
"type": "kv",
"key": "app-counter",
"defaultValue": 0
},
{
"id": "displayName",
"type": "computed",
"dependencies": ["userProfile"],
"computeId": "displayName"
}
],
"components": [
{
"id": "title",
"type": "Heading",
"props": {
"className": "text-2xl font-bold"
},
"bindings": {
"children": {
"source": "displayName"
}
}
},
{
"id": "counter-display",
"type": "Text",
"props": {
"className": "text-lg"
},
"bindings": {
"children": {
"source": "counter"
}
}
},
{
"id": "email-input",
"type": "Input",
"props": {
"placeholder": "Enter email"
},
"bindings": {
"value": {
"source": "userProfile",
"path": "email"
}
}
}
]
}
}
+33
View File
@@ -0,0 +1,33 @@
{
"title": "Edit Data Source",
"description": "Configure the data source settings and dependencies",
"fields": {
"id": {
"label": "ID",
"placeholder": "unique-id"
}
},
"kv": {
"keyLabel": "KV Store Key",
"keyPlaceholder": "storage-key",
"keyHelp": "Key used for persistent storage in the KV store",
"defaultLabel": "Default Value (JSON)",
"defaultPlaceholder": "{\"key\": \"value\"}"
},
"static": {
"valueLabel": "Value (JSON)",
"valuePlaceholder": "{\"key\": \"value\"}"
},
"computed": {
"computeLabel": "Compute Function",
"computePlaceholder": "(data) => data.source1 + data.source2",
"computeHelp": "Function that computes the value from other data sources",
"dependenciesLabel": "Dependencies",
"availableSourcesLabel": "Available Sources",
"emptyDependencies": "No data sources available. Create KV or static sources first."
},
"actions": {
"cancel": "Cancel",
"save": "Save Changes"
}
}
+29
View File
@@ -0,0 +1,29 @@
{
"header": {
"title": "Data Sources",
"description": "Manage KV storage, computed values, and static data"
},
"actions": {
"add": "Add Data Source"
},
"menu": {
"kv": "KV Store",
"computed": "Computed Value",
"static": "Static Data"
},
"emptyState": {
"title": "No data sources yet",
"description": "Create your first data source to start binding data to components"
},
"groups": {
"kv": "KV Store",
"static": "Static Data",
"computed": "Computed Values"
},
"toasts": {
"deleteBlockedTitle": "Cannot delete",
"deleteBlockedDescription": "This source is used by {count} computed {noun}",
"deleted": "Data source deleted",
"updated": "Data source updated"
}
}