@luxalgo/vela 0.8.1 → 0.8.2
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/README.md +1 -1
- package/dist/{DataProvider-BrlxntPN.d.cts → DataProvider-COGDs9Xg.d.cts} +1 -1
- package/dist/{DataProvider-DwFIoV4r.d.ts → DataProvider-DpOWZD8F.d.ts} +1 -1
- package/dist/{chunk-LMBYEGUR.js → chunk-27UTYE7T.js} +25 -2
- package/dist/{chunk-EZ5FWVLA.js → chunk-DPAA3SRT.js} +94 -13
- package/dist/{chunk-BZQM2XO7.js → chunk-HKNO24GD.js} +13 -1
- package/dist/{chunk-NELQJCGK.js → chunk-NLDTVFOI.js} +41 -3
- package/dist/{chunk-DBDXKZUF.js → chunk-R2JMNIHY.js} +53 -13
- package/dist/{chunk-ATGTCWHJ.js → chunk-T3DZIR5Y.js} +171 -32
- package/dist/{contributions-tjNExo1o.d.ts → contributions-Cgm9RJYP.d.cts} +38 -11
- package/dist/{contributions-CtlptxR8.d.cts → contributions-bWgwyiVi.d.ts} +38 -11
- package/dist/index.cjs +239 -37
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +4 -4
- package/dist/{options-BnEPUuVV.d.ts → options-NAUHiQEC.d.cts} +3 -3
- package/dist/{options-BnEPUuVV.d.cts → options-NAUHiQEC.d.ts} +3 -3
- package/dist/{plugin-BWxJRKzS.d.cts → plugin-CjjzZX2F.d.cts} +4 -4
- package/dist/{plugin-e2WUEtiI.d.ts → plugin-CqxWoDKS.d.ts} +4 -4
- package/dist/plugin.cjs +20 -6
- package/dist/plugin.d.cts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.js +2 -2
- package/dist/providers/binance.d.cts +2 -2
- package/dist/providers/binance.d.ts +2 -2
- package/dist/providers/coinbase.d.cts +2 -2
- package/dist/providers/coinbase.d.ts +2 -2
- package/dist/providers/hyperliquid.d.cts +2 -2
- package/dist/providers/hyperliquid.d.ts +2 -2
- package/dist/{side-panel-HF0IAzwf.d.cts → side-panel-wMNfgyZb.d.cts} +13 -0
- package/dist/{side-panel-HF0IAzwf.d.ts → side-panel-wMNfgyZb.d.ts} +13 -0
- package/dist/{statusline-model-zKXtGIjj.d.ts → statusline-model-Dih6FGWP.d.ts} +3 -3
- package/dist/{statusline-model-DFY7tuHj.d.cts → statusline-model-Dpfpq54A.d.cts} +3 -3
- package/dist/ui.cjs +77 -2
- package/dist/ui.d.cts +28 -2
- package/dist/ui.d.ts +28 -2
- package/dist/ui.js +3 -3
- package/dist/vela.global.js +239 -37
- package/dist/vela.global.min.js +52 -52
- package/dist/widget.cjs +383 -50
- package/dist/widget.d.cts +20 -10
- package/dist/widget.d.ts +20 -10
- package/dist/widget.js +7 -7
- package/dist/workspace.cjs +383 -50
- package/dist/workspace.d.cts +5 -5
- package/dist/workspace.d.ts +5 -5
- package/dist/workspace.js +6 -6
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -238,7 +238,7 @@ var IndicatorHandleImpl = class {
|
|
|
238
238
|
this.controller.applyProps(this.id, values);
|
|
239
239
|
}
|
|
240
240
|
updateCode(source) {
|
|
241
|
-
this.controller.updateCode(this.id, source);
|
|
241
|
+
return this.controller.updateCode(this.id, source);
|
|
242
242
|
}
|
|
243
243
|
setVisible(visible) {
|
|
244
244
|
this.controller.setVisible(this.id, visible);
|
|
@@ -641,6 +641,7 @@ registerIcon("expand", S('<rect x="2.2" y="2.2" width="11.6" height="11.6" rx="1
|
|
|
641
641
|
registerIcon("plus", S('<path d="M8 2.8v10.4M2.8 8h10.4"/>'));
|
|
642
642
|
registerIcon("minus", S('<path d="M2.8 8h10.4"/>'));
|
|
643
643
|
registerIcon("maximize", S('<path d="M2.5 6V3a.5.5 0 0 1 .5-.5h3M10 2.5h3a.5.5 0 0 1 .5.5v3M13.5 10v3a.5.5 0 0 1-.5.5h-3M6 13.5H3a.5.5 0 0 1-.5-.5v-3"/>'));
|
|
644
|
+
registerIcon("restore", S('<path d="M6 2.5v3a.5.5 0 0 1-.5.5h-3M13.5 6h-3a.5.5 0 0 1-.5-.5v-3M10 13.5v-3a.5.5 0 0 1 .5-.5h3M2.5 10h3a.5.5 0 0 1 .5.5v3"/>'));
|
|
644
645
|
registerIcon("restore", S('<path d="M6.2 2.5v3.7H2.5M9.8 13.5V9.8h3.7M13.5 6.2H9.8V2.5M2.5 9.8h3.7v3.7"/>'));
|
|
645
646
|
registerIcon("star", S('<path d="M8 2.2l1.75 3.55 3.9.55-2.8 2.75.65 3.9L8 11.1l-3.5 1.85.65-3.9-2.8-2.75 3.9-.55z"/>'));
|
|
646
647
|
registerIcon("star-filled", S('<path d="M8 2.2l1.75 3.55 3.9.55-2.8 2.75.65 3.9L8 11.1l-3.5 1.85.65-3.9-2.8-2.75 3.9-.55z"/>', 'fill="currentColor"'));
|
|
@@ -3299,6 +3300,10 @@ var FibRatios = class extends Drawing {
|
|
|
3299
3300
|
|
|
3300
3301
|
// src/core/drawings/types/FibLevels.ts
|
|
3301
3302
|
var FibLevels = class extends FibRatios {
|
|
3303
|
+
/** Price of a level for the two anchor prices; subclasses override to change which anchor ratio 0 sits on. */
|
|
3304
|
+
levelPrice(ratio, p1, p2) {
|
|
3305
|
+
return p1 + ratio * (p2 - p1);
|
|
3306
|
+
}
|
|
3302
3307
|
/** Per-level pixel line + price for the ENABLED levels, spanning the anchors' time range. */
|
|
3303
3308
|
levelLines(proj) {
|
|
3304
3309
|
const a = this.anchors[0];
|
|
@@ -3308,11 +3313,10 @@ var FibLevels = class extends FibRatios {
|
|
|
3308
3313
|
const xb = proj.xOf(b.time);
|
|
3309
3314
|
const x1 = Math.min(xa, xb);
|
|
3310
3315
|
const x2 = Math.max(xa, xb);
|
|
3311
|
-
const delta = b.price - a.price;
|
|
3312
3316
|
const out = [];
|
|
3313
3317
|
for (const lv of this.levels) {
|
|
3314
3318
|
if (!lv.enabled) continue;
|
|
3315
|
-
const price =
|
|
3319
|
+
const price = this.levelPrice(lv.ratio, a.price, b.price);
|
|
3316
3320
|
const y = proj.yOf(price, this.paneId);
|
|
3317
3321
|
if (y == null) continue;
|
|
3318
3322
|
out.push({ ratio: lv.ratio, color: lv.color, label: lv.label, price, x1, x2, y });
|
|
@@ -3352,8 +3356,7 @@ var FibLevels = class extends FibRatios {
|
|
|
3352
3356
|
const a = this.anchors[0];
|
|
3353
3357
|
const b = this.anchors[1];
|
|
3354
3358
|
if (!a || !b) return null;
|
|
3355
|
-
const
|
|
3356
|
-
const prices = this.levels.filter((l) => l.enabled).map((l) => a.price + l.ratio * delta);
|
|
3359
|
+
const prices = this.levels.filter((l) => l.enabled).map((l) => this.levelPrice(l.ratio, a.price, b.price));
|
|
3357
3360
|
if (prices.length === 0) return null;
|
|
3358
3361
|
return { min: Math.min(...prices), max: Math.max(...prices) };
|
|
3359
3362
|
}
|
|
@@ -3439,13 +3442,24 @@ function cycleLevels(count, enabledCount = count) {
|
|
|
3439
3442
|
// src/core/drawings/types/FibRetracement.ts
|
|
3440
3443
|
var LEVELS = fibLevels([0, 0.236, 0.382, 0.5, 0.618, 0.786, 1]);
|
|
3441
3444
|
var FibRetracement = class extends FibLevels {
|
|
3442
|
-
constructor() {
|
|
3443
|
-
super(
|
|
3445
|
+
constructor(init) {
|
|
3446
|
+
super(init);
|
|
3444
3447
|
this.type = "fibretracement";
|
|
3448
|
+
if (this.reverse === void 0) this.reverse = false;
|
|
3445
3449
|
}
|
|
3446
3450
|
defaultLevels() {
|
|
3447
3451
|
return LEVELS;
|
|
3448
3452
|
}
|
|
3453
|
+
levelPrice(ratio, p1, p2) {
|
|
3454
|
+
return this.reverse ? p1 + ratio * (p2 - p1) : p2 + ratio * (p1 - p2);
|
|
3455
|
+
}
|
|
3456
|
+
writeProps() {
|
|
3457
|
+
return { ...super.writeProps(), reverse: this.reverse };
|
|
3458
|
+
}
|
|
3459
|
+
readProps(props) {
|
|
3460
|
+
super.readProps(props);
|
|
3461
|
+
this.reverse = typeof props.reverse === "boolean" ? props.reverse : true;
|
|
3462
|
+
}
|
|
3449
3463
|
};
|
|
3450
3464
|
|
|
3451
3465
|
// src/core/drawings/types/FibExtension.ts
|
|
@@ -9258,20 +9272,26 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9258
9272
|
/**
|
|
9259
9273
|
* IndicatorController: replace a SCRIPT indicator's source in place (see
|
|
9260
9274
|
* {@link IndicatorHandle.updateCode}). Prepare-first: the running session keeps
|
|
9261
|
-
* computing until the new source has compiled
|
|
9262
|
-
*
|
|
9275
|
+
* computing until the new source has compiled; then the new code runs on TRIAL until
|
|
9276
|
+
* its first model lands, and a failure before that puts the previous code back.
|
|
9277
|
+
* Natives have no script — warn and leave them alone.
|
|
9263
9278
|
*/
|
|
9264
9279
|
updateCode(id, source) {
|
|
9265
9280
|
const record = this.registry.get(id);
|
|
9266
9281
|
const handle = this.handles.get(id);
|
|
9267
|
-
if (!record || !handle) return;
|
|
9282
|
+
if (!record || !handle) return Promise.resolve({ ok: false, error: new Error(`[vela] updateCode("${id}") \u2014 the indicator is no longer on the chart.`) });
|
|
9268
9283
|
if (record.native) {
|
|
9269
9284
|
console.warn(`[vela] updateCode("${id}") \u2014 a native indicator has no script to update.`);
|
|
9270
|
-
return;
|
|
9285
|
+
return Promise.resolve({ ok: false, error: new Error(`[vela] updateCode("${id}") \u2014 a native indicator has no script to update.`) });
|
|
9271
9286
|
}
|
|
9272
|
-
|
|
9273
|
-
record.
|
|
9274
|
-
|
|
9287
|
+
const busy = record.pendingSource !== void 0 || record.codeTrial !== void 0;
|
|
9288
|
+
if (!busy && source === record.source) return Promise.resolve({ ok: true, error: null });
|
|
9289
|
+
return new Promise((resolve) => {
|
|
9290
|
+
(record.codeWaiters ?? (record.codeWaiters = [])).push(resolve);
|
|
9291
|
+
if (record.pendingSource === source || record.pendingSource === void 0 && record.codeTrial && record.source === source) return;
|
|
9292
|
+
record.pendingSource = source;
|
|
9293
|
+
void this.swapSource(id, source, handle);
|
|
9294
|
+
});
|
|
9275
9295
|
}
|
|
9276
9296
|
async swapSource(id, source, handle) {
|
|
9277
9297
|
const engine = this.registry.get(id)?.engine ?? this.engineFor(this.registry.get(id)?.options?.language);
|
|
@@ -9282,26 +9302,41 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9282
9302
|
const record2 = this.registry.get(id);
|
|
9283
9303
|
if (record2?.pendingSource === source) {
|
|
9284
9304
|
record2.pendingSource = void 0;
|
|
9285
|
-
this.
|
|
9305
|
+
this.rejectCode(id, record2, handle, err);
|
|
9286
9306
|
}
|
|
9287
9307
|
return;
|
|
9288
9308
|
}
|
|
9289
9309
|
const record = this.registry.get(id);
|
|
9290
9310
|
if (!record || record.pendingSource !== source) return;
|
|
9291
9311
|
record.pendingSource = void 0;
|
|
9312
|
+
const previous = record.codeTrial?.previous ?? {
|
|
9313
|
+
source: record.source,
|
|
9314
|
+
engine: record.engine,
|
|
9315
|
+
prepared: record.prepared,
|
|
9316
|
+
inputValues: record.inputValues,
|
|
9317
|
+
propValues: record.propValues,
|
|
9318
|
+
inputs: [...handle.inputs],
|
|
9319
|
+
props: [...handle.props]
|
|
9320
|
+
};
|
|
9321
|
+
record.inputValues = valuesOnSchema(prepared.inputs, record.inputValues, record.prepared?.inputs);
|
|
9322
|
+
record.propValues = valuesOnSchema(prepared.props ?? [], record.propValues, record.prepared?.props);
|
|
9292
9323
|
record.source = source;
|
|
9293
9324
|
record.engine = engine;
|
|
9294
9325
|
record.prepared = prepared;
|
|
9295
9326
|
handle.setSource(source);
|
|
9296
|
-
record.inputValues = valuesOnSchema(prepared.inputs, record.inputValues);
|
|
9297
|
-
record.propValues = valuesOnSchema(prepared.props ?? [], record.propValues);
|
|
9298
9327
|
handle.setSchema(prepared.inputs);
|
|
9299
9328
|
handle.setPropsSchema(prepared.props ?? []);
|
|
9300
9329
|
record.session?.stop();
|
|
9301
9330
|
record.session = void 0;
|
|
9302
9331
|
record.pendingStructural = true;
|
|
9303
9332
|
record.pendingCause = "code";
|
|
9304
|
-
if (record.hidden)
|
|
9333
|
+
if (record.hidden) {
|
|
9334
|
+
record.codeTrial = void 0;
|
|
9335
|
+
if (record.renderHandle) this.renderer.setIndicatorInputs(record.renderHandle, record.inputValues, record.propValues);
|
|
9336
|
+
this.settleCode(record, { ok: true, error: null });
|
|
9337
|
+
return;
|
|
9338
|
+
}
|
|
9339
|
+
record.codeTrial = { previous };
|
|
9305
9340
|
if (record.renderHandle) {
|
|
9306
9341
|
this.renderer.setIndicatorInputs(record.renderHandle, record.inputValues, record.propValues);
|
|
9307
9342
|
this.setLoading(record, true);
|
|
@@ -9309,6 +9344,46 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9309
9344
|
this.mountLoadingPlaceholder(id, record);
|
|
9310
9345
|
}
|
|
9311
9346
|
this.executeIndicator(id, handle);
|
|
9347
|
+
if (this.bars.length === 0 && record.codeTrial) {
|
|
9348
|
+
record.codeTrial = void 0;
|
|
9349
|
+
this.settleCode(record, { ok: true, error: null });
|
|
9350
|
+
}
|
|
9351
|
+
}
|
|
9352
|
+
/** Resolve every `updateCode` caller waiting on this record's chain of edits. */
|
|
9353
|
+
settleCode(record, result) {
|
|
9354
|
+
const waiters = record.codeWaiters;
|
|
9355
|
+
record.codeWaiters = void 0;
|
|
9356
|
+
if (waiters) for (const resolve of waiters) resolve(result);
|
|
9357
|
+
}
|
|
9358
|
+
/**
|
|
9359
|
+
* An update failed — at prepare, or on trial before its first model. A trial puts the
|
|
9360
|
+
* previous code back (source, engine, prepared script, values, schema) and restarts it;
|
|
9361
|
+
* its visuals were never dropped, so the chart keeps painting throughout. Then the
|
|
9362
|
+
* failure reports the usual way and every waiting caller learns it.
|
|
9363
|
+
*/
|
|
9364
|
+
rejectCode(id, record, handle, err) {
|
|
9365
|
+
const trial = record.codeTrial;
|
|
9366
|
+
record.codeTrial = void 0;
|
|
9367
|
+
this.fail(id, handle, err);
|
|
9368
|
+
if (trial) {
|
|
9369
|
+
const p = trial.previous;
|
|
9370
|
+
record.session?.stop();
|
|
9371
|
+
record.session = void 0;
|
|
9372
|
+
record.source = p.source;
|
|
9373
|
+
record.engine = p.engine;
|
|
9374
|
+
record.prepared = p.prepared;
|
|
9375
|
+
record.inputValues = p.inputValues;
|
|
9376
|
+
record.propValues = p.propValues;
|
|
9377
|
+
handle.setSource(p.source);
|
|
9378
|
+
handle.setSchema(p.inputs);
|
|
9379
|
+
handle.setPropsSchema(p.props);
|
|
9380
|
+
record.pendingStructural = true;
|
|
9381
|
+
record.pendingCause = void 0;
|
|
9382
|
+
if (record.renderHandle) this.renderer.setIndicatorInputs(record.renderHandle, record.inputValues, record.propValues);
|
|
9383
|
+
if (!record.hidden) this.executeIndicator(id, handle);
|
|
9384
|
+
}
|
|
9385
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
9386
|
+
this.settleCode(record, { ok: false, error });
|
|
9312
9387
|
}
|
|
9313
9388
|
/** IndicatorController: tear down an indicator and (if now empty) its pane. */
|
|
9314
9389
|
/** Live handles of every indicator on the chart (script + native), insertion order. */
|
|
@@ -9323,6 +9398,7 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9323
9398
|
removeIndicator(id) {
|
|
9324
9399
|
const record = this.registry.remove(id);
|
|
9325
9400
|
if (record?.native?.type === "volume") this.volumeOptedOut = true;
|
|
9401
|
+
if (record) this.settleCode(record, { ok: false, error: new Error(`[vela] updateCode("${id}") \u2014 the indicator was removed.`) });
|
|
9326
9402
|
record?.session?.stop();
|
|
9327
9403
|
if (record?.native?.started) record.native.instance.stop();
|
|
9328
9404
|
this.handles.delete(id);
|
|
@@ -9350,6 +9426,10 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9350
9426
|
if (!visible) {
|
|
9351
9427
|
record.session?.stop();
|
|
9352
9428
|
record.session = void 0;
|
|
9429
|
+
if (record.codeTrial) {
|
|
9430
|
+
record.codeTrial = void 0;
|
|
9431
|
+
this.settleCode(record, { ok: true, error: null });
|
|
9432
|
+
}
|
|
9353
9433
|
if (record.native?.started) record.native.instance.suspend();
|
|
9354
9434
|
if (record.renderHandle) this.renderer.setIndicatorVisible?.(record.renderHandle, false);
|
|
9355
9435
|
else if (record.native) this.mountHiddenNativeRow(id, record);
|
|
@@ -9437,6 +9517,7 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9437
9517
|
this.viewportUnsub?.();
|
|
9438
9518
|
this.paneActionUnsub?.();
|
|
9439
9519
|
for (const record of this.registry.all()) {
|
|
9520
|
+
this.settleCode(record, { ok: false, error: new Error("[vela] updateCode \u2014 the chart was destroyed.") });
|
|
9440
9521
|
record.session?.stop();
|
|
9441
9522
|
if (record.native?.started) record.native.instance.stop();
|
|
9442
9523
|
}
|
|
@@ -9505,7 +9586,8 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9505
9586
|
const record = this.registry.get(id);
|
|
9506
9587
|
if (!record || !record.engine || !record.prepared || record.hidden) return;
|
|
9507
9588
|
const mode = this.config.live && !record.prepared.reactsToViewport && record.engine.capabilities.streaming ? "live" : "static";
|
|
9508
|
-
|
|
9589
|
+
const prepared = record.prepared;
|
|
9590
|
+
const session = record.engine.execute(
|
|
9509
9591
|
{
|
|
9510
9592
|
prepared: record.prepared,
|
|
9511
9593
|
market: this.market(),
|
|
@@ -9526,6 +9608,10 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9526
9608
|
const cause = record.pendingCause ?? "history";
|
|
9527
9609
|
if (!this.applyModel(id, model)) return;
|
|
9528
9610
|
record.pendingCause = void 0;
|
|
9611
|
+
if (record.codeTrial) {
|
|
9612
|
+
record.codeTrial = void 0;
|
|
9613
|
+
this.settleCode(record, { ok: true, error: null });
|
|
9614
|
+
}
|
|
9529
9615
|
this.emitContextChanged(id);
|
|
9530
9616
|
this.emitScriptRun(id, cause, first);
|
|
9531
9617
|
},
|
|
@@ -9536,9 +9622,17 @@ var EngineOrchestrator = class _EngineOrchestrator {
|
|
|
9536
9622
|
handle.emit("alert", { id: a.id, message: a.message, title: a.title, time: a.time });
|
|
9537
9623
|
},
|
|
9538
9624
|
onWarning: (w) => this.events.emit("warning", w),
|
|
9539
|
-
onError: (err) =>
|
|
9625
|
+
onError: (err) => {
|
|
9626
|
+
if (record.codeTrial) this.rejectCode(id, record, handle, err);
|
|
9627
|
+
else this.fail(id, handle, err);
|
|
9628
|
+
}
|
|
9540
9629
|
}
|
|
9541
9630
|
);
|
|
9631
|
+
if (record.prepared !== prepared) {
|
|
9632
|
+
session.stop();
|
|
9633
|
+
return;
|
|
9634
|
+
}
|
|
9635
|
+
record.session = session;
|
|
9542
9636
|
this.emitContextChanged(id);
|
|
9543
9637
|
}
|
|
9544
9638
|
/**
|
|
@@ -10039,7 +10133,7 @@ function yieldToPaint() {
|
|
|
10039
10133
|
}
|
|
10040
10134
|
return new Promise((resolve) => setTimeout(resolve, 0));
|
|
10041
10135
|
}
|
|
10042
|
-
function valuesOnSchema(schema, previous) {
|
|
10136
|
+
function valuesOnSchema(schema, previous, oldSchema = []) {
|
|
10043
10137
|
const out = {};
|
|
10044
10138
|
const declared = /* @__PURE__ */ new Set();
|
|
10045
10139
|
for (const s of schema) {
|
|
@@ -10047,9 +10141,22 @@ function valuesOnSchema(schema, previous) {
|
|
|
10047
10141
|
declared.add(s.key);
|
|
10048
10142
|
declared.add(s.title);
|
|
10049
10143
|
}
|
|
10050
|
-
|
|
10144
|
+
const oldDefaults = /* @__PURE__ */ new Map();
|
|
10145
|
+
for (const s of oldSchema) {
|
|
10146
|
+
oldDefaults.set(s.key, s.defval);
|
|
10147
|
+
if (!oldDefaults.has(s.title)) oldDefaults.set(s.title, s.defval);
|
|
10148
|
+
}
|
|
10149
|
+
for (const [k, v] of Object.entries(previous)) {
|
|
10150
|
+
if (!declared.has(k)) continue;
|
|
10151
|
+
if (oldDefaults.has(k) && sameInputValue(oldDefaults.get(k), v)) continue;
|
|
10152
|
+
out[k] = v;
|
|
10153
|
+
}
|
|
10051
10154
|
return out;
|
|
10052
10155
|
}
|
|
10156
|
+
function sameInputValue(a, b) {
|
|
10157
|
+
if (a === b) return true;
|
|
10158
|
+
return typeof a === "object" && a !== null && typeof b === "object" && b !== null && JSON.stringify(a) === JSON.stringify(b);
|
|
10159
|
+
}
|
|
10053
10160
|
function blankedModel(model) {
|
|
10054
10161
|
return {
|
|
10055
10162
|
...model,
|
|
@@ -11693,6 +11800,17 @@ function iconEl(id, doc = document) {
|
|
|
11693
11800
|
if (svg) span.innerHTML = svg;
|
|
11694
11801
|
return span;
|
|
11695
11802
|
}
|
|
11803
|
+
|
|
11804
|
+
// src/ui/surface-events.ts
|
|
11805
|
+
var SURFACE_OPEN_EVENT = "vela:surface-open";
|
|
11806
|
+
var SURFACE_CLOSE_EVENT = "vela:surface-close";
|
|
11807
|
+
function announceSurface(el, open2, kind, trigger = null) {
|
|
11808
|
+
const View = el.ownerDocument.defaultView;
|
|
11809
|
+
if (!View) return;
|
|
11810
|
+
el.dispatchEvent(
|
|
11811
|
+
new View.CustomEvent(open2 ? SURFACE_OPEN_EVENT : SURFACE_CLOSE_EVENT, { bubbles: true, composed: true, detail: { kind, trigger } })
|
|
11812
|
+
);
|
|
11813
|
+
}
|
|
11696
11814
|
function menuController(opts) {
|
|
11697
11815
|
return {
|
|
11698
11816
|
machine: menu__namespace.machine,
|
|
@@ -11838,6 +11956,8 @@ var Surface = class _Surface {
|
|
|
11838
11956
|
/** Trigger rect captured when this level opened — the list stays put if the
|
|
11839
11957
|
* trigger then moves (favorite chips shifting the caret). */
|
|
11840
11958
|
this.pinnedAnchor = null;
|
|
11959
|
+
/** The open state last announced — see {@link announce}. */
|
|
11960
|
+
this.shown = false;
|
|
11841
11961
|
this.doc = doc;
|
|
11842
11962
|
this.host = opts.host;
|
|
11843
11963
|
this.onSelect = opts.onSelect;
|
|
@@ -11851,6 +11971,7 @@ var Surface = class _Surface {
|
|
|
11851
11971
|
this.positioner.appendChild(this.list);
|
|
11852
11972
|
this.host.appendChild(this.positioner);
|
|
11853
11973
|
const trigger = opts.trigger;
|
|
11974
|
+
this.opener = trigger ?? opts.opener ?? null;
|
|
11854
11975
|
this.ctrl = menuController({
|
|
11855
11976
|
items: [],
|
|
11856
11977
|
id: opts.id,
|
|
@@ -11872,15 +11993,21 @@ var Surface = class _Surface {
|
|
|
11872
11993
|
if (opts.triggerId && trigger) trigger.id = opts.triggerId;
|
|
11873
11994
|
this.handle = runMachine(this.ctrl.machine, this.ctrl.props, (service) => {
|
|
11874
11995
|
const api = this.ctrl.connect(service);
|
|
11996
|
+
if (this.shown && !api.open) this.announce(false);
|
|
11875
11997
|
if (trigger) vanilla.spreadProps(trigger, api.getTriggerProps(), this.mid);
|
|
11876
11998
|
vanilla.spreadProps(this.positioner, api.getPositionerProps(), this.mid);
|
|
11877
11999
|
vanilla.spreadProps(this.list, api.getContentProps(), this.mid);
|
|
11878
12000
|
this.project(api);
|
|
12001
|
+
if (api.open && !this.shown) this.announce(true);
|
|
11879
12002
|
});
|
|
11880
12003
|
}
|
|
11881
12004
|
get api() {
|
|
11882
12005
|
return this.ctrl.connect(this.handle.service);
|
|
11883
12006
|
}
|
|
12007
|
+
announce(open2) {
|
|
12008
|
+
this.shown = open2;
|
|
12009
|
+
announceSurface(this.list, open2, "menu", this.opener);
|
|
12010
|
+
}
|
|
11884
12011
|
setItems(items) {
|
|
11885
12012
|
this.items = items;
|
|
11886
12013
|
for (const sub2 of this.subs.values()) sub2.destroy();
|
|
@@ -11898,6 +12025,7 @@ var Surface = class _Surface {
|
|
|
11898
12025
|
for (const sub2 of this.subs.values()) sub2.destroy();
|
|
11899
12026
|
this.subs.clear();
|
|
11900
12027
|
this.handle.stop();
|
|
12028
|
+
if (this.shown) this.announce(false);
|
|
11901
12029
|
this.positioner.remove();
|
|
11902
12030
|
}
|
|
11903
12031
|
byId(id) {
|
|
@@ -11991,6 +12119,7 @@ var Surface = class _Surface {
|
|
|
11991
12119
|
const sub2 = new _Surface(doc, {
|
|
11992
12120
|
host: this.host,
|
|
11993
12121
|
placement: "right-start",
|
|
12122
|
+
opener: li,
|
|
11994
12123
|
onSelect: this.onSelect,
|
|
11995
12124
|
onFavorite: this.onFavorite,
|
|
11996
12125
|
checkmarks: this.checkmarks,
|
|
@@ -12210,16 +12339,21 @@ var Popover = class {
|
|
|
12210
12339
|
this.hide();
|
|
12211
12340
|
};
|
|
12212
12341
|
const onReflow = () => this.place();
|
|
12213
|
-
setTimeout(() =>
|
|
12342
|
+
setTimeout(() => {
|
|
12343
|
+
if (this.onOutside === onOutside) document.addEventListener("pointerdown", onOutside, true);
|
|
12344
|
+
}, 0);
|
|
12214
12345
|
document.addEventListener("keydown", onKey, true);
|
|
12215
12346
|
window.addEventListener("resize", onReflow, true);
|
|
12216
12347
|
document.addEventListener("scroll", onReflow, true);
|
|
12217
12348
|
this.onOutside = onOutside;
|
|
12218
12349
|
this.onKey = onKey;
|
|
12219
12350
|
this.onReflow = onReflow;
|
|
12351
|
+
announceSurface(this.el, true, "popover", this.trigger);
|
|
12220
12352
|
}
|
|
12221
12353
|
hide() {
|
|
12222
12354
|
if (!this.shown) return;
|
|
12355
|
+
this.shown = false;
|
|
12356
|
+
announceSurface(this.el, false, "popover", this.trigger);
|
|
12223
12357
|
if (this.onOutside) document.removeEventListener("pointerdown", this.onOutside, true);
|
|
12224
12358
|
if (this.onKey) document.removeEventListener("keydown", this.onKey, true);
|
|
12225
12359
|
if (this.onReflow) {
|
|
@@ -12239,7 +12373,6 @@ var Popover = class {
|
|
|
12239
12373
|
} else {
|
|
12240
12374
|
this.el.remove();
|
|
12241
12375
|
}
|
|
12242
|
-
this.shown = false;
|
|
12243
12376
|
if (open === this) open = null;
|
|
12244
12377
|
this.ctrl.onClose?.();
|
|
12245
12378
|
}
|
|
@@ -12940,6 +13073,8 @@ ${overlayScrollbarCss(".vela-dialog *")}
|
|
|
12940
13073
|
`;
|
|
12941
13074
|
var Dialog = class {
|
|
12942
13075
|
constructor(opts = {}) {
|
|
13076
|
+
this.opener = null;
|
|
13077
|
+
this.wasOpen = false;
|
|
12943
13078
|
const doc = (opts.host ?? document.body).ownerDocument;
|
|
12944
13079
|
injectStyles(DIALOG_STYLE_ID, DIALOG_CSS, doc);
|
|
12945
13080
|
const host = opts.host ?? doc.body;
|
|
@@ -13036,6 +13171,7 @@ var Dialog = class {
|
|
|
13036
13171
|
const mid = String(this.ctrl.props.id);
|
|
13037
13172
|
this.handle = runMachine(this.ctrl.machine, this.ctrl.props, (service) => {
|
|
13038
13173
|
const api = this.ctrl.connect(service);
|
|
13174
|
+
if (this.wasOpen && !api.open) this.announce(false);
|
|
13039
13175
|
vanilla.spreadProps(this.backdrop, api.getBackdropProps(), mid);
|
|
13040
13176
|
vanilla.spreadProps(this.positioner, api.getPositionerProps(), mid);
|
|
13041
13177
|
vanilla.spreadProps(this.panel, api.getContentProps(), mid);
|
|
@@ -13043,12 +13179,27 @@ var Dialog = class {
|
|
|
13043
13179
|
vanilla.spreadProps(close, api.getCloseTriggerProps(), mid);
|
|
13044
13180
|
this.backdrop.style.display = api.open ? "" : "none";
|
|
13045
13181
|
this.positioner.style.display = api.open ? "" : "none";
|
|
13182
|
+
if (api.open && !this.wasOpen) this.announce(true);
|
|
13183
|
+
if (this.wasOpen && !api.open) this.restoreOpener();
|
|
13184
|
+
this.wasOpen = api.open;
|
|
13046
13185
|
});
|
|
13047
13186
|
}
|
|
13187
|
+
/** Closing hands focus back to whatever opened it (Escape, the ✕, hide(), or a
|
|
13188
|
+
* teardown that outruns the machine's close notification). */
|
|
13189
|
+
restoreOpener() {
|
|
13190
|
+
const opener = this.opener;
|
|
13191
|
+
this.opener = null;
|
|
13192
|
+
if (opener?.isConnected) opener.focus({ preventScroll: true });
|
|
13193
|
+
}
|
|
13194
|
+
announce(open2) {
|
|
13195
|
+
const opener = this.opener === this.panel.ownerDocument.body ? null : this.opener;
|
|
13196
|
+
announceSurface(this.panel, open2, "dialog", opener);
|
|
13197
|
+
}
|
|
13048
13198
|
get open() {
|
|
13049
13199
|
return this.ctrl.connect(this.handle.service).open;
|
|
13050
13200
|
}
|
|
13051
13201
|
show() {
|
|
13202
|
+
this.opener = this.panel.ownerDocument.activeElement;
|
|
13052
13203
|
this.ctrl.connect(this.handle.service).setOpen(true);
|
|
13053
13204
|
}
|
|
13054
13205
|
hide() {
|
|
@@ -13063,6 +13214,11 @@ var Dialog = class {
|
|
|
13063
13214
|
destroy() {
|
|
13064
13215
|
if (this.open) this.hide();
|
|
13065
13216
|
this.handle.stop();
|
|
13217
|
+
if (this.wasOpen) {
|
|
13218
|
+
this.wasOpen = false;
|
|
13219
|
+
this.announce(false);
|
|
13220
|
+
}
|
|
13221
|
+
this.restoreOpener();
|
|
13066
13222
|
this.backdrop.remove();
|
|
13067
13223
|
this.positioner.remove();
|
|
13068
13224
|
}
|
|
@@ -17232,15 +17388,23 @@ var Batch = class {
|
|
|
17232
17388
|
this.seg(x + w, y + h, x, y + h, lineWidth, c);
|
|
17233
17389
|
this.seg(x, y + h, x, y, lineWidth, c);
|
|
17234
17390
|
}
|
|
17235
|
-
/**
|
|
17391
|
+
/**
|
|
17392
|
+
* Filled circle (triangle fan), feathered like a line: the rim is padded by {@link AA_PAD} and
|
|
17393
|
+
* edgeDist runs from 0 at the center to the padded radius at the rim, with edgeHalf = r. The
|
|
17394
|
+
* distance grows linearly along each spoke, so the shader's line feather gives a round soft edge.
|
|
17395
|
+
*/
|
|
17236
17396
|
circle(cx, cy, r, c, segments = 16) {
|
|
17237
|
-
|
|
17397
|
+
const ext = r + AA_PAD;
|
|
17398
|
+
let px = cx + ext;
|
|
17238
17399
|
let py = cy;
|
|
17400
|
+
this.ensure(segments * 3);
|
|
17239
17401
|
for (let i = 1; i <= segments; i += 1) {
|
|
17240
17402
|
const a = i / segments * Math.PI * 2;
|
|
17241
|
-
const nx = cx + Math.cos(a) *
|
|
17242
|
-
const ny = cy + Math.sin(a) *
|
|
17243
|
-
this.
|
|
17403
|
+
const nx = cx + Math.cos(a) * ext;
|
|
17404
|
+
const ny = cy + Math.sin(a) * ext;
|
|
17405
|
+
this.v(cx, cy, c, 0, r);
|
|
17406
|
+
this.v(px, py, c, ext, r);
|
|
17407
|
+
this.v(nx, ny, c, ext, r);
|
|
17244
17408
|
px = nx;
|
|
17245
17409
|
py = ny;
|
|
17246
17410
|
}
|
|
@@ -17421,7 +17585,7 @@ var WebGL2Backend = class {
|
|
|
17421
17585
|
}
|
|
17422
17586
|
mount(canvas) {
|
|
17423
17587
|
this.canvas = canvas;
|
|
17424
|
-
this.gl = canvas.getContext("webgl2", { alpha: true, antialias:
|
|
17588
|
+
this.gl = canvas.getContext("webgl2", { alpha: true, antialias: false, depth: false, stencil: false, premultipliedAlpha: true });
|
|
17425
17589
|
if (!this.gl) return;
|
|
17426
17590
|
if (!this.initGL()) {
|
|
17427
17591
|
this.gl = null;
|
|
@@ -18873,7 +19037,7 @@ var InputController = class {
|
|
|
18873
19037
|
this.deps.drawingsPointerUp?.(x, y, this.snapMode(e));
|
|
18874
19038
|
} else if (tapRelease && this.region === "data") {
|
|
18875
19039
|
this.deps.onClick(x, y);
|
|
18876
|
-
} else if (this.dragging && this.region === "data") {
|
|
19040
|
+
} else if (this.dragging && this.region === "data" && wasTouch) {
|
|
18877
19041
|
const stale = e.timeStamp - this.lastT > FLING_STALE_MS;
|
|
18878
19042
|
if (!stale && Math.abs(this.vx) > FLING_MIN_SPEED) {
|
|
18879
19043
|
const pitch = this.deps.getCoords().pxPerBar();
|
|
@@ -25329,6 +25493,12 @@ var DrawingInteraction = class {
|
|
|
25329
25493
|
activeDragId() {
|
|
25330
25494
|
return this.state.kind === "pressed" && this.state.moved ? this.state.id : null;
|
|
25331
25495
|
}
|
|
25496
|
+
/** The store drawings a live drag is moving — the pressed one and its riders — or none
|
|
25497
|
+
* before the drag passes the slop. A Ctrl-drag moves copies, so its sources stay put. */
|
|
25498
|
+
movingIds() {
|
|
25499
|
+
if (this.state.kind !== "pressed" || !this.state.moved || this.state.clones) return /* @__PURE__ */ new Set();
|
|
25500
|
+
return /* @__PURE__ */ new Set([this.state.id, ...this.state.riders.map((r) => r.id)]);
|
|
25501
|
+
}
|
|
25332
25502
|
/** The drawing under a press that has not been released yet (drag or click undecided), or null. */
|
|
25333
25503
|
pressedId() {
|
|
25334
25504
|
return this.state.kind === "pressed" ? this.state.id : null;
|
|
@@ -25987,6 +26157,17 @@ var DrawingSettingsDialog = class {
|
|
|
25987
26157
|
}
|
|
25988
26158
|
}));
|
|
25989
26159
|
}
|
|
26160
|
+
if (drawing instanceof FibRetracement) {
|
|
26161
|
+
const fib = drawing;
|
|
26162
|
+
grid.appendChild(fieldRow({
|
|
26163
|
+
label: "Reverse",
|
|
26164
|
+
bool: true,
|
|
26165
|
+
toggle: {
|
|
26166
|
+
checked: fib.reverse,
|
|
26167
|
+
onChange: (v) => actions.patch({ reverse: v })
|
|
26168
|
+
}
|
|
26169
|
+
}));
|
|
26170
|
+
}
|
|
25990
26171
|
levels.forEach((lv, i) => {
|
|
25991
26172
|
const row = document.createElement("div");
|
|
25992
26173
|
row.className = "vela-field-span";
|
|
@@ -27354,6 +27535,7 @@ var DrawingToolbar = class {
|
|
|
27354
27535
|
);
|
|
27355
27536
|
}
|
|
27356
27537
|
}
|
|
27538
|
+
announceSurface(fly, true, "menu", cell);
|
|
27357
27539
|
}
|
|
27358
27540
|
openMagnetFlyout() {
|
|
27359
27541
|
const cell = this.magnetCell;
|
|
@@ -27377,6 +27559,7 @@ var DrawingToolbar = class {
|
|
|
27377
27559
|
})
|
|
27378
27560
|
);
|
|
27379
27561
|
}
|
|
27562
|
+
announceSurface(fly, true, "menu", cell);
|
|
27380
27563
|
}
|
|
27381
27564
|
flyoutHeader(text) {
|
|
27382
27565
|
const t = this.theme;
|
|
@@ -27445,9 +27628,11 @@ var DrawingToolbar = class {
|
|
|
27445
27628
|
}
|
|
27446
27629
|
closeFlyout() {
|
|
27447
27630
|
this.starEls.clear();
|
|
27448
|
-
|
|
27449
|
-
|
|
27631
|
+
const fly = this.flyout;
|
|
27632
|
+
if (fly) {
|
|
27450
27633
|
this.flyout = null;
|
|
27634
|
+
announceSurface(fly, false, "menu", this.flyoutCell);
|
|
27635
|
+
fly.remove();
|
|
27451
27636
|
this.flyoutCell?.classList.remove("vela-open");
|
|
27452
27637
|
this.flyoutCell = null;
|
|
27453
27638
|
this.flyoutOwnerId = null;
|
|
@@ -27772,6 +27957,8 @@ var UserDrawingController = class {
|
|
|
27772
27957
|
this.drawings = [];
|
|
27773
27958
|
/** Ids painted on an interleave layer this frame — the top canvas paints only their handles. */
|
|
27774
27959
|
this.sliced = /* @__PURE__ */ new Set();
|
|
27960
|
+
/** Interleaved drawings mid-drag: painted on the top canvas, left out of their slice. */
|
|
27961
|
+
this.lifted = /* @__PURE__ */ new Set();
|
|
27775
27962
|
/** Cached slice canvases, keyed `paneId|beforeZ`, reused across frames to avoid churn. */
|
|
27776
27963
|
this.sliceCache = /* @__PURE__ */ new Map();
|
|
27777
27964
|
/** Series boundaries per pane as of the last `prepareSlices` — lets a repaint between data
|
|
@@ -27859,7 +28046,7 @@ var UserDrawingController = class {
|
|
|
27859
28046
|
selectedIds: () => this.selectedIds,
|
|
27860
28047
|
emit: (i) => this.emit(i),
|
|
27861
28048
|
changed: () => {
|
|
27862
|
-
this.
|
|
28049
|
+
this.syncLift();
|
|
27863
28050
|
this.render();
|
|
27864
28051
|
},
|
|
27865
28052
|
openSettings: (id, x, y) => this.openSettingsById(id, x, y),
|
|
@@ -28485,6 +28672,20 @@ var UserDrawingController = class {
|
|
|
28485
28672
|
/** A drawing that paints inside the series stack changed (content, not hover): its pixels
|
|
28486
28673
|
* live in the backend composite, so this layer alone can't show the change — ask for a
|
|
28487
28674
|
* data frame, which re-runs `prepareSlices` before the backend composites. */
|
|
28675
|
+
/** A drawing being dragged leaves its interleave slice for the top canvas, so each pointer
|
|
28676
|
+
* move repaints one 2D layer instead of re-rasterizing and re-uploading a plot-sized slice
|
|
28677
|
+
* texture through the data frame. The slices rebuild once as the drag starts and once as it
|
|
28678
|
+
* ends (release, cancel), when the lifted set changes. */
|
|
28679
|
+
syncLift() {
|
|
28680
|
+
const moving = this.interaction.movingIds();
|
|
28681
|
+
let same = moving.size === this.lifted.size;
|
|
28682
|
+
if (same) {
|
|
28683
|
+
for (const id of moving) if (!this.lifted.has(id)) same = false;
|
|
28684
|
+
}
|
|
28685
|
+
if (same) return;
|
|
28686
|
+
this.lifted = new Set(moving);
|
|
28687
|
+
this.invalidateSlices();
|
|
28688
|
+
}
|
|
28488
28689
|
invalidateSlices() {
|
|
28489
28690
|
if (this.sliced.size > 0 || this.drawings.some((d) => this.isInterleaved(d))) this.deps.requestDataPaint();
|
|
28490
28691
|
}
|
|
@@ -28503,7 +28704,7 @@ var UserDrawingController = class {
|
|
|
28503
28704
|
const theme = this.deps.theme();
|
|
28504
28705
|
const buckets = /* @__PURE__ */ new Map();
|
|
28505
28706
|
for (const d of this.drawings) {
|
|
28506
|
-
if (!d.visible) continue;
|
|
28707
|
+
if (!d.visible || this.lifted.has(d.id)) continue;
|
|
28507
28708
|
const beforeZ = sliceKeyFor(d.zIndex, this.lastBounds.get(d.paneId) ?? []);
|
|
28508
28709
|
if (beforeZ === null) continue;
|
|
28509
28710
|
const key = `${d.paneId}|${beforeZ}`;
|
|
@@ -28555,8 +28756,9 @@ var UserDrawingController = class {
|
|
|
28555
28756
|
mutedLabel: edited instanceof TextLabel ? edited.id : null
|
|
28556
28757
|
};
|
|
28557
28758
|
this.painter.seriesLook = this.deps.seriesLook();
|
|
28558
|
-
|
|
28559
|
-
this.painter.
|
|
28759
|
+
const onTop = (d) => !this.isInterleaved(d) || this.lifted.has(d.id);
|
|
28760
|
+
this.painter.paintAll(ctx, this.drawings.filter(onTop), proj, this.deps.theme(), targets);
|
|
28761
|
+
this.painter.paintHighlights(ctx, this.drawings.filter((d) => !onTop(d)), proj, handleIdsFor(targets));
|
|
28560
28762
|
const clones = this.interaction.dragClones();
|
|
28561
28763
|
if (clones) this.painter.paintAll(ctx, clones, proj, this.deps.theme(), { selected: new Set(clones.map((c) => c.id)) });
|
|
28562
28764
|
this.layoutTextEditor();
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { D as DrawingsDocument, d as Resolved, e as ReplayTick, f as DataControl, g as ReplayTickSource } from './contributions-
|
|
2
|
-
export { B as BarsChangeReason, C as CellStateContext, h as
|
|
3
|
-
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig, E as MarketSnapshot } from './options-
|
|
4
|
-
export { F as AddIndicatorOptions, G as AnimationConfig, H as Background, J as BoxFontFamily, K as BoxHAlign, Q as BoxTextSize, X as BoxVAlign, Y as CandleBarColor, Z as CandleSeries, _ as CandleStyle, $ as DataWindowGroup, a0 as DataWindowOHLC, a1 as DataWindowRow, a2 as DirtyRange, a3 as DrawingBox, a4 as DrawingExtend, a5 as DrawingIntent, a6 as DrawingLabel, a7 as DrawingLine, a8 as DrawingLinefill, a9 as DrawingMode, aa as DrawingPoint, ab as DrawingPolyline, ac as DrawingSeriesBar, ad as DrawingSeriesGateway, ae as DrawingSeriesState, af as DrawingStyle, ag as DrawingTable, ah as DrawingText, ai as DrawingXLoc, aj as DrawingsOption, ak as Fill, al as FillGradientStop, am as IndicatorMeta, an as InputCondition, ao as InputSchema, ap as InputType, aq as InputWhen, ar as IntroAnimation, as as IntroConfig, at as IntroStyle, au as LabelStyle, av as LabelYLoc, aw as LineLikeKind, ax as LineLikeSeries, ay as LineLikeStyle, az as MarkContent, aA as MarkContentSource, aB as MarkGlyph, aC as MarkPanelItem, aD as MarkShape, aE as MarkerPoint, aF as MarkerSeries, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, aZ as SettingsField, a_ as SettingsSchema, a$ as SettingsVisibilityPolicy, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b3 as ToolbarGroupConfig, b4 as TradeExecution, b5 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b6 as buildToolbar, b7 as defaultToolbar, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-
|
|
5
|
-
import { S as SettingsSelectOption } from './plugin-
|
|
6
|
-
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, p as SERIES_LINE, q as SESSION_OFF, r as SESSION_POST, s as SESSION_PRE, t as SLATE, u as SLATE_DEEP, v as SeriesDataEngine, w as SeriesDataEngineHost, x as SettingsInlineControl, y as SettingsRowCondition, z as SettingsRowDescriptor, E as SettingsRowInlineNumber, F as SettingsRowSwatch, G as SettingsRowValueKey, J as SettingsRowWhen, K as SettingsRowWidth, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-
|
|
7
|
-
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-
|
|
8
|
-
export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-
|
|
1
|
+
import { D as DrawingsDocument, d as Resolved, e as ReplayTick, f as DataControl, g as ReplayTickSource } from './contributions-Cgm9RJYP.cjs';
|
|
2
|
+
export { B as BarsChangeReason, C as CellStateContext, h as CodeUpdateResult, i as ContextSelect, j as DrawingsControl, k as EngineAlert, l as EngineCapabilities, m as EngineContextSnapshot, n as EngineFactory, o as EngineWarning, p as ExecutionHandlers, q as ExecutionMarket, r as ExecutionRequest, s as ExecutionSession, E as ExternalIndicatorEntry, F as FetchSeries, t as IndicatorEventMap, I as IndicatorHandle, u as IndicatorSummary, L as LegendActionDescriptor, v as LegendCalloutContent, w as LegendCalloutDescriptor, x as LegendCalloutItem, y as LegendCalloutSpec, z as LegendIndicatorInfo, M as MarksControl, N as NativeIndicator, A as NativeIndicatorContext, G as NativeIndicatorDescriptor, H as NativeIndicatorInfo, J as NativeIndicatorOutput, O as OVERRIDABLE_TOPBAR_IDS, P as ParsedSymbol, K as PreparedScript, Q as RendererControl, a as ReplayBounds, T as ReplayControl, U as ReplayEndReason, X as ReplayStartOptions, R as ReplayState, Y as RunIndicatorResult, Z as SceneInspection, c as ScriptRun, _ as ScriptRunCause, $ as ScriptRunResult, S as ScriptingEngine, a0 as SidePanelButton, a1 as SidePanelDescriptor, a2 as SidePanelHandle, a3 as SidePanelHeader, a4 as StatePersistenceHandler, a5 as StrategyFill, a6 as StrategyState, a7 as StrategyTrade, a8 as SymbolRankingHook, a9 as TypedEventBus, V as Vela, aa as VelaDeps, b as VelaEventMap, ab as VisibleBarRange, ac as WidgetActionDescriptor, ad as WidgetActionTarget, ae as WidgetAttachment, W as WidgetContext, af as getNativeIndicator, ag as legendActions, ah as legendCallouts, ai as nativeIndicatorDescriptors, aj as nativeIndicatorTypes, ak as registerDefaultEngine, al as registerLegendAction, am as registerLegendCallout, an as registerNativeIndicator, ao as registerSidePanel, ap as registerStatePersistence, aq as registerSymbolRanking, ar as registerWidgetAction, as as registerWidgetAttachment, at as resolveEngines, au as sidePanels, av as statePersistenceHandlers, aw as symbolRanking, ax as topbarActionOverride, ay as unregisterDefaultEngine, az as unregisterLegendAction, aA as unregisterLegendCallout, aB as unregisterNativeIndicator, aC as unregisterSidePanel, aD as unregisterStatePersistence, aE as unregisterWidgetAction, aF as unregisterWidgetAttachment, aG as widgetActions, aH as widgetAttachments } from './contributions-Cgm9RJYP.cjs';
|
|
3
|
+
import { D as Drawing, S as SerializedDrawing, U as Unsubscribe, L as LineStyle, P as PriceStyle, e as IChartRenderer, R as RendererCapabilities, f as RendererDisplayOptions, g as IndicatorRenderHandle, h as IndicatorStatus, c as VelaTheme, W as WallClock, O as OHLCV, i as Pane, j as PaneAction, k as MoveTarget, l as IndicatorModel, m as ScenePatch, I as InputValue, n as SymbolPickerFn, o as LegendActionView, p as LegendCalloutView, q as InputChangeEvent, T as ThemeName, C as CrosshairEvent, r as ClickEvent, A as AxisLongPressEvent, s as TimelineMark, t as MarkGroup, u as MarkClickEvent, a as VisibleRange, v as DataWindowReadout, w as IDrawingsRendererPort, x as Millis, y as SnapMode, z as DrawingTypeKey, B as ToolbarDefinition, M as MarketConfig, E as MarketSnapshot } from './options-NAUHiQEC.cjs';
|
|
4
|
+
export { F as AddIndicatorOptions, G as AnimationConfig, H as Background, J as BoxFontFamily, K as BoxHAlign, Q as BoxTextSize, X as BoxVAlign, Y as CandleBarColor, Z as CandleSeries, _ as CandleStyle, $ as DataWindowGroup, a0 as DataWindowOHLC, a1 as DataWindowRow, a2 as DirtyRange, a3 as DrawingBox, a4 as DrawingExtend, a5 as DrawingIntent, a6 as DrawingLabel, a7 as DrawingLine, a8 as DrawingLinefill, a9 as DrawingMode, aa as DrawingPoint, ab as DrawingPolyline, ac as DrawingSeriesBar, ad as DrawingSeriesGateway, ae as DrawingSeriesState, af as DrawingStyle, ag as DrawingTable, ah as DrawingText, ai as DrawingXLoc, aj as DrawingsOption, ak as Fill, al as FillGradientStop, am as IndicatorMeta, an as InputCondition, ao as InputSchema, ap as InputType, aq as InputWhen, ar as IntroAnimation, as as IntroConfig, at as IntroStyle, au as LabelStyle, av as LabelYLoc, aw as LineLikeKind, ax as LineLikeSeries, ay as LineLikeStyle, az as MarkContent, aA as MarkContentSource, aB as MarkGlyph, aC as MarkPanelItem, aD as MarkShape, aE as MarkerPoint, aF as MarkerSeries, aG as MarketSwitch, aH as PaneAxis, aI as PaneAxisBand, aJ as PaneHint, aK as PaneKind, aL as PolylinePoint, aM as PriceLine, aN as Projector, aO as ProviderName, aP as RendererConstructor, aQ as Scene, aR as SchemaPatch, aS as SecondClock, aT as SeriesDisplay, aU as SeriesKind, aV as SeriesPoint, aW as SeriesSpec, aX as SeriesSurface, aY as SeriesValueDelta, aZ as SettingsField, a_ as SettingsSchema, a$ as SettingsVisibilityPolicy, b0 as TableCell, b1 as TableMerge, b2 as TablePosition, b3 as ToolbarGroupConfig, b4 as TradeExecution, b5 as ValuePatch, b as VelaOptions, V as VisibleRangePreset, b6 as buildToolbar, b7 as defaultToolbar, b8 as inputDeltas, b9 as inputVisible, ba as seriesInScale, bb as seriesShownOn } from './options-NAUHiQEC.cjs';
|
|
5
|
+
import { S as SettingsSelectOption } from './plugin-CjjzZX2F.cjs';
|
|
6
|
+
export { A as ACCENT, a as ACCENT_BRIGHT, B as BEARISH, b as BULLISH, c as BarTransform, d as BasePaintingModulation, C as CATEGORICAL, e as CHIP_PLATE, f as CROSSHAIR, g as ChartTypeDefinition, h as ChartTypeSettingsInstance, i as ChartTypeSettingsSection, j as ChartTypeSettingsSubsection, D as DrawingTypeMeta, H as HIGHLIGHT, I as INFO, k as INVALID, l as IdentifiableKind, M as MARKER, N as NEUTRAL, m as NormalizedSettingsRow, R as RendererLayerArgs, n as RendererLayerDefinition, o as RendererLayerInstance, p as SERIES_LINE, q as SESSION_OFF, r as SESSION_POST, s as SESSION_PRE, t as SLATE, u as SLATE_DEEP, v as SeriesDataEngine, w as SeriesDataEngineHost, x as SettingsInlineControl, y as SettingsRowCondition, z as SettingsRowDescriptor, E as SettingsRowInlineNumber, F as SettingsRowSwatch, G as SettingsRowValueKey, J as SettingsRowWhen, K as SettingsRowWidth, L as SettingsValueRow, T as TRADE_EXIT, O as TRADE_LONG, P as TRADE_SHORT, V as VALID, W as WARNING, Q as categoricalColor, U as chartType, X as chartTypes, Y as createDrawing, Z as deserializeDrawing, _ as drawingTypes, $ as getDrawingType, a0 as normalizeSettingsRow, a1 as registerChartType, a2 as registerDrawingType, a3 as registerRendererDefaults, a4 as registerRendererLayer, a5 as rendererDefaults, a6 as rendererLayers, a7 as settingsRowValueKeys, a8 as stableSeriesId, a9 as tickerModifierIds, aa as unregisterChartType, ab as unregisterRendererDefaults, ac as unregisterRendererLayer } from './plugin-CjjzZX2F.cjs';
|
|
7
|
+
import { M as MarketDataFeed, D as DataProvider, P as ProviderInfo, a as SymbolDescriptor, S as SymbolInfo, b as ProviderCapabilities, B as BarRange } from './DataProvider-COGDs9Xg.cjs';
|
|
8
|
+
export { D as DEFAULT_PANEL_MAX_WIDTH, a as DEFAULT_PANEL_MIN_WIDTH, b as DEFAULT_PANEL_WIDTH, S as SidePanelOptions, c as clampPanelWidth } from './side-panel-wMNfgyZb.cjs';
|
|
9
9
|
export { i as iconMarkup, r as registerIcon } from './icons-BZYbJXSV.cjs';
|
|
10
10
|
export { a as KeyBindingDescriptor, R as ResolvedBinding } from './keymap-CGOz5F5f.cjs';
|
|
11
11
|
|