- 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
52 lines
1.8 KiB
JavaScript
52 lines
1.8 KiB
JavaScript
'use strict';
|
|
|
|
var YAMLSeq = require('../nodes/YAMLSeq.js');
|
|
var resolveProps = require('./resolve-props.js');
|
|
var utilFlowIndentCheck = require('./util-flow-indent-check.js');
|
|
|
|
function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
|
|
const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq;
|
|
const seq = new NodeClass(ctx.schema);
|
|
if (ctx.atRoot)
|
|
ctx.atRoot = false;
|
|
if (ctx.atKey)
|
|
ctx.atKey = false;
|
|
let offset = bs.offset;
|
|
let commentEnd = null;
|
|
for (const { start, value } of bs.items) {
|
|
const props = resolveProps.resolveProps(start, {
|
|
indicator: 'seq-item-ind',
|
|
next: value,
|
|
offset,
|
|
onError,
|
|
parentIndent: bs.indent,
|
|
startOnNewline: true
|
|
});
|
|
if (!props.found) {
|
|
if (props.anchor || props.tag || value) {
|
|
if (value?.type === 'block-seq')
|
|
onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');
|
|
else
|
|
onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
|
|
}
|
|
else {
|
|
commentEnd = props.end;
|
|
if (props.comment)
|
|
seq.comment = props.comment;
|
|
continue;
|
|
}
|
|
}
|
|
const node = value
|
|
? composeNode(ctx, value, props, onError)
|
|
: composeEmptyNode(ctx, props.end, start, null, props, onError);
|
|
if (ctx.schema.compat)
|
|
utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
|
|
offset = node.range[2];
|
|
seq.items.push(node);
|
|
}
|
|
seq.range = [bs.offset, offset, commentEnd ?? offset];
|
|
return seq;
|
|
}
|
|
|
|
exports.resolveBlockSeq = resolveBlockSeq;
|