@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.
Files changed (236) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +55 -0
  3. package/README.md +53 -2
  4. package/dist/asset-entry.d.ts +3 -0
  5. package/dist/asset.d.ts +3 -0
  6. package/dist/asset.js +21689 -0
  7. package/dist/chart/bracket-links.d.ts +8 -0
  8. package/dist/chart/context-actions.d.ts +7 -0
  9. package/dist/chart/edit-presentation.d.ts +32 -0
  10. package/dist/chart/edit-preview.d.ts +26 -0
  11. package/dist/chart/exit-profit.d.ts +32 -0
  12. package/dist/chart/frame-batch.d.ts +15 -0
  13. package/dist/chart/overlay-coordinator.d.ts +18 -0
  14. package/dist/chart/overlay-events.d.ts +3 -0
  15. package/dist/chart/overlay-gesture.d.ts +40 -0
  16. package/dist/chart/overlay-index.d.ts +30 -0
  17. package/dist/chart/overlay-projection.d.ts +51 -0
  18. package/dist/chart/overlay-types.d.ts +42 -0
  19. package/dist/chart/parent-links.d.ts +33 -0
  20. package/dist/chart/position-profit.d.ts +15 -0
  21. package/dist/chart/review-lock.d.ts +14 -0
  22. package/dist/chart/ticket-projection.d.ts +36 -0
  23. package/dist/compat/default-formatters.d.ts +6 -0
  24. package/dist/compat/delegate.d.ts +11 -0
  25. package/dist/compat/factory.d.ts +5 -0
  26. package/dist/compat/formatters.d.ts +26 -0
  27. package/dist/compat/host-dialogs.d.ts +5 -0
  28. package/dist/compat/host-preferences.d.ts +8 -0
  29. package/dist/compat/host.d.ts +39 -0
  30. package/dist/compat/watched-value.d.ts +25 -0
  31. package/dist/conformance/index.d.ts +78 -0
  32. package/dist/conformance/index.js +6859 -0
  33. package/dist/conformance/replay.d.ts +35 -0
  34. package/dist/contracts/broker.d.ts +1122 -0
  35. package/dist/contracts/broker.js +168 -0
  36. package/dist/contracts/index.d.ts +3 -0
  37. package/dist/contracts/index.js +168 -0
  38. package/dist/contracts/market-data.d.ts +289 -0
  39. package/dist/contracts/market-data.js +11 -0
  40. package/dist/contracts/ports.d.ts +469 -0
  41. package/dist/contracts/ports.js +5 -0
  42. package/dist/core/account-datasets.d.ts +29 -0
  43. package/dist/core/account-lifecycle.d.ts +70 -0
  44. package/dist/core/account-types.d.ts +6 -0
  45. package/dist/core/bounded-map.d.ts +12 -0
  46. package/dist/core/bracket-input.d.ts +32 -0
  47. package/dist/core/bracket-modification.d.ts +6 -0
  48. package/dist/core/bracket-parent.d.ts +11 -0
  49. package/dist/core/broker-debug.d.ts +10 -0
  50. package/dist/core/capabilities.d.ts +34 -0
  51. package/dist/core/capability-metadata.d.ts +60 -0
  52. package/dist/core/capability-policy.d.ts +32 -0
  53. package/dist/core/chart-exit-level.d.ts +11 -0
  54. package/dist/core/chart-order-edit.d.ts +50 -0
  55. package/dist/core/clock.d.ts +2 -0
  56. package/dist/core/close-commands.d.ts +24 -0
  57. package/dist/core/close-flow.d.ts +14 -0
  58. package/dist/core/command-context.d.ts +16 -0
  59. package/dist/core/command-coordinator.d.ts +71 -0
  60. package/dist/core/command-follow.d.ts +32 -0
  61. package/dist/core/command-keys.d.ts +11 -0
  62. package/dist/core/context-orders.d.ts +19 -0
  63. package/dist/core/deferred.d.ts +5 -0
  64. package/dist/core/dialog-coordinator.d.ts +73 -0
  65. package/dist/core/display-preferences.d.ts +10 -0
  66. package/dist/core/disposal.d.ts +8 -0
  67. package/dist/core/entity-store.d.ts +56 -0
  68. package/dist/core/entity-validation.d.ts +9 -0
  69. package/dist/core/errors.d.ts +24 -0
  70. package/dist/core/execution-demand.d.ts +11 -0
  71. package/dist/core/execution-sound.d.ts +10 -0
  72. package/dist/core/exit-level-draft.d.ts +9 -0
  73. package/dist/core/exit-level-summary.d.ts +3 -0
  74. package/dist/core/exit-level-template.d.ts +16 -0
  75. package/dist/core/features.d.ts +39 -0
  76. package/dist/core/financial-rules.d.ts +70 -0
  77. package/dist/core/history-limit.d.ts +11 -0
  78. package/dist/core/identity.d.ts +14 -0
  79. package/dist/core/immutable.d.ts +8 -0
  80. package/dist/core/keyed-ref-count.d.ts +18 -0
  81. package/dist/core/leverage-commands.d.ts +42 -0
  82. package/dist/core/modification-context.d.ts +22 -0
  83. package/dist/core/modification-routing.d.ts +43 -0
  84. package/dist/core/notification-log.d.ts +33 -0
  85. package/dist/core/number-precision.d.ts +4 -0
  86. package/dist/core/order-commands.d.ts +50 -0
  87. package/dist/core/order-duration.d.ts +14 -0
  88. package/dist/core/order-labels.d.ts +7 -0
  89. package/dist/core/order-matching.d.ts +16 -0
  90. package/dist/core/order-modification.d.ts +20 -0
  91. package/dist/core/order-notifications.d.ts +30 -0
  92. package/dist/core/order-protection.d.ts +4 -0
  93. package/dist/core/parent-protection.d.ts +10 -0
  94. package/dist/core/position-commands.d.ts +45 -0
  95. package/dist/core/position-custom-fields.d.ts +5 -0
  96. package/dist/core/position-estimates.d.ts +22 -0
  97. package/dist/core/position-protection-permissions.d.ts +4 -0
  98. package/dist/core/preferences-key.d.ts +2 -0
  99. package/dist/core/preview-leases.d.ts +12 -0
  100. package/dist/core/protection-legs.d.ts +23 -0
  101. package/dist/core/protection-notifications.d.ts +9 -0
  102. package/dist/core/protection-rules.d.ts +21 -0
  103. package/dist/core/quantity-input.d.ts +53 -0
  104. package/dist/core/read-coordinator.d.ts +15 -0
  105. package/dist/core/readers.d.ts +6 -0
  106. package/dist/core/relative-price.d.ts +4 -0
  107. package/dist/core/review-policy.d.ts +17 -0
  108. package/dist/core/session-types.d.ts +1 -0
  109. package/dist/core/session.d.ts +114 -0
  110. package/dist/core/snapshot-dataset.d.ts +47 -0
  111. package/dist/core/symbol-catalog.d.ts +37 -0
  112. package/dist/core/tradability.d.ts +26 -0
  113. package/dist/core/trading-commands.d.ts +104 -0
  114. package/dist/core/trading-rules.d.ts +14 -0
  115. package/dist/core/trading-settings.d.ts +39 -0
  116. package/dist/core/trading-state.d.ts +52 -0
  117. package/dist/core/value-store.d.ts +11 -0
  118. package/dist/index.d.ts +15 -0
  119. package/dist/index.js +6593 -0
  120. package/dist/market-data/depth-book.d.ts +18 -0
  121. package/dist/market-data/index.d.ts +3 -0
  122. package/dist/market-data/index.js +735 -0
  123. package/dist/market-data/session-demand.d.ts +15 -0
  124. package/dist/market-data/subscriptions.d.ts +13 -0
  125. package/dist/mock/broker.d.ts +75 -0
  126. package/dist/mock/clock.d.ts +12 -0
  127. package/dist/mock/feeds.d.ts +18 -0
  128. package/dist/mock/index.d.ts +5 -0
  129. package/dist/mock/index.js +1956 -0
  130. package/dist/mock/protection-cancellation.d.ts +7 -0
  131. package/dist/mock/scenarios.d.ts +5 -0
  132. package/dist/paper/broker.d.ts +41 -0
  133. package/dist/paper/index.d.ts +6 -0
  134. package/dist/paper/index.js +469 -0
  135. package/dist/paper/market.d.ts +57 -0
  136. package/dist/paper/rules.d.ts +40 -0
  137. package/dist/ui/account-manager/account-pages.d.ts +18 -0
  138. package/dist/ui/account-manager/column-presentation.d.ts +5 -0
  139. package/dist/ui/account-manager/context-menu.d.ts +13 -0
  140. package/dist/ui/account-manager/csv-downloads.d.ts +5 -0
  141. package/dist/ui/account-manager/custom-page.d.ts +16 -0
  142. package/dist/ui/account-manager/custom-table.d.ts +18 -0
  143. package/dist/ui/account-manager/format-account-value.d.ts +12 -0
  144. package/dist/ui/account-manager/position-reader.d.ts +19 -0
  145. package/dist/ui/account-manager/row-action-tracker.d.ts +12 -0
  146. package/dist/ui/account-manager/row-actions.d.ts +37 -0
  147. package/dist/ui/account-manager/status-counts.d.ts +6 -0
  148. package/dist/ui/account-manager/table-controls.d.ts +13 -0
  149. package/dist/ui/account-manager/table-export.d.ts +30 -0
  150. package/dist/ui/account-manager/table-model.d.ts +11 -0
  151. package/dist/ui/account-manager/table-toolbar.d.ts +25 -0
  152. package/dist/ui/account-manager/table.d.ts +24 -0
  153. package/dist/ui/account-manager/view.d.ts +19 -0
  154. package/dist/ui/account-manager/workspace.d.ts +15 -0
  155. package/dist/ui/chart-actions.d.ts +11 -0
  156. package/dist/ui/chart-controls/eligibility.d.ts +6 -0
  157. package/dist/ui/chart-controls/quote-buttons.d.ts +15 -0
  158. package/dist/ui/chart-controls/quote-controls.d.ts +12 -0
  159. package/dist/ui/chart-controls/quote-widths.d.ts +8 -0
  160. package/dist/ui/dialogs/close-amount-form.d.ts +8 -0
  161. package/dist/ui/dialogs/close-preview-dialog.d.ts +5 -0
  162. package/dist/ui/dialogs/confirm-dialog.d.ts +7 -0
  163. package/dist/ui/dialogs/dialog-body.d.ts +11 -0
  164. package/dist/ui/dialogs/leverage-form.d.ts +10 -0
  165. package/dist/ui/dialogs/message-dialog.d.ts +6 -0
  166. package/dist/ui/dialogs/position-protection.d.ts +14 -0
  167. package/dist/ui/dialogs/properties-dialog.d.ts +9 -0
  168. package/dist/ui/dialogs/sanitize-html.d.ts +2 -0
  169. package/dist/ui/dialogs/types.d.ts +5 -0
  170. package/dist/ui/dialogs/view.d.ts +5 -0
  171. package/dist/ui/dock-sizes.d.ts +20 -0
  172. package/dist/ui/dom/controller.d.ts +34 -0
  173. package/dist/ui/dom/ladder.d.ts +23 -0
  174. package/dist/ui/dom/view.d.ts +8 -0
  175. package/dist/ui/dom/workspace.d.ts +17 -0
  176. package/dist/ui/effective-mode.d.ts +11 -0
  177. package/dist/ui/financial-lease.d.ts +3 -0
  178. package/dist/ui/icons.d.ts +4 -0
  179. package/dist/ui/index.d.ts +9 -0
  180. package/dist/ui/index.js +15918 -0
  181. package/dist/ui/layout.d.ts +5 -0
  182. package/dist/ui/mount.d.ts +11 -0
  183. package/dist/ui/notifications/log.d.ts +6 -0
  184. package/dist/ui/notifications/toasts.d.ts +5 -0
  185. package/dist/ui/number-input.d.ts +2 -0
  186. package/dist/ui/order-ticket/chart-draft-controls.d.ts +8 -0
  187. package/dist/ui/order-ticket/chart-projection.d.ts +9 -0
  188. package/dist/ui/order-ticket/controller.d.ts +41 -0
  189. package/dist/ui/order-ticket/custom-field.d.ts +9 -0
  190. package/dist/ui/order-ticket/duration-input.d.ts +9 -0
  191. package/dist/ui/order-ticket/exit-input.d.ts +34 -0
  192. package/dist/ui/order-ticket/financial-controls.d.ts +10 -0
  193. package/dist/ui/order-ticket/layout-context.d.ts +7 -0
  194. package/dist/ui/order-ticket/market.d.ts +12 -0
  195. package/dist/ui/order-ticket/menu.d.ts +6 -0
  196. package/dist/ui/order-ticket/mode-rules.d.ts +4 -0
  197. package/dist/ui/order-ticket/modification-fields.d.ts +23 -0
  198. package/dist/ui/order-ticket/move-handle.d.ts +4 -0
  199. package/dist/ui/order-ticket/order-sent.d.ts +4 -0
  200. package/dist/ui/order-ticket/placement.d.ts +27 -0
  201. package/dist/ui/order-ticket/preview-message.d.ts +4 -0
  202. package/dist/ui/order-ticket/price-input.d.ts +14 -0
  203. package/dist/ui/order-ticket/quantity-input.d.ts +26 -0
  204. package/dist/ui/order-ticket/review-panel.d.ts +10 -0
  205. package/dist/ui/order-ticket/rules.d.ts +16 -0
  206. package/dist/ui/order-ticket/stop-input.d.ts +17 -0
  207. package/dist/ui/order-ticket/submit-bar.d.ts +13 -0
  208. package/dist/ui/order-ticket/symbol-search-controller.d.ts +50 -0
  209. package/dist/ui/order-ticket/symbol-search.d.ts +12 -0
  210. package/dist/ui/order-ticket/untradable-notice.d.ts +8 -0
  211. package/dist/ui/order-ticket/view.d.ts +16 -0
  212. package/dist/ui/panel-visibility.d.ts +6 -0
  213. package/dist/ui/pointer-drag.d.ts +20 -0
  214. package/dist/ui/popup-mount.d.ts +4 -0
  215. package/dist/ui/primitives.d.ts +29 -0
  216. package/dist/ui/protection/editor.d.ts +18 -0
  217. package/dist/ui/protection/fields.d.ts +30 -0
  218. package/dist/ui/protection/level.d.ts +14 -0
  219. package/dist/ui/protection/protected-size.d.ts +5 -0
  220. package/dist/ui/protection/ticket-workspace.d.ts +7 -0
  221. package/dist/ui/resize-handle.css +34 -0
  222. package/dist/ui/resize-handle.d.ts +20 -0
  223. package/dist/ui/resize-handle.js +185 -0
  224. package/dist/ui/select.d.ts +26 -0
  225. package/dist/ui/surface-theme.d.ts +3 -0
  226. package/dist/ui/switch.d.ts +7 -0
  227. package/dist/ui/symbol-logo.d.ts +7 -0
  228. package/dist/ui/tabs.d.ts +19 -0
  229. package/dist/ui/ticket-dock.d.ts +18 -0
  230. package/dist/ui/ticket-shell.d.ts +15 -0
  231. package/dist/ui/trading.css +1808 -0
  232. package/dist/ui/trap-tab.d.ts +11 -0
  233. package/dist/vendor/solid-ui/index.d.ts +3 -0
  234. package/dist/vendor/solid-ui/paged-list-window.d.ts +27 -0
  235. package/dist/vendor/solid-ui/virtual-list.d.ts +21 -0
  236. package/package.json +104 -3
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Shared resize handle (resize-handle.tsx). The host places the handle and gives it a 5px
3
+ * hit area; this file draws its line. At rest the line uses --resize-handle-rest (transparent
4
+ * by default; a host may show a divider). Hover, keyboard focus and dragging show a 2px accent
5
+ * line at 55% strength. Focus that came from a pointer press shows no line after release.
6
+ */
7
+ .lumen-resize-handle {
8
+ touch-action: none;
9
+ outline: none;
10
+ }
11
+ .lumen-resize-handle[data-axis="width"] { cursor: col-resize; }
12
+ .lumen-resize-handle[data-axis="height"] { cursor: row-resize; }
13
+ .lumen-resize-handle[hidden] { display: none; }
14
+ /* The accent line is the focus indicator; no outline box on top of it. */
15
+ .lumen-resize-handle:focus-visible { outline: none; }
16
+ .lumen-resize-handle::after {
17
+ content: "";
18
+ position: absolute;
19
+ pointer-events: none;
20
+ background: var(--resize-handle-rest, transparent);
21
+ transition: background 0.15s;
22
+ }
23
+ .lumen-resize-handle[data-axis="width"]::after { inset-block: 0; left: calc(50% - 0.5px); width: 1px; }
24
+ .lumen-resize-handle[data-axis="height"]::after { inset-inline: 0; top: calc(50% - 0.5px); height: 1px; }
25
+ .lumen-resize-handle:hover::after,
26
+ .lumen-resize-handle:focus-visible:not([data-focus-source="pointer"])::after,
27
+ .lumen-resize-handle[data-state="dragging"]::after {
28
+ background: color-mix(in srgb, var(--resize-handle-accent, #2962ff) 55%, transparent);
29
+ }
30
+ .lumen-resize-handle[data-axis="width"]:is(:hover, :focus-visible:not([data-focus-source="pointer"]), [data-state="dragging"])::after { left: calc(50% - 1px); width: 2px; }
31
+ .lumen-resize-handle[data-axis="height"]:is(:hover, :focus-visible:not([data-focus-source="pointer"]), [data-state="dragging"])::after { top: calc(50% - 1px); height: 2px; }
32
+ @media (prefers-reduced-motion: reduce) {
33
+ .lumen-resize-handle::after { transition: none; }
34
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The one resize handle for terminal and trading panels. Placement belongs to the host (`class`);
3
+ * the hit area, accent line and focus rules come from `resize-handle.css`, so every handle looks
4
+ * and behaves the same. One owner handles completion, lost release, cancellation and removal,
5
+ * with no layout reads on moves.
6
+ */
7
+ export declare function ResizeHandle(props: {
8
+ /** `width` resizes a panel on the handle's far side horizontally; `height` vertically. */
9
+ axis: "width" | "height";
10
+ /** Host placement class, for example a dock edge or a flex gap. */
11
+ class?: string;
12
+ label: string;
13
+ value: number;
14
+ capture?(): number;
15
+ min: number;
16
+ max: number;
17
+ disabled?: boolean;
18
+ resize(pixels: number): void;
19
+ save(): void;
20
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,185 @@
1
+ // src/ui/resize-handle.tsx
2
+ import { template as _$template } from "solid-js/web";
3
+ import { delegateEvents as _$delegateEvents } from "solid-js/web";
4
+ import { setAttribute as _$setAttribute } from "solid-js/web";
5
+ import { className as _$className } from "solid-js/web";
6
+ import { effect as _$effect } from "solid-js/web";
7
+ import { createEffect, createSignal, onCleanup } from "solid-js";
8
+
9
+ // src/ui/pointer-drag.ts
10
+ function createPointerDrag(options) {
11
+ let disposed = false;
12
+ let gesture;
13
+ function detach(element) {
14
+ const document = element.ownerDocument;
15
+ document.removeEventListener("pointermove", move);
16
+ document.removeEventListener("pointerup", up);
17
+ document.removeEventListener("pointercancel", cancelPointer);
18
+ document.removeEventListener("keydown", escape, true);
19
+ document.removeEventListener("visibilitychange", visibility);
20
+ document.defaultView?.removeEventListener("blur", blur);
21
+ element.removeEventListener("lostpointercapture", cancelPointer);
22
+ }
23
+ function finish(commit) {
24
+ const ending = gesture;
25
+ if (!ending) return;
26
+ gesture = void 0;
27
+ detach(ending.element);
28
+ try {
29
+ if (ending.element.hasPointerCapture?.(ending.id))
30
+ ending.element.releasePointerCapture(ending.id);
31
+ } catch {
32
+ }
33
+ options.activeChanged?.(false);
34
+ if (commit) options.commit(ending.origin);
35
+ else options.cancel(ending.origin);
36
+ }
37
+ function move(event) {
38
+ if (!gesture || event.pointerId !== gesture.id) return;
39
+ if (event.buttons === 0) {
40
+ finish(false);
41
+ return;
42
+ }
43
+ const active = gesture;
44
+ if (options.preview(active.origin, {
45
+ x: event.clientX - active.x,
46
+ y: event.clientY - active.y
47
+ }) === false)
48
+ finish(false);
49
+ event.preventDefault();
50
+ }
51
+ function up(event) {
52
+ if (event.pointerId === gesture?.id) finish(true);
53
+ }
54
+ function cancelPointer(event) {
55
+ if (event.pointerId === gesture?.id) finish(false);
56
+ }
57
+ const blur = () => finish(false);
58
+ const visibility = () => {
59
+ if (gesture?.element.ownerDocument.hidden) finish(false);
60
+ };
61
+ function escape(event) {
62
+ if (!gesture || event.key !== "Escape") return;
63
+ event.preventDefault();
64
+ event.stopPropagation();
65
+ finish(false);
66
+ }
67
+ return {
68
+ active: () => gesture !== void 0,
69
+ begin(event, element) {
70
+ if (disposed || options.disabled() || gesture || event.button !== 0 || !event.isPrimary || !element.isConnected)
71
+ return false;
72
+ event.preventDefault();
73
+ event.stopPropagation();
74
+ element.focus({ preventScroll: true });
75
+ if (disposed || options.disabled() || !element.isConnected) return false;
76
+ gesture = {
77
+ id: event.pointerId,
78
+ x: event.clientX,
79
+ y: event.clientY,
80
+ origin: options.capture(),
81
+ element
82
+ };
83
+ const document = element.ownerDocument;
84
+ document.addEventListener("pointermove", move, { passive: false });
85
+ document.addEventListener("pointerup", up);
86
+ document.addEventListener("pointercancel", cancelPointer);
87
+ document.addEventListener("keydown", escape, true);
88
+ document.addEventListener("visibilitychange", visibility);
89
+ document.defaultView?.addEventListener("blur", blur);
90
+ element.addEventListener("lostpointercapture", cancelPointer);
91
+ try {
92
+ element.setPointerCapture?.(event.pointerId);
93
+ } catch {
94
+ finish(false);
95
+ return false;
96
+ }
97
+ options.activeChanged?.(true);
98
+ return gesture !== void 0;
99
+ },
100
+ cancel: () => finish(false),
101
+ destroy() {
102
+ if (disposed) return;
103
+ disposed = true;
104
+ finish(false);
105
+ }
106
+ };
107
+ }
108
+
109
+ // src/ui/resize-handle.tsx
110
+ var _tmpl$ = /* @__PURE__ */ _$template(`<div role=separator>`);
111
+ function ResizeHandle(props) {
112
+ const bound = (value) => Math.round(Math.min(props.max, Math.max(props.min, value)));
113
+ const [dragging, setDragging] = createSignal(false);
114
+ const drag = createPointerDrag({
115
+ activeChanged: setDragging,
116
+ disabled: () => props.disabled === true,
117
+ capture: () => ({
118
+ size: props.value,
119
+ restore: props.capture?.() ?? props.value
120
+ }),
121
+ preview: (origin, delta) => props.resize(bound(origin.size - (props.axis === "width" ? delta.x : delta.y))),
122
+ commit: () => props.save(),
123
+ cancel: (origin) => props.resize(origin.restore)
124
+ });
125
+ createEffect(() => {
126
+ if (props.disabled) drag.cancel();
127
+ });
128
+ onCleanup(drag.destroy);
129
+ return (() => {
130
+ var _el$ = _tmpl$();
131
+ _el$.$$keydown = (event) => {
132
+ delete event.currentTarget.dataset.focusSource;
133
+ if (props.disabled || drag.active()) return;
134
+ const grow = props.axis === "width" ? "ArrowLeft" : "ArrowUp";
135
+ const shrink = props.axis === "width" ? "ArrowRight" : "ArrowDown";
136
+ let value;
137
+ if (event.key === "Home") value = props.min;
138
+ else if (event.key === "End") value = props.max;
139
+ else if (event.key === grow) value = props.value + (event.shiftKey ? 50 : 10);
140
+ else if (event.key === shrink) value = props.value - (event.shiftKey ? 50 : 10);
141
+ else return;
142
+ event.preventDefault();
143
+ event.stopPropagation();
144
+ props.resize(bound(value));
145
+ props.save();
146
+ };
147
+ _el$.addEventListener("blur", (event) => delete event.currentTarget.dataset.focusSource);
148
+ _el$.$$pointerdown = (event) => {
149
+ event.currentTarget.dataset.focusSource = "pointer";
150
+ drag.begin(event, event.currentTarget);
151
+ };
152
+ _$effect((_p$) => {
153
+ var _v$ = props.class ? `lumen-resize-handle ${props.class}` : "lumen-resize-handle", _v$2 = props.axis, _v$3 = dragging() ? "dragging" : void 0, _v$4 = props.label, _v$5 = props.axis === "width" ? "vertical" : "horizontal", _v$6 = props.min, _v$7 = props.max, _v$8 = bound(props.value), _v$9 = props.disabled === true, _v$0 = props.disabled ? -1 : 0, _v$1 = props.disabled;
154
+ _v$ !== _p$.e && _$className(_el$, _p$.e = _v$);
155
+ _v$2 !== _p$.t && _$setAttribute(_el$, "data-axis", _p$.t = _v$2);
156
+ _v$3 !== _p$.a && _$setAttribute(_el$, "data-state", _p$.a = _v$3);
157
+ _v$4 !== _p$.o && _$setAttribute(_el$, "aria-label", _p$.o = _v$4);
158
+ _v$5 !== _p$.i && _$setAttribute(_el$, "aria-orientation", _p$.i = _v$5);
159
+ _v$6 !== _p$.n && _$setAttribute(_el$, "aria-valuemin", _p$.n = _v$6);
160
+ _v$7 !== _p$.s && _$setAttribute(_el$, "aria-valuemax", _p$.s = _v$7);
161
+ _v$8 !== _p$.h && _$setAttribute(_el$, "aria-valuenow", _p$.h = _v$8);
162
+ _v$9 !== _p$.r && _$setAttribute(_el$, "aria-disabled", _p$.r = _v$9);
163
+ _v$0 !== _p$.d && _$setAttribute(_el$, "tabindex", _p$.d = _v$0);
164
+ _v$1 !== _p$.l && (_el$.hidden = _p$.l = _v$1);
165
+ return _p$;
166
+ }, {
167
+ e: void 0,
168
+ t: void 0,
169
+ a: void 0,
170
+ o: void 0,
171
+ i: void 0,
172
+ n: void 0,
173
+ s: void 0,
174
+ h: void 0,
175
+ r: void 0,
176
+ d: void 0,
177
+ l: void 0
178
+ });
179
+ return _el$;
180
+ })();
181
+ }
182
+ _$delegateEvents(["pointerdown", "keydown"]);
183
+ export {
184
+ ResizeHandle
185
+ };
@@ -0,0 +1,26 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface TradingSelectOption<T> {
3
+ readonly value: T;
4
+ readonly label: string;
5
+ readonly disabled?: boolean;
6
+ /** Shown under the label, e.g. why an option is unavailable. */
7
+ readonly description?: string;
8
+ /** Optional shorter label and help for a unit menu. */
9
+ readonly menuLabel?: string;
10
+ readonly help?: string;
11
+ }
12
+ /**
13
+ * Accessible single-choice picker on Kobalte Select. The trigger carries the accessible name; the list renders
14
+ * in the presentation-owned popup surface so docked panels never clip it.
15
+ */
16
+ export declare function TradingSelect<T extends string | number>(props: {
17
+ label: string;
18
+ value: T | undefined;
19
+ options: readonly TradingSelectOption<T>[];
20
+ disabled?: boolean;
21
+ class?: string;
22
+ placeholder?: string;
23
+ unitMenu?: boolean;
24
+ onChange(value: T): void;
25
+ children?: JSX.Element;
26
+ }): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { ReadonlyValue, TradingEnvironment } from "../contracts/ports.js";
2
+ /** Native inputs follow the mounted chart theme rather than the operating system. */
3
+ export declare function bindSurfaceTheme(element: HTMLElement, environment: ReadonlyValue<TradingEnvironment>): () => void;
@@ -0,0 +1,7 @@
1
+ /** On/off control on Kobalte Switch; its hidden input keeps native checkbox semantics for forms and tests. */
2
+ export declare function TradingSwitch(props: {
3
+ label: string;
4
+ checked: boolean;
5
+ disabled?: boolean;
6
+ onChange(checked: boolean): void;
7
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /** Host-provided logo lookup; absent when the chart does not enable `show_symbol_logos`. */
2
+ export declare const TradingSymbolLogos: import("solid-js").Context<((symbol: string) => Promise<readonly string[]>) | undefined>;
3
+ /** Decorative logo next to a symbol; the symbol text remains the accessible name. */
4
+ export declare function SymbolLogo(props: {
5
+ symbol: string;
6
+ enabled: boolean;
7
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { type JSX } from "solid-js";
2
+ export interface TradingTab<T extends string | number> {
3
+ readonly value: T;
4
+ readonly label: JSX.Element;
5
+ readonly disabled?: boolean;
6
+ }
7
+ /**
8
+ * Tab row on Kobalte Tabs: arrow keys move between tabs and select them; panels stay with the caller.
9
+ * Triggers keep the `trading-button` look so existing density styles apply.
10
+ */
11
+ export declare function TradingTabs<T extends string | number>(props: {
12
+ label: string;
13
+ value: T;
14
+ tabs: readonly TradingTab<T>[];
15
+ class: string;
16
+ disabled?: boolean;
17
+ hidden?: boolean;
18
+ onChange(value: T): void;
19
+ }): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { TradingPresentationPort } from "../contracts/ports.js";
2
+ import type { TradingSession } from "../core/session.js";
3
+ import type { TicketController } from "./order-ticket/controller.js";
4
+ /** A ticket phase that occupies the dock. */
5
+ export declare const ticketPhaseOpen: (phase: string) => boolean;
6
+ /** A dialog entry that is the position protection side pane. */
7
+ export declare const isPositionPaneEntry: (entry: {
8
+ readonly request: {
9
+ readonly kind: string;
10
+ };
11
+ } | undefined) => boolean;
12
+ /** One dock hosts both order tickets and the position protection side pane. */
13
+ export declare function createTicketDock(session: TradingSession, ticket: TicketController, presentation: TradingPresentationPort, width: () => number): {
14
+ isOpen: () => boolean;
15
+ isTicketOpen: () => boolean;
16
+ isPositionPaneOpen: () => boolean;
17
+ syncTicketDock: () => void;
18
+ };
@@ -0,0 +1,15 @@
1
+ import type { DockSizes } from "./dock-sizes.js";
2
+ import type { ReadonlyValue, TradingPresentationPort } from "../contracts/ports.js";
3
+ import type { TradingSession } from "../core/session.js";
4
+ import type { TicketController } from "./order-ticket/controller.js";
5
+ export declare function TicketShell(props: {
6
+ sizes: DockSizes;
7
+ session: TradingSession;
8
+ controller: TicketController;
9
+ presentation: TradingPresentationPort;
10
+ element: HTMLElement;
11
+ takeInitiator(): HTMLElement | undefined;
12
+ visibility: ReadonlyValue<boolean>;
13
+ requestSymbol?: (symbol: string) => void;
14
+ changeSymbol?: (symbol: string) => void;
15
+ }): import("solid-js").JSX.Element;