openuispec 0.1.18 → 0.1.19

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 (96) hide show
  1. package/README.md +52 -34
  2. package/cli/index.ts +1 -1
  3. package/docs/stress-test-maturity-report.md +97 -0
  4. package/examples/todo-orbit/AGENTS.md +127 -0
  5. package/examples/todo-orbit/CLAUDE.md +127 -0
  6. package/examples/todo-orbit/README.md +62 -0
  7. package/examples/todo-orbit/generated/android/Todo Orbit/README.md +14 -0
  8. package/examples/todo-orbit/generated/android/Todo Orbit/app/build.gradle.kts +58 -0
  9. package/examples/todo-orbit/generated/android/Todo Orbit/app/proguard-rules.pro +1 -0
  10. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/AndroidManifest.xml +20 -0
  11. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/MainActivity.kt +14 -0
  12. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/TodoOrbitApp.kt +345 -0
  13. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/AppLogic.kt +231 -0
  14. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Models.kt +169 -0
  15. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Strings.kt +8 -0
  16. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/components/CommonComponents.kt +185 -0
  17. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/AnalyticsScreen.kt +193 -0
  18. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/SettingsScreen.kt +102 -0
  19. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/TasksScreen.kt +342 -0
  20. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/sheets/EditorSheets.kt +344 -0
  21. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/theme/TodoOrbitTheme.kt +59 -0
  22. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values/strings.xml +148 -0
  23. package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values-ru/strings.xml +154 -0
  24. package/examples/todo-orbit/generated/android/Todo Orbit/build.gradle.kts +4 -0
  25. package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.jar +0 -0
  26. package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.properties +7 -0
  27. package/examples/todo-orbit/generated/android/Todo Orbit/gradle.properties +4 -0
  28. package/examples/todo-orbit/generated/android/Todo Orbit/gradlew +248 -0
  29. package/examples/todo-orbit/generated/android/Todo Orbit/gradlew.bat +93 -0
  30. package/examples/todo-orbit/generated/android/Todo Orbit/settings.gradle.kts +18 -0
  31. package/examples/todo-orbit/generated/ios/Todo Orbit/README.md +29 -0
  32. package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/en.lproj/Localizable.strings +118 -0
  33. package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/ru.lproj/Localizable.strings +118 -0
  34. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/App/TodoOrbitApp.swift +50 -0
  35. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/OrbitChrome.swift +204 -0
  36. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/SchedulePreviewView.swift +126 -0
  37. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/TrendChartView.swift +70 -0
  38. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/RecurringRuleSheet.swift +123 -0
  39. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/TaskEditorSheet.swift +60 -0
  40. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Models/DomainModels.swift +238 -0
  41. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/AnalyticsView.swift +94 -0
  42. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/SettingsView.swift +74 -0
  43. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/TasksHomeView.swift +363 -0
  44. package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Support/AppModel.swift +324 -0
  45. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.pbxproj +408 -0
  46. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  47. package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/xcshareddata/xcschemes/TodoOrbit.xcscheme +79 -0
  48. package/examples/todo-orbit/generated/ios/Todo Orbit/project.yml +24 -0
  49. package/examples/todo-orbit/generated/web/Todo Orbit/index.html +16 -0
  50. package/examples/todo-orbit/generated/web/Todo Orbit/package-lock.json +1087 -0
  51. package/examples/todo-orbit/generated/web/Todo Orbit/package.json +24 -0
  52. package/examples/todo-orbit/generated/web/Todo Orbit/src/App.tsx +2114 -0
  53. package/examples/todo-orbit/generated/web/Todo Orbit/src/main.tsx +13 -0
  54. package/examples/todo-orbit/generated/web/Todo Orbit/src/styles.css +886 -0
  55. package/examples/todo-orbit/generated/web/Todo Orbit/tsconfig.json +19 -0
  56. package/examples/todo-orbit/generated/web/Todo Orbit/vite.config.ts +6 -0
  57. package/examples/todo-orbit/openuispec/README.md +158 -0
  58. package/examples/todo-orbit/openuispec/contracts/.gitkeep +0 -0
  59. package/examples/todo-orbit/openuispec/contracts/action_trigger.yaml +28 -0
  60. package/examples/todo-orbit/openuispec/contracts/collection.yaml +32 -0
  61. package/examples/todo-orbit/openuispec/contracts/data_display.yaml +38 -0
  62. package/examples/todo-orbit/openuispec/contracts/feedback.yaml +32 -0
  63. package/examples/todo-orbit/openuispec/contracts/input_field.yaml +52 -0
  64. package/examples/todo-orbit/openuispec/contracts/nav_container.yaml +47 -0
  65. package/examples/todo-orbit/openuispec/contracts/surface.yaml +28 -0
  66. package/examples/todo-orbit/openuispec/contracts/x_schedule_preview.yaml +134 -0
  67. package/examples/todo-orbit/openuispec/contracts/x_task_trend_chart.yaml +139 -0
  68. package/examples/todo-orbit/openuispec/flows/.gitkeep +0 -0
  69. package/examples/todo-orbit/openuispec/flows/create_recurring_rule.yaml +253 -0
  70. package/examples/todo-orbit/openuispec/flows/create_task.yaml +118 -0
  71. package/examples/todo-orbit/openuispec/flows/edit_task.yaml +126 -0
  72. package/examples/todo-orbit/openuispec/locales/.gitkeep +0 -0
  73. package/examples/todo-orbit/openuispec/locales/en.json +150 -0
  74. package/examples/todo-orbit/openuispec/locales/ru.json +150 -0
  75. package/examples/todo-orbit/openuispec/openuispec.yaml +122 -0
  76. package/examples/todo-orbit/openuispec/platform/.gitkeep +0 -0
  77. package/examples/todo-orbit/openuispec/platform/android.yaml +19 -0
  78. package/examples/todo-orbit/openuispec/platform/ios.yaml +20 -0
  79. package/examples/todo-orbit/openuispec/platform/web.yaml +22 -0
  80. package/examples/todo-orbit/openuispec/screens/.gitkeep +0 -0
  81. package/examples/todo-orbit/openuispec/screens/analytics.yaml +139 -0
  82. package/examples/todo-orbit/openuispec/screens/home.yaml +172 -0
  83. package/examples/todo-orbit/openuispec/screens/settings.yaml +148 -0
  84. package/examples/todo-orbit/openuispec/screens/task_detail.yaml +223 -0
  85. package/examples/todo-orbit/openuispec/tokens/.gitkeep +0 -0
  86. package/examples/todo-orbit/openuispec/tokens/color.yaml +93 -0
  87. package/examples/todo-orbit/openuispec/tokens/elevation.yaml +25 -0
  88. package/examples/todo-orbit/openuispec/tokens/icons.yaml +92 -0
  89. package/examples/todo-orbit/openuispec/tokens/layout.yaml +107 -0
  90. package/examples/todo-orbit/openuispec/tokens/motion.yaml +39 -0
  91. package/examples/todo-orbit/openuispec/tokens/spacing.yaml +18 -0
  92. package/examples/todo-orbit/openuispec/tokens/themes.yaml +23 -0
  93. package/examples/todo-orbit/openuispec/tokens/typography.yaml +52 -0
  94. package/package.json +1 -1
  95. package/schema/validate.ts +0 -2
  96. package/spec/openuispec-v0.1.md +76 -12
@@ -0,0 +1,172 @@
1
+ home:
2
+ semantic: "Main todo list with search, filters, completion toggles, and a quick-create action"
3
+ status: ready
4
+
5
+ data:
6
+ tasks:
7
+ source: "api.tasks.list"
8
+ params:
9
+ filter: "state.active_filter"
10
+ search: "state.search_query"
11
+ task_counts:
12
+ source: "api.tasks.counts"
13
+
14
+ state:
15
+ active_filter:
16
+ type: enum
17
+ values: [all, open, done]
18
+ default: all
19
+ search_query:
20
+ type: string
21
+ default: ""
22
+ selected_task_id:
23
+ type: string
24
+ default: ""
25
+
26
+ navigation:
27
+ contract: nav_container
28
+ props:
29
+ items:
30
+ - id: "tasks"
31
+ label: "$t:nav.tasks"
32
+ icon: "checkmark_list"
33
+ icon_active: "checkmark_list_fill"
34
+ destination: "screens/home"
35
+ - id: "analytics"
36
+ label: "$t:nav.analytics"
37
+ icon: "chart_line"
38
+ icon_active: "chart_line_fill"
39
+ destination: "screens/analytics"
40
+ - id: "settings"
41
+ label: "$t:nav.settings"
42
+ icon: "gear"
43
+ icon_active: "gear_fill"
44
+ destination: "screens/settings"
45
+ selected: "tasks"
46
+ adaptive:
47
+ compact: { variant: tab_bar }
48
+ regular: { variant: rail }
49
+ expanded: { variant: sidebar, collapsed: false }
50
+
51
+ layout:
52
+ adaptive:
53
+ compact:
54
+ type: scroll_vertical
55
+ safe_area: true
56
+ padding: "spacing.page_margin"
57
+ expanded:
58
+ type: split_view
59
+ primary_width: 0.42
60
+ primary:
61
+ sections: [hero, search, filters, task_list]
62
+ secondary:
63
+ sections: ["screens/task_detail"]
64
+ params:
65
+ task_id: "state.selected_task_id"
66
+ sections:
67
+ - id: hero
68
+ layout: { type: stack, spacing: "spacing.sm" }
69
+ children:
70
+ - contract: data_display
71
+ variant: inline
72
+ props:
73
+ title: "$t:home.title"
74
+ subtitle: "$t:home.summary"
75
+ t_params:
76
+ total: "task_counts.all"
77
+ open: "task_counts.open"
78
+ tokens_override:
79
+ title_style: "typography.heading_lg"
80
+ subtitle_style: "typography.body_sm"
81
+
82
+ - id: search
83
+ margin_top: "spacing.md"
84
+ contract: input_field
85
+ input_type: text
86
+ props:
87
+ label: "$t:home.search_label"
88
+ placeholder: "$t:home.search_placeholder"
89
+ value: "state.search_query"
90
+ icon: { ref: "search", position: leading }
91
+ clearable: true
92
+
93
+ - id: filters
94
+ margin_top: "spacing.md"
95
+ contract: collection
96
+ variant: chips
97
+ props:
98
+ data:
99
+ - { id: "all", label: "$t:home.filter.all", count: "task_counts.all" }
100
+ - { id: "open", label: "$t:home.filter.open", count: "task_counts.open" }
101
+ - { id: "done", label: "$t:home.filter.done", count: "task_counts.done" }
102
+ item_contract: action_trigger
103
+ item_variant: ghost
104
+ item_props_map:
105
+ label: "{item.label} ({item.count})"
106
+ selectable: true
107
+ selection_mode: single
108
+ selected: "state.active_filter"
109
+ action:
110
+ type: set_state
111
+ target: "state.active_filter"
112
+ value: "item.id"
113
+
114
+ - id: task_list
115
+ margin_top: "spacing.lg"
116
+ contract: collection
117
+ variant: list
118
+ props:
119
+ data: "tasks"
120
+ item_contract: data_display
121
+ item_variant: compact
122
+ item_props_map:
123
+ title: "item.title"
124
+ subtitle: "{item.due_date | format:date_relative}"
125
+ leading:
126
+ contract: input_field
127
+ input_type: checkbox
128
+ props:
129
+ value: "item.status == done"
130
+ label: "$t:home.mark_complete"
131
+ t_params:
132
+ title: "item.title"
133
+ action:
134
+ type: api_call
135
+ endpoint: "api.tasks.toggleStatus"
136
+ params: { id: "item.id" }
137
+ optimistic:
138
+ target: "item.status"
139
+ value: "{item.status == done ? open : done}"
140
+ revert_on_error: true
141
+ trailing:
142
+ contract: data_display
143
+ variant: inline
144
+ props:
145
+ badge:
146
+ dot: true
147
+ severity: "{item.priority | map:priority_to_severity}"
148
+ pull_to_refresh: true
149
+ empty_state:
150
+ icon: "checkmark_circle_fill"
151
+ title: "$t:home.empty_title"
152
+ body: "$t:home.empty_body"
153
+ action:
154
+ type: sequence
155
+ actions:
156
+ - { type: set_state, target: "state.selected_task_id", value: "item.id" }
157
+ - { type: navigate, destination: "screens/task_detail", params: { task_id: "item.id" } }
158
+
159
+ - id: fab
160
+ position: "floating-bottom-trailing"
161
+ contract: action_trigger
162
+ variant: primary
163
+ size: lg
164
+ props:
165
+ label: "$t:home.new_task"
166
+ icon: "plus"
167
+ tokens_override:
168
+ shadow: "elevation.lg"
169
+ action:
170
+ type: navigate
171
+ destination: "flows/create_task"
172
+ presentation: "sheet"
@@ -0,0 +1,148 @@
1
+ settings:
2
+ semantic: "Preferences screen for application language and theme"
3
+ status: ready
4
+
5
+ data:
6
+ preferences:
7
+ source: "api.preferences.get"
8
+
9
+ state:
10
+ is_saving:
11
+ type: bool
12
+ default: false
13
+
14
+ navigation:
15
+ contract: nav_container
16
+ props:
17
+ items:
18
+ - id: "tasks"
19
+ label: "$t:nav.tasks"
20
+ icon: "checkmark_list"
21
+ icon_active: "checkmark_list_fill"
22
+ destination: "screens/home"
23
+ - id: "analytics"
24
+ label: "$t:nav.analytics"
25
+ icon: "chart_line"
26
+ icon_active: "chart_line_fill"
27
+ destination: "screens/analytics"
28
+ - id: "settings"
29
+ label: "$t:nav.settings"
30
+ icon: "gear"
31
+ icon_active: "gear_fill"
32
+ destination: "screens/settings"
33
+ selected: "settings"
34
+ adaptive:
35
+ compact: { variant: tab_bar }
36
+ regular: { variant: rail }
37
+ expanded: { variant: sidebar, collapsed: false }
38
+
39
+ layout:
40
+ type: scroll_vertical
41
+ safe_area: true
42
+ padding: "spacing.page_margin"
43
+ sections:
44
+ - id: header
45
+ layout: { type: stack, spacing: "spacing.sm" }
46
+ children:
47
+ - contract: data_display
48
+ variant: inline
49
+ props:
50
+ title: "$t:settings.title"
51
+ subtitle: "$t:settings.subtitle"
52
+ tokens_override:
53
+ title_style: "typography.heading_lg"
54
+ subtitle_style: "typography.body_sm"
55
+
56
+ - id: form
57
+ form_id: "settings_form"
58
+ margin_top: "spacing.lg"
59
+ layout: { type: stack, spacing: "spacing.md" }
60
+ children:
61
+ - contract: input_field
62
+ input_type: select
63
+ props:
64
+ label: "$t:settings.language"
65
+ icon: { ref: "globe", position: leading }
66
+ options:
67
+ - { value: "en", label: "$t:settings.language_en" }
68
+ - { value: "ru", label: "$t:settings.language_ru" }
69
+ data_binding: "form.locale"
70
+
71
+ - contract: input_field
72
+ input_type: select
73
+ props:
74
+ label: "$t:settings.theme"
75
+ options:
76
+ - { value: "light", label: "$t:settings.theme_light" }
77
+ - { value: "dark", label: "$t:settings.theme_dark" }
78
+ data_binding: "form.theme"
79
+
80
+ - contract: input_field
81
+ input_type: toggle
82
+ props:
83
+ label: "$t:settings.reminders"
84
+ helper_text: "$t:settings.reminders_helper"
85
+ value: "preferences.reminders_enabled"
86
+ data_binding: "form.reminders_enabled"
87
+
88
+ - contract: input_field
89
+ input_type: toggle
90
+ props:
91
+ label: "$t:settings.daily_summary"
92
+ helper_text: "$t:settings.daily_summary_helper"
93
+ value: "preferences.daily_summary_enabled"
94
+ data_binding: "form.daily_summary_enabled"
95
+
96
+ - contract: action_trigger
97
+ variant: primary
98
+ full_width: true
99
+ props:
100
+ label: "$t:settings.save"
101
+ loading_label: "$t:settings.saving"
102
+ state_binding:
103
+ loading: "state.is_saving"
104
+ action:
105
+ type: submit_form
106
+ form_id: "settings_form"
107
+
108
+ - id: automation
109
+ margin_top: "spacing.xl"
110
+ layout: { type: stack, spacing: "spacing.sm" }
111
+ children:
112
+ - contract: data_display
113
+ variant: inline
114
+ props:
115
+ title: "$t:settings.automation_title"
116
+ subtitle: "$t:settings.automation_subtitle"
117
+ tokens_override:
118
+ title_style: "typography.heading_sm"
119
+ subtitle_style: "typography.body_sm"
120
+
121
+ - contract: action_trigger
122
+ variant: primary
123
+ full_width: true
124
+ props:
125
+ label: "$t:settings.automation_create_rule"
126
+ icon: "calendar"
127
+ action:
128
+ type: navigate
129
+ destination: "flows/create_recurring_rule"
130
+
131
+ on_submit:
132
+ type: sequence
133
+ actions:
134
+ - { type: set_state, target: "state.is_saving", value: true }
135
+ - type: api_call
136
+ endpoint: "api.preferences.update"
137
+ body: "form"
138
+ on_success:
139
+ type: sequence
140
+ actions:
141
+ - { type: set_state, target: "state.is_saving", value: false }
142
+ - { type: feedback, variant: toast, message: "$t:settings.saved", severity: success, duration: 2500 }
143
+ - { type: refresh, target: "screens/settings.preferences" }
144
+ on_error:
145
+ type: sequence
146
+ actions:
147
+ - { type: set_state, target: "state.is_saving", value: false }
148
+ - { 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)" }