openuispec 0.1.18 → 0.1.20

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.
Files changed (98) hide show
  1. package/README.md +52 -34
  2. package/cli/index.ts +1 -1
  3. package/cli/init.ts +48 -211
  4. package/docs/stress-test-maturity-report.md +97 -0
  5. package/examples/todo-orbit/AGENTS.md +127 -0
  6. package/examples/todo-orbit/CLAUDE.md +75 -0
  7. package/examples/todo-orbit/README.md +62 -0
  8. package/examples/todo-orbit/generated/android/Todo Orbit/README.md +14 -0
  9. package/examples/todo-orbit/generated/android/Todo Orbit/app/build.gradle.kts +58 -0
  10. package/examples/todo-orbit/generated/android/Todo Orbit/app/proguard-rules.pro +1 -0
  11. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/AndroidManifest.xml +20 -0
  12. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/MainActivity.kt +14 -0
  13. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/TodoOrbitApp.kt +345 -0
  14. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/AppLogic.kt +231 -0
  15. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Models.kt +169 -0
  16. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Strings.kt +8 -0
  17. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/components/CommonComponents.kt +185 -0
  18. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/AnalyticsScreen.kt +193 -0
  19. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/SettingsScreen.kt +102 -0
  20. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/TasksScreen.kt +342 -0
  21. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/sheets/EditorSheets.kt +344 -0
  22. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/theme/TodoOrbitTheme.kt +59 -0
  23. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values/strings.xml +148 -0
  24. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values-ru/strings.xml +154 -0
  25. package/examples/todo-orbit/generated/android/Todo Orbit/build.gradle.kts +4 -0
  26. package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.jar +0 -0
  27. package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.properties +7 -0
  28. package/examples/todo-orbit/generated/android/Todo Orbit/gradle.properties +4 -0
  29. package/examples/todo-orbit/generated/android/Todo Orbit/gradlew +248 -0
  30. package/examples/todo-orbit/generated/android/Todo Orbit/gradlew.bat +93 -0
  31. package/examples/todo-orbit/generated/android/Todo Orbit/settings.gradle.kts +18 -0
  32. package/examples/todo-orbit/generated/ios/Todo Orbit/README.md +29 -0
  33. package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/en.lproj/Localizable.strings +118 -0
  34. package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/ru.lproj/Localizable.strings +118 -0
  35. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/App/TodoOrbitApp.swift +50 -0
  36. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/OrbitChrome.swift +204 -0
  37. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/SchedulePreviewView.swift +126 -0
  38. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/TrendChartView.swift +70 -0
  39. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/RecurringRuleSheet.swift +123 -0
  40. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/TaskEditorSheet.swift +60 -0
  41. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Models/DomainModels.swift +238 -0
  42. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/AnalyticsView.swift +94 -0
  43. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/SettingsView.swift +74 -0
  44. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/TasksHomeView.swift +363 -0
  45. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Support/AppModel.swift +324 -0
  46. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.pbxproj +408 -0
  47. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  48. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/xcshareddata/xcschemes/TodoOrbit.xcscheme +79 -0
  49. package/examples/todo-orbit/generated/ios/Todo Orbit/project.yml +24 -0
  50. package/examples/todo-orbit/generated/web/Todo Orbit/index.html +16 -0
  51. package/examples/todo-orbit/generated/web/Todo Orbit/package-lock.json +1087 -0
  52. package/examples/todo-orbit/generated/web/Todo Orbit/package.json +24 -0
  53. package/examples/todo-orbit/generated/web/Todo Orbit/src/App.tsx +2114 -0
  54. package/examples/todo-orbit/generated/web/Todo Orbit/src/main.tsx +13 -0
  55. package/examples/todo-orbit/generated/web/Todo Orbit/src/styles.css +886 -0
  56. package/examples/todo-orbit/generated/web/Todo Orbit/tsconfig.json +19 -0
  57. package/examples/todo-orbit/generated/web/Todo Orbit/vite.config.ts +6 -0
  58. package/examples/todo-orbit/openuispec/README.md +158 -0
  59. package/examples/todo-orbit/openuispec/contracts/.gitkeep +0 -0
  60. package/examples/todo-orbit/openuispec/contracts/action_trigger.yaml +28 -0
  61. package/examples/todo-orbit/openuispec/contracts/collection.yaml +32 -0
  62. package/examples/todo-orbit/openuispec/contracts/data_display.yaml +38 -0
  63. package/examples/todo-orbit/openuispec/contracts/feedback.yaml +32 -0
  64. package/examples/todo-orbit/openuispec/contracts/input_field.yaml +52 -0
  65. package/examples/todo-orbit/openuispec/contracts/nav_container.yaml +47 -0
  66. package/examples/todo-orbit/openuispec/contracts/surface.yaml +28 -0
  67. package/examples/todo-orbit/openuispec/contracts/x_schedule_preview.yaml +134 -0
  68. package/examples/todo-orbit/openuispec/contracts/x_task_trend_chart.yaml +139 -0
  69. package/examples/todo-orbit/openuispec/flows/.gitkeep +0 -0
  70. package/examples/todo-orbit/openuispec/flows/create_recurring_rule.yaml +253 -0
  71. package/examples/todo-orbit/openuispec/flows/create_task.yaml +118 -0
  72. package/examples/todo-orbit/openuispec/flows/edit_task.yaml +126 -0
  73. package/examples/todo-orbit/openuispec/locales/.gitkeep +0 -0
  74. package/examples/todo-orbit/openuispec/locales/en.json +150 -0
  75. package/examples/todo-orbit/openuispec/locales/ru.json +150 -0
  76. package/examples/todo-orbit/openuispec/openuispec.yaml +122 -0
  77. package/examples/todo-orbit/openuispec/platform/.gitkeep +0 -0
  78. package/examples/todo-orbit/openuispec/platform/android.yaml +19 -0
  79. package/examples/todo-orbit/openuispec/platform/ios.yaml +20 -0
  80. package/examples/todo-orbit/openuispec/platform/web.yaml +22 -0
  81. package/examples/todo-orbit/openuispec/screens/.gitkeep +0 -0
  82. package/examples/todo-orbit/openuispec/screens/analytics.yaml +140 -0
  83. package/examples/todo-orbit/openuispec/screens/home.yaml +173 -0
  84. package/examples/todo-orbit/openuispec/screens/settings.yaml +149 -0
  85. package/examples/todo-orbit/openuispec/screens/task_detail.yaml +223 -0
  86. package/examples/todo-orbit/openuispec/tokens/.gitkeep +0 -0
  87. package/examples/todo-orbit/openuispec/tokens/color.yaml +93 -0
  88. package/examples/todo-orbit/openuispec/tokens/elevation.yaml +25 -0
  89. package/examples/todo-orbit/openuispec/tokens/icons.yaml +92 -0
  90. package/examples/todo-orbit/openuispec/tokens/layout.yaml +107 -0
  91. package/examples/todo-orbit/openuispec/tokens/motion.yaml +39 -0
  92. package/examples/todo-orbit/openuispec/tokens/spacing.yaml +18 -0
  93. package/examples/todo-orbit/openuispec/tokens/themes.yaml +23 -0
  94. package/examples/todo-orbit/openuispec/tokens/typography.yaml +52 -0
  95. package/package.json +1 -1
  96. package/schema/screen.schema.json +9 -0
  97. package/schema/validate.ts +0 -2
  98. package/spec/openuispec-v0.1.md +129 -27
@@ -0,0 +1,173 @@
1
+ home:
2
+ semantic: "Main todo list with search, filters, completion toggles, and a quick-create action"
3
+ title: "$t:nav.tasks"
4
+ status: ready
5
+
6
+ data:
7
+ tasks:
8
+ source: "api.tasks.list"
9
+ params:
10
+ filter: "state.active_filter"
11
+ search: "state.search_query"
12
+ task_counts:
13
+ source: "api.tasks.counts"
14
+
15
+ state:
16
+ active_filter:
17
+ type: enum
18
+ values: [all, open, done]
19
+ default: all
20
+ search_query:
21
+ type: string
22
+ default: ""
23
+ selected_task_id:
24
+ type: string
25
+ default: ""
26
+
27
+ navigation:
28
+ contract: nav_container
29
+ props:
30
+ items:
31
+ - id: "tasks"
32
+ label: "$t:nav.tasks"
33
+ icon: "checkmark_list"
34
+ icon_active: "checkmark_list_fill"
35
+ destination: "screens/home"
36
+ - id: "analytics"
37
+ label: "$t:nav.analytics"
38
+ icon: "chart_line"
39
+ icon_active: "chart_line_fill"
40
+ destination: "screens/analytics"
41
+ - id: "settings"
42
+ label: "$t:nav.settings"
43
+ icon: "gear"
44
+ icon_active: "gear_fill"
45
+ destination: "screens/settings"
46
+ selected: "tasks"
47
+ adaptive:
48
+ compact: { variant: tab_bar }
49
+ regular: { variant: rail }
50
+ expanded: { variant: sidebar, collapsed: false }
51
+
52
+ layout:
53
+ adaptive:
54
+ compact:
55
+ type: scroll_vertical
56
+ safe_area: true
57
+ padding: "spacing.page_margin"
58
+ expanded:
59
+ type: split_view
60
+ primary_width: 0.42
61
+ primary:
62
+ sections: [hero, search, filters, task_list]
63
+ secondary:
64
+ sections: ["screens/task_detail"]
65
+ params:
66
+ task_id: "state.selected_task_id"
67
+ sections:
68
+ - id: hero
69
+ layout: { type: stack, spacing: "spacing.sm" }
70
+ children:
71
+ - contract: data_display
72
+ variant: inline
73
+ props:
74
+ title: "$t:home.title"
75
+ subtitle: "$t:home.summary"
76
+ t_params:
77
+ total: "task_counts.all"
78
+ open: "task_counts.open"
79
+ tokens_override:
80
+ title_style: "typography.heading_lg"
81
+ subtitle_style: "typography.body_sm"
82
+
83
+ - id: search
84
+ margin_top: "spacing.md"
85
+ contract: input_field
86
+ input_type: text
87
+ props:
88
+ label: "$t:home.search_label"
89
+ placeholder: "$t:home.search_placeholder"
90
+ value: "state.search_query"
91
+ icon: { ref: "search", position: leading }
92
+ clearable: true
93
+
94
+ - id: filters
95
+ margin_top: "spacing.md"
96
+ contract: collection
97
+ variant: chips
98
+ props:
99
+ data:
100
+ - { id: "all", label: "$t:home.filter.all", count: "task_counts.all" }
101
+ - { id: "open", label: "$t:home.filter.open", count: "task_counts.open" }
102
+ - { id: "done", label: "$t:home.filter.done", count: "task_counts.done" }
103
+ item_contract: action_trigger
104
+ item_variant: ghost
105
+ item_props_map:
106
+ label: "{item.label} ({item.count})"
107
+ selectable: true
108
+ selection_mode: single
109
+ selected: "state.active_filter"
110
+ action:
111
+ type: set_state
112
+ target: "state.active_filter"
113
+ value: "item.id"
114
+
115
+ - id: task_list
116
+ margin_top: "spacing.lg"
117
+ contract: collection
118
+ variant: list
119
+ props:
120
+ data: "tasks"
121
+ item_contract: data_display
122
+ item_variant: compact
123
+ item_props_map:
124
+ title: "item.title"
125
+ subtitle: "{item.due_date | format:date_relative}"
126
+ leading:
127
+ contract: input_field
128
+ input_type: checkbox
129
+ props:
130
+ value: "item.status == done"
131
+ label: "$t:home.mark_complete"
132
+ t_params:
133
+ title: "item.title"
134
+ action:
135
+ type: api_call
136
+ endpoint: "api.tasks.toggleStatus"
137
+ params: { id: "item.id" }
138
+ optimistic:
139
+ target: "item.status"
140
+ value: "{item.status == done ? open : done}"
141
+ revert_on_error: true
142
+ trailing:
143
+ contract: data_display
144
+ variant: inline
145
+ props:
146
+ badge:
147
+ dot: true
148
+ severity: "{item.priority | map:priority_to_severity}"
149
+ pull_to_refresh: true
150
+ empty_state:
151
+ icon: "checkmark_circle_fill"
152
+ title: "$t:home.empty_title"
153
+ body: "$t:home.empty_body"
154
+ action:
155
+ type: sequence
156
+ actions:
157
+ - { type: set_state, target: "state.selected_task_id", value: "item.id" }
158
+ - { type: navigate, destination: "screens/task_detail", params: { task_id: "item.id" } }
159
+
160
+ - id: fab
161
+ position: "floating-bottom-trailing"
162
+ contract: action_trigger
163
+ variant: primary
164
+ size: lg
165
+ props:
166
+ label: "$t:home.new_task"
167
+ icon: "plus"
168
+ tokens_override:
169
+ shadow: "elevation.lg"
170
+ action:
171
+ type: navigate
172
+ destination: "flows/create_task"
173
+ presentation: "sheet"
@@ -0,0 +1,149 @@
1
+ settings:
2
+ semantic: "Preferences screen for application language and theme"
3
+ title: "$t:nav.settings"
4
+ status: ready
5
+
6
+ data:
7
+ preferences:
8
+ source: "api.preferences.get"
9
+
10
+ state:
11
+ is_saving:
12
+ type: bool
13
+ default: false
14
+
15
+ navigation:
16
+ contract: nav_container
17
+ props:
18
+ items:
19
+ - id: "tasks"
20
+ label: "$t:nav.tasks"
21
+ icon: "checkmark_list"
22
+ icon_active: "checkmark_list_fill"
23
+ destination: "screens/home"
24
+ - id: "analytics"
25
+ label: "$t:nav.analytics"
26
+ icon: "chart_line"
27
+ icon_active: "chart_line_fill"
28
+ destination: "screens/analytics"
29
+ - id: "settings"
30
+ label: "$t:nav.settings"
31
+ icon: "gear"
32
+ icon_active: "gear_fill"
33
+ destination: "screens/settings"
34
+ selected: "settings"
35
+ adaptive:
36
+ compact: { variant: tab_bar }
37
+ regular: { variant: rail }
38
+ expanded: { variant: sidebar, collapsed: false }
39
+
40
+ layout:
41
+ type: scroll_vertical
42
+ safe_area: true
43
+ padding: "spacing.page_margin"
44
+ sections:
45
+ - id: header
46
+ layout: { type: stack, spacing: "spacing.sm" }
47
+ children:
48
+ - contract: data_display
49
+ variant: inline
50
+ props:
51
+ title: "$t:settings.title"
52
+ subtitle: "$t:settings.subtitle"
53
+ tokens_override:
54
+ title_style: "typography.heading_lg"
55
+ subtitle_style: "typography.body_sm"
56
+
57
+ - id: form
58
+ form_id: "settings_form"
59
+ margin_top: "spacing.lg"
60
+ layout: { type: stack, spacing: "spacing.md" }
61
+ children:
62
+ - contract: input_field
63
+ input_type: select
64
+ props:
65
+ label: "$t:settings.language"
66
+ icon: { ref: "globe", position: leading }
67
+ options:
68
+ - { value: "en", label: "$t:settings.language_en" }
69
+ - { value: "ru", label: "$t:settings.language_ru" }
70
+ data_binding: "form.locale"
71
+
72
+ - contract: input_field
73
+ input_type: select
74
+ props:
75
+ label: "$t:settings.theme"
76
+ options:
77
+ - { value: "light", label: "$t:settings.theme_light" }
78
+ - { value: "dark", label: "$t:settings.theme_dark" }
79
+ data_binding: "form.theme"
80
+
81
+ - contract: input_field
82
+ input_type: toggle
83
+ props:
84
+ label: "$t:settings.reminders"
85
+ helper_text: "$t:settings.reminders_helper"
86
+ value: "preferences.reminders_enabled"
87
+ data_binding: "form.reminders_enabled"
88
+
89
+ - contract: input_field
90
+ input_type: toggle
91
+ props:
92
+ label: "$t:settings.daily_summary"
93
+ helper_text: "$t:settings.daily_summary_helper"
94
+ value: "preferences.daily_summary_enabled"
95
+ data_binding: "form.daily_summary_enabled"
96
+
97
+ - contract: action_trigger
98
+ variant: primary
99
+ full_width: true
100
+ props:
101
+ label: "$t:settings.save"
102
+ loading_label: "$t:settings.saving"
103
+ state_binding:
104
+ loading: "state.is_saving"
105
+ action:
106
+ type: submit_form
107
+ form_id: "settings_form"
108
+
109
+ - id: automation
110
+ margin_top: "spacing.xl"
111
+ layout: { type: stack, spacing: "spacing.sm" }
112
+ children:
113
+ - contract: data_display
114
+ variant: inline
115
+ props:
116
+ title: "$t:settings.automation_title"
117
+ subtitle: "$t:settings.automation_subtitle"
118
+ tokens_override:
119
+ title_style: "typography.heading_sm"
120
+ subtitle_style: "typography.body_sm"
121
+
122
+ - contract: action_trigger
123
+ variant: primary
124
+ full_width: true
125
+ props:
126
+ label: "$t:settings.automation_create_rule"
127
+ icon: "calendar"
128
+ action:
129
+ type: navigate
130
+ destination: "flows/create_recurring_rule"
131
+
132
+ on_submit:
133
+ type: sequence
134
+ actions:
135
+ - { type: set_state, target: "state.is_saving", value: true }
136
+ - type: api_call
137
+ endpoint: "api.preferences.update"
138
+ body: "form"
139
+ on_success:
140
+ type: sequence
141
+ actions:
142
+ - { type: set_state, target: "state.is_saving", value: false }
143
+ - { type: feedback, variant: toast, message: "$t:settings.saved", severity: success, duration: 2500 }
144
+ - { type: refresh, target: "screens/settings.preferences" }
145
+ on_error:
146
+ type: sequence
147
+ actions:
148
+ - { type: set_state, target: "state.is_saving", value: false }
149
+ - { type: feedback, variant: banner, title: "$t:settings.error_title", message: "{error.message}", severity: error }
@@ -0,0 +1,223 @@
1
+ task_detail:
2
+ semantic: "Displays full task information with edit, status, and destructive actions"
3
+ status: ready
4
+
5
+ params:
6
+ task_id: { type: string, required: true }
7
+
8
+ data:
9
+ task:
10
+ source: "api.tasks.getById"
11
+ params: { id: "params.task_id" }
12
+
13
+ layout:
14
+ type: scroll_vertical
15
+ safe_area: true
16
+ sections:
17
+ - id: header
18
+ padding: "spacing.page_margin"
19
+ layout: { type: stack, spacing: "spacing.md" }
20
+ children:
21
+ - contract: data_display
22
+ variant: hero
23
+ props:
24
+ title: "{task.title}"
25
+ subtitle: "{task.due_date | default:$t:task_detail.no_due_date}"
26
+ badge:
27
+ text: "{task.status | format:status_label}"
28
+ severity: "{task.status | map:task_status_severity}"
29
+ metadata:
30
+ priority: "{task.priority | format:priority_label}"
31
+
32
+ - id: stat_group
33
+ layout:
34
+ adaptive:
35
+ compact:
36
+ type: grid
37
+ columns: 2
38
+ gap: "spacing.sm"
39
+ regular:
40
+ type: row
41
+ spacing: "spacing.sm"
42
+ children:
43
+ - contract: data_display
44
+ variant: stat
45
+ props:
46
+ title: "$t:task_detail.status"
47
+ body: "{task.status | format:status_label}"
48
+ - contract: data_display
49
+ variant: stat
50
+ props:
51
+ title: "$t:task_detail.priority"
52
+ body: "{task.priority | format:priority_label}"
53
+ - contract: data_display
54
+ variant: stat
55
+ props:
56
+ title: "$t:task_detail.created"
57
+ body: "{task.created_at | format:date}"
58
+ - contract: data_display
59
+ variant: stat
60
+ props:
61
+ title: "$t:task_detail.updated"
62
+ body: "{task.updated_at | format:date}"
63
+
64
+ - id: notes
65
+ padding_h: "spacing.page_margin"
66
+ margin_top: "spacing.md"
67
+ condition: "task.notes != null"
68
+ layout: { type: stack, spacing: "spacing.xs" }
69
+ adaptive:
70
+ expanded:
71
+ max_width: 720
72
+ children:
73
+ - contract: data_display
74
+ variant: inline
75
+ props:
76
+ title: "$t:task_detail.notes"
77
+ tokens_override:
78
+ title_style: "typography.heading_sm"
79
+ - contract: data_display
80
+ variant: inline
81
+ props:
82
+ title: "{task.notes}"
83
+ tokens_override:
84
+ title_style: "typography.body"
85
+
86
+ - id: details
87
+ padding_h: "spacing.page_margin"
88
+ margin_top: "spacing.lg"
89
+ layout: { type: stack, spacing: "spacing.none" }
90
+ adaptive:
91
+ expanded:
92
+ max_width: 720
93
+ children:
94
+ - contract: data_display
95
+ variant: compact
96
+ props:
97
+ title: "$t:task_detail.due_date"
98
+ trailing: "{task.due_date | default:$t:task_detail.no_due_date}"
99
+ - contract: data_display
100
+ variant: compact
101
+ props:
102
+ title: "$t:task_detail.created"
103
+ trailing: "{task.created_at | format:date}"
104
+ - contract: data_display
105
+ variant: compact
106
+ props:
107
+ title: "$t:task_detail.updated"
108
+ trailing: "{task.updated_at | format:date}"
109
+
110
+ - id: actions
111
+ padding: "spacing.page_margin"
112
+ margin_top: "spacing.xl"
113
+ layout:
114
+ adaptive:
115
+ compact:
116
+ type: stack
117
+ spacing: "spacing.sm"
118
+ regular:
119
+ type: row
120
+ spacing: "spacing.sm"
121
+ wrap: true
122
+ children:
123
+ - contract: action_trigger
124
+ variant: primary
125
+ props:
126
+ label: "$t:task_detail.edit"
127
+ icon: "pencil"
128
+ action:
129
+ type: navigate
130
+ destination: "flows/edit_task"
131
+ params: { task_id: "task.id" }
132
+ presentation: "sheet"
133
+
134
+ - contract: action_trigger
135
+ variant: ghost
136
+ props:
137
+ label: "$t:task_detail.toggle_status"
138
+ icon: "checkmark"
139
+ action:
140
+ type: api_call
141
+ endpoint: "api.tasks.toggleStatus"
142
+ params: { id: "task.id" }
143
+ optimistic:
144
+ target: "task.status"
145
+ value: "{task.status == done ? open : done}"
146
+ revert_on_error: true
147
+ on_success:
148
+ type: feedback
149
+ variant: toast
150
+ message: "$t:task_detail.updated_feedback"
151
+ severity: success
152
+ duration: 2500
153
+ on_error:
154
+ type: feedback
155
+ variant: toast
156
+ message: "$t:task_detail.update_error"
157
+ severity: error
158
+
159
+ - contract: action_trigger
160
+ variant: ghost
161
+ props:
162
+ label: "$t:task_detail.more_info"
163
+ action:
164
+ type: present
165
+ surface: "task_meta"
166
+
167
+ - contract: action_trigger
168
+ variant: destructive
169
+ props:
170
+ label: "$t:task_detail.delete"
171
+ icon: "trash"
172
+ action:
173
+ type: confirm
174
+ confirmation:
175
+ contract: feedback
176
+ variant: dialog
177
+ props:
178
+ title: "$t:task_detail.delete_title"
179
+ message: "$t:task_detail.delete_message"
180
+ severity: error
181
+ actions:
182
+ - label: "$t:common.cancel"
183
+ variant: secondary
184
+ action: { type: dismiss }
185
+ - label: "$t:common.delete"
186
+ variant: destructive
187
+ action:
188
+ type: sequence
189
+ actions:
190
+ - type: api_call
191
+ endpoint: "api.tasks.delete"
192
+ params: { id: "task.id" }
193
+ - { type: feedback, variant: toast, message: "$t:task_detail.deleted_feedback", severity: success, duration: 2500 }
194
+ - { type: navigate, destination: "screens/home" }
195
+
196
+ surfaces:
197
+ task_meta:
198
+ contract: surface
199
+ variant: sheet
200
+ props:
201
+ title: "$t:task_detail.more_info"
202
+ size: md
203
+ content:
204
+ - contract: data_display
205
+ variant: compact
206
+ props:
207
+ title: "$t:task_detail.status"
208
+ trailing: "{task.status | format:status_label}"
209
+ - contract: data_display
210
+ variant: compact
211
+ props:
212
+ title: "$t:task_detail.priority"
213
+ trailing: "{task.priority | format:priority_label}"
214
+ - contract: data_display
215
+ variant: compact
216
+ props:
217
+ title: "$t:task_detail.created"
218
+ trailing: "{task.created_at | format:date}"
219
+ - contract: data_display
220
+ variant: compact
221
+ props:
222
+ title: "$t:task_detail.updated"
223
+ trailing: "{task.updated_at | format:date}"
File without changes
@@ -0,0 +1,93 @@
1
+ color:
2
+ brand:
3
+ primary:
4
+ semantic: "Primary accent for create actions, selected states, and focused UI"
5
+ reference: "#0F766E"
6
+ range:
7
+ hue: [172, 182]
8
+ saturation: [65, 82]
9
+ lightness: [30, 42]
10
+ on_color:
11
+ reference: "#FFFFFF"
12
+ contrast_min: 4.5
13
+ secondary:
14
+ semantic: "Warm accent for highlights and due-date emphasis"
15
+ reference: "#F59E0B"
16
+ range:
17
+ hue: [34, 42]
18
+ saturation: [85, 96]
19
+ lightness: [46, 58]
20
+ on_color:
21
+ reference: "#111827"
22
+ contrast_min: 4.5
23
+
24
+ surface:
25
+ primary:
26
+ semantic: "Main app background"
27
+ reference: "#FCFCF9"
28
+ secondary:
29
+ semantic: "Cards, grouped controls, and search surfaces"
30
+ reference: "#F3F4EE"
31
+ tertiary:
32
+ semantic: "Canvas tint behind elevated content"
33
+ reference: "#E7EBE4"
34
+
35
+ text:
36
+ primary:
37
+ semantic: "Primary text and screen titles"
38
+ reference: "#172026"
39
+ contrast_min: 7.0
40
+ secondary:
41
+ semantic: "Supportive metadata and helper copy"
42
+ reference: "#52606D"
43
+ contrast_min: 4.5
44
+ tertiary:
45
+ semantic: "Hints, placeholders, and quiet metadata"
46
+ reference: "#7B8794"
47
+ contrast_min: 3.0
48
+ disabled:
49
+ semantic: "Disabled text and inactive controls"
50
+ reference: "#B0B8C1"
51
+
52
+ semantic:
53
+ success:
54
+ semantic: "Completed tasks and successful actions"
55
+ reference: "#15803D"
56
+ range: { hue: [126, 136], saturation: [62, 78], lightness: [28, 40] }
57
+ on_color: { reference: "#FFFFFF", contrast_min: 4.5 }
58
+ warning:
59
+ semantic: "High-priority tasks and caution states"
60
+ reference: "#D97706"
61
+ range: { hue: [30, 38], saturation: [86, 96], lightness: [42, 54] }
62
+ on_color: { reference: "#FFFFFF", contrast_min: 4.5 }
63
+ danger:
64
+ semantic: "Destructive actions and irreversible warnings"
65
+ reference: "#DC2626"
66
+ range: { hue: [0, 8], saturation: [72, 88], lightness: [46, 56] }
67
+ on_color: { reference: "#FFFFFF", contrast_min: 4.5 }
68
+ info:
69
+ semantic: "Active task states and informational badges"
70
+ reference: "#2563EB"
71
+ range: { hue: [214, 224], saturation: [74, 90], lightness: [48, 58] }
72
+ on_color: { reference: "#FFFFFF", contrast_min: 4.5 }
73
+
74
+ border:
75
+ default:
76
+ semantic: "Default separators and field borders"
77
+ reference: "#CBD2D9"
78
+ opacity: 0.28
79
+ emphasis:
80
+ semantic: "Focused and selected outlines"
81
+ reference: "#0F766E"
82
+ opacity: 0.4
83
+
84
+ priority:
85
+ low:
86
+ semantic: "Low-priority task marker"
87
+ reference: "#94A3B8"
88
+ medium:
89
+ semantic: "Medium-priority task marker"
90
+ reference: "#2563EB"
91
+ high:
92
+ semantic: "High-priority task marker"
93
+ reference: "#D97706"
@@ -0,0 +1,25 @@
1
+ elevation:
2
+ none:
3
+ semantic: "Flat surfaces with no elevation"
4
+ value: "none"
5
+
6
+ sm:
7
+ semantic: "Subtle lift for fields and pressed states"
8
+ platform:
9
+ ios: { shadow: { color: "black", opacity: 0.05, radius: 4, y: 1 } }
10
+ android: { elevation: 1 }
11
+ web: { box_shadow: "0 1px 3px rgba(0,0,0,0.05)" }
12
+
13
+ md:
14
+ semantic: "Cards and popovers"
15
+ platform:
16
+ ios: { shadow: { color: "black", opacity: 0.08, radius: 10, y: 3 } }
17
+ android: { elevation: 3 }
18
+ web: { box_shadow: "0 6px 18px rgba(23,32,38,0.08)" }
19
+
20
+ lg:
21
+ semantic: "Floating action buttons and modal surfaces"
22
+ platform:
23
+ ios: { shadow: { color: "black", opacity: 0.12, radius: 18, y: 6 } }
24
+ android: { elevation: 6 }
25
+ web: { box_shadow: "0 12px 28px rgba(23,32,38,0.14)" }