@luxalgo/vela 0.8.2 → 0.8.4

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 (48) hide show
  1. package/dist/{DataProvider-COGDs9Xg.d.cts → DataProvider-Bw58CjYy.d.cts} +1 -1
  2. package/dist/{DataProvider-DpOWZD8F.d.ts → DataProvider-Byo8pEv0.d.ts} +1 -1
  3. package/dist/{chunk-DPAA3SRT.js → chunk-ALTGHKIM.js} +836 -32
  4. package/dist/{chunk-27UTYE7T.js → chunk-AUOB7A5Y.js} +49 -7
  5. package/dist/{chunk-HKNO24GD.js → chunk-I2U4NZD2.js} +56 -1
  6. package/dist/{chunk-R2JMNIHY.js → chunk-MOJ4T26N.js} +341 -169
  7. package/dist/{chunk-T3DZIR5Y.js → chunk-UNUVPQFW.js} +2214 -886
  8. package/dist/{chunk-NLDTVFOI.js → chunk-WY5H4S4I.js} +129 -10
  9. package/dist/{contributions-Cgm9RJYP.d.cts → contributions-BY3zSYiZ.d.ts} +98 -7
  10. package/dist/{contributions-bWgwyiVi.d.ts → contributions-DOm40g5-.d.cts} +98 -7
  11. package/dist/index.cjs +3066 -893
  12. package/dist/index.d.cts +36 -22
  13. package/dist/index.d.ts +36 -22
  14. package/dist/index.js +5 -5
  15. package/dist/{options-NAUHiQEC.d.ts → options-CSXbjMM5.d.cts} +129 -4
  16. package/dist/{options-NAUHiQEC.d.cts → options-CSXbjMM5.d.ts} +129 -4
  17. package/dist/{plugin-CqxWoDKS.d.ts → plugin-BDxUhGO3.d.ts} +4 -4
  18. package/dist/{plugin-CjjzZX2F.d.cts → plugin-CiQVyETg.d.cts} +4 -4
  19. package/dist/plugin.cjs +573 -17
  20. package/dist/plugin.d.cts +5 -5
  21. package/dist/plugin.d.ts +5 -5
  22. package/dist/plugin.js +3 -3
  23. package/dist/providers/binance.d.cts +2 -2
  24. package/dist/providers/binance.d.ts +2 -2
  25. package/dist/providers/coinbase.d.cts +2 -2
  26. package/dist/providers/coinbase.d.ts +2 -2
  27. package/dist/providers/hyperliquid.d.cts +2 -2
  28. package/dist/providers/hyperliquid.d.ts +2 -2
  29. package/dist/{side-panel-wMNfgyZb.d.cts → side-panel-_2UK1gSm.d.cts} +45 -3
  30. package/dist/{side-panel-wMNfgyZb.d.ts → side-panel-_2UK1gSm.d.ts} +45 -3
  31. package/dist/{statusline-model-Dih6FGWP.d.ts → statusline-model-C9tYXuux.d.ts} +19 -4
  32. package/dist/{statusline-model-Dpfpq54A.d.cts → statusline-model-DUBX6Fib.d.cts} +19 -4
  33. package/dist/ui.cjs +224 -14
  34. package/dist/ui.d.cts +119 -87
  35. package/dist/ui.d.ts +119 -87
  36. package/dist/ui.js +3 -3
  37. package/dist/vela.global.js +3073 -900
  38. package/dist/vela.global.min.js +158 -54
  39. package/dist/widget.cjs +3640 -1119
  40. package/dist/widget.d.cts +24 -10
  41. package/dist/widget.d.ts +24 -10
  42. package/dist/widget.js +7 -7
  43. package/dist/workspace.cjs +3639 -1119
  44. package/dist/workspace.d.cts +61 -20
  45. package/dist/workspace.d.ts +61 -20
  46. package/dist/workspace.js +6 -6
  47. package/package.json +1 -1
  48. /package/dist/{chunk-JU4CWEBF.js → chunk-W5YPYZ2P.js} +0 -0
package/dist/ui.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as VelaTheme } from './options-NAUHiQEC.js';
1
+ import { c as VelaTheme } from './options-CSXbjMM5.js';
2
2
  import { MachineSchema, Service, Machine } from '@zag-js/core';
3
3
  export { a as KeyBindingDescriptor, K as KeymapManager, b as KeymapOptions, R as ResolvedBinding } from './keymap-CGOz5F5f.js';
4
4
  import * as tooltip from '@zag-js/tooltip';
@@ -11,91 +11,6 @@ export { normalizeProps, spreadProps } from '@zag-js/vanilla';
11
11
  * returned unchanged so callers can pass through `transparent`, `currentColor`, etc. */
12
12
  declare function withAlpha(color: string, alpha: number): string;
13
13
 
14
- /** A ready-to-insert element rendering the icon (empty span when unknown). */
15
- declare function iconEl(id: string, doc?: Document): HTMLElement;
16
-
17
- /** Overlay scrollbar used by settings panes, dialog bodies, and similar chrome. */
18
- declare function overlayScrollbarCss(selector: string, width?: number): string;
19
- /** Focus ring shared by typeable fields (combo inputs, textareas). */
20
- declare const FIELD_FOCUS_CSS = "outline:none;transition:border-color .12s ease,box-shadow .12s ease;";
21
- declare const FIELD_FOCUS_RING = "border-color:var(--vela-focus);box-shadow:0 0 0 3px var(--vela-focus-soft);";
22
- /** Inject a stylesheet once per root (document or shadow root). Idempotent by id. */
23
- declare function injectStyles(id: string, css: string, root?: Document | ShadowRoot): void;
24
-
25
- /** Write the theme-derived custom properties onto a host element (the widget root and
26
- * every floating layer — menus/tooltips portal outside the root, so layers re-apply). */
27
- declare function applyThemeTokens(el: HTMLElement, t: VelaTheme): void;
28
- /** Re-token a chart-overlay host (statusline, watermark, toast — chrome floating OVER
29
- * the plot) from the LIVE plot surface: a config edit can recolor the plot background
30
- * independently of the app theme (a white plot typed into settings on the dark theme),
31
- * and the overlay ink must stay readable either way. `config` is the renderer's
32
- * `getConfig()` snapshot; a missing/shapeless one falls back to the base app theme.
33
- * Floating menus and dropdowns do NOT use this — they mount on {@link floatingLayerHost}
34
- * so their surface follows the app theme alone. */
35
- declare function applyPlotOverlayTokens(host: HTMLElement, base: VelaTheme, config: unknown): void;
36
- /** Mark an element as a kit host: static token sheet + the `.vela-ui` class. */
37
- declare function ensureUIHost(el: HTMLElement, theme?: VelaTheme): void;
38
-
39
- interface MachineHandle<T extends MachineSchema> {
40
- service: Service<T>;
41
- /** Re-run the view projection now (e.g. after external DOM swaps). */
42
- flush(): void;
43
- stop(): void;
44
- }
45
- /** Start a machine and keep `render(service)` in sync with every transition.
46
- * `render` runs once immediately (initial projection) and on each machine notification. */
47
- declare function runMachine<T extends MachineSchema>(machine: Machine<T>, props: Partial<T['props']> | (() => Partial<T['props']>), render: (service: Service<T>) => void): MachineHandle<T>;
48
- /** Unique ids for machine instances (Zag keys its DOM lookups on them). */
49
- declare function nextUid(prefix: string): string;
50
-
51
- /** Dispatched on a surface's element once it is shown. */
52
- declare const SURFACE_OPEN_EVENT = "vela:surface-open";
53
- /** Dispatched on a surface's element as it starts to close, before it hides or leaves the DOM. */
54
- declare const SURFACE_CLOSE_EVENT = "vela:surface-close";
55
- /** What opened or closed: a menu (submenus included), a popover (select lists, color
56
- * pickers, mark cards, the layout picker), a dialog, a drawer, or a side panel. */
57
- type SurfaceKind = 'menu' | 'popover' | 'dialog' | 'drawer' | 'panel';
58
- /** The `detail` of a {@link SURFACE_OPEN_EVENT} / {@link SURFACE_CLOSE_EVENT} event. */
59
- interface SurfaceEventDetail {
60
- kind: SurfaceKind;
61
- /** The element that opened it, when there is one (a menu's button, a popover's trigger). */
62
- trigger: HTMLElement | null;
63
- }
64
-
65
- interface TooltipControllerOptions {
66
- placement?: tooltip.Placement;
67
- /** ms before opening on hover (default 0 — the reference tooltips are instant). */
68
- openDelay?: number;
69
- closeDelay?: number;
70
- /** Keep open while the pointer is over the content (rich tooltips). */
71
- interactive?: boolean;
72
- /** Share the trigger's DOM id with other machines composed on the SAME element
73
- * (each Zag machine otherwise stamps its own id — last one wins and breaks the rest). */
74
- triggerId?: string;
75
- }
76
- type TooltipService = tooltip.Service;
77
- type TooltipApi = tooltip.Api;
78
- interface TooltipController {
79
- machine: typeof tooltip.machine;
80
- props: Partial<tooltip.Props>;
81
- connect(service: TooltipService): TooltipApi;
82
- }
83
- declare function tooltipController(opts?: TooltipControllerOptions): TooltipController;
84
-
85
- interface TooltipOptions extends TooltipControllerOptions {
86
- content: string | Node | (() => Node);
87
- host?: HTMLElement;
88
- }
89
- declare class Tooltip {
90
- private readonly positioner;
91
- private readonly content;
92
- private readonly handle;
93
- private readonly trigger;
94
- constructor(trigger: HTMLElement, opts: TooltipOptions);
95
- setContent(content: string | Node | (() => Node)): void;
96
- destroy(): void;
97
- }
98
-
99
14
  /** One menu entry. `id` is the selection value reported to `onSelect`. */
100
15
  interface MenuItemDescriptor {
101
16
  id: string;
@@ -113,7 +28,8 @@ interface MenuItemDescriptor {
113
28
  * instead of the selected-row highlight, and keep the menu OPEN on selection —
114
29
  * the shape for boolean settings living inside a dropdown. */
115
30
  toggle?: boolean;
116
- /** Icon id (see the `vela/ui` icon registry) rendered before the label. */
31
+ /** Icon id (see the `vela/ui` icon registry) rendered before the label. A level where
32
+ * any row has one gives its iconless rows an empty slot, so the labels align. */
117
33
  icon?: string;
118
34
  /** Favorite-star affordance at the row's right edge: `false` renders an outline
119
35
  * star revealed on row hover, `true` a filled star that stays visible. Clicking
@@ -175,6 +91,13 @@ interface MenuOptions extends MenuControllerOptions {
175
91
  * edge. Submenus inherit the mode. Dropdown menus (a trigger button opening a
176
92
  * picker) keep the default wash. */
177
93
  checkmarks?: boolean;
94
+ /** Sit each row's icon in a squared badge (a 24px rounded tile with a faint fill and a soft
95
+ * border) instead of a bare glyph: its glyph brightens on a hovered row, and the tile
96
+ * inverts on the selected one. A
97
+ * level where some rows carry an icon reserves the badge column on all its rows so
98
+ * labels align; a level with no icon keeps its natural left edge. With `checkmarks`,
99
+ * the mark column leads and the badge follows. Submenus inherit the mode. */
100
+ iconBadges?: boolean;
178
101
  }
179
102
  declare class Menu {
180
103
  private readonly root;
@@ -189,6 +112,91 @@ declare class Menu {
189
112
  destroy(): void;
190
113
  }
191
114
 
115
+ /** A ready-to-insert element rendering the icon (empty span when unknown). */
116
+ declare function iconEl(id: string, doc?: Document): HTMLElement;
117
+
118
+ /** Overlay scrollbar used by settings panes, dialog bodies, and similar chrome. */
119
+ declare function overlayScrollbarCss(selector: string, width?: number): string;
120
+ /** Focus ring shared by typeable fields (combo inputs, textareas). */
121
+ declare const FIELD_FOCUS_CSS = "outline:none;transition:border-color .12s ease,box-shadow .12s ease;";
122
+ declare const FIELD_FOCUS_RING = "border-color:var(--vela-focus);box-shadow:0 0 0 3px var(--vela-focus-soft);";
123
+ /** Inject a stylesheet once per root (document or shadow root). Idempotent by id. */
124
+ declare function injectStyles(id: string, css: string, root?: Document | ShadowRoot): void;
125
+
126
+ /** Write the theme-derived custom properties onto a host element (the widget root and
127
+ * every floating layer — menus/tooltips portal outside the root, so layers re-apply). */
128
+ declare function applyThemeTokens(el: HTMLElement, t: VelaTheme): void;
129
+ /** Re-token a chart-overlay host (statusline, watermark, toast — chrome floating OVER
130
+ * the plot) from the LIVE plot surface: a config edit can recolor the plot background
131
+ * independently of the app theme (a white plot typed into settings on the dark theme),
132
+ * and the overlay ink must stay readable either way. `config` is the renderer's
133
+ * `getConfig()` snapshot; a missing/shapeless one falls back to the base app theme.
134
+ * Floating menus and dropdowns do NOT use this — they mount on {@link floatingLayerHost}
135
+ * so their surface follows the app theme alone. */
136
+ declare function applyPlotOverlayTokens(host: HTMLElement, base: VelaTheme, config: unknown): void;
137
+ /** Mark an element as a kit host: static token sheet + the `.vela-ui` class. */
138
+ declare function ensureUIHost(el: HTMLElement, theme?: VelaTheme): void;
139
+
140
+ interface MachineHandle<T extends MachineSchema> {
141
+ service: Service<T>;
142
+ /** Re-run the view projection now (e.g. after external DOM swaps). */
143
+ flush(): void;
144
+ stop(): void;
145
+ }
146
+ /** Start a machine and keep `render(service)` in sync with every transition.
147
+ * `render` runs once immediately (initial projection) and on each machine notification. */
148
+ declare function runMachine<T extends MachineSchema>(machine: Machine<T>, props: Partial<T['props']> | (() => Partial<T['props']>), render: (service: Service<T>) => void): MachineHandle<T>;
149
+ /** Unique ids for machine instances (Zag keys its DOM lookups on them). */
150
+ declare function nextUid(prefix: string): string;
151
+
152
+ /** Dispatched on a surface's element once it is shown. */
153
+ declare const SURFACE_OPEN_EVENT = "vela:surface-open";
154
+ /** Dispatched on a surface's element as it starts to close, before it hides or leaves the DOM. */
155
+ declare const SURFACE_CLOSE_EVENT = "vela:surface-close";
156
+ /** What opened or closed: a menu (submenus included), a popover (select lists, color
157
+ * pickers, mark cards, the layout picker), a dialog, a drawer, or a side panel. */
158
+ type SurfaceKind = 'menu' | 'popover' | 'dialog' | 'drawer' | 'panel';
159
+ /** The `detail` of a {@link SURFACE_OPEN_EVENT} / {@link SURFACE_CLOSE_EVENT} event. */
160
+ interface SurfaceEventDetail {
161
+ kind: SurfaceKind;
162
+ /** The element that opened it, when there is one (a menu's button, a popover's trigger). */
163
+ trigger: HTMLElement | null;
164
+ }
165
+
166
+ interface TooltipControllerOptions {
167
+ placement?: tooltip.Placement;
168
+ /** ms before opening on hover (default 0 — the reference tooltips are instant). */
169
+ openDelay?: number;
170
+ closeDelay?: number;
171
+ /** Keep open while the pointer is over the content (rich tooltips). */
172
+ interactive?: boolean;
173
+ /** Share the trigger's DOM id with other machines composed on the SAME element
174
+ * (each Zag machine otherwise stamps its own id — last one wins and breaks the rest). */
175
+ triggerId?: string;
176
+ }
177
+ type TooltipService = tooltip.Service;
178
+ type TooltipApi = tooltip.Api;
179
+ interface TooltipController {
180
+ machine: typeof tooltip.machine;
181
+ props: Partial<tooltip.Props>;
182
+ connect(service: TooltipService): TooltipApi;
183
+ }
184
+ declare function tooltipController(opts?: TooltipControllerOptions): TooltipController;
185
+
186
+ interface TooltipOptions extends TooltipControllerOptions {
187
+ content: string | Node | (() => Node);
188
+ host?: HTMLElement;
189
+ }
190
+ declare class Tooltip {
191
+ private readonly positioner;
192
+ private readonly content;
193
+ private readonly handle;
194
+ private readonly trigger;
195
+ constructor(trigger: HTMLElement, opts: TooltipOptions);
196
+ setContent(content: string | Node | (() => Node)): void;
197
+ destroy(): void;
198
+ }
199
+
192
200
  interface DialogControllerOptions {
193
201
  /** Trap focus + backdrop (default true). Non-modal = floating panel. */
194
202
  modal?: boolean;
@@ -245,6 +253,17 @@ declare class Dialog {
245
253
  constructor(opts?: DialogOptions);
246
254
  private opener;
247
255
  private wasOpen;
256
+ /** The panel and scrim's exit animation after a close; a reopen cancels it. */
257
+ private exit;
258
+ private destroyed;
259
+ private setShown;
260
+ /** Keep the just-closed dialog up through its exit animation, then hide it — or
261
+ * remove it, when it was destroyed meanwhile. `spreadProps` re-applies the close
262
+ * props' `hidden` only when its value changes, so lifting it keeps the panel and
263
+ * scrim up until the exit ends. The positioner spans the viewport: inert, it lets
264
+ * clicks through to the page while the panel animates out. */
265
+ private holdExit;
266
+ private detach;
248
267
  /** Closing hands focus back to whatever opened it (Escape, the ✕, hide(), or a
249
268
  * teardown that outruns the machine's close notification). */
250
269
  private restoreOpener;
@@ -312,6 +331,17 @@ declare class Drawer {
312
331
  setTitle(title: string): void;
313
332
  private opener;
314
333
  private wasOpen;
334
+ /** The sheet and scrim's exit animation after a close; a reopen cancels it. */
335
+ private exit;
336
+ private destroyed;
337
+ private setShown;
338
+ /** Keep the just-closed sheet up through its exit animation, then hide it — or
339
+ * remove it, when it was destroyed meanwhile. `spreadProps` re-applies the close
340
+ * props' `hidden` only when its value changes, so lifting it keeps the sheet and
341
+ * scrim up until the exit ends. The positioner spans the host: inert, it lets
342
+ * clicks through to the page while the sheet animates out. */
343
+ private holdExit;
344
+ private detach;
315
345
  /** Closing hands focus back to whatever opened it (Escape, the ✕, hide(), or a
316
346
  * teardown that outruns the machine's close notification). */
317
347
  private restoreOpener;
@@ -425,6 +455,8 @@ declare class Popover {
425
455
  private readonly fadeMs;
426
456
  /** The pending removal of a fading-out shell; a show() that reuses the shell cancels it. */
427
457
  private leaveTimer;
458
+ /** The shell's exit animation before it leaves the DOM; a show() that reuses the shell cancels it. */
459
+ private exit;
428
460
  constructor(opts: PopoverOptions);
429
461
  get open(): boolean;
430
462
  get position(): PopoverPosition;
package/dist/ui.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Drawer, KeymapManager, Tooltip, drawerController, tooltipController } from './chunk-27UTYE7T.js';
2
- export { CALLOUT_CSS, CALLOUT_STYLE_ID, CalloutBubble, ColorField, DatePicker, Dialog, FIELD_GAP_PX, GlyphSelect, Menu, NumberInput, Popover, Select, Switch, TextArea, TextField, WIDTH_FIELD_OPTIONS, applyPlotOverlayTokens, applyThemeTokens, blendOver, buildColorPicker, buildFieldControl, buildPalette, calloutPanelRows, clampNumber, closeColorPopover, closeOpenPopovers, closeWidthPopover, closesPanel, colorField, colorPickerController, combineColor, datePickerController, decorateSelectScroll, dialogController, ensureUIHost, eventDismissedPopover, fieldGrid, fieldGridColumns, fieldRow, fieldSection, fieldSeparator, fillSelectList, glyphSelectController, hslHex, insetRect, intersectRects, isPopoverOpen, isoDate, lineWidthGlyph, menuController, nextUid, normalizeDateInput, normalizeProps, numberInputController, openPopoverTrigger, openSelectList, placePopover, popoverController, runMachine, selectController, snapToStep, splitColor, spreadProps, switchController, textAreaController, textFieldController, toggleSelectList, transparencyChecker, viewportRect, widthField, widthFieldOptions } from './chunk-NLDTVFOI.js';
3
- export { FIELD_FOCUS_CSS, FIELD_FOCUS_RING, SURFACE_CLOSE_EVENT, SURFACE_OPEN_EVENT, iconEl, iconMarkup, injectStyles, overlayScrollbarCss, registerIcon, svg16, svg24, withAlpha } from './chunk-HKNO24GD.js';
1
+ export { Drawer, KeymapManager, Tooltip, drawerController, tooltipController } from './chunk-AUOB7A5Y.js';
2
+ export { CALLOUT_CSS, CALLOUT_STYLE_ID, CalloutBubble, ColorField, DatePicker, Dialog, FIELD_GAP_PX, GlyphSelect, Menu, NumberInput, Popover, Select, Switch, TextArea, TextField, WIDTH_FIELD_OPTIONS, applyPlotOverlayTokens, applyThemeTokens, blendOver, buildColorPicker, buildFieldControl, buildPalette, calloutPanelRows, clampNumber, closeColorPopover, closeOpenPopovers, closeWidthPopover, closesPanel, colorField, colorPickerController, combineColor, datePickerController, decorateSelectScroll, dialogController, ensureUIHost, eventDismissedPopover, fieldGrid, fieldGridColumns, fieldRow, fieldSection, fieldSeparator, fillSelectList, glyphSelectController, hslHex, insetRect, intersectRects, isPopoverOpen, isoDate, lineWidthGlyph, menuController, nextUid, normalizeDateInput, normalizeProps, numberInputController, openPopoverTrigger, openSelectList, placePopover, popoverController, runMachine, selectController, snapToStep, splitColor, spreadProps, switchController, textAreaController, textFieldController, toggleSelectList, transparencyChecker, viewportRect, widthField, widthFieldOptions } from './chunk-WY5H4S4I.js';
3
+ export { FIELD_FOCUS_CSS, FIELD_FOCUS_RING, SURFACE_CLOSE_EVENT, SURFACE_OPEN_EVENT, iconEl, iconMarkup, injectStyles, overlayScrollbarCss, registerIcon, svg16, svg24, withAlpha } from './chunk-I2U4NZD2.js';