@luxalgo/vela 0.6.3 → 0.6.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 (45) hide show
  1. package/dist/{DataProvider-DHX4x6-r.d.ts → DataProvider-BmHkcwvJ.d.ts} +1 -1
  2. package/dist/{DataProvider-CNmk84SH.d.cts → DataProvider-DrN7ZIou.d.cts} +1 -1
  3. package/dist/{chunk-TP56QRMK.js → chunk-2R7BANEM.js} +1 -1
  4. package/dist/{chunk-U5KCQHAC.js → chunk-3QX6QOCX.js} +80 -12
  5. package/dist/{chunk-7D6YIF34.js → chunk-6FA4TDUF.js} +325 -67
  6. package/dist/{chunk-7Y7CJ7EN.js → chunk-BEJ57HP4.js} +8 -1
  7. package/dist/{chunk-QHZ7IXFL.js → chunk-OICPLNU7.js} +59 -9
  8. package/dist/{contributions-DDpv7hEL.d.cts → contributions-2bEmCF9S.d.cts} +2 -2
  9. package/dist/{contributions-ciV6Neyd.d.ts → contributions-DatoAzMx.d.ts} +2 -2
  10. package/dist/{history-CFqZm5re.d.ts → history-BmyjaVir.d.cts} +6 -6
  11. package/dist/{history-ChoT34nz.d.cts → history-CvOtsjT5.d.ts} +6 -6
  12. package/dist/index.cjs +394 -78
  13. package/dist/index.d.cts +36 -9
  14. package/dist/index.d.ts +36 -9
  15. package/dist/index.js +4 -4
  16. package/dist/{options-BqGeFHtp.d.ts → options-YdiaaVjt.d.cts} +20 -1
  17. package/dist/{options-BqGeFHtp.d.cts → options-YdiaaVjt.d.ts} +20 -1
  18. package/dist/{plugin-C97gUCVf.d.ts → plugin-BeCMF1VQ.d.ts} +3 -3
  19. package/dist/{plugin-CSb_sTiN.d.cts → plugin-CkiStRaI.d.cts} +3 -3
  20. package/dist/plugin.cjs +8 -0
  21. package/dist/plugin.d.cts +4 -4
  22. package/dist/plugin.d.ts +4 -4
  23. package/dist/plugin.js +2 -2
  24. package/dist/providers/binance.d.cts +2 -2
  25. package/dist/providers/binance.d.ts +2 -2
  26. package/dist/providers/coinbase.d.cts +2 -2
  27. package/dist/providers/coinbase.d.ts +2 -2
  28. package/dist/providers/hyperliquid.d.cts +2 -2
  29. package/dist/providers/hyperliquid.d.ts +2 -2
  30. package/dist/ui.cjs +59 -9
  31. package/dist/ui.d.cts +10 -2
  32. package/dist/ui.d.ts +10 -2
  33. package/dist/ui.js +2 -2
  34. package/dist/vela.global.js +394 -78
  35. package/dist/vela.global.min.js +84 -47
  36. package/dist/widget.cjs +646 -191
  37. package/dist/widget.d.cts +29 -8
  38. package/dist/widget.d.ts +29 -8
  39. package/dist/widget.js +145 -73
  40. package/dist/workspace.cjs +601 -142
  41. package/dist/workspace.d.cts +29 -5
  42. package/dist/workspace.d.ts +29 -5
  43. package/dist/workspace.js +143 -67
  44. package/package.json +1 -1
  45. /package/dist/{chunk-Q3XQHLIH.js → chunk-AOGZBKUE.js} +0 -0
package/dist/ui.cjs CHANGED
@@ -186,8 +186,13 @@ var STATIC_CSS = `
186
186
  ${STATIC_DECLS}
187
187
  font-family: var(--vela-font, -apple-system, system-ui, sans-serif);
188
188
  box-sizing: border-box;
189
+ /* Chrome text (titles, buttons, menus, readouts) is UI, not copy \u2014 never selectable. */
190
+ user-select: none;
191
+ -webkit-user-select: none;
189
192
  }
190
193
  .vela-ui *, .vela-ui-layer * { box-sizing: border-box; }
194
+ /* Text ENTRY is the one exception: selection is part of editing. */
195
+ .vela-ui :is(input, textarea), .vela-ui-layer :is(input, textarea) { user-select: text; -webkit-user-select: text; }
191
196
  .vela-icon { display: inline-flex; align-items: center; flex: none; }
192
197
  .vela-icon svg { display: block; }
193
198
  `;
@@ -666,6 +671,23 @@ var MENU_CSS = `
666
671
  background: var(--vela-hover-strong);
667
672
  color: var(--vela-fg-bright);
668
673
  }
674
+ /* Checkmark mode (context/action menus): every row reserves the leading mark column so
675
+ labels align; a checked row fills it with a \u2713 and brightens its ink \u2014 the row surface
676
+ stays free for the hover wash. */
677
+ .vela-menu-item .vela-menu-mark {
678
+ width: 14px;
679
+ flex: none;
680
+ display: inline-flex;
681
+ align-items: center;
682
+ justify-content: center;
683
+ }
684
+ .vela-menu-item .vela-menu-mark .vela-icon {
685
+ width: 14px;
686
+ height: 14px;
687
+ font-size: 14px;
688
+ color: var(--vela-fg-bright);
689
+ }
690
+ .vela-menu-item[data-checkmark] { color: var(--vela-fg-bright); }
669
691
  /* Switch rows (boolean settings in a dropdown): a right-aligned toggle pill \u2014 the
670
692
  same control language as the settings dialog's toggles. */
671
693
  .vela-menu-switch {
@@ -734,6 +756,7 @@ var Surface = class _Surface {
734
756
  this.host = opts.host;
735
757
  this.onSelect = opts.onSelect;
736
758
  this.onFavorite = opts.onFavorite;
759
+ this.checkmarks = opts.checkmarks === true;
737
760
  this.positioner = doc.createElement("div");
738
761
  this.positioner.className = "vela-ui-layer";
739
762
  this.list = doc.createElement("ul");
@@ -812,6 +835,7 @@ var Surface = class _Surface {
812
835
  build() {
813
836
  const doc = this.doc;
814
837
  this.list.replaceChildren();
838
+ const markable = this.checkmarks && this.items.some((i) => !(i.submenu && i.submenu.length > 0) && !i.toggle && i.checked !== void 0);
815
839
  for (const item of this.items) {
816
840
  if (item.separatorBefore) {
817
841
  const sep = doc.createElement("li");
@@ -825,7 +849,16 @@ var Surface = class _Surface {
825
849
  li.dataset.veiId = item.id;
826
850
  if (item.toggle) {
827
851
  li.dataset.toggle = "1";
828
- } else if (!branch && item.checked) {
852
+ }
853
+ if (markable) {
854
+ const mark = doc.createElement("span");
855
+ mark.className = "vela-menu-mark";
856
+ if (!branch && !item.toggle && item.checked) {
857
+ mark.appendChild(iconEl("check", doc));
858
+ li.dataset.checkmark = "1";
859
+ }
860
+ li.appendChild(mark);
861
+ } else if (!branch && !item.toggle && item.checked) {
829
862
  li.dataset.checked = "1";
830
863
  }
831
864
  if (item.icon) li.appendChild(iconEl(item.icon, doc));
@@ -874,6 +907,7 @@ var Surface = class _Surface {
874
907
  placement: "right-start",
875
908
  onSelect: this.onSelect,
876
909
  onFavorite: this.onFavorite,
910
+ checkmarks: this.checkmarks,
877
911
  id: `${this.mid}--${item.id}`
878
912
  });
879
913
  sub.setItems(item.submenu ?? []);
@@ -898,7 +932,8 @@ var Menu = class {
898
932
  triggerId: opts.triggerId,
899
933
  id: opts.id,
900
934
  minWidth: opts.minWidth,
901
- onFavorite: opts.onFavorite
935
+ onFavorite: opts.onFavorite,
936
+ checkmarks: opts.checkmarks
902
937
  });
903
938
  this.root.setItems(opts.items);
904
939
  }
@@ -2189,6 +2224,9 @@ var NUMBER_CSS = `
2189
2224
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
2190
2225
  -moz-appearance: textfield;
2191
2226
  appearance: textfield;
2227
+ /* Selectable even under a user-select:none host (chart wrapper, .vela-ui). */
2228
+ user-select: text;
2229
+ -webkit-user-select: text;
2192
2230
  }
2193
2231
  .vela-num input::-webkit-inner-spin-button, .vela-num input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
2194
2232
  .vela-num input:hover { border-color: var(--vela-fg-muted); }
@@ -2401,6 +2439,9 @@ var TEXT_CSS = `
2401
2439
  overflow: hidden;
2402
2440
  text-overflow: ellipsis;
2403
2441
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
2442
+ /* Selectable even under a user-select:none host (chart wrapper, .vela-ui). */
2443
+ user-select: text;
2444
+ -webkit-user-select: text;
2404
2445
  }
2405
2446
  .vela-text-field:hover { border-color: var(--vela-fg-muted); }
2406
2447
  .vela-text-field:focus { border-color: var(--vela-focus); box-shadow: 0 0 0 3px var(--vela-focus-soft); }
@@ -2770,6 +2811,9 @@ var TEXTAREA_CSS = `
2770
2811
  resize: vertical;
2771
2812
  outline: none;
2772
2813
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
2814
+ /* Selectable even under a user-select:none host (chart wrapper, .vela-ui). */
2815
+ user-select: text;
2816
+ -webkit-user-select: text;
2773
2817
  }
2774
2818
  .vela-textarea-field:hover { border-color: var(--vela-fg-muted); }
2775
2819
  .vela-textarea-field:focus { border-color: var(--vela-focus); box-shadow: 0 0 0 3px var(--vela-focus-soft); }
@@ -3047,6 +3091,8 @@ var FIELD_CSS = `
3047
3091
  font-size: 14px;
3048
3092
  }
3049
3093
  .vela-field-label[data-size='sm'] { font-size: inherit; opacity: 0.85; }
3094
+ /* Titles are fully inert: spans, not label[for] \u2014 native labels propagate :hover and
3095
+ clicks onto their control, and both belong to the input alone. */
3050
3096
  .vela-field-cell { display: flex; align-items: center; gap: 8px; justify-self: start; }
3051
3097
  .vela-field-bool { display: flex; align-items: center; gap: 8px; min-height: 22px; }
3052
3098
  .vela-field-stacked { display: flex; flex-direction: column; gap: 8px; }
@@ -3105,11 +3151,17 @@ function fieldSeparator() {
3105
3151
  return el;
3106
3152
  }
3107
3153
  function labelEl(text, opts) {
3108
- const el = opts.id ? document.createElement("label") : document.createElement("span");
3109
- if (opts.id && el instanceof HTMLLabelElement) el.htmlFor = opts.id;
3154
+ const el = document.createElement("span");
3110
3155
  el.className = "vela-field-label";
3111
3156
  if (opts.size) el.dataset.size = opts.size;
3112
3157
  el.textContent = text;
3158
+ const id = opts.id;
3159
+ if (id) {
3160
+ el.id = `${id}--title`;
3161
+ queueMicrotask(() => {
3162
+ el.ownerDocument.getElementById(id)?.setAttribute("aria-labelledby", el.id);
3163
+ });
3164
+ }
3113
3165
  return el;
3114
3166
  }
3115
3167
  function asList(control) {
@@ -3138,9 +3190,7 @@ function fieldRow(opts) {
3138
3190
  it.className = "vela-field-inline-item";
3139
3191
  if (item.toggleFirst) it.style.flexDirection = "row-reverse";
3140
3192
  if (item.label) {
3141
- const lbl = labelEl(item.label, { id: item.id, size });
3142
- if (item.toggleFirst) lbl.style.cursor = "pointer";
3143
- it.appendChild(lbl);
3193
+ it.appendChild(labelEl(item.label, { id: item.id, size }));
3144
3194
  }
3145
3195
  if (item.fit) it.appendChild(item.control);
3146
3196
  else {
@@ -3165,7 +3215,7 @@ function fieldRow(opts) {
3165
3215
  tone: "bright",
3166
3216
  onChange: (v) => opts.toggle?.onChange(v)
3167
3217
  });
3168
- wrap2.append(sw.el, labelEl(opts.label, { size }));
3218
+ wrap2.append(sw.el, labelEl(opts.label, { id: opts.toggle?.id ?? opts.id, size }));
3169
3219
  if (opts.info) wrap2.appendChild(opts.info);
3170
3220
  if (opts.toggle?.get) {
3171
3221
  const get = opts.toggle.get;
@@ -3204,7 +3254,7 @@ function fieldRow(opts) {
3204
3254
  if (controls.length > 0) dimControls(controls, v);
3205
3255
  }
3206
3256
  });
3207
- left.append(sw.el, labelEl(opts.label, { size }));
3257
+ left.append(sw.el, labelEl(opts.label, { id: opts.toggle.id ?? opts.id, size }));
3208
3258
  wrap.appendChild(left);
3209
3259
  if (controls.length > 0) dimControls(controls, opts.toggle.checked);
3210
3260
  if (opts.toggle.get) {
package/dist/ui.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as VelaTheme } from './options-BqGeFHtp.cjs';
1
+ import { c as VelaTheme } from './options-YdiaaVjt.cjs';
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.cjs';
4
4
  import * as tooltip from '@zag-js/tooltip';
@@ -91,7 +91,8 @@ interface MenuItemDescriptor {
91
91
  /** Right-aligned hint (e.g. a shortcut display from KeymapManager). */
92
92
  hint?: string;
93
93
  /** Selected state (undefined = plain item). A plain checked item renders as a
94
- * highlighted row (brighter surface + bright ink). */
94
+ * highlighted row (brighter surface + bright ink) — or, in a menu built with
95
+ * `checkmarks`, as a leading ✓ with the row surface left free for hover. */
95
96
  checked?: boolean;
96
97
  /** Render as a SWITCH row (a right-aligned toggle pill reflecting `checked`)
97
98
  * instead of the selected-row highlight, and keep the menu OPEN on selection —
@@ -152,6 +153,13 @@ interface MenuOptions extends MenuControllerOptions {
152
153
  /** Star-toggle reports from items carrying `favorite` (the menu stays open — starring
153
154
  * is a side action on a row, never a selection). */
154
155
  onFavorite?: (id: string, on: boolean) => void;
156
+ /** Mark checked items with a leading ✓ instead of the selected-row background wash —
157
+ * the shape for pointer-anchored action menus (right-click context menus), where a
158
+ * washed row reads as hover state. A level holding checkable rows reserves the mark
159
+ * column on all its rows so labels align; an all-action level keeps its natural left
160
+ * edge. Submenus inherit the mode. Dropdown menus (a trigger button opening a
161
+ * picker) keep the default wash. */
162
+ checkmarks?: boolean;
155
163
  }
156
164
  declare class Menu {
157
165
  private readonly root;
package/dist/ui.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as VelaTheme } from './options-BqGeFHtp.js';
1
+ import { c as VelaTheme } from './options-YdiaaVjt.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';
@@ -91,7 +91,8 @@ interface MenuItemDescriptor {
91
91
  /** Right-aligned hint (e.g. a shortcut display from KeymapManager). */
92
92
  hint?: string;
93
93
  /** Selected state (undefined = plain item). A plain checked item renders as a
94
- * highlighted row (brighter surface + bright ink). */
94
+ * highlighted row (brighter surface + bright ink) — or, in a menu built with
95
+ * `checkmarks`, as a leading ✓ with the row surface left free for hover. */
95
96
  checked?: boolean;
96
97
  /** Render as a SWITCH row (a right-aligned toggle pill reflecting `checked`)
97
98
  * instead of the selected-row highlight, and keep the menu OPEN on selection —
@@ -152,6 +153,13 @@ interface MenuOptions extends MenuControllerOptions {
152
153
  /** Star-toggle reports from items carrying `favorite` (the menu stays open — starring
153
154
  * is a side action on a row, never a selection). */
154
155
  onFavorite?: (id: string, on: boolean) => void;
156
+ /** Mark checked items with a leading ✓ instead of the selected-row background wash —
157
+ * the shape for pointer-anchored action menus (right-click context menus), where a
158
+ * washed row reads as hover state. A level holding checkable rows reserves the mark
159
+ * column on all its rows so labels align; an all-action level keeps its natural left
160
+ * edge. Submenus inherit the mode. Dropdown menus (a trigger button opening a
161
+ * picker) keep the default wash. */
162
+ checkmarks?: boolean;
155
163
  }
156
164
  declare class Menu {
157
165
  private readonly root;
package/dist/ui.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Drawer, KeymapManager, Tooltip, drawerController, tooltipController } from './chunk-TP56QRMK.js';
2
- export { ColorField, Dialog, FIELD_GAP_PX, GlyphSelect, Menu, NumberInput, Popover, Select, Switch, TextArea, TextField, WIDTH_FIELD_OPTIONS, applyPlotOverlayTokens, applyThemeTokens, blendOver, buildColorPicker, buildFieldControl, buildPalette, clampNumber, closeColorPopover, closeOpenPopovers, closeWidthPopover, colorField, colorPickerController, combineColor, decorateSelectScroll, dialogController, ensureUIHost, eventDismissedPopover, fieldGrid, fieldGridColumns, fieldRow, fieldSection, fieldSeparator, fillSelectList, glyphSelectController, hslHex, insetRect, intersectRects, isPopoverOpen, lineWidthGlyph, menuController, nextUid, normalizeProps, numberInputController, openPopoverTrigger, openSelectList, placePopover, popoverController, runMachine, selectController, snapToStep, splitColor, spreadProps, switchController, textAreaController, textFieldController, toggleSelectList, transparencyChecker, viewportRect, widthField, widthFieldOptions } from './chunk-QHZ7IXFL.js';
1
+ export { Drawer, KeymapManager, Tooltip, drawerController, tooltipController } from './chunk-2R7BANEM.js';
2
+ export { ColorField, Dialog, FIELD_GAP_PX, GlyphSelect, Menu, NumberInput, Popover, Select, Switch, TextArea, TextField, WIDTH_FIELD_OPTIONS, applyPlotOverlayTokens, applyThemeTokens, blendOver, buildColorPicker, buildFieldControl, buildPalette, clampNumber, closeColorPopover, closeOpenPopovers, closeWidthPopover, colorField, colorPickerController, combineColor, decorateSelectScroll, dialogController, ensureUIHost, eventDismissedPopover, fieldGrid, fieldGridColumns, fieldRow, fieldSection, fieldSeparator, fillSelectList, glyphSelectController, hslHex, insetRect, intersectRects, isPopoverOpen, lineWidthGlyph, menuController, nextUid, normalizeProps, numberInputController, openPopoverTrigger, openSelectList, placePopover, popoverController, runMachine, selectController, snapToStep, splitColor, spreadProps, switchController, textAreaController, textFieldController, toggleSelectList, transparencyChecker, viewportRect, widthField, widthFieldOptions } from './chunk-OICPLNU7.js';
3
3
  export { FIELD_FOCUS_CSS, FIELD_FOCUS_RING, iconEl, iconMarkup, injectStyles, overlayScrollbarCss, registerIcon, svg16, svg24, withAlpha } from './chunk-PN5KWFZ4.js';