stickyflow 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/binding/index.cjs +9 -9
- package/dist/binding/index.d.cts +4 -4
- package/dist/binding/index.d.ts +4 -4
- package/dist/binding/index.js +3 -3
- package/dist/{chunk-MFNUJA26.js → chunk-CZW3ARXQ.js} +156 -23
- package/dist/chunk-CZW3ARXQ.js.map +1 -0
- package/dist/{chunk-WRDVNMFS.js → chunk-EDOPENSE.js} +848 -38
- package/dist/chunk-EDOPENSE.js.map +1 -0
- package/dist/{chunk-4LENHH6C.cjs → chunk-FQ7GMLCM.cjs} +15 -15
- package/dist/{chunk-4LENHH6C.cjs.map → chunk-FQ7GMLCM.cjs.map} +1 -1
- package/dist/{chunk-4G2R7PEL.js → chunk-GLZVHUSW.js} +220 -12
- package/dist/chunk-GLZVHUSW.js.map +1 -0
- package/dist/{chunk-KTNCDNDB.cjs → chunk-IR2T47NW.cjs} +876 -66
- package/dist/chunk-IR2T47NW.cjs.map +1 -0
- package/dist/{chunk-ULQZ6CZW.js → chunk-LFEGZJWC.js} +3 -3
- package/dist/{chunk-ULQZ6CZW.js.map → chunk-LFEGZJWC.js.map} +1 -1
- package/dist/{chunk-XJ4W6TW4.cjs → chunk-LNW5VIEA.cjs} +225 -11
- package/dist/chunk-LNW5VIEA.cjs.map +1 -0
- package/dist/{chunk-FVHVOJS2.js → chunk-MAPNY7MJ.js} +872 -174
- package/dist/chunk-MAPNY7MJ.js.map +1 -0
- package/dist/{chunk-WQRT5PVT.cjs → chunk-VOYX6JMW.cjs} +1479 -780
- package/dist/chunk-VOYX6JMW.cjs.map +1 -0
- package/dist/{chunk-JIJMZMGY.cjs → chunk-XPM3E7NV.cjs} +170 -37
- package/dist/chunk-XPM3E7NV.cjs.map +1 -0
- package/dist/index.cjs +42 -34
- package/dist/index.d.cts +34 -6
- package/dist/index.d.ts +34 -6
- package/dist/index.js +5 -5
- package/dist/interaction/index.cjs +266 -235
- package/dist/interaction/index.cjs.map +1 -1
- package/dist/interaction/index.d.cts +2 -2
- package/dist/interaction/index.d.ts +2 -2
- package/dist/interaction/index.js +42 -11
- package/dist/interaction/index.js.map +1 -1
- package/dist/{render-Db0eSz_s.d.cts → render-Bp2FLEzv.d.cts} +14 -1
- package/dist/{render-Db0eSz_s.d.ts → render-Bp2FLEzv.d.ts} +14 -1
- package/dist/{runtime-n2yG-_j-.d.ts → runtime-CWIGxRcL.d.ts} +2 -2
- package/dist/{runtime-BhivvBeL.d.cts → runtime-DIag-XBa.d.cts} +2 -2
- package/dist/{runtimeTypes-DnI7mRF5.d.ts → runtimeTypes-BYODuxHk.d.cts} +2 -1
- package/dist/{runtimeTypes-CrkMHvVi.d.cts → runtimeTypes-C7sSLfOK.d.ts} +2 -1
- package/dist/stickyflow-diagram.global.js +490 -36
- package/dist/stickyflow-diagram.global.js.map +1 -1
- package/dist/{types-D4cH4f1a.d.ts → types-B9QM_H3R.d.ts} +1 -1
- package/dist/{types-BHfUKT4s.d.cts → types-D2w6D_wG.d.cts} +1 -1
- package/dist/viewer/index.cjs +9 -9
- package/dist/viewer/index.d.cts +5 -4
- package/dist/viewer/index.d.ts +5 -4
- package/dist/viewer/index.js +4 -4
- package/dist/web-component/index.cjs +6 -6
- package/dist/web-component/index.d.cts +2 -2
- package/dist/web-component/index.d.ts +2 -2
- package/dist/web-component/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-4G2R7PEL.js.map +0 -1
- package/dist/chunk-FVHVOJS2.js.map +0 -1
- package/dist/chunk-JIJMZMGY.cjs.map +0 -1
- package/dist/chunk-KTNCDNDB.cjs.map +0 -1
- package/dist/chunk-MFNUJA26.js.map +0 -1
- package/dist/chunk-WQRT5PVT.cjs.map +0 -1
- package/dist/chunk-WRDVNMFS.js.map +0 -1
- package/dist/chunk-XJ4W6TW4.cjs.map +0 -1
|
@@ -321,6 +321,18 @@ function symbolToPath(points, frame) {
|
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
// src/model/component/categories.ts
|
|
325
|
+
var COMPONENT_CATEGORIES = [
|
|
326
|
+
{ id: "action", label: "Actions" },
|
|
327
|
+
{ id: "selection", label: "Selection" },
|
|
328
|
+
{ id: "value", label: "Value input" },
|
|
329
|
+
{ id: "text", label: "Text input" },
|
|
330
|
+
{ id: "indicator", label: "Indicators" },
|
|
331
|
+
{ id: "instrument", label: "Instruments" },
|
|
332
|
+
{ id: "navigation", label: "Navigation" },
|
|
333
|
+
{ id: "container", label: "Containers" }
|
|
334
|
+
];
|
|
335
|
+
|
|
324
336
|
// src/model/component/supportedTypes.ts
|
|
325
337
|
var BUILT_IN_COMPONENT_TYPES = ["rollingNumber", "tickScale", "ruler"];
|
|
326
338
|
function isBuiltInComponentType(value) {
|
|
@@ -337,6 +349,7 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
337
349
|
{
|
|
338
350
|
type: "rollingNumber",
|
|
339
351
|
group: "readout",
|
|
352
|
+
category: "indicator",
|
|
340
353
|
value: { type: "number", writable: false, default: 0 },
|
|
341
354
|
properties: {},
|
|
342
355
|
interaction: "none",
|
|
@@ -346,6 +359,7 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
346
359
|
{
|
|
347
360
|
type: "tickScale",
|
|
348
361
|
group: "readout",
|
|
362
|
+
category: "instrument",
|
|
349
363
|
value: { type: "number", writable: false, default: 0 },
|
|
350
364
|
properties: {},
|
|
351
365
|
interaction: "none",
|
|
@@ -355,6 +369,7 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
355
369
|
{
|
|
356
370
|
type: "ruler",
|
|
357
371
|
group: "input",
|
|
372
|
+
category: "instrument",
|
|
358
373
|
value: { type: "number", writable: false, default: 0 },
|
|
359
374
|
properties: {},
|
|
360
375
|
interaction: "scale",
|
|
@@ -364,11 +379,13 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
364
379
|
{
|
|
365
380
|
type: "switch",
|
|
366
381
|
group: "input",
|
|
382
|
+
category: "selection",
|
|
367
383
|
value: { type: "boolean", writable: true, default: false },
|
|
368
384
|
properties: {
|
|
369
385
|
accent: { type: "color", default: "#5a6bff" },
|
|
370
386
|
track: { type: "color", default: "#cbd5e1" },
|
|
371
|
-
thumb: { type: "color", default: "#ffffff" }
|
|
387
|
+
thumb: { type: "color", default: "#ffffff" },
|
|
388
|
+
animate: { type: "number", default: 160, min: 0, max: 2e3, step: 10 }
|
|
372
389
|
},
|
|
373
390
|
interaction: "toggle",
|
|
374
391
|
pointerScale: false,
|
|
@@ -378,13 +395,15 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
378
395
|
{
|
|
379
396
|
type: "checkbox",
|
|
380
397
|
group: "input",
|
|
398
|
+
category: "selection",
|
|
381
399
|
value: { type: "boolean", writable: true, default: false },
|
|
382
400
|
properties: {
|
|
383
401
|
accent: { type: "color", default: "#5a6bff" },
|
|
384
402
|
stroke: { type: "color", default: "#94a3b8" },
|
|
385
403
|
check: { type: "color", default: "#ffffff" },
|
|
386
404
|
textColor: { type: "color", default: "#0f172a" },
|
|
387
|
-
fontSize: { type: "number", default: 14, min: 6, max: 200 }
|
|
405
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
406
|
+
animate: { type: "number", default: 160, min: 0, max: 2e3, step: 10 }
|
|
388
407
|
},
|
|
389
408
|
interaction: "toggle",
|
|
390
409
|
pointerScale: false,
|
|
@@ -394,13 +413,15 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
394
413
|
{
|
|
395
414
|
type: "toggleButton",
|
|
396
415
|
group: "input",
|
|
416
|
+
category: "action",
|
|
397
417
|
value: { type: "boolean", writable: true, default: false },
|
|
398
418
|
properties: {
|
|
399
419
|
accent: { type: "color", default: "#5a6bff" },
|
|
400
420
|
stroke: { type: "color", default: "#94a3b8" },
|
|
401
421
|
textColor: { type: "color", default: "#0f172a" },
|
|
402
422
|
onTextColor: { type: "color", default: "#ffffff" },
|
|
403
|
-
fontSize: { type: "number", default: 14, min: 6, max: 200 }
|
|
423
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
424
|
+
animate: { type: "number", default: 160, min: 0, max: 2e3, step: 10 }
|
|
404
425
|
},
|
|
405
426
|
interaction: "toggle",
|
|
406
427
|
pointerScale: false,
|
|
@@ -410,16 +431,153 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
410
431
|
{
|
|
411
432
|
type: "button",
|
|
412
433
|
group: "action",
|
|
434
|
+
category: "action",
|
|
413
435
|
properties: {
|
|
414
436
|
accent: { type: "color", default: "#5a6bff" },
|
|
415
437
|
textColor: { type: "color", default: "#ffffff" },
|
|
416
438
|
radius: { type: "number", default: 8, min: 0, max: 200 },
|
|
417
|
-
fontSize: { type: "number", default: 14, min: 6, max: 200 }
|
|
439
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
440
|
+
animate: { type: "number", default: 160, min: 0, max: 2e3, step: 10 }
|
|
418
441
|
},
|
|
419
442
|
interaction: "press",
|
|
420
443
|
pointerScale: false,
|
|
421
444
|
size: { width: 120, height: 40, minWidth: 40, minHeight: 24 },
|
|
422
445
|
role: "button"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
type: "slider",
|
|
449
|
+
group: "input",
|
|
450
|
+
category: "value",
|
|
451
|
+
value: { type: "number", writable: true, default: 40 },
|
|
452
|
+
properties: {
|
|
453
|
+
variant: { type: "enum", default: "line", options: ["line", "field"] },
|
|
454
|
+
direction: { type: "enum", default: "horizontal", options: ["horizontal", "vertical"] },
|
|
455
|
+
ticks: { type: "number", default: 0, min: 0, max: 200 },
|
|
456
|
+
tickColor: { type: "color", default: "#94a3b8" },
|
|
457
|
+
min: { type: "number", default: 0 },
|
|
458
|
+
max: { type: "number", default: 100 },
|
|
459
|
+
step: { type: "number", default: 0, min: 0 },
|
|
460
|
+
surface: { type: "color", default: "#eef1f6" },
|
|
461
|
+
fill: { type: "color", default: "#cbd5e1" },
|
|
462
|
+
textColor: { type: "color", default: "#0f172a" },
|
|
463
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
464
|
+
display: { type: "enum", default: "value", options: ["none", "value", "percent"] },
|
|
465
|
+
radius: { type: "number", default: 10, min: 0, max: 200 },
|
|
466
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
467
|
+
track: { type: "color", default: "#cbd5e1" },
|
|
468
|
+
thumb: { type: "color", default: "#ffffff" },
|
|
469
|
+
trackHeight: { type: "number", default: 6, min: 1, max: 80 },
|
|
470
|
+
thumbSize: { type: "number", default: 56, min: 20, max: 100, step: 5 },
|
|
471
|
+
animate: { type: "number", default: 0, min: 0, max: 2e3, step: 10 }
|
|
472
|
+
},
|
|
473
|
+
interaction: "slide",
|
|
474
|
+
pointerScale: false,
|
|
475
|
+
size: { width: 220, height: 28, minWidth: 60, minHeight: 12 },
|
|
476
|
+
role: "slider"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
type: "range",
|
|
480
|
+
group: "input",
|
|
481
|
+
category: "value",
|
|
482
|
+
value: { type: "number", writable: true, default: 25 },
|
|
483
|
+
properties: {
|
|
484
|
+
variant: { type: "enum", default: "line", options: ["line", "field"] },
|
|
485
|
+
direction: { type: "enum", default: "horizontal", options: ["horizontal", "vertical"] },
|
|
486
|
+
ticks: { type: "number", default: 0, min: 0, max: 200 },
|
|
487
|
+
tickColor: { type: "color", default: "#94a3b8" },
|
|
488
|
+
valueEnd: { type: "number", default: 75 },
|
|
489
|
+
min: { type: "number", default: 0 },
|
|
490
|
+
max: { type: "number", default: 100 },
|
|
491
|
+
step: { type: "number", default: 0, min: 0 },
|
|
492
|
+
surface: { type: "color", default: "#eef1f6" },
|
|
493
|
+
fill: { type: "color", default: "#cbd5e1" },
|
|
494
|
+
textColor: { type: "color", default: "#0f172a" },
|
|
495
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
496
|
+
display: { type: "enum", default: "value", options: ["none", "value", "percent"] },
|
|
497
|
+
radius: { type: "number", default: 10, min: 0, max: 200 },
|
|
498
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
499
|
+
track: { type: "color", default: "#cbd5e1" },
|
|
500
|
+
thumb: { type: "color", default: "#ffffff" },
|
|
501
|
+
trackHeight: { type: "number", default: 6, min: 1, max: 80 },
|
|
502
|
+
thumbSize: { type: "number", default: 56, min: 20, max: 100, step: 5 },
|
|
503
|
+
animate: { type: "number", default: 0, min: 0, max: 2e3, step: 10 }
|
|
504
|
+
},
|
|
505
|
+
interaction: "range",
|
|
506
|
+
pointerScale: false,
|
|
507
|
+
size: { width: 220, height: 28, minWidth: 60, minHeight: 12 },
|
|
508
|
+
role: "slider"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
type: "progress",
|
|
512
|
+
group: "readout",
|
|
513
|
+
category: "indicator",
|
|
514
|
+
value: { type: "number", writable: false, default: 60 },
|
|
515
|
+
properties: {
|
|
516
|
+
min: { type: "number", default: 0 },
|
|
517
|
+
max: { type: "number", default: 100 },
|
|
518
|
+
variant: { type: "enum", default: "bar", options: ["bar", "ring"] },
|
|
519
|
+
direction: { type: "enum", default: "horizontal", options: ["horizontal", "vertical"] },
|
|
520
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
521
|
+
track: { type: "color", default: "#e2e8f0" },
|
|
522
|
+
thickness: { type: "number", default: 10, min: 1, max: 80 },
|
|
523
|
+
rounded: { type: "boolean", default: true },
|
|
524
|
+
display: { type: "enum", default: "none", options: ["none", "percent", "value"] },
|
|
525
|
+
textColor: { type: "color", default: "#0f172a" },
|
|
526
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
527
|
+
animate: { type: "number", default: 300, min: 0, max: 2e3, step: 10 }
|
|
528
|
+
},
|
|
529
|
+
interaction: "none",
|
|
530
|
+
pointerScale: false,
|
|
531
|
+
size: { width: 220, height: 12, minWidth: 20, minHeight: 4 },
|
|
532
|
+
role: "progressbar"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
type: "segmented",
|
|
536
|
+
group: "input",
|
|
537
|
+
category: "selection",
|
|
538
|
+
value: { type: "number", writable: true, default: 0 },
|
|
539
|
+
properties: {
|
|
540
|
+
options: { type: "string", default: "Day,Week,Month" },
|
|
541
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
542
|
+
track: { type: "color", default: "#e2e8f0" },
|
|
543
|
+
textColor: { type: "color", default: "#475569" },
|
|
544
|
+
activeTextColor: { type: "color", default: "#ffffff" },
|
|
545
|
+
radius: { type: "number", default: 200, min: 0, max: 200 },
|
|
546
|
+
inset: { type: "number", default: 3, min: 0, max: 20 },
|
|
547
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
548
|
+
animate: { type: "number", default: 200, min: 0, max: 2e3, step: 10 }
|
|
549
|
+
},
|
|
550
|
+
interaction: "pick",
|
|
551
|
+
pointerScale: false,
|
|
552
|
+
size: { width: 300, height: 40, minWidth: 80, minHeight: 20 },
|
|
553
|
+
role: "radiogroup"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
type: "knob",
|
|
557
|
+
group: "input",
|
|
558
|
+
category: "value",
|
|
559
|
+
value: { type: "number", writable: true, default: 40 },
|
|
560
|
+
properties: {
|
|
561
|
+
min: { type: "number", default: 0 },
|
|
562
|
+
max: { type: "number", default: 100 },
|
|
563
|
+
step: { type: "number", default: 0, min: 0 },
|
|
564
|
+
start: { type: "number", default: 225, min: 0, max: 360 },
|
|
565
|
+
sweep: { type: "number", default: 270, min: 30, max: 360 },
|
|
566
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
567
|
+
track: { type: "color", default: "#cbd5e1" },
|
|
568
|
+
face: { type: "color", default: "#f1f5f9" },
|
|
569
|
+
dot: { type: "color", default: "#0f172a" },
|
|
570
|
+
thickness: { type: "number", default: 8, min: 1, max: 80 },
|
|
571
|
+
rounded: { type: "boolean", default: true },
|
|
572
|
+
display: { type: "enum", default: "value", options: ["none", "value", "percent"] },
|
|
573
|
+
textColor: { type: "color", default: "#0f172a" },
|
|
574
|
+
fontSize: { type: "number", default: 16, min: 6, max: 200 },
|
|
575
|
+
animate: { type: "number", default: 0, min: 0, max: 2e3, step: 10 }
|
|
576
|
+
},
|
|
577
|
+
interaction: "turn",
|
|
578
|
+
pointerScale: false,
|
|
579
|
+
size: { width: 96, height: 96, minWidth: 40, minHeight: 40, aspect: 1 },
|
|
580
|
+
role: "slider"
|
|
423
581
|
}
|
|
424
582
|
];
|
|
425
583
|
|
|
@@ -2604,12 +2762,13 @@ function resolveCanvasTree(model, resolution) {
|
|
|
2604
2762
|
function readShaderDefinition(block2) {
|
|
2605
2763
|
const properties = directProperties(block2);
|
|
2606
2764
|
const program = asString(properties.get("program"));
|
|
2765
|
+
const surfacePadding = asNumber(properties.get("surfacePadding"));
|
|
2607
2766
|
if (!program) {
|
|
2608
2767
|
return void 0;
|
|
2609
2768
|
}
|
|
2610
2769
|
const parameters = {};
|
|
2611
2770
|
for (const [key, value] of properties) {
|
|
2612
|
-
if (key === "program") {
|
|
2771
|
+
if (key === "program" || key === "surfacePadding") {
|
|
2613
2772
|
continue;
|
|
2614
2773
|
}
|
|
2615
2774
|
const number = asNumber(value);
|
|
@@ -2620,7 +2779,12 @@ function readShaderDefinition(block2) {
|
|
|
2620
2779
|
parameters[key] = text === "true" ? true : text === "false" ? false : text;
|
|
2621
2780
|
}
|
|
2622
2781
|
}
|
|
2623
|
-
return {
|
|
2782
|
+
return {
|
|
2783
|
+
name: block2.name,
|
|
2784
|
+
program,
|
|
2785
|
+
...surfacePadding === void 0 ? {} : { surfacePadding: Math.max(0, surfacePadding) },
|
|
2786
|
+
parameters
|
|
2787
|
+
};
|
|
2624
2788
|
}
|
|
2625
2789
|
|
|
2626
2790
|
// src/sflSemantic/definitions/symbols.ts
|
|
@@ -3000,9 +3164,9 @@ var DOM_CONTRACT_VERSION = 1;
|
|
|
3000
3164
|
// src/model/geometry/ports/rectangleCoordinates.ts
|
|
3001
3165
|
var DEGREES_TO_RADIANS = Math.PI / 180;
|
|
3002
3166
|
function rotatePoint(point, degrees) {
|
|
3003
|
-
const
|
|
3004
|
-
const cosine = Math.cos(
|
|
3005
|
-
const sine = Math.sin(
|
|
3167
|
+
const radians2 = degrees * DEGREES_TO_RADIANS;
|
|
3168
|
+
const cosine = Math.cos(radians2);
|
|
3169
|
+
const sine = Math.sin(radians2);
|
|
3006
3170
|
return { x: point.x * cosine - point.y * sine, y: point.x * sine + point.y * cosine };
|
|
3007
3171
|
}
|
|
3008
3172
|
function rectangleCenter(rectangle) {
|
|
@@ -4473,6 +4637,50 @@ function rowTop(rows, plot, index) {
|
|
|
4473
4637
|
return plot.y + index * rows.slotHeight + rows.groupGap / 2 + rows.offset;
|
|
4474
4638
|
}
|
|
4475
4639
|
|
|
4640
|
+
// src/renderScene/charts/primitives/labelTilt.ts
|
|
4641
|
+
function labelTilt(chart) {
|
|
4642
|
+
return Math.min(90, Math.max(0, finite(chart.axisLabelAngle, 0)));
|
|
4643
|
+
}
|
|
4644
|
+
var radians = (degrees) => degrees * Math.PI / 180;
|
|
4645
|
+
function labelFontSize(chart) {
|
|
4646
|
+
return Math.max(9, finite(chart.axisFontSize ?? chart.fontSize, 12));
|
|
4647
|
+
}
|
|
4648
|
+
function tiltedLabelRoom(chart, labels, tilt) {
|
|
4649
|
+
const fontSize = labelFontSize(chart);
|
|
4650
|
+
const widest = Math.max(0, ...labels.map((label) => estimateTextWidth(label, fontSize, false)));
|
|
4651
|
+
return Math.ceil(widest * Math.sin(radians(tilt)) + (fontSize + 2) * Math.cos(radians(tilt)));
|
|
4652
|
+
}
|
|
4653
|
+
function labelAboveFrame(chart, label, tilt, anchor) {
|
|
4654
|
+
const fontSize = labelFontSize(chart);
|
|
4655
|
+
const height = fontSize + 2;
|
|
4656
|
+
const width = Math.ceil(estimateTextWidth(label, fontSize, false)) + 4;
|
|
4657
|
+
const angle = radians(tilt);
|
|
4658
|
+
return {
|
|
4659
|
+
frame: {
|
|
4660
|
+
x: anchor.x - height / 2 * Math.sin(angle),
|
|
4661
|
+
y: anchor.y - height / 2 * Math.cos(angle),
|
|
4662
|
+
width,
|
|
4663
|
+
height
|
|
4664
|
+
},
|
|
4665
|
+
rotation: -tilt
|
|
4666
|
+
};
|
|
4667
|
+
}
|
|
4668
|
+
function labelBelowFrame(chart, label, tilt, anchor) {
|
|
4669
|
+
const fontSize = labelFontSize(chart);
|
|
4670
|
+
const height = fontSize + 2;
|
|
4671
|
+
const width = Math.ceil(estimateTextWidth(label, fontSize, false)) + 4;
|
|
4672
|
+
const angle = radians(tilt);
|
|
4673
|
+
return {
|
|
4674
|
+
frame: {
|
|
4675
|
+
x: anchor.x - (width * Math.cos(angle) + height / 2 * Math.sin(angle)),
|
|
4676
|
+
y: anchor.y + width * Math.sin(angle) - height / 2 * Math.cos(angle),
|
|
4677
|
+
width,
|
|
4678
|
+
height
|
|
4679
|
+
},
|
|
4680
|
+
rotation: -tilt
|
|
4681
|
+
};
|
|
4682
|
+
}
|
|
4683
|
+
|
|
4476
4684
|
// src/renderScene/charts/primitives/segments.ts
|
|
4477
4685
|
function segmentedBarPath(frame, orientation, count, gap, radius, fraction, snap) {
|
|
4478
4686
|
const horizontal = orientation === "horizontal";
|
|
@@ -5151,6 +5359,7 @@ exports.CATEGORY_LABEL_ROW = CATEGORY_LABEL_ROW;
|
|
|
5151
5359
|
exports.CHART_COLORS = CHART_COLORS;
|
|
5152
5360
|
exports.CHART_TITLE_PROP = CHART_TITLE_PROP;
|
|
5153
5361
|
exports.CHART_TYPES = CHART_TYPES;
|
|
5362
|
+
exports.COMPONENT_CATEGORIES = COMPONENT_CATEGORIES;
|
|
5154
5363
|
exports.CORNER_RADIUS_ATTR = CORNER_RADIUS_ATTR;
|
|
5155
5364
|
exports.DEFAULT_FONT = DEFAULT_FONT;
|
|
5156
5365
|
exports.DEFAULT_HEATMAP_ZONES = DEFAULT_HEATMAP_ZONES;
|
|
@@ -5190,6 +5399,7 @@ exports.cleanFootprint = cleanFootprint;
|
|
|
5190
5399
|
exports.clipSegmentToRect = clipSegmentToRect;
|
|
5191
5400
|
exports.colorWithAlpha = colorWithAlpha;
|
|
5192
5401
|
exports.componentRegistryVersion = componentRegistryVersion;
|
|
5402
|
+
exports.componentTypes = componentTypes;
|
|
5193
5403
|
exports.computeBoxplotStats = computeBoxplotStats;
|
|
5194
5404
|
exports.contrastTextColor = contrastTextColor;
|
|
5195
5405
|
exports.cornersRoundedRectPath = cornersRoundedRectPath;
|
|
@@ -5228,7 +5438,10 @@ exports.isometricBounds = isometricBounds;
|
|
|
5228
5438
|
exports.isometricFaceCenter = isometricFaceCenter;
|
|
5229
5439
|
exports.isometricFaces = isometricFaces;
|
|
5230
5440
|
exports.isometricTopFaceCenter = isometricTopFaceCenter;
|
|
5441
|
+
exports.labelAboveFrame = labelAboveFrame;
|
|
5442
|
+
exports.labelBelowFrame = labelBelowFrame;
|
|
5231
5443
|
exports.labelGapDash = labelGapDash;
|
|
5444
|
+
exports.labelTilt = labelTilt;
|
|
5232
5445
|
exports.leftRoundedRectPath = leftRoundedRectPath;
|
|
5233
5446
|
exports.linePathData = linePathData;
|
|
5234
5447
|
exports.localShapePath = localShapePath;
|
|
@@ -5285,9 +5498,10 @@ exports.stackSequence = stackSequence;
|
|
|
5285
5498
|
exports.stackedSegment = stackedSegment;
|
|
5286
5499
|
exports.symbolToPath = symbolToPath;
|
|
5287
5500
|
exports.tag = tag;
|
|
5501
|
+
exports.tiltedLabelRoom = tiltedLabelRoom;
|
|
5288
5502
|
exports.tokenizeSource = tokenizeSource;
|
|
5289
5503
|
exports.topRoundedRectPath = topRoundedRectPath;
|
|
5290
5504
|
exports.wrapText = wrapText;
|
|
5291
5505
|
exports.zoneColorAtValue = zoneColorAtValue;
|
|
5292
|
-
//# sourceMappingURL=chunk-
|
|
5293
|
-
//# sourceMappingURL=chunk-
|
|
5506
|
+
//# sourceMappingURL=chunk-LNW5VIEA.cjs.map
|
|
5507
|
+
//# sourceMappingURL=chunk-LNW5VIEA.cjs.map
|