- 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
29 lines
1001 B
TypeScript
29 lines
1001 B
TypeScript
import { __ as block } from 'bs-platform/lib/es6/block';
|
|
import { talkbackPlaceholder } from './Wonka_helpers.bs';
|
|
|
|
import {
|
|
talkbackT,
|
|
signalT
|
|
} from '../Wonka_types.gen';
|
|
|
|
type talkbackCb = (tb: talkbackT) => void;
|
|
|
|
export const pull = (0 as any as talkbackT);
|
|
export const close = (1 as any as talkbackT);
|
|
|
|
export const start = <a>(tb: talkbackCb): signalT<a> => block(0, [tb]) as any;
|
|
export const push = <a>(x: a): signalT<a> => block(1, [x]) as any;
|
|
export const end = <a>(): signalT<a> => 0 as any;
|
|
|
|
export const isStart = <a>(s: signalT<a>) =>
|
|
typeof s !== 'number' && (s as any).tag === 0;
|
|
export const isPush = <a>(s: signalT<a>) =>
|
|
typeof s !== 'number' && (s as any).tag === 1;
|
|
export const isEnd = <a>(s: signalT<a>) =>
|
|
typeof s === 'number' && (s as any) === 0;
|
|
|
|
export const unboxPush = <a>(s: signalT<a>): a | null =>
|
|
isPush(s) ? (s as any)[0] : null;
|
|
export const unboxStart = <a>(s: signalT<a>): talkbackCb =>
|
|
isStart(s) ? (s as any)[0] : (talkbackPlaceholder as any);
|