From 75ac83b67a713402d974b3f98e5bbbe9072f3af4 Mon Sep 17 00:00:00 2001 From: Dominik Krajcer Date: Sun, 22 Dec 2024 15:06:50 +0100 Subject: [PATCH] 1.2.0 * update dependencies, export emojis regex * update emoji data to version 16.0 * add tests for regexes * bump version to 1.2.0 * fix flutter examples * update CHANGELOG --- .vscode/settings.json | 3 + CHANGELOG.md | 12 +- README.md | 14 +- example/lib/main.dart | 3 + example/pubspec.lock | 8 +- .../emoji_chat_app_example/.gitignore | 2 + .../emoji_chat_app_example/.metadata | 30 ++-- .../emoji_chat_app_example/android/.gitignore | 2 +- .../android/app/build.gradle | 53 ++------ .../android/app/src/main/AndroidManifest.xml | 3 +- .../android/build.gradle | 4 +- .../android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/settings.gradle | 9 +- .../ios/Runner/AppDelegate.swift | 4 +- .../macos/Runner/AppDelegate.swift | 2 +- .../macos/RunnerTests/RunnerTests.swift | 2 +- .../emoji_chat_app_example/pubspec.lock | 26 ++-- .../emoji_chat_app_example/pubspec.yaml | 7 +- .../emoji_chat_app_example/web/index.html | 23 +--- .../windows/runner/runner.exe.manifest | 6 - .../windows/runner/utils.cpp | 4 +- .../emoji_overview_app_example/.gitignore | 2 + .../emoji_overview_app_example/.metadata | 30 ++-- .../android/.gitignore | 2 +- .../android/app/build.gradle | 53 ++------ .../android/app/src/main/AndroidManifest.xml | 3 +- .../android/build.gradle | 4 +- .../android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/settings.gradle | 9 +- .../ios/Runner/AppDelegate.swift | 4 +- .../lib/home_page.dart | 5 +- .../macos/Runner/AppDelegate.swift | 2 +- .../macos/RunnerTests/RunnerTests.swift | 2 +- .../emoji_overview_app_example/pubspec.lock | 26 ++-- .../emoji_overview_app_example/pubspec.yaml | 7 +- .../emoji_overview_app_example/web/index.html | 23 +--- .../windows/runner/runner.exe.manifest | 6 - .../windows/runner/utils.cpp | 4 +- lib/emoji_extension.dart | 2 +- lib/src/emojis/emoji/emoji_getters.dart | 9 ++ .../emoji_parser/emoji_parser_getters.dart | 2 +- lib/src/emojis/emojis.dart | 6 + lib/src/emojis/emojis_data.dart | 128 ++++++++++++++++++ lib/src/emojis/version.dart | 5 +- lib/src/extensions/iterable_extensions.dart | 8 -- lib/src/regex.dart | 4 +- pubspec.yaml | 14 +- test/_tools/test_emojis.dart | 10 +- test/src/emojis/emoji/emoji_getters_test.dart | 33 +++++ test/src/emojis/emojis_test.dart | 75 +++++----- test/src/emojis/version_test.dart | 3 +- .../extensions/iterable_extensions_test.dart | 11 -- test/src/regex_test.dart | 127 +++++++++++++++++ 55 files changed, 536 insertions(+), 308 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 test/src/regex_test.dart diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9b4de55 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.lineLength": 80 +} diff --git a/CHANGELOG.md b/CHANGELOG.md index cd7d454..95aec01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.2.0 +- Updated emoji dataset to newest [Unicode 16.0](https://www.unicode.org/reports/tr51/) +- Updated dependencies +- Require Dart `^3.4.0` +- Exported emoji regex: +```dart +final regex = Emojis.regex; + // print(regex); // RegExp: pattern=[#*\d]\uFE0F?\u20E3|[\xA9\... +``` + ## 1.1.1 - Changed *gif demo files to *webp format @@ -526,4 +536,4 @@ print(result); // '๐Ÿฆฆ๐Ÿคฆ๐Ÿพโ€โ™€๏ธ๐ŸŽ…๐Ÿ’ƒ๐Ÿฝ๐Ÿ‘ฉ๐Ÿพโ€๐Ÿš€' ## 0.1.0 -Initial release ๐ŸŽ‰ \ No newline at end of file +Initial release ๐ŸŽ‰ diff --git a/README.md b/README.md index 9f26e20..278aeaf 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

-Emojis for Dart Unicode 15.1
+Emojis for Dart Unicode 16.0
+
One, yet powerful emojis String extension

@@ -20,7 +20,7 @@ One, yet powerful emojis String extension MIT License - Unicode 15.1 + Unicode 16.0 YouTube Tutorial @@ -30,7 +30,7 @@ One, yet powerful emojis String extension --- ## Features -- Contains over **5,000** emojis from Unicode 15.1 ๐Ÿ’ช +- Contains over **5,000** emojis from Unicode 16.0 ๐Ÿ’ช - Supports: - `shorcodes`: **Discord**, **Github**, **Slack** ๐Ÿซก - skin tone variations: ๐Ÿ‘ ๐Ÿ‘๐Ÿป ๐Ÿ‘๐Ÿผ ๐Ÿ‘๐Ÿฝ ๐Ÿ‘๐Ÿพ ๐Ÿ‘๐Ÿฟ @@ -856,8 +856,8 @@ Emojis.versions // [Version.v6_0, Version.v7_0, Version.v8_0, Version.v9_0, ...] .fourth // Version.v9_0 .fifth // Version.v10_0 .sixth // Version.v11_0 - .penultimate // Version.v15_0 - .last // Version.v15_1 + .penultimate // Version.v15_1 + .last // Version.v16_0 .values // [6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 12.1, 13.0, ...] .first // 6.0 .second // 7.0 @@ -865,8 +865,8 @@ Emojis.versions // [Version.v6_0, Version.v7_0, Version.v8_0, Version.v9_0, ...] .fourth // 9.0 .fifth // 10.0 .sixth // 11.0 - .penultimate // 15.0 - .last // 15.1 + .penultimate // 15.1 + .last // 16.0 ```
โ†‘ Table of contents โ†‘
diff --git a/example/lib/main.dart b/example/lib/main.dart index 76f2656..39731fd 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -22,6 +22,9 @@ void main() { final hasColor = Emoji('๐Ÿฉต').hasColor; // print(hasColor); // true + final regex = Emojis.regex; + // print(regex); // RegExp: pattern=[#*\d]\uFE0F?\u20E3|[\xA9\... + final emojis = Emojis.all; // print(emojis); // [Emoji(value: ๐Ÿ˜€, ...), Emoji(value: ๐Ÿ˜ƒ, ...), ...] diff --git a/example/pubspec.lock b/example/pubspec.lock index 098ec6c..e927a0a 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,16 +5,16 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" emoji_extension: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.1.1" + version: "1.2.0" sdks: - dart: ">=2.19.6 <4.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/flutter_examples/emoji_chat_app_example/.gitignore b/flutter_examples/emoji_chat_app_example/.gitignore index 29a3a50..79c113f 100644 --- a/flutter_examples/emoji_chat_app_example/.gitignore +++ b/flutter_examples/emoji_chat_app_example/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/flutter_examples/emoji_chat_app_example/.metadata b/flutter_examples/emoji_chat_app_example/.metadata index 32dc8a5..c2aa44b 100644 --- a/flutter_examples/emoji_chat_app_example/.metadata +++ b/flutter_examples/emoji_chat_app_example/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "300451adae589accbece3490f4396f10bdf15e6e" + revision: "603104015dd692ea3403755b55d07813d5cf8965" channel: "stable" project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: android - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: ios - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: linux - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: macos - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: web - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: windows - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 # User provided section diff --git a/flutter_examples/emoji_chat_app_example/android/.gitignore b/flutter_examples/emoji_chat_app_example/android/.gitignore index 6f56801..55afd91 100644 --- a/flutter_examples/emoji_chat_app_example/android/.gitignore +++ b/flutter_examples/emoji_chat_app_example/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/flutter_examples/emoji_chat_app_example/android/app/build.gradle b/flutter_examples/emoji_chat_app_example/android/app/build.gradle index 4b8a181..9dd67c2 100644 --- a/flutter_examples/emoji_chat_app_example/android/app/build.gradle +++ b/flutter_examples/emoji_chat_app_example/android/app/build.gradle @@ -1,67 +1,44 @@ plugins { id "com.android.application" id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - android { - namespace "com.example.emoji_chat_app_example" - compileSdk flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "com.example.emoji_chat_app_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + jvmTarget = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.emoji_chat_app_example" + applicationId = "com.example.emoji_chat_app_example" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' + source = "../.." } - -dependencies {} diff --git a/flutter_examples/emoji_chat_app_example/android/app/src/main/AndroidManifest.xml b/flutter_examples/emoji_chat_app_example/android/app/src/main/AndroidManifest.xml index 3c65f29..8e5d45d 100644 --- a/flutter_examples/emoji_chat_app_example/android/app/src/main/AndroidManifest.xml +++ b/flutter_examples/emoji_chat_app_example/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" + android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" @@ -31,7 +32,7 @@ android:value="2" /> diff --git a/flutter_examples/emoji_chat_app_example/android/build.gradle b/flutter_examples/emoji_chat_app_example/android/build.gradle index bc157bd..d2ffbff 100644 --- a/flutter_examples/emoji_chat_app_example/android/build.gradle +++ b/flutter_examples/emoji_chat_app_example/android/build.gradle @@ -5,12 +5,12 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/flutter_examples/emoji_chat_app_example/android/gradle.properties b/flutter_examples/emoji_chat_app_example/android/gradle.properties index 598d13f..2597170 100644 --- a/flutter_examples/emoji_chat_app_example/android/gradle.properties +++ b/flutter_examples/emoji_chat_app_example/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/flutter_examples/emoji_chat_app_example/android/gradle/wrapper/gradle-wrapper.properties b/flutter_examples/emoji_chat_app_example/android/gradle/wrapper/gradle-wrapper.properties index e1ca574..7bb2df6 100644 --- a/flutter_examples/emoji_chat_app_example/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter_examples/emoji_chat_app_example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/flutter_examples/emoji_chat_app_example/android/settings.gradle b/flutter_examples/emoji_chat_app_example/android/settings.gradle index 1d6d19b..b9e43bd 100644 --- a/flutter_examples/emoji_chat_app_example/android/settings.gradle +++ b/flutter_examples/emoji_chat_app_example/android/settings.gradle @@ -5,10 +5,9 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() @@ -19,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false - id "org.jetbrains.kotlin.android" version "1.7.10" apply false + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false } include ":app" diff --git a/flutter_examples/emoji_chat_app_example/ios/Runner/AppDelegate.swift b/flutter_examples/emoji_chat_app_example/ios/Runner/AppDelegate.swift index 70693e4..6266644 100644 --- a/flutter_examples/emoji_chat_app_example/ios/Runner/AppDelegate.swift +++ b/flutter_examples/emoji_chat_app_example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ -import UIKit import Flutter +import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/flutter_examples/emoji_chat_app_example/macos/Runner/AppDelegate.swift b/flutter_examples/emoji_chat_app_example/macos/Runner/AppDelegate.swift index d53ef64..8e02df2 100644 --- a/flutter_examples/emoji_chat_app_example/macos/Runner/AppDelegate.swift +++ b/flutter_examples/emoji_chat_app_example/macos/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true diff --git a/flutter_examples/emoji_chat_app_example/macos/RunnerTests/RunnerTests.swift b/flutter_examples/emoji_chat_app_example/macos/RunnerTests/RunnerTests.swift index 5418c9f..61f3bd1 100644 --- a/flutter_examples/emoji_chat_app_example/macos/RunnerTests/RunnerTests.swift +++ b/flutter_examples/emoji_chat_app_example/macos/RunnerTests/RunnerTests.swift @@ -1,5 +1,5 @@ -import FlutterMacOS import Cocoa +import FlutterMacOS import XCTest class RunnerTests: XCTestCase { diff --git a/flutter_examples/emoji_chat_app_example/pubspec.lock b/flutter_examples/emoji_chat_app_example/pubspec.lock index bca26a7..3fd8c69 100644 --- a/flutter_examples/emoji_chat_app_example/pubspec.lock +++ b/flutter_examples/emoji_chat_app_example/pubspec.lock @@ -10,20 +10,20 @@ packages: source: hosted version: "1.3.0" collection: - dependency: transitive + dependency: "direct overridden" description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" emoji_extension: dependency: "direct main" description: path: "../.." relative: true source: path - version: "1.1.1" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -33,34 +33,34 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "5.0.0" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "5.0.0" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" sky_engine: dependency: transitive description: flutter @@ -75,4 +75,4 @@ packages: source: hosted version: "2.1.4" sdks: - dart: ">=3.3.3 <4.0.0" + dart: ">=3.5.0 <4.0.0" diff --git a/flutter_examples/emoji_chat_app_example/pubspec.yaml b/flutter_examples/emoji_chat_app_example/pubspec.yaml index ff8981a..ec1461c 100644 --- a/flutter_examples/emoji_chat_app_example/pubspec.yaml +++ b/flutter_examples/emoji_chat_app_example/pubspec.yaml @@ -12,8 +12,11 @@ dependencies: flutter: sdk: flutter +dependency_overrides: + collection: ^1.19.1 + dev_dependencies: - flutter_lints: ^3.0.2 + flutter_lints: ^5.0.0 flutter: - uses-material-design: true \ No newline at end of file + uses-material-design: true diff --git a/flutter_examples/emoji_chat_app_example/web/index.html b/flutter_examples/emoji_chat_app_example/web/index.html index 7f9c6c6..f46afc3 100644 --- a/flutter_examples/emoji_chat_app_example/web/index.html +++ b/flutter_examples/emoji_chat_app_example/web/index.html @@ -31,29 +31,8 @@ emoji_chat_app_example - - - - - + diff --git a/flutter_examples/emoji_chat_app_example/windows/runner/runner.exe.manifest b/flutter_examples/emoji_chat_app_example/windows/runner/runner.exe.manifest index a42ea76..153653e 100644 --- a/flutter_examples/emoji_chat_app_example/windows/runner/runner.exe.manifest +++ b/flutter_examples/emoji_chat_app_example/windows/runner/runner.exe.manifest @@ -9,12 +9,6 @@ - - - - - - diff --git a/flutter_examples/emoji_chat_app_example/windows/runner/utils.cpp b/flutter_examples/emoji_chat_app_example/windows/runner/utils.cpp index b2b0873..3a0b465 100644 --- a/flutter_examples/emoji_chat_app_example/windows/runner/utils.cpp +++ b/flutter_examples/emoji_chat_app_example/windows/runner/utils.cpp @@ -45,13 +45,13 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) { if (utf16_string == nullptr) { return std::string(); } - int target_length = ::WideCharToMultiByte( + unsigned int target_length = ::WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, -1, nullptr, 0, nullptr, nullptr) -1; // remove the trailing null character int input_length = (int)wcslen(utf16_string); std::string utf8_string; - if (target_length <= 0 || target_length > utf8_string.max_size()) { + if (target_length == 0 || target_length > utf8_string.max_size()) { return utf8_string; } utf8_string.resize(target_length); diff --git a/flutter_examples/emoji_overview_app_example/.gitignore b/flutter_examples/emoji_overview_app_example/.gitignore index 29a3a50..79c113f 100644 --- a/flutter_examples/emoji_overview_app_example/.gitignore +++ b/flutter_examples/emoji_overview_app_example/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/flutter_examples/emoji_overview_app_example/.metadata b/flutter_examples/emoji_overview_app_example/.metadata index 32dc8a5..c2aa44b 100644 --- a/flutter_examples/emoji_overview_app_example/.metadata +++ b/flutter_examples/emoji_overview_app_example/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "300451adae589accbece3490f4396f10bdf15e6e" + revision: "603104015dd692ea3403755b55d07813d5cf8965" channel: "stable" project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: android - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: ios - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: linux - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: macos - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: web - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: windows - create_revision: 300451adae589accbece3490f4396f10bdf15e6e - base_revision: 300451adae589accbece3490f4396f10bdf15e6e + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 # User provided section diff --git a/flutter_examples/emoji_overview_app_example/android/.gitignore b/flutter_examples/emoji_overview_app_example/android/.gitignore index 6f56801..55afd91 100644 --- a/flutter_examples/emoji_overview_app_example/android/.gitignore +++ b/flutter_examples/emoji_overview_app_example/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/flutter_examples/emoji_overview_app_example/android/app/build.gradle b/flutter_examples/emoji_overview_app_example/android/app/build.gradle index 4538ea6..f1dd64a 100644 --- a/flutter_examples/emoji_overview_app_example/android/app/build.gradle +++ b/flutter_examples/emoji_overview_app_example/android/app/build.gradle @@ -1,67 +1,44 @@ plugins { id "com.android.application" id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - android { - namespace "com.example.emoji_overview_app_example" - compileSdk flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "com.example.emoji_overview_app_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + jvmTarget = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.emoji_overview_app_example" + applicationId = "com.example.emoji_overview_app_example" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' + source = "../.." } - -dependencies {} diff --git a/flutter_examples/emoji_overview_app_example/android/app/src/main/AndroidManifest.xml b/flutter_examples/emoji_overview_app_example/android/app/src/main/AndroidManifest.xml index d39bb07..04beecf 100644 --- a/flutter_examples/emoji_overview_app_example/android/app/src/main/AndroidManifest.xml +++ b/flutter_examples/emoji_overview_app_example/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" + android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" @@ -31,7 +32,7 @@ android:value="2" /> diff --git a/flutter_examples/emoji_overview_app_example/android/build.gradle b/flutter_examples/emoji_overview_app_example/android/build.gradle index bc157bd..d2ffbff 100644 --- a/flutter_examples/emoji_overview_app_example/android/build.gradle +++ b/flutter_examples/emoji_overview_app_example/android/build.gradle @@ -5,12 +5,12 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/flutter_examples/emoji_overview_app_example/android/gradle.properties b/flutter_examples/emoji_overview_app_example/android/gradle.properties index 598d13f..2597170 100644 --- a/flutter_examples/emoji_overview_app_example/android/gradle.properties +++ b/flutter_examples/emoji_overview_app_example/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/flutter_examples/emoji_overview_app_example/android/gradle/wrapper/gradle-wrapper.properties b/flutter_examples/emoji_overview_app_example/android/gradle/wrapper/gradle-wrapper.properties index e1ca574..7bb2df6 100644 --- a/flutter_examples/emoji_overview_app_example/android/gradle/wrapper/gradle-wrapper.properties +++ b/flutter_examples/emoji_overview_app_example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/flutter_examples/emoji_overview_app_example/android/settings.gradle b/flutter_examples/emoji_overview_app_example/android/settings.gradle index 1d6d19b..b9e43bd 100644 --- a/flutter_examples/emoji_overview_app_example/android/settings.gradle +++ b/flutter_examples/emoji_overview_app_example/android/settings.gradle @@ -5,10 +5,9 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() @@ -19,8 +18,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false - id "org.jetbrains.kotlin.android" version "1.7.10" apply false + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false } include ":app" diff --git a/flutter_examples/emoji_overview_app_example/ios/Runner/AppDelegate.swift b/flutter_examples/emoji_overview_app_example/ios/Runner/AppDelegate.swift index 70693e4..6266644 100644 --- a/flutter_examples/emoji_overview_app_example/ios/Runner/AppDelegate.swift +++ b/flutter_examples/emoji_overview_app_example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ -import UIKit import Flutter +import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/flutter_examples/emoji_overview_app_example/lib/home_page.dart b/flutter_examples/emoji_overview_app_example/lib/home_page.dart index 3d6e7ea..ca41562 100644 --- a/flutter_examples/emoji_overview_app_example/lib/home_page.dart +++ b/flutter_examples/emoji_overview_app_example/lib/home_page.dart @@ -20,11 +20,10 @@ class HomePage extends StatelessWidget { isScrollable: true, tabs: groups.map((g) => Tab(text: g.value)).toList()), ), - body: Expanded( - child: TabBarView( + body: TabBarView( children: groups.map((g) => EmojiList(emojis: Emojis.byGroup(g))).toList(), - )), + ), ), ); } diff --git a/flutter_examples/emoji_overview_app_example/macos/Runner/AppDelegate.swift b/flutter_examples/emoji_overview_app_example/macos/Runner/AppDelegate.swift index d53ef64..8e02df2 100644 --- a/flutter_examples/emoji_overview_app_example/macos/Runner/AppDelegate.swift +++ b/flutter_examples/emoji_overview_app_example/macos/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true diff --git a/flutter_examples/emoji_overview_app_example/macos/RunnerTests/RunnerTests.swift b/flutter_examples/emoji_overview_app_example/macos/RunnerTests/RunnerTests.swift index 5418c9f..61f3bd1 100644 --- a/flutter_examples/emoji_overview_app_example/macos/RunnerTests/RunnerTests.swift +++ b/flutter_examples/emoji_overview_app_example/macos/RunnerTests/RunnerTests.swift @@ -1,5 +1,5 @@ -import FlutterMacOS import Cocoa +import FlutterMacOS import XCTest class RunnerTests: XCTestCase { diff --git a/flutter_examples/emoji_overview_app_example/pubspec.lock b/flutter_examples/emoji_overview_app_example/pubspec.lock index bca26a7..3fd8c69 100644 --- a/flutter_examples/emoji_overview_app_example/pubspec.lock +++ b/flutter_examples/emoji_overview_app_example/pubspec.lock @@ -10,20 +10,20 @@ packages: source: hosted version: "1.3.0" collection: - dependency: transitive + dependency: "direct overridden" description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" emoji_extension: dependency: "direct main" description: path: "../.." relative: true source: path - version: "1.1.1" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -33,34 +33,34 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "5.0.0" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "5.0.0" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" sky_engine: dependency: transitive description: flutter @@ -75,4 +75,4 @@ packages: source: hosted version: "2.1.4" sdks: - dart: ">=3.3.3 <4.0.0" + dart: ">=3.5.0 <4.0.0" diff --git a/flutter_examples/emoji_overview_app_example/pubspec.yaml b/flutter_examples/emoji_overview_app_example/pubspec.yaml index 9747936..8415d0e 100644 --- a/flutter_examples/emoji_overview_app_example/pubspec.yaml +++ b/flutter_examples/emoji_overview_app_example/pubspec.yaml @@ -12,8 +12,11 @@ dependencies: flutter: sdk: flutter +dependency_overrides: + collection: ^1.19.1 + dev_dependencies: - flutter_lints: ^3.0.2 + flutter_lints: ^5.0.0 flutter: - uses-material-design: true \ No newline at end of file + uses-material-design: true diff --git a/flutter_examples/emoji_overview_app_example/web/index.html b/flutter_examples/emoji_overview_app_example/web/index.html index 04fe363..bb30968 100644 --- a/flutter_examples/emoji_overview_app_example/web/index.html +++ b/flutter_examples/emoji_overview_app_example/web/index.html @@ -31,29 +31,8 @@ emoji_overview_app_example - - - - - + diff --git a/flutter_examples/emoji_overview_app_example/windows/runner/runner.exe.manifest b/flutter_examples/emoji_overview_app_example/windows/runner/runner.exe.manifest index a42ea76..153653e 100644 --- a/flutter_examples/emoji_overview_app_example/windows/runner/runner.exe.manifest +++ b/flutter_examples/emoji_overview_app_example/windows/runner/runner.exe.manifest @@ -9,12 +9,6 @@ - - - - - - diff --git a/flutter_examples/emoji_overview_app_example/windows/runner/utils.cpp b/flutter_examples/emoji_overview_app_example/windows/runner/utils.cpp index b2b0873..3a0b465 100644 --- a/flutter_examples/emoji_overview_app_example/windows/runner/utils.cpp +++ b/flutter_examples/emoji_overview_app_example/windows/runner/utils.cpp @@ -45,13 +45,13 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) { if (utf16_string == nullptr) { return std::string(); } - int target_length = ::WideCharToMultiByte( + unsigned int target_length = ::WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, -1, nullptr, 0, nullptr, nullptr) -1; // remove the trailing null character int input_length = (int)wcslen(utf16_string); std::string utf8_string; - if (target_length <= 0 || target_length > utf8_string.max_size()) { + if (target_length == 0 || target_length > utf8_string.max_size()) { return utf8_string; } utf8_string.resize(target_length); diff --git a/lib/emoji_extension.dart b/lib/emoji_extension.dart index f8c25f5..b1ab372 100644 --- a/lib/emoji_extension.dart +++ b/lib/emoji_extension.dart @@ -1,4 +1,4 @@ -library emoji_extension; +library; import 'package:emoji_extension/src/emojis/emoji_parser/emoji_parser.dart'; diff --git a/lib/src/emojis/emoji/emoji_getters.dart b/lib/src/emojis/emoji/emoji_getters.dart index 874fe21..5ce6c2d 100644 --- a/lib/src/emojis/emoji/emoji_getters.dart +++ b/lib/src/emojis/emoji/emoji_getters.dart @@ -236,6 +236,15 @@ extension EmojiGetters on Emoji { /// ``` bool get isV15_1 => version == Version.v15_1; + /// Returns `true` if the emoji's version is v16.0. + /// + /// Example: + /// ```dart + /// Emoji('๐Ÿซฉ').isV16_0; // true + /// Emoji('๐Ÿ˜€').isV16_0; // false + /// ``` + bool get isV16_0 => version == Version.v16_0; + /// Returns `true` if the emoji belongs to the flags group. /// /// Example: diff --git a/lib/src/emojis/emoji_parser/emoji_parser_getters.dart b/lib/src/emojis/emoji_parser/emoji_parser_getters.dart index 58d2be4..fb4320e 100644 --- a/lib/src/emojis/emoji_parser/emoji_parser_getters.dart +++ b/lib/src/emojis/emoji_parser/emoji_parser_getters.dart @@ -302,7 +302,7 @@ extension EmojiParserGetters on EmojiParser { extract.forEachIndexed((i, e) { output = output.replaceFirst(e, '[$i]'); }); - extract.shuffled.forEachIndexed((i, e) { + extract.shuffled().forEachIndexed((i, e) { output = output.replaceFirst('[$i]', e); }); diff --git a/lib/src/emojis/emojis.dart b/lib/src/emojis/emojis.dart index 33a3dc2..c992c42 100644 --- a/lib/src/emojis/emojis.dart +++ b/lib/src/emojis/emojis.dart @@ -45,6 +45,9 @@ abstract class Emojis { /// Returns an unmodifiable list of all the Emoji skin tones. static List get skinTones => SkinTone.values; + /// Returns a regular expression that matches Emoji characters. + static RegExp get regex => Regex.emoji; + /// Returns a map of all the Emoji groups with their corresponding subgroups. static Map> get groupsWithSubgroups { return {for (final group in groups) group: group.subgroups}; @@ -527,6 +530,9 @@ abstract class Emojis { /// Returns a list of emojis under the Unicode 15.1 version. static List get v15_1 => byVersion(Version.v15_1); + /// Returns a list of emojis under the Unicode 16.0 version. + static List get v16_0 => byVersion(Version.v16_0); + /* ------------------------------ Status ------------------------------- */ /// Returns a list of emojis under the 'fully-qualified' status. diff --git a/lib/src/emojis/emojis_data.dart b/lib/src/emojis/emojis_data.dart index c9a0e06..df65a88 100644 --- a/lib/src/emojis/emojis_data.dart +++ b/lib/src/emojis/emojis_data.dart @@ -1037,6 +1037,22 @@ const _emojis = [ Shortcode.github(['sleeping']), Shortcode.slack(['sleeping']) ]), + Emoji._( + value: '๐Ÿซฉ', + unicode: '1FAE9', + name: 'Face with Bags Under Eyes', + alsoKnownAs: [], + group: Group.smileysAndEmotion, + subgroup: Subgroup.faceSleepy, + version: Version.v16_0, + status: Status.fullyQualified, + shortcodes: [ + Shortcode.$default(['face_with_bags_under_eyes']), + Shortcode.cldr(['face_with_bags_under_eyes']), + Shortcode.discord([]), + Shortcode.github([]), + Shortcode.slack([]) + ]), Emoji._( value: '๐Ÿ˜ท', unicode: '1F637', @@ -61139,6 +61155,22 @@ const _emojis = [ Shortcode.github(['footprints']), Shortcode.slack(['footprints']) ]), + Emoji._( + value: '๐Ÿซ†', + unicode: '1FAC6', + name: 'Fingerprint', + alsoKnownAs: [], + group: Group.peopleAndBody, + subgroup: Subgroup.personSymbol, + version: Version.v16_0, + status: Status.fullyQualified, + shortcodes: [ + Shortcode.$default(['fingerprint']), + Shortcode.cldr(['fingerprint']), + Shortcode.discord([]), + Shortcode.github([]), + Shortcode.slack([]) + ]), Emoji._( value: '๐Ÿป', unicode: '1F3FB', @@ -64003,6 +64035,22 @@ const _emojis = [ Shortcode.github(['mushroom']), Shortcode.slack(['mushroom']) ]), + Emoji._( + value: '๐Ÿชพ', + unicode: '1FABE', + name: 'Leafless Tree', + alsoKnownAs: [], + group: Group.animalsAndNature, + subgroup: Subgroup.plantOther, + version: Version.v16_0, + status: Status.fullyQualified, + shortcodes: [ + Shortcode.$default(['leafless_tree']), + Shortcode.cldr(['leafless_tree']), + Shortcode.discord([]), + Shortcode.github([]), + Shortcode.slack([]) + ]), Emoji._( value: '๐Ÿ‡', unicode: '1F347', @@ -64666,6 +64714,22 @@ const _emojis = [ Shortcode.github([]), Shortcode.slack([]) ]), + Emoji._( + value: '๐Ÿซœ', + unicode: '1FADC', + name: 'Root Vegetable', + alsoKnownAs: [], + group: Group.foodAndDrink, + subgroup: Subgroup.foodVegetable, + version: Version.v16_0, + status: Status.fullyQualified, + shortcodes: [ + Shortcode.$default(['root_vegetable']), + Shortcode.cldr(['root_vegetable']), + Shortcode.discord([]), + Shortcode.github([]), + Shortcode.slack([]) + ]), Emoji._( value: '๐Ÿž', unicode: '1F35E', @@ -73956,6 +74020,22 @@ const _emojis = [ Shortcode.github([]), Shortcode.slack([]) ]), + Emoji._( + value: '๐Ÿช‰', + unicode: '1FA89', + name: 'Harp', + alsoKnownAs: [], + group: Group.objects, + subgroup: Subgroup.musicalInstrument, + version: Version.v16_0, + status: Status.fullyQualified, + shortcodes: [ + Shortcode.$default(['harp']), + Shortcode.cldr(['harp']), + Shortcode.discord([]), + Shortcode.github([]), + Shortcode.slack([]) + ]), Emoji._( value: '๐Ÿ“ฑ', unicode: '1F4F1', @@ -76972,6 +77052,22 @@ const _emojis = [ Shortcode.github([]), Shortcode.slack(['ladder']) ]), + Emoji._( + value: '๐Ÿช', + unicode: '1FA8F', + name: 'Shovel', + alsoKnownAs: [], + group: Group.objects, + subgroup: Subgroup.tool, + version: Version.v16_0, + status: Status.fullyQualified, + shortcodes: [ + Shortcode.$default(['shovel']), + Shortcode.cldr(['shovel']), + Shortcode.discord([]), + Shortcode.github([]), + Shortcode.slack([]) + ]), Emoji._( value: 'โš—๏ธ', unicode: '2697 FE0F', @@ -81142,6 +81238,22 @@ const _emojis = [ Shortcode.github(['tm']), Shortcode.slack(['tm']) ]), + Emoji._( + value: '๐ŸซŸ', + unicode: '1FADF', + name: 'Splatter', + alsoKnownAs: [], + group: Group.symbols, + subgroup: Subgroup.otherSymbol, + version: Version.v16_0, + status: Status.fullyQualified, + shortcodes: [ + Shortcode.$default(['splatter']), + Shortcode.cldr(['splatter']), + Shortcode.discord([]), + Shortcode.github([]), + Shortcode.slack([]) + ]), Emoji._( value: '#๏ธโƒฃ', unicode: '0023 FE0F 20E3', @@ -84149,6 +84261,22 @@ const _emojis = [ Shortcode.github(['clipperton_island']), Shortcode.slack(['flag-cp']) ]), + Emoji._( + value: '๐Ÿ‡จ๐Ÿ‡ถ', + unicode: '1F1E8 1F1F6', + name: 'Flag: Sark', + alsoKnownAs: [], + group: Group.flags, + subgroup: Subgroup.countryFlag, + version: Version.v16_0, + status: Status.fullyQualified, + shortcodes: [ + Shortcode.$default(['flag_sark']), + Shortcode.cldr(['flag_sark']), + Shortcode.discord([]), + Shortcode.github([]), + Shortcode.slack([]) + ]), Emoji._( value: '๐Ÿ‡จ๐Ÿ‡ท', unicode: '1F1E8 1F1F7', diff --git a/lib/src/emojis/version.dart b/lib/src/emojis/version.dart index 95f9a4b..1be5353 100644 --- a/lib/src/emojis/version.dart +++ b/lib/src/emojis/version.dart @@ -38,7 +38,10 @@ enum Version { v15_0(15.0), /// Representation of Unicode 15.1 - v15_1(15.1); + v15_1(15.1), + + /// Representation of Unicode 16.0 + v16_0(16.0); /// Creates a new Status object with the given String value. const Version(this.value); diff --git a/lib/src/extensions/iterable_extensions.dart b/lib/src/extensions/iterable_extensions.dart index 05e580a..baf1415 100644 --- a/lib/src/extensions/iterable_extensions.dart +++ b/lib/src/extensions/iterable_extensions.dart @@ -231,12 +231,4 @@ extension IterableExtensions on Iterable { /// [].penultimateOrNull; // null /// ``` E? get penultimateOrNull => length < 2 ? null : elementAtOrNull(length - 2); - - /// Returns a new unmodifiable list containing the elements of this list in a random order. - /// - /// Example: - /// ```dart - /// [1, 2, 3, 4, 5].shuffled; // e.g. [4, 2, 5, 1, 3] - /// ``` - List get shuffled => ([...this]..shuffle()).toUnmodifiableList(); } diff --git a/lib/src/regex.dart b/lib/src/regex.dart index 40ae800..3cf1828 100644 --- a/lib/src/regex.dart +++ b/lib/src/regex.dart @@ -5,9 +5,9 @@ abstract class Regex { Regex._(); /// A regular expression for matching Unicode emoji characters. - /// Borrowed from: https://github.com/mathiasbynens/emoji-test-regex-pattern/blob/main/dist/emoji-15.1/javascript-u.txt + /// Borrowed from: https://github.com/mathiasbynens/emoji-test-regex-pattern/blob/main/dist/emoji-16.0/javascript-u.txt static final emoji = RegExp( - r'[#*\d]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}]\uFE0F?|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]?|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}\u{1FAC3}-\u{1FAC5}\u{1FAF0}\u{1FAF2}-\u{1FAF8}][\u{1F3FB}-\u{1F3FF}]?|[\u{1F3C3}\u{1F6B6}\u{1F9CE}][\u{1F3FB}-\u{1F3FF}]?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|[\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}\u{1F6B5}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\u{1F46F}\u{1F9DE}\u{1F9DF}](?:\u200D[\u2640\u2642]\uFE0F?)?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F343}\u{1F345}-\u{1F34A}\u{1F34C}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F425}\u{1F427}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F641}\u{1F643}\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6DC}-\u{1F6DF}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CC}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA88}\u{1FA90}-\u{1FABD}\u{1FABF}-\u{1FAC2}\u{1FACE}-\u{1FADB}\u{1FAE0}-\u{1FAE8}]|\u26D3\uFE0F?(?:\u200D\u{1F4A5})?|\u2764\uFE0F?(?:\u200D[\u{1F525}\u{1FA79}])?|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1F4}\u{1F1F2}|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1F6}\u{1F1E6}|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FD}\u{1F1F0}|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F344}(?:\u200D\u{1F7EB})?|\u{1F34B}(?:\u200D\u{1F7E9})?|\u{1F3F3}\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\u{1F308}))?|\u{1F3F4}(?:\u200D\u2620\uFE0F?|\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F})?|\u{1F408}(?:\u200D\u2B1B)?|\u{1F415}(?:\u200D\u{1F9BA})?|\u{1F426}(?:\u200D[\u2B1B\u{1F525}])?|\u{1F43B}(?:\u200D\u2744\uFE0F?)?|\u{1F441}\uFE0F?(?:\u200D\u{1F5E8}\uFE0F?)?|\u{1F468}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}(?:\u200D\u{1F466})?|\u{1F467}(?:\u200D[\u{1F466}\u{1F467}])?)|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}|\u{1F466}(?:\u200D\u{1F466})?|\u{1F467}(?:\u200D[\u{1F466}\u{1F467}])?)|\u{1F3FB}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]))?|\u{1F3FC}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]))?|\u{1F3FD}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]))?|\u{1F3FE}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]))?|\u{1F3FF}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]))?)?|\u{1F469}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?[\u{1F468}\u{1F469}]|\u{1F466}(?:\u200D\u{1F466})?|\u{1F467}(?:\u200D[\u{1F466}\u{1F467}])?|\u{1F469}\u200D(?:\u{1F466}(?:\u200D\u{1F466})?|\u{1F467}(?:\u200D[\u{1F466}\u{1F467}])?))|\u{1F3FB}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FC}-\u{1F3FF}]))?|\u{1F3FC}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FB}\u{1F3FD}-\u{1F3FF}]))?|\u{1F3FD}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]))?|\u{1F3FE}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FB}-\u{1F3FD}\u{1F3FF}]))?|\u{1F3FF}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FB}-\u{1F3FE}]))?)?|\u{1F62E}(?:\u200D\u{1F4A8})?|\u{1F635}(?:\u200D\u{1F4AB})?|\u{1F636}(?:\u200D\u{1F32B}\uFE0F?)?|\u{1F642}(?:\u200D[\u2194\u2195]\uFE0F?)?|\u{1F93C}(?:[\u{1F3FB}-\u{1F3FF}]|\u200D[\u2640\u2642]\uFE0F?)?|\u{1F9D1}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u{1F91D}\u200D\u{1F9D1}|\u{1F9D1}\u200D\u{1F9D2}(?:\u200D\u{1F9D2})?|\u{1F9D2}(?:\u200D\u{1F9D2})?)|\u{1F3FB}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FC}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?|\u{1F3FC}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?|\u{1F3FD}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?|\u{1F3FE}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?|\u{1F3FF}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FB}-\u{1F3FE}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?)?|\u{1FAF1}(?:\u{1F3FB}(?:\u200D\u{1FAF2}[\u{1F3FC}-\u{1F3FF}])?|\u{1F3FC}(?:\u200D\u{1FAF2}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}])?|\u{1F3FD}(?:\u200D\u{1FAF2}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}])?|\u{1F3FE}(?:\u200D\u{1FAF2}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}])?|\u{1F3FF}(?:\u200D\u{1FAF2}[\u{1F3FB}-\u{1F3FE}])?)?', + r'[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}]\uFE0F?|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]?|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}\u{1FAC3}-\u{1FAC5}\u{1FAF0}\u{1FAF2}-\u{1FAF8}][\u{1F3FB}-\u{1F3FF}]?|[\u{1F3C3}\u{1F6B6}\u{1F9CE}][\u{1F3FB}-\u{1F3FF}]?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|[\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}\u{1F6B5}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\u{1F46F}\u{1F9DE}\u{1F9DF}](?:\u200D[\u2640\u2642]\uFE0F?)?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F343}\u{1F345}-\u{1F34A}\u{1F34C}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F425}\u{1F427}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F641}\u{1F643}\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6DC}-\u{1F6DF}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CC}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC2}\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}]|\u26D3\uFE0F?(?:\u200D\u{1F4A5})?|\u2764\uFE0F?(?:\u200D[\u{1F525}\u{1FA79}])?|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1F4}\u{1F1F2}|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1F6}\u{1F1E6}|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FD}\u{1F1F0}|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F344}(?:\u200D\u{1F7EB})?|\u{1F34B}(?:\u200D\u{1F7E9})?|\u{1F3F3}\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\u{1F308}))?|\u{1F3F4}(?:\u200D\u2620\uFE0F?|\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F})?|\u{1F408}(?:\u200D\u2B1B)?|\u{1F415}(?:\u200D\u{1F9BA})?|\u{1F426}(?:\u200D[\u2B1B\u{1F525}])?|\u{1F43B}(?:\u200D\u2744\uFE0F?)?|\u{1F441}\uFE0F?(?:\u200D\u{1F5E8}\uFE0F?)?|\u{1F468}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}(?:\u200D\u{1F466})?|\u{1F467}(?:\u200D[\u{1F466}\u{1F467}])?)|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}|\u{1F466}(?:\u200D\u{1F466})?|\u{1F467}(?:\u200D[\u{1F466}\u{1F467}])?)|\u{1F3FB}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]))?|\u{1F3FC}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]))?|\u{1F3FD}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]))?|\u{1F3FE}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]))?|\u{1F3FF}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]))?)?|\u{1F469}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?[\u{1F468}\u{1F469}]|\u{1F466}(?:\u200D\u{1F466})?|\u{1F467}(?:\u200D[\u{1F466}\u{1F467}])?|\u{1F469}\u200D(?:\u{1F466}(?:\u200D\u{1F466})?|\u{1F467}(?:\u200D[\u{1F466}\u{1F467}])?))|\u{1F3FB}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FC}-\u{1F3FF}]))?|\u{1F3FC}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FB}\u{1F3FD}-\u{1F3FF}]))?|\u{1F3FD}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]))?|\u{1F3FE}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FB}-\u{1F3FD}\u{1F3FF}]))?|\u{1F3FF}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:[\u{1F468}\u{1F469}]|\u{1F48B}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FF}]|\u{1F91D}\u200D[\u{1F468}\u{1F469}][\u{1F3FB}-\u{1F3FE}]))?)?|\u{1F62E}(?:\u200D\u{1F4A8})?|\u{1F635}(?:\u200D\u{1F4AB})?|\u{1F636}(?:\u200D\u{1F32B}\uFE0F?)?|\u{1F642}(?:\u200D[\u2194\u2195]\uFE0F?)?|\u{1F93C}(?:[\u{1F3FB}-\u{1F3FF}]|\u200D[\u2640\u2642]\uFE0F?)?|\u{1F9D1}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u{1F91D}\u200D\u{1F9D1}|\u{1F9D1}\u200D\u{1F9D2}(?:\u200D\u{1F9D2})?|\u{1F9D2}(?:\u200D\u{1F9D2})?)|\u{1F3FB}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FC}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?|\u{1F3FC}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?|\u{1F3FD}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?|\u{1F3FE}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?|\u{1F3FF}(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|[\u{1F9AF}\u{1F9BC}\u{1F9BD}](?:\u200D\u27A1\uFE0F?)?|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9B0}-\u{1F9B3}]|\u2764\uFE0F?\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}[\u{1F3FB}-\u{1F3FE}]|\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]))?)?|\u{1FAF1}(?:\u{1F3FB}(?:\u200D\u{1FAF2}[\u{1F3FC}-\u{1F3FF}])?|\u{1F3FC}(?:\u200D\u{1FAF2}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}])?|\u{1F3FD}(?:\u200D\u{1FAF2}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}])?|\u{1F3FE}(?:\u200D\u{1FAF2}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}])?|\u{1F3FF}(?:\u200D\u{1FAF2}[\u{1F3FB}-\u{1F3FE}])?)?', unicode: true); /// A regular expression for matching emoji shortcodes. diff --git a/pubspec.yaml b/pubspec.yaml index 7be819c..92679a6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,19 +1,19 @@ name: emoji_extension -description: Emojis for Flutter & Dart (Unicode 15.1) + one, yet powerful emojis String extension -version: 1.1.1 +description: Emojis for Flutter & Dart (Unicode 16.0) + one, yet powerful emojis String extension +version: 1.2.0 repository: https://github.com/Nikoro/emoji_extension issue_tracker: https://github.com/Nikoro/emoji_extension/issues topics: [emoji, emojis, collection, unicode] environment: - sdk: '>=2.18.6 <4.0.0' + sdk: ^3.4.0 dependencies: - collection: ^1.18.0 + collection: ^1.19.1 dev_dependencies: - test: ^1.25.4 - flutter_lints: ^3.0.2 + test: ^1.25.14 + flutter_lints: ^5.0.0 screenshots: - description: The emoji extension logo @@ -21,4 +21,4 @@ screenshots: - description: Emoji Overview App demo path: flutter_examples/emoji_overview_app_example/demo.webp - description: Emoji Chat App demo - path: flutter_examples/emoji_chat_app_example/demo.webp \ No newline at end of file + path: flutter_examples/emoji_chat_app_example/demo.webp diff --git a/test/_tools/test_emojis.dart b/test/_tools/test_emojis.dart index c627704..f82c3eb 100644 --- a/test/_tools/test_emojis.dart +++ b/test/_tools/test_emojis.dart @@ -69,6 +69,7 @@ abstract class TestEmojis { '๐Ÿ˜ช', '๐Ÿคค', '๐Ÿ˜ด', + '๐Ÿซฉ', '๐Ÿ˜ท', '๐Ÿค’', '๐Ÿค•', @@ -3482,6 +3483,7 @@ abstract class TestEmojis { '๐Ÿง‘โ€๐Ÿง’', '๐Ÿง‘โ€๐Ÿง’โ€๐Ÿง’', '๐Ÿ‘ฃ', + '๐Ÿซ†', '๐Ÿป', '๐Ÿผ', '๐Ÿฝ', @@ -3651,6 +3653,7 @@ abstract class TestEmojis { '๐Ÿชน', '๐Ÿชบ', '๐Ÿ„', + '๐Ÿชพ', '๐Ÿ‡', '๐Ÿˆ', '๐Ÿ‰', @@ -3690,6 +3693,7 @@ abstract class TestEmojis { '๐Ÿซš', '๐Ÿซ›', '๐Ÿ„โ€๐ŸŸซ', + '๐Ÿซœ', '๐Ÿž', '๐Ÿฅ', '๐Ÿฅ–', @@ -4233,6 +4237,7 @@ abstract class TestEmojis { '๐Ÿช˜', '๐Ÿช‡', '๐Ÿชˆ', + '๐Ÿช‰', '๐Ÿ“ฑ', '๐Ÿ“ฒ', 'โ˜Ž๏ธ', @@ -4410,6 +4415,7 @@ abstract class TestEmojis { '๐Ÿงฐ', '๐Ÿงฒ', '๐Ÿชœ', + '๐Ÿช', 'โš—๏ธ', 'โš—', '๐Ÿงช', @@ -4655,6 +4661,7 @@ abstract class TestEmojis { 'ยฎ', 'โ„ข๏ธ', 'โ„ข', + '๐ŸซŸ', '#๏ธโƒฃ', '#โƒฃ', '*๏ธโƒฃ', @@ -4832,6 +4839,7 @@ abstract class TestEmojis { '๐Ÿ‡จ๐Ÿ‡ณ', '๐Ÿ‡จ๐Ÿ‡ด', '๐Ÿ‡จ๐Ÿ‡ต', + '๐Ÿ‡จ๐Ÿ‡ถ', '๐Ÿ‡จ๐Ÿ‡ท', '๐Ÿ‡จ๐Ÿ‡บ', '๐Ÿ‡จ๐Ÿ‡ป', @@ -5041,6 +5049,6 @@ abstract class TestEmojis { '๐Ÿ‡ฟ๐Ÿ‡ผ', '๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ', '๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ', - '๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ', + '๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ' ]; } diff --git a/test/src/emojis/emoji/emoji_getters_test.dart b/test/src/emojis/emoji/emoji_getters_test.dart index 09d0686..5951d07 100644 --- a/test/src/emojis/emoji/emoji_getters_test.dart +++ b/test/src/emojis/emoji/emoji_getters_test.dart @@ -155,6 +155,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV6_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV6_0, expected); @@ -175,6 +176,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV7_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV7_0, expected); @@ -195,6 +197,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV8_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV8_0, expected); @@ -215,6 +218,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV9_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV9_0, expected); @@ -235,6 +239,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV10_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV10_0, expected); @@ -255,6 +260,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV11_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV11_0, expected); @@ -275,6 +281,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV12_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV12_0, expected); @@ -295,6 +302,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV12_1 returns $expected when emoji is: $input', () { expect(Emoji(input).isV12_1, expected); @@ -315,6 +323,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV13_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV13_0, expected); @@ -335,6 +344,7 @@ void main() { '๐Ÿชธ': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV13_1 returns $expected when emoji is: $input', () { expect(Emoji(input).isV13_1, expected); @@ -355,6 +365,7 @@ void main() { '๐Ÿ’๐Ÿป': false, '๐Ÿชผ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV14_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV14_0, expected); @@ -375,6 +386,7 @@ void main() { '๐Ÿ’๐Ÿป': false, '๐Ÿชธ': false, '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿซฉ': false, }).forEach((input, expected) { test('isV15_0 returns $expected when emoji is: $input', () { expect(Emoji(input).isV15_0, expected); @@ -401,6 +413,27 @@ void main() { }); }); + $({ + '๐Ÿซฉ': true, + '๐Ÿ‹โ€๐ŸŸฉ': false, + '๐Ÿ˜ƒ': false, + '๐Ÿ˜': false, + '๐Ÿ˜‘': false, + '๐Ÿคฅ': false, + '๐Ÿคฎ': false, + '๐Ÿฅต': false, + '๐Ÿฅฑ': false, + '๐Ÿง‘โ€๐Ÿฆฐ': false, + '๐Ÿฅท': false, + '๐Ÿ’๐Ÿป': false, + '๐Ÿชธ': false, + '๐Ÿชผ': false, + }).forEach((input, expected) { + test('isV16_0 returns $expected when emoji is: $input', () { + expect(Emoji(input).isV16_0, expected); + }); + }); + $({ '๐Ÿ': true, '๐Ÿ˜ƒ': false, diff --git a/test/src/emojis/emojis_test.dart b/test/src/emojis/emojis_test.dart index c55e86e..c6ec199 100644 --- a/test/src/emojis/emojis_test.dart +++ b/test/src/emojis/emojis_test.dart @@ -1,4 +1,5 @@ import 'package:emoji_extension/emoji_extension.dart'; +import 'package:emoji_extension/src/regex.dart'; import 'package:test/test.dart'; import '../../_tools/tools.dart'; @@ -6,7 +7,7 @@ import '../../_tools/tools.dart'; void main() { group('Emojis', () { test('count returns correct value', () { - expect(Emojis.count, 5034); + expect(Emojis.count, 5042); }); test('groups returns correct value', () { @@ -37,6 +38,10 @@ void main() { expect(Emojis.skinTones, SkinTone.values); }); + test('regex returns correct value', () { + expect(Emojis.regex, Regex.emoji); + }); + test('groupsWithSubgroups returns correct type', () { expect(Emojis.groupsWithSubgroups, isA>>()); }); @@ -101,16 +106,16 @@ void main() { }); $({ - Group.smileysAndEmotion: 184, - Group.peopleAndBody: 3290, + Group.smileysAndEmotion: 185, + Group.peopleAndBody: 3291, Group.component: 9, - Group.animalsAndNature: 160, - Group.foodAndDrink: 137, + Group.animalsAndNature: 161, + Group.foodAndDrink: 138, Group.travelAndPlaces: 267, Group.activities: 96, - Group.objects: 312, - Group.symbols: 304, - Group.flags: 275, + Group.objects: 314, + Group.symbols: 305, + Group.flags: 276, }).forEach((input, expected) { test('byGroup() returns $expected emojis when group is: [${input.name}]', () { @@ -124,7 +129,7 @@ void main() { Subgroup.faceTongue: 6, Subgroup.faceHand: 7, Subgroup.faceNeutralSkeptical: 19, - Subgroup.faceSleepy: 5, + Subgroup.faceSleepy: 6, Subgroup.faceUnwell: 12, Subgroup.faceHat: 3, Subgroup.faceGlasses: 3, @@ -150,7 +155,7 @@ void main() { Subgroup.personSport: 395, Subgroup.personResting: 42, Subgroup.family: 533, - Subgroup.personSymbol: 11, + Subgroup.personSymbol: 12, Subgroup.skinTone: 5, Subgroup.hairStyle: 4, Subgroup.animalMammal: 68, @@ -160,9 +165,9 @@ void main() { Subgroup.animalMarine: 12, Subgroup.animalBug: 18, Subgroup.plantFlower: 13, - Subgroup.plantOther: 17, + Subgroup.plantOther: 18, Subgroup.foodFruit: 20, - Subgroup.foodVegetable: 19, + Subgroup.foodVegetable: 20, Subgroup.foodPrepared: 34, Subgroup.foodAsian: 17, Subgroup.foodMarine: 5, @@ -188,7 +193,7 @@ void main() { Subgroup.clothing: 50, Subgroup.sound: 9, Subgroup.music: 12, - Subgroup.musicalInstrument: 11, + Subgroup.musicalInstrument: 12, Subgroup.phone: 7, Subgroup.computer: 19, Subgroup.lightAndVideo: 19, @@ -198,7 +203,7 @@ void main() { Subgroup.writing: 13, Subgroup.office: 31, Subgroup.lock: 7, - Subgroup.tool: 37, + Subgroup.tool: 38, Subgroup.science: 8, Subgroup.medical: 7, Subgroup.household: 27, @@ -213,16 +218,16 @@ void main() { Subgroup.math: 8, Subgroup.punctuation: 10, Subgroup.currency: 2, - Subgroup.otherSymbol: 33, + Subgroup.otherSymbol: 34, Subgroup.keycap: 25, Subgroup.alphanum: 49, Subgroup.geometric: 38, Subgroup.flag: 14, - Subgroup.countryFlag: 258, + Subgroup.countryFlag: 259, Subgroup.subdivisionFlag: 3, }).forEach((input, expected) { test( - 'bySubgroup() returns $expected emojis when group is: [${input.name}]', + 'bySubgroup() returns $expected emojis when subgroup is: [${input.name}]', () { expect(Emojis.bySubgroup(input).length, expected); }); @@ -242,6 +247,7 @@ void main() { Version.v14_0: 112, Version.v15_0: 31, Version.v15_1: 301, + Version.v16_0: 8, }).forEach((input, expected) { test( 'byVersion() returns $expected emojis when version is: [${input.name}]', @@ -251,7 +257,7 @@ void main() { }); $({ - Status.fullyQualified: 3773, + Status.fullyQualified: 3781, Status.minimallyQualified: 1009, Status.unqualified: 243, Status.component: 9, @@ -316,16 +322,16 @@ void main() { }); $({ - Emojis.smileysAndEmotion: 184, - Emojis.peopleAndBody: 3290, + Emojis.smileysAndEmotion: 185, + Emojis.peopleAndBody: 3291, Emojis.component: 9, - Emojis.animalsAndNature: 160, - Emojis.foodAndDrink: 137, + Emojis.animalsAndNature: 161, + Emojis.foodAndDrink: 138, Emojis.travelAndPlaces: 267, Emojis.activities: 96, - Emojis.objects: 312, - Emojis.symbols: 304, - Emojis.flags: 275, + Emojis.objects: 314, + Emojis.symbols: 305, + Emojis.flags: 276, }).forEach((input, expected) { test('returns $expected emojis', () { expect(input.length, expected); @@ -338,7 +344,7 @@ void main() { Emojis.faceTongue: 6, Emojis.faceHand: 7, Emojis.faceNeutralSkeptical: 19, - Emojis.faceSleepy: 5, + Emojis.faceSleepy: 6, Emojis.faceUnwell: 12, Emojis.faceHat: 3, Emojis.faceGlasses: 3, @@ -364,7 +370,7 @@ void main() { Emojis.personSport: 395, Emojis.personResting: 42, Emojis.family: 533, - Emojis.personSymbol: 11, + Emojis.personSymbol: 12, Emojis.skinTone: 5, Emojis.hairStyle: 4, Emojis.animalMammal: 68, @@ -374,9 +380,9 @@ void main() { Emojis.animalMarine: 12, Emojis.animalBug: 18, Emojis.plantFlower: 13, - Emojis.plantOther: 17, + Emojis.plantOther: 18, Emojis.foodFruit: 20, - Emojis.foodVegetable: 19, + Emojis.foodVegetable: 20, Emojis.foodPrepared: 34, Emojis.foodAsian: 17, Emojis.foodMarine: 5, @@ -402,7 +408,7 @@ void main() { Emojis.clothing: 50, Emojis.sound: 9, Emojis.music: 12, - Emojis.musicalInstrument: 11, + Emojis.musicalInstrument: 12, Emojis.phone: 7, Emojis.computer: 19, Emojis.lightAndVideo: 19, @@ -412,7 +418,7 @@ void main() { Emojis.writing: 13, Emojis.office: 31, Emojis.lock: 7, - Emojis.tool: 37, + Emojis.tool: 38, Emojis.science: 8, Emojis.medical: 7, Emojis.household: 27, @@ -427,12 +433,12 @@ void main() { Emojis.math: 8, Emojis.punctuation: 10, Emojis.currency: 2, - Emojis.otherSymbol: 33, + Emojis.otherSymbol: 34, Emojis.keycap: 25, Emojis.alphanum: 49, Emojis.geometric: 38, Emojis.flag: 14, - Emojis.countryFlag: 258, + Emojis.countryFlag: 259, Emojis.subdivisionFlag: 3, }).forEach((input, expected) { test('returns $expected emojis', () { @@ -454,6 +460,7 @@ void main() { Emojis.v14_0: 112, Emojis.v15_0: 31, Emojis.v15_1: 301, + Emojis.v16_0: 8, }).forEach((input, expected) { test('returns $expected emojis', () { expect(input.length, expected); @@ -461,7 +468,7 @@ void main() { }); $({ - Emojis.fullyQualified: 3773, + Emojis.fullyQualified: 3781, Emojis.minimallyQualified: 1009, Emojis.unqualified: 243, }).forEach((input, expected) { diff --git a/test/src/emojis/version_test.dart b/test/src/emojis/version_test.dart index ce4d5b6..6bfe62b 100644 --- a/test/src/emojis/version_test.dart +++ b/test/src/emojis/version_test.dart @@ -6,7 +6,7 @@ import '../../_tools/tools.dart'; void main() { group('Version', () { test('values count', () { - expect(Version.values.length, 13); + expect(Version.values.length, 14); }); $({ @@ -23,6 +23,7 @@ void main() { 14.0: Version.v14_0, 15.0: Version.v15_0, 15.1: Version.v15_1, + 16.0: Version.v16_0, }).forEach((input, expected) { test('from returns returns $expected when input is: [$input]', () { expect(Version.from(input), expected); diff --git a/test/src/extensions/iterable_extensions_test.dart b/test/src/extensions/iterable_extensions_test.dart index 4a64369..4c5b73b 100644 --- a/test/src/extensions/iterable_extensions_test.dart +++ b/test/src/extensions/iterable_extensions_test.dart @@ -251,16 +251,5 @@ void main() { expect(result, equals([1, 2, 3, 4, 5])); }); }); - - group('shuffled', () { - test('returns a shuffled version of the list', () { - final list = [1, 2, 3, 4, 5]; - final shuffledList = list.shuffled; - - expect( - const DeepCollectionEquality.unordered().equals(shuffledList, list), - true); - }); - }); }); } diff --git a/test/src/regex_test.dart b/test/src/regex_test.dart new file mode 100644 index 0000000..66c3ddf --- /dev/null +++ b/test/src/regex_test.dart @@ -0,0 +1,127 @@ +import 'package:emoji_extension/src/regex.dart'; +import 'package:test/test.dart'; + +import '../_tools/tools.dart'; + +void main() { + group('Regex', () { + test('emoji should match all available emojis up to version 16.0', + () async { + final text = TestEmojis.values.join(); + + final extracted = + Regex.emoji.allMatches(text).map((m) => m.group(0)).toList(); + + expect(extracted, TestEmojis.values); + }); + }); + + $({ + 'man': true, + 'Man': true, + 'MAN': true, + 'woman': false, + 'Woman': false, + 'WOMAN': false, + }).forEach((input, expected) { + test('man should ${expected ? '' : 'not'} match $input', () { + expect(Regex.man.hasMatch(input), expected); + }); + }); + + $({ + 'woman': true, + 'Woman': true, + 'WOMAN': true, + 'man': false, + 'Man': false, + 'MAN': false, + }).forEach((input, expected) { + test('woman should ${expected ? '' : 'not'} match $input', () { + expect(Regex.woman.hasMatch(input), expected); + }); + }); + + $({ + 'face': true, + 'Face': true, + 'FACE': true, + 'random text': false, + }).forEach((input, expected) { + test('face should ${expected ? '' : 'not'} match $input', () { + expect(Regex.face.hasMatch(input), expected); + }); + }); + + $({ + '1F3FB': true, // Light skin tone + '1F3FC': true, // Medium-light skin tone + '1F3FD': true, // Medium skin tone + '1F3FE': true, // Medium-dark skin tone + '1F3FF': true, // Dark skin tone + '1F3FA': false, // Out of range (not a valid skin tone) + '1F400': false, // Completely unrelated code point + '1F3FB and 1F3FC': true, // Contains a valid match + 'No skin tone here': false, // No match + }).forEach((input, expected) { + test('skinTone should ${expected ? '' : 'not'} match $input', () { + expect(Regex.skinTone.hasMatch(input), expected); + }); + }); + + $({ + '1F9B0': true, // Blonde hair + '1F9B1': true, // Red hair + '1F9B2': true, // White hair + '1F9B3': true, // Bald + '1F471': true, // Person with blond hair + '1F9B4': false, // Out of range (not a valid hairstyle) + '1F470': false, // A related but different Unicode character + '1F9B0 and 1F471': true, // Contains valid matches + 'No hairstyle emoji here': false, // No match + }).forEach((input, expected) { + test('hairStyle should ${expected ? '' : 'not'} match $input', () { + expect(Regex.hairStyle.hasMatch(input), expected); + }); + }); + + $({ + 'red': true, + 'pink': true, + 'orange': true, + 'yellow': true, + 'green': true, + 'blue': true, + 'light blue': true, + 'purple': true, + 'brown': true, + 'black': true, + 'grey': true, + 'white': true, + 'Red': true, + 'Pink': true, + 'Light Blue': true, + 'text': false, + 'gold': false, + }).forEach((input, expected) { + test('color should ${expected ? '' : 'not'} match $input', () { + expect(Regex.color.hasMatch(input), expected); + }); + }); + + $({ + '1F9D4 200D 2642 FE0F': true, // Valid: Beard emoji + '1F9D4 1F3FD 200D 2642 FE0F': + true, // Valid: Beard emoji with skin tone modifier + '1F9D4 1F3FB': true, // Valid: Beard emoji with light skin tone modifier + '1F9D4 1F3FE': + true, // Valid: Beard emoji with medium dark skin tone modifier + 'Hello 1F9D4': true, // Valid: Beard emoji in text + '12345': false, // Invalid: Random text that doesnโ€™t match the emoji + '': false, // Invalid: Empty string + }).forEach((input, expected) { + test('beard should ${expected ? '' : 'not'} match $input', () { + expect(Regex.beard.hasMatch(input), expected); + }); + }); +}