kasy-cli 1.16.0 → 1.18.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.
- package/bin/kasy.js +16 -2
- package/lib/commands/add.js +52 -19
- package/lib/commands/configure.js +548 -0
- package/lib/commands/deploy.js +4 -4
- package/lib/commands/doctor.js +54 -6
- package/lib/commands/favicon.js +4 -4
- package/lib/commands/icon.js +5 -5
- package/lib/commands/new.js +404 -213
- package/lib/commands/remove.js +14 -3
- package/lib/commands/run.js +208 -6
- package/lib/commands/splash.js +5 -5
- package/lib/commands/update.js +9 -9
- package/lib/scaffold/CHANGELOG.json +23 -0
- package/lib/scaffold/backends/api/patch/README.md +3 -2
- package/lib/scaffold/backends/firebase/enable-auth-via-cli.js +108 -0
- package/lib/scaffold/backends/firebase/setup-from-scratch.js +44 -5
- package/lib/scaffold/backends/supabase/patch/README.md +3 -2
- package/lib/scaffold/generate.js +24 -8
- package/lib/scaffold/shared/generator-utils.js +52 -8
- package/lib/scaffold/shared/post-build.js +113 -31
- package/lib/scaffold/shared/template-strings.js +6 -0
- package/lib/utils/brand.js +16 -12
- package/lib/utils/flutter-run.js +139 -11
- package/lib/utils/i18n/messages-en.js +85 -7
- package/lib/utils/i18n/messages-es.js +85 -7
- package/lib/utils/i18n/messages-pt.js +86 -8
- package/lib/utils/ui.js +79 -4
- package/package.json +1 -1
- package/templates/firebase/README.en.md +18 -8
- package/templates/firebase/README.es.md +18 -8
- package/templates/firebase/README.md +18 -8
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MyWidget.kt +68 -45
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MyWidgetReceiver.kt +37 -0
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/OpenAppAction.kt +26 -0
- package/templates/firebase/android/app/src/main/res/drawable/widget_add_button.xml +2 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_gradient_bg.xml +7 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_gradient_inner.xml +6 -6
- package/templates/firebase/android/app/src/main/res/drawable/widget_plan_pill_bg.xml +1 -1
- package/templates/firebase/android/app/src/main/res/drawable/widget_preview_image.xml +2 -2
- package/templates/firebase/android/app/src/main/res/drawable/widget_pro_pill_bg.xml +1 -1
- package/templates/firebase/android/app/src/main/res/drawable-hdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-hdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-mdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-mdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-hdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-hdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-mdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-mdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-xxxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxxhdpi/android12splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/layout/widget_preview.xml +3 -3
- package/templates/firebase/android/app/src/main/res/values/colors.xml +32 -0
- package/templates/firebase/assets/images/splash_logo_dark.png +0 -0
- package/templates/firebase/assets/images/splash_logo_dark_android12.png +0 -0
- package/templates/firebase/assets/images/splash_logo_light.png +0 -0
- package/templates/firebase/assets/images/splash_logo_light_android12.png +0 -0
- package/templates/firebase/docs/revenuecat-setup.es.md +28 -8
- package/templates/firebase/docs/revenuecat-setup.pt.md +28 -8
- package/templates/firebase/ios/HomeWidgetExtension/MyWidget.swift +75 -29
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@3x.png +0 -0
- package/templates/firebase/ios/Runner/Base.lproj/LaunchScreen.storyboard +1 -1
- package/templates/firebase/lib/components/components.dart +1 -0
- package/templates/firebase/lib/components/kasy_avatar.dart +65 -17
- package/templates/firebase/lib/components/kasy_avatar_presets.dart +121 -97
- package/templates/firebase/lib/components/kasy_button.dart +8 -8
- package/templates/firebase/lib/components/kasy_date_picker.dart +834 -0
- package/templates/firebase/lib/components/kasy_tabs.dart +145 -61
- package/templates/firebase/lib/core/home_widgets/home_widget_mywidget_service.dart +45 -53
- package/templates/firebase/lib/features/home/home_components_preview_registry.dart +565 -77
- package/templates/firebase/lib/features/settings/ui/components/language_switcher.dart +10 -5
- package/templates/firebase/lib/i18n/en.i18n.json +2 -1
- package/templates/firebase/lib/i18n/es.i18n.json +2 -1
- package/templates/firebase/lib/i18n/pt.i18n.json +2 -1
- package/templates/firebase/lib/router.dart +15 -1
- package/templates/firebase/pubspec.yaml +1 -1
- package/templates/firebase/web/index.html +9 -0
- package/templates/firebase/web/splash/img/dark-1x.png +0 -0
- package/templates/firebase/web/splash/img/dark-2x.png +0 -0
- package/templates/firebase/web/splash/img/dark-3x.png +0 -0
- package/templates/firebase/web/splash/img/dark-4x.png +0 -0
- package/templates/firebase/web/splash/img/light-1x.png +0 -0
- package/templates/firebase/web/splash/img/light-2x.png +0 -0
- package/templates/firebase/web/splash/img/light-3x.png +0 -0
- package/templates/firebase/web/splash/img/light-4x.png +0 -0
|
@@ -1,133 +1,157 @@
|
|
|
1
1
|
import 'package:flutter/material.dart';
|
|
2
2
|
|
|
3
|
-
///
|
|
4
|
-
/// [KasyAvatar.gradientFill].
|
|
3
|
+
/// Gradient data for [KasyAvatar] orb-style fills.
|
|
5
4
|
///
|
|
6
|
-
///
|
|
7
|
-
///
|
|
8
|
-
///
|
|
5
|
+
/// Holds the four colors needed to render the background wash and the
|
|
6
|
+
/// soft-focus sphere: [bgTop]/[bgBottom] for the canvas gradient, and
|
|
7
|
+
/// [orbTop]/[orbBottom] for the blurred orb overlay.
|
|
8
|
+
///
|
|
9
|
+
/// Matches the HeroUI Figma Kit V3 "Image Use" avatar palette exactly.
|
|
10
|
+
@immutable
|
|
11
|
+
class KasyAvatarGradientData {
|
|
12
|
+
final Color bgTop;
|
|
13
|
+
final Color bgBottom;
|
|
14
|
+
final Color orbTop;
|
|
15
|
+
final Color orbBottom;
|
|
16
|
+
|
|
17
|
+
const KasyAvatarGradientData({
|
|
18
|
+
required this.bgTop,
|
|
19
|
+
required this.bgBottom,
|
|
20
|
+
required this.orbTop,
|
|
21
|
+
required this.orbBottom,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
@override
|
|
25
|
+
bool operator ==(Object other) {
|
|
26
|
+
if (identical(this, other)) return true;
|
|
27
|
+
return other is KasyAvatarGradientData &&
|
|
28
|
+
other.bgTop == bgTop &&
|
|
29
|
+
other.bgBottom == bgBottom &&
|
|
30
|
+
other.orbTop == orbTop &&
|
|
31
|
+
other.orbBottom == orbBottom;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@override
|
|
35
|
+
int get hashCode => Object.hash(bgTop, bgBottom, orbTop, orbBottom);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/// All 14 orb-style avatar gradient presets (matches Figma "Image Use" section).
|
|
9
39
|
abstract final class KasyAvatarGradients {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/// Cornflower blue → deep blue
|
|
17
|
-
static const LinearGradient blue = LinearGradient(
|
|
18
|
-
begin: _b,
|
|
19
|
-
end: _e,
|
|
20
|
-
colors: [Color(0xFF5D9BE7), Color(0xFF5D9BE7), Color(0xFF0026FF)],
|
|
21
|
-
stops: [0.0, 0.27, 1.0],
|
|
40
|
+
/// Cornflower-blue canvas, deep-blue orb.
|
|
41
|
+
static const KasyAvatarGradientData blueDark = KasyAvatarGradientData(
|
|
42
|
+
bgTop: Color(0xFFE9E9FF),
|
|
43
|
+
bgBottom: Color(0xFFCCCDF1),
|
|
44
|
+
orbTop: Color(0xFF5D9BE7),
|
|
45
|
+
orbBottom: Color(0xFF0026FF),
|
|
22
46
|
);
|
|
23
47
|
|
|
24
|
-
///
|
|
25
|
-
static const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
48
|
+
/// Ice-blue canvas, cyan-to-violet orb.
|
|
49
|
+
static const KasyAvatarGradientData blue = KasyAvatarGradientData(
|
|
50
|
+
bgTop: Color(0xFFE9E9FF),
|
|
51
|
+
bgBottom: Color(0xFFCCE5F1),
|
|
52
|
+
orbTop: Color(0xFF5DD0E7),
|
|
53
|
+
orbBottom: Color(0xFF7300FF),
|
|
30
54
|
);
|
|
31
55
|
|
|
32
|
-
///
|
|
33
|
-
static const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
56
|
+
/// Pale-aqua canvas, aqua-to-deep-blue orb.
|
|
57
|
+
static const KasyAvatarGradientData sky = KasyAvatarGradientData(
|
|
58
|
+
bgTop: Color(0xFFE9FAFF),
|
|
59
|
+
bgBottom: Color(0xFFCCECF1),
|
|
60
|
+
orbTop: Color(0xFF5DE7E7),
|
|
61
|
+
orbBottom: Color(0xFF001AFF),
|
|
38
62
|
);
|
|
39
63
|
|
|
40
|
-
/// Mint
|
|
41
|
-
static const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
64
|
+
/// Mint canvas, seafoam-to-forest orb.
|
|
65
|
+
static const KasyAvatarGradientData emerald = KasyAvatarGradientData(
|
|
66
|
+
bgTop: Color(0xFFE9FFF0),
|
|
67
|
+
bgBottom: Color(0xFFCCF1D6),
|
|
68
|
+
orbTop: Color(0xFF52DEB0),
|
|
69
|
+
orbBottom: Color(0xFF0D5C45),
|
|
46
70
|
);
|
|
47
71
|
|
|
48
|
-
///
|
|
49
|
-
static const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
/// Pale-green canvas, mint-to-royal-blue orb.
|
|
73
|
+
static const KasyAvatarGradientData green = KasyAvatarGradientData(
|
|
74
|
+
bgTop: Color(0xFFE9FFEB),
|
|
75
|
+
bgBottom: Color(0xFFD3F1CC),
|
|
76
|
+
orbTop: Color(0xFF5DE79D),
|
|
77
|
+
orbBottom: Color(0xFF0033FF),
|
|
54
78
|
);
|
|
55
79
|
|
|
56
|
-
///
|
|
57
|
-
static const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
80
|
+
/// Sage canvas, turquoise-to-deep-forest orb.
|
|
81
|
+
static const KasyAvatarGradientData forest = KasyAvatarGradientData(
|
|
82
|
+
bgTop: Color(0xFFCDE8D5),
|
|
83
|
+
bgBottom: Color(0xFF9CD0AA),
|
|
84
|
+
orbTop: Color(0xFF5DD9AF),
|
|
85
|
+
orbBottom: Color(0xFF094E39),
|
|
62
86
|
);
|
|
63
87
|
|
|
64
|
-
///
|
|
65
|
-
static const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
88
|
+
/// Cream canvas, gold-to-deep-red orb.
|
|
89
|
+
static const KasyAvatarGradientData orange = KasyAvatarGradientData(
|
|
90
|
+
bgTop: Color(0xFFFFF8E9),
|
|
91
|
+
bgBottom: Color(0xFFF1DFCC),
|
|
92
|
+
orbTop: Color(0xFFE7BD5D),
|
|
93
|
+
orbBottom: Color(0xFFFF1E00),
|
|
70
94
|
);
|
|
71
95
|
|
|
72
|
-
///
|
|
73
|
-
static const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
96
|
+
/// Blush canvas, salmon-to-scarlet orb.
|
|
97
|
+
static const KasyAvatarGradientData red = KasyAvatarGradientData(
|
|
98
|
+
bgTop: Color(0xFFFFE9E9),
|
|
99
|
+
bgBottom: Color(0xFFF1CCCC),
|
|
100
|
+
orbTop: Color(0xFFE7885D),
|
|
101
|
+
orbBottom: Color(0xFFFF0004),
|
|
78
102
|
);
|
|
79
103
|
|
|
80
|
-
///
|
|
81
|
-
static const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
104
|
+
/// Lavender canvas, soft-purple-to-cobalt orb.
|
|
105
|
+
static const KasyAvatarGradientData indigo = KasyAvatarGradientData(
|
|
106
|
+
bgTop: Color(0xFFEDCEFF),
|
|
107
|
+
bgBottom: Color(0xFFF1CCEE),
|
|
108
|
+
orbTop: Color(0xFFB45DE7),
|
|
109
|
+
orbBottom: Color(0xFF0055FF),
|
|
86
110
|
);
|
|
87
111
|
|
|
88
|
-
///
|
|
89
|
-
static const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
112
|
+
/// Lilac canvas, medium-purple-to-crimson orb.
|
|
113
|
+
static const KasyAvatarGradientData purple = KasyAvatarGradientData(
|
|
114
|
+
bgTop: Color(0xFFEFE9FF),
|
|
115
|
+
bgBottom: Color(0xFFDBCCF1),
|
|
116
|
+
orbTop: Color(0xFF8D5DE7),
|
|
117
|
+
orbBottom: Color(0xFFFF0009),
|
|
94
118
|
);
|
|
95
119
|
|
|
96
|
-
///
|
|
97
|
-
static const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
120
|
+
/// Pink-white canvas, orchid-to-magenta orb.
|
|
121
|
+
static const KasyAvatarGradientData rose = KasyAvatarGradientData(
|
|
122
|
+
bgTop: Color(0xFFFFE9FB),
|
|
123
|
+
bgBottom: Color(0xFFF0CCF1),
|
|
124
|
+
orbTop: Color(0xFFE75DCB),
|
|
125
|
+
orbBottom: Color(0xFFFF000D),
|
|
102
126
|
);
|
|
103
127
|
|
|
104
|
-
///
|
|
105
|
-
static const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
128
|
+
/// Blush canvas, hot-pink-to-coral orb.
|
|
129
|
+
static const KasyAvatarGradientData hotPink = KasyAvatarGradientData(
|
|
130
|
+
bgTop: Color(0xFFFFE9E9),
|
|
131
|
+
bgBottom: Color(0xFFF1CCCD),
|
|
132
|
+
orbTop: Color(0xFFE43673),
|
|
133
|
+
orbBottom: Color(0xFFFB5059),
|
|
110
134
|
);
|
|
111
135
|
|
|
112
|
-
///
|
|
113
|
-
static const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
136
|
+
/// Light-grey canvas, silver-to-near-black orb.
|
|
137
|
+
static const KasyAvatarGradientData silver = KasyAvatarGradientData(
|
|
138
|
+
bgTop: Color(0xFFE3E3E3),
|
|
139
|
+
bgBottom: Color(0xFFC6C6C6),
|
|
140
|
+
orbTop: Color(0xFF949494),
|
|
141
|
+
orbBottom: Color(0xFF080808),
|
|
118
142
|
);
|
|
119
143
|
|
|
120
|
-
///
|
|
121
|
-
static const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
144
|
+
/// Dark-grey canvas, mid-grey-to-very-dark orb.
|
|
145
|
+
static const KasyAvatarGradientData black = KasyAvatarGradientData(
|
|
146
|
+
bgTop: Color(0xFF252525),
|
|
147
|
+
bgBottom: Color(0xFF444444),
|
|
148
|
+
orbTop: Color(0xFF7F7F7F),
|
|
149
|
+
orbBottom: Color(0xFF1F1F1F),
|
|
126
150
|
);
|
|
127
151
|
|
|
128
152
|
/// All 14 presets in display order (matches Figma "Image Use" section).
|
|
129
|
-
static const List<
|
|
130
|
-
blue, sky,
|
|
153
|
+
static const List<KasyAvatarGradientData> all = [
|
|
154
|
+
blueDark, blue, sky, emerald, green, forest,
|
|
131
155
|
orange, red, indigo, purple, rose, hotPink,
|
|
132
156
|
silver, black,
|
|
133
157
|
];
|
|
@@ -495,8 +495,8 @@ class _KasyButtonShell extends StatelessWidget {
|
|
|
495
495
|
semanticLabel ?? (label.isEmpty ? 'Button' : label);
|
|
496
496
|
|
|
497
497
|
Widget _wrapFocus(Widget child, BorderRadius borderRadius) {
|
|
498
|
-
if (!
|
|
499
|
-
return
|
|
498
|
+
if (!enabled || onPressed == null) return child;
|
|
499
|
+
return _KeyboardFocus(
|
|
500
500
|
onActivate: onPressed!,
|
|
501
501
|
borderRadius: borderRadius,
|
|
502
502
|
child: child,
|
|
@@ -858,24 +858,24 @@ class _KasyButtonMetrics {
|
|
|
858
858
|
});
|
|
859
859
|
}
|
|
860
860
|
|
|
861
|
-
///
|
|
862
|
-
///
|
|
863
|
-
class
|
|
861
|
+
/// Makes a button keyboard-navigable (Tab) and activates it on Enter/Space.
|
|
862
|
+
/// Shows a focus ring when focused. Inert on touch-only platforms.
|
|
863
|
+
class _KeyboardFocus extends StatefulWidget {
|
|
864
864
|
final VoidCallback onActivate;
|
|
865
865
|
final Widget child;
|
|
866
866
|
final BorderRadius borderRadius;
|
|
867
867
|
|
|
868
|
-
const
|
|
868
|
+
const _KeyboardFocus({
|
|
869
869
|
required this.onActivate,
|
|
870
870
|
required this.child,
|
|
871
871
|
required this.borderRadius,
|
|
872
872
|
});
|
|
873
873
|
|
|
874
874
|
@override
|
|
875
|
-
State<
|
|
875
|
+
State<_KeyboardFocus> createState() => _KeyboardFocusState();
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
-
class
|
|
878
|
+
class _KeyboardFocusState extends State<_KeyboardFocus> {
|
|
879
879
|
late final FocusNode _node;
|
|
880
880
|
bool _focused = false;
|
|
881
881
|
|