kasy-cli 1.21.9 → 1.23.0

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 (269) hide show
  1. package/lib/commands/add.js +93 -80
  2. package/lib/commands/configure.js +100 -32
  3. package/lib/commands/doctor.js +28 -2
  4. package/lib/commands/new.js +80 -37
  5. package/lib/commands/notifications.js +1 -1
  6. package/lib/commands/remove.js +43 -15
  7. package/lib/commands/run.js +2 -2
  8. package/lib/commands/update.js +2 -2
  9. package/lib/scaffold/CHANGELOG.json +14 -0
  10. package/lib/scaffold/backends/api/generator.js +14 -14
  11. package/lib/scaffold/backends/api/patch/README.md +83 -0
  12. package/lib/scaffold/backends/api/patch/lib/core/data/api/storage_api.dart +1 -1
  13. package/lib/scaffold/backends/api/patch/lib/core/data/entities/user_entity.dart +5 -0
  14. package/lib/scaffold/backends/api/patch/lib/{environnements.dart → environments.dart} +3 -11
  15. package/lib/scaffold/backends/api/patch/lib/features/ai_chat/api/ai_chat_api.dart +108 -0
  16. package/lib/scaffold/backends/api/patch/lib/features/ai_chat/api/ai_chat_conversation_entity.dart +51 -0
  17. package/lib/scaffold/backends/api/patch/lib/features/{llm_chat/api/llm_chat_message_entity.dart → ai_chat/api/ai_chat_message_entity.dart} +5 -5
  18. package/lib/scaffold/backends/api/patch/lib/features/{llm_chat/providers/llm_chat_notifier.dart → ai_chat/providers/ai_chat_notifier.dart} +71 -38
  19. package/lib/scaffold/backends/api/patch/lib/features/authentication/api/authentication_api.dart +2 -2
  20. package/lib/scaffold/backends/api/patch/lib/features/feedbacks/api/feature_request_api.dart +54 -0
  21. package/lib/scaffold/backends/api/patch/lib/features/onboarding/models/user_info.dart +16 -16
  22. package/lib/scaffold/backends/api/patch/lib/features/onboarding/ui/components/onboarding_att_setup.dart +4 -3
  23. package/lib/scaffold/backends/api/patch/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +38 -28
  24. package/lib/scaffold/backends/api/patch/lib/features/settings/ui/components/admin/admin_users_api.dart +100 -0
  25. package/lib/scaffold/backends/api/patch/lib/features/{subscription → subscriptions}/api/entities/subscription_entity.dart +13 -0
  26. package/lib/scaffold/backends/api/patch/lib/features/subscriptions/api/stripe_backend_api.dart +60 -0
  27. package/lib/scaffold/backends/api/patch/lib/features/{subscription → subscriptions}/api/subscription_api.dart +1 -1
  28. package/lib/scaffold/backends/api/pubspec.yaml.tpl +4 -5
  29. package/lib/scaffold/backends/firebase/deploy.js +87 -13
  30. package/lib/scaffold/backends/firebase/generator.js +5 -5
  31. package/lib/scaffold/backends/firebase/tokens.js +4 -4
  32. package/lib/scaffold/backends/supabase/deploy.js +63 -11
  33. package/lib/scaffold/backends/supabase/edge-functions/admin-list-users/index.ts +149 -0
  34. package/lib/scaffold/backends/supabase/edge-functions/{llm-chat → ai-chat}/index.ts +19 -19
  35. package/lib/scaffold/backends/supabase/edge-functions/revenuecat-webhook/index.ts +2 -0
  36. package/lib/scaffold/backends/supabase/edge-functions/stripe-create-checkout-session/index.ts +123 -0
  37. package/lib/scaffold/backends/supabase/edge-functions/stripe-create-portal-session/index.ts +97 -0
  38. package/lib/scaffold/backends/supabase/edge-functions/stripe-list-prices/index.ts +83 -0
  39. package/lib/scaffold/backends/supabase/edge-functions/stripe-webhook/index.ts +138 -0
  40. package/lib/scaffold/backends/supabase/generator.js +17 -17
  41. package/lib/scaffold/backends/supabase/migrations/20240101000009_ai_messages.sql +50 -0
  42. package/lib/scaffold/backends/supabase/migrations/20240101000012_stripe_customers.sql +36 -0
  43. package/lib/scaffold/backends/supabase/migrations/20240101000013_admin_role.sql +62 -0
  44. package/lib/scaffold/backends/supabase/patch/lib/core/data/entities/user_entity.dart +4 -0
  45. package/lib/scaffold/backends/supabase/patch/lib/{environnements.dart → environments.dart} +3 -13
  46. package/lib/scaffold/backends/supabase/patch/lib/features/ai_chat/api/ai_chat_api.dart +95 -0
  47. package/lib/scaffold/backends/supabase/patch/lib/features/ai_chat/api/ai_chat_conversation_entity.dart +52 -0
  48. package/lib/scaffold/backends/supabase/patch/lib/features/{llm_chat/api/llm_chat_message_entity.dart → ai_chat/api/ai_chat_message_entity.dart} +6 -6
  49. package/lib/scaffold/backends/supabase/patch/lib/features/{llm_chat/providers/llm_chat_notifier.dart → ai_chat/providers/ai_chat_notifier.dart} +63 -35
  50. package/lib/scaffold/backends/supabase/patch/lib/features/authentication/api/authentication_api.dart +1 -1
  51. package/lib/scaffold/backends/supabase/patch/lib/features/feedbacks/api/feature_request_api.dart +46 -0
  52. package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/models/user_info.dart +16 -16
  53. package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/ui/components/onboarding_att_setup.dart +4 -3
  54. package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +38 -28
  55. package/lib/scaffold/backends/supabase/patch/lib/features/settings/ui/components/admin/admin_users_api.dart +93 -0
  56. package/lib/scaffold/backends/supabase/patch/lib/features/{subscription → subscriptions}/api/entities/subscription_entity.dart +13 -0
  57. package/lib/scaffold/backends/supabase/patch/lib/features/subscriptions/api/stripe_backend_api.dart +52 -0
  58. package/lib/scaffold/backends/supabase/patch/lib/features/{subscription → subscriptions}/api/subscription_api.dart +1 -1
  59. package/lib/scaffold/backends/supabase/pubspec.yaml.tpl +4 -5
  60. package/lib/scaffold/backends/supabase/tokens.js +3 -3
  61. package/lib/scaffold/catalog.js +9 -11
  62. package/lib/scaffold/generate.js +45 -31
  63. package/lib/scaffold/shared/generator-utils.js +188 -81
  64. package/lib/scaffold/shared/sort-imports.js +191 -0
  65. package/lib/scaffold/shared/template-strings.js +3 -3
  66. package/lib/utils/checks.js +22 -6
  67. package/lib/utils/env-tools.js +7 -0
  68. package/lib/utils/flutter-install.js +114 -0
  69. package/lib/utils/i18n/messages-en.js +52 -35
  70. package/lib/utils/i18n/messages-es.js +52 -35
  71. package/lib/utils/i18n/messages-pt.js +54 -37
  72. package/lib/utils/updates.js +15 -15
  73. package/package.json +1 -1
  74. package/templates/firebase/.env.example +2 -2
  75. package/templates/firebase/android/app/src/main/res/drawable/background.png +0 -0
  76. package/templates/firebase/android/app/src/main/res/drawable-night/background.png +0 -0
  77. package/templates/firebase/android/app/src/main/res/drawable-night-v21/background.png +0 -0
  78. package/templates/firebase/android/app/src/main/res/drawable-v21/background.png +0 -0
  79. package/templates/firebase/android/app/src/main/res/values-night-v31/styles.xml +1 -1
  80. package/templates/firebase/android/app/src/main/res/values-v31/styles.xml +1 -1
  81. package/templates/firebase/assets/images/logo_wordmark_dark.png +0 -0
  82. package/templates/firebase/assets/images/logo_wordmark_light.png +0 -0
  83. package/templates/firebase/docs/revenuecat-setup.es.md +1 -1
  84. package/templates/firebase/docs/revenuecat-setup.pt.md +1 -1
  85. package/templates/firebase/firestore.rules +24 -5
  86. package/templates/firebase/functions/package-lock.json +22 -1
  87. package/templates/firebase/functions/package.json +2 -1
  88. package/templates/firebase/functions/src/admin/functions.ts +113 -0
  89. package/templates/firebase/functions/src/{llm_chat → ai_chat}/index.ts +16 -16
  90. package/templates/firebase/functions/src/index.ts +8 -2
  91. package/templates/firebase/functions/src/notifications/device_triggers.ts +2 -2
  92. package/templates/firebase/functions/src/notifications/triggers.ts +3 -3
  93. package/templates/firebase/functions/src/subscriptions/models/subscription_status.ts +2 -0
  94. package/templates/firebase/functions/src/subscriptions/stripe_functions.ts +222 -0
  95. package/templates/firebase/functions/src/subscriptions/subscriptions_functions.ts +2 -2
  96. package/templates/firebase/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png +0 -0
  97. package/templates/firebase/ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png +0 -0
  98. package/templates/firebase/lib/components/components.dart +4 -1
  99. package/templates/firebase/lib/components/kasy_app_bar.dart +22 -7
  100. package/templates/firebase/lib/components/kasy_avatar.dart +7 -6
  101. package/templates/firebase/lib/components/kasy_button.dart +23 -99
  102. package/templates/firebase/lib/components/kasy_dialog.dart +11 -11
  103. package/templates/firebase/lib/components/kasy_image_viewer.dart +84 -0
  104. package/templates/firebase/lib/components/{kasy_sidebar_pro.dart → kasy_sidebar.dart} +702 -425
  105. package/templates/firebase/lib/components/kasy_status_tag.dart +91 -0
  106. package/templates/firebase/lib/components/kasy_text_area.dart +1 -3
  107. package/templates/firebase/lib/components/kasy_text_field.dart +5 -6
  108. package/templates/firebase/lib/components/kasy_text_field_otp.dart +1 -3
  109. package/templates/firebase/lib/components/kasy_toast.dart +2 -2
  110. package/templates/firebase/lib/components/kasy_web_header.dart +209 -0
  111. package/templates/firebase/lib/core/ads/ads_provider.dart +1 -1
  112. package/templates/firebase/lib/core/bottom_menu/bottom_menu.dart +136 -23
  113. package/templates/firebase/lib/core/bottom_menu/bottom_router.dart +19 -91
  114. package/templates/firebase/lib/core/bottom_menu/kasy_bottom_bar_factory.dart +196 -96
  115. package/templates/firebase/lib/core/bottom_menu/web_content_wrapper.dart +54 -0
  116. package/templates/firebase/lib/core/config/app_env.dart +5 -11
  117. package/templates/firebase/lib/core/config/features.dart +5 -4
  118. package/templates/firebase/lib/core/data/api/analytics_api.dart +1 -1
  119. package/templates/firebase/lib/core/data/api/http_client.dart +1 -1
  120. package/templates/firebase/lib/core/data/entities/user_entity.dart +3 -0
  121. package/templates/firebase/lib/core/data/models/entitlement.dart +35 -0
  122. package/templates/firebase/lib/core/data/models/subscription.dart +13 -186
  123. package/templates/firebase/lib/core/data/models/user.dart +11 -0
  124. package/templates/firebase/lib/core/data/repositories/user_repository.dart +1 -1
  125. package/templates/firebase/lib/core/home_widgets/home_widget_background_task.dart +1 -1
  126. package/templates/firebase/lib/core/home_widgets/home_widget_mywidget_service.dart +1 -1
  127. package/templates/firebase/lib/core/icons/kasy_icons.dart +31 -1
  128. package/templates/firebase/lib/core/rating/api/rating_api.dart +2 -2
  129. package/templates/firebase/lib/core/states/logout_action.dart +25 -0
  130. package/templates/firebase/lib/core/states/user_state_notifier.dart +3 -3
  131. package/templates/firebase/lib/core/theme/colors.dart +488 -188
  132. package/templates/firebase/lib/core/theme/radius.dart +22 -11
  133. package/templates/firebase/lib/core/theme/shadows.dart +66 -0
  134. package/templates/firebase/lib/core/theme/texts.dart +75 -41
  135. package/templates/firebase/lib/core/theme/universal_theme.dart +9 -4
  136. package/templates/firebase/lib/core/web_device_preview/web_device_preview.dart +5 -4
  137. package/templates/firebase/lib/core/web_viewport_scale.dart +52 -0
  138. package/templates/firebase/lib/core/widgets/kasy_brand_badge.dart +118 -0
  139. package/templates/firebase/lib/core/widgets/kasy_brand_logo.dart +40 -0
  140. package/templates/firebase/lib/core/widgets/kasy_focus_ring.dart +125 -0
  141. package/templates/firebase/lib/core/widgets/kasy_hover.dart +53 -14
  142. package/templates/firebase/lib/core/widgets/kasy_pressable_depth.dart +18 -13
  143. package/templates/firebase/lib/{environnements.dart → environments.dart} +3 -14
  144. package/templates/firebase/lib/features/ai_chat/ai_chat_page.dart +159 -0
  145. package/templates/firebase/lib/features/ai_chat/api/ai_chat_api.dart +107 -0
  146. package/templates/firebase/lib/features/ai_chat/api/ai_chat_conversation_entity.dart +64 -0
  147. package/templates/firebase/lib/features/{llm_chat/api/llm_chat_message_entity.dart → ai_chat/api/ai_chat_message_entity.dart} +6 -6
  148. package/templates/firebase/lib/features/{llm_chat/providers/llm_chat_notifier.dart → ai_chat/providers/ai_chat_notifier.dart} +73 -38
  149. package/templates/firebase/lib/features/ai_chat/providers/ai_conversations_notifier.dart +103 -0
  150. package/templates/firebase/lib/features/{llm_chat/ui/widgets/llm_chat_avatars.dart → ai_chat/ui/widgets/ai_chat_avatars.dart} +13 -13
  151. package/templates/firebase/lib/features/{llm_chat/ui/widgets/llm_chat_composer.dart → ai_chat/ui/widgets/ai_chat_composer.dart} +10 -10
  152. package/templates/firebase/lib/features/{llm_chat/llm_chat_page.dart → ai_chat/ui/widgets/ai_chat_conversation_view.dart} +80 -67
  153. package/templates/firebase/lib/features/ai_chat/ui/widgets/ai_conversation_list.dart +285 -0
  154. package/templates/firebase/lib/features/ai_chat/ui/widgets/ai_conversation_tile.dart +163 -0
  155. package/templates/firebase/lib/features/authentication/api/authentication_api.dart +52 -13
  156. package/templates/firebase/lib/features/authentication/api/popup_dismiss_watcher.dart +12 -0
  157. package/templates/firebase/lib/features/authentication/api/popup_dismiss_watcher_web.dart +35 -0
  158. package/templates/firebase/lib/features/authentication/ui/recover_password_page.dart +108 -68
  159. package/templates/firebase/lib/features/authentication/ui/signin_page.dart +38 -51
  160. package/templates/firebase/lib/features/authentication/ui/signup_page.dart +38 -51
  161. package/templates/firebase/lib/features/authentication/ui/widgets/auth_card_scaffold.dart +128 -0
  162. package/templates/firebase/lib/features/authentication/ui/widgets/recover_password_result.dart +61 -44
  163. package/templates/firebase/lib/features/feedbacks/api/feature_request_api.dart +32 -0
  164. package/templates/firebase/lib/features/feedbacks/models/feedback_state.dart +5 -5
  165. package/templates/firebase/lib/features/feedbacks/providers/feedback_page_notifier.dart +2 -2
  166. package/templates/firebase/lib/features/home/design_system_page.dart +808 -170
  167. package/templates/firebase/lib/features/home/home_components_page.dart +6 -3
  168. package/templates/firebase/lib/features/home/home_components_preview_page.dart +6 -6
  169. package/templates/firebase/lib/features/home/home_components_preview_registry.dart +325 -186
  170. package/templates/firebase/lib/features/home/home_feed.dart +289 -0
  171. package/templates/firebase/lib/features/home/home_image_grid.dart +355 -0
  172. package/templates/firebase/lib/features/home/home_page.dart +11 -250
  173. package/templates/firebase/lib/features/{local_reminder → local_reminders}/providers/reminder_notifier.dart +1 -1
  174. package/templates/firebase/lib/features/{local_reminder → local_reminders}/ui/reminder_page.dart +2 -2
  175. package/templates/firebase/lib/features/notifications/shared/att_permission.dart +1 -1
  176. package/templates/firebase/lib/features/notifications/ui/request_notification_permission.dart +25 -61
  177. package/templates/firebase/lib/features/notifications/ui/widgets/permission_request_view.dart +117 -0
  178. package/templates/firebase/lib/features/onboarding/models/user_info.dart +16 -16
  179. package/templates/firebase/lib/features/onboarding/ui/components/onboarding_att_setup.dart +4 -3
  180. package/templates/firebase/lib/features/onboarding/ui/components/onboarding_features.dart +7 -9
  181. package/templates/firebase/lib/features/onboarding/ui/components/onboarding_loader.dart +71 -48
  182. package/templates/firebase/lib/features/onboarding/ui/components/onboarding_notifications_setup.dart +3 -2
  183. package/templates/firebase/lib/features/onboarding/ui/components/onboarding_questions.dart +5 -5
  184. package/templates/firebase/lib/features/onboarding/ui/onboarding_page.dart +4 -4
  185. package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_background.dart +4 -2
  186. package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_feature.dart +39 -121
  187. package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_illustration_scaffold.dart +105 -70
  188. package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_module_mockups.dart +639 -0
  189. package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_progress.dart +62 -50
  190. package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +38 -28
  191. package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_step_header.dart +75 -0
  192. package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_sticky_footer.dart +16 -5
  193. package/templates/firebase/lib/features/onboarding/ui/widgets/selectable_row_tile.dart +26 -22
  194. package/templates/firebase/lib/features/settings/settings_page.dart +601 -90
  195. package/templates/firebase/lib/features/settings/ui/components/admin/admin_page.dart +1193 -0
  196. package/templates/firebase/lib/features/settings/ui/components/admin/admin_paywalls.dart +1 -1
  197. package/templates/firebase/lib/features/settings/ui/components/admin/admin_routes.dart +2 -3
  198. package/templates/firebase/lib/features/settings/ui/components/admin/admin_users_api.dart +86 -0
  199. package/templates/firebase/lib/features/settings/ui/components/admin/admin_users_tab.dart +1215 -0
  200. package/templates/firebase/lib/features/settings/ui/components/admin/send_push_notification_page.dart +236 -0
  201. package/templates/firebase/lib/features/settings/ui/components/avatar_component.dart +3 -3
  202. package/templates/firebase/lib/features/settings/ui/widgets/kasy_user_avatar.dart +77 -0
  203. package/templates/firebase/lib/features/settings/ui/widgets/settings_tile.dart +1 -0
  204. package/templates/firebase/lib/features/{subscription → subscriptions}/api/entities/subscription_entity.dart +17 -0
  205. package/templates/firebase/lib/features/{subscription → subscriptions}/api/inapp_subscription_api.dart +67 -46
  206. package/templates/firebase/lib/features/subscriptions/api/revenuecat_product.dart +189 -0
  207. package/templates/firebase/lib/features/subscriptions/api/stripe_backend_api.dart +55 -0
  208. package/templates/firebase/lib/features/subscriptions/api/stripe_payment_api.dart +82 -0
  209. package/templates/firebase/lib/features/subscriptions/api/stripe_product.dart +178 -0
  210. package/templates/firebase/lib/features/{subscription → subscriptions}/api/subscription_api.dart +1 -1
  211. package/templates/firebase/lib/features/subscriptions/api/subscription_payment_api.dart +53 -0
  212. package/templates/firebase/lib/features/subscriptions/api/subscription_payment_api_provider.dart +21 -0
  213. package/templates/firebase/lib/features/{subscription → subscriptions}/providers/premium_page_provider.dart +9 -6
  214. package/templates/firebase/lib/features/{subscription → subscriptions}/repositories/subscription_repository.dart +26 -30
  215. package/{lib/scaffold/backends/supabase/patch/lib/features/subscription → templates/firebase/lib/features/subscriptions}/shared/maybeshow_premium.dart +0 -2
  216. package/templates/firebase/lib/features/subscriptions/shared/subscription_management.dart +45 -0
  217. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/active_premium_content.dart +28 -4
  218. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/paywall_minimal.dart +7 -7
  219. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/paywall_row.dart +8 -8
  220. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/paywall_with_switch.dart +7 -7
  221. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/premium_content.dart +7 -7
  222. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/premium_page_factory.dart +5 -5
  223. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/premium_page.dart +5 -5
  224. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/comparison_table.dart +1 -1
  225. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/paywall_empty_state.dart +4 -4
  226. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_bottom_menu.dart +3 -4
  227. package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/selectable_col.dart +1 -1
  228. package/templates/firebase/lib/i18n/en.i18n.json +171 -46
  229. package/templates/firebase/lib/i18n/es.i18n.json +175 -50
  230. package/templates/firebase/lib/i18n/pt.i18n.json +166 -41
  231. package/templates/firebase/lib/main.dart +6 -3
  232. package/templates/firebase/lib/router.dart +15 -23
  233. package/templates/firebase/pubspec.yaml +5 -6
  234. package/templates/firebase/test/core/data/repositories/user_repository_test.dart +3 -3
  235. package/templates/firebase/test/core/states/user_state_notifier_test.dart +4 -4
  236. package/templates/firebase/test/core/widgets/focus_ring_shape_test.dart +55 -0
  237. package/templates/firebase/test/features/{subscription → subscriptions}/api/fake_inapp_subscription_api.dart +11 -4
  238. package/templates/firebase/test/features/{subscription → subscriptions}/api/fake_revenuecat_product.dart +1 -0
  239. package/templates/firebase/test/features/{subscription → subscriptions}/api/fake_subscription_api.dart +2 -2
  240. package/templates/firebase/test/features/{subscription → subscriptions}/subscription_page_test.dart +4 -4
  241. package/templates/firebase/test/test_utils.dart +6 -6
  242. package/templates/firebase/web/index.html +5 -2
  243. package/lib/scaffold/backends/api/patch/lib/features/llm_chat/api/llm_chat_api.dart +0 -58
  244. package/lib/scaffold/backends/api/patch/lib/features/subscription/shared/maybeshow_premium.dart +0 -86
  245. package/lib/scaffold/backends/supabase/migrations/20240101000009_llm_messages.sql +0 -22
  246. package/lib/scaffold/backends/supabase/patch/lib/features/llm_chat/api/llm_chat_api.dart +0 -47
  247. package/templates/firebase/assets/images/onboarding/authentication-login-template.jpg +0 -0
  248. package/templates/firebase/assets/images/onboarding/img2.jpg +0 -0
  249. package/templates/firebase/assets/images/onboarding/img3.jpg +0 -0
  250. package/templates/firebase/assets/images/onboarding/notifications.png +0 -0
  251. package/templates/firebase/assets/images/onboarding/purchase.png +0 -0
  252. package/templates/firebase/lib/core/sidebar/kasy_sidebar.dart +0 -2021
  253. package/templates/firebase/lib/features/authentication/ui/widgets/auth_brand.dart +0 -35
  254. package/templates/firebase/lib/features/home/home_features_page.dart +0 -207
  255. package/templates/firebase/lib/features/llm_chat/api/llm_chat_api.dart +0 -50
  256. package/templates/firebase/lib/features/settings/ui/components/admin/admin_bottom_sheet.dart +0 -316
  257. package/templates/firebase/lib/features/subscription/shared/maybeshow_premium.dart +0 -85
  258. /package/templates/firebase/lib/features/{local_reminder → local_reminders}/repositories/reminder_preferences.dart +0 -0
  259. /package/templates/firebase/lib/features/{subscription → subscriptions}/providers/models/premium_state.dart +0 -0
  260. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/feature_line.dart +0 -0
  261. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_background.dart +0 -0
  262. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_background_gradient.dart +0 -0
  263. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_banner.dart +0 -0
  264. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_card.dart +0 -0
  265. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_close_button.dart +0 -0
  266. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_feature.dart +0 -0
  267. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/selectable_row.dart +0 -0
  268. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/trial_switcher.dart +0 -0
  269. /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/unsubscribe_feedback_popup.dart +0 -0
@@ -1,224 +1,475 @@
1
1
  import 'package:flutter/material.dart';
2
2
 
3
- /// Kasy Design System — Color Tokens
3
+ /// Kasy Design System — Color Tokens (HeroUI semantic model)
4
4
  ///
5
- /// Single source of truth for all colors in the app.
6
- /// To change a color across the entire app, change it here.
5
+ /// Single source of truth for all colors in the app. Mirrors the HeroUI
6
+ /// color system: a small, meaningful set of semantic roles (accent, default,
7
+ /// success, warning, danger, foreground, background, surface, form field,
8
+ /// separator) rather than a large raw palette. Each role exposes its base
9
+ /// value plus `hover`, `soft`, `soft-hover` and `soft-foreground` variants
10
+ /// where applicable, and resolves to a Light and a Dark theme.
7
11
  ///
8
12
  /// Usage via context extension:
9
- /// context.colors.primary
10
- /// context.colors.surfacePrimarySoft / .surfaceNeutralSoft / .surfaceErrorSoft
11
- /// context.colors.outlineButton
12
- /// context.colors.success / .muted
13
+ /// context.colors.accent → brand / accent color
14
+ /// context.colors.accentSoft → translucent accent fill
15
+ /// context.colors.success / .warning / .danger
16
+ /// context.colors.foreground / .foregroundMuted
17
+ /// context.colors.surface / .surfaceSecondary
18
+ ///
19
+ /// Legacy names (primary, onSurface, error, outline, …) remain available as
20
+ /// aliases so existing components keep working.
13
21
  class KasyColors extends ThemeExtension<KasyColors> {
14
- /// Vermelho de erro/danger mesmo tom claro/escuro; vivo e saturado (#FF3B30, estilo sistema).
15
- static const Color semanticError = Color(0xFFFF3B30);
22
+ /// Danger/error base (HeroUI danger, light). Kept for the few call sites that
23
+ /// need a const color outside of a theme context.
24
+ static const Color semanticError = Color(0xFFFF383C);
16
25
 
17
- // --- Brand ---
18
- final Color primary;
19
- final Color onPrimary;
26
+ /// Best on-color (text/icon) to sit on top of a filled [fill]: near-white on
27
+ /// dark or saturated fills, near-black on light ones. Lets a fill change to
28
+ /// any hue while the text on top stays legible — no manual tuning needed.
29
+ ///
30
+ /// Prefers white down to a 3:1 contrast ratio (covers branded mid-tones like
31
+ /// blue, teal, violet, red), then flips to dark — which reproduces HeroUI's
32
+ /// own foreground choices for accent/success/warning/danger.
33
+ static Color onColor(Color fill) {
34
+ final double contrastWithWhite = 1.05 / (fill.computeLuminance() + 0.05);
35
+ return contrastWithWhite >= 3.0
36
+ ? const Color(0xFFFCFCFC)
37
+ : const Color(0xFF18181B);
38
+ }
20
39
 
21
- // --- Backgrounds ---
22
- final Color background;
23
- final Color onBackground;
40
+ // --- Accent (brand / primary identity) ---
41
+ // Only [accent] is stored; foreground, hover and soft variants all derive
42
+ // from it (see getters below), so changing the brand color is a one-value edit.
43
+ final Color accent;
24
44
 
25
- // --- Surfaces ---
26
- final Color surface;
27
- final Color onSurface;
45
+ // --- Default (neutral backbone) ---
46
+ final Color neutral;
47
+ final Color neutralHover;
48
+ final Color neutralForeground;
28
49
 
29
- /// Filled tint behind primary-accent controls (pill “secondary”: pale blue /
30
- /// light; charcoal tint / dark). Foreground stays [primary].
31
- final Color surfacePrimarySoft;
50
+ // --- Success ---
51
+ final Color success;
52
+ final Color successForeground;
53
+ final Color successHover;
54
+ final Color successSoft;
55
+ final Color successSoftHover;
56
+ final Color successSoftForeground;
32
57
 
33
- /// Filled neutral tint (“tertiary” row: light grey / light; charcoal / dark).
34
- /// Foreground: [onSurface].
35
- final Color surfaceNeutralSoft;
58
+ // --- Warning ---
59
+ final Color warning;
60
+ final Color warningForeground;
61
+ final Color warningHover;
62
+ final Color warningSoft;
63
+ final Color warningSoftHover;
64
+ final Color warningSoftForeground;
36
65
 
37
- /// Destructive soft fill (“danger soft”: pale rose / light; saturated burgundy
38
- /// / dark). Foreground stays [error].
39
- final Color surfaceErrorSoft;
66
+ // --- Danger ---
67
+ final Color danger;
68
+ final Color dangerForeground;
69
+ final Color dangerHover;
70
+ final Color dangerSoft;
71
+ final Color dangerSoftHover;
72
+ final Color dangerSoftForeground;
40
73
 
41
- /// Neutral fill for avatar icon/initials fallback and stacked “+N” (theme-aware).
42
- final Color avatarFallbackFill;
74
+ // --- Foreground (text / icons) ---
75
+ final Color foreground;
76
+ final Color foregroundMuted;
77
+ final Color foregroundSegment;
78
+ final Color foregroundOverlay;
79
+ final Color foregroundLink;
80
+ final Color foregroundInverse;
43
81
 
44
- // --- Semantic: Error ---
45
- final Color error;
46
- final Color onError;
82
+ // --- Background (base canvas) ---
83
+ final Color background;
84
+ final Color backgroundSecondary;
85
+ final Color backgroundTertiary;
86
+ final Color backgroundInverse;
47
87
 
48
- // --- Semantic: Success ---
49
- final Color success;
50
- final Color onSuccess;
88
+ // --- Surface (containers: cards, panels, modals) ---
89
+ final Color surface;
90
+ final Color surfaceSecondary;
91
+ final Color surfaceTertiary;
92
+ final Color surfaceTransparent;
51
93
 
52
- // --- Semantic: Warning ---
53
- final Color warning;
54
- final Color onWarning;
94
+ // --- Form field ---
95
+ final Color fieldBackground;
96
+ final Color fieldBackgroundHover;
97
+ final Color fieldBackgroundFocus;
98
+ final Color fieldPlaceholder;
99
+ final Color fieldForeground;
100
+ final Color fieldBorder;
101
+ final Color fieldBorderHover;
55
102
 
56
- // --- Structural ---
57
- /// Default divider / input borders.
58
- final Color outline;
59
- /// Pills/chips/outline buttons on canvas (readable in dark mode).
60
- final Color outlineButton;
61
- /// Secondary text / disabled state.
62
- final Color muted;
103
+ // --- Separator (dividers, outlines) ---
104
+ final Color separator;
105
+ final Color separatorSecondary;
106
+ final Color separatorTertiary;
63
107
 
64
- /// Form field labels ([KasyTextField], [KasyTextArea]): slightly darker than
65
- /// [muted] in light mode, slightly lighter in dark mode.
66
- Color get fieldLabel {
67
- final bool isDark = background.computeLuminance() < 0.5;
68
- return Color.lerp(muted, onSurface, isDark ? 0.36 : 0.28)!;
69
- }
70
-
71
- // --- Greys (legacy — prefer muted/outline for new code) ---
72
- final Color grey1;
73
- final Color grey2;
74
- final Color grey3;
108
+ // --- Other (border, overlay, segment, backdrop) ---
109
+ final Color border;
110
+ final Color overlay;
111
+ final Color segment;
112
+ final Color backdrop;
75
113
 
76
- // --- Premium (paywall visual identity) ---
77
- final Color premiumOverlayMid; // paywall background gradient — mid tone
78
- final Color premiumOverlayDark; // paywall background gradient — dark tone
79
- final Color premiumBannerText; // text color for the premium banner (PremiumWideBanner)
114
+ // --- Premium (paywall visual identity — app-specific, not a HeroUI role) ---
115
+ final Color premiumOverlayMid;
116
+ final Color premiumOverlayDark;
117
+ final Color premiumBannerText;
80
118
 
81
119
  const KasyColors({
82
- required this.primary,
83
- required this.onPrimary,
84
- required this.background,
85
- required this.onBackground,
86
- required this.surface,
87
- required this.onSurface,
88
- required this.surfacePrimarySoft,
89
- required this.surfaceNeutralSoft,
90
- required this.surfaceErrorSoft,
91
- required this.avatarFallbackFill,
92
- required this.error,
93
- required this.onError,
120
+ required this.accent,
121
+ required this.neutral,
122
+ required this.neutralHover,
123
+ required this.neutralForeground,
94
124
  required this.success,
95
- required this.onSuccess,
125
+ required this.successForeground,
126
+ required this.successHover,
127
+ required this.successSoft,
128
+ required this.successSoftHover,
129
+ required this.successSoftForeground,
96
130
  required this.warning,
97
- required this.onWarning,
98
- required this.outline,
99
- required this.outlineButton,
100
- required this.muted,
101
- required this.grey1,
102
- required this.grey2,
103
- required this.grey3,
131
+ required this.warningForeground,
132
+ required this.warningHover,
133
+ required this.warningSoft,
134
+ required this.warningSoftHover,
135
+ required this.warningSoftForeground,
136
+ required this.danger,
137
+ required this.dangerForeground,
138
+ required this.dangerHover,
139
+ required this.dangerSoft,
140
+ required this.dangerSoftHover,
141
+ required this.dangerSoftForeground,
142
+ required this.foreground,
143
+ required this.foregroundMuted,
144
+ required this.foregroundSegment,
145
+ required this.foregroundOverlay,
146
+ required this.foregroundLink,
147
+ required this.foregroundInverse,
148
+ required this.background,
149
+ required this.backgroundSecondary,
150
+ required this.backgroundTertiary,
151
+ required this.backgroundInverse,
152
+ required this.surface,
153
+ required this.surfaceSecondary,
154
+ required this.surfaceTertiary,
155
+ required this.surfaceTransparent,
156
+ required this.fieldBackground,
157
+ required this.fieldBackgroundHover,
158
+ required this.fieldBackgroundFocus,
159
+ required this.fieldPlaceholder,
160
+ required this.fieldForeground,
161
+ required this.fieldBorder,
162
+ required this.fieldBorderHover,
163
+ required this.separator,
164
+ required this.separatorSecondary,
165
+ required this.separatorTertiary,
166
+ required this.border,
167
+ required this.overlay,
168
+ required this.segment,
169
+ required this.backdrop,
104
170
  required this.premiumOverlayMid,
105
171
  required this.premiumOverlayDark,
106
172
  required this.premiumBannerText,
107
173
  });
108
174
 
109
175
  factory KasyColors.light() => const KasyColors(
110
- primary: Color(0xFF1E88E5),
111
- onPrimary: Color(0xFFFFFFFF),
176
+ // Accent — HeroUI blue.
177
+ accent: Color(0xFF0485F7),
178
+ // Default (neutrals).
179
+ neutral: Color(0xFFEBEBEC),
180
+ neutralHover: Color(0xFFE1E1E2),
181
+ neutralForeground: Color(0xFF18181B),
182
+ // Success.
183
+ success: Color(0xFF17C964),
184
+ successForeground: Color(0xFF18181B),
185
+ successHover: Color(0xFF21B55D),
186
+ successSoft: Color(0x2617C964),
187
+ successSoftHover: Color(0x3317C964),
188
+ successSoftForeground: Color(0xFF17C964),
189
+ // Warning.
190
+ warning: Color(0xFFF5A524),
191
+ warningForeground: Color(0xFF18181B),
192
+ warningHover: Color(0xFFDC952A),
193
+ warningSoft: Color(0x26F5A524),
194
+ warningSoftHover: Color(0x33DC952A),
195
+ warningSoftForeground: Color(0xFFF5A524),
196
+ // Danger.
197
+ danger: Color(0xFFFF383C),
198
+ dangerForeground: Color(0xFFFCFCFC),
199
+ dangerHover: Color(0xFFFF5551),
200
+ dangerSoft: Color(0x26FF383C),
201
+ dangerSoftHover: Color(0x33FF5551),
202
+ dangerSoftForeground: Color(0xFFFF383C),
203
+ // Foreground.
204
+ foreground: Color(0xFF18181B),
205
+ foregroundMuted: Color(0xFF71717A),
206
+ foregroundSegment: Color(0xFF18181B),
207
+ foregroundOverlay: Color(0xFF18181B),
208
+ foregroundLink: Color(0xFF18181B),
209
+ foregroundInverse: Color(0xFFFCFCFC),
210
+ // Background.
112
211
  // Also used by the native splash. When changing, update
113
212
  // `flutter_native_splash.color` in pubspec.yaml and run
114
213
  // `dart run flutter_native_splash:create`.
115
- background: Color(0xFFF7F7F7),
116
- onBackground: Color(0xFF000000),
214
+ background: Color(0xFFF5F5F5),
215
+ backgroundSecondary: Color(0xFFEBEBEB),
216
+ backgroundTertiary: Color(0xFFE1E1E1),
217
+ backgroundInverse: Color(0xFF18181B),
218
+ // Surface.
117
219
  surface: Color(0xFFFFFFFF),
118
- onSurface: Color(0xFF000000),
119
- surfacePrimarySoft: Color(0xFFDFE6F0),
120
- surfaceNeutralSoft: Color(0xFFEFEFEF),
121
- surfaceErrorSoft: Color(0xFFFFEBEE),
122
- avatarFallbackFill: Color(0xFFF2F2F2),
123
- error: KasyColors.semanticError,
124
- onError: Color(0xFFFFFFFF),
125
- success: Color(0xFF34C759),
126
- onSuccess: Color(0xFFFFFFFF),
127
- warning: Color(0xFFF57F17),
128
- onWarning: Color(0xFFFFFFFF),
129
- outline: Color(0xFFC6C6C8),
130
- outlineButton: Color(0xFFB8BFC9),
131
- muted: Color(0xFF7D8488),
132
- grey1: Color(0xFFBEC1C3),
133
- grey2: Color(0xFF7D8488),
134
- grey3: Color(0xFF263238),
220
+ surfaceSecondary: Color(0xFFEFEFF0),
221
+ surfaceTertiary: Color(0xFFEAEAEB),
222
+ surfaceTransparent: Color(0x00FFFFFF),
223
+ // Form field.
224
+ fieldBackground: Color(0xFFFFFFFF),
225
+ fieldBackgroundHover: Color(0xEBF9F9F9),
226
+ fieldBackgroundFocus: Color(0xFFFFFFFF),
227
+ fieldPlaceholder: Color(0xFF71717A),
228
+ fieldForeground: Color(0xFF18181B),
229
+ fieldBorder: Color(0x00DEDEE0),
230
+ fieldBorderHover: Color(0x00C1C1C1),
231
+ // Separator.
232
+ separator: Color(0xFFE4E4E7),
233
+ separatorSecondary: Color(0xFFD7D7D7),
234
+ separatorTertiary: Color(0xFFCDCDCE),
235
+ // Other.
236
+ border: Color(0xFFDEDEE0),
237
+ overlay: Color(0xFFFFFFFF),
238
+ segment: Color(0xFFFFFFFF),
239
+ backdrop: Color(0x80000000),
240
+ // Premium (paywall).
135
241
  premiumOverlayMid: Color(0xFF9997A1),
136
242
  premiumOverlayDark: Color(0xFF130F26),
137
243
  premiumBannerText: Color(0xFF49250A),
138
244
  );
139
245
 
140
246
  factory KasyColors.dark() => const KasyColors(
141
- primary: Color(0xFF1E88E5),
142
- onPrimary: Color(0xFFFFFFFF),
247
+ // Accent — HeroUI blue (same hue, pops on the dark canvas).
248
+ accent: Color(0xFF0485F7),
249
+ // Default (neutrals).
250
+ neutral: Color(0xFF27272A),
251
+ neutralHover: Color(0xFF2E2E31),
252
+ neutralForeground: Color(0xFFFCFCFC),
253
+ // Success.
254
+ success: Color(0xFF17C964),
255
+ successForeground: Color(0xFF18181B),
256
+ successHover: Color(0xFF21B55D),
257
+ successSoft: Color(0x2617C964),
258
+ successSoftHover: Color(0x3317C964),
259
+ successSoftForeground: Color(0xFF17C964),
260
+ // Warning (brightened for dark).
261
+ warning: Color(0xFFF7B750),
262
+ warningForeground: Color(0xFF18181B),
263
+ warningHover: Color(0xFFDEA54C),
264
+ warningSoft: Color(0x26F7B750),
265
+ warningSoftHover: Color(0x33DEA54C),
266
+ warningSoftForeground: Color(0xFFF7B750),
267
+ // Danger (desaturated for dark).
268
+ danger: Color(0xFFDB3B3E),
269
+ dangerForeground: Color(0xFFFCFCFC),
270
+ dangerHover: Color(0xFFE15451),
271
+ dangerSoft: Color(0x26DB3B3E),
272
+ dangerSoftHover: Color(0x33E15451),
273
+ dangerSoftForeground: Color(0xFFDB3B3E),
274
+ // Foreground.
275
+ foreground: Color(0xFFFCFCFC),
276
+ foregroundMuted: Color(0xFFA1A1AA),
277
+ foregroundSegment: Color(0xFFFCFCFC),
278
+ foregroundOverlay: Color(0xFFFCFCFC),
279
+ foregroundLink: Color(0xFFFCFCFC),
280
+ foregroundInverse: Color(0xFF18181B),
281
+ // Background.
143
282
  // Also used by the native splash. When changing, update
144
283
  // `flutter_native_splash.color_dark` in pubspec.yaml and run
145
284
  // `dart run flutter_native_splash:create`.
146
- background: Color(0xFF060608),
147
- onBackground: Color(0xFFFAFAFA),
285
+ background: Color(0xFF060607),
286
+ backgroundSecondary: Color(0xFF0C0C0E),
287
+ backgroundTertiary: Color(0xFF131316),
288
+ backgroundInverse: Color(0xFFFCFCFC),
289
+ // Surface.
148
290
  surface: Color(0xFF18181B),
149
- onSurface: Color(0xFFFFFFFF),
150
- surfacePrimarySoft: Color(0xFF2C323A),
151
- surfaceNeutralSoft: Color(0xFF232325),
152
- surfaceErrorSoft: Color(0xFF3F2A2D),
153
- avatarFallbackFill: Color(0xFF2C2C2E),
154
- error: KasyColors.semanticError,
155
- onError: Color(0xFFFFFFFF),
156
- success: Color(0xFF30D158),
157
- onSuccess: Color(0xFFFFFFFF),
158
- warning: Color(0xFFFFCA28),
159
- onWarning: Color(0xFF000000),
160
- outline: Color(0xFF38383A),
161
- outlineButton: Color(0x4DFFFFFF),
162
- muted: Color(0xFF7D8488),
163
- grey1: Color(0xFF263238),
164
- grey2: Color(0xFF7D8488),
165
- grey3: Color(0xFFBEC1C3),
291
+ surfaceSecondary: Color(0xFF232325),
292
+ surfaceTertiary: Color(0xFF262728),
293
+ surfaceTransparent: Color(0x00000000),
294
+ // Form field.
295
+ fieldBackground: Color(0xFF18181B),
296
+ fieldBackgroundHover: Color(0xEB1C1C1F),
297
+ fieldBackgroundFocus: Color(0xFF18181B),
298
+ fieldPlaceholder: Color(0xFFA1A1AA),
299
+ fieldForeground: Color(0xFFFCFCFC),
300
+ fieldBorder: Color(0x0028282C),
301
+ fieldBorderHover: Color(0x00464646),
302
+ // Separator.
303
+ separator: Color(0xFF1A1A1D),
304
+ separatorSecondary: Color(0xFF353538),
305
+ separatorTertiary: Color(0xFF3C3C3F),
306
+ // Other.
307
+ border: Color(0xFF28282C),
308
+ overlay: Color(0xFF18181B),
309
+ segment: Color(0xFF46464C),
310
+ backdrop: Color(0x80000000),
311
+ // Premium (paywall).
166
312
  premiumOverlayMid: Color(0xFF9997A1),
167
313
  premiumOverlayDark: Color(0xFF130F26),
168
314
  premiumBannerText: Color(0xFF49250A),
169
315
  );
170
316
 
317
+ // -------------------------------------------------------------------------
318
+ // Legacy aliases — keep existing components compiling. Prefer the HeroUI
319
+ // names above for new code.
320
+ // -------------------------------------------------------------------------
321
+
322
+ /// Text/icon color on top of [accent] — auto-derived from the accent's
323
+ /// luminance (white on dark/saturated accents, near-black on light ones),
324
+ /// so changing the accent hue alone always stays legible in both modes.
325
+ Color get accentForeground => onColor(accent);
326
+
327
+ /// Hover state for [accent] — a subtle lift toward white.
328
+ Color get accentHover => Color.lerp(accent, const Color(0xFFFFFFFF), 0.14)!;
329
+
330
+ /// Translucent accent fill (15%) for soft / secondary surfaces.
331
+ Color get accentSoft => accent.withValues(alpha: 0.15);
332
+
333
+ /// Hover state for [accentSoft] (20%).
334
+ Color get accentSoftHover => accent.withValues(alpha: 0.20);
335
+
336
+ /// Text / icon color on a soft accent fill — the accent itself.
337
+ Color get accentSoftForeground => accent;
338
+
339
+ Color get primary => accent;
340
+ Color get onPrimary => accentForeground;
341
+ Color get onBackground => foreground;
342
+ Color get onSurface => foreground;
343
+ Color get surfacePrimarySoft => accentSoft;
344
+ Color get surfaceNeutralSoft => neutral;
345
+ Color get surfaceErrorSoft => dangerSoft;
346
+ Color get avatarFallbackFill => surfaceSecondary;
347
+ Color get error => danger;
348
+ Color get onError => dangerForeground;
349
+ Color get onSuccess => successForeground;
350
+ Color get onWarning => warningForeground;
351
+ Color get outline => border;
352
+ Color get outlineButton => border;
353
+ Color get muted => foregroundMuted;
354
+ Color get grey1 => separatorSecondary;
355
+ Color get grey2 => foregroundMuted;
356
+ Color get grey3 => foreground;
357
+
358
+ /// Form field labels: slightly stronger than [foregroundMuted].
359
+ Color get fieldLabel {
360
+ final bool isDark = background.computeLuminance() < 0.5;
361
+ return Color.lerp(foregroundMuted, foreground, isDark ? 0.36 : 0.28)!;
362
+ }
363
+
171
364
  @override
172
365
  ThemeExtension<KasyColors> copyWith({
173
- Color? primary,
174
- Color? onPrimary,
175
- Color? background,
176
- Color? onBackground,
177
- Color? surface,
178
- Color? onSurface,
179
- Color? surfacePrimarySoft,
180
- Color? surfaceNeutralSoft,
181
- Color? surfaceErrorSoft,
182
- Color? avatarFallbackFill,
183
- Color? error,
184
- Color? onError,
366
+ Color? accent,
367
+ Color? neutral,
368
+ Color? neutralHover,
369
+ Color? neutralForeground,
185
370
  Color? success,
186
- Color? onSuccess,
371
+ Color? successForeground,
372
+ Color? successHover,
373
+ Color? successSoft,
374
+ Color? successSoftHover,
375
+ Color? successSoftForeground,
187
376
  Color? warning,
188
- Color? onWarning,
189
- Color? outline,
190
- Color? outlineButton,
191
- Color? muted,
192
- Color? grey1,
193
- Color? grey2,
194
- Color? grey3,
377
+ Color? warningForeground,
378
+ Color? warningHover,
379
+ Color? warningSoft,
380
+ Color? warningSoftHover,
381
+ Color? warningSoftForeground,
382
+ Color? danger,
383
+ Color? dangerForeground,
384
+ Color? dangerHover,
385
+ Color? dangerSoft,
386
+ Color? dangerSoftHover,
387
+ Color? dangerSoftForeground,
388
+ Color? foreground,
389
+ Color? foregroundMuted,
390
+ Color? foregroundSegment,
391
+ Color? foregroundOverlay,
392
+ Color? foregroundLink,
393
+ Color? foregroundInverse,
394
+ Color? background,
395
+ Color? backgroundSecondary,
396
+ Color? backgroundTertiary,
397
+ Color? backgroundInverse,
398
+ Color? surface,
399
+ Color? surfaceSecondary,
400
+ Color? surfaceTertiary,
401
+ Color? surfaceTransparent,
402
+ Color? fieldBackground,
403
+ Color? fieldBackgroundHover,
404
+ Color? fieldBackgroundFocus,
405
+ Color? fieldPlaceholder,
406
+ Color? fieldForeground,
407
+ Color? fieldBorder,
408
+ Color? fieldBorderHover,
409
+ Color? separator,
410
+ Color? separatorSecondary,
411
+ Color? separatorTertiary,
412
+ Color? border,
413
+ Color? overlay,
414
+ Color? segment,
415
+ Color? backdrop,
195
416
  Color? premiumOverlayMid,
196
417
  Color? premiumOverlayDark,
197
418
  Color? premiumBannerText,
198
419
  }) {
199
420
  return KasyColors(
200
- primary: primary ?? this.primary,
201
- onPrimary: onPrimary ?? this.onPrimary,
202
- background: background ?? this.background,
203
- onBackground: onBackground ?? this.onBackground,
204
- surface: surface ?? this.surface,
205
- onSurface: onSurface ?? this.onSurface,
206
- surfacePrimarySoft: surfacePrimarySoft ?? this.surfacePrimarySoft,
207
- surfaceNeutralSoft: surfaceNeutralSoft ?? this.surfaceNeutralSoft,
208
- surfaceErrorSoft: surfaceErrorSoft ?? this.surfaceErrorSoft,
209
- avatarFallbackFill: avatarFallbackFill ?? this.avatarFallbackFill,
210
- error: error ?? this.error,
211
- onError: onError ?? this.onError,
421
+ accent: accent ?? this.accent,
422
+ neutral: neutral ?? this.neutral,
423
+ neutralHover: neutralHover ?? this.neutralHover,
424
+ neutralForeground: neutralForeground ?? this.neutralForeground,
212
425
  success: success ?? this.success,
213
- onSuccess: onSuccess ?? this.onSuccess,
426
+ successForeground: successForeground ?? this.successForeground,
427
+ successHover: successHover ?? this.successHover,
428
+ successSoft: successSoft ?? this.successSoft,
429
+ successSoftHover: successSoftHover ?? this.successSoftHover,
430
+ successSoftForeground:
431
+ successSoftForeground ?? this.successSoftForeground,
214
432
  warning: warning ?? this.warning,
215
- onWarning: onWarning ?? this.onWarning,
216
- outline: outline ?? this.outline,
217
- outlineButton: outlineButton ?? this.outlineButton,
218
- muted: muted ?? this.muted,
219
- grey1: grey1 ?? this.grey1,
220
- grey2: grey2 ?? this.grey2,
221
- grey3: grey3 ?? this.grey3,
433
+ warningForeground: warningForeground ?? this.warningForeground,
434
+ warningHover: warningHover ?? this.warningHover,
435
+ warningSoft: warningSoft ?? this.warningSoft,
436
+ warningSoftHover: warningSoftHover ?? this.warningSoftHover,
437
+ warningSoftForeground:
438
+ warningSoftForeground ?? this.warningSoftForeground,
439
+ danger: danger ?? this.danger,
440
+ dangerForeground: dangerForeground ?? this.dangerForeground,
441
+ dangerHover: dangerHover ?? this.dangerHover,
442
+ dangerSoft: dangerSoft ?? this.dangerSoft,
443
+ dangerSoftHover: dangerSoftHover ?? this.dangerSoftHover,
444
+ dangerSoftForeground: dangerSoftForeground ?? this.dangerSoftForeground,
445
+ foreground: foreground ?? this.foreground,
446
+ foregroundMuted: foregroundMuted ?? this.foregroundMuted,
447
+ foregroundSegment: foregroundSegment ?? this.foregroundSegment,
448
+ foregroundOverlay: foregroundOverlay ?? this.foregroundOverlay,
449
+ foregroundLink: foregroundLink ?? this.foregroundLink,
450
+ foregroundInverse: foregroundInverse ?? this.foregroundInverse,
451
+ background: background ?? this.background,
452
+ backgroundSecondary: backgroundSecondary ?? this.backgroundSecondary,
453
+ backgroundTertiary: backgroundTertiary ?? this.backgroundTertiary,
454
+ backgroundInverse: backgroundInverse ?? this.backgroundInverse,
455
+ surface: surface ?? this.surface,
456
+ surfaceSecondary: surfaceSecondary ?? this.surfaceSecondary,
457
+ surfaceTertiary: surfaceTertiary ?? this.surfaceTertiary,
458
+ surfaceTransparent: surfaceTransparent ?? this.surfaceTransparent,
459
+ fieldBackground: fieldBackground ?? this.fieldBackground,
460
+ fieldBackgroundHover: fieldBackgroundHover ?? this.fieldBackgroundHover,
461
+ fieldBackgroundFocus: fieldBackgroundFocus ?? this.fieldBackgroundFocus,
462
+ fieldPlaceholder: fieldPlaceholder ?? this.fieldPlaceholder,
463
+ fieldForeground: fieldForeground ?? this.fieldForeground,
464
+ fieldBorder: fieldBorder ?? this.fieldBorder,
465
+ fieldBorderHover: fieldBorderHover ?? this.fieldBorderHover,
466
+ separator: separator ?? this.separator,
467
+ separatorSecondary: separatorSecondary ?? this.separatorSecondary,
468
+ separatorTertiary: separatorTertiary ?? this.separatorTertiary,
469
+ border: border ?? this.border,
470
+ overlay: overlay ?? this.overlay,
471
+ segment: segment ?? this.segment,
472
+ backdrop: backdrop ?? this.backdrop,
222
473
  premiumOverlayMid: premiumOverlayMid ?? this.premiumOverlayMid,
223
474
  premiumOverlayDark: premiumOverlayDark ?? this.premiumOverlayDark,
224
475
  premiumBannerText: premiumBannerText ?? this.premiumBannerText,
@@ -233,34 +484,83 @@ class KasyColors extends ThemeExtension<KasyColors> {
233
484
  if (other == null || other is! KasyColors) return this;
234
485
 
235
486
  return KasyColors(
236
- primary: Color.lerp(primary, other.primary, t)!,
237
- onPrimary: Color.lerp(onPrimary, other.onPrimary, t)!,
238
- background: Color.lerp(background, other.background, t)!,
239
- onBackground: Color.lerp(onBackground, other.onBackground, t)!,
240
- surface: Color.lerp(surface, other.surface, t)!,
241
- onSurface: Color.lerp(onSurface, other.onSurface, t)!,
242
- surfacePrimarySoft:
243
- Color.lerp(surfacePrimarySoft, other.surfacePrimarySoft, t)!,
244
- surfaceNeutralSoft:
245
- Color.lerp(surfaceNeutralSoft, other.surfaceNeutralSoft, t)!,
246
- surfaceErrorSoft: Color.lerp(surfaceErrorSoft, other.surfaceErrorSoft, t)!,
247
- avatarFallbackFill:
248
- Color.lerp(avatarFallbackFill, other.avatarFallbackFill, t)!,
249
- error: Color.lerp(error, other.error, t)!,
250
- onError: Color.lerp(onError, other.onError, t)!,
487
+ accent: Color.lerp(accent, other.accent, t)!,
488
+ neutral: Color.lerp(neutral, other.neutral, t)!,
489
+ neutralHover: Color.lerp(neutralHover, other.neutralHover, t)!,
490
+ neutralForeground:
491
+ Color.lerp(neutralForeground, other.neutralForeground, t)!,
251
492
  success: Color.lerp(success, other.success, t)!,
252
- onSuccess: Color.lerp(onSuccess, other.onSuccess, t)!,
493
+ successForeground:
494
+ Color.lerp(successForeground, other.successForeground, t)!,
495
+ successHover: Color.lerp(successHover, other.successHover, t)!,
496
+ successSoft: Color.lerp(successSoft, other.successSoft, t)!,
497
+ successSoftHover: Color.lerp(successSoftHover, other.successSoftHover, t)!,
498
+ successSoftForeground:
499
+ Color.lerp(successSoftForeground, other.successSoftForeground, t)!,
253
500
  warning: Color.lerp(warning, other.warning, t)!,
254
- onWarning: Color.lerp(onWarning, other.onWarning, t)!,
255
- outline: Color.lerp(outline, other.outline, t)!,
256
- outlineButton: Color.lerp(outlineButton, other.outlineButton, t)!,
257
- muted: Color.lerp(muted, other.muted, t)!,
258
- grey1: Color.lerp(grey1, other.grey1, t)!,
259
- grey2: Color.lerp(grey2, other.grey2, t)!,
260
- grey3: Color.lerp(grey3, other.grey3, t)!,
261
- premiumOverlayMid: Color.lerp(premiumOverlayMid, other.premiumOverlayMid, t)!,
262
- premiumOverlayDark: Color.lerp(premiumOverlayDark, other.premiumOverlayDark, t)!,
263
- premiumBannerText: Color.lerp(premiumBannerText, other.premiumBannerText, t)!,
501
+ warningForeground:
502
+ Color.lerp(warningForeground, other.warningForeground, t)!,
503
+ warningHover: Color.lerp(warningHover, other.warningHover, t)!,
504
+ warningSoft: Color.lerp(warningSoft, other.warningSoft, t)!,
505
+ warningSoftHover: Color.lerp(warningSoftHover, other.warningSoftHover, t)!,
506
+ warningSoftForeground:
507
+ Color.lerp(warningSoftForeground, other.warningSoftForeground, t)!,
508
+ danger: Color.lerp(danger, other.danger, t)!,
509
+ dangerForeground:
510
+ Color.lerp(dangerForeground, other.dangerForeground, t)!,
511
+ dangerHover: Color.lerp(dangerHover, other.dangerHover, t)!,
512
+ dangerSoft: Color.lerp(dangerSoft, other.dangerSoft, t)!,
513
+ dangerSoftHover: Color.lerp(dangerSoftHover, other.dangerSoftHover, t)!,
514
+ dangerSoftForeground:
515
+ Color.lerp(dangerSoftForeground, other.dangerSoftForeground, t)!,
516
+ foreground: Color.lerp(foreground, other.foreground, t)!,
517
+ foregroundMuted: Color.lerp(foregroundMuted, other.foregroundMuted, t)!,
518
+ foregroundSegment:
519
+ Color.lerp(foregroundSegment, other.foregroundSegment, t)!,
520
+ foregroundOverlay:
521
+ Color.lerp(foregroundOverlay, other.foregroundOverlay, t)!,
522
+ foregroundLink: Color.lerp(foregroundLink, other.foregroundLink, t)!,
523
+ foregroundInverse:
524
+ Color.lerp(foregroundInverse, other.foregroundInverse, t)!,
525
+ background: Color.lerp(background, other.background, t)!,
526
+ backgroundSecondary:
527
+ Color.lerp(backgroundSecondary, other.backgroundSecondary, t)!,
528
+ backgroundTertiary:
529
+ Color.lerp(backgroundTertiary, other.backgroundTertiary, t)!,
530
+ backgroundInverse:
531
+ Color.lerp(backgroundInverse, other.backgroundInverse, t)!,
532
+ surface: Color.lerp(surface, other.surface, t)!,
533
+ surfaceSecondary:
534
+ Color.lerp(surfaceSecondary, other.surfaceSecondary, t)!,
535
+ surfaceTertiary: Color.lerp(surfaceTertiary, other.surfaceTertiary, t)!,
536
+ surfaceTransparent:
537
+ Color.lerp(surfaceTransparent, other.surfaceTransparent, t)!,
538
+ fieldBackground: Color.lerp(fieldBackground, other.fieldBackground, t)!,
539
+ fieldBackgroundHover:
540
+ Color.lerp(fieldBackgroundHover, other.fieldBackgroundHover, t)!,
541
+ fieldBackgroundFocus:
542
+ Color.lerp(fieldBackgroundFocus, other.fieldBackgroundFocus, t)!,
543
+ fieldPlaceholder:
544
+ Color.lerp(fieldPlaceholder, other.fieldPlaceholder, t)!,
545
+ fieldForeground: Color.lerp(fieldForeground, other.fieldForeground, t)!,
546
+ fieldBorder: Color.lerp(fieldBorder, other.fieldBorder, t)!,
547
+ fieldBorderHover:
548
+ Color.lerp(fieldBorderHover, other.fieldBorderHover, t)!,
549
+ separator: Color.lerp(separator, other.separator, t)!,
550
+ separatorSecondary:
551
+ Color.lerp(separatorSecondary, other.separatorSecondary, t)!,
552
+ separatorTertiary:
553
+ Color.lerp(separatorTertiary, other.separatorTertiary, t)!,
554
+ border: Color.lerp(border, other.border, t)!,
555
+ overlay: Color.lerp(overlay, other.overlay, t)!,
556
+ segment: Color.lerp(segment, other.segment, t)!,
557
+ backdrop: Color.lerp(backdrop, other.backdrop, t)!,
558
+ premiumOverlayMid:
559
+ Color.lerp(premiumOverlayMid, other.premiumOverlayMid, t)!,
560
+ premiumOverlayDark:
561
+ Color.lerp(premiumOverlayDark, other.premiumOverlayDark, t)!,
562
+ premiumBannerText:
563
+ Color.lerp(premiumBannerText, other.premiumBannerText, t)!,
264
564
  );
265
565
  }
266
566
  }