";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ B93AA6C22BF4163000E27710 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 007BDAD72BFD546B0004BCBF /* Config.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEAD_CODE_STRIPPING = YES;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MACOSX_DEPLOYMENT_TARGET = 14.4;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_BUNDLE_IDENTIFIER = com.epam.lexical.developerTools;
+ SDKROOT = macosx;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ };
+ name = Debug;
+ };
+ B93AA6C32BF4163000E27710 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 007BDAD72BFD546B0004BCBF /* Config.xcconfig */;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEAD_CODE_STRIPPING = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu17;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+ MACOSX_DEPLOYMENT_TARGET = 14.4;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ PRODUCT_BUNDLE_IDENTIFIER = com.epam.lexical.developerTools;
+ SDKROOT = macosx;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ };
+ name = Release;
+ };
+ B93AA6C52BF4163000E27710 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_ENTITLEMENTS = "Lexical Developer Tools Extension/Lexical_Developer_Tools_Extension.entitlements";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = "$(VERSION).$(BUILD_VERSION)";
+ DEAD_CODE_STRIPPING = YES;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=macosx*]" = K36CA7QL4T;
+ ENABLE_HARDENED_RUNTIME = YES;
+ GENERATE_INFOPLIST_FILE = YES;
+ INFOPLIST_FILE = "Lexical Developer Tools Extension/Info.plist";
+ INFOPLIST_KEY_CFBundleDisplayName = "Lexical Developer Tools Extension";
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
+ INFOPLIST_KEY_NSHumanReadableCopyright = "";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ "@executable_path/../../../../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ MARKETING_VERSION = "$(VERSION).$(BUILD_VERSION)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ SafariServices,
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.epam.lexical.developerTools.safariExt;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Lexical Developer Safari Extension";
+ SKIP_INSTALL = YES;
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+ B93AA6C62BF4163000E27710 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_ENTITLEMENTS = "Lexical Developer Tools Extension/Lexical_Developer_Tools_Extension.entitlements";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = "$(VERSION).$(BUILD_VERSION)";
+ DEAD_CODE_STRIPPING = YES;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=macosx*]" = K36CA7QL4T;
+ ENABLE_HARDENED_RUNTIME = YES;
+ GENERATE_INFOPLIST_FILE = YES;
+ INFOPLIST_FILE = "Lexical Developer Tools Extension/Info.plist";
+ INFOPLIST_KEY_CFBundleDisplayName = "Lexical Developer Tools Extension";
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
+ INFOPLIST_KEY_NSHumanReadableCopyright = "";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ "@executable_path/../../../../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ MARKETING_VERSION = "$(VERSION).$(BUILD_VERSION)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ SafariServices,
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.epam.lexical.developerTools.safariExt;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "Lexical Developer Safari Extension";
+ SKIP_INSTALL = YES;
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+ B93AA6C92BF4163000E27710 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CODE_SIGN_ENTITLEMENTS = "Lexical Developer Tools/Lexical Developer Tools.entitlements";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
+ CODE_SIGN_STYLE = Manual;
+ COMBINE_HIDPI_IMAGES = YES;
+ CURRENT_PROJECT_VERSION = "$(VERSION).$(BUILD_VERSION)";
+ DEAD_CODE_STRIPPING = YES;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=macosx*]" = K36CA7QL4T;
+ ENABLE_HARDENED_RUNTIME = YES;
+ GENERATE_INFOPLIST_FILE = YES;
+ INFOPLIST_FILE = "Lexical Developer Tools/Info.plist";
+ INFOPLIST_KEY_CFBundleDisplayName = "Lexical Developer Tools";
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
+ INFOPLIST_KEY_NSHumanReadableCopyright = "";
+ INFOPLIST_KEY_NSMainStoryboardFile = Main;
+ INFOPLIST_KEY_NSPrincipalClass = NSApplication;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ MARKETING_VERSION = "$(VERSION).$(BUILD_VERSION)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ SafariServices,
+ "-framework",
+ WebKit,
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.epam.lexical.developerTools;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "EPAM Lexical Mac App Store Distribution";
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+ B93AA6CA2BF4163000E27710 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+ CODE_SIGN_ENTITLEMENTS = "Lexical Developer Tools/Lexical Developer Tools.entitlements";
+ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
+ CODE_SIGN_STYLE = Manual;
+ COMBINE_HIDPI_IMAGES = YES;
+ CURRENT_PROJECT_VERSION = "$(VERSION).$(BUILD_VERSION)";
+ DEAD_CODE_STRIPPING = YES;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=macosx*]" = K36CA7QL4T;
+ ENABLE_HARDENED_RUNTIME = YES;
+ GENERATE_INFOPLIST_FILE = YES;
+ INFOPLIST_FILE = "Lexical Developer Tools/Info.plist";
+ INFOPLIST_KEY_CFBundleDisplayName = "Lexical Developer Tools";
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
+ INFOPLIST_KEY_NSHumanReadableCopyright = "";
+ INFOPLIST_KEY_NSMainStoryboardFile = Main;
+ INFOPLIST_KEY_NSPrincipalClass = NSApplication;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+ MARKETING_VERSION = "$(VERSION).$(BUILD_VERSION)";
+ OTHER_LDFLAGS = (
+ "-framework",
+ SafariServices,
+ "-framework",
+ WebKit,
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.epam.lexical.developerTools;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "EPAM Lexical Mac App Store Distribution";
+ SWIFT_EMIT_LOC_STRINGS = YES;
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ B93AA6972BF4162B00E27710 /* Build configuration list for PBXProject "Lexical Developer Tools" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ B93AA6C22BF4163000E27710 /* Debug */,
+ B93AA6C32BF4163000E27710 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ B93AA6C42BF4163000E27710 /* Build configuration list for PBXNativeTarget "Lexical Developer Tools Extension" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ B93AA6C52BF4163000E27710 /* Debug */,
+ B93AA6C62BF4163000E27710 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ B93AA6C82BF4163000E27710 /* Build configuration list for PBXNativeTarget "Lexical Developer Tools" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ B93AA6C92BF4163000E27710 /* Debug */,
+ B93AA6CA2BF4163000E27710 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = B93AA6942BF4162B00E27710 /* Project object */;
+}
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/AppDelegate.swift b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/AppDelegate.swift
new file mode 100644
index 000000000000..de47fe2b2ceb
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/AppDelegate.swift
@@ -0,0 +1,21 @@
+//
+// AppDelegate.swift
+// Lexical Developer Tools
+//
+// Created by Vladlen Fedosov on 5/14/24.
+//
+
+import Cocoa
+
+@main
+class AppDelegate: NSObject, NSApplicationDelegate {
+
+ func applicationDidFinishLaunching(_ notification: Notification) {
+ // Override point for customization after application launch.
+ }
+
+ func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
+ return true
+ }
+
+}
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AccentColor.colorset/Contents.json b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AccentColor.colorset/Contents.json
new file mode 100644
index 000000000000..0afb3cf0eec8
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AccentColor.colorset/Contents.json
@@ -0,0 +1,11 @@
+{
+ "colors": [
+ {
+ "idiom": "universal"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 000000000000..50cb3489e09c
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,68 @@
+{
+ "images": [
+ {
+ "size": "16x16",
+ "idiom": "mac",
+ "filename": "mac-icon-16@1x.png",
+ "scale": "1x"
+ },
+ {
+ "size": "16x16",
+ "idiom": "mac",
+ "filename": "mac-icon-16@2x.png",
+ "scale": "2x"
+ },
+ {
+ "size": "32x32",
+ "idiom": "mac",
+ "filename": "mac-icon-32@1x.png",
+ "scale": "1x"
+ },
+ {
+ "size": "32x32",
+ "idiom": "mac",
+ "filename": "mac-icon-32@2x.png",
+ "scale": "2x"
+ },
+ {
+ "size": "128x128",
+ "idiom": "mac",
+ "filename": "mac-icon-128@1x.png",
+ "scale": "1x"
+ },
+ {
+ "size": "128x128",
+ "idiom": "mac",
+ "filename": "mac-icon-128@2x.png",
+ "scale": "2x"
+ },
+ {
+ "size": "256x256",
+ "idiom": "mac",
+ "filename": "mac-icon-256@1x.png",
+ "scale": "1x"
+ },
+ {
+ "size": "256x256",
+ "idiom": "mac",
+ "filename": "mac-icon-256@2x.png",
+ "scale": "2x"
+ },
+ {
+ "size": "512x512",
+ "idiom": "mac",
+ "filename": "mac-icon-512@1x.png",
+ "scale": "1x"
+ },
+ {
+ "size": "512x512",
+ "idiom": "mac",
+ "filename": "mac-icon-512@2x.png",
+ "scale": "2x"
+ }
+ ],
+ "info": {
+ "version": 1,
+ "author": "xcode"
+ }
+}
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png
new file mode 100644
index 000000000000..30fe8673387b
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png
new file mode 100644
index 000000000000..9c42895401d1
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png
new file mode 100644
index 000000000000..755c05b5deec
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png
new file mode 100644
index 000000000000..15410bfb48bb
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png
new file mode 100644
index 000000000000..9c42895401d1
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png
new file mode 100644
index 000000000000..7cf9eb717c3b
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png
new file mode 100644
index 000000000000..15410bfb48bb
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png
new file mode 100644
index 000000000000..890b4217b9dc
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png
new file mode 100644
index 000000000000..7cf9eb717c3b
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png
new file mode 100644
index 000000000000..456c99a52086
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/Contents.json b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/Contents.json
new file mode 100644
index 000000000000..74d6a722cf39
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/LargeIcon.imageset/Contents.json b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/LargeIcon.imageset/Contents.json
new file mode 100644
index 000000000000..ae524e7542bd
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/LargeIcon.imageset/Contents.json
@@ -0,0 +1,20 @@
+{
+ "images": [
+ {
+ "idiom": "universal",
+ "scale": "1x"
+ },
+ {
+ "idiom": "universal",
+ "scale": "2x"
+ },
+ {
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Base.lproj/Main.html b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Base.lproj/Main.html
new file mode 100644
index 000000000000..acdfbf974e73
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Base.lproj/Main.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ You can turn on Lexical Developer Tools’s extension in Safari Extensions
+ preferences.
+
+
+ Lexical Developer Tools’s extension is currently on. You can turn it off
+ in Safari Extensions preferences.
+
+
+ Lexical Developer Tools’s extension is currently off. You can turn it on
+ in Safari Extensions preferences.
+
+
+
+
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Base.lproj/Main.storyboard b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Base.lproj/Main.storyboard
new file mode 100644
index 000000000000..bdfbba66b047
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Base.lproj/Main.storyboard
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Info.plist b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Info.plist
new file mode 100644
index 000000000000..04ed2a4fb0ab
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Info.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ SFSafariWebExtensionConverterVersion
+ 15.3
+
+
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Lexical Developer Tools.entitlements b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Lexical Developer Tools.entitlements
new file mode 100644
index 000000000000..625af03d99b2
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Lexical Developer Tools.entitlements
@@ -0,0 +1,12 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.files.user-selected.read-only
+
+ com.apple.security.network.client
+
+
+
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Lexical_Developer_Tools.entitlements b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Lexical_Developer_Tools.entitlements
new file mode 100644
index 000000000000..18aff0ce43c2
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Lexical_Developer_Tools.entitlements
@@ -0,0 +1,10 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.files.user-selected.read-only
+
+
+
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Icon.png b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Icon.png
new file mode 100644
index 000000000000..5028124debf6
Binary files /dev/null and b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Icon.png differ
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Script.js b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Script.js
new file mode 100644
index 000000000000..052594e82bcf
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Script.js
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+/* eslint-disable strict */
+
+// eslint-disable-next-line no-unused-vars
+function show(enabled, useSettingsInsteadOfPreferences) {
+ if (useSettingsInsteadOfPreferences) {
+ document.getElementsByClassName('state-on')[0].innerText =
+ 'Lexical Developer Tools’s extension is currently on. You can turn it off in the Extensions section of Safari Settings.';
+ document.getElementsByClassName('state-off')[0].innerText =
+ 'Lexical Developer Tools’s extension is currently off. You can turn it on in the Extensions section of Safari Settings.';
+ document.getElementsByClassName('state-unknown')[0].innerText =
+ 'You can turn on Lexical Developer Tools’s extension in the Extensions section of Safari Settings.';
+ document.getElementsByClassName('open-preferences')[0].innerText =
+ 'Quit and Open Safari Settings…';
+ }
+
+ if (typeof enabled === 'boolean') {
+ document.body.classList.toggle(`state-on`, enabled);
+ document.body.classList.toggle(`state-off`, !enabled);
+ } else {
+ document.body.classList.remove(`state-on`);
+ document.body.classList.remove(`state-off`);
+ }
+}
+
+function openPreferences() {
+ // eslint-disable-next-line no-undef
+ webkit.messageHandlers.controller.postMessage('open-preferences');
+}
+
+document
+ .querySelector('button.open-preferences')
+ .addEventListener('click', openPreferences);
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Style.css b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Style.css
new file mode 100644
index 000000000000..ef4dcde3314b
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Style.css
@@ -0,0 +1,45 @@
+* {
+ -webkit-user-select: none;
+ -webkit-user-drag: none;
+ cursor: default;
+}
+
+:root {
+ color-scheme: light dark;
+
+ --spacing: 20px;
+}
+
+html {
+ height: 100%;
+}
+
+body {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+
+ gap: var(--spacing);
+ margin: 0 calc(var(--spacing) * 2);
+ height: 100%;
+
+ font: -apple-system-short-body;
+ text-align: center;
+}
+
+body:not(.state-on, .state-off) :is(.state-on, .state-off) {
+ display: none;
+}
+
+body.state-on :is(.state-off, .state-unknown) {
+ display: none;
+}
+
+body.state-off :is(.state-on, .state-unknown) {
+ display: none;
+}
+
+button {
+ font-size: 1em;
+}
diff --git a/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/ViewController.swift b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/ViewController.swift
new file mode 100644
index 000000000000..5b64734dc377
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/ViewController.swift
@@ -0,0 +1,57 @@
+//
+// ViewController.swift
+// Lexical Developer Tools
+//
+// Created by Vladlen Fedosov on 5/14/24.
+//
+
+import Cocoa
+import SafariServices
+import WebKit
+
+let extensionBundleIdentifier = "dev.lexical.Lexical-Developer-Tools.Extension"
+
+class ViewController: NSViewController, WKNavigationDelegate, WKScriptMessageHandler {
+
+ @IBOutlet var webView: WKWebView!
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ self.webView.navigationDelegate = self
+
+ self.webView.configuration.userContentController.add(self, name: "controller")
+
+ self.webView.loadFileURL(Bundle.main.url(forResource: "Main", withExtension: "html")!, allowingReadAccessTo: Bundle.main.resourceURL!)
+ }
+
+ func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
+ SFSafariExtensionManager.getStateOfSafariExtension(withIdentifier: extensionBundleIdentifier) { (state, error) in
+ guard let state = state, error == nil else {
+ // Insert code to inform the user that something went wrong.
+ return
+ }
+
+ DispatchQueue.main.async {
+ if #available(macOS 13, *) {
+ webView.evaluateJavaScript("show(\(state.isEnabled), true)")
+ } else {
+ webView.evaluateJavaScript("show(\(state.isEnabled), false)")
+ }
+ }
+ }
+ }
+
+ func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
+ if (message.body as! String != "open-preferences") {
+ return;
+ }
+
+ SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error in
+ DispatchQueue.main.async {
+ NSApplication.shared.terminate(nil)
+ }
+ }
+ }
+
+}
diff --git a/packages/lexical-devtools/safari-xcode/versioning.mjs b/packages/lexical-devtools/safari-xcode/versioning.mjs
new file mode 100644
index 000000000000..fef05884a480
--- /dev/null
+++ b/packages/lexical-devtools/safari-xcode/versioning.mjs
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+import fs from 'fs';
+import path from 'path';
+
+const version = JSON.parse(
+ fs
+ .readFileSync(path.resolve(import.meta.dirname, '..', 'package.json'))
+ .toString(),
+).version;
+
+const [v1, v2, v3] = version.split('.');
+
+// App Store requires a version number in the format of X.X.X and we need to fit a build number there as well
+const versionNormalized = `${v1}${v2}.${v3}`;
+
+let buildVersion = 0; // For dev purposes
+if (process.env.BUILD_VERSION) {
+ buildVersion = parseInt(process.env.BUILD_VERSION, 10);
+}
+if (isNaN(buildVersion)) {
+ throw new Error('BUILD_VERSION must be a number');
+}
+
+// Print to STDERR for user to see
+console.error(`Using version: ${versionNormalized}.${buildVersion}`);
+// Print to STDOUT for scripts to pick up
+// eslint-disable-next-line no-console
+console.log(`${versionNormalized}.${buildVersion}`);
+
+fs.writeFileSync(
+ path.resolve(
+ import.meta.dirname,
+ 'Lexical Developer Tools/VersioningConfig.xcconfig',
+ ),
+ `VERSION=${versionNormalized}\nBUILD_VERSION=${buildVersion}\n`,
+ {encoding: 'utf8', flag: 'w'},
+);
diff --git a/packages/lexical-devtools/src/entrypoints/background/ActionIconWatchdog.ts b/packages/lexical-devtools/src/entrypoints/background/ActionIconWatchdog.ts
index ee27b29348be..849720fba842 100644
--- a/packages/lexical-devtools/src/entrypoints/background/ActionIconWatchdog.ts
+++ b/packages/lexical-devtools/src/entrypoints/background/ActionIconWatchdog.ts
@@ -8,7 +8,7 @@
import type {Tabs} from 'wxt/browser';
import type {StoreApi} from 'zustand';
-import {IS_FIREFOX} from 'shared/environment';
+import {IS_FIREFOX, IS_SAFARI} from 'shared/environment';
import {ExtensionState} from '../../store';
@@ -39,7 +39,8 @@ export default class ActionIconWatchdog {
lexicalBuildType: 'restricted' | 'enabled',
tabId: number,
) {
- const action = IS_FIREFOX ? browser.browserAction : browser.action;
+ const action =
+ IS_FIREFOX || IS_SAFARI ? browser.browserAction : browser.action;
await action.setIcon({
path: {