- 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
47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
'use strict';
|
|
/* eslint-disable yoda */
|
|
module.exports = x => {
|
|
if (Number.isNaN(x)) {
|
|
return false;
|
|
}
|
|
|
|
// code points are derived from:
|
|
// http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt
|
|
if (
|
|
x >= 0x1100 && (
|
|
x <= 0x115f || // Hangul Jamo
|
|
x === 0x2329 || // LEFT-POINTING ANGLE BRACKET
|
|
x === 0x232a || // RIGHT-POINTING ANGLE BRACKET
|
|
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
(0x2e80 <= x && x <= 0x3247 && x !== 0x303f) ||
|
|
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
(0x3250 <= x && x <= 0x4dbf) ||
|
|
// CJK Unified Ideographs .. Yi Radicals
|
|
(0x4e00 <= x && x <= 0xa4c6) ||
|
|
// Hangul Jamo Extended-A
|
|
(0xa960 <= x && x <= 0xa97c) ||
|
|
// Hangul Syllables
|
|
(0xac00 <= x && x <= 0xd7a3) ||
|
|
// CJK Compatibility Ideographs
|
|
(0xf900 <= x && x <= 0xfaff) ||
|
|
// Vertical Forms
|
|
(0xfe10 <= x && x <= 0xfe19) ||
|
|
// CJK Compatibility Forms .. Small Form Variants
|
|
(0xfe30 <= x && x <= 0xfe6b) ||
|
|
// Halfwidth and Fullwidth Forms
|
|
(0xff01 <= x && x <= 0xff60) ||
|
|
(0xffe0 <= x && x <= 0xffe6) ||
|
|
// Kana Supplement
|
|
(0x1b000 <= x && x <= 0x1b001) ||
|
|
// Enclosed Ideographic Supplement
|
|
(0x1f200 <= x && x <= 0x1f251) ||
|
|
// CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
(0x20000 <= x && x <= 0x3fffd)
|
|
)
|
|
) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
};
|