Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
refactor: use script to generate design tokens (#7751)
Richard Shiue889756ebb092
diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/ai_writer_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/ai_writer_toolbar_item.dartindex ab695b31a6..70d627d327 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/ai_writer_toolbar_item.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/ai/ai_writer_toolbar_item.dart@@ -117,7 +117,7 @@ class _AiWriterToolbarActionListState extends State<AiWriterToolbarActionList> {}Widget buildChild(BuildContext context) {- final theme = AppFlowyTheme.of(context), iconScheme = theme.iconColorTheme;+ final theme = AppFlowyTheme.of(context), iconScheme = theme.iconColorScheme;final child = FlowyIconButton(width: 48,height: 32,@@ -186,7 +186,7 @@ class ImproveWritingButton extends StatelessWidget {icon: FlowySvg(FlowySvgs.toolbar_ai_improve_writing_m,size: Size.square(20.0),- color: theme.iconColorTheme.primary,+ color: theme.iconColorScheme.primary,),onPressed: () {if (_isAIWriterEnabled(editorState)) {diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_menu.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_menu.dartindex bddfcb9b54..c3d2aebbcc 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_menu.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_menu.dart@@ -63,7 +63,7 @@ class _LinkEmbedMenuState extends State<LinkEmbedMenu> {Widget buildChild() {final theme = AppFlowyTheme.of(context),- iconScheme = theme.iconColorTheme,+ iconScheme = theme.iconColorScheme,fillScheme = theme.fillColorScheme;return Container(@@ -102,7 +102,7 @@ class _LinkEmbedMenuState extends State<LinkEmbedMenu> {}Widget buildconvertBotton() {- final theme = AppFlowyTheme.of(context), iconScheme = theme.iconColorTheme;+ final theme = AppFlowyTheme.of(context), iconScheme = theme.iconColorScheme;return AppFlowyPopover(offset: Offset(0, 6),direction: PopoverDirection.bottomWithRightAligned,@@ -170,7 +170,7 @@ class _LinkEmbedMenuState extends State<LinkEmbedMenu> {}Widget buildMoreOptionBotton() {- final theme = AppFlowyTheme.of(context), iconScheme = theme.iconColorTheme;+ final theme = AppFlowyTheme.of(context), iconScheme = theme.iconColorScheme;return AppFlowyPopover(offset: Offset(0, 6),direction: PopoverDirection.bottomWithRightAligned,diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dartindex 880a33b817..d7f3e26302 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_preview/custom_link_preview.dart@@ -163,7 +163,7 @@ class CustomLinkPreviewWidget extends StatelessWidget {Widget buildImage(BuildContext context) {final theme = AppFlowyTheme.of(context),fillScheme = theme.fillColorScheme,- iconScheme = theme.iconColorTheme;+ iconScheme = theme.iconColorScheme;final width = UniversalPlatform.isDesktopOrWeb ? 160.0 : 120.0;Widget child;if (imageUrl?.isNotEmpty ?? false) {diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_format_toolbar_items.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_format_toolbar_items.dartindex 7dbf192bae..d4f3d21f46 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_format_toolbar_items.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_format_toolbar_items.dart@@ -82,7 +82,7 @@ class _FormatToolbarItem extends ToolbarItem {size: Size.square(20.0),color: (isDark && isHighlight)? Color(0xFF282E3A)- : theme.iconColorTheme.primary,+ : theme.iconColorScheme.primary,),onPressed: () => editorState.toggleAttribute(name,diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_hightlight_color_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_hightlight_color_toolbar_item.dartindex 2e115d240d..46f2c02c5a 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_hightlight_color_toolbar_item.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_hightlight_color_toolbar_item.dart@@ -83,7 +83,7 @@ class _HighlightColorPickerWidgetStateWidget buildChild(BuildContext context) {final theme = AppFlowyTheme.of(context),- iconColor = theme.iconColorTheme.primary;+ iconColor = theme.iconColorScheme.primary;final child = FlowyIconButton(width: 36,diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_link_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_link_toolbar_item.dartindex cbbce9c943..8c9e6b69da 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_link_toolbar_item.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_link_toolbar_item.dart@@ -45,7 +45,7 @@ final customLinkItem = ToolbarItem(size: Size.square(20.0),color: (isDark && isHref)? Color(0xFF282E3A)- : theme.iconColorTheme.primary,+ : theme.iconColorScheme.primary,),onPressed: () {getIt<FloatingToolbarController>().hideToolbar();diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_text_align_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_text_align_toolbar_item.dartindex 2a1688db19..efaff532f4 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_text_align_toolbar_item.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_text_align_toolbar_item.dart@@ -97,7 +97,7 @@ class _TextAlignActionListState extends State<TextAlignActionList> {Widget buildChild(BuildContext context) {final theme = AppFlowyTheme.of(context),- iconColor = theme.iconColorTheme.primary;+ iconColor = theme.iconColorScheme.primary;final child = FlowyIconButton(width: 48,height: 32,diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_text_color_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_text_color_toolbar_item.dartindex 80f2d3138d..9f5a917b89 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_text_color_toolbar_item.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/custom_text_color_toolbar_item.dart@@ -82,7 +82,7 @@ class _TextColorPickerWidgetState extends State<TextColorPickerWidget> {Widget buildChild(BuildContext context) {final theme = AppFlowyTheme.of(context),- iconColor = theme.iconColorTheme.primary;+ iconColor = theme.iconColorScheme.primary;final child = FlowyIconButton(width: 36,height: 32,diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/text_heading_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/text_heading_toolbar_item.dartindex 8140a7b7f3..5778b6b8a4 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/text_heading_toolbar_item.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/text_heading_toolbar_item.dart@@ -79,7 +79,7 @@ class _TextHeadingActionListState extends State<TextHeadingActionList> {Widget buildChild(BuildContext context) {final theme = AppFlowyTheme.of(context),- iconColor = theme.iconColorTheme.primary;+ iconColor = theme.iconColorScheme.primary;final child = FlowyIconButton(width: 48,height: 32,diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/text_suggestions_toolbar_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/text_suggestions_toolbar_item.dartindex 3c8f55caef..48f5d3f403 100644--- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/text_suggestions_toolbar_item.dart+++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/toolbar_item/text_suggestions_toolbar_item.dart@@ -120,7 +120,7 @@ class _SuggestionsActionListState extends State<SuggestionsActionList> {Widget buildChild(BuildContext context) {final theme = AppFlowyTheme.of(context),- iconColor = theme.iconColorTheme.primary;+ iconColor = theme.iconColorScheme.primary;final child = FlowyHover(isSelected: () => isSelected,style: HoverStyle(diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/example/lib/main.dart b/frontend/appflowy_flutter/packages/appflowy_ui/example/lib/main.dartindex 1dfc60b314..c02001745d 100644--- a/frontend/appflowy_flutter/packages/appflowy_ui/example/lib/main.dart+++ b/frontend/appflowy_flutter/packages/appflowy_ui/example/lib/main.dart@@ -82,7 +82,7 @@ class _MyHomePageState extends State<MyHomePage> {actions: [IconButton(icon: Icon(- theme.brightness == Brightness.light+ Theme.of(context).brightness == Brightness.light? Icons.dark_mode: Icons.light_mode,),diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/component/textfield/textfield.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/component/textfield/textfield.dartindex 3f5ad4cfed..9e61b71709 100644--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/component/textfield/textfield.dart+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/component/textfield/textfield.dart@@ -233,7 +233,7 @@ enum AFTextFieldSize {m,l;- EdgeInsetsGeometry contentPadding(AppFlowyThemeData theme) {+ EdgeInsetsGeometry contentPadding(AppFlowyBaseThemeData theme) {return EdgeInsets.symmetric(vertical: switch (this) {AFTextFieldSize.m => theme.spacing.s,@@ -243,7 +243,7 @@ enum AFTextFieldSize {);}- BorderRadius borderRadius(AppFlowyThemeData theme) {+ BorderRadius borderRadius(AppFlowyBaseThemeData theme) {return BorderRadius.circular(switch (this) {AFTextFieldSize.m => theme.borderRadius.m,diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/appflowy_theme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/appflowy_theme.dartindex 49deecc178..8a99b737ec 100644--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/appflowy_theme.dart+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/appflowy_theme.dart@@ -1,4 +1,4 @@-import 'package:appflowy_ui/src/theme/data/data.dart';+import 'package:appflowy_ui/src/theme/definition/base_theme.dart';import 'package:flutter/widgets.dart';class AppFlowyTheme extends StatelessWidget {@@ -8,10 +8,10 @@ class AppFlowyTheme extends StatelessWidget {required this.child,});- final AppFlowyThemeData data;+ final AppFlowyBaseThemeData data;final Widget child;- static AppFlowyThemeData of(BuildContext context, {bool listen = true}) {+ static AppFlowyBaseThemeData of(BuildContext context, {bool listen = true}) {final provider = maybeOf(context, listen: listen);if (provider == null) {throw FlutterError(@@ -26,27 +26,26 @@ class AppFlowyTheme extends StatelessWidget {return provider;}- static AppFlowyThemeData? maybeOf(+ static AppFlowyBaseThemeData? maybeOf(BuildContext context, {bool listen = true,}) {if (listen) {return context.dependOnInheritedWidgetOfExactType<AppFlowyInheritedTheme>()- ?.theme- .data;+ ?.theme;}final provider = context.getElementForInheritedWidgetOfExactType<AppFlowyInheritedTheme>()?.widget;- return (provider as AppFlowyInheritedTheme?)?.theme.data;+ return (provider as AppFlowyInheritedTheme?)?.theme;}@overrideWidget build(BuildContext context) {return AppFlowyInheritedTheme(- theme: this,+ theme: data,child: child,);}@@ -59,14 +58,14 @@ class AppFlowyInheritedTheme extends InheritedTheme {required super.child,});- final AppFlowyTheme theme;+ final AppFlowyBaseThemeData theme;@overrideWidget wrap(BuildContext context, Widget child) {- return AppFlowyTheme(data: theme.data, child: child);+ return AppFlowyTheme(data: theme, child: child);}@overridebool updateShouldNotify(AppFlowyInheritedTheme oldWidget) =>- theme.data != oldWidget.theme.data;+ theme != oldWidget.theme;}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/base_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/base_scheme.dartdeleted file mode 100644index 5b843d97e2..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/base_scheme.dart+++ /dev/null@@ -1,33 +0,0 @@-import 'package:appflowy_ui/src/theme/color_scheme/base/blue.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/green.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/magenta.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/neutral.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/orange.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/purple.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/red.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/subtle.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/yellow.dart';--class AppFlowyBaseColorScheme {- const AppFlowyBaseColorScheme({- this.blue = const BlueColors(),- this.green = const GreenColors(),- this.yellow = const YellowColors(),- this.red = const RedColors(),- this.orange = const OrangeColors(),- this.magenta = const MagentaColors(),- this.purple = const PurpleColors(),- this.neutral = const NeutralColors(),- this.subtle = const SubtleColors(),- });-- final BlueColors blue;- final GreenColors green;- final YellowColors yellow;- final RedColors red;- final OrangeColors orange;- final MagentaColors magenta;- final PurpleColors purple;- final NeutralColors neutral;- final SubtleColors subtle;-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/blue.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/blue.dartdeleted file mode 100644index fb73b42f60..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/blue.dart+++ /dev/null@@ -1,27 +0,0 @@-import 'package:flutter/material.dart';--class BlueColors {- const BlueColors();-- Color get blue100 => const Color(0xFFE3F6FF);-- Color get blue200 => const Color(0xFFA9E2FF);-- Color get blue300 => const Color(0xFF80D2FF);-- Color get blue400 => const Color(0xFF4EC1FF);-- Color get blue500 => const Color(0xFF00B5FF);-- Color get blue600 => const Color(0xFF0092D6);-- Color get blue700 => const Color(0xFF0078C0);-- Color get blue800 => const Color(0xFF0065A9);-- Color get blue900 => const Color(0xFF00508F);-- Color get blue1000 => const Color(0xFF003C77);-- Color get alphaBlue50015 => const Color(0x2600B5FF);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/green.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/green.dartdeleted file mode 100644index 652f5f5932..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/green.dart+++ /dev/null@@ -1,24 +0,0 @@-import 'package:flutter/material.dart';--class GreenColors {- const GreenColors();- Color get green100 => const Color(0xFFECF9F5);-- Color get green200 => const Color(0xFFC3E5D8);-- Color get green300 => const Color(0xFF9AD1BC);-- Color get green400 => const Color(0xFF71BD9F);-- Color get green500 => const Color(0xFF48A982);-- Color get green600 => const Color(0xFF248569);-- Color get green700 => const Color(0xFF29725D);-- Color get green800 => const Color(0xFF2E6050);-- Color get green900 => const Color(0xFF305548);-- Color get green1000 => const Color(0xFF305244);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/magenta.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/magenta.dartdeleted file mode 100644index dec5617c67..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/magenta.dart+++ /dev/null@@ -1,25 +0,0 @@-import 'package:flutter/material.dart';--class MagentaColors {- const MagentaColors();-- Color get magenta100 => const Color(0xFFFFE5EF);-- Color get magenta200 => const Color(0xFFFFB8D1);-- Color get magenta300 => const Color(0xFFFF8AB2);-- Color get magenta400 => const Color(0xFFFF5C93);-- Color get magenta500 => const Color(0xFFFB006D);-- Color get magenta600 => const Color(0xFFD2005F);-- Color get magenta700 => const Color(0xFFD2005F);-- Color get magenta800 => const Color(0xFF850040);-- Color get magenta900 => const Color(0xFF610031);-- Color get magenta1000 => const Color(0xFF400022);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/neutral.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/neutral.dartdeleted file mode 100644index 4b6c08b595..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/neutral.dart+++ /dev/null@@ -1,49 +0,0 @@-import 'package:flutter/material.dart';--class NeutralColors {- const NeutralColors();-- Color get neutral100 => const Color(0xFFF8FAFF);-- Color get neutral200 => const Color(0xFFE4E8F5);-- Color get neutral300 => const Color(0xFFCED3E6);-- Color get neutral400 => const Color(0xFFB5BBD3);-- Color get neutral500 => const Color(0xFF989EB7);-- Color get neutral600 => const Color(0xFF6F748C);-- Color get neutral700 => const Color(0xFF54596E);-- Color get neutral800 => const Color(0xFF3C3F4E);-- Color get neutral900 => const Color(0xFF272930);-- Color get neutral1000 => const Color(0xFF21232A);-- Color get black => const Color(0xFF000000);-- Color get alphaBlack60 => const Color(0x99000000);-- Color get white => const Color(0xFFFFFFFF);-- Color get alphaWhite0 => const Color(0x00FFFFFF);-- Color get alphaWhite20 => const Color(0x33FFFFFF);-- Color get alphaWhite30 => const Color(0x4DFFFFFF);-- Color get alphaGrey10005 => const Color(0x0DF9FAFD);-- Color get alphaGrey10010 => const Color(0x1AF9FAFD);-- Color get alphaGrey100005 => const Color(0x0D1F2329);-- Color get alphaGrey100010 => const Color(0x1A1F2329);-- Color get alphaGrey100070 => const Color(0xB21F2329);-- Color get alphaGrey100080 => const Color(0xCC1F2329);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/orange.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/orange.dartdeleted file mode 100644index c9424bd960..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/orange.dart+++ /dev/null@@ -1,25 +0,0 @@-import 'package:flutter/material.dart';--class OrangeColors {- const OrangeColors();-- Color get orange100 => const Color(0xFFFFF3D5);-- Color get orange200 => const Color(0xFFFFE4AB);-- Color get orange300 => const Color(0xFFFFD181);-- Color get orange400 => const Color(0xFFFFBE62);-- Color get orange500 => const Color(0xFFFFA02E);-- Color get orange600 => const Color(0xFFDB7E21);-- Color get orange700 => const Color(0xFFB75F17);-- Color get orange800 => const Color(0xFF93450E);-- Color get orange900 => const Color(0xFF7A3108);-- Color get orange1000 => const Color(0xFF602706);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/purple.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/purple.dartdeleted file mode 100644index fa3b9e54cf..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/purple.dart+++ /dev/null@@ -1,25 +0,0 @@-import 'package:flutter/material.dart';--class PurpleColors {- const PurpleColors();-- Color get purple100 => const Color(0xFFF1E0FF);-- Color get purple200 => const Color(0xFFE1B3FF);-- Color get purple300 => const Color(0xFFD185FF);-- Color get purple400 => const Color(0xFFBC58FF);-- Color get purple500 => const Color(0xFF9327FF);-- Color get purple600 => const Color(0xFF7A1DCC);-- Color get purple700 => const Color(0xFF6617B3);-- Color get purple800 => const Color(0xFF55138F);-- Color get purple900 => const Color(0xFF470C72);-- Color get purple1000 => const Color(0xFF380758);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/red.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/red.dartdeleted file mode 100644index 030f2988bc..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/red.dart+++ /dev/null@@ -1,27 +0,0 @@-import 'package:flutter/material.dart';--class RedColors {- const RedColors();-- Color get red100 => const Color(0xFFFFD2DD);-- Color get red200 => const Color(0xFFFFA5B4);-- Color get red300 => const Color(0xFFFF7D87);-- Color get red400 => const Color(0xFFFF5050);-- Color get red500 => const Color(0xFFF33641);-- Color get red600 => const Color(0xFFE71D32);-- Color get red700 => const Color(0xFFAD1625);-- Color get red800 => const Color(0xFF8C101C);-- Color get red900 => const Color(0xFF6E0A1E);-- Color get red1000 => const Color(0xFF4C0A17);-- Color get alphaRed50010 => const Color(0x1AF33641);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/subtle.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/subtle.dartdeleted file mode 100644index 2fddd14f1a..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/subtle.dart+++ /dev/null@@ -1,265 +0,0 @@-import 'package:flutter/material.dart';--class SubtleColors {- const SubtleColors();-- // Rose colors- Color get rose100 => const Color(0xFFFCF2F2);-- Color get rose200 => const Color(0xFFFAE3E3);-- Color get rose300 => const Color(0xFFFAD9D9);-- Color get rose400 => const Color(0xFFEDADAD);-- Color get rose500 => const Color(0xFFCC4E4E);-- Color get rose600 => const Color(0xFF702828);-- // Papaya colors- Color get papaya100 => const Color(0xFFFCF4F0);-- Color get papaya200 => const Color(0xFFFAE8DE);-- Color get papaya300 => const Color(0xFFFADFD2);-- Color get papaya400 => const Color(0xFFF0BDA3);-- Color get papaya500 => const Color(0xFFD67240);-- Color get papaya600 => const Color(0xFF6B3215);-- // Tangerine colors- Color get tangerine100 => const Color(0xFFFFF7ED);-- Color get tangerine200 => const Color(0xFFFCEDD9);-- Color get tangerine300 => const Color(0xFFFAE5CA);-- Color get tangerine400 => const Color(0xFFF2CB99);-- Color get tangerine500 => const Color(0xFFDB8F2C);-- Color get tangerine600 => const Color(0xFF613B0A);-- // Mango colors- Color get mango100 => const Color(0xFFFFF9EC);-- Color get mango200 => const Color(0xFFFCF1D7);-- Color get mango300 => const Color(0xFFFAE9C3);-- Color get mango400 => const Color(0xFFF5D68E);-- Color get mango500 => const Color(0xFFE0A416);-- Color get mango600 => const Color(0xFF5C4102);-- // Lemon colors- Color get lemon100 => const Color(0xFFFFFBE8);-- Color get lemon200 => const Color(0xFFFCF5CF);-- Color get lemon300 => const Color(0xFFFAEFB9);-- Color get lemon400 => const Color(0xFFF5E282);-- Color get lemon500 => const Color(0xFFE0BB00);-- Color get lemon600 => const Color(0xFF574800);-- // Olive colors- Color get olive100 => const Color(0xFFF9FAE6);-- Color get olive200 => const Color(0xFFF6F7D0);-- Color get olive300 => const Color(0xFFF0F2B3);-- Color get olive400 => const Color(0xFFDBDE83);-- Color get olive500 => const Color(0xFFADB204);-- Color get olive600 => const Color(0xFF4A4C03);-- // Lime colors- Color get lime100 => const Color(0xFFF6F9E6);-- Color get lime200 => const Color(0xFFEEF5CE);-- Color get lime300 => const Color(0xFFE7F0BB);-- Color get lime400 => const Color(0xFFCFDB91);-- Color get lime500 => const Color(0xFF92A822);-- Color get lime600 => const Color(0xFF414D05);-- // Grass colors- Color get grass100 => const Color(0xFFF4FAEB);-- Color get grass200 => const Color(0xFFE9F5D7);-- Color get grass300 => const Color(0xFFDEF0C5);-- Color get grass400 => const Color(0xFFBFD998);-- Color get grass500 => const Color(0xFF75A828);-- Color get grass600 => const Color(0xFF334D0C);-- // Forest colors- Color get forest100 => const Color(0xFFF1FAF0);-- Color get forest200 => const Color(0xFFE2F5DF);-- Color get forest300 => const Color(0xFFD7F0D3);-- Color get forest400 => const Color(0xFFA8D6A1);-- Color get forest500 => const Color(0xFF49A33B);-- Color get forest600 => const Color(0xFF1E4F16);-- // Jade colors- Color get jade100 => const Color(0xFFF0FAF6);-- Color get jade200 => const Color(0xFFDFF5EB);-- Color get jade300 => const Color(0xFFCEF0E1);-- Color get jade400 => const Color(0xFF90D1B5);-- Color get jade500 => const Color(0xFF1C9963);-- Color get jade600 => const Color(0xFF075231);-- // Aqua colors- Color get aqua100 => const Color(0xFFF0F9FA);-- Color get aqua200 => const Color(0xFFDFF3F5);-- Color get aqua300 => const Color(0xFFCCECF0);-- Color get aqua400 => const Color(0xFF83CCD4);-- Color get aqua500 => const Color(0xFF008E9E);-- Color get aqua600 => const Color(0xFF004E57);-- // Azure colors- Color get azure100 => const Color(0xFFF0F6FA);-- Color get azure200 => const Color(0xFFE1EEF7);-- Color get azure300 => const Color(0xFFD3E6F5);-- Color get azure400 => const Color(0xFF88C0EB);-- Color get azure500 => const Color(0xFF0877CC);-- Color get azure600 => const Color(0xFF154469);-- // Denim colors- Color get denim100 => const Color(0xFFF0F3FA);-- Color get denim200 => const Color(0xFFE3EBFA);-- Color get denim300 => const Color(0xFFD7E2F7);-- Color get denim400 => const Color(0xFF9AB6ED);-- Color get denim500 => const Color(0xFF3267D1);-- Color get denim600 => const Color(0xFF223C70);-- // Mauve colors- Color get mauve100 => const Color(0xFFF2F2FC);-- Color get mauve200 => const Color(0xFFE6E6FA);-- Color get mauve300 => const Color(0xFFDCDCF7);-- Color get mauve400 => const Color(0xFFAEAEF5);-- Color get mauve500 => const Color(0xFF5555E0);-- Color get mauve600 => const Color(0xFF36366B);-- // Lavender colors- Color get lavender100 => const Color(0xFFF6F3FC);-- Color get lavender200 => const Color(0xFFEBE3FA);-- Color get lavender300 => const Color(0xFFE4DAF7);-- Color get lavender400 => const Color(0xFFC1AAF0);-- Color get lavender500 => const Color(0xFF8153DB);-- Color get lavender600 => const Color(0xFF462F75);-- // Lilac colors- Color get lilac100 => const Color(0xFFF7F0FA);-- Color get lilac200 => const Color(0xFFF0E1F7);-- Color get lilac300 => const Color(0xFFEDD7F7);-- Color get lilac400 => const Color(0xFFD3A9E8);-- Color get lilac500 => const Color(0xFF9E4CC7);-- Color get lilac600 => const Color(0xFF562D6B);-- // Mallow colors- Color get mallow100 => const Color(0xFFFAF0FA);-- Color get mallow200 => const Color(0xFFF5E1F4);-- Color get mallow300 => const Color(0xFFF5D7F4);-- Color get mallow400 => const Color(0xFFDEA4DC);-- Color get mallow500 => const Color(0xFFB240AF);-- Color get mallow600 => const Color(0xFF632861);-- // Camellia colors- Color get camellia100 => const Color(0xFFF9EFF3);-- Color get camellia200 => const Color(0xFFF7E1EB);-- Color get camellia300 => const Color(0xFFF7D7E5);-- Color get camellia400 => const Color(0xFFE5A3C0);-- Color get camellia500 => const Color(0xFFC24279);-- Color get camellia600 => const Color(0xFF6E2343);-- // Smoke colors- Color get smoke100 => const Color(0xFFF5F5F5);-- Color get smoke200 => const Color(0xFFE8E8E8);-- Color get smoke300 => const Color(0xFFDEDEDE);-- Color get smoke400 => const Color(0xFFB8B8B8);-- Color get smoke500 => const Color(0xFF6E6E6E);-- Color get smoke600 => const Color(0xFF404040);-- // Iron colors- Color get iron100 => const Color(0xFFF2F4F7);-- Color get iron200 => const Color(0xFFE6E9F0);-- Color get iron300 => const Color(0xFFDADEE5);-- Color get iron400 => const Color(0xFFB0B5BF);-- Color get iron500 => const Color(0xFF666F80);-- Color get iron600 => const Color(0xFF394152);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/yellow.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/yellow.dartdeleted file mode 100644index a38cf2bd78..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/base/yellow.dart+++ /dev/null@@ -1,24 +0,0 @@-import 'package:flutter/material.dart';--class YellowColors {- const YellowColors();- Color get yellow100 => const Color(0xFFFFF9B2);-- Color get yellow200 => const Color(0xFFFFEC66);-- Color get yellow300 => const Color(0xFFFFDF1A);-- Color get yellow400 => const Color(0xFFFFCC00);-- Color get yellow500 => const Color(0xFFFFCE00);-- Color get yellow600 => const Color(0xFFE6B800);-- Color get yellow700 => const Color(0xFFCC9F00);-- Color get yellow800 => const Color(0xFFB38A00);-- Color get yellow900 => const Color(0xFF9A7500);-- Color get yellow1000 => const Color(0xFF7F6200);-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/border/border.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/border/border.dartdeleted file mode 100644index d1618b6cff..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/border/border.dart+++ /dev/null@@ -1,49 +0,0 @@-import 'package:flutter/material.dart';--class AppFlowyBorderColorScheme {- const AppFlowyBorderColorScheme({- required this.greyPrimary,- required this.greyPrimaryHover,- required this.greySecondary,- required this.greySecondaryHover,- required this.greyTertiary,- required this.greyTertiaryHover,- required this.greyQuaternary,- required this.greyQuaternaryHover,- required this.transparent,- required this.themeThick,- required this.themeThickHover,- required this.infoThick,- required this.infoThickHover,- required this.successThick,- required this.successThickHover,- required this.warningThick,- required this.warningThickHover,- required this.errorThick,- required this.errorThickHover,- required this.purpleThick,- required this.purpleThickHover,- });-- final Color greyPrimary;- final Color greyPrimaryHover;- final Color greySecondary;- final Color greySecondaryHover;- final Color greyTertiary;- final Color greyTertiaryHover;- final Color greyQuaternary;- final Color greyQuaternaryHover;- final Color transparent;- final Color themeThick;- final Color themeThickHover;- final Color infoThick;- final Color infoThickHover;- final Color successThick;- final Color successThickHover;- final Color warningThick;- final Color warningThickHover;- final Color errorThick;- final Color errorThickHover;- final Color purpleThick;- final Color purpleThickHover;-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/color_scheme.dartdeleted file mode 100644index 5a1e7debeb..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/color_scheme.dart+++ /dev/null@@ -1,8 +0,0 @@-export 'background/background_color_scheme.dart';-export 'base/base_scheme.dart';-export 'border/border_color_scheme.dart';-export 'brand/brand_color_scheme.dart';-export 'fill/fill_color_scheme.dart';-export 'icon/icon_color_theme.dart';-export 'surface/surface_color_scheme.dart';-export 'text/text_color_scheme.dart';diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/appflowy_default/primitive.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/appflowy_default/primitive.dartnew file mode 100644index 0000000000..1eee06953f--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/appflowy_default/primitive.dart@@ -0,0 +1,298 @@+// ignore_for_file: constant_identifier_names, non_constant_identifier_names+//+// AUTO-GENERATED - DO NOT EDIT DIRECTLY+//+// This file is auto-generated by the generate_theme.dart script+// Generation time: 2025-04-15T23:05:39.278903+//+// To modify these colors, edit the source JSON files and run the script:+//+// dart run script/generate_theme.dart+//+import 'package:flutter/material.dart';++class AppFlowyPrimitiveTokens {+ AppFlowyPrimitiveTokens._();++ /// #f8faff+ static Color get neutral100 => Color(0xFFF8FAFF);++ /// #e4e8f5+ static Color get neutral200 => Color(0xFFE4E8F5);++ /// #ced3e6+ static Color get neutral300 => Color(0xFFCED3E6);++ /// #b5bbd3+ static Color get neutral400 => Color(0xFFB5BBD3);++ /// #989eb7+ static Color get neutral500 => Color(0xFF989EB7);++ /// #6f748c+ static Color get neutral600 => Color(0xFF6F748C);++ /// #54596e+ static Color get neutral700 => Color(0xFF54596E);++ /// #3c3f4e+ static Color get neutral800 => Color(0xFF3C3F4E);++ /// #272930+ static Color get neutral900 => Color(0xFF272930);++ /// #21232a+ static Color get neutral1000 => Color(0xFF21232A);++ /// #000000+ static Color get neutralBlack => Color(0xFF000000);++ /// #00000099+ static Color get neutralAlphaBlack60 => Color(0x99000000);++ /// #ffffff+ static Color get neutralWhite => Color(0xFFFFFFFF);++ /// #ffffff00+ static Color get neutralAlphaWhite0 => Color(0x00FFFFFF);++ /// #ffffff33+ static Color get neutralAlphaWhite20 => Color(0x33FFFFFF);++ /// #ffffff4d+ static Color get neutralAlphaWhite30 => Color(0x4DFFFFFF);++ /// #f9fafd0d+ static Color get neutralAlphaGrey10005 => Color(0x0DF9FAFD);++ /// #f9fafd1a+ static Color get neutralAlphaGrey10010 => Color(0x1AF9FAFD);++ /// #1f23290d+ static Color get neutralAlphaGrey100005 => Color(0x0D1F2329);++ /// #1f23291a+ static Color get neutralAlphaGrey100010 => Color(0x1A1F2329);++ /// #1f2329b2+ static Color get neutralAlphaGrey100070 => Color(0xB21F2329);++ /// #1f2329cc+ static Color get neutralAlphaGrey100080 => Color(0xCC1F2329);++ /// #e3f6ff+ static Color get blue100 => Color(0xFFE3F6FF);++ /// #a9e2ff+ static Color get blue200 => Color(0xFFA9E2FF);++ /// #80d2ff+ static Color get blue300 => Color(0xFF80D2FF);++ /// #4ec1ff+ static Color get blue400 => Color(0xFF4EC1FF);++ /// #00b5ff+ static Color get blue500 => Color(0xFF00B5FF);++ /// #0092d6+ static Color get blue600 => Color(0xFF0092D6);++ /// #0078c0+ static Color get blue700 => Color(0xFF0078C0);++ /// #0065a9+ static Color get blue800 => Color(0xFF0065A9);++ /// #00508f+ static Color get blue900 => Color(0xFF00508F);++ /// #003c77+ static Color get blue1000 => Color(0xFF003C77);++ /// #00b5ff26+ static Color get blueAlphaBlue50015 => Color(0x2600B5FF);++ /// #ecf9f5+ static Color get green100 => Color(0xFFECF9F5);++ /// #c3e5d8+ static Color get green200 => Color(0xFFC3E5D8);++ /// #9ad1bc+ static Color get green300 => Color(0xFF9AD1BC);++ /// #71bd9f+ static Color get green400 => Color(0xFF71BD9F);++ /// #48a982+ static Color get green500 => Color(0xFF48A982);++ /// #248569+ static Color get green600 => Color(0xFF248569);++ /// #29725d+ static Color get green700 => Color(0xFF29725D);++ /// #2e6050+ static Color get green800 => Color(0xFF2E6050);++ /// #305548+ static Color get green900 => Color(0xFF305548);++ /// #305244+ static Color get green1000 => Color(0xFF305244);++ /// #f1e0ff+ static Color get purple100 => Color(0xFFF1E0FF);++ /// #e1b3ff+ static Color get purple200 => Color(0xFFE1B3FF);++ /// #d185ff+ static Color get purple300 => Color(0xFFD185FF);++ /// #bc58ff+ static Color get purple400 => Color(0xFFBC58FF);++ /// #9327ff+ static Color get purple500 => Color(0xFF9327FF);++ /// #7a1dcc+ static Color get purple600 => Color(0xFF7A1DCC);++ /// #6617b3+ static Color get purple700 => Color(0xFF6617B3);++ /// #55138f+ static Color get purple800 => Color(0xFF55138F);++ /// #470c72+ static Color get purple900 => Color(0xFF470C72);++ /// #380758+ static Color get purple1000 => Color(0xFF380758);++ /// #ffe5ef+ static Color get magenta100 => Color(0xFFFFE5EF);++ /// #ffb8d1+ static Color get magenta200 => Color(0xFFFFB8D1);++ /// #ff8ab2+ static Color get magenta300 => Color(0xFFFF8AB2);++ /// #ff5c93+ static Color get magenta400 => Color(0xFFFF5C93);++ /// #fb006d+ static Color get magenta500 => Color(0xFFFB006D);++ /// #d2005f+ static Color get magenta600 => Color(0xFFD2005F);++ /// #d2005f+ static Color get magenta700 => Color(0xFFD2005F);++ /// #850040+ static Color get magenta800 => Color(0xFF850040);++ /// #610031+ static Color get magenta900 => Color(0xFF610031);++ /// #400022+ static Color get magenta1000 => Color(0xFF400022);++ /// #ffd2dd+ static Color get red100 => Color(0xFFFFD2DD);++ /// #ffa5b4+ static Color get red200 => Color(0xFFFFA5B4);++ /// #ff7d87+ static Color get red300 => Color(0xFFFF7D87);++ /// #ff5050+ static Color get red400 => Color(0xFFFF5050);++ /// #f33641+ static Color get red500 => Color(0xFFF33641);++ /// #e71d32+ static Color get red600 => Color(0xFFE71D32);++ /// #ad1625+ static Color get red700 => Color(0xFFAD1625);++ /// #8c101c+ static Color get red800 => Color(0xFF8C101C);++ /// #6e0a1e+ static Color get red900 => Color(0xFF6E0A1E);++ /// #4c0a17+ static Color get red1000 => Color(0xFF4C0A17);++ /// #f336411a+ static Color get redAlphaRed50010 => Color(0x1AF33641);++ /// #fff3d5+ static Color get orange100 => Color(0xFFFFF3D5);++ /// #ffe4ab+ static Color get orange200 => Color(0xFFFFE4AB);++ /// #ffd181+ static Color get orange300 => Color(0xFFFFD181);++ /// #ffbe62+ static Color get orange400 => Color(0xFFFFBE62);++ /// #ffa02e+ static Color get orange500 => Color(0xFFFFA02E);++ /// #db7e21+ static Color get orange600 => Color(0xFFDB7E21);++ /// #b75f17+ static Color get orange700 => Color(0xFFB75F17);++ /// #93450e+ static Color get orange800 => Color(0xFF93450E);++ /// #7a3108+ static Color get orange900 => Color(0xFF7A3108);++ /// #602706+ static Color get orange1000 => Color(0xFF602706);++ /// #fff9b2+ static Color get yellow100 => Color(0xFFFFF9B2);++ /// #ffec66+ static Color get yellow200 => Color(0xFFFFEC66);++ /// #ffdf1a+ static Color get yellow300 => Color(0xFFFFDF1A);++ /// #ffcc00+ static Color get yellow400 => Color(0xFFFFCC00);++ /// #ffce00+ static Color get yellow500 => Color(0xFFFFCE00);++ /// #e6b800+ static Color get yellow600 => Color(0xFFE6B800);++ /// #cc9f00+ static Color get yellow700 => Color(0xFFCC9F00);++ /// #b38a00+ static Color get yellow800 => Color(0xFFB38A00);++ /// #9a7500+ static Color get yellow900 => Color(0xFF9A7500);++ /// #7f6200+ static Color get yellow1000 => Color(0xFF7F6200);+}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/appflowy_default/semantic.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/appflowy_default/semantic.dartnew file mode 100644index 0000000000..08206a6572--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/appflowy_default/semantic.dart@@ -0,0 +1,377 @@+// ignore_for_file: constant_identifier_names, non_constant_identifier_names+//+// AUTO-GENERATED - DO NOT EDIT DIRECTLY+//+// This file is auto-generated by the generate_theme.dart script+// Generation time: 2025-04-15T23:05:39.288085+//+// To modify these colors, edit the source JSON files and run the script:+//+// dart run script/generate_theme.dart+//+import 'package:appflowy_ui/appflowy_ui.dart';+import 'package:flutter/material.dart';++import '../builder.dart';+import 'primitive.dart';++class AppFlowyThemeData implements AppFlowyBaseThemeData {+ const AppFlowyThemeData._({+ required this.textStyle,+ required this.textColorScheme,+ required this.borderColorScheme,+ required this.fillColorScheme,+ required this.surfaceColorScheme,+ required this.borderRadius,+ required this.spacing,+ required this.shadow,+ required this.brandColorScheme,+ required this.iconColorScheme,+ required this.backgroundColorScheme,+ required this.otherColorsColorScheme,+ });++ factory AppFlowyThemeData.light() {+ final textStyle = AppFlowyBaseTextStyle();+ final borderRadius = themeBuilder.buildBorderRadius();+ final spacing = themeBuilder.buildSpacing();+ final shadow = themeBuilder.buildShadow(Brightness.light);++ final textColorScheme = AppFlowyTextColorScheme(+ primary: AppFlowyPrimitiveTokens.neutral1000,+ secondary: AppFlowyPrimitiveTokens.neutral600,+ tertiary: AppFlowyPrimitiveTokens.neutral400,+ quaternary: AppFlowyPrimitiveTokens.neutral200,+ inverse: AppFlowyPrimitiveTokens.neutralWhite,+ onFill: AppFlowyPrimitiveTokens.neutralWhite,+ theme: AppFlowyPrimitiveTokens.blue500,+ themeHover: AppFlowyPrimitiveTokens.blue600,+ action: AppFlowyPrimitiveTokens.blue500,+ actionHover: AppFlowyPrimitiveTokens.blue600,+ info: AppFlowyPrimitiveTokens.blue500,+ infoHover: AppFlowyPrimitiveTokens.blue600,+ success: AppFlowyPrimitiveTokens.green600,+ successHover: AppFlowyPrimitiveTokens.green700,+ warning: AppFlowyPrimitiveTokens.orange600,+ warningHover: AppFlowyPrimitiveTokens.orange700,+ error: AppFlowyPrimitiveTokens.red600,+ errorHover: AppFlowyPrimitiveTokens.red700,+ purple: AppFlowyPrimitiveTokens.purple500,+ purpleHover: AppFlowyPrimitiveTokens.purple600,+ );++ final iconColorScheme = AppFlowyIconColorScheme(+ primary: AppFlowyPrimitiveTokens.neutral1000,+ secondary: AppFlowyPrimitiveTokens.neutral600,+ tertiary: AppFlowyPrimitiveTokens.neutral400,+ quaternary: AppFlowyPrimitiveTokens.neutral200,+ white: AppFlowyPrimitiveTokens.neutralWhite,+ purpleThick: AppFlowyPrimitiveTokens.purple500,+ purpleThickHover: AppFlowyPrimitiveTokens.purple600,+ );++ final borderColorScheme = AppFlowyBorderColorScheme(+ greyPrimary: AppFlowyPrimitiveTokens.neutral1000,+ greyPrimaryHover: AppFlowyPrimitiveTokens.neutral900,+ greySecondary: AppFlowyPrimitiveTokens.neutral800,+ greySecondaryHover: AppFlowyPrimitiveTokens.neutral700,+ greyTertiary: AppFlowyPrimitiveTokens.neutral300,+ greyTertiaryHover: AppFlowyPrimitiveTokens.neutral400,+ greyQuaternary: AppFlowyPrimitiveTokens.neutral100,+ greyQuaternaryHover: AppFlowyPrimitiveTokens.neutral200,+ transparent: AppFlowyPrimitiveTokens.neutralAlphaWhite0,+ themeThick: AppFlowyPrimitiveTokens.blue500,+ themeThickHover: AppFlowyPrimitiveTokens.blue600,+ infoThick: AppFlowyPrimitiveTokens.blue500,+ infoThickHover: AppFlowyPrimitiveTokens.blue600,+ successThick: AppFlowyPrimitiveTokens.green600,+ successThickHover: AppFlowyPrimitiveTokens.green700,+ warningThick: AppFlowyPrimitiveTokens.orange600,+ warningThickHover: AppFlowyPrimitiveTokens.orange700,+ errorThick: AppFlowyPrimitiveTokens.red600,+ errorThickHover: AppFlowyPrimitiveTokens.red700,+ purpleThick: AppFlowyPrimitiveTokens.purple500,+ purpleThickHover: AppFlowyPrimitiveTokens.purple600,+ );++ final fillColorScheme = AppFlowyFillColorScheme(+ primary: AppFlowyPrimitiveTokens.neutral1000,+ primaryHover: AppFlowyPrimitiveTokens.neutral900,+ secondary: AppFlowyPrimitiveTokens.neutral600,+ secondaryHover: AppFlowyPrimitiveTokens.neutral500,+ tertiary: AppFlowyPrimitiveTokens.neutral300,+ tertiaryHover: AppFlowyPrimitiveTokens.neutral400,+ quaternary: AppFlowyPrimitiveTokens.neutral100,+ quaternaryHover: AppFlowyPrimitiveTokens.neutral200,+ transparent: AppFlowyPrimitiveTokens.neutralAlphaWhite0,+ primaryAlpha5: AppFlowyPrimitiveTokens.neutralAlphaGrey100005,+ primaryAlpha5Hover: AppFlowyPrimitiveTokens.neutralAlphaGrey100010,+ primaryAlpha80: AppFlowyPrimitiveTokens.neutralAlphaGrey100080,+ primaryAlpha80Hover: AppFlowyPrimitiveTokens.neutralAlphaGrey100070,+ white: AppFlowyPrimitiveTokens.neutralWhite,+ whiteAlpha: AppFlowyPrimitiveTokens.neutralAlphaWhite20,+ whiteAlphaHover: AppFlowyPrimitiveTokens.neutralAlphaWhite30,+ black: AppFlowyPrimitiveTokens.neutralBlack,+ themeLight: AppFlowyPrimitiveTokens.blue100,+ themeLightHover: AppFlowyPrimitiveTokens.blue200,+ themeThick: AppFlowyPrimitiveTokens.blue500,+ themeThickHover: AppFlowyPrimitiveTokens.blue600,+ themeSelect: AppFlowyPrimitiveTokens.blueAlphaBlue50015,+ infoLight: AppFlowyPrimitiveTokens.blue100,+ infoLightHover: AppFlowyPrimitiveTokens.blue200,+ infoThick: AppFlowyPrimitiveTokens.blue500,+ infoThickHover: AppFlowyPrimitiveTokens.blue600,+ successLight: AppFlowyPrimitiveTokens.green100,+ successLightHover: AppFlowyPrimitiveTokens.green200,+ successThick: AppFlowyPrimitiveTokens.green600,+ successThickHover: AppFlowyPrimitiveTokens.green700,+ warningLight: AppFlowyPrimitiveTokens.orange100,+ warningLightHover: AppFlowyPrimitiveTokens.orange200,+ warningThick: AppFlowyPrimitiveTokens.orange600,+ warningThickHover: AppFlowyPrimitiveTokens.orange700,+ errorLight: AppFlowyPrimitiveTokens.red100,+ errorLightHover: AppFlowyPrimitiveTokens.red200,+ errorThick: AppFlowyPrimitiveTokens.red600,+ errorThickHover: AppFlowyPrimitiveTokens.red700,+ errorSelect: AppFlowyPrimitiveTokens.redAlphaRed50010,+ purpleLight: AppFlowyPrimitiveTokens.purple100,+ purpleLightHover: AppFlowyPrimitiveTokens.purple200,+ purpleThickHover: AppFlowyPrimitiveTokens.purple600,+ purpleThick: AppFlowyPrimitiveTokens.purple500,+ );++ final surfaceColorScheme = AppFlowySurfaceColorScheme(+ primary: AppFlowyPrimitiveTokens.neutralWhite,+ overlay: AppFlowyPrimitiveTokens.neutralAlphaBlack60,+ );++ final backgroundColorScheme = AppFlowyBackgroundColorScheme(+ primary: AppFlowyPrimitiveTokens.neutralWhite,+ secondary: AppFlowyPrimitiveTokens.neutral100,+ tertiary: AppFlowyPrimitiveTokens.neutral200,+ quaternary: AppFlowyPrimitiveTokens.neutral300,+ );++ final brandColorScheme = AppFlowyBrandColorScheme(+ skyline: Color(0xFF00B5FF),+ aqua: Color(0xFF00C8FF),+ violet: Color(0xFF9327FF),+ amethyst: Color(0xFF8427E0),+ berry: Color(0xFFE3006D),+ coral: Color(0xFFFB006D),+ golden: Color(0xFFF7931E),+ amber: Color(0xFFFFBD00),+ lemon: Color(0xFFFFCE00),+ );++ final otherColorsColorScheme = AppFlowyOtherColorsColorScheme(+ textHighlight: AppFlowyPrimitiveTokens.blue200,+ );++ return AppFlowyThemeData._(+ textStyle: textStyle,+ textColorScheme: textColorScheme,+ borderColorScheme: borderColorScheme,+ fillColorScheme: fillColorScheme,+ surfaceColorScheme: surfaceColorScheme,+ backgroundColorScheme: backgroundColorScheme,+ iconColorScheme: iconColorScheme,+ brandColorScheme: brandColorScheme,+ otherColorsColorScheme: otherColorsColorScheme,+ borderRadius: borderRadius,+ spacing: spacing,+ shadow: shadow,+ );+ }++ factory AppFlowyThemeData.dark() {+ final textStyle = AppFlowyBaseTextStyle();+ final borderRadius = themeBuilder.buildBorderRadius();+ final spacing = themeBuilder.buildSpacing();+ final shadow = themeBuilder.buildShadow(Brightness.dark);++ final textColorScheme = AppFlowyTextColorScheme(+ primary: AppFlowyPrimitiveTokens.neutral200,+ secondary: AppFlowyPrimitiveTokens.neutral400,+ tertiary: AppFlowyPrimitiveTokens.neutral600,+ quaternary: AppFlowyPrimitiveTokens.neutral1000,+ inverse: AppFlowyPrimitiveTokens.neutral1000,+ onFill: AppFlowyPrimitiveTokens.neutralWhite,+ theme: AppFlowyPrimitiveTokens.blue500,+ themeHover: AppFlowyPrimitiveTokens.blue600,+ action: AppFlowyPrimitiveTokens.blue500,+ actionHover: AppFlowyPrimitiveTokens.blue600,+ info: AppFlowyPrimitiveTokens.blue500,+ infoHover: AppFlowyPrimitiveTokens.blue600,+ success: AppFlowyPrimitiveTokens.green600,+ successHover: AppFlowyPrimitiveTokens.green700,+ warning: AppFlowyPrimitiveTokens.orange600,+ warningHover: AppFlowyPrimitiveTokens.orange700,+ error: AppFlowyPrimitiveTokens.red500,+ errorHover: AppFlowyPrimitiveTokens.red400,+ purple: AppFlowyPrimitiveTokens.purple500,+ purpleHover: AppFlowyPrimitiveTokens.purple600,+ );++ final iconColorScheme = AppFlowyIconColorScheme(+ primary: AppFlowyPrimitiveTokens.neutral200,+ secondary: AppFlowyPrimitiveTokens.neutral400,+ tertiary: AppFlowyPrimitiveTokens.neutral600,+ quaternary: AppFlowyPrimitiveTokens.neutral1000,+ white: AppFlowyPrimitiveTokens.neutralWhite,+ purpleThick: Color(0xFFFFFFFF),+ purpleThickHover: Color(0xFFFFFFFF),+ );++ final borderColorScheme = AppFlowyBorderColorScheme(+ greyPrimary: AppFlowyPrimitiveTokens.neutral100,+ greyPrimaryHover: AppFlowyPrimitiveTokens.neutral200,+ greySecondary: AppFlowyPrimitiveTokens.neutral300,+ greySecondaryHover: AppFlowyPrimitiveTokens.neutral400,+ greyTertiary: AppFlowyPrimitiveTokens.neutral800,+ greyTertiaryHover: AppFlowyPrimitiveTokens.neutral700,+ greyQuaternary: AppFlowyPrimitiveTokens.neutral1000,+ greyQuaternaryHover: AppFlowyPrimitiveTokens.neutral900,+ transparent: AppFlowyPrimitiveTokens.neutralAlphaWhite0,+ themeThick: AppFlowyPrimitiveTokens.blue500,+ themeThickHover: AppFlowyPrimitiveTokens.blue600,+ infoThick: AppFlowyPrimitiveTokens.blue500,+ infoThickHover: AppFlowyPrimitiveTokens.blue600,+ successThick: AppFlowyPrimitiveTokens.green600,+ successThickHover: AppFlowyPrimitiveTokens.green700,+ warningThick: AppFlowyPrimitiveTokens.orange600,+ warningThickHover: AppFlowyPrimitiveTokens.orange700,+ errorThick: AppFlowyPrimitiveTokens.red500,+ errorThickHover: AppFlowyPrimitiveTokens.red400,+ purpleThick: AppFlowyPrimitiveTokens.purple500,+ purpleThickHover: AppFlowyPrimitiveTokens.purple600,+ );++ final fillColorScheme = AppFlowyFillColorScheme(+ primary: AppFlowyPrimitiveTokens.neutral100,+ primaryHover: AppFlowyPrimitiveTokens.neutral200,+ secondary: AppFlowyPrimitiveTokens.neutral300,+ secondaryHover: AppFlowyPrimitiveTokens.neutral400,+ tertiary: AppFlowyPrimitiveTokens.neutral600,+ tertiaryHover: AppFlowyPrimitiveTokens.neutral500,+ quaternary: AppFlowyPrimitiveTokens.neutral1000,+ quaternaryHover: AppFlowyPrimitiveTokens.neutral900,+ transparent: AppFlowyPrimitiveTokens.neutralAlphaWhite0,+ primaryAlpha5: AppFlowyPrimitiveTokens.neutralAlphaGrey10005,+ primaryAlpha5Hover: AppFlowyPrimitiveTokens.neutralAlphaGrey10010,+ primaryAlpha80: AppFlowyPrimitiveTokens.neutralAlphaGrey100080,+ primaryAlpha80Hover: AppFlowyPrimitiveTokens.neutralAlphaGrey100070,+ white: AppFlowyPrimitiveTokens.neutralWhite,+ whiteAlpha: AppFlowyPrimitiveTokens.neutralAlphaWhite20,+ whiteAlphaHover: AppFlowyPrimitiveTokens.neutralAlphaWhite30,+ black: AppFlowyPrimitiveTokens.neutralBlack,+ themeLight: AppFlowyPrimitiveTokens.blue100,+ themeLightHover: AppFlowyPrimitiveTokens.blue200,+ themeThick: AppFlowyPrimitiveTokens.blue500,+ themeThickHover: AppFlowyPrimitiveTokens.blue400,+ themeSelect: AppFlowyPrimitiveTokens.blueAlphaBlue50015,+ infoLight: AppFlowyPrimitiveTokens.blue100,+ infoLightHover: AppFlowyPrimitiveTokens.blue200,+ infoThick: AppFlowyPrimitiveTokens.blue500,+ infoThickHover: AppFlowyPrimitiveTokens.blue600,+ successLight: AppFlowyPrimitiveTokens.green100,+ successLightHover: AppFlowyPrimitiveTokens.green200,+ successThick: AppFlowyPrimitiveTokens.green600,+ successThickHover: AppFlowyPrimitiveTokens.green700,+ warningLight: AppFlowyPrimitiveTokens.orange100,+ warningLightHover: AppFlowyPrimitiveTokens.orange200,+ warningThick: AppFlowyPrimitiveTokens.orange600,+ warningThickHover: AppFlowyPrimitiveTokens.orange700,+ errorLight: AppFlowyPrimitiveTokens.red100,+ errorLightHover: AppFlowyPrimitiveTokens.red200,+ errorThick: AppFlowyPrimitiveTokens.red600,+ errorThickHover: AppFlowyPrimitiveTokens.red500,+ errorSelect: AppFlowyPrimitiveTokens.redAlphaRed50010,+ purpleLight: AppFlowyPrimitiveTokens.purple100,+ purpleLightHover: AppFlowyPrimitiveTokens.purple200,+ purpleThickHover: AppFlowyPrimitiveTokens.purple600,+ purpleThick: AppFlowyPrimitiveTokens.purple500,+ );++ final surfaceColorScheme = AppFlowySurfaceColorScheme(+ primary: AppFlowyPrimitiveTokens.neutral900,+ overlay: AppFlowyPrimitiveTokens.neutralAlphaBlack60,+ );++ final backgroundColorScheme = AppFlowyBackgroundColorScheme(+ primary: AppFlowyPrimitiveTokens.neutral1000,+ secondary: AppFlowyPrimitiveTokens.neutral900,+ tertiary: AppFlowyPrimitiveTokens.neutral800,+ quaternary: AppFlowyPrimitiveTokens.neutral700,+ );++ final brandColorScheme = AppFlowyBrandColorScheme(+ skyline: Color(0xFF00B5FF),+ aqua: Color(0xFF00C8FF),+ violet: Color(0xFF9327FF),+ amethyst: Color(0xFF8427E0),+ berry: Color(0xFFE3006D),+ coral: Color(0xFFFB006D),+ golden: Color(0xFFF7931E),+ amber: Color(0xFFFFBD00),+ lemon: Color(0xFFFFCE00),+ );++ final otherColorsColorScheme = AppFlowyOtherColorsColorScheme(+ textHighlight: AppFlowyPrimitiveTokens.blue200,+ );++ return AppFlowyThemeData._(+ textStyle: textStyle,+ textColorScheme: textColorScheme,+ borderColorScheme: borderColorScheme,+ fillColorScheme: fillColorScheme,+ surfaceColorScheme: surfaceColorScheme,+ backgroundColorScheme: backgroundColorScheme,+ iconColorScheme: iconColorScheme,+ brandColorScheme: brandColorScheme,+ otherColorsColorScheme: otherColorsColorScheme,+ borderRadius: borderRadius,+ spacing: spacing,+ shadow: shadow,+ );+ }++ static const AppFlowyThemeBuilder themeBuilder = AppFlowyThemeBuilder();++ @override+ final AppFlowyBaseTextStyle textStyle;++ @override+ final AppFlowyTextColorScheme textColorScheme;++ @override+ final AppFlowyBorderColorScheme borderColorScheme;++ @override+ final AppFlowyFillColorScheme fillColorScheme;++ @override+ final AppFlowySurfaceColorScheme surfaceColorScheme;++ @override+ final AppFlowyBorderRadius borderRadius;++ @override+ final AppFlowySpacing spacing;++ @override+ final AppFlowyShadow shadow;++ @override+ final AppFlowyBrandColorScheme brandColorScheme;++ @override+ final AppFlowyIconColorScheme iconColorScheme;++ @override+ final AppFlowyBackgroundColorScheme backgroundColorScheme;++ @override+ final AppFlowyOtherColorsColorScheme otherColorsColorScheme;+}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/builder.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/builder.dartindex 06c6eb5d8e..a4f83109cb 100644--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/builder.dart+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/builder.dart@@ -1,305 +1,30 @@-import 'package:appflowy_ui/src/theme/border_radius/border_radius.dart';-import 'package:appflowy_ui/src/theme/color_scheme/background/background_color_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/base_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/border/border.dart';-import 'package:appflowy_ui/src/theme/color_scheme/brand/brand_color_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/fill/fill_color_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/icon/icon_color_theme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/surface/surface_color_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/text/text_color_scheme.dart';-import 'package:appflowy_ui/src/theme/dimensions.dart';-import 'package:appflowy_ui/src/theme/shadow/shadow.dart';-import 'package:appflowy_ui/src/theme/spacing/spacing.dart';+import 'package:appflowy_ui/src/theme/definition/border_radius/border_radius.dart';+import 'package:appflowy_ui/src/theme/definition/shadow/shadow.dart';+import 'package:appflowy_ui/src/theme/definition/spacing/spacing.dart';import 'package:flutter/material.dart';-class AppFlowyThemeBuilder {- const AppFlowyThemeBuilder();-- AppFlowyTextColorScheme buildTextColorScheme(- AppFlowyBaseColorScheme colorScheme,- Brightness brightness,- ) {- return switch (brightness) {- Brightness.light => AppFlowyTextColorScheme(- primary: colorScheme.neutral.neutral1000,- secondary: colorScheme.neutral.neutral600,- tertiary: colorScheme.neutral.neutral400,- quaternary: colorScheme.neutral.neutral200,- inverse: colorScheme.neutral.white,- onFill: colorScheme.neutral.white,- theme: colorScheme.blue.blue500,- themeHover: colorScheme.blue.blue600,- action: colorScheme.blue.blue500,- actionHover: colorScheme.blue.blue600,- info: colorScheme.blue.blue500,- infoHover: colorScheme.blue.blue600,- success: colorScheme.green.green600,- successHover: colorScheme.green.green700,- warning: colorScheme.orange.orange600,- warningHover: colorScheme.orange.orange700,- error: colorScheme.red.red600,- errorHover: colorScheme.red.red700,- purple: colorScheme.purple.purple500,- purpleHover: colorScheme.purple.purple600,- ),- Brightness.dark => AppFlowyTextColorScheme(- primary: colorScheme.neutral.neutral200,- secondary: colorScheme.neutral.neutral400,- tertiary: colorScheme.neutral.neutral600,- quaternary: colorScheme.neutral.neutral1000,- inverse: colorScheme.neutral.neutral1000,- onFill: colorScheme.neutral.white,- theme: colorScheme.blue.blue500,- themeHover: colorScheme.blue.blue600,- action: colorScheme.blue.blue500,- actionHover: colorScheme.blue.blue600,- info: colorScheme.blue.blue500,- infoHover: colorScheme.blue.blue600,- success: colorScheme.green.green600,- successHover: colorScheme.green.green700,- warning: colorScheme.orange.orange600,- warningHover: colorScheme.orange.orange700,- error: colorScheme.red.red500,- errorHover: colorScheme.red.red400,- purple: colorScheme.purple.purple500,- purpleHover: colorScheme.purple.purple600,- ),- };- }-- AppFlowyIconColorTheme buildIconColorTheme(- AppFlowyBaseColorScheme colorScheme,- Brightness brightness,- ) {- return switch (brightness) {- Brightness.light => AppFlowyIconColorTheme(- primary: colorScheme.neutral.neutral1000,- secondary: colorScheme.neutral.neutral600,- tertiary: colorScheme.neutral.neutral400,- quaternary: colorScheme.neutral.neutral200,- white: colorScheme.neutral.white,- purpleThick: colorScheme.purple.purple500,- purpleThickHover: colorScheme.purple.purple600,- ),- Brightness.dark => AppFlowyIconColorTheme(- primary: colorScheme.neutral.neutral200,- secondary: colorScheme.neutral.neutral400,- tertiary: colorScheme.neutral.neutral600,- quaternary: colorScheme.neutral.neutral1000,- white: colorScheme.neutral.white,- purpleThick: const Color(0xFFFFFFFF),- purpleThickHover: const Color(0xFFFFFFFF),- ),- };- }-- AppFlowyBorderColorScheme buildBorderColorScheme(- AppFlowyBaseColorScheme colorScheme,- Brightness brightness,- ) {- return switch (brightness) {- Brightness.light => AppFlowyBorderColorScheme(- greyPrimary: colorScheme.neutral.neutral1000,- greyPrimaryHover: colorScheme.neutral.neutral900,- greySecondary: colorScheme.neutral.neutral800,- greySecondaryHover: colorScheme.neutral.neutral700,- greyTertiary: colorScheme.neutral.neutral300,- greyTertiaryHover: colorScheme.neutral.neutral400,- greyQuaternary: colorScheme.neutral.neutral100,- greyQuaternaryHover: colorScheme.neutral.neutral200,- transparent: colorScheme.neutral.alphaWhite0,- themeThick: colorScheme.blue.blue500,- themeThickHover: colorScheme.blue.blue600,- infoThick: colorScheme.blue.blue500,- infoThickHover: colorScheme.blue.blue600,- successThick: colorScheme.green.green600,- successThickHover: colorScheme.green.green700,- warningThick: colorScheme.orange.orange600,- warningThickHover: colorScheme.orange.orange700,- errorThick: colorScheme.red.red600,- errorThickHover: colorScheme.red.red700,- purpleThick: colorScheme.purple.purple500,- purpleThickHover: colorScheme.purple.purple600,- ),- Brightness.dark => AppFlowyBorderColorScheme(- greyPrimary: colorScheme.neutral.neutral100,- greyPrimaryHover: colorScheme.neutral.neutral200,- greySecondary: colorScheme.neutral.neutral300,- greySecondaryHover: colorScheme.neutral.neutral400,- greyTertiary: colorScheme.neutral.neutral800,- greyTertiaryHover: colorScheme.neutral.neutral700,- greyQuaternary: colorScheme.neutral.neutral1000,- greyQuaternaryHover: colorScheme.neutral.neutral900,- transparent: colorScheme.neutral.alphaWhite0,- themeThick: colorScheme.blue.blue500,- themeThickHover: colorScheme.blue.blue600,- infoThick: colorScheme.blue.blue500,- infoThickHover: colorScheme.blue.blue600,- successThick: colorScheme.green.green600,- successThickHover: colorScheme.green.green700,- warningThick: colorScheme.orange.orange600,- warningThickHover: colorScheme.orange.orange700,- errorThick: colorScheme.red.red500,- errorThickHover: colorScheme.red.red400,- purpleThick: colorScheme.purple.purple500,- purpleThickHover: colorScheme.purple.purple600,- ),- };- }-- AppFlowyFillColorScheme buildFillColorScheme(- AppFlowyBaseColorScheme colorScheme,- Brightness brightness,- ) {- return switch (brightness) {- Brightness.dark => AppFlowyFillColorScheme(- primary: colorScheme.neutral.neutral100,- primaryHover: colorScheme.neutral.neutral200,- secondary: colorScheme.neutral.neutral300,- secondaryHover: colorScheme.neutral.neutral400,- tertiary: colorScheme.neutral.neutral600,- tertiaryHover: colorScheme.neutral.neutral500,- quaternary: colorScheme.neutral.neutral1000,- quaternaryHover: colorScheme.neutral.neutral900,- transparent: colorScheme.neutral.alphaWhite0,- primaryAlpha5: colorScheme.neutral.alphaGrey10005,- primaryAlpha5Hover: colorScheme.neutral.alphaGrey10010,- primaryAlpha80: colorScheme.neutral.alphaGrey100080,- primaryAlpha80Hover: colorScheme.neutral.alphaGrey100070,- white: colorScheme.neutral.white,- whiteAlpha: colorScheme.neutral.alphaWhite20,- whiteAlphaHover: colorScheme.neutral.alphaWhite30,- black: colorScheme.neutral.black,- themeLight: colorScheme.blue.blue100,- themeLightHover: colorScheme.blue.blue200,- themeThick: colorScheme.blue.blue500,- themeThickHover: colorScheme.blue.blue600,- themeSelect: colorScheme.blue.alphaBlue50015,- infoLight: colorScheme.blue.blue100,- infoLightHover: colorScheme.blue.blue200,- infoThick: colorScheme.blue.blue500,- infoThickHover: colorScheme.blue.blue600,- successLight: colorScheme.green.green100,- successLightHover: colorScheme.green.green200,- successThick: colorScheme.green.green600,- successThickHover: colorScheme.green.green700,- warningLight: colorScheme.orange.orange100,- warningLightHover: colorScheme.orange.orange200,- warningThick: colorScheme.orange.orange600,- warningThickHover: colorScheme.orange.orange700,- errorLight: colorScheme.red.red100,- errorLightHover: colorScheme.red.red200,- errorThick: colorScheme.red.red600,- errorThickHover: colorScheme.red.red700,- errorSelect: colorScheme.red.alphaRed50010,- purpleLight: colorScheme.purple.purple100,- purpleLightHover: colorScheme.purple.purple200,- purpleThick: colorScheme.purple.purple500,- purpleThickHover: colorScheme.purple.purple600,- ),- Brightness.light => AppFlowyFillColorScheme(- primary: colorScheme.neutral.neutral1000,- primaryHover: colorScheme.neutral.neutral900,- secondary: colorScheme.neutral.neutral600,- secondaryHover: colorScheme.neutral.neutral500,- tertiary: colorScheme.neutral.neutral300,- tertiaryHover: colorScheme.neutral.neutral400,- quaternary: colorScheme.neutral.neutral100,- quaternaryHover: colorScheme.neutral.neutral200,- transparent: colorScheme.neutral.alphaWhite0,- primaryAlpha5: colorScheme.neutral.alphaGrey100005,- primaryAlpha5Hover: colorScheme.neutral.alphaGrey100010,- primaryAlpha80: colorScheme.neutral.alphaGrey100080,- primaryAlpha80Hover: colorScheme.neutral.alphaGrey100070,- white: colorScheme.neutral.white,- whiteAlpha: colorScheme.neutral.alphaWhite20,- whiteAlphaHover: colorScheme.neutral.alphaWhite30,- black: colorScheme.neutral.black,- themeLight: colorScheme.blue.blue100,- themeLightHover: colorScheme.blue.blue200,- themeThick: colorScheme.blue.blue500,- themeThickHover: colorScheme.blue.blue600,- themeSelect: colorScheme.blue.alphaBlue50015,- infoLight: colorScheme.blue.blue100,- infoLightHover: colorScheme.blue.blue200,- infoThick: colorScheme.blue.blue500,- infoThickHover: colorScheme.blue.blue600,- successLight: colorScheme.green.green100,- successLightHover: colorScheme.green.green200,- successThick: colorScheme.green.green600,- successThickHover: colorScheme.green.green700,- warningLight: colorScheme.orange.orange100,- warningLightHover: colorScheme.orange.orange200,- warningThick: colorScheme.orange.orange600,- warningThickHover: colorScheme.orange.orange700,- errorLight: colorScheme.red.red100,- errorLightHover: colorScheme.red.red200,- errorThick: colorScheme.red.red600,- errorThickHover: colorScheme.red.red700,- errorSelect: colorScheme.red.alphaRed50010,- purpleLight: colorScheme.purple.purple100,- purpleLightHover: colorScheme.purple.purple200,- purpleThick: colorScheme.purple.purple500,- purpleThickHover: colorScheme.purple.purple600,- ),- };- }-- AppFlowySurfaceColorScheme buildSurfaceColorScheme(- AppFlowyBaseColorScheme colorScheme,- Brightness brightness,- ) {- return switch (brightness) {- Brightness.light => AppFlowySurfaceColorScheme(- primary: colorScheme.neutral.white,- overlay: colorScheme.neutral.alphaBlack60,- ),- Brightness.dark => AppFlowySurfaceColorScheme(- primary: colorScheme.neutral.neutral900,- overlay: colorScheme.neutral.alphaBlack60,- ),- };- }+class AppFlowySpacingConstant {+ static const double spacing100 = 4;+ static const double spacing200 = 6;+ static const double spacing300 = 8;+ static const double spacing400 = 12;+ static const double spacing500 = 16;+ static const double spacing600 = 20;+}- AppFlowyBackgroundColorScheme buildBackgroundColorScheme(- AppFlowyBaseColorScheme colorScheme,- Brightness brightness,- ) {- return switch (brightness) {- Brightness.light => AppFlowyBackgroundColorScheme(- primary: colorScheme.neutral.white,- secondary: colorScheme.neutral.neutral100,- tertiary: colorScheme.neutral.neutral200,- quaternary: colorScheme.neutral.neutral300,- ),- Brightness.dark => AppFlowyBackgroundColorScheme(- primary: colorScheme.neutral.neutral1000,- secondary: colorScheme.neutral.neutral900,- tertiary: colorScheme.neutral.neutral800,- quaternary: colorScheme.neutral.neutral700,- ),- };- }+class AppFlowyBorderRadiusConstant {+ static const double radius100 = 4;+ static const double radius200 = 6;+ static const double radius300 = 8;+ static const double radius400 = 12;+ static const double radius500 = 16;+ static const double radius600 = 20;+}- AppFlowyBrandColorScheme buildBrandColorScheme(- AppFlowyBaseColorScheme colorScheme,- ) {- return AppFlowyBrandColorScheme(- skyline: const Color(0xFF00B5FF),- aqua: const Color(0xFF00C8FF),- violet: const Color(0xFF9327FF),- amethyst: const Color(0xFF8427E0),- berry: const Color(0xFFE3006D),- coral: const Color(0xFFFB006D),- golden: const Color(0xFFF7931E),- amber: const Color(0xFFFFBD00),- lemon: const Color(0xFFFFCE00),- );- }+class AppFlowyThemeBuilder {+ const AppFlowyThemeBuilder();- AppFlowyBorderRadius buildBorderRadius(- AppFlowyBaseColorScheme colorScheme,- ) {+ AppFlowyBorderRadius buildBorderRadius() {return AppFlowyBorderRadius(xs: AppFlowyBorderRadiusConstant.radius100,s: AppFlowyBorderRadiusConstant.radius200,@@ -310,9 +35,7 @@ class AppFlowyThemeBuilder {);}- AppFlowySpacing buildSpacing(- AppFlowyBaseColorScheme colorScheme,- ) {+ AppFlowySpacing buildSpacing() {return AppFlowySpacing(xs: AppFlowySpacingConstant.spacing100,s: AppFlowySpacingConstant.spacing200,diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/built_in_themes.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/built_in_themes.dartnew file mode 100644index 0000000000..2b29371433--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/built_in_themes.dart@@ -0,0 +1 @@+export 'appflowy_default/semantic.dart';diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/data.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/data.dartdeleted file mode 100644index 60f7d1f1a4..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/data/data.dart+++ /dev/null@@ -1,249 +0,0 @@-import 'package:appflowy_ui/src/theme/border_radius/border_radius.dart';-import 'package:appflowy_ui/src/theme/color_scheme/background/background_color_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/base/base_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/border/border.dart';-import 'package:appflowy_ui/src/theme/color_scheme/brand/brand_color_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/fill/fill_color_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/icon/icon_color_theme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/surface/surface_color_scheme.dart';-import 'package:appflowy_ui/src/theme/color_scheme/text/text_color_scheme.dart';-import 'package:appflowy_ui/src/theme/data/builder.dart';-import 'package:appflowy_ui/src/theme/shadow/shadow.dart';-import 'package:appflowy_ui/src/theme/spacing/spacing.dart';-import 'package:appflowy_ui/src/theme/text_style/text_style.dart';-import 'package:flutter/material.dart';--abstract class AppFlowyBaseTheme {- const AppFlowyBaseTheme();-- AppFlowyBaseColorScheme get colorScheme;-- AppFlowyTextColorScheme get textColorScheme;-- AppFlowyBaseTextStyle get textStyle;-- AppFlowyIconColorTheme get iconColorTheme;-- AppFlowyBorderColorScheme get borderColorScheme;-- AppFlowyBackgroundColorScheme get backgroundColorScheme;-- AppFlowyFillColorScheme get fillColorScheme;-- AppFlowySurfaceColorScheme get surfaceColorScheme;-- AppFlowyBorderRadius get borderRadius;-- AppFlowySpacing get spacing;-- AppFlowyShadow get shadow;-- AppFlowyBrandColorScheme get brandColorScheme;-}--class AppFlowyThemeData extends AppFlowyBaseTheme {- factory AppFlowyThemeData.light() {- final colorScheme = AppFlowyBaseColorScheme();-- final textStyle = AppFlowyBaseTextStyle();- final textColorScheme = themeBuilder.buildTextColorScheme(- colorScheme,- Brightness.light,- );- final borderColorScheme = themeBuilder.buildBorderColorScheme(- colorScheme,- Brightness.light,- );- final fillColorScheme = themeBuilder.buildFillColorScheme(- colorScheme,- Brightness.light,- );- final surfaceColorScheme = themeBuilder.buildSurfaceColorScheme(- colorScheme,- Brightness.light,- );- final backgroundColorScheme = themeBuilder.buildBackgroundColorScheme(- colorScheme,- Brightness.light,- );- final iconColorTheme = themeBuilder.buildIconColorTheme(- colorScheme,- Brightness.light,- );- final brandColorScheme = themeBuilder.buildBrandColorScheme(colorScheme);- final borderRadius = themeBuilder.buildBorderRadius(colorScheme);- final spacing = themeBuilder.buildSpacing(colorScheme);- final shadow = themeBuilder.buildShadow(Brightness.light);-- return AppFlowyThemeData(- colorScheme: colorScheme,- textColorScheme: textColorScheme,- textStyle: textStyle,- iconColorTheme: iconColorTheme,- backgroundColorScheme: backgroundColorScheme,- borderColorScheme: borderColorScheme,- fillColorScheme: fillColorScheme,- surfaceColorScheme: surfaceColorScheme,- borderRadius: borderRadius,- spacing: spacing,- shadow: shadow,- brandColorScheme: brandColorScheme,- );- }-- factory AppFlowyThemeData.dark() {- final colorScheme = AppFlowyBaseColorScheme();- final textStyle = AppFlowyBaseTextStyle();- final textColorScheme = themeBuilder.buildTextColorScheme(- colorScheme,- Brightness.dark,- );- final borderColorScheme = themeBuilder.buildBorderColorScheme(- colorScheme,- Brightness.dark,- );- final fillColorScheme = themeBuilder.buildFillColorScheme(- colorScheme,- Brightness.dark,- );- final surfaceColorScheme = themeBuilder.buildSurfaceColorScheme(- colorScheme,- Brightness.dark,- );- final backgroundColorScheme = themeBuilder.buildBackgroundColorScheme(- colorScheme,- Brightness.dark,- );- final iconColorTheme = themeBuilder.buildIconColorTheme(- colorScheme,- Brightness.dark,- );- final brandColorScheme = themeBuilder.buildBrandColorScheme(colorScheme);- final borderRadius = themeBuilder.buildBorderRadius(colorScheme);- final spacing = themeBuilder.buildSpacing(colorScheme);- final shadow = themeBuilder.buildShadow(Brightness.dark);-- return AppFlowyThemeData(- colorScheme: colorScheme,- textColorScheme: textColorScheme,- textStyle: textStyle,- iconColorTheme: iconColorTheme,- backgroundColorScheme: backgroundColorScheme,- borderColorScheme: borderColorScheme,- fillColorScheme: fillColorScheme,- surfaceColorScheme: surfaceColorScheme,- borderRadius: borderRadius,- spacing: spacing,- shadow: shadow,- brandColorScheme: brandColorScheme,- );- }-- const AppFlowyThemeData({- required this.colorScheme,- required this.textStyle,- required this.textColorScheme,- required this.borderColorScheme,- required this.fillColorScheme,- required this.surfaceColorScheme,- required this.borderRadius,- required this.spacing,- required this.shadow,- required this.brandColorScheme,- required this.iconColorTheme,- required this.backgroundColorScheme,- this.brightness = Brightness.light,- });-- static const AppFlowyThemeBuilder themeBuilder = AppFlowyThemeBuilder();-- final Brightness brightness;-- @override- final AppFlowyBaseColorScheme colorScheme;-- @override- final AppFlowyBaseTextStyle textStyle;-- @override- final AppFlowyTextColorScheme textColorScheme;-- @override- final AppFlowyBorderColorScheme borderColorScheme;-- @override- final AppFlowyFillColorScheme fillColorScheme;-- @override- final AppFlowySurfaceColorScheme surfaceColorScheme;-- @override- final AppFlowyBorderRadius borderRadius;-- @override- final AppFlowySpacing spacing;-- @override- final AppFlowyShadow shadow;-- @override- final AppFlowyBrandColorScheme brandColorScheme;-- @override- final AppFlowyIconColorTheme iconColorTheme;-- @override- final AppFlowyBackgroundColorScheme backgroundColorScheme;-- static AppFlowyTextColorScheme buildTextColorScheme(- AppFlowyBaseColorScheme colorScheme,- Brightness brightness,- ) {- return switch (brightness) {- Brightness.light => AppFlowyTextColorScheme(- primary: colorScheme.neutral.neutral1000,- secondary: colorScheme.neutral.neutral600,- tertiary: colorScheme.neutral.neutral400,- quaternary: colorScheme.neutral.neutral200,- inverse: colorScheme.neutral.white,- onFill: colorScheme.neutral.white,- theme: colorScheme.blue.blue500,- themeHover: colorScheme.blue.blue600,- action: colorScheme.blue.blue500,- actionHover: colorScheme.blue.blue600,- info: colorScheme.blue.blue500,- infoHover: colorScheme.blue.blue600,- success: colorScheme.green.green600,- successHover: colorScheme.green.green700,- warning: colorScheme.orange.orange600,- warningHover: colorScheme.orange.orange700,- error: colorScheme.red.red600,- errorHover: colorScheme.red.red700,- purple: colorScheme.purple.purple500,- purpleHover: colorScheme.purple.purple600,- ),- Brightness.dark => AppFlowyTextColorScheme(- primary: colorScheme.neutral.neutral200,- secondary: colorScheme.neutral.neutral400,- tertiary: colorScheme.neutral.neutral600,- quaternary: colorScheme.neutral.neutral1000,- inverse: colorScheme.neutral.neutral1000,- onFill: colorScheme.neutral.white,- theme: colorScheme.blue.blue500,- themeHover: colorScheme.blue.blue600,- action: colorScheme.blue.blue500,- actionHover: colorScheme.blue.blue600,- info: colorScheme.blue.blue500,- infoHover: colorScheme.blue.blue600,- success: colorScheme.green.green600,- successHover: colorScheme.green.green700,- warning: colorScheme.orange.orange600,- warningHover: colorScheme.orange.orange700,- error: colorScheme.red.red500,- errorHover: colorScheme.red.red400,- purple: colorScheme.purple.purple500,- purpleHover: colorScheme.purple.purple600,- ),- };- }-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/base_theme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/base_theme.dartnew file mode 100644index 0000000000..ca06c8da1b--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/base_theme.dart@@ -0,0 +1,33 @@+import 'border_radius/border_radius.dart';+import 'color_scheme/color_scheme.dart';+import 'shadow/shadow.dart';+import 'spacing/spacing.dart';+import 'text_style/text_style.dart';++abstract class AppFlowyBaseThemeData {+ const AppFlowyBaseThemeData();++ AppFlowyTextColorScheme get textColorScheme;++ AppFlowyBaseTextStyle get textStyle;++ AppFlowyIconColorScheme get iconColorScheme;++ AppFlowyBorderColorScheme get borderColorScheme;++ AppFlowyBackgroundColorScheme get backgroundColorScheme;++ AppFlowyFillColorScheme get fillColorScheme;++ AppFlowySurfaceColorScheme get surfaceColorScheme;++ AppFlowyBorderRadius get borderRadius;++ AppFlowySpacing get spacing;++ AppFlowyShadow get shadow;++ AppFlowyBrandColorScheme get brandColorScheme;++ AppFlowyOtherColorsColorScheme get otherColorsColorScheme;+}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/border_radius/border_radius.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/border_radius/border_radius.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/border_radius/border_radius.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/border_radius/border_radius.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/background/background_color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/background_color_scheme.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/background/background_color_scheme.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/background_color_scheme.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/border/border_color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/border_color_scheme.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/border/border_color_scheme.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/border_color_scheme.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/brand/brand_color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/brand_color_scheme.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/brand/brand_color_scheme.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/brand_color_scheme.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/color_scheme.dartnew file mode 100644index 0000000000..01952e1461--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/color_scheme.dart@@ -0,0 +1,8 @@+export 'background_color_scheme.dart';+export 'border_color_scheme.dart';+export 'brand_color_scheme.dart';+export 'fill_color_scheme.dart';+export 'icon_color_scheme.dart';+export 'other_color_scheme.dart';+export 'surface_color_scheme.dart';+export 'text_color_scheme.dart';diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/fill/fill_color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/fill_color_scheme.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/fill/fill_color_scheme.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/fill_color_scheme.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/icon/icon_color_theme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/icon_color_scheme.dartsimilarity index 86%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/icon/icon_color_theme.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/icon_color_scheme.dartindex f9ece5339c..245a02aadb 100644--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/icon/icon_color_theme.dart+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/icon_color_scheme.dart@@ -1,7 +1,7 @@import 'package:flutter/material.dart';-class AppFlowyIconColorTheme {- const AppFlowyIconColorTheme({+class AppFlowyIconColorScheme {+ const AppFlowyIconColorScheme({required this.primary,required this.secondary,required this.tertiary,diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/other_color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/other_color_scheme.dartnew file mode 100644index 0000000000..ed9b94695c--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/other_color_scheme.dart@@ -0,0 +1,9 @@+import 'dart:ui';++class AppFlowyOtherColorsColorScheme {+ const AppFlowyOtherColorsColorScheme({+ required this.textHighlight,+ });++ final Color textHighlight;+}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/surface/surface_color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/surface_color_scheme.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/surface/surface_color_scheme.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/surface_color_scheme.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/text/text_color_scheme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/text_color_scheme.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/color_scheme/text/text_color_scheme.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/color_scheme/text_color_scheme.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/shadow/shadow.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/shadow/shadow.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/shadow/shadow.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/shadow/shadow.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/spacing/spacing.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/spacing/spacing.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/spacing/spacing.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/spacing/spacing.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/text_style/base/default_text_style.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/text_style/base/default_text_style.dartsimilarity index 100%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/text_style/base/default_text_style.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/text_style/base/default_text_style.dartdiff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/text_style/text_style.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/text_style/text_style.dartsimilarity index 88%rename from frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/text_style/text_style.dartrename to frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/text_style/text_style.dartindex 1caaa288e8..d96ca0f557 100644--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/text_style/text_style.dart+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/definition/text_style/text_style.dart@@ -1,4 +1,4 @@-import 'package:appflowy_ui/src/theme/text_style/base/default_text_style.dart';+import 'package:appflowy_ui/src/theme/definition/text_style/base/default_text_style.dart';class AppFlowyBaseTextStyle {const AppFlowyBaseTextStyle({diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/dimensions.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/dimensions.dartdeleted file mode 100644index e502b3b875..0000000000--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/dimensions.dart+++ /dev/null@@ -1,17 +0,0 @@-class AppFlowySpacingConstant {- static const double spacing100 = 4;- static const double spacing200 = 6;- static const double spacing300 = 8;- static const double spacing400 = 12;- static const double spacing500 = 16;- static const double spacing600 = 20;-}--class AppFlowyBorderRadiusConstant {- static const double radius100 = 4;- static const double radius200 = 6;- static const double radius300 = 8;- static const double radius400 = 12;- static const double radius500 = 16;- static const double radius600 = 20;-}diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/theme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/theme.dartindex b800b1bb6c..5f9f66cd2d 100644--- a/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/theme.dart+++ b/frontend/appflowy_flutter/packages/appflowy_ui/lib/src/theme/theme.dart@@ -1,7 +1,8 @@export 'appflowy_theme.dart';-export 'border_radius/border_radius.dart';-export 'color_scheme/color_scheme.dart';-export 'data/data.dart';-export 'dimensions.dart';-export 'spacing/spacing.dart';-export 'text_style/text_style.dart';+export 'data/built_in_themes.dart';+export 'definition/border_radius/border_radius.dart';+export 'definition/color_scheme/color_scheme.dart';+export 'definition/base_theme.dart';+export 'definition/spacing/spacing.dart';+export 'definition/shadow/shadow.dart';+export 'definition/text_style/text_style.dart';diff --git a/frontend/appflowy_flutter/packages/appflowy_ui/script/Primitive.Mode 1.tokens.json b/frontend/appflowy_flutter/packages/appflowy_ui/script/Primitive.Mode 1.tokens.jsonnew file mode 100644index 0000000000..c46354b599--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/script/Primitive.Mode 1.tokens.json@@ -0,0 +1,984 @@+{+ "Neutral": {+ "100": {+ "$type": "color",+ "$value": "#f8faff"+ },+ "200": {+ "$type": "color",+ "$value": "#e4e8f5"+ },+ "300": {+ "$type": "color",+ "$value": "#ced3e6"+ },+ "400": {+ "$type": "color",+ "$value": "#b5bbd3"+ },+ "500": {+ "$type": "color",+ "$value": "#989eb7"+ },+ "600": {+ "$type": "color",+ "$value": "#6f748c"+ },+ "700": {+ "$type": "color",+ "$value": "#54596e"+ },+ "800": {+ "$type": "color",+ "$value": "#3c3f4e"+ },+ "900": {+ "$type": "color",+ "$value": "#272930"+ },+ "1000": {+ "$type": "color",+ "$value": "#21232a"+ },+ "black": {+ "$type": "color",+ "$value": "#000000"+ },+ "alpha-black-60": {+ "$type": "color",+ "$value": "#00000099"+ },+ "white": {+ "$type": "color",+ "$value": "#ffffff"+ },+ "alpha-white-0": {+ "$type": "color",+ "$value": "#ffffff00"+ },+ "alpha-white-20": {+ "$type": "color",+ "$value": "#ffffff33"+ },+ "alpha-white-30": {+ "$type": "color",+ "$value": "#ffffff4d"+ },+ "alpha-grey-100-05": {+ "$type": "color",+ "$value": "#f9fafd0d"+ },+ "alpha-grey-100-10": {+ "$type": "color",+ "$value": "#f9fafd1a"+ },+ "alpha-grey-1000-05": {+ "$type": "color",+ "$value": "#1f23290d"+ },+ "alpha-grey-1000-10": {+ "$type": "color",+ "$value": "#1f23291a"+ },+ "alpha-grey-1000-70": {+ "$type": "color",+ "$value": "#1f2329b2"+ },+ "alpha-grey-1000-80": {+ "$type": "color",+ "$value": "#1f2329cc"+ }+ },+ "Blue": {+ "100": {+ "$type": "color",+ "$value": "#e3f6ff"+ },+ "200": {+ "$type": "color",+ "$value": "#a9e2ff"+ },+ "300": {+ "$type": "color",+ "$value": "#80d2ff"+ },+ "400": {+ "$type": "color",+ "$value": "#4ec1ff"+ },+ "500": {+ "$type": "color",+ "$value": "#00b5ff"+ },+ "600": {+ "$type": "color",+ "$value": "#0092d6"+ },+ "700": {+ "$type": "color",+ "$value": "#0078c0"+ },+ "800": {+ "$type": "color",+ "$value": "#0065a9"+ },+ "900": {+ "$type": "color",+ "$value": "#00508f"+ },+ "1000": {+ "$type": "color",+ "$value": "#003c77"+ },+ "alpha-blue-500-15": {+ "$type": "color",+ "$value": "#00b5ff26"+ }+ },+ "Green": {+ "100": {+ "$type": "color",+ "$value": "#ecf9f5"+ },+ "200": {+ "$type": "color",+ "$value": "#c3e5d8"+ },+ "300": {+ "$type": "color",+ "$value": "#9ad1bc"+ },+ "400": {+ "$type": "color",+ "$value": "#71bd9f"+ },+ "500": {+ "$type": "color",+ "$value": "#48a982"+ },+ "600": {+ "$type": "color",+ "$value": "#248569"+ },+ "700": {+ "$type": "color",+ "$value": "#29725d"+ },+ "800": {+ "$type": "color",+ "$value": "#2e6050"+ },+ "900": {+ "$type": "color",+ "$value": "#305548"+ },+ "1000": {+ "$type": "color",+ "$value": "#305244"+ }+ },+ "Purple": {+ "100": {+ "$type": "color",+ "$value": "#f1e0ff"+ },+ "200": {+ "$type": "color",+ "$value": "#e1b3ff"+ },+ "300": {+ "$type": "color",+ "$value": "#d185ff"+ },+ "400": {+ "$type": "color",+ "$value": "#bc58ff"+ },+ "500": {+ "$type": "color",+ "$value": "#9327ff"+ },+ "600": {+ "$type": "color",+ "$value": "#7a1dcc"+ },+ "700": {+ "$type": "color",+ "$value": "#6617b3"+ },+ "800": {+ "$type": "color",+ "$value": "#55138f"+ },+ "900": {+ "$type": "color",+ "$value": "#470c72"+ },+ "1000": {+ "$type": "color",+ "$value": "#380758"+ }+ },+ "Magenta": {+ "100": {+ "$type": "color",+ "$value": "#ffe5ef"+ },+ "200": {+ "$type": "color",+ "$value": "#ffb8d1"+ },+ "300": {+ "$type": "color",+ "$value": "#ff8ab2"+ },+ "400": {+ "$type": "color",+ "$value": "#ff5c93"+ },+ "500": {+ "$type": "color",+ "$value": "#fb006d"+ },+ "600": {+ "$type": "color",+ "$value": "#d2005f"+ },+ "700": {+ "$type": "color",+ "$value": "#d2005f"+ },+ "800": {+ "$type": "color",+ "$value": "#850040"+ },+ "900": {+ "$type": "color",+ "$value": "#610031"+ },+ "1000": {+ "$type": "color",+ "$value": "#400022"+ }+ },+ "Red": {+ "100": {+ "$type": "color",+ "$value": "#ffd2dd"+ },+ "200": {+ "$type": "color",+ "$value": "#ffa5b4"+ },+ "300": {+ "$type": "color",+ "$value": "#ff7d87"+ },+ "400": {+ "$type": "color",+ "$value": "#ff5050"+ },+ "500": {+ "$type": "color",+ "$value": "#f33641"+ },+ "600": {+ "$type": "color",+ "$value": "#e71d32"+ },+ "700": {+ "$type": "color",+ "$value": "#ad1625"+ },+ "800": {+ "$type": "color",+ "$value": "#8c101c"+ },+ "900": {+ "$type": "color",+ "$value": "#6e0a1e"+ },+ "1000": {+ "$type": "color",+ "$value": "#4c0a17"+ },+ "alpha-red-500-10": {+ "$type": "color",+ "$value": "#f336411a"+ }+ },+ "Orange": {+ "100": {+ "$type": "color",+ "$value": "#fff3d5"+ },+ "200": {+ "$type": "color",+ "$value": "#ffe4ab"+ },+ "300": {+ "$type": "color",+ "$value": "#ffd181"+ },+ "400": {+ "$type": "color",+ "$value": "#ffbe62"+ },+ "500": {+ "$type": "color",+ "$value": "#ffa02e"+ },+ "600": {+ "$type": "color",+ "$value": "#db7e21"+ },+ "700": {+ "$type": "color",+ "$value": "#b75f17"+ },+ "800": {+ "$type": "color",+ "$value": "#93450e"+ },+ "900": {+ "$type": "color",+ "$value": "#7a3108"+ },+ "1000": {+ "$type": "color",+ "$value": "#602706"+ }+ },+ "Yellow": {+ "100": {+ "$type": "color",+ "$value": "#fff9b2"+ },+ "200": {+ "$type": "color",+ "$value": "#ffec66"+ },+ "300": {+ "$type": "color",+ "$value": "#ffdf1a"+ },+ "400": {+ "$type": "color",+ "$value": "#ffcc00"+ },+ "500": {+ "$type": "color",+ "$value": "#ffce00"+ },+ "600": {+ "$type": "color",+ "$value": "#e6b800"+ },+ "700": {+ "$type": "color",+ "$value": "#cc9f00"+ },+ "800": {+ "$type": "color",+ "$value": "#b38a00"+ },+ "900": {+ "$type": "color",+ "$value": "#9a7500"+ },+ "1000": {+ "$type": "color",+ "$value": "#7f6200"+ }+ },+ "Subtle_Color": {+ "Rose": {+ "100": {+ "$type": "color",+ "$value": "#fcf2f2"+ },+ "200": {+ "$type": "color",+ "$value": "#fae3e3"+ },+ "300": {+ "$type": "color",+ "$value": "#fad9d9"+ },+ "400": {+ "$type": "color",+ "$value": "#edadad"+ },+ "500": {+ "$type": "color",+ "$value": "#cc4e4e"+ },+ "600": {+ "$type": "color",+ "$value": "#702828"+ }+ },+ "Papaya": {+ "100": {+ "$type": "color",+ "$value": "#fcf4f0"+ },+ "200": {+ "$type": "color",+ "$value": "#fae8de"+ },+ "300": {+ "$type": "color",+ "$value": "#fadfd2"+ },+ "400": {+ "$type": "color",+ "$value": "#f0bda3"+ },+ "500": {+ "$type": "color",+ "$value": "#d67240"+ },+ "600": {+ "$type": "color",+ "$value": "#6b3215"+ }+ },+ "Tangerine": {+ "100": {+ "$type": "color",+ "$value": "#fff7ed"+ },+ "200": {+ "$type": "color",+ "$value": "#fcedd9"+ },+ "300": {+ "$type": "color",+ "$value": "#fae5ca"+ },+ "400": {+ "$type": "color",+ "$value": "#f2cb99"+ },+ "500": {+ "$type": "color",+ "$value": "#db8f2c"+ },+ "600": {+ "$type": "color",+ "$value": "#613b0a"+ }+ },+ "Mango": {+ "100": {+ "$type": "color",+ "$value": "#fff9ec"+ },+ "200": {+ "$type": "color",+ "$value": "#fcf1d7"+ },+ "300": {+ "$type": "color",+ "$value": "#fae9c3"+ },+ "400": {+ "$type": "color",+ "$value": "#f5d68e"+ },+ "500": {+ "$type": "color",+ "$value": "#e0a416"+ },+ "600": {+ "$type": "color",+ "$value": "#5c4102"+ }+ },+ "Lemon": {+ "100": {+ "$type": "color",+ "$value": "#fffbe8"+ },+ "200": {+ "$type": "color",+ "$value": "#fcf5cf"+ },+ "300": {+ "$type": "color",+ "$value": "#faefb9"+ },+ "400": {+ "$type": "color",+ "$value": "#f5e282"+ },+ "500": {+ "$type": "color",+ "$value": "#e0bb00"+ },+ "600": {+ "$type": "color",+ "$value": "#574800"+ }+ },+ "Olive": {+ "100": {+ "$type": "color",+ "$value": "#f9fae6"+ },+ "200": {+ "$type": "color",+ "$value": "#f6f7d0"+ },+ "300": {+ "$type": "color",+ "$value": "#f0f2b3"+ },+ "400": {+ "$type": "color",+ "$value": "#dbde83"+ },+ "500": {+ "$type": "color",+ "$value": "#adb204"+ },+ "600": {+ "$type": "color",+ "$value": "#4a4c03"+ }+ },+ "Lime": {+ "100": {+ "$type": "color",+ "$value": "#f6f9e6"+ },+ "200": {+ "$type": "color",+ "$value": "#eef5ce"+ },+ "300": {+ "$type": "color",+ "$value": "#e7f0bb"+ },+ "400": {+ "$type": "color",+ "$value": "#cfdb91"+ },+ "500": {+ "$type": "color",+ "$value": "#92a822"+ },+ "600": {+ "$type": "color",+ "$value": "#414d05"+ }+ },+ "Grass": {+ "100": {+ "$type": "color",+ "$value": "#f4faeb"+ },+ "200": {+ "$type": "color",+ "$value": "#e9f5d7"+ },+ "300": {+ "$type": "color",+ "$value": "#def0c5"+ },+ "400": {+ "$type": "color",+ "$value": "#bfd998"+ },+ "500": {+ "$type": "color",+ "$value": "#75a828"+ },+ "600": {+ "$type": "color",+ "$value": "#334d0c"+ }+ },+ "Forest": {+ "100": {+ "$type": "color",+ "$value": "#f1faf0"+ },+ "200": {+ "$type": "color",+ "$value": "#e2f5df"+ },+ "300": {+ "$type": "color",+ "$value": "#d7f0d3"+ },+ "400": {+ "$type": "color",+ "$value": "#a8d6a1"+ },+ "500": {+ "$type": "color",+ "$value": "#49a33b"+ },+ "600": {+ "$type": "color",+ "$value": "#1e4f16"+ }+ },+ "Jade": {+ "100": {+ "$type": "color",+ "$value": "#f0faf6"+ },+ "200": {+ "$type": "color",+ "$value": "#dff5eb"+ },+ "300": {+ "$type": "color",+ "$value": "#cef0e1"+ },+ "400": {+ "$type": "color",+ "$value": "#90d1b5"+ },+ "500": {+ "$type": "color",+ "$value": "#1c9963"+ },+ "600": {+ "$type": "color",+ "$value": "#075231"+ }+ },+ "Aqua": {+ "100": {+ "$type": "color",+ "$value": "#f0f9fa"+ },+ "200": {+ "$type": "color",+ "$value": "#dff3f5"+ },+ "300": {+ "$type": "color",+ "$value": "#ccecf0"+ },+ "400": {+ "$type": "color",+ "$value": "#83ccd4"+ },+ "500": {+ "$type": "color",+ "$value": "#008e9e"+ },+ "600": {+ "$type": "color",+ "$value": "#004e57"+ }+ },+ "Azure": {+ "100": {+ "$type": "color",+ "$value": "#f0f6fa"+ },+ "200": {+ "$type": "color",+ "$value": "#e1eef7"+ },+ "300": {+ "$type": "color",+ "$value": "#d3e6f5"+ },+ "400": {+ "$type": "color",+ "$value": "#88c0eb"+ },+ "500": {+ "$type": "color",+ "$value": "#0877cc"+ },+ "600": {+ "$type": "color",+ "$value": "#154469"+ }+ },+ "Denim": {+ "100": {+ "$type": "color",+ "$value": "#f0f3fa"+ },+ "200": {+ "$type": "color",+ "$value": "#e3ebfa"+ },+ "300": {+ "$type": "color",+ "$value": "#d7e2f7"+ },+ "400": {+ "$type": "color",+ "$value": "#9ab6ed"+ },+ "500": {+ "$type": "color",+ "$value": "#3267d1"+ },+ "600": {+ "$type": "color",+ "$value": "#223c70"+ }+ },+ "Mauve": {+ "100": {+ "$type": "color",+ "$value": "#f2f2fc"+ },+ "200": {+ "$type": "color",+ "$value": "#e6e6fa"+ },+ "300": {+ "$type": "color",+ "$value": "#dcdcf7"+ },+ "400": {+ "$type": "color",+ "$value": "#aeaef5"+ },+ "500": {+ "$type": "color",+ "$value": "#5555e0"+ },+ "600": {+ "$type": "color",+ "$value": "#36366b"+ }+ },+ "Lavender": {+ "100": {+ "$type": "color",+ "$value": "#f6f3fc"+ },+ "200": {+ "$type": "color",+ "$value": "#ebe3fa"+ },+ "300": {+ "$type": "color",+ "$value": "#e4daf7"+ },+ "400": {+ "$type": "color",+ "$value": "#c1aaf0"+ },+ "500": {+ "$type": "color",+ "$value": "#8153db"+ },+ "600": {+ "$type": "color",+ "$value": "#462f75"+ }+ },+ "Lilac": {+ "100": {+ "$type": "color",+ "$value": "#f7f0fa"+ },+ "200": {+ "$type": "color",+ "$value": "#f0e1f7"+ },+ "300": {+ "$type": "color",+ "$value": "#edd7f7"+ },+ "400": {+ "$type": "color",+ "$value": "#d3a9e8"+ },+ "500": {+ "$type": "color",+ "$value": "#9e4cc7"+ },+ "600": {+ "$type": "color",+ "$value": "#562d6b"+ }+ },+ "Mallow": {+ "100": {+ "$type": "color",+ "$value": "#faf0fa"+ },+ "200": {+ "$type": "color",+ "$value": "#f5e1f4"+ },+ "300": {+ "$type": "color",+ "$value": "#f5d7f4"+ },+ "400": {+ "$type": "color",+ "$value": "#dea4dc"+ },+ "500": {+ "$type": "color",+ "$value": "#b240af"+ },+ "600": {+ "$type": "color",+ "$value": "#632861"+ }+ },+ "Camellia": {+ "100": {+ "$type": "color",+ "$value": "#f9eff3"+ },+ "200": {+ "$type": "color",+ "$value": "#f7e1eb"+ },+ "300": {+ "$type": "color",+ "$value": "#f7d7e5"+ },+ "400": {+ "$type": "color",+ "$value": "#e5a3c0"+ },+ "500": {+ "$type": "color",+ "$value": "#c24279"+ },+ "600": {+ "$type": "color",+ "$value": "#6e2343"+ }+ },+ "Smoke": {+ "100": {+ "$type": "color",+ "$value": "#f5f5f5"+ },+ "200": {+ "$type": "color",+ "$value": "#e8e8e8"+ },+ "300": {+ "$type": "color",+ "$value": "#dedede"+ },+ "400": {+ "$type": "color",+ "$value": "#b8b8b8"+ },+ "500": {+ "$type": "color",+ "$value": "#6e6e6e"+ },+ "600": {+ "$type": "color",+ "$value": "#404040"+ }+ },+ "Iron": {+ "100": {+ "$type": "color",+ "$value": "#f2f4f7"+ },+ "200": {+ "$type": "color",+ "$value": "#e6e9f0"+ },+ "300": {+ "$type": "color",+ "$value": "#dadee5"+ },+ "400": {+ "$type": "color",+ "$value": "#b0b5bf"+ },+ "500": {+ "$type": "color",+ "$value": "#666f80"+ },+ "600": {+ "$type": "color",+ "$value": "#394152"+ }+ }+ },+ "Spacing": {+ "0": {+ "$type": "dimension",+ "$value": "0px"+ },+ "100": {+ "$type": "dimension",+ "$value": "4px"+ },+ "200": {+ "$type": "dimension",+ "$value": "6px"+ },+ "300": {+ "$type": "dimension",+ "$value": "8px"+ },+ "400": {+ "$type": "dimension",+ "$value": "12px"+ },+ "500": {+ "$type": "dimension",+ "$value": "16px"+ },+ "600": {+ "$type": "dimension",+ "$value": "20px"+ },+ "1000": {+ "$type": "dimension",+ "$value": "1000px"+ }+ },+ "Border-Radius": {+ "0": {+ "$type": "dimension",+ "$value": "0px"+ },+ "100": {+ "$type": "dimension",+ "$value": "4px"+ },+ "200": {+ "$type": "dimension",+ "$value": "6px"+ },+ "300": {+ "$type": "dimension",+ "$value": "8px"+ },+ "400": {+ "$type": "dimension",+ "$value": "12px"+ },+ "500": {+ "$type": "dimension",+ "$value": "16px"+ },+ "600": {+ "$type": "dimension",+ "$value": "20px"+ },+ "1000": {+ "$type": "dimension",+ "$value": "1000px"+ }+ }+}\ No newline at end of filediff --git a/frontend/appflowy_flutter/packages/appflowy_ui/script/Semantic.Dark Mode.tokens.json b/frontend/appflowy_flutter/packages/appflowy_ui/script/Semantic.Dark Mode.tokens.jsonnew file mode 100644index 0000000000..99d266c008--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/script/Semantic.Dark Mode.tokens.json@@ -0,0 +1,1039 @@+{+ "Text": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "secondary": {+ "$type": "color",+ "$value": "{Neutral.400}"+ },+ "tertiary": {+ "$type": "color",+ "$value": "{Neutral.600}"+ },+ "quaternary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "inverse": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "on-fill": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "theme": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "theme-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "action": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "action-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "info": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "info-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "success": {+ "$type": "color",+ "$value": "{Green.600}"+ },+ "success-hover": {+ "$type": "color",+ "$value": "{Green.700}"+ },+ "warning": {+ "$type": "color",+ "$value": "{Orange.600}"+ },+ "warning-hover": {+ "$type": "color",+ "$value": "{Orange.700}"+ },+ "error": {+ "$type": "color",+ "$value": "{Red.500}"+ },+ "error-hover": {+ "$type": "color",+ "$value": "{Red.400}"+ },+ "purple": {+ "$type": "color",+ "$value": "{Purple.500}"+ },+ "purple-hover": {+ "$type": "color",+ "$value": "{Purple.600}"+ }+ },+ "Icon": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "secondary": {+ "$type": "color",+ "$value": "{Neutral.400}"+ },+ "tertiary": {+ "$type": "color",+ "$value": "{Neutral.600}"+ },+ "quaternary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "white": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "purple-thick": {+ "$type": "color",+ "$value": "#ffffff"+ },+ "purple-thick-hover": {+ "$type": "color",+ "$value": "#ffffff"+ }+ },+ "Border": {+ "grey-primary": {+ "$type": "color",+ "$value": "{Neutral.100}"+ },+ "grey-primary-hover": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "grey-secondary": {+ "$type": "color",+ "$value": "{Neutral.300}"+ },+ "grey-secondary-hover": {+ "$type": "color",+ "$value": "{Neutral.400}"+ },+ "grey-tertiary": {+ "$type": "color",+ "$value": "{Neutral.800}"+ },+ "grey-tertiary-hover": {+ "$type": "color",+ "$value": "{Neutral.700}"+ },+ "grey-quaternary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "grey-quaternary-hover": {+ "$type": "color",+ "$value": "{Neutral.900}"+ },+ "transparent": {+ "$type": "color",+ "$value": "{Neutral.alpha-white-0}"+ },+ "theme-thick": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "theme-thick-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "info-thick": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "info-thick-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "success-thick": {+ "$type": "color",+ "$value": "{Green.600}"+ },+ "success-thick-hover": {+ "$type": "color",+ "$value": "{Green.700}"+ },+ "warning-thick": {+ "$type": "color",+ "$value": "{Orange.600}"+ },+ "warning-thick-hover": {+ "$type": "color",+ "$value": "{Orange.700}"+ },+ "error-thick": {+ "$type": "color",+ "$value": "{Red.500}"+ },+ "error-thick-hover": {+ "$type": "color",+ "$value": "{Red.400}"+ },+ "purple-thick": {+ "$type": "color",+ "$value": "{Purple.500}"+ },+ "purple-thick-hover": {+ "$type": "color",+ "$value": "{Purple.600}"+ }+ },+ "Fill": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.100}"+ },+ "primary-hover": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "secondary": {+ "$type": "color",+ "$value": "{Neutral.300}"+ },+ "secondary-hover": {+ "$type": "color",+ "$value": "{Neutral.400}"+ },+ "tertiary": {+ "$type": "color",+ "$value": "{Neutral.600}"+ },+ "tertiary-hover": {+ "$type": "color",+ "$value": "{Neutral.500}"+ },+ "quaternary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "quaternary-hover": {+ "$type": "color",+ "$value": "{Neutral.900}"+ },+ "transparent": {+ "$type": "color",+ "$value": "{Neutral.alpha-white-0}"+ },+ "primary-alpha-5": {+ "$type": "color",+ "$value": "{Neutral.alpha-grey-100-05}",+ "$description": "Used for hover state, eg. button, navigation item, menu item and grid item."+ },+ "primary-alpha-5-hover": {+ "$type": "color",+ "$value": "{Neutral.alpha-grey-100-10}"+ },+ "primary-alpha-80": {+ "$type": "color",+ "$value": "{Neutral.alpha-grey-1000-80}"+ },+ "primary-alpha-80-hover": {+ "$type": "color",+ "$value": "{Neutral.alpha-grey-1000-70}"+ },+ "white": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "white-alpha": {+ "$type": "color",+ "$value": "{Neutral.alpha-white-20}"+ },+ "white-alpha-hover": {+ "$type": "color",+ "$value": "{Neutral.alpha-white-30}"+ },+ "black": {+ "$type": "color",+ "$value": "{Neutral.black}"+ },+ "theme-light": {+ "$type": "color",+ "$value": "{Blue.100}"+ },+ "theme-light-hover": {+ "$type": "color",+ "$value": "{Blue.200}"+ },+ "theme-thick": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "theme-thick-hover": {+ "$type": "color",+ "$value": "{Blue.400}"+ },+ "theme-select": {+ "$type": "color",+ "$value": "{Blue.alpha-blue-500-15}"+ },+ "info-light": {+ "$type": "color",+ "$value": "{Blue.100}"+ },+ "info-light-hover": {+ "$type": "color",+ "$value": "{Blue.200}"+ },+ "info-thick": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "info-thick-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "success-light": {+ "$type": "color",+ "$value": "{Green.100}"+ },+ "success-light-hover": {+ "$type": "color",+ "$value": "{Green.200}"+ },+ "success-thick": {+ "$type": "color",+ "$value": "{Green.600}"+ },+ "success-thick-hover": {+ "$type": "color",+ "$value": "{Green.700}"+ },+ "warning-light": {+ "$type": "color",+ "$value": "{Orange.100}"+ },+ "warning-light-hover": {+ "$type": "color",+ "$value": "{Orange.200}"+ },+ "warning-thick": {+ "$type": "color",+ "$value": "{Orange.600}"+ },+ "warning-thick-hover": {+ "$type": "color",+ "$value": "{Orange.700}"+ },+ "error-light": {+ "$type": "color",+ "$value": "{Red.100}"+ },+ "error-light-hover": {+ "$type": "color",+ "$value": "{Red.200}"+ },+ "error-thick": {+ "$type": "color",+ "$value": "{Red.600}"+ },+ "error-thick-hover": {+ "$type": "color",+ "$value": "{Red.500}"+ },+ "error-select": {+ "$type": "color",+ "$value": "{Red.alpha-red-500-10}"+ },+ "purple-light": {+ "$type": "color",+ "$value": "{Purple.100}"+ },+ "purple-light-hover": {+ "$type": "color",+ "$value": "{Purple.200}"+ },+ "purple-thick-hover": {+ "$type": "color",+ "$value": "{Purple.600}"+ },+ "purple-thick": {+ "$type": "color",+ "$value": "{Purple.500}"+ }+ },+ "Surface": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.900}"+ },+ "overlay": {+ "$type": "color",+ "$value": "{Neutral.alpha-black-60}"+ }+ },+ "Background": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "secondary": {+ "$type": "color",+ "$value": "{Neutral.900}"+ },+ "tertiary": {+ "$type": "color",+ "$value": "{Neutral.800}"+ },+ "quaternary": {+ "$type": "color",+ "$value": "{Neutral.700}"+ }+ },+ "Badge_Color": {+ "Rose": {+ "rose-light-1": {+ "$type": "color",+ "$value": "#fcf2f2"+ },+ "rose-light-2": {+ "$type": "color",+ "$value": "#fae3e3"+ },+ "rose-light-3": {+ "$type": "color",+ "$value": "#fad9d9"+ },+ "rose-thick-1": {+ "$type": "color",+ "$value": "#edadad"+ },+ "rose-thick-2": {+ "$type": "color",+ "$value": "#cc4e4e"+ },+ "rose-thick-3": {+ "$type": "color",+ "$value": "#702828"+ }+ },+ "Papaya": {+ "papaya-light-1": {+ "$type": "color",+ "$value": "#fcf4f0"+ },+ "papaya-light-2": {+ "$type": "color",+ "$value": "#fae8de"+ },+ "papaya-light-3": {+ "$type": "color",+ "$value": "#fadfd2"+ },+ "papaya-thick-1": {+ "$type": "color",+ "$value": "#f0bda3"+ },+ "papaya-thick-2": {+ "$type": "color",+ "$value": "#d67240"+ },+ "papaya-thick-3": {+ "$type": "color",+ "$value": "#6b3215"+ }+ },+ "Tangerine": {+ "tangerine-light-1": {+ "$type": "color",+ "$value": "#fff7ed"+ },+ "tangerine-light-2": {+ "$type": "color",+ "$value": "#fcedd9"+ },+ "tangerine-light-3": {+ "$type": "color",+ "$value": "#fae5ca"+ },+ "tangerine-thick-1": {+ "$type": "color",+ "$value": "#f2cb99"+ },+ "tangerine-thick-2": {+ "$type": "color",+ "$value": "#db8f2c"+ },+ "tangerine-thick-3": {+ "$type": "color",+ "$value": "#613b0a"+ }+ },+ "Mango": {+ "mango-light-1": {+ "$type": "color",+ "$value": "#fff9ec"+ },+ "mango-light-2": {+ "$type": "color",+ "$value": "#fcf1d7"+ },+ "mango-light-3": {+ "$type": "color",+ "$value": "#fae9c3"+ },+ "mango-thick-1": {+ "$type": "color",+ "$value": "#f5d68e"+ },+ "mango-thick-2": {+ "$type": "color",+ "$value": "#e0a416"+ },+ "mango-thick-3": {+ "$type": "color",+ "$value": "#5c4102"+ }+ },+ "Lemon": {+ "lemon-light-1": {+ "$type": "color",+ "$value": "#fffbe8"+ },+ "lemon-light-2": {+ "$type": "color",+ "$value": "#fcf5cf"+ },+ "lemon-light-3": {+ "$type": "color",+ "$value": "#faefb9"+ },+ "lemon-thick-1": {+ "$type": "color",+ "$value": "#f5e282"+ },+ "lemon-thick-2": {+ "$type": "color",+ "$value": "#e0bb00"+ },+ "lemon-thick-3": {+ "$type": "color",+ "$value": "#574800"+ }+ },+ "Olive": {+ "olive-light-1": {+ "$type": "color",+ "$value": "#f9fae6"+ },+ "olive-light-2": {+ "$type": "color",+ "$value": "#f6f7d0"+ },+ "olive-light-3": {+ "$type": "color",+ "$value": "#f0f2b3"+ },+ "olive-thick-1": {+ "$type": "color",+ "$value": "#dbde83"+ },+ "olive-thick-2": {+ "$type": "color",+ "$value": "#adb204"+ },+ "olive-thick-3": {+ "$type": "color",+ "$value": "#4a4c03"+ }+ },+ "Lime": {+ "lime-light-1": {+ "$type": "color",+ "$value": "#f6f9e6"+ },+ "lime-light-2": {+ "$type": "color",+ "$value": "#eef5ce"+ },+ "lime-light-3": {+ "$type": "color",+ "$value": "#e7f0bb"+ },+ "lime-thick-1": {+ "$type": "color",+ "$value": "#cfdb91"+ },+ "lime-thick-2": {+ "$type": "color",+ "$value": "#92a822"+ },+ "lime-thick-3": {+ "$type": "color",+ "$value": "#414d05"+ }+ },+ "Grass": {+ "grass-light-1": {+ "$type": "color",+ "$value": "#f4faeb"+ },+ "grass-light-2": {+ "$type": "color",+ "$value": "#e9f5d7"+ },+ "grass-light-3": {+ "$type": "color",+ "$value": "#def0c5"+ },+ "grass-thick-1": {+ "$type": "color",+ "$value": "#bfd998"+ },+ "grass-thick-2": {+ "$type": "color",+ "$value": "#75a828"+ },+ "grass-thick-3": {+ "$type": "color",+ "$value": "#334d0c"+ }+ },+ "Forest": {+ "forest-light-1": {+ "$type": "color",+ "$value": "#f1faf0"+ },+ "forest-light-2": {+ "$type": "color",+ "$value": "#e2f5df"+ },+ "forest-light-3": {+ "$type": "color",+ "$value": "#d7f0d3"+ },+ "forest-thick-1": {+ "$type": "color",+ "$value": "#a8d6a1"+ },+ "forest-thick-2": {+ "$type": "color",+ "$value": "#49a33b"+ },+ "forest-thick-3": {+ "$type": "color",+ "$value": "#1e4f16"+ }+ },+ "Jade": {+ "jade-light-1": {+ "$type": "color",+ "$value": "#f0faf6"+ },+ "jade-light-2": {+ "$type": "color",+ "$value": "#dff5eb"+ },+ "jade-light-3": {+ "$type": "color",+ "$value": "#cef0e1"+ },+ "jade-thick-1": {+ "$type": "color",+ "$value": "#90d1b5"+ },+ "jade-thick-2": {+ "$type": "color",+ "$value": "#1c9963"+ },+ "jade-thick-3": {+ "$type": "color",+ "$value": "#075231"+ }+ },+ "Aqua": {+ "aqua-light-1": {+ "$type": "color",+ "$value": "#f0f9fa"+ },+ "aqua-light-2": {+ "$type": "color",+ "$value": "#dff3f5"+ },+ "aqua-light-3": {+ "$type": "color",+ "$value": "#ccecf0"+ },+ "aqua-thick-1": {+ "$type": "color",+ "$value": "#83ccd4"+ },+ "aqua-thick-2": {+ "$type": "color",+ "$value": "#008e9e"+ },+ "aqua-thick-3": {+ "$type": "color",+ "$value": "#004e57"+ }+ },+ "Azure": {+ "azure-light-1": {+ "$type": "color",+ "$value": "#f0f6fa"+ },+ "azure-light-2": {+ "$type": "color",+ "$value": "#e1eef7"+ },+ "azure-light-3": {+ "$type": "color",+ "$value": "#d3e6f5"+ },+ "azure-thick-1": {+ "$type": "color",+ "$value": "#88c0eb"+ },+ "azure-thick-2": {+ "$type": "color",+ "$value": "#0877cc"+ },+ "azure-thick-3": {+ "$type": "color",+ "$value": "#154469"+ }+ },+ "Denim": {+ "denim-light-1": {+ "$type": "color",+ "$value": "#f0f3fa"+ },+ "denim-light-2": {+ "$type": "color",+ "$value": "#e3ebfa"+ },+ "denim-light-3": {+ "$type": "color",+ "$value": "#d7e2f7"+ },+ "denim-thick-1": {+ "$type": "color",+ "$value": "#9ab6ed"+ },+ "denim-thick-2": {+ "$type": "color",+ "$value": "#3267d1"+ },+ "denim-thick-3": {+ "$type": "color",+ "$value": "#223c70"+ }+ },+ "Mauve": {+ "mauve-light-1": {+ "$type": "color",+ "$value": "#f2f2fc"+ },+ "mauve-thick-2": {+ "$type": "color",+ "$value": "#5555e0"+ },+ "mauve-thick-3": {+ "$type": "color",+ "$value": "#36366b"+ },+ "mauve-thick-1": {+ "$type": "color",+ "$value": "#aeaef5"+ }+ },+ "Lavender": {+ "lavender-light-1": {+ "$type": "color",+ "$value": "#f6f3fc"+ },+ "lavender-light-2": {+ "$type": "color",+ "$value": "#ebe3fa"+ },+ "lavender-light-3": {+ "$type": "color",+ "$value": "#e4daf7"+ },+ "lavender-thick-1": {+ "$type": "color",+ "$value": "#c1aaf0"+ },+ "lavender-thick-2": {+ "$type": "color",+ "$value": "#8153db"+ },+ "lavender-thick-3": {+ "$type": "color",+ "$value": "#462f75"+ }+ },+ "Lilac": {+ "liliac-light-1": {+ "$type": "color",+ "$value": "#f7f0fa"+ },+ "liliac-light-2": {+ "$type": "color",+ "$value": "#f0e1f7"+ },+ "liliac-light-3": {+ "$type": "color",+ "$value": "#edd7f7"+ },+ "liliac-thick-1": {+ "$type": "color",+ "$value": "#d3a9e8"+ },+ "liliac-thick-2": {+ "$type": "color",+ "$value": "#9e4cc7"+ },+ "liliac-thick-3": {+ "$type": "color",+ "$value": "#562d6b"+ }+ },+ "Mallow": {+ "mallow-light-1": {+ "$type": "color",+ "$value": "#faf0fa"+ },+ "mallow-light-2": {+ "$type": "color",+ "$value": "#f5e1f4"+ },+ "mallow-light-3": {+ "$type": "color",+ "$value": "#f5d7f4"+ },+ "mallow-thick-1": {+ "$type": "color",+ "$value": "#dea4dc"+ },+ "mallow-thick-2": {+ "$type": "color",+ "$value": "#b240af"+ },+ "mallow-thick-3": {+ "$type": "color",+ "$value": "#632861"+ }+ },+ "Camellia": {+ "camellia-light-1": {+ "$type": "color",+ "$value": "#f9eff3"+ },+ "camellia-light-2": {+ "$type": "color",+ "$value": "#f7e1eb"+ },+ "camellia-light-3": {+ "$type": "color",+ "$value": "#f7d7e5"+ },+ "camellia-thick-1": {+ "$type": "color",+ "$value": "#e5a3c0"+ },+ "camellia-thick-2": {+ "$type": "color",+ "$value": "#c24279"+ },+ "camellia-thick-3": {+ "$type": "color",+ "$value": "#6e2343"+ }+ },+ "Smoke": {+ "smoke-light-1": {+ "$type": "color",+ "$value": "#f5f5f5"+ },+ "smoke-light-2": {+ "$type": "color",+ "$value": "#e8e8e8"+ },+ "smoke-light-3": {+ "$type": "color",+ "$value": "#dedede"+ },+ "smoke-thick-1": {+ "$type": "color",+ "$value": "#b8b8b8"+ },+ "smoke-thick-2": {+ "$type": "color",+ "$value": "#6e6e6e"+ },+ "smoke-thick-3": {+ "$type": "color",+ "$value": "#404040"+ }+ },+ "Iron": {+ "icon-light-1": {+ "$type": "color",+ "$value": "#f2f4f7"+ },+ "icon-light-2": {+ "$type": "color",+ "$value": "#e6e9f0"+ },+ "icon-light-3": {+ "$type": "color",+ "$value": "#dadee5"+ },+ "icon-thick-1": {+ "$type": "color",+ "$value": "#b0b5bf"+ },+ "icon-thick-2": {+ "$type": "color",+ "$value": "#666f80"+ },+ "icon-thick-3": {+ "$type": "color",+ "$value": "#394152"+ }+ }+ },+ "Shadow": {+ "sm": {+ "$type": "dimension",+ "$value": "0px"+ },+ "md": {+ "$type": "dimension",+ "$value": "0px"+ }+ },+ "Brand": {+ "Skyline": {+ "$type": "color",+ "$value": "#00b5ff"+ },+ "Aqua": {+ "$type": "color",+ "$value": "#00c8ff"+ },+ "Violet": {+ "$type": "color",+ "$value": "#9327ff"+ },+ "Amethyst": {+ "$type": "color",+ "$value": "#8427e0"+ },+ "Berry": {+ "$type": "color",+ "$value": "#e3006d"+ },+ "Coral": {+ "$type": "color",+ "$value": "#fb006d"+ },+ "Golden": {+ "$type": "color",+ "$value": "#f7931e"+ },+ "Amber": {+ "$type": "color",+ "$value": "#ffbd00"+ },+ "Lemon": {+ "$type": "color",+ "$value": "#ffce00"+ }+ },+ "Other_Colors": {+ "text-highlight": {+ "$type": "color",+ "$value": "{Blue.200}"+ }+ },+ "Spacing": {+ "spacing-0": {+ "$type": "dimension",+ "$value": "{Spacing.0}"+ },+ "spacing-xs": {+ "$type": "dimension",+ "$value": "{Spacing.100}"+ },+ "spacing-s": {+ "$type": "dimension",+ "$value": "{Spacing.200}"+ },+ "spacing-m": {+ "$type": "dimension",+ "$value": "{Spacing.300}"+ },+ "spacing-l": {+ "$type": "dimension",+ "$value": "{Spacing.400}"+ },+ "spacing-xl": {+ "$type": "dimension",+ "$value": "{Spacing.500}"+ },+ "spacing-xxl": {+ "$type": "dimension",+ "$value": "{Spacing.600}"+ },+ "spacing-full": {+ "$type": "dimension",+ "$value": "{Spacing.1000}"+ }+ },+ "Border_Radius": {+ "border-radius-0": {+ "$type": "dimension",+ "$value": "{Border-Radius.0}"+ },+ "border-radius-xs": {+ "$type": "dimension",+ "$value": "{Border-Radius.100}"+ },+ "border-radius-s": {+ "$type": "dimension",+ "$value": "{Border-Radius.200}"+ },+ "border-radius-m": {+ "$type": "dimension",+ "$value": "{Border-Radius.300}"+ },+ "border-radius-l": {+ "$type": "dimension",+ "$value": "{Border-Radius.400}"+ },+ "border-radius-xl": {+ "$type": "dimension",+ "$value": "{Border-Radius.500}"+ },+ "border-radius-xxl": {+ "$type": "dimension",+ "$value": "{Border-Radius.600}"+ },+ "border-radius-full": {+ "$type": "dimension",+ "$value": "{Border-Radius.1000}"+ }+ }+}\ No newline at end of filediff --git a/frontend/appflowy_flutter/packages/appflowy_ui/script/Semantic.Light Mode.tokens.json b/frontend/appflowy_flutter/packages/appflowy_ui/script/Semantic.Light Mode.tokens.jsonnew file mode 100644index 0000000000..4e6b0543dc--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/script/Semantic.Light Mode.tokens.json@@ -0,0 +1,1039 @@+{+ "Text": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "secondary": {+ "$type": "color",+ "$value": "{Neutral.600}"+ },+ "tertiary": {+ "$type": "color",+ "$value": "{Neutral.400}"+ },+ "quaternary": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "inverse": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "on-fill": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "theme": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "theme-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "action": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "action-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "info": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "info-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "success": {+ "$type": "color",+ "$value": "{Green.600}"+ },+ "success-hover": {+ "$type": "color",+ "$value": "{Green.700}"+ },+ "warning": {+ "$type": "color",+ "$value": "{Orange.600}"+ },+ "warning-hover": {+ "$type": "color",+ "$value": "{Orange.700}"+ },+ "error": {+ "$type": "color",+ "$value": "{Red.600}"+ },+ "error-hover": {+ "$type": "color",+ "$value": "{Red.700}"+ },+ "purple": {+ "$type": "color",+ "$value": "{Purple.500}"+ },+ "purple-hover": {+ "$type": "color",+ "$value": "{Purple.600}"+ }+ },+ "Icon": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "secondary": {+ "$type": "color",+ "$value": "{Neutral.600}"+ },+ "tertiary": {+ "$type": "color",+ "$value": "{Neutral.400}"+ },+ "quaternary": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "white": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "purple-thick": {+ "$type": "color",+ "$value": "{Purple.500}"+ },+ "purple-thick-hover": {+ "$type": "color",+ "$value": "{Purple.600}"+ }+ },+ "Border": {+ "grey-primary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "grey-primary-hover": {+ "$type": "color",+ "$value": "{Neutral.900}"+ },+ "grey-secondary": {+ "$type": "color",+ "$value": "{Neutral.800}"+ },+ "grey-secondary-hover": {+ "$type": "color",+ "$value": "{Neutral.700}"+ },+ "grey-tertiary": {+ "$type": "color",+ "$value": "{Neutral.300}"+ },+ "grey-tertiary-hover": {+ "$type": "color",+ "$value": "{Neutral.400}"+ },+ "grey-quaternary": {+ "$type": "color",+ "$value": "{Neutral.100}"+ },+ "grey-quaternary-hover": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "transparent": {+ "$type": "color",+ "$value": "{Neutral.alpha-white-0}"+ },+ "theme-thick": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "theme-thick-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "info-thick": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "info-thick-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "success-thick": {+ "$type": "color",+ "$value": "{Green.600}"+ },+ "success-thick-hover": {+ "$type": "color",+ "$value": "{Green.700}"+ },+ "warning-thick": {+ "$type": "color",+ "$value": "{Orange.600}"+ },+ "warning-thick-hover": {+ "$type": "color",+ "$value": "{Orange.700}"+ },+ "error-thick": {+ "$type": "color",+ "$value": "{Red.600}"+ },+ "error-thick-hover": {+ "$type": "color",+ "$value": "{Red.700}"+ },+ "purple-thick": {+ "$type": "color",+ "$value": "{Purple.500}"+ },+ "purple-thick-hover": {+ "$type": "color",+ "$value": "{Purple.600}"+ }+ },+ "Fill": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.1000}"+ },+ "primary-hover": {+ "$type": "color",+ "$value": "{Neutral.900}"+ },+ "secondary": {+ "$type": "color",+ "$value": "{Neutral.600}"+ },+ "secondary-hover": {+ "$type": "color",+ "$value": "{Neutral.500}"+ },+ "tertiary": {+ "$type": "color",+ "$value": "{Neutral.300}"+ },+ "tertiary-hover": {+ "$type": "color",+ "$value": "{Neutral.400}"+ },+ "quaternary": {+ "$type": "color",+ "$value": "{Neutral.100}"+ },+ "quaternary-hover": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "transparent": {+ "$type": "color",+ "$value": "{Neutral.alpha-white-0}"+ },+ "primary-alpha-5": {+ "$type": "color",+ "$value": "{Neutral.alpha-grey-1000-05}",+ "$description": "Used for hover state, eg. button, navigation item, menu item and grid item."+ },+ "primary-alpha-5-hover": {+ "$type": "color",+ "$value": "{Neutral.alpha-grey-1000-10}"+ },+ "primary-alpha-80": {+ "$type": "color",+ "$value": "{Neutral.alpha-grey-1000-80}"+ },+ "primary-alpha-80-hover": {+ "$type": "color",+ "$value": "{Neutral.alpha-grey-1000-70}"+ },+ "white": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "white-alpha": {+ "$type": "color",+ "$value": "{Neutral.alpha-white-20}"+ },+ "white-alpha-hover": {+ "$type": "color",+ "$value": "{Neutral.alpha-white-30}"+ },+ "black": {+ "$type": "color",+ "$value": "{Neutral.black}"+ },+ "theme-light": {+ "$type": "color",+ "$value": "{Blue.100}"+ },+ "theme-light-hover": {+ "$type": "color",+ "$value": "{Blue.200}"+ },+ "theme-thick": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "theme-thick-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "theme-select": {+ "$type": "color",+ "$value": "{Blue.alpha-blue-500-15}"+ },+ "info-light": {+ "$type": "color",+ "$value": "{Blue.100}"+ },+ "info-light-hover": {+ "$type": "color",+ "$value": "{Blue.200}"+ },+ "info-thick": {+ "$type": "color",+ "$value": "{Blue.500}"+ },+ "info-thick-hover": {+ "$type": "color",+ "$value": "{Blue.600}"+ },+ "success-light": {+ "$type": "color",+ "$value": "{Green.100}"+ },+ "success-light-hover": {+ "$type": "color",+ "$value": "{Green.200}"+ },+ "success-thick": {+ "$type": "color",+ "$value": "{Green.600}"+ },+ "success-thick-hover": {+ "$type": "color",+ "$value": "{Green.700}"+ },+ "warning-light": {+ "$type": "color",+ "$value": "{Orange.100}"+ },+ "warning-light-hover": {+ "$type": "color",+ "$value": "{Orange.200}"+ },+ "warning-thick": {+ "$type": "color",+ "$value": "{Orange.600}"+ },+ "warning-thick-hover": {+ "$type": "color",+ "$value": "{Orange.700}"+ },+ "error-light": {+ "$type": "color",+ "$value": "{Red.100}"+ },+ "error-light-hover": {+ "$type": "color",+ "$value": "{Red.200}"+ },+ "error-thick": {+ "$type": "color",+ "$value": "{Red.600}"+ },+ "error-thick-hover": {+ "$type": "color",+ "$value": "{Red.700}"+ },+ "error-select": {+ "$type": "color",+ "$value": "{Red.alpha-red-500-10}"+ },+ "purple-light": {+ "$type": "color",+ "$value": "{Purple.100}"+ },+ "purple-light-hover": {+ "$type": "color",+ "$value": "{Purple.200}"+ },+ "purple-thick-hover": {+ "$type": "color",+ "$value": "{Purple.600}"+ },+ "purple-thick": {+ "$type": "color",+ "$value": "{Purple.500}"+ }+ },+ "Surface": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "overlay": {+ "$type": "color",+ "$value": "{Neutral.alpha-black-60}"+ }+ },+ "Background": {+ "primary": {+ "$type": "color",+ "$value": "{Neutral.white}"+ },+ "secondary": {+ "$type": "color",+ "$value": "{Neutral.100}"+ },+ "tertiary": {+ "$type": "color",+ "$value": "{Neutral.200}"+ },+ "quaternary": {+ "$type": "color",+ "$value": "{Neutral.300}"+ }+ },+ "Badge_Color": {+ "Rose": {+ "rose-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Rose.100}"+ },+ "rose-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Rose.200}"+ },+ "rose-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Rose.300}"+ },+ "rose-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Rose.400}"+ },+ "rose-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Rose.500}"+ },+ "rose-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Rose.600}"+ }+ },+ "Papaya": {+ "papaya-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Papaya.100}"+ },+ "papaya-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Papaya.200}"+ },+ "papaya-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Papaya.300}"+ },+ "papaya-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Papaya.400}"+ },+ "papaya-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Papaya.500}"+ },+ "papaya-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Papaya.600}"+ }+ },+ "Tangerine": {+ "tangerine-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Tangerine.100}"+ },+ "tangerine-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Tangerine.200}"+ },+ "tangerine-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Tangerine.300}"+ },+ "tangerine-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Tangerine.400}"+ },+ "tangerine-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Tangerine.500}"+ },+ "tangerine-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Tangerine.600}"+ }+ },+ "Mango": {+ "mango-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Mango.100}"+ },+ "mango-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Mango.200}"+ },+ "mango-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Mango.300}"+ },+ "mango-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Mango.400}"+ },+ "mango-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Mango.500}"+ },+ "mango-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Mango.600}"+ }+ },+ "Lemon": {+ "lemon-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Lemon.100}"+ },+ "lemon-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Lemon.200}"+ },+ "lemon-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Lemon.300}"+ },+ "lemon-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Lemon.400}"+ },+ "lemon-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Lemon.500}"+ },+ "lemon-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Lemon.600}"+ }+ },+ "Olive": {+ "olive-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Olive.100}"+ },+ "olive-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Olive.200}"+ },+ "olive-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Olive.300}"+ },+ "olive-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Olive.400}"+ },+ "olive-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Olive.500}"+ },+ "olive-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Olive.600}"+ }+ },+ "Lime": {+ "lime-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Lime.100}"+ },+ "lime-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Lime.200}"+ },+ "lime-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Lime.300}"+ },+ "lime-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Lime.400}"+ },+ "lime-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Lime.500}"+ },+ "lime-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Lime.600}"+ }+ },+ "Grass": {+ "grass-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Grass.100}"+ },+ "grass-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Grass.200}"+ },+ "grass-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Grass.300}"+ },+ "grass-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Grass.400}"+ },+ "grass-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Grass.500}"+ },+ "grass-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Grass.600}"+ }+ },+ "Forest": {+ "forest-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Forest.100}"+ },+ "forest-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Forest.200}"+ },+ "forest-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Forest.300}"+ },+ "forest-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Forest.400}"+ },+ "forest-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Forest.500}"+ },+ "forest-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Forest.600}"+ }+ },+ "Jade": {+ "jade-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Jade.100}"+ },+ "jade-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Jade.200}"+ },+ "jade-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Jade.300}"+ },+ "jade-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Jade.400}"+ },+ "jade-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Jade.500}"+ },+ "jade-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Jade.600}"+ }+ },+ "Aqua": {+ "aqua-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Aqua.100}"+ },+ "aqua-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Aqua.200}"+ },+ "aqua-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Aqua.300}"+ },+ "aqua-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Aqua.400}"+ },+ "aqua-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Aqua.500}"+ },+ "aqua-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Aqua.600}"+ }+ },+ "Azure": {+ "azure-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Azure.100}"+ },+ "azure-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Azure.200}"+ },+ "azure-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Azure.300}"+ },+ "azure-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Azure.400}"+ },+ "azure-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Azure.500}"+ },+ "azure-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Azure.600}"+ }+ },+ "Denim": {+ "denim-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Denim.100}"+ },+ "denim-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Denim.200}"+ },+ "denim-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Denim.300}"+ },+ "denim-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Denim.400}"+ },+ "denim-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Denim.500}"+ },+ "denim-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Denim.600}"+ }+ },+ "Mauve": {+ "mauve-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Mauve.100}"+ },+ "mauve-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Mauve.500}"+ },+ "mauve-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Mauve.600}"+ },+ "mauve-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Mauve.400}"+ }+ },+ "Lavender": {+ "lavender-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Lavender.100}"+ },+ "lavender-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Lavender.200}"+ },+ "lavender-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Lavender.300}"+ },+ "lavender-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Lavender.400}"+ },+ "lavender-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Lavender.500}"+ },+ "lavender-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Lavender.600}"+ }+ },+ "Lilac": {+ "liliac-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Lilac.100}"+ },+ "liliac-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Lilac.200}"+ },+ "liliac-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Lilac.300}"+ },+ "liliac-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Lilac.400}"+ },+ "liliac-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Lilac.500}"+ },+ "liliac-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Lilac.600}"+ }+ },+ "Mallow": {+ "mallow-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Mallow.100}"+ },+ "mallow-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Mallow.200}"+ },+ "mallow-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Mallow.300}"+ },+ "mallow-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Mallow.400}"+ },+ "mallow-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Mallow.500}"+ },+ "mallow-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Mallow.600}"+ }+ },+ "Camellia": {+ "camellia-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Camellia.100}"+ },+ "camellia-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Camellia.200}"+ },+ "camellia-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Camellia.300}"+ },+ "camellia-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Camellia.400}"+ },+ "camellia-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Camellia.500}"+ },+ "camellia-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Camellia.600}"+ }+ },+ "Smoke": {+ "smoke-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Smoke.100}"+ },+ "smoke-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Smoke.200}"+ },+ "smoke-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Smoke.300}"+ },+ "smoke-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Smoke.400}"+ },+ "smoke-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Smoke.500}"+ },+ "smoke-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Smoke.600}"+ }+ },+ "Iron": {+ "icon-light-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Iron.100}"+ },+ "icon-light-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Iron.200}"+ },+ "icon-light-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Iron.300}"+ },+ "icon-thick-1": {+ "$type": "color",+ "$value": "{Subtle_Color.Iron.400}"+ },+ "icon-thick-2": {+ "$type": "color",+ "$value": "{Subtle_Color.Iron.500}"+ },+ "icon-thick-3": {+ "$type": "color",+ "$value": "{Subtle_Color.Iron.600}"+ }+ }+ },+ "Shadow": {+ "sm": {+ "$type": "dimension",+ "$value": "0px"+ },+ "md": {+ "$type": "dimension",+ "$value": "0px"+ }+ },+ "Brand": {+ "Skyline": {+ "$type": "color",+ "$value": "#00b5ff"+ },+ "Aqua": {+ "$type": "color",+ "$value": "#00c8ff"+ },+ "Violet": {+ "$type": "color",+ "$value": "#9327ff"+ },+ "Amethyst": {+ "$type": "color",+ "$value": "#8427e0"+ },+ "Berry": {+ "$type": "color",+ "$value": "#e3006d"+ },+ "Coral": {+ "$type": "color",+ "$value": "#fb006d"+ },+ "Golden": {+ "$type": "color",+ "$value": "#f7931e"+ },+ "Amber": {+ "$type": "color",+ "$value": "#ffbd00"+ },+ "Lemon": {+ "$type": "color",+ "$value": "#ffce00"+ }+ },+ "Other_Colors": {+ "text-highlight": {+ "$type": "color",+ "$value": "{Blue.200}"+ }+ },+ "Spacing": {+ "spacing-0": {+ "$type": "dimension",+ "$value": "{Spacing.0}"+ },+ "spacing-xs": {+ "$type": "dimension",+ "$value": "{Spacing.100}"+ },+ "spacing-s": {+ "$type": "dimension",+ "$value": "{Spacing.200}"+ },+ "spacing-m": {+ "$type": "dimension",+ "$value": "{Spacing.300}"+ },+ "spacing-l": {+ "$type": "dimension",+ "$value": "{Spacing.400}"+ },+ "spacing-xl": {+ "$type": "dimension",+ "$value": "{Spacing.500}"+ },+ "spacing-xxl": {+ "$type": "dimension",+ "$value": "{Spacing.600}"+ },+ "spacing-full": {+ "$type": "dimension",+ "$value": "{Spacing.1000}"+ }+ },+ "Border_Radius": {+ "border-radius-0": {+ "$type": "dimension",+ "$value": "{Border-Radius.0}"+ },+ "border-radius-xs": {+ "$type": "dimension",+ "$value": "{Border-Radius.100}"+ },+ "border-radius-s": {+ "$type": "dimension",+ "$value": "{Border-Radius.200}"+ },+ "border-radius-m": {+ "$type": "dimension",+ "$value": "{Border-Radius.300}"+ },+ "border-radius-l": {+ "$type": "dimension",+ "$value": "{Border-Radius.400}"+ },+ "border-radius-xl": {+ "$type": "dimension",+ "$value": "{Border-Radius.500}"+ },+ "border-radius-xxl": {+ "$type": "dimension",+ "$value": "{Border-Radius.600}"+ },+ "border-radius-full": {+ "$type": "dimension",+ "$value": "{Border-Radius.1000}"+ }+ }+}\ No newline at end of filediff --git a/frontend/appflowy_flutter/packages/appflowy_ui/script/generate_theme.dart b/frontend/appflowy_flutter/packages/appflowy_ui/script/generate_theme.dartnew file mode 100644index 0000000000..9c9c8a45ff--- /dev/null+++ b/frontend/appflowy_flutter/packages/appflowy_ui/script/generate_theme.dart@@ -0,0 +1,269 @@+import 'dart:convert';+import 'dart:io';++import 'package:collection/collection.dart';++void main() {+ generatePrimitive();+ generateSemantic();+}++void generatePrimitive() {+ // 1. Load the JSON file.+ final jsonString =+ File('script/Primitive.Mode 1.tokens.json').readAsStringSync();+ final jsonData = jsonDecode(jsonString) as Map<String, dynamic>;++ // 2. Prepare the output code.+ final buffer = StringBuffer();++ buffer.writeln('''+// ignore_for_file: constant_identifier_names, non_constant_identifier_names+//+// AUTO-GENERATED - DO NOT EDIT DIRECTLY+//+// This file is auto-generated by the generate_theme.dart script+// Generation time: ${DateTime.now().toIso8601String()}+//+// To modify these colors, edit the source JSON files and run the script:+//+// dart run script/generate_theme.dart+//+import 'package:flutter/material.dart';++class AppFlowyPrimitiveTokens {+ AppFlowyPrimitiveTokens._();''');++ // 3. Process each color category.+ jsonData.forEach((categoryName, categoryData) {+ if (categoryData is Map<String, dynamic>) {+ categoryData.forEach((tokenName, tokenData) {+ if (tokenData is Map<String, dynamic> &&+ tokenData['\$type'] == 'color') {+ final colorValue = tokenData['\$value'] as String;+ final dartColorValue = convertColor(colorValue);+ final dartTokenName =+ '${categoryName}_$tokenName'.replaceAll('-', '_').toCamelCase();++ buffer.writeln('''++ /// $colorValue+ static Color get $dartTokenName => Color(0x$dartColorValue);''');+ }+ });+ }+ });++ buffer.writeln('}');++ // 4. Write the output to a Dart file.+ final outputFile = File('lib/src/theme/data/appflowy_default/primitive.dart');+ outputFile.writeAsStringSync(buffer.toString());++ print('Successfully generated ${outputFile.path}');+}++void generateSemantic() {+ // 1. Load the JSON file.+ final lightJsonString =+ File('script/Semantic.Light Mode.tokens.json').readAsStringSync();+ final darkJsonString =+ File('script/Semantic.Dark Mode.tokens.json').readAsStringSync();+ final lightJsonData = jsonDecode(lightJsonString) as Map<String, dynamic>;+ final darkJsonData = jsonDecode(darkJsonString) as Map<String, dynamic>;++ // 2. Prepare the output code.+ final buffer = StringBuffer();++ buffer.writeln('''+// ignore_for_file: constant_identifier_names, non_constant_identifier_names+//+// AUTO-GENERATED - DO NOT EDIT DIRECTLY+//+// This file is auto-generated by the generate_theme.dart script+// Generation time: ${DateTime.now().toIso8601String()}+//+// To modify these colors, edit the source JSON files and run the script:+//+// dart run script/generate_theme.dart+//+import 'package:appflowy_ui/appflowy_ui.dart';+import 'package:flutter/material.dart';++import '../builder.dart';+import 'primitive.dart';++class AppFlowyThemeData implements AppFlowyBaseThemeData {+ const AppFlowyThemeData._({+ required this.textStyle,+ required this.textColorScheme,+ required this.borderColorScheme,+ required this.fillColorScheme,+ required this.surfaceColorScheme,+ required this.borderRadius,+ required this.spacing,+ required this.shadow,+ required this.brandColorScheme,+ required this.iconColorScheme,+ required this.backgroundColorScheme,+ required this.otherColorsColorScheme,+ });+''');++ // 3. Process light mode semantic tokens+ void writeThemeFactory(String brightness, Map<String, dynamic> jsonData) {+ buffer.writeln('''+ factory AppFlowyThemeData.$brightness() {+ final textStyle = AppFlowyBaseTextStyle();+ final borderRadius = themeBuilder.buildBorderRadius();+ final spacing = themeBuilder.buildSpacing();+ final shadow = themeBuilder.buildShadow(Brightness.$brightness);''');++ jsonData.forEach((categoryName, categoryData) {+ if (categoryData is Map<String, dynamic>) {+ final hasNonColorType = categoryData.values.any(+ (element) =>+ element is Map<String, dynamic> && element['\$type'] != 'color',+ );+ if (hasNonColorType) {+ return;+ }++ final fullCategoryName = "${categoryName}_color_scheme".toCamelCase();+ final className = 'AppFlowy${fullCategoryName.toCapitalize()}';++ buffer+ ..writeln()+ ..writeln(' final $fullCategoryName = $className(');++ categoryData.forEach((tokenName, tokenData) {+ if (tokenData is Map<String, dynamic> &&+ tokenData['\$type'] == 'color') {+ final semanticTokenName =+ tokenName.replaceAll('-', '_').toCamelCase();++ final value = tokenData['\$value'] as String;+ final String colorOrPrimitiveToken;+ if (value.isColor) {+ colorOrPrimitiveToken = 'Color(0x${convertColor(value)})';+ } else {+ final primitiveToken = value+ .replaceAll('{', '')+ .replaceAll('}', '')+ .replaceAll('.', '_')+ .replaceAll('-', '_')+ .toCamelCase();+ colorOrPrimitiveToken = 'AppFlowyPrimitiveTokens.$primitiveToken';+ }++ buffer.writeln(' $semanticTokenName: $colorOrPrimitiveToken,');+ }+ });+ buffer.writeln(' );');+ }+ });++ buffer.writeln();+ buffer.writeln('''+ return AppFlowyThemeData._(+ textStyle: textStyle,+ textColorScheme: textColorScheme,+ borderColorScheme: borderColorScheme,+ fillColorScheme: fillColorScheme,+ surfaceColorScheme: surfaceColorScheme,+ backgroundColorScheme: backgroundColorScheme,+ iconColorScheme: iconColorScheme,+ brandColorScheme: brandColorScheme,+ otherColorsColorScheme: otherColorsColorScheme,+ borderRadius: borderRadius,+ spacing: spacing,+ shadow: shadow,+ );+ }''');+ }++ writeThemeFactory('light', lightJsonData);+ buffer.writeln();+ writeThemeFactory('dark', darkJsonData);++ buffer.writeln('''++ static const AppFlowyThemeBuilder themeBuilder = AppFlowyThemeBuilder();++ @override+ final AppFlowyBaseTextStyle textStyle;++ @override+ final AppFlowyTextColorScheme textColorScheme;++ @override+ final AppFlowyBorderColorScheme borderColorScheme;++ @override+ final AppFlowyFillColorScheme fillColorScheme;++ @override+ final AppFlowySurfaceColorScheme surfaceColorScheme;++ @override+ final AppFlowyBorderRadius borderRadius;++ @override+ final AppFlowySpacing spacing;++ @override+ final AppFlowyShadow shadow;++ @override+ final AppFlowyBrandColorScheme brandColorScheme;++ @override+ final AppFlowyIconColorScheme iconColorScheme;++ @override+ final AppFlowyBackgroundColorScheme backgroundColorScheme;++ @override+ final AppFlowyOtherColorsColorScheme otherColorsColorScheme;''');+ buffer.writeln('}');++ // 4. Write the output to a Dart file.+ final outputFile = File('lib/src/theme/data/appflowy_default/semantic.dart');+ outputFile.writeAsStringSync(buffer.toString());++ print('Successfully generated ${outputFile.path}');+}++String convertColor(String hexColor) {+ String color = hexColor.toUpperCase().replaceAll('#', '');+ if (color.length == 6) {+ color = 'FF$color'; // Add missing alpha channel+ } else if (color.length == 8) {+ color = color.substring(6) + color.substring(0, 6); // Rearrange to ARGB+ }+ return color;+}++extension on String {+ String toCamelCase() {+ return split('_').mapIndexed((index, part) {+ if (index == 0) {+ return part.toLowerCase();+ } else {+ return part[0].toUpperCase() + part.substring(1).toLowerCase();+ }+ }).join();+ }++ String toCapitalize() {+ if (isEmpty) {+ return this;+ }+ return '${this[0].toUpperCase()}${substring(1)}';+ }++ bool get isColor =>+ startsWith('#') ||+ (startsWith('0x') && length == 10) ||+ (startsWith('0xFF') && length == 12);+}