- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
57 lines
1.6 KiB
C++
57 lines
1.6 KiB
C++
#include "ReanimatedRuntime.h"
|
|
|
|
#include <cxxreact/MessageQueueThread.h>
|
|
#include <jsi/jsi.h>
|
|
|
|
#include <memory>
|
|
#include <utility>
|
|
|
|
#if JS_RUNTIME_HERMES
|
|
#include "ReanimatedHermesRuntime.h"
|
|
#elif JS_RUNTIME_V8
|
|
#include <v8runtime/V8RuntimeFactory.h>
|
|
#else
|
|
#if REACT_NATIVE_MINOR_VERSION >= 71
|
|
#include <jsc/JSCRuntime.h>
|
|
#else
|
|
#include <jsi/JSCRuntime.h>
|
|
#endif // REACT_NATIVE_MINOR_VERSION
|
|
#endif // JS_RUNTIME
|
|
|
|
namespace reanimated {
|
|
|
|
using namespace facebook;
|
|
using namespace react;
|
|
|
|
std::shared_ptr<jsi::Runtime> ReanimatedRuntime::make(
|
|
jsi::Runtime &rnRuntime,
|
|
const std::shared_ptr<MessageQueueThread> &jsQueue,
|
|
const std::string &name) {
|
|
(void)rnRuntime; // used only for V8
|
|
#if JS_RUNTIME_HERMES
|
|
// We don't call `jsQueue->quitSynchronous()` here, since it will be done
|
|
// later in ReanimatedHermesRuntime
|
|
|
|
auto runtime = facebook::hermes::makeHermesRuntime();
|
|
return std::make_shared<ReanimatedHermesRuntime>(
|
|
std::move(runtime), jsQueue, name);
|
|
#elif JS_RUNTIME_V8
|
|
// This is required by iOS, because there is an assertion in the destructor
|
|
// that the thread was indeed `quit` before.
|
|
jsQueue->quitSynchronous();
|
|
|
|
auto config = std::make_unique<rnv8::V8RuntimeConfig>();
|
|
config->enableInspector = false;
|
|
config->appName = name;
|
|
return rnv8::createSharedV8Runtime(&rnRuntime, std::move(config));
|
|
#else
|
|
// This is required by iOS, because there is an assertion in the destructor
|
|
// that the thread was indeed `quit` before
|
|
jsQueue->quitSynchronous();
|
|
|
|
return facebook::jsc::makeJSCRuntime();
|
|
#endif
|
|
}
|
|
|
|
} // namespace reanimated
|