kasy-cli 1.31.9 → 1.31.11

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 (36) hide show
  1. package/lib/commands/add.js +31 -0
  2. package/lib/commands/new.js +7 -24
  3. package/lib/scaffold/CHANGELOG.json +9 -0
  4. package/lib/scaffold/backends/supabase/config.toml +39 -2
  5. package/lib/scaffold/backends/supabase/deploy.js +14 -16
  6. package/lib/scaffold/backends/supabase/edge-functions/admin-list-users/index.ts +3 -1
  7. package/lib/scaffold/backends/supabase/edge-functions/stripe-create-checkout-session/index.ts +27 -9
  8. package/lib/scaffold/backends/supabase/edge-functions/stripe-create-portal-session/index.ts +3 -1
  9. package/lib/scaffold/backends/supabase/edge-functions/stripe-list-prices/index.ts +3 -2
  10. package/lib/scaffold/catalog.js +24 -0
  11. package/lib/scaffold/shared/generator-utils.js +11 -0
  12. package/package.json +2 -2
  13. package/templates/firebase/assets/images/premium-bg.jpg +0 -0
  14. package/templates/firebase/assets/images/premium-switch-header.png +0 -0
  15. package/templates/firebase/functions/src/subscriptions/stripe_functions.ts +21 -4
  16. package/templates/firebase/lib/components/kasy_app_bar.dart +109 -1
  17. package/templates/firebase/lib/core/bottom_menu/bottom_menu.dart +26 -7
  18. package/templates/firebase/lib/core/bottom_menu/kasy_bottom_bar_factory.dart +22 -33
  19. package/templates/firebase/lib/core/chrome/chrome_visibility.dart +119 -0
  20. package/templates/firebase/lib/core/shared_preferences/shared_preferences.dart +12 -0
  21. package/templates/firebase/lib/core/web_device_preview/web_device_preview.dart +25 -3
  22. package/templates/firebase/lib/features/home/home_feed.dart +7 -1
  23. package/templates/firebase/lib/features/home/home_page.dart +6 -8
  24. package/templates/firebase/lib/features/notifications/ui/notifications_page.dart +1 -0
  25. package/templates/firebase/lib/features/settings/settings_page.dart +26 -0
  26. package/templates/firebase/lib/features/subscriptions/api/stripe_payment_api.dart +5 -3
  27. package/templates/firebase/lib/features/subscriptions/api/subscription_payment_api.dart +8 -0
  28. package/templates/firebase/lib/features/subscriptions/providers/premium_page_provider.dart +89 -47
  29. package/templates/firebase/lib/features/subscriptions/ui/component/paywall_minimal.dart +169 -90
  30. package/templates/firebase/lib/features/subscriptions/ui/component/paywall_row.dart +219 -202
  31. package/templates/firebase/lib/features/subscriptions/ui/component/paywall_with_switch.dart +67 -30
  32. package/templates/firebase/lib/features/subscriptions/ui/component/premium_content.dart +16 -6
  33. package/templates/firebase/lib/features/subscriptions/ui/widgets/premium_bottom_menu.dart +11 -18
  34. package/templates/firebase/lib/i18n/en.i18n.json +3 -0
  35. package/templates/firebase/lib/i18n/es.i18n.json +3 -0
  36. package/templates/firebase/lib/i18n/pt.i18n.json +3 -0
@@ -76,26 +76,19 @@ class BottomPremiumMenu extends StatelessWidget {
76
76
  Widget _buildRestoreButton(BuildContext context) {
77
77
  final translations = Translations.of(context).premium;
78
78
  final color = textColor ?? context.colors.muted;
79
+ // While a purchase / restore is in flight, onTapRestore is null. We keep the
80
+ // label visible but disabled instead of swapping it for a spinner, so the
81
+ // only loading indicator on the paywall is the main CTA button.
79
82
  return Padding(
80
83
  padding: const EdgeInsets.symmetric(horizontal: KasySpacing.sm),
81
- child: onTapRestore != null
82
- ? KasyButton(
83
- variant: KasyButtonVariant.ghost,
84
- label: translations.restore_action,
85
- size: KasyButtonSize.small,
86
- foregroundColor: color,
87
- fontWeight: FontWeight.w500,
88
- onPressed: onTapRestore,
89
- )
90
- : KasyButton.iconOnly(
91
- icon: KasyIcons.refresh,
92
- variant: KasyButtonVariant.ghost,
93
- foregroundColor: color,
94
- isLoading: true,
95
- onPressed: null,
96
- semanticLabel: translations.restore_action,
97
- size: KasyButtonSize.small,
98
- ),
84
+ child: KasyButton(
85
+ variant: KasyButtonVariant.ghost,
86
+ label: translations.restore_action,
87
+ size: KasyButtonSize.small,
88
+ foregroundColor: color,
89
+ fontWeight: FontWeight.w500,
90
+ onPressed: onTapRestore,
91
+ ),
99
92
  );
100
93
  }
101
94
  }
@@ -206,6 +206,8 @@
206
206
  "purchase_success_text": "Thank you for your trust",
207
207
  "error_title": "Error",
208
208
  "error_text": "An error occurred. Please try again",
209
+ "web_checkout_timeout_title": "Payment not confirmed",
210
+ "web_checkout_timeout_text": "We did not receive payment confirmation. If you already paid, tap Restore.",
209
211
  "comparison": {
210
212
  "title": "Premium plan comparison",
211
213
  "features_label": "Features",
@@ -441,6 +443,7 @@
441
443
  "theme_option_light": "Light",
442
444
  "theme_option_dark": "Dark",
443
445
  "haptic_feedback_title": "Haptic feedback",
446
+ "hide_chrome_on_scroll_title": "Hide bars when scrolling",
444
447
  "section_preferences_label": "PREFERENCES",
445
448
  "section_security_label": "SECURITY",
446
449
  "section_support_label": "SUPPORT",
@@ -206,6 +206,8 @@
206
206
  "purchase_success_text": "Gracias por tu confianza",
207
207
  "error_title": "Error",
208
208
  "error_text": "Ocurrió un error. Inténtalo de nuevo",
209
+ "web_checkout_timeout_title": "Pago no confirmado",
210
+ "web_checkout_timeout_text": "No recibimos confirmacion del pago. Si ya pagaste, toca Restaurar.",
209
211
  "comparison": {
210
212
  "title": "Comparación de planes Premium",
211
213
  "features_label": "Características",
@@ -441,6 +443,7 @@
441
443
  "theme_option_light": "Claro",
442
444
  "theme_option_dark": "Oscuro",
443
445
  "haptic_feedback_title": "Feedback háptico",
446
+ "hide_chrome_on_scroll_title": "Ocultar barras al desplazar",
444
447
  "section_preferences_label": "PREFERENCIAS",
445
448
  "section_security_label": "SEGURIDAD",
446
449
  "section_support_label": "SOPORTE",
@@ -206,6 +206,8 @@
206
206
  "purchase_success_text": "Obrigado pela sua confiança",
207
207
  "error_title": "Erro",
208
208
  "error_text": "Ocorreu um erro. Tente novamente",
209
+ "web_checkout_timeout_title": "Pagamento nao confirmado",
210
+ "web_checkout_timeout_text": "Nao recebemos a confirmacao do pagamento. Se voce ja pagou, toque em Restaurar.",
209
211
  "comparison": {
210
212
  "title": "Comparação de planos Premium",
211
213
  "features_label": "Recursos",
@@ -441,6 +443,7 @@
441
443
  "theme_option_light": "Claro",
442
444
  "theme_option_dark": "Escuro",
443
445
  "haptic_feedback_title": "Feedback háptico",
446
+ "hide_chrome_on_scroll_title": "Ocultar barras ao rolar",
444
447
  "section_preferences_label": "PREFERÊNCIAS",
445
448
  "section_security_label": "SEGURANÇA",
446
449
  "section_support_label": "SUPORTE",