@lumencharts/trading-platform 0.0.0-stage → 0.1.1
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/CHANGELOG.md +31 -0
- package/LICENSE +55 -0
- package/README.md +53 -2
- package/dist/asset-entry.d.ts +3 -0
- package/dist/asset.d.ts +3 -0
- package/dist/asset.js +21689 -0
- package/dist/chart/bracket-links.d.ts +8 -0
- package/dist/chart/context-actions.d.ts +7 -0
- package/dist/chart/edit-presentation.d.ts +32 -0
- package/dist/chart/edit-preview.d.ts +26 -0
- package/dist/chart/exit-profit.d.ts +32 -0
- package/dist/chart/frame-batch.d.ts +15 -0
- package/dist/chart/overlay-coordinator.d.ts +18 -0
- package/dist/chart/overlay-events.d.ts +3 -0
- package/dist/chart/overlay-gesture.d.ts +40 -0
- package/dist/chart/overlay-index.d.ts +30 -0
- package/dist/chart/overlay-projection.d.ts +51 -0
- package/dist/chart/overlay-types.d.ts +42 -0
- package/dist/chart/parent-links.d.ts +33 -0
- package/dist/chart/position-profit.d.ts +15 -0
- package/dist/chart/review-lock.d.ts +14 -0
- package/dist/chart/ticket-projection.d.ts +36 -0
- package/dist/compat/default-formatters.d.ts +6 -0
- package/dist/compat/delegate.d.ts +11 -0
- package/dist/compat/factory.d.ts +5 -0
- package/dist/compat/formatters.d.ts +26 -0
- package/dist/compat/host-dialogs.d.ts +5 -0
- package/dist/compat/host-preferences.d.ts +8 -0
- package/dist/compat/host.d.ts +39 -0
- package/dist/compat/watched-value.d.ts +25 -0
- package/dist/conformance/index.d.ts +78 -0
- package/dist/conformance/index.js +6859 -0
- package/dist/conformance/replay.d.ts +35 -0
- package/dist/contracts/broker.d.ts +1122 -0
- package/dist/contracts/broker.js +168 -0
- package/dist/contracts/index.d.ts +3 -0
- package/dist/contracts/index.js +168 -0
- package/dist/contracts/market-data.d.ts +289 -0
- package/dist/contracts/market-data.js +11 -0
- package/dist/contracts/ports.d.ts +469 -0
- package/dist/contracts/ports.js +5 -0
- package/dist/core/account-datasets.d.ts +29 -0
- package/dist/core/account-lifecycle.d.ts +70 -0
- package/dist/core/account-types.d.ts +6 -0
- package/dist/core/bounded-map.d.ts +12 -0
- package/dist/core/bracket-input.d.ts +32 -0
- package/dist/core/bracket-modification.d.ts +6 -0
- package/dist/core/bracket-parent.d.ts +11 -0
- package/dist/core/broker-debug.d.ts +10 -0
- package/dist/core/capabilities.d.ts +34 -0
- package/dist/core/capability-metadata.d.ts +60 -0
- package/dist/core/capability-policy.d.ts +32 -0
- package/dist/core/chart-exit-level.d.ts +11 -0
- package/dist/core/chart-order-edit.d.ts +50 -0
- package/dist/core/clock.d.ts +2 -0
- package/dist/core/close-commands.d.ts +24 -0
- package/dist/core/close-flow.d.ts +14 -0
- package/dist/core/command-context.d.ts +16 -0
- package/dist/core/command-coordinator.d.ts +71 -0
- package/dist/core/command-follow.d.ts +32 -0
- package/dist/core/command-keys.d.ts +11 -0
- package/dist/core/context-orders.d.ts +19 -0
- package/dist/core/deferred.d.ts +5 -0
- package/dist/core/dialog-coordinator.d.ts +73 -0
- package/dist/core/display-preferences.d.ts +10 -0
- package/dist/core/disposal.d.ts +8 -0
- package/dist/core/entity-store.d.ts +56 -0
- package/dist/core/entity-validation.d.ts +9 -0
- package/dist/core/errors.d.ts +24 -0
- package/dist/core/execution-demand.d.ts +11 -0
- package/dist/core/execution-sound.d.ts +10 -0
- package/dist/core/exit-level-draft.d.ts +9 -0
- package/dist/core/exit-level-summary.d.ts +3 -0
- package/dist/core/exit-level-template.d.ts +16 -0
- package/dist/core/features.d.ts +39 -0
- package/dist/core/financial-rules.d.ts +70 -0
- package/dist/core/history-limit.d.ts +11 -0
- package/dist/core/identity.d.ts +14 -0
- package/dist/core/immutable.d.ts +8 -0
- package/dist/core/keyed-ref-count.d.ts +18 -0
- package/dist/core/leverage-commands.d.ts +42 -0
- package/dist/core/modification-context.d.ts +22 -0
- package/dist/core/modification-routing.d.ts +43 -0
- package/dist/core/notification-log.d.ts +33 -0
- package/dist/core/number-precision.d.ts +4 -0
- package/dist/core/order-commands.d.ts +50 -0
- package/dist/core/order-duration.d.ts +14 -0
- package/dist/core/order-labels.d.ts +7 -0
- package/dist/core/order-matching.d.ts +16 -0
- package/dist/core/order-modification.d.ts +20 -0
- package/dist/core/order-notifications.d.ts +30 -0
- package/dist/core/order-protection.d.ts +4 -0
- package/dist/core/parent-protection.d.ts +10 -0
- package/dist/core/position-commands.d.ts +45 -0
- package/dist/core/position-custom-fields.d.ts +5 -0
- package/dist/core/position-estimates.d.ts +22 -0
- package/dist/core/position-protection-permissions.d.ts +4 -0
- package/dist/core/preferences-key.d.ts +2 -0
- package/dist/core/preview-leases.d.ts +12 -0
- package/dist/core/protection-legs.d.ts +23 -0
- package/dist/core/protection-notifications.d.ts +9 -0
- package/dist/core/protection-rules.d.ts +21 -0
- package/dist/core/quantity-input.d.ts +53 -0
- package/dist/core/read-coordinator.d.ts +15 -0
- package/dist/core/readers.d.ts +6 -0
- package/dist/core/relative-price.d.ts +4 -0
- package/dist/core/review-policy.d.ts +17 -0
- package/dist/core/session-types.d.ts +1 -0
- package/dist/core/session.d.ts +114 -0
- package/dist/core/snapshot-dataset.d.ts +47 -0
- package/dist/core/symbol-catalog.d.ts +37 -0
- package/dist/core/tradability.d.ts +26 -0
- package/dist/core/trading-commands.d.ts +104 -0
- package/dist/core/trading-rules.d.ts +14 -0
- package/dist/core/trading-settings.d.ts +39 -0
- package/dist/core/trading-state.d.ts +52 -0
- package/dist/core/value-store.d.ts +11 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +6593 -0
- package/dist/market-data/depth-book.d.ts +18 -0
- package/dist/market-data/index.d.ts +3 -0
- package/dist/market-data/index.js +735 -0
- package/dist/market-data/session-demand.d.ts +15 -0
- package/dist/market-data/subscriptions.d.ts +13 -0
- package/dist/mock/broker.d.ts +75 -0
- package/dist/mock/clock.d.ts +12 -0
- package/dist/mock/feeds.d.ts +18 -0
- package/dist/mock/index.d.ts +5 -0
- package/dist/mock/index.js +1956 -0
- package/dist/mock/protection-cancellation.d.ts +7 -0
- package/dist/mock/scenarios.d.ts +5 -0
- package/dist/paper/broker.d.ts +41 -0
- package/dist/paper/index.d.ts +6 -0
- package/dist/paper/index.js +469 -0
- package/dist/paper/market.d.ts +57 -0
- package/dist/paper/rules.d.ts +40 -0
- package/dist/ui/account-manager/account-pages.d.ts +18 -0
- package/dist/ui/account-manager/column-presentation.d.ts +5 -0
- package/dist/ui/account-manager/context-menu.d.ts +13 -0
- package/dist/ui/account-manager/csv-downloads.d.ts +5 -0
- package/dist/ui/account-manager/custom-page.d.ts +16 -0
- package/dist/ui/account-manager/custom-table.d.ts +18 -0
- package/dist/ui/account-manager/format-account-value.d.ts +12 -0
- package/dist/ui/account-manager/position-reader.d.ts +19 -0
- package/dist/ui/account-manager/row-action-tracker.d.ts +12 -0
- package/dist/ui/account-manager/row-actions.d.ts +37 -0
- package/dist/ui/account-manager/status-counts.d.ts +6 -0
- package/dist/ui/account-manager/table-controls.d.ts +13 -0
- package/dist/ui/account-manager/table-export.d.ts +30 -0
- package/dist/ui/account-manager/table-model.d.ts +11 -0
- package/dist/ui/account-manager/table-toolbar.d.ts +25 -0
- package/dist/ui/account-manager/table.d.ts +24 -0
- package/dist/ui/account-manager/view.d.ts +19 -0
- package/dist/ui/account-manager/workspace.d.ts +15 -0
- package/dist/ui/chart-actions.d.ts +11 -0
- package/dist/ui/chart-controls/eligibility.d.ts +6 -0
- package/dist/ui/chart-controls/quote-buttons.d.ts +15 -0
- package/dist/ui/chart-controls/quote-controls.d.ts +12 -0
- package/dist/ui/chart-controls/quote-widths.d.ts +8 -0
- package/dist/ui/dialogs/close-amount-form.d.ts +8 -0
- package/dist/ui/dialogs/close-preview-dialog.d.ts +5 -0
- package/dist/ui/dialogs/confirm-dialog.d.ts +7 -0
- package/dist/ui/dialogs/dialog-body.d.ts +11 -0
- package/dist/ui/dialogs/leverage-form.d.ts +10 -0
- package/dist/ui/dialogs/message-dialog.d.ts +6 -0
- package/dist/ui/dialogs/position-protection.d.ts +14 -0
- package/dist/ui/dialogs/properties-dialog.d.ts +9 -0
- package/dist/ui/dialogs/sanitize-html.d.ts +2 -0
- package/dist/ui/dialogs/types.d.ts +5 -0
- package/dist/ui/dialogs/view.d.ts +5 -0
- package/dist/ui/dock-sizes.d.ts +20 -0
- package/dist/ui/dom/controller.d.ts +34 -0
- package/dist/ui/dom/ladder.d.ts +23 -0
- package/dist/ui/dom/view.d.ts +8 -0
- package/dist/ui/dom/workspace.d.ts +17 -0
- package/dist/ui/effective-mode.d.ts +11 -0
- package/dist/ui/financial-lease.d.ts +3 -0
- package/dist/ui/icons.d.ts +4 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.js +15918 -0
- package/dist/ui/layout.d.ts +5 -0
- package/dist/ui/mount.d.ts +11 -0
- package/dist/ui/notifications/log.d.ts +6 -0
- package/dist/ui/notifications/toasts.d.ts +5 -0
- package/dist/ui/number-input.d.ts +2 -0
- package/dist/ui/order-ticket/chart-draft-controls.d.ts +8 -0
- package/dist/ui/order-ticket/chart-projection.d.ts +9 -0
- package/dist/ui/order-ticket/controller.d.ts +41 -0
- package/dist/ui/order-ticket/custom-field.d.ts +9 -0
- package/dist/ui/order-ticket/duration-input.d.ts +9 -0
- package/dist/ui/order-ticket/exit-input.d.ts +34 -0
- package/dist/ui/order-ticket/financial-controls.d.ts +10 -0
- package/dist/ui/order-ticket/layout-context.d.ts +7 -0
- package/dist/ui/order-ticket/market.d.ts +12 -0
- package/dist/ui/order-ticket/menu.d.ts +6 -0
- package/dist/ui/order-ticket/mode-rules.d.ts +4 -0
- package/dist/ui/order-ticket/modification-fields.d.ts +23 -0
- package/dist/ui/order-ticket/move-handle.d.ts +4 -0
- package/dist/ui/order-ticket/order-sent.d.ts +4 -0
- package/dist/ui/order-ticket/placement.d.ts +27 -0
- package/dist/ui/order-ticket/preview-message.d.ts +4 -0
- package/dist/ui/order-ticket/price-input.d.ts +14 -0
- package/dist/ui/order-ticket/quantity-input.d.ts +26 -0
- package/dist/ui/order-ticket/review-panel.d.ts +10 -0
- package/dist/ui/order-ticket/rules.d.ts +16 -0
- package/dist/ui/order-ticket/stop-input.d.ts +17 -0
- package/dist/ui/order-ticket/submit-bar.d.ts +13 -0
- package/dist/ui/order-ticket/symbol-search-controller.d.ts +50 -0
- package/dist/ui/order-ticket/symbol-search.d.ts +12 -0
- package/dist/ui/order-ticket/untradable-notice.d.ts +8 -0
- package/dist/ui/order-ticket/view.d.ts +16 -0
- package/dist/ui/panel-visibility.d.ts +6 -0
- package/dist/ui/pointer-drag.d.ts +20 -0
- package/dist/ui/popup-mount.d.ts +4 -0
- package/dist/ui/primitives.d.ts +29 -0
- package/dist/ui/protection/editor.d.ts +18 -0
- package/dist/ui/protection/fields.d.ts +30 -0
- package/dist/ui/protection/level.d.ts +14 -0
- package/dist/ui/protection/protected-size.d.ts +5 -0
- package/dist/ui/protection/ticket-workspace.d.ts +7 -0
- package/dist/ui/resize-handle.css +34 -0
- package/dist/ui/resize-handle.d.ts +20 -0
- package/dist/ui/resize-handle.js +185 -0
- package/dist/ui/select.d.ts +26 -0
- package/dist/ui/surface-theme.d.ts +3 -0
- package/dist/ui/switch.d.ts +7 -0
- package/dist/ui/symbol-logo.d.ts +7 -0
- package/dist/ui/tabs.d.ts +19 -0
- package/dist/ui/ticket-dock.d.ts +18 -0
- package/dist/ui/ticket-shell.d.ts +15 -0
- package/dist/ui/trading.css +1808 -0
- package/dist/ui/trap-tab.d.ts +11 -0
- package/dist/vendor/solid-ui/index.d.ts +3 -0
- package/dist/vendor/solid-ui/paged-list-window.d.ts +27 -0
- package/dist/vendor/solid-ui/virtual-list.d.ts +21 -0
- package/package.json +104 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
import type { ActionMetaInfo } from "../../contracts/broker.js";
|
|
3
|
+
/** Keep only well-formed provider items; callbacks are retained, everything else is read once. */
|
|
4
|
+
export declare function normalizeMenuItems(value: unknown): ActionMetaInfo[];
|
|
5
|
+
/** Row context menu on Kobalte ContextMenu: items come from the row under the pointer and may load asynchronously. */
|
|
6
|
+
export declare function RowContextMenu(props: {
|
|
7
|
+
/** Undefined when the target is not an actionable row (the menu stays closed). */
|
|
8
|
+
items(rowId: string, event: MouseEvent): {
|
|
9
|
+
initial?: readonly ActionMetaInfo[];
|
|
10
|
+
load?: Promise<readonly ActionMetaInfo[]>;
|
|
11
|
+
} | undefined;
|
|
12
|
+
children: JSX.Element;
|
|
13
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AccountManagerPage, CustomTableElementFormatter } from "../../contracts/broker.js";
|
|
2
|
+
import type { TradingEnvironment } from "../../contracts/ports.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
import { createCustomTableController } from "./custom-table.js";
|
|
5
|
+
export type CustomTableController = ReturnType<typeof createCustomTableController>;
|
|
6
|
+
/** Controllers created ahead of rendering, e.g. so a page tab can show its row counter. */
|
|
7
|
+
export declare function createPageControllers(page: AccountManagerPage, session: TradingSession): ReadonlyMap<string, CustomTableController>;
|
|
8
|
+
/** Total loaded rows across a page's tables, recomputed only when one of them changes. */
|
|
9
|
+
export declare function subscribePageCount(controllers: ReadonlyMap<string, CustomTableController>, onCount: (count: number) => void): () => void;
|
|
10
|
+
export declare function CustomAccountPage(props: {
|
|
11
|
+
page: AccountManagerPage;
|
|
12
|
+
session: TradingSession;
|
|
13
|
+
environment: TradingEnvironment;
|
|
14
|
+
custom?: readonly CustomTableElementFormatter[];
|
|
15
|
+
controllers?: ReadonlyMap<string, CustomTableController>;
|
|
16
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AccountManagerTable } from "../../contracts/broker.js";
|
|
2
|
+
import type { TradingClock } from "../../contracts/ports.js";
|
|
3
|
+
interface CustomRow {
|
|
4
|
+
id: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
/** Cursor pagination and broker row delegates share one ordered reconciliation path. */
|
|
8
|
+
export declare function createCustomTableController(table: AccountManagerTable, clock?: TradingClock): {
|
|
9
|
+
rows: import("../../core/entity-store.js").EntityReader<CustomRow>;
|
|
10
|
+
state: import("../../contracts/ports.js").ReadonlyValue<Readonly<{
|
|
11
|
+
loading: boolean;
|
|
12
|
+
done: boolean;
|
|
13
|
+
error: string | undefined;
|
|
14
|
+
}>>;
|
|
15
|
+
loadNext: () => Promise<void>;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CustomTableElementFormatter, TableFormatterInputs } from "../../contracts/broker.js";
|
|
2
|
+
import { type FormattedCell, type TableFormatContext } from "../../compat/formatters.js";
|
|
3
|
+
/** One text formatting path for summary values, table cells and exported cells. */
|
|
4
|
+
export declare function formatAccountValue(formatter: string | undefined, values: readonly unknown[], options: {
|
|
5
|
+
custom?: Pick<CustomTableElementFormatter, "formatText"> & Partial<Pick<CustomTableElementFormatter, "formatElement">>;
|
|
6
|
+
customInput?: TableFormatterInputs & {
|
|
7
|
+
priceFormatter?: TableFormatContext["price"];
|
|
8
|
+
};
|
|
9
|
+
element?: boolean;
|
|
10
|
+
context?: TableFormatContext;
|
|
11
|
+
showZeroValues?: boolean;
|
|
12
|
+
}): FormattedCell;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FieldRef } from "../../contracts/broker.js";
|
|
2
|
+
import type { EntityReader } from "../../core/entity-store.js";
|
|
3
|
+
import type { FinancialValue } from "../../core/trading-state.js";
|
|
4
|
+
interface PositionRow {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly extra?: Record<string, unknown>;
|
|
7
|
+
readonly unrealizedPl?: number;
|
|
8
|
+
readonly pl?: number;
|
|
9
|
+
readonly visiblePL?: number;
|
|
10
|
+
}
|
|
11
|
+
/** Includes formatter inputs, active sorting and search dependencies. */
|
|
12
|
+
export declare function needsPositionProfit(fields: readonly FieldRef[], wholeRow: boolean): boolean;
|
|
13
|
+
/** Table-only money updates never mutate the broker position used by chart overlays. */
|
|
14
|
+
export declare function createPositionTableReader<T extends PositionRow>(source: EntityReader<T>, financial: EntityReader<FinancialValue>, individual?: boolean, estimates?: EntityReader<FinancialValue>): {
|
|
15
|
+
reader: EntityReader<T>;
|
|
16
|
+
setEnabled(value: boolean): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type AccountGeneration } from "../../core/identity.js";
|
|
2
|
+
/** Pending/error ownership shared by order and position row commands. */
|
|
3
|
+
export declare function createRowActionTracker(options: {
|
|
4
|
+
current(): AccountGeneration;
|
|
5
|
+
pending(value: ReadonlySet<string>): void;
|
|
6
|
+
error(value: string | undefined): void;
|
|
7
|
+
status(value: string | undefined): void;
|
|
8
|
+
}): {
|
|
9
|
+
reset(): void;
|
|
10
|
+
run(id: string, context: AccountGeneration, work: (status: (text: string) => void) => Promise<unknown>, fallback: string): Promise<void>;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ActionMetaInfo } from "../../contracts/broker.js";
|
|
2
|
+
import type { EntityReader } from "../../core/entity-store.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
import type { AccountPage } from "./account-pages.js";
|
|
5
|
+
import type { createRowActionTracker } from "./row-action-tracker.js";
|
|
6
|
+
export type PositionRowAction = "close" | "reverse" | "protect";
|
|
7
|
+
export type AccountTableRow = {
|
|
8
|
+
id: string;
|
|
9
|
+
symbol?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
export interface AccountTableAction {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly label: string;
|
|
15
|
+
readonly tooltip?: string;
|
|
16
|
+
readonly visible?: (row: Readonly<AccountTableRow>) => boolean;
|
|
17
|
+
readonly disabled?: (row: Readonly<AccountTableRow>) => boolean;
|
|
18
|
+
readonly run: (row: Readonly<AccountTableRow>) => void;
|
|
19
|
+
}
|
|
20
|
+
/** Both inline and menu commands resolve their entity and permissions at activation. */
|
|
21
|
+
export declare function createAccountRowActions(props: {
|
|
22
|
+
session: TradingSession;
|
|
23
|
+
connection: TradingSession["state"]["connection"]["get"];
|
|
24
|
+
pendingRows(): ReadonlySet<string>;
|
|
25
|
+
policy: TradingSession["policy"]["get"];
|
|
26
|
+
symbolOptions(): number;
|
|
27
|
+
tracker: ReturnType<typeof createRowActionTracker>;
|
|
28
|
+
onOrderAction?: (id: string) => void;
|
|
29
|
+
onPositionAction?: (id: string, individual: boolean, action: PositionRowAction) => Promise<void>;
|
|
30
|
+
}): {
|
|
31
|
+
bind(reader: EntityReader<AccountTableRow>, kind: AccountPage["actions"], isCurrent: () => boolean): {
|
|
32
|
+
actions: () => readonly AccountTableAction[];
|
|
33
|
+
isCurrent: () => boolean;
|
|
34
|
+
run: (rowId: string, actionId: string) => void;
|
|
35
|
+
menu(rowId: string): ActionMetaInfo[] | undefined;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EntityReader } from "../../core/entity-store.js";
|
|
2
|
+
/** Row counts per status, maintained from change sets so an update costs only its changed rows. */
|
|
3
|
+
export declare function createStatusCounts(reader: EntityReader<{
|
|
4
|
+
id: string;
|
|
5
|
+
status?: unknown;
|
|
6
|
+
}>, onChange: (counts: ReadonlyMap<unknown, number>, total: number) => void): import("../../contracts/ports.js").Dispose;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OrderStatus, OrderStatusFilter } from "../../contracts/broker.js";
|
|
2
|
+
import type { AccountManagerColumn, FieldRef } from "../../contracts/broker.js";
|
|
3
|
+
export declare const defaultStatusFilters: readonly OrderStatus[];
|
|
4
|
+
export interface TableFilter {
|
|
5
|
+
readonly query: string;
|
|
6
|
+
readonly status: OrderStatus | OrderStatusFilter.All;
|
|
7
|
+
readonly fields: readonly FieldRef[];
|
|
8
|
+
}
|
|
9
|
+
export declare function matchesTableFilter(row: Readonly<Record<string, unknown>>, filter: TableFilter): boolean;
|
|
10
|
+
/** Only versioned boolean display choices are retained; no broker row data is persisted. */
|
|
11
|
+
export declare function readColumnChoices(input: string | undefined, columns: readonly AccountManagerColumn[]): ReadonlyMap<string, boolean>;
|
|
12
|
+
export declare function visibleTableColumns(columns: readonly AccountManagerColumn[], choices: ReadonlyMap<string, boolean>): readonly AccountManagerColumn[];
|
|
13
|
+
export declare function serializeColumnChoices(columns: readonly AccountManagerColumn[], choices: ReadonlyMap<string, boolean>): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AccountManagerColumn, CustomTableElementFormatter } from "../../contracts/broker.js";
|
|
2
|
+
import type { TradingClock, TradingEnvironment } from "../../contracts/ports.js";
|
|
3
|
+
import type { EntityReader } from "../../core/entity-store.js";
|
|
4
|
+
import type { TableFormatContext } from "../../compat/formatters.js";
|
|
5
|
+
type Row = {
|
|
6
|
+
id: string;
|
|
7
|
+
symbol?: string;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
type Formatters = Pick<TableFormatContext, "price" | "quantity" | "numeric" | "integer" | "variable">;
|
|
11
|
+
export declare const tableExportLimits: Readonly<{
|
|
12
|
+
rows: 10000;
|
|
13
|
+
cells: 200000;
|
|
14
|
+
milliseconds: 30000;
|
|
15
|
+
concurrency: 8;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function csvCell(value: string): string;
|
|
18
|
+
export declare function createTableCsv(options: {
|
|
19
|
+
readonly ids: readonly string[];
|
|
20
|
+
readonly reader: EntityReader<Row>;
|
|
21
|
+
readonly columns: readonly AccountManagerColumn[];
|
|
22
|
+
readonly custom?: readonly CustomTableElementFormatter[];
|
|
23
|
+
readonly environment: Pick<TradingEnvironment, "locale" | "timezone">;
|
|
24
|
+
readonly accountCurrency?: string;
|
|
25
|
+
readonly formatters: (symbol: string) => Promise<Formatters>;
|
|
26
|
+
readonly clock: TradingClock;
|
|
27
|
+
readonly signal?: AbortSignal;
|
|
28
|
+
readonly assertCurrent: () => void;
|
|
29
|
+
}): Promise<string>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FieldRef } from "../../contracts/broker.js";
|
|
2
|
+
import type { EntityReader } from "../../core/entity-store.js";
|
|
3
|
+
/** Retains every row ID; the view renders a window, while mutations only reindex affected IDs. */
|
|
4
|
+
export declare function createTableModel<T extends {
|
|
5
|
+
id: string;
|
|
6
|
+
}>(reader: EntityReader<T>): {
|
|
7
|
+
ids: import("../../contracts/ports.js").ReadonlyValue<readonly string[]>;
|
|
8
|
+
setSort(field: FieldRef, ascending: boolean): void;
|
|
9
|
+
setFilter(predicate: (row: Readonly<T>) => boolean): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OrderStatus, OrderStatusFilter } from "../../contracts/broker.js";
|
|
2
|
+
import type { AccountManagerColumn } from "../../contracts/broker.js";
|
|
3
|
+
export declare function TableStatusTabs(props: {
|
|
4
|
+
label: string;
|
|
5
|
+
status: OrderStatus | OrderStatusFilter.All;
|
|
6
|
+
statuses: readonly OrderStatus[];
|
|
7
|
+
counts: ReadonlyMap<unknown, number>;
|
|
8
|
+
total: number;
|
|
9
|
+
onStatus(value: OrderStatus | OrderStatusFilter.All): void;
|
|
10
|
+
}): import("solid-js").JSX.Element;
|
|
11
|
+
export declare function TableTools(props: {
|
|
12
|
+
label: string;
|
|
13
|
+
query: string;
|
|
14
|
+
onQuery(value: string): void;
|
|
15
|
+
exporting: boolean;
|
|
16
|
+
canExport: boolean;
|
|
17
|
+
onExport(): void;
|
|
18
|
+
}): import("solid-js").JSX.Element;
|
|
19
|
+
export declare function TableColumns(props: {
|
|
20
|
+
label: string;
|
|
21
|
+
columns: readonly AccountManagerColumn[];
|
|
22
|
+
visible: readonly AccountManagerColumn[];
|
|
23
|
+
onColumn(id: string, visible: boolean): void;
|
|
24
|
+
onResetColumns(): void;
|
|
25
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AccountTableAction, AccountTableRow } from "./row-actions.js";
|
|
2
|
+
import type { AccountManagerColumn, OrderStatus, SortingParameters, CustomTableElementFormatter, FieldRef } from "../../contracts/broker.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
import type { EntityReader } from "../../core/entity-store.js";
|
|
5
|
+
import type { TradingEnvironment } from "../../contracts/ports.js";
|
|
6
|
+
type Row = AccountTableRow;
|
|
7
|
+
export declare function AccountTable(props: {
|
|
8
|
+
reader: EntityReader<Row>;
|
|
9
|
+
columns: readonly AccountManagerColumn[];
|
|
10
|
+
session: TradingSession;
|
|
11
|
+
environment: TradingEnvironment;
|
|
12
|
+
custom?: readonly CustomTableElementFormatter[];
|
|
13
|
+
actions?: readonly AccountTableAction[];
|
|
14
|
+
onRowAction?: (rowId: string, actionId: string) => void;
|
|
15
|
+
label: string;
|
|
16
|
+
toolsMount?: HTMLElement;
|
|
17
|
+
preferenceKey?: string;
|
|
18
|
+
/** Message for an empty table without a search query. */
|
|
19
|
+
emptyMessage?: string;
|
|
20
|
+
initialSorting?: SortingParameters;
|
|
21
|
+
statuses?: readonly OrderStatus[];
|
|
22
|
+
onDependenciesChange?: (fields: readonly FieldRef[], wholeRow: boolean) => void;
|
|
23
|
+
}): import("solid-js").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type PositionRowAction } from "./row-actions.js";
|
|
2
|
+
import type { TradingEnvironment } from "../../contracts/ports.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
export declare function AccountManagerView(props: {
|
|
5
|
+
session: TradingSession;
|
|
6
|
+
environment: TradingEnvironment;
|
|
7
|
+
onOrderAction?: (id: string) => void;
|
|
8
|
+
onPositionAction?: (id: string, individual: boolean, action: PositionRowAction) => Promise<void>;
|
|
9
|
+
onClose?(): void;
|
|
10
|
+
collapsed: boolean;
|
|
11
|
+
maximized: boolean;
|
|
12
|
+
canTrade: boolean;
|
|
13
|
+
onToggle(): void;
|
|
14
|
+
onMaximize(): void;
|
|
15
|
+
onTrade(initiator: HTMLElement): void;
|
|
16
|
+
onDepth(): void;
|
|
17
|
+
}): import("solid-js").JSX.Element;
|
|
18
|
+
/** Plain wording for rows the broker sent that could not be shown. */
|
|
19
|
+
export declare function unreadRowsText(count: number): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DockSizes } from "../dock-sizes.js";
|
|
2
|
+
import type { TradingChartBinding, TradingCollectionPort, TradingPresentationPort } from "../../contracts/ports.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
import type { PositionRowAction } from "./row-actions.js";
|
|
5
|
+
/** Keeps the bottom rail mounted while its account pages are collapsed. */
|
|
6
|
+
export declare function AccountManagerWorkspace(props: {
|
|
7
|
+
sizes: DockSizes;
|
|
8
|
+
session: TradingSession;
|
|
9
|
+
presentation: TradingPresentationPort;
|
|
10
|
+
collection: TradingCollectionPort;
|
|
11
|
+
onTrade(binding: TradingChartBinding, initiator: HTMLElement): void;
|
|
12
|
+
onDepth(): void;
|
|
13
|
+
onOrderAction(id: string): void;
|
|
14
|
+
onPositionAction(id: string, individual: boolean, action: PositionRowAction): Promise<void>;
|
|
15
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Order, PreOrder } from "../contracts/broker.js";
|
|
2
|
+
import type { TradingChartBinding, ChartTradeIntent, TradingCollectionPort } from "../contracts/ports.js";
|
|
3
|
+
import type { TradingSession } from "../core/session.js";
|
|
4
|
+
import type { OverlayAction } from "../chart/overlay-coordinator.js";
|
|
5
|
+
/** Route chart and account actions through the same captured command/dialog paths. */
|
|
6
|
+
export declare function createChartActions(session: TradingSession, collection: TradingCollectionPort, open: (binding: TradingChartBinding, template?: Partial<PreOrder> | Order, initiator?: HTMLElement) => Promise<void>): {
|
|
7
|
+
bindingFor: (symbol: string) => TradingChartBinding;
|
|
8
|
+
intent: (value: ChartTradeIntent) => Promise<void>;
|
|
9
|
+
overlayAction: (action: OverlayAction) => Promise<void>;
|
|
10
|
+
positionAction: (id: string, individual: boolean, action: "close" | "reverse" | "protect") => Promise<void>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReadonlyValue, TradingChartPort } from "../../contracts/ports.js";
|
|
2
|
+
import type { TradingSession } from "../../core/session.js";
|
|
3
|
+
/** Metadata and broker eligibility have separate ownership from quote demand. Late reads cannot re-enable an old binding. */
|
|
4
|
+
export declare function useChartQuoteEligibility(session: TradingSession, chart: TradingChartPort, surface?: ReadonlyValue<boolean>): (() => boolean) & {
|
|
5
|
+
shortReason: () => string | undefined;
|
|
6
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PreOrder } from "../../contracts/broker.js";
|
|
2
|
+
import type { TradingChartBinding } from "../../contracts/ports.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
import type { QuoteWidths } from "./quote-widths.js";
|
|
5
|
+
import { type FrameScheduler } from "../../chart/frame-batch.js";
|
|
6
|
+
/** Mount only while visible: the quote lease belongs to these controls. */
|
|
7
|
+
export declare function ChartQuoteButtons(props: {
|
|
8
|
+
session: TradingSession;
|
|
9
|
+
binding: TradingChartBinding;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
widths: QuoteWidths;
|
|
12
|
+
open(binding: TradingChartBinding, template: Partial<PreOrder>, initiator?: HTMLElement): void;
|
|
13
|
+
/** Quote prices repaint once per frame however many quotes arrive; browser frames by default. */
|
|
14
|
+
frames?: FrameScheduler;
|
|
15
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TicketController } from "../order-ticket/controller.js";
|
|
2
|
+
import type { PreOrder } from "../../contracts/broker.js";
|
|
3
|
+
import type { TradingChartBinding, ReadonlyValue, TradingChartPort } from "../../contracts/ports.js";
|
|
4
|
+
import type { TradingSession } from "../../core/session.js";
|
|
5
|
+
export declare function QuoteControls(props: {
|
|
6
|
+
visible?: ReadonlyValue<boolean>;
|
|
7
|
+
ticket?: TicketController;
|
|
8
|
+
session: TradingSession;
|
|
9
|
+
chart: TradingChartPort;
|
|
10
|
+
open(binding: TradingChartBinding, template: Partial<PreOrder>, initiator?: HTMLElement): void;
|
|
11
|
+
depth(): void;
|
|
12
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type QuotePart = "buy" | "sell" | "spread";
|
|
2
|
+
/** One chart symbol owns the high-water marks, including while controls are hidden. */
|
|
3
|
+
export declare function useQuoteWidths(readSymbol: () => string): {
|
|
4
|
+
minimum: (part: QuotePart) => string;
|
|
5
|
+
observe(part: QuotePart, element: HTMLElement): void;
|
|
6
|
+
};
|
|
7
|
+
export type QuoteWidths = ReturnType<typeof useQuoteWidths>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TradingDialogRequest } from "../../core/dialog-coordinator.js";
|
|
2
|
+
export declare function CloseAmountForm(props: {
|
|
3
|
+
request: Extract<TradingDialogRequest, {
|
|
4
|
+
kind: "closeAmount";
|
|
5
|
+
}>;
|
|
6
|
+
approve(amount: number): void;
|
|
7
|
+
cancel(): void;
|
|
8
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TradingSession } from "../../core/session.js";
|
|
2
|
+
import type { DialogRequest } from "./types.js";
|
|
3
|
+
export declare function ConfirmDialog(props: {
|
|
4
|
+
request: DialogRequest<"confirm">;
|
|
5
|
+
session: TradingSession;
|
|
6
|
+
complete(approved: boolean): void;
|
|
7
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TradingDialogRequest } from "../../core/dialog-coordinator.js";
|
|
2
|
+
import type { TradingSession } from "../../core/session.js";
|
|
3
|
+
/** Mounted beneath a keyed dialog entry, so narrowing retains the immutable request identity. */
|
|
4
|
+
export declare function DialogBody(props: {
|
|
5
|
+
request: TradingDialogRequest;
|
|
6
|
+
session: TradingSession;
|
|
7
|
+
document: Document;
|
|
8
|
+
complete(approved: boolean): void;
|
|
9
|
+
approveAmount(amount: number): void;
|
|
10
|
+
busy(value: boolean): void;
|
|
11
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TradingSession } from "../../core/session.js";
|
|
2
|
+
import type { TradingDialogRequest } from "../../core/dialog-coordinator.js";
|
|
3
|
+
export declare function LeverageForm(props: {
|
|
4
|
+
session: TradingSession;
|
|
5
|
+
request: Extract<TradingDialogRequest, {
|
|
6
|
+
kind: "leverage";
|
|
7
|
+
}>;
|
|
8
|
+
complete(approved: boolean): void;
|
|
9
|
+
busy(value: boolean): void;
|
|
10
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TradingDialogRequest } from "../../core/dialog-coordinator.js";
|
|
2
|
+
import type { TradingSession } from "../../core/session.js";
|
|
3
|
+
/**
|
|
4
|
+
* Position protection is a side pane (read-only position summary, exits, Position info, Confirm/Discard).
|
|
5
|
+
* It pins its broker identity and revision; saving never retargets another position.
|
|
6
|
+
*/
|
|
7
|
+
export declare function PositionProtection(props: {
|
|
8
|
+
session: TradingSession;
|
|
9
|
+
request: Extract<TradingDialogRequest, {
|
|
10
|
+
kind: "position";
|
|
11
|
+
}>;
|
|
12
|
+
complete(approved: boolean): void;
|
|
13
|
+
busy(value: boolean): void;
|
|
14
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TradingSession } from "../../core/session.js";
|
|
2
|
+
/**
|
|
3
|
+
* Trading settings for consumers whose host has no settings dialog to add a page to. It renders the same fields as
|
|
4
|
+
* the chart's Trading page; each change applies at once, as this dialog always has.
|
|
5
|
+
*/
|
|
6
|
+
export declare function PropertiesDialog(props: {
|
|
7
|
+
session: TradingSession;
|
|
8
|
+
complete(approved: boolean): void;
|
|
9
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TradingDialogRequest } from "../../core/dialog-coordinator.js";
|
|
2
|
+
export type DialogRequest<K extends TradingDialogRequest["kind"]> = Extract<TradingDialogRequest, {
|
|
3
|
+
kind: K;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function dialogTitle(request: TradingDialogRequest | undefined): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ValueStore } from "../core/value-store.js";
|
|
2
|
+
interface Preferences {
|
|
3
|
+
get(name: string): string | undefined;
|
|
4
|
+
set(name: string, value: string): void;
|
|
5
|
+
}
|
|
6
|
+
declare const defaults: {
|
|
7
|
+
readonly right: 320;
|
|
8
|
+
readonly accounts: 240;
|
|
9
|
+
};
|
|
10
|
+
export type DockKind = keyof typeof defaults;
|
|
11
|
+
/** Only explicit completed resize gestures persist; temporary layout modes do not. */
|
|
12
|
+
export declare function createDockSizes(preferences: Preferences, report: (cause: unknown) => void): {
|
|
13
|
+
right: ValueStore<number>;
|
|
14
|
+
accounts: ValueStore<number>;
|
|
15
|
+
resize(kind: DockKind, pixels: number): void;
|
|
16
|
+
save(kind: DockKind): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
};
|
|
19
|
+
export type DockSizes = ReturnType<typeof createDockSizes>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Side } from "../../contracts/broker.js";
|
|
2
|
+
import type { TradingChartBinding, TradingChartPort } from "../../contracts/ports.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
interface DomState {
|
|
5
|
+
readonly phase: "loading" | "ready" | "error" | "disposed";
|
|
6
|
+
readonly qty: number;
|
|
7
|
+
readonly pending: boolean;
|
|
8
|
+
readonly error?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function createDomController(session: TradingSession, chart: TradingChartPort): {
|
|
11
|
+
state: import("../../contracts/ports.js").ReadonlyValue<Readonly<DomState>>;
|
|
12
|
+
ready: Promise<void>;
|
|
13
|
+
readonly ladder: {
|
|
14
|
+
viewport: import("../../contracts/ports.js").ReadonlyValue<readonly number[]>;
|
|
15
|
+
row(key: number): import("../../contracts/ports.js").ReadonlyValue<Readonly<import("./ladder.js").LadderRow>> | undefined;
|
|
16
|
+
lastPrice(price: number): void;
|
|
17
|
+
recenter: (price?: number | undefined) => boolean;
|
|
18
|
+
apply(data: import("../../contracts/broker.js").DOMData): void;
|
|
19
|
+
order(id: string, side: Side, price: number, qty: number): void;
|
|
20
|
+
beginAction(key: number): Readonly<{
|
|
21
|
+
price: number;
|
|
22
|
+
release(): void;
|
|
23
|
+
}>;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
} | undefined;
|
|
26
|
+
binding: TradingChartBinding;
|
|
27
|
+
quantity(qty: number): void;
|
|
28
|
+
order(side: Side, key?: number): Promise<void>;
|
|
29
|
+
cancel(side?: Side): Promise<void>;
|
|
30
|
+
reverse(id: string): Promise<void>;
|
|
31
|
+
destroy(): void;
|
|
32
|
+
};
|
|
33
|
+
export type DomController = ReturnType<typeof createDomController>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DOMData, Side } from "../../contracts/broker.js";
|
|
2
|
+
export interface LadderRow {
|
|
3
|
+
readonly price: number;
|
|
4
|
+
readonly bid: number;
|
|
5
|
+
readonly ask: number;
|
|
6
|
+
readonly buyQuantity: number;
|
|
7
|
+
readonly sellQuantity: number;
|
|
8
|
+
}
|
|
9
|
+
/** Fixed keyed prices. Depth deltas only publish changed visible rows. */
|
|
10
|
+
export declare function createDepthLadder(tick: number, count?: number, staticMode?: boolean): {
|
|
11
|
+
viewport: import("../../contracts/ports.js").ReadonlyValue<readonly number[]>;
|
|
12
|
+
row(key: number): import("../../contracts/ports.js").ReadonlyValue<Readonly<LadderRow>> | undefined;
|
|
13
|
+
lastPrice(price: number): void;
|
|
14
|
+
recenter: (price?: number | undefined) => boolean;
|
|
15
|
+
apply(data: DOMData): void;
|
|
16
|
+
order(id: string, side: Side, price: number, qty: number): void;
|
|
17
|
+
beginAction(key: number): Readonly<{
|
|
18
|
+
price: number;
|
|
19
|
+
release(): void;
|
|
20
|
+
}>;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
};
|
|
23
|
+
export declare function formatDepthVolume(value: number, raw: boolean, locale?: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TradingSession } from "../../core/session.js";
|
|
2
|
+
import type { DomController } from "./controller.js";
|
|
3
|
+
export declare function DepthPanelView(props: {
|
|
4
|
+
controller: DomController;
|
|
5
|
+
session: TradingSession;
|
|
6
|
+
locale: string;
|
|
7
|
+
onClose(): void;
|
|
8
|
+
}): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DockSizes } from "../dock-sizes.js";
|
|
2
|
+
import type { TradingChartPort, TradingCollectionPort, TradingPresentationPort } from "../../contracts/ports.js";
|
|
3
|
+
import type { TradingSession } from "../../core/session.js";
|
|
4
|
+
/** Only a visible depth panel owns market subscriptions and its captured command context. */
|
|
5
|
+
export declare function createDomWorkspace(options: {
|
|
6
|
+
sizes: DockSizes;
|
|
7
|
+
session: TradingSession;
|
|
8
|
+
collection: TradingCollectionPort;
|
|
9
|
+
presentation: TradingPresentationPort;
|
|
10
|
+
compactTicket(chart: TradingChartPort, qty?: number): void;
|
|
11
|
+
visibility(visible: boolean): void;
|
|
12
|
+
}): {
|
|
13
|
+
isVisible: () => boolean;
|
|
14
|
+
open(chart: TradingChartPort): void;
|
|
15
|
+
hide: () => void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ModeSelection<T> {
|
|
2
|
+
readonly mode: T;
|
|
3
|
+
readonly revision: number;
|
|
4
|
+
}
|
|
5
|
+
export interface EffectiveMode<T> {
|
|
6
|
+
readonly selection: ModeSelection<T>;
|
|
7
|
+
readonly mode: T;
|
|
8
|
+
}
|
|
9
|
+
/** A fallback stays selected until the next explicit choice, even if availability returns. */
|
|
10
|
+
export declare function resolveEffectiveMode<T>(previous: EffectiveMode<T> | undefined, selection: ModeSelection<T>, normalize: (mode: T) => T): EffectiveMode<T>;
|
|
11
|
+
export declare function useEffectiveMode<T>(selection: () => ModeSelection<T>, normalize: (mode: T) => T): () => T;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TradingSession } from "../core/session.js";
|
|
2
|
+
/** Acquire only while requested, releasing the previous channel before a new one. */
|
|
3
|
+
export declare function useFinancialLease(session: TradingSession, kind: "equity" | "margin" | "pip", requestedSymbol: () => string | undefined): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { OrderTicketView } from "./order-ticket/view.js";
|
|
2
|
+
export { AccountManagerView } from "./account-manager/view.js";
|
|
3
|
+
export { createTicketController } from "./order-ticket/controller.js";
|
|
4
|
+
export type { TicketController, TicketState, } from "./order-ticket/controller.js";
|
|
5
|
+
export { mountTradingPlatform } from "./mount.js";
|
|
6
|
+
export type { TradingMountOptions } from "./mount.js";
|
|
7
|
+
export { DepthPanelView } from "./dom/view.js";
|
|
8
|
+
export { createDomController } from "./dom/controller.js";
|
|
9
|
+
export type { DomController } from "./dom/controller.js";
|