4runr-os 1.0.46 → 1.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -34
- package/dist/index.js.map +1 -1
- package/dist/ui/v3/collectors/resources.d.ts +23 -0
- package/dist/ui/v3/collectors/resources.d.ts.map +1 -0
- package/dist/ui/v3/collectors/resources.js +117 -0
- package/dist/ui/v3/collectors/resources.js.map +1 -0
- package/dist/ui/v3/commands/commandResult.d.ts +25 -0
- package/dist/ui/v3/commands/commandResult.d.ts.map +1 -0
- package/dist/ui/v3/commands/commandResult.js +19 -0
- package/dist/ui/v3/commands/commandResult.js.map +1 -0
- package/dist/ui/v3/commands/parser.d.ts +14 -0
- package/dist/ui/v3/commands/parser.d.ts.map +1 -0
- package/dist/ui/v3/commands/parser.js +29 -0
- package/dist/ui/v3/commands/parser.js.map +1 -0
- package/dist/ui/v3/commands/router.d.ts +13 -0
- package/dist/ui/v3/commands/router.d.ts.map +1 -0
- package/dist/ui/v3/commands/router.js +69 -0
- package/dist/ui/v3/commands/router.js.map +1 -0
- package/dist/ui/v3/core/event.d.ts +19 -0
- package/dist/ui/v3/core/event.d.ts.map +1 -0
- package/dist/ui/v3/core/event.js +7 -0
- package/dist/ui/v3/core/event.js.map +1 -0
- package/dist/ui/v3/core/eventBus.d.ts +33 -0
- package/dist/ui/v3/core/eventBus.d.ts.map +1 -0
- package/dist/ui/v3/core/eventBus.js +78 -0
- package/dist/ui/v3/core/eventBus.js.map +1 -0
- package/dist/ui/v3/index.d.ts +8 -0
- package/dist/ui/v3/index.d.ts.map +1 -0
- package/dist/ui/v3/index.js +30 -0
- package/dist/ui/v3/index.js.map +1 -0
- package/dist/ui/v3/state/defaultState.d.ts +9 -0
- package/dist/ui/v3/state/defaultState.d.ts.map +1 -0
- package/dist/ui/v3/state/defaultState.js +11 -0
- package/dist/ui/v3/state/defaultState.js.map +1 -0
- package/dist/ui/v3/state/feedModel.d.ts +49 -0
- package/dist/ui/v3/state/feedModel.d.ts.map +1 -0
- package/dist/ui/v3/state/feedModel.js +84 -0
- package/dist/ui/v3/state/feedModel.js.map +1 -0
- package/dist/ui/v3/state/resourcesData.d.ts +15 -0
- package/dist/ui/v3/state/resourcesData.d.ts.map +1 -0
- package/dist/ui/v3/state/resourcesData.js +7 -0
- package/dist/ui/v3/state/resourcesData.js.map +1 -0
- package/dist/ui/v3/state/uiState.d.ts +12 -0
- package/dist/ui/v3/state/uiState.d.ts.map +1 -0
- package/dist/ui/v3/state/uiState.js +8 -0
- package/dist/ui/v3/state/uiState.js.map +1 -0
- package/dist/ui/v3/state/uiStateBuilder.d.ts +16 -0
- package/dist/ui/v3/state/uiStateBuilder.d.ts.map +1 -0
- package/dist/ui/v3/state/uiStateBuilder.js +35 -0
- package/dist/ui/v3/state/uiStateBuilder.js.map +1 -0
- package/dist/ui/v3/state/value.d.ts +39 -0
- package/dist/ui/v3/state/value.d.ts.map +1 -0
- package/dist/ui/v3/state/value.js +31 -0
- package/dist/ui/v3/state/value.js.map +1 -0
- package/dist/ui/v3/ui/focus.d.ts +28 -0
- package/dist/ui/v3/ui/focus.d.ts.map +1 -0
- package/dist/ui/v3/ui/focus.js +38 -0
- package/dist/ui/v3/ui/focus.js.map +1 -0
- package/dist/ui/v3/ui/layout/hubLayout.d.ts +43 -0
- package/dist/ui/v3/ui/layout/hubLayout.d.ts.map +1 -0
- package/dist/ui/v3/ui/layout/hubLayout.js +170 -0
- package/dist/ui/v3/ui/layout/hubLayout.js.map +1 -0
- package/dist/ui/v3/ui/layout/phase1Layout.d.ts +34 -0
- package/dist/ui/v3/ui/layout/phase1Layout.d.ts.map +1 -0
- package/dist/ui/v3/ui/layout/phase1Layout.js +107 -0
- package/dist/ui/v3/ui/layout/phase1Layout.js.map +1 -0
- package/dist/ui/v3/ui/minimalRuntime.d.ts +14 -0
- package/dist/ui/v3/ui/minimalRuntime.d.ts.map +1 -0
- package/dist/ui/v3/ui/minimalRuntime.js +111 -0
- package/dist/ui/v3/ui/minimalRuntime.js.map +1 -0
- package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts +16 -0
- package/dist/ui/v3/ui/panels/ResourcesPanel.d.ts.map +1 -0
- package/dist/ui/v3/ui/panels/ResourcesPanel.js +46 -0
- package/dist/ui/v3/ui/panels/ResourcesPanel.js.map +1 -0
- package/dist/ui/v3/ui/phase1Runtime.d.ts +22 -0
- package/dist/ui/v3/ui/phase1Runtime.d.ts.map +1 -0
- package/dist/ui/v3/ui/phase1Runtime.js +574 -0
- package/dist/ui/v3/ui/phase1Runtime.js.map +1 -0
- package/dist/ui/v3/ui/primitives/Panel.d.ts +39 -0
- package/dist/ui/v3/ui/primitives/Panel.d.ts.map +1 -0
- package/dist/ui/v3/ui/primitives/Panel.js +105 -0
- package/dist/ui/v3/ui/primitives/Panel.js.map +1 -0
- package/dist/ui/v3/ui/theme.d.ts +37 -0
- package/dist/ui/v3/ui/theme.d.ts.map +1 -0
- package/dist/ui/v3/ui/theme.js +40 -0
- package/dist/ui/v3/ui/theme.js.map +1 -0
- package/dist/ui/v3/ui/widgets/CommandLine.d.ts +26 -0
- package/dist/ui/v3/ui/widgets/CommandLine.d.ts.map +1 -0
- package/dist/ui/v3/ui/widgets/CommandLine.js +67 -0
- package/dist/ui/v3/ui/widgets/CommandLine.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operations Feed Model (Phase 3)
|
|
3
|
+
*
|
|
4
|
+
* Feed store that subscribes to EventBus.
|
|
5
|
+
* All events flow through EventBus → feedStore.
|
|
6
|
+
*/
|
|
7
|
+
import { eventBus } from '../core/eventBus.js';
|
|
8
|
+
/**
|
|
9
|
+
* Feed store (singleton)
|
|
10
|
+
* Subscribes to EventBus on initialization
|
|
11
|
+
*/
|
|
12
|
+
class FeedStore {
|
|
13
|
+
events = [];
|
|
14
|
+
maxEvents = 1000; // Keep last 1000 events in memory
|
|
15
|
+
unsubscribe = null;
|
|
16
|
+
constructor() {
|
|
17
|
+
// Subscribe to EventBus on initialization
|
|
18
|
+
this.unsubscribe = eventBus.subscribe((event) => {
|
|
19
|
+
this.append(event);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Add event to feed (called by EventBus subscription)
|
|
24
|
+
*/
|
|
25
|
+
append(event) {
|
|
26
|
+
this.events.push(event);
|
|
27
|
+
// Trim if too many events
|
|
28
|
+
if (this.events.length > this.maxEvents) {
|
|
29
|
+
this.events = this.events.slice(-this.maxEvents);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Clear all events
|
|
34
|
+
* Does not break subscription - feed continues receiving new events
|
|
35
|
+
*/
|
|
36
|
+
clear() {
|
|
37
|
+
this.events = [];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get all events
|
|
41
|
+
*/
|
|
42
|
+
getAll() {
|
|
43
|
+
return [...this.events];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get latest N events
|
|
47
|
+
*/
|
|
48
|
+
getLast(count) {
|
|
49
|
+
return this.events.slice(-count);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get event count
|
|
53
|
+
*/
|
|
54
|
+
getCount() {
|
|
55
|
+
return this.events.length;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Cleanup (unsubscribe from EventBus)
|
|
59
|
+
*/
|
|
60
|
+
destroy() {
|
|
61
|
+
if (this.unsubscribe) {
|
|
62
|
+
this.unsubscribe();
|
|
63
|
+
this.unsubscribe = null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Singleton instance (subscribes to EventBus on creation)
|
|
68
|
+
export const feedStore = new FeedStore();
|
|
69
|
+
/**
|
|
70
|
+
* Format timestamp (number) to HH:MM:SS
|
|
71
|
+
*/
|
|
72
|
+
export function formatTimestamp(ts) {
|
|
73
|
+
try {
|
|
74
|
+
const date = new Date(ts);
|
|
75
|
+
const hours = date.getHours().toString().padStart(2, '0');
|
|
76
|
+
const minutes = date.getMinutes().toString().padStart(2, '0');
|
|
77
|
+
const seconds = date.getSeconds().toString().padStart(2, '0');
|
|
78
|
+
return `${hours}:${minutes}:${seconds}`;
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return '00:00:00';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=feedModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedModel.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/feedModel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C;;;GAGG;AACH,MAAM,SAAS;IACL,MAAM,GAAY,EAAE,CAAC;IACrB,SAAS,GAAG,IAAI,CAAC,CAAC,kCAAkC;IACpD,WAAW,GAAwB,IAAI,CAAC;IAEhD;QACE,0CAA0C;QAC1C,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,KAAY,EAAE,EAAE;YACrD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,KAAY;QACzB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAExB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YACxC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,OA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ract for system resources metrics.
|
|
5
|
+
*/
|
|
6
|
+
export interface ResourcesData {
|
|
7
|
+
cpuPercent: number;
|
|
8
|
+
load1: number;
|
|
9
|
+
ramUsedMB: number;
|
|
10
|
+
ramTotalMB: number;
|
|
11
|
+
diskUsedGB: number;
|
|
12
|
+
diskTotalGB: number;
|
|
13
|
+
uptimeSeconds: number;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=resourcesData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourcesData.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/resourcesData.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourcesData.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/resourcesData.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UiState (Phase 4)
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for UI state.
|
|
5
|
+
* All panels render from UiState only.
|
|
6
|
+
*/
|
|
7
|
+
import type { Value } from './value.js';
|
|
8
|
+
import type { ResourcesData } from './resourcesData.js';
|
|
9
|
+
export interface UiState {
|
|
10
|
+
resources: Value<ResourcesData>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=uiState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiState.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAKjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiState.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiState.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UiState Builder (Phase 4)
|
|
3
|
+
*
|
|
4
|
+
* Builds the complete UiState from collectors.
|
|
5
|
+
* This is the single source of truth for UI data.
|
|
6
|
+
*/
|
|
7
|
+
import type { UiState } from './uiState.js';
|
|
8
|
+
/**
|
|
9
|
+
* Build the current UiState
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildUiState(): Promise<UiState>;
|
|
12
|
+
/**
|
|
13
|
+
* Get the last built state (for immediate access without async)
|
|
14
|
+
*/
|
|
15
|
+
export declare function getLastState(): UiState;
|
|
16
|
+
//# sourceMappingURL=uiStateBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiStateBuilder.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAa5C;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,CAWrD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UiState Builder (Phase 4)
|
|
3
|
+
*
|
|
4
|
+
* Builds the complete UiState from collectors.
|
|
5
|
+
* This is the single source of truth for UI data.
|
|
6
|
+
*/
|
|
7
|
+
import { defaultUiState } from './defaultState.js';
|
|
8
|
+
import { collectResources } from '../collectors/resources.js';
|
|
9
|
+
/**
|
|
10
|
+
* Build UiState from collectors
|
|
11
|
+
*
|
|
12
|
+
* Refresh rate: 1-2 seconds (configurable via COLLECTOR_INTERVAL)
|
|
13
|
+
*/
|
|
14
|
+
const COLLECTOR_INTERVAL = 1500; // ms
|
|
15
|
+
let lastState = defaultUiState;
|
|
16
|
+
/**
|
|
17
|
+
* Build the current UiState
|
|
18
|
+
*/
|
|
19
|
+
export async function buildUiState() {
|
|
20
|
+
// Collect resources
|
|
21
|
+
const resources = await collectResources();
|
|
22
|
+
// Build state
|
|
23
|
+
const state = {
|
|
24
|
+
resources,
|
|
25
|
+
};
|
|
26
|
+
lastState = state;
|
|
27
|
+
return state;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the last built state (for immediate access without async)
|
|
31
|
+
*/
|
|
32
|
+
export function getLastState() {
|
|
33
|
+
return lastState;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=uiStateBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiStateBuilder.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/uiStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,IAAI,CAAC,CAAC,KAAK;AAEtC,IAAI,SAAS,GAAY,cAAc,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,oBAAoB;IACpB,MAAM,SAAS,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAE3C,cAAc;IACd,MAAM,KAAK,GAAY;QACrB,SAAS;KACV,CAAC;IAEF,SAAS,GAAG,KAAK,CAAC;IAClB,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value Protocol (Phase 4)
|
|
3
|
+
*
|
|
4
|
+
* Explicit availability semantics for data.
|
|
5
|
+
* Prevents fake values and blank panels.
|
|
6
|
+
*/
|
|
7
|
+
export type ValueStatus = 'AVAILABLE' | 'UNAVAILABLE';
|
|
8
|
+
export type Value<T> = {
|
|
9
|
+
status: 'AVAILABLE';
|
|
10
|
+
data: T;
|
|
11
|
+
} | {
|
|
12
|
+
status: 'UNAVAILABLE';
|
|
13
|
+
reason: string;
|
|
14
|
+
nextAction?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Create an AVAILABLE value
|
|
18
|
+
*/
|
|
19
|
+
export declare function available<T>(data: T): Value<T>;
|
|
20
|
+
/**
|
|
21
|
+
* Create an UNAVAILABLE value
|
|
22
|
+
*/
|
|
23
|
+
export declare function unavailable<T>(reason: string, nextAction?: string): Value<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Type guard: check if value is AVAILABLE
|
|
26
|
+
*/
|
|
27
|
+
export declare function isAvailable<T>(value: Value<T>): value is {
|
|
28
|
+
status: 'AVAILABLE';
|
|
29
|
+
data: T;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Type guard: check if value is UNAVAILABLE
|
|
33
|
+
*/
|
|
34
|
+
export declare function isUnavailable<T>(value: Value<T>): value is {
|
|
35
|
+
status: 'UNAVAILABLE';
|
|
36
|
+
reason: string;
|
|
37
|
+
nextAction?: string;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/state/value.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC;AAEtD,MAAM,MAAM,KAAK,CAAC,CAAC,IACf;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAChC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAE9C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAE5E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAEzF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,CAEzH"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value Protocol (Phase 4)
|
|
3
|
+
*
|
|
4
|
+
* Explicit availability semantics for data.
|
|
5
|
+
* Prevents fake values and blank panels.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Create an AVAILABLE value
|
|
9
|
+
*/
|
|
10
|
+
export function available(data) {
|
|
11
|
+
return { status: 'AVAILABLE', data };
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create an UNAVAILABLE value
|
|
15
|
+
*/
|
|
16
|
+
export function unavailable(reason, nextAction) {
|
|
17
|
+
return { status: 'UNAVAILABLE', reason, nextAction };
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Type guard: check if value is AVAILABLE
|
|
21
|
+
*/
|
|
22
|
+
export function isAvailable(value) {
|
|
23
|
+
return value.status === 'AVAILABLE';
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Type guard: check if value is UNAVAILABLE
|
|
27
|
+
*/
|
|
28
|
+
export function isUnavailable(value) {
|
|
29
|
+
return value.status === 'UNAVAILABLE';
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../src/ui/v3/state/value.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;GAEG;AACH,MAAM,UAAU,SAAS,CAAI,IAAO;IAClC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAI,MAAc,EAAE,UAAmB;IAChE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAI,KAAe;IAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,WAAW,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAI,KAAe;IAC9C,OAAO,KAAK,CAAC,MAAM,KAAK,aAAa,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus State Machine
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for input focus.
|
|
5
|
+
* Prevents panels from receiving input.
|
|
6
|
+
*/
|
|
7
|
+
export type FocusMode = "HUB" | "COMMAND" | "PALETTE";
|
|
8
|
+
/**
|
|
9
|
+
* Get current focus mode
|
|
10
|
+
*/
|
|
11
|
+
export declare function getFocusMode(): FocusMode;
|
|
12
|
+
/**
|
|
13
|
+
* Set focus mode
|
|
14
|
+
*/
|
|
15
|
+
export declare function setFocusMode(mode: FocusMode): void;
|
|
16
|
+
/**
|
|
17
|
+
* Check if command line is focused
|
|
18
|
+
*/
|
|
19
|
+
export declare function isCommandFocused(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Check if palette is focused
|
|
22
|
+
*/
|
|
23
|
+
export declare function isPaletteFocused(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Check if hub is focused (default state)
|
|
26
|
+
*/
|
|
27
|
+
export declare function isHubFocused(): boolean;
|
|
28
|
+
//# sourceMappingURL=focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../../src/ui/v3/ui/focus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;AAItD;;GAEG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAExC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAElD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focus State Machine
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for input focus.
|
|
5
|
+
* Prevents panels from receiving input.
|
|
6
|
+
*/
|
|
7
|
+
let currentFocus = "HUB";
|
|
8
|
+
/**
|
|
9
|
+
* Get current focus mode
|
|
10
|
+
*/
|
|
11
|
+
export function getFocusMode() {
|
|
12
|
+
return currentFocus;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Set focus mode
|
|
16
|
+
*/
|
|
17
|
+
export function setFocusMode(mode) {
|
|
18
|
+
currentFocus = mode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Check if command line is focused
|
|
22
|
+
*/
|
|
23
|
+
export function isCommandFocused() {
|
|
24
|
+
return currentFocus === "COMMAND";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if palette is focused
|
|
28
|
+
*/
|
|
29
|
+
export function isPaletteFocused() {
|
|
30
|
+
return currentFocus === "PALETTE";
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if hub is focused (default state)
|
|
34
|
+
*/
|
|
35
|
+
export function isHubFocused() {
|
|
36
|
+
return currentFocus === "HUB";
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=focus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus.js","sourceRoot":"","sources":["../../../../src/ui/v3/ui/focus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,IAAI,YAAY,GAAc,KAAK,CAAC;AAEpC;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAe;IAC1C,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,YAAY,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,YAAY,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,YAAY,KAAK,KAAK,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hub Layout Calculator
|
|
3
|
+
*
|
|
4
|
+
* Pure function to compute panel positions and sizes.
|
|
5
|
+
* NO blessed logic here - just math.
|
|
6
|
+
*/
|
|
7
|
+
export interface BoxRect {
|
|
8
|
+
top: number;
|
|
9
|
+
left: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export interface HubLayout {
|
|
14
|
+
posture: BoxRect;
|
|
15
|
+
resources: BoxRect;
|
|
16
|
+
assets: BoxRect;
|
|
17
|
+
feed: BoxRect;
|
|
18
|
+
network: BoxRect;
|
|
19
|
+
capabilities: BoxRect;
|
|
20
|
+
bottom: BoxRect;
|
|
21
|
+
}
|
|
22
|
+
export interface LayoutResult {
|
|
23
|
+
ok: boolean;
|
|
24
|
+
layout?: HubLayout;
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Compute hub layout for given terminal dimensions
|
|
29
|
+
*
|
|
30
|
+
* Layout structure:
|
|
31
|
+
* - Left column (3 panels): POSTURE, RESOURCES, ACTIVE ASSETS (~30% width)
|
|
32
|
+
* - Center main (1 panel): OPERATIONS FEED (remaining width)
|
|
33
|
+
* - Right column (2 panels): NETWORK/ORIGIN, CAPABILITY FLAGS (~25% width)
|
|
34
|
+
* - Bottom bar (1 panel): COMMAND SURFACE + STATUS STRIP (fixed 3 lines)
|
|
35
|
+
*
|
|
36
|
+
* Rules:
|
|
37
|
+
* - Minimum size: 120x35
|
|
38
|
+
* - No overlaps
|
|
39
|
+
* - No negative dimensions
|
|
40
|
+
* - No zero-height panels
|
|
41
|
+
*/
|
|
42
|
+
export declare function computeHubLayout(width: number, height: number): LayoutResult;
|
|
43
|
+
//# sourceMappingURL=hubLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hubLayout.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/layout/hubLayout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAsH5E"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hub Layout Calculator
|
|
3
|
+
*
|
|
4
|
+
* Pure function to compute panel positions and sizes.
|
|
5
|
+
* NO blessed logic here - just math.
|
|
6
|
+
*/
|
|
7
|
+
const MIN_WIDTH = 120;
|
|
8
|
+
const MIN_HEIGHT = 35;
|
|
9
|
+
const BOTTOM_BAR_HEIGHT = 3;
|
|
10
|
+
/**
|
|
11
|
+
* Compute hub layout for given terminal dimensions
|
|
12
|
+
*
|
|
13
|
+
* Layout structure:
|
|
14
|
+
* - Left column (3 panels): POSTURE, RESOURCES, ACTIVE ASSETS (~30% width)
|
|
15
|
+
* - Center main (1 panel): OPERATIONS FEED (remaining width)
|
|
16
|
+
* - Right column (2 panels): NETWORK/ORIGIN, CAPABILITY FLAGS (~25% width)
|
|
17
|
+
* - Bottom bar (1 panel): COMMAND SURFACE + STATUS STRIP (fixed 3 lines)
|
|
18
|
+
*
|
|
19
|
+
* Rules:
|
|
20
|
+
* - Minimum size: 120x35
|
|
21
|
+
* - No overlaps
|
|
22
|
+
* - No negative dimensions
|
|
23
|
+
* - No zero-height panels
|
|
24
|
+
*/
|
|
25
|
+
export function computeHubLayout(width, height) {
|
|
26
|
+
// Check minimum size
|
|
27
|
+
if (width < MIN_WIDTH || height < MIN_HEIGHT) {
|
|
28
|
+
return {
|
|
29
|
+
ok: false,
|
|
30
|
+
errorMessage: `Terminal too small (need ${MIN_WIDTH}x${MIN_HEIGHT})`,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
// Allocate bottom bar (fixed height)
|
|
34
|
+
const bottomBarHeight = BOTTOM_BAR_HEIGHT;
|
|
35
|
+
const availableHeight = height - bottomBarHeight - 1; // -1 for divider
|
|
36
|
+
// Allocate column widths
|
|
37
|
+
// Account for dividers: 1 between left-center, 1 between center-right
|
|
38
|
+
const leftColWidth = Math.floor(width * 0.30); // 30%
|
|
39
|
+
const rightColWidth = Math.floor(width * 0.25); // 25%
|
|
40
|
+
const centerWidth = width - leftColWidth - rightColWidth - 2; // -2 for dividers between columns
|
|
41
|
+
// Validate no negative dimensions
|
|
42
|
+
if (leftColWidth <= 0 || rightColWidth <= 0 || centerWidth <= 0 || availableHeight <= 0) {
|
|
43
|
+
return {
|
|
44
|
+
ok: false,
|
|
45
|
+
errorMessage: `Terminal too small (need ${MIN_WIDTH}x${MIN_HEIGHT})`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// Left column: 3 panels stacked evenly with spacing
|
|
49
|
+
const leftPanelSpacing = 1; // 1 line spacing between panels
|
|
50
|
+
// Total: 3 panels + 2 spacers = availableHeight
|
|
51
|
+
// So: leftPanelHeight = (availableHeight - 2 * spacing) / 3
|
|
52
|
+
const leftPanelHeight = Math.floor((availableHeight - 2 * leftPanelSpacing) / 3);
|
|
53
|
+
// Right column: 2 panels (top larger, bottom smaller)
|
|
54
|
+
const rightTopHeight = Math.floor(availableHeight * 0.6); // 60% for top
|
|
55
|
+
const rightBottomHeight = availableHeight - rightTopHeight - leftPanelSpacing; // remaining for bottom
|
|
56
|
+
// Calculate positions
|
|
57
|
+
let currentTop = 0;
|
|
58
|
+
// Left column panels
|
|
59
|
+
const posture = {
|
|
60
|
+
top: currentTop,
|
|
61
|
+
left: 0,
|
|
62
|
+
width: leftColWidth,
|
|
63
|
+
height: leftPanelHeight,
|
|
64
|
+
};
|
|
65
|
+
currentTop += leftPanelHeight + leftPanelSpacing;
|
|
66
|
+
const resources = {
|
|
67
|
+
top: currentTop,
|
|
68
|
+
left: 0,
|
|
69
|
+
width: leftColWidth,
|
|
70
|
+
height: leftPanelHeight,
|
|
71
|
+
};
|
|
72
|
+
currentTop += leftPanelHeight + leftPanelSpacing;
|
|
73
|
+
const assets = {
|
|
74
|
+
top: currentTop,
|
|
75
|
+
left: 0,
|
|
76
|
+
width: leftColWidth,
|
|
77
|
+
height: leftPanelHeight,
|
|
78
|
+
};
|
|
79
|
+
// Center panel (full available height)
|
|
80
|
+
const feed = {
|
|
81
|
+
top: 0,
|
|
82
|
+
left: leftColWidth + 1, // +1 for divider
|
|
83
|
+
width: centerWidth,
|
|
84
|
+
height: availableHeight,
|
|
85
|
+
};
|
|
86
|
+
// Right column panels
|
|
87
|
+
const network = {
|
|
88
|
+
top: 0,
|
|
89
|
+
left: leftColWidth + centerWidth + 2, // +1 for left divider, +1 for center divider
|
|
90
|
+
width: rightColWidth,
|
|
91
|
+
height: rightTopHeight,
|
|
92
|
+
};
|
|
93
|
+
const capabilities = {
|
|
94
|
+
top: rightTopHeight + leftPanelSpacing,
|
|
95
|
+
left: leftColWidth + centerWidth + 2,
|
|
96
|
+
width: rightColWidth,
|
|
97
|
+
height: rightBottomHeight,
|
|
98
|
+
};
|
|
99
|
+
// Bottom bar (full width)
|
|
100
|
+
const bottom = {
|
|
101
|
+
top: availableHeight + 1, // +1 for divider
|
|
102
|
+
left: 0,
|
|
103
|
+
width: width,
|
|
104
|
+
height: bottomBarHeight,
|
|
105
|
+
};
|
|
106
|
+
// Validate no overlaps or negative dimensions
|
|
107
|
+
const layout = {
|
|
108
|
+
posture,
|
|
109
|
+
resources,
|
|
110
|
+
assets,
|
|
111
|
+
feed,
|
|
112
|
+
network,
|
|
113
|
+
capabilities,
|
|
114
|
+
bottom,
|
|
115
|
+
};
|
|
116
|
+
// Final validation
|
|
117
|
+
if (!validateLayout(layout, width, height)) {
|
|
118
|
+
return {
|
|
119
|
+
ok: false,
|
|
120
|
+
errorMessage: `Terminal too small (need ${MIN_WIDTH}x${MIN_HEIGHT})`,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
ok: true,
|
|
125
|
+
layout,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Validate layout has no overlaps or invalid dimensions
|
|
130
|
+
*/
|
|
131
|
+
function validateLayout(layout, terminalWidth, terminalHeight) {
|
|
132
|
+
const panels = [
|
|
133
|
+
layout.posture,
|
|
134
|
+
layout.resources,
|
|
135
|
+
layout.assets,
|
|
136
|
+
layout.feed,
|
|
137
|
+
layout.network,
|
|
138
|
+
layout.capabilities,
|
|
139
|
+
layout.bottom,
|
|
140
|
+
];
|
|
141
|
+
// Check for negative or zero dimensions
|
|
142
|
+
for (const panel of panels) {
|
|
143
|
+
if (panel.width <= 0 || panel.height <= 0 || panel.top < 0 || panel.left < 0) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
// Check bounds
|
|
147
|
+
if (panel.left + panel.width > terminalWidth || panel.top + panel.height > terminalHeight) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// Check for overlaps (simple check - panels should not intersect)
|
|
152
|
+
for (let i = 0; i < panels.length; i++) {
|
|
153
|
+
for (let j = i + 1; j < panels.length; j++) {
|
|
154
|
+
if (panelsIntersect(panels[i], panels[j])) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Check if two rectangles intersect
|
|
163
|
+
*/
|
|
164
|
+
function panelsIntersect(a, b) {
|
|
165
|
+
return !(a.left + a.width <= b.left ||
|
|
166
|
+
b.left + b.width <= a.left ||
|
|
167
|
+
a.top + a.height <= b.top ||
|
|
168
|
+
b.top + b.height <= a.top);
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=hubLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hubLayout.js","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/layout/hubLayout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAyBH,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa,EAAE,MAAc;IAC5D,qBAAqB;IACrB,IAAI,KAAK,GAAG,SAAS,IAAI,MAAM,GAAG,UAAU,EAAE,CAAC;QAC7C,OAAO;YACL,EAAE,EAAE,KAAK;YACT,YAAY,EAAE,4BAA4B,SAAS,IAAI,UAAU,GAAG;SACrE,CAAC;IACJ,CAAC;IAED,qCAAqC;IACrC,MAAM,eAAe,GAAG,iBAAiB,CAAC;IAC1C,MAAM,eAAe,GAAG,MAAM,GAAG,eAAe,GAAG,CAAC,CAAC,CAAC,iBAAiB;IAEvE,yBAAyB;IACzB,sEAAsE;IACtE,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM;IACrD,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM;IACtD,MAAM,WAAW,GAAG,KAAK,GAAG,YAAY,GAAG,aAAa,GAAG,CAAC,CAAC,CAA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,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG;QACzB,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 1 Layout Calculator
|
|
3
|
+
*
|
|
4
|
+
* Fixed hub layout with 7 boxes:
|
|
5
|
+
* - Left column (3 stacked): POSTURE, RESOURCES, ASSETS
|
|
6
|
+
* - Center (1): OPERATIONS
|
|
7
|
+
* - Right column (2 stacked): NETWORK, CAPABILITIES
|
|
8
|
+
* - Bottom bar (1): COMMAND LINE
|
|
9
|
+
*/
|
|
10
|
+
export interface BoxRect {
|
|
11
|
+
top: number;
|
|
12
|
+
left: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
export interface Phase1Layout {
|
|
17
|
+
posture: BoxRect;
|
|
18
|
+
resources: BoxRect;
|
|
19
|
+
assets: BoxRect;
|
|
20
|
+
operations: BoxRect;
|
|
21
|
+
network: BoxRect;
|
|
22
|
+
capabilities: BoxRect;
|
|
23
|
+
commandLine: BoxRect;
|
|
24
|
+
}
|
|
25
|
+
export interface LayoutResult {
|
|
26
|
+
ok: boolean;
|
|
27
|
+
errorMessage?: string;
|
|
28
|
+
layout?: Phase1Layout;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Compute Phase 1 layout
|
|
32
|
+
*/
|
|
33
|
+
export declare function computePhase1Layout(width: number, height: number): LayoutResult;
|
|
34
|
+
//# sourceMappingURL=phase1Layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phase1Layout.d.ts","sourceRoot":"","sources":["../../../../../src/ui/v3/ui/layout/phase1Layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAOD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAiG/E"}
|