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
|
@@ -319,6 +319,18 @@ function symbolToPath(points, frame) {
|
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
+
// src/model/component/categories.ts
|
|
323
|
+
var COMPONENT_CATEGORIES = [
|
|
324
|
+
{ id: "action", label: "Actions" },
|
|
325
|
+
{ id: "selection", label: "Selection" },
|
|
326
|
+
{ id: "value", label: "Value input" },
|
|
327
|
+
{ id: "text", label: "Text input" },
|
|
328
|
+
{ id: "indicator", label: "Indicators" },
|
|
329
|
+
{ id: "instrument", label: "Instruments" },
|
|
330
|
+
{ id: "navigation", label: "Navigation" },
|
|
331
|
+
{ id: "container", label: "Containers" }
|
|
332
|
+
];
|
|
333
|
+
|
|
322
334
|
// src/model/component/supportedTypes.ts
|
|
323
335
|
var BUILT_IN_COMPONENT_TYPES = ["rollingNumber", "tickScale", "ruler"];
|
|
324
336
|
function isBuiltInComponentType(value) {
|
|
@@ -335,6 +347,7 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
335
347
|
{
|
|
336
348
|
type: "rollingNumber",
|
|
337
349
|
group: "readout",
|
|
350
|
+
category: "indicator",
|
|
338
351
|
value: { type: "number", writable: false, default: 0 },
|
|
339
352
|
properties: {},
|
|
340
353
|
interaction: "none",
|
|
@@ -344,6 +357,7 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
344
357
|
{
|
|
345
358
|
type: "tickScale",
|
|
346
359
|
group: "readout",
|
|
360
|
+
category: "instrument",
|
|
347
361
|
value: { type: "number", writable: false, default: 0 },
|
|
348
362
|
properties: {},
|
|
349
363
|
interaction: "none",
|
|
@@ -353,6 +367,7 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
353
367
|
{
|
|
354
368
|
type: "ruler",
|
|
355
369
|
group: "input",
|
|
370
|
+
category: "instrument",
|
|
356
371
|
value: { type: "number", writable: false, default: 0 },
|
|
357
372
|
properties: {},
|
|
358
373
|
interaction: "scale",
|
|
@@ -362,11 +377,13 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
362
377
|
{
|
|
363
378
|
type: "switch",
|
|
364
379
|
group: "input",
|
|
380
|
+
category: "selection",
|
|
365
381
|
value: { type: "boolean", writable: true, default: false },
|
|
366
382
|
properties: {
|
|
367
383
|
accent: { type: "color", default: "#5a6bff" },
|
|
368
384
|
track: { type: "color", default: "#cbd5e1" },
|
|
369
|
-
thumb: { type: "color", default: "#ffffff" }
|
|
385
|
+
thumb: { type: "color", default: "#ffffff" },
|
|
386
|
+
animate: { type: "number", default: 160, min: 0, max: 2e3, step: 10 }
|
|
370
387
|
},
|
|
371
388
|
interaction: "toggle",
|
|
372
389
|
pointerScale: false,
|
|
@@ -376,13 +393,15 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
376
393
|
{
|
|
377
394
|
type: "checkbox",
|
|
378
395
|
group: "input",
|
|
396
|
+
category: "selection",
|
|
379
397
|
value: { type: "boolean", writable: true, default: false },
|
|
380
398
|
properties: {
|
|
381
399
|
accent: { type: "color", default: "#5a6bff" },
|
|
382
400
|
stroke: { type: "color", default: "#94a3b8" },
|
|
383
401
|
check: { type: "color", default: "#ffffff" },
|
|
384
402
|
textColor: { type: "color", default: "#0f172a" },
|
|
385
|
-
fontSize: { type: "number", default: 14, min: 6, max: 200 }
|
|
403
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
404
|
+
animate: { type: "number", default: 160, min: 0, max: 2e3, step: 10 }
|
|
386
405
|
},
|
|
387
406
|
interaction: "toggle",
|
|
388
407
|
pointerScale: false,
|
|
@@ -392,13 +411,15 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
392
411
|
{
|
|
393
412
|
type: "toggleButton",
|
|
394
413
|
group: "input",
|
|
414
|
+
category: "action",
|
|
395
415
|
value: { type: "boolean", writable: true, default: false },
|
|
396
416
|
properties: {
|
|
397
417
|
accent: { type: "color", default: "#5a6bff" },
|
|
398
418
|
stroke: { type: "color", default: "#94a3b8" },
|
|
399
419
|
textColor: { type: "color", default: "#0f172a" },
|
|
400
420
|
onTextColor: { type: "color", default: "#ffffff" },
|
|
401
|
-
fontSize: { type: "number", default: 14, min: 6, max: 200 }
|
|
421
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
422
|
+
animate: { type: "number", default: 160, min: 0, max: 2e3, step: 10 }
|
|
402
423
|
},
|
|
403
424
|
interaction: "toggle",
|
|
404
425
|
pointerScale: false,
|
|
@@ -408,16 +429,153 @@ var BUILT_IN_DESCRIPTORS = [
|
|
|
408
429
|
{
|
|
409
430
|
type: "button",
|
|
410
431
|
group: "action",
|
|
432
|
+
category: "action",
|
|
411
433
|
properties: {
|
|
412
434
|
accent: { type: "color", default: "#5a6bff" },
|
|
413
435
|
textColor: { type: "color", default: "#ffffff" },
|
|
414
436
|
radius: { type: "number", default: 8, min: 0, max: 200 },
|
|
415
|
-
fontSize: { type: "number", default: 14, min: 6, max: 200 }
|
|
437
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
438
|
+
animate: { type: "number", default: 160, min: 0, max: 2e3, step: 10 }
|
|
416
439
|
},
|
|
417
440
|
interaction: "press",
|
|
418
441
|
pointerScale: false,
|
|
419
442
|
size: { width: 120, height: 40, minWidth: 40, minHeight: 24 },
|
|
420
443
|
role: "button"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
type: "slider",
|
|
447
|
+
group: "input",
|
|
448
|
+
category: "value",
|
|
449
|
+
value: { type: "number", writable: true, default: 40 },
|
|
450
|
+
properties: {
|
|
451
|
+
variant: { type: "enum", default: "line", options: ["line", "field"] },
|
|
452
|
+
direction: { type: "enum", default: "horizontal", options: ["horizontal", "vertical"] },
|
|
453
|
+
ticks: { type: "number", default: 0, min: 0, max: 200 },
|
|
454
|
+
tickColor: { type: "color", default: "#94a3b8" },
|
|
455
|
+
min: { type: "number", default: 0 },
|
|
456
|
+
max: { type: "number", default: 100 },
|
|
457
|
+
step: { type: "number", default: 0, min: 0 },
|
|
458
|
+
surface: { type: "color", default: "#eef1f6" },
|
|
459
|
+
fill: { type: "color", default: "#cbd5e1" },
|
|
460
|
+
textColor: { type: "color", default: "#0f172a" },
|
|
461
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
462
|
+
display: { type: "enum", default: "value", options: ["none", "value", "percent"] },
|
|
463
|
+
radius: { type: "number", default: 10, min: 0, max: 200 },
|
|
464
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
465
|
+
track: { type: "color", default: "#cbd5e1" },
|
|
466
|
+
thumb: { type: "color", default: "#ffffff" },
|
|
467
|
+
trackHeight: { type: "number", default: 6, min: 1, max: 80 },
|
|
468
|
+
thumbSize: { type: "number", default: 56, min: 20, max: 100, step: 5 },
|
|
469
|
+
animate: { type: "number", default: 0, min: 0, max: 2e3, step: 10 }
|
|
470
|
+
},
|
|
471
|
+
interaction: "slide",
|
|
472
|
+
pointerScale: false,
|
|
473
|
+
size: { width: 220, height: 28, minWidth: 60, minHeight: 12 },
|
|
474
|
+
role: "slider"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
type: "range",
|
|
478
|
+
group: "input",
|
|
479
|
+
category: "value",
|
|
480
|
+
value: { type: "number", writable: true, default: 25 },
|
|
481
|
+
properties: {
|
|
482
|
+
variant: { type: "enum", default: "line", options: ["line", "field"] },
|
|
483
|
+
direction: { type: "enum", default: "horizontal", options: ["horizontal", "vertical"] },
|
|
484
|
+
ticks: { type: "number", default: 0, min: 0, max: 200 },
|
|
485
|
+
tickColor: { type: "color", default: "#94a3b8" },
|
|
486
|
+
valueEnd: { type: "number", default: 75 },
|
|
487
|
+
min: { type: "number", default: 0 },
|
|
488
|
+
max: { type: "number", default: 100 },
|
|
489
|
+
step: { type: "number", default: 0, min: 0 },
|
|
490
|
+
surface: { type: "color", default: "#eef1f6" },
|
|
491
|
+
fill: { type: "color", default: "#cbd5e1" },
|
|
492
|
+
textColor: { type: "color", default: "#0f172a" },
|
|
493
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
494
|
+
display: { type: "enum", default: "value", options: ["none", "value", "percent"] },
|
|
495
|
+
radius: { type: "number", default: 10, min: 0, max: 200 },
|
|
496
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
497
|
+
track: { type: "color", default: "#cbd5e1" },
|
|
498
|
+
thumb: { type: "color", default: "#ffffff" },
|
|
499
|
+
trackHeight: { type: "number", default: 6, min: 1, max: 80 },
|
|
500
|
+
thumbSize: { type: "number", default: 56, min: 20, max: 100, step: 5 },
|
|
501
|
+
animate: { type: "number", default: 0, min: 0, max: 2e3, step: 10 }
|
|
502
|
+
},
|
|
503
|
+
interaction: "range",
|
|
504
|
+
pointerScale: false,
|
|
505
|
+
size: { width: 220, height: 28, minWidth: 60, minHeight: 12 },
|
|
506
|
+
role: "slider"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
type: "progress",
|
|
510
|
+
group: "readout",
|
|
511
|
+
category: "indicator",
|
|
512
|
+
value: { type: "number", writable: false, default: 60 },
|
|
513
|
+
properties: {
|
|
514
|
+
min: { type: "number", default: 0 },
|
|
515
|
+
max: { type: "number", default: 100 },
|
|
516
|
+
variant: { type: "enum", default: "bar", options: ["bar", "ring"] },
|
|
517
|
+
direction: { type: "enum", default: "horizontal", options: ["horizontal", "vertical"] },
|
|
518
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
519
|
+
track: { type: "color", default: "#e2e8f0" },
|
|
520
|
+
thickness: { type: "number", default: 10, min: 1, max: 80 },
|
|
521
|
+
rounded: { type: "boolean", default: true },
|
|
522
|
+
display: { type: "enum", default: "none", options: ["none", "percent", "value"] },
|
|
523
|
+
textColor: { type: "color", default: "#0f172a" },
|
|
524
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
525
|
+
animate: { type: "number", default: 300, min: 0, max: 2e3, step: 10 }
|
|
526
|
+
},
|
|
527
|
+
interaction: "none",
|
|
528
|
+
pointerScale: false,
|
|
529
|
+
size: { width: 220, height: 12, minWidth: 20, minHeight: 4 },
|
|
530
|
+
role: "progressbar"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
type: "segmented",
|
|
534
|
+
group: "input",
|
|
535
|
+
category: "selection",
|
|
536
|
+
value: { type: "number", writable: true, default: 0 },
|
|
537
|
+
properties: {
|
|
538
|
+
options: { type: "string", default: "Day,Week,Month" },
|
|
539
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
540
|
+
track: { type: "color", default: "#e2e8f0" },
|
|
541
|
+
textColor: { type: "color", default: "#475569" },
|
|
542
|
+
activeTextColor: { type: "color", default: "#ffffff" },
|
|
543
|
+
radius: { type: "number", default: 200, min: 0, max: 200 },
|
|
544
|
+
inset: { type: "number", default: 3, min: 0, max: 20 },
|
|
545
|
+
fontSize: { type: "number", default: 14, min: 6, max: 200 },
|
|
546
|
+
animate: { type: "number", default: 200, min: 0, max: 2e3, step: 10 }
|
|
547
|
+
},
|
|
548
|
+
interaction: "pick",
|
|
549
|
+
pointerScale: false,
|
|
550
|
+
size: { width: 300, height: 40, minWidth: 80, minHeight: 20 },
|
|
551
|
+
role: "radiogroup"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
type: "knob",
|
|
555
|
+
group: "input",
|
|
556
|
+
category: "value",
|
|
557
|
+
value: { type: "number", writable: true, default: 40 },
|
|
558
|
+
properties: {
|
|
559
|
+
min: { type: "number", default: 0 },
|
|
560
|
+
max: { type: "number", default: 100 },
|
|
561
|
+
step: { type: "number", default: 0, min: 0 },
|
|
562
|
+
start: { type: "number", default: 225, min: 0, max: 360 },
|
|
563
|
+
sweep: { type: "number", default: 270, min: 30, max: 360 },
|
|
564
|
+
accent: { type: "color", default: "#5a6bff" },
|
|
565
|
+
track: { type: "color", default: "#cbd5e1" },
|
|
566
|
+
face: { type: "color", default: "#f1f5f9" },
|
|
567
|
+
dot: { type: "color", default: "#0f172a" },
|
|
568
|
+
thickness: { type: "number", default: 8, min: 1, max: 80 },
|
|
569
|
+
rounded: { type: "boolean", default: true },
|
|
570
|
+
display: { type: "enum", default: "value", options: ["none", "value", "percent"] },
|
|
571
|
+
textColor: { type: "color", default: "#0f172a" },
|
|
572
|
+
fontSize: { type: "number", default: 16, min: 6, max: 200 },
|
|
573
|
+
animate: { type: "number", default: 0, min: 0, max: 2e3, step: 10 }
|
|
574
|
+
},
|
|
575
|
+
interaction: "turn",
|
|
576
|
+
pointerScale: false,
|
|
577
|
+
size: { width: 96, height: 96, minWidth: 40, minHeight: 40, aspect: 1 },
|
|
578
|
+
role: "slider"
|
|
421
579
|
}
|
|
422
580
|
];
|
|
423
581
|
|
|
@@ -2602,12 +2760,13 @@ function resolveCanvasTree(model, resolution) {
|
|
|
2602
2760
|
function readShaderDefinition(block2) {
|
|
2603
2761
|
const properties = directProperties(block2);
|
|
2604
2762
|
const program = asString(properties.get("program"));
|
|
2763
|
+
const surfacePadding = asNumber(properties.get("surfacePadding"));
|
|
2605
2764
|
if (!program) {
|
|
2606
2765
|
return void 0;
|
|
2607
2766
|
}
|
|
2608
2767
|
const parameters = {};
|
|
2609
2768
|
for (const [key, value] of properties) {
|
|
2610
|
-
if (key === "program") {
|
|
2769
|
+
if (key === "program" || key === "surfacePadding") {
|
|
2611
2770
|
continue;
|
|
2612
2771
|
}
|
|
2613
2772
|
const number = asNumber(value);
|
|
@@ -2618,7 +2777,12 @@ function readShaderDefinition(block2) {
|
|
|
2618
2777
|
parameters[key] = text === "true" ? true : text === "false" ? false : text;
|
|
2619
2778
|
}
|
|
2620
2779
|
}
|
|
2621
|
-
return {
|
|
2780
|
+
return {
|
|
2781
|
+
name: block2.name,
|
|
2782
|
+
program,
|
|
2783
|
+
...surfacePadding === void 0 ? {} : { surfacePadding: Math.max(0, surfacePadding) },
|
|
2784
|
+
parameters
|
|
2785
|
+
};
|
|
2622
2786
|
}
|
|
2623
2787
|
|
|
2624
2788
|
// src/sflSemantic/definitions/symbols.ts
|
|
@@ -2998,9 +3162,9 @@ var DOM_CONTRACT_VERSION = 1;
|
|
|
2998
3162
|
// src/model/geometry/ports/rectangleCoordinates.ts
|
|
2999
3163
|
var DEGREES_TO_RADIANS = Math.PI / 180;
|
|
3000
3164
|
function rotatePoint(point, degrees) {
|
|
3001
|
-
const
|
|
3002
|
-
const cosine = Math.cos(
|
|
3003
|
-
const sine = Math.sin(
|
|
3165
|
+
const radians2 = degrees * DEGREES_TO_RADIANS;
|
|
3166
|
+
const cosine = Math.cos(radians2);
|
|
3167
|
+
const sine = Math.sin(radians2);
|
|
3004
3168
|
return { x: point.x * cosine - point.y * sine, y: point.x * sine + point.y * cosine };
|
|
3005
3169
|
}
|
|
3006
3170
|
function rectangleCenter(rectangle) {
|
|
@@ -4471,6 +4635,50 @@ function rowTop(rows, plot, index) {
|
|
|
4471
4635
|
return plot.y + index * rows.slotHeight + rows.groupGap / 2 + rows.offset;
|
|
4472
4636
|
}
|
|
4473
4637
|
|
|
4638
|
+
// src/renderScene/charts/primitives/labelTilt.ts
|
|
4639
|
+
function labelTilt(chart) {
|
|
4640
|
+
return Math.min(90, Math.max(0, finite(chart.axisLabelAngle, 0)));
|
|
4641
|
+
}
|
|
4642
|
+
var radians = (degrees) => degrees * Math.PI / 180;
|
|
4643
|
+
function labelFontSize(chart) {
|
|
4644
|
+
return Math.max(9, finite(chart.axisFontSize ?? chart.fontSize, 12));
|
|
4645
|
+
}
|
|
4646
|
+
function tiltedLabelRoom(chart, labels, tilt) {
|
|
4647
|
+
const fontSize = labelFontSize(chart);
|
|
4648
|
+
const widest = Math.max(0, ...labels.map((label) => estimateTextWidth(label, fontSize, false)));
|
|
4649
|
+
return Math.ceil(widest * Math.sin(radians(tilt)) + (fontSize + 2) * Math.cos(radians(tilt)));
|
|
4650
|
+
}
|
|
4651
|
+
function labelAboveFrame(chart, label, tilt, anchor) {
|
|
4652
|
+
const fontSize = labelFontSize(chart);
|
|
4653
|
+
const height = fontSize + 2;
|
|
4654
|
+
const width = Math.ceil(estimateTextWidth(label, fontSize, false)) + 4;
|
|
4655
|
+
const angle = radians(tilt);
|
|
4656
|
+
return {
|
|
4657
|
+
frame: {
|
|
4658
|
+
x: anchor.x - height / 2 * Math.sin(angle),
|
|
4659
|
+
y: anchor.y - height / 2 * Math.cos(angle),
|
|
4660
|
+
width,
|
|
4661
|
+
height
|
|
4662
|
+
},
|
|
4663
|
+
rotation: -tilt
|
|
4664
|
+
};
|
|
4665
|
+
}
|
|
4666
|
+
function labelBelowFrame(chart, label, tilt, anchor) {
|
|
4667
|
+
const fontSize = labelFontSize(chart);
|
|
4668
|
+
const height = fontSize + 2;
|
|
4669
|
+
const width = Math.ceil(estimateTextWidth(label, fontSize, false)) + 4;
|
|
4670
|
+
const angle = radians(tilt);
|
|
4671
|
+
return {
|
|
4672
|
+
frame: {
|
|
4673
|
+
x: anchor.x - (width * Math.cos(angle) + height / 2 * Math.sin(angle)),
|
|
4674
|
+
y: anchor.y + width * Math.sin(angle) - height / 2 * Math.cos(angle),
|
|
4675
|
+
width,
|
|
4676
|
+
height
|
|
4677
|
+
},
|
|
4678
|
+
rotation: -tilt
|
|
4679
|
+
};
|
|
4680
|
+
}
|
|
4681
|
+
|
|
4474
4682
|
// src/renderScene/charts/primitives/segments.ts
|
|
4475
4683
|
function segmentedBarPath(frame, orientation, count, gap, radius, fraction, snap) {
|
|
4476
4684
|
const horizontal = orientation === "horizontal";
|
|
@@ -5142,6 +5350,6 @@ function localShapePath(type, x, y, width, height) {
|
|
|
5142
5350
|
}
|
|
5143
5351
|
}
|
|
5144
5352
|
|
|
5145
|
-
export { AXIS_COS, AXIS_SIN, BAR_LABEL, CATEGORY_LABEL_ROW, CHART_COLORS, CHART_TITLE_PROP, CHART_TYPES, CORNER_RADIUS_ATTR, DEFAULT_FONT, DEFAULT_HEATMAP_ZONES, DEFAULT_HEX_RADIUS, DEFAULT_ROLLING_NUMBER_STYLE, DEFAULT_ZONE_FILL, DOM_CONTRACT_VERSION, EMPTY_BOUNDS, ISOMETRIC_LABEL_OFFSET_ATTR, ISOMETRIC_SIZE_ATTR, LABEL_WIDTH, LEADER_INSET, PATH_CLOSED_ATTR, PATH_POINTS_ATTR, PATH_POINT_INDEX_ATTR, PATH_TENSION_ATTR, SQUARE_CORNER_ATTR, SYMBOL_BOUNDS_ATTR, SYMBOL_POINTS_ATTR, SYMBOL_TENSION_ATTR, VISIBLE_ISOMETRIC_FACES, angleForAxisValue, axisBands, axisLabelProp, barCategoryCount, barLabelSize, barPath, barShapePath, bottomRoundedRectPath, boxBounds, calculateLinkRoute, canonicalizeSource, categoryProp, chartText, chartTicks, cleanFootprint, clipSegmentToRect, colorWithAlpha, componentRegistryVersion, computeBoxplotStats, contrastTextColor, cornersRoundedRectPath, createPieGeometry, createPieSlicePath, createVerticalErrorWhiskerNode, deriveFaceFills, edgePointToward, elementCenter, ellipsizeToWidth, errorBarRange, estimateTextWidth, extrudeFootprint, finite, flattenPath, formatBarLabel, formatFieldValue, formatRollingNumber, freeformPathData, gapInsetAngle, getComponentDescriptor, getLineMidpoint, heuristicRichMeasure, horizontalRows, interpolateHexColorStops, isBuiltInComponentType, isChartObject, isDimensionObject, isGenericComponent, isHorizontalBar, isIsometricObject, isLightColor, isPathObject, isSwimlaneObject, isometricBounds, isometricFaceCenter, isometricFaces, isometricTopFaceCenter, labelGapDash, leftRoundedRectPath, linePathData, localShapePath, mapChartValue, maxApexCornerRadius, maxPieCornerRadius, paint, parseSource, pathBounds, pathToSymbol, personLabelArea, pieApexRadius, pieArcPoint, pieUsesInnerArc, pillCornerRadius, pillPath, pointAtNormalizedPort, pointAtPort, radarCategoryCount, radarPointAt, radarRadius, radarRadiusForValue, radarSeriesPath, radarValueAtPoint, radarVertexPoint, registerComponentDescriptor, relativeOffsetOnRectangleSide, renderPieLabels, representativeColor, resolveChartShadow, resolvePieRadii, resolveRollingNumberStyle, rightRoundedRectPath, rotatedBounds, roundedBarPath, roundedOrthogonalPathData, roundedPolygonPath, rowTop, ruleAtProp, ruleTextProp, sameHueContrastColor, sameHueTint, segmentedBarPath, seriesColorProp, seriesLabelOffsetXProp, seriesLabelOffsetYProp, seriesLabelProp, seriesValueColorProp, seriesValueProp, sflToCanvasState, shadeFill, stackRank, stackSequence, stackedSegment, symbolToPath, tag, tokenizeSource, topRoundedRectPath, wrapText, zoneColorAtValue };
|
|
5146
|
-
//# sourceMappingURL=chunk-
|
|
5147
|
-
//# sourceMappingURL=chunk-
|
|
5353
|
+
export { AXIS_COS, AXIS_SIN, BAR_LABEL, CATEGORY_LABEL_ROW, CHART_COLORS, CHART_TITLE_PROP, CHART_TYPES, COMPONENT_CATEGORIES, CORNER_RADIUS_ATTR, DEFAULT_FONT, DEFAULT_HEATMAP_ZONES, DEFAULT_HEX_RADIUS, DEFAULT_ROLLING_NUMBER_STYLE, DEFAULT_ZONE_FILL, DOM_CONTRACT_VERSION, EMPTY_BOUNDS, ISOMETRIC_LABEL_OFFSET_ATTR, ISOMETRIC_SIZE_ATTR, LABEL_WIDTH, LEADER_INSET, PATH_CLOSED_ATTR, PATH_POINTS_ATTR, PATH_POINT_INDEX_ATTR, PATH_TENSION_ATTR, SQUARE_CORNER_ATTR, SYMBOL_BOUNDS_ATTR, SYMBOL_POINTS_ATTR, SYMBOL_TENSION_ATTR, VISIBLE_ISOMETRIC_FACES, angleForAxisValue, axisBands, axisLabelProp, barCategoryCount, barLabelSize, barPath, barShapePath, bottomRoundedRectPath, boxBounds, calculateLinkRoute, canonicalizeSource, categoryProp, chartText, chartTicks, cleanFootprint, clipSegmentToRect, colorWithAlpha, componentRegistryVersion, componentTypes, computeBoxplotStats, contrastTextColor, cornersRoundedRectPath, createPieGeometry, createPieSlicePath, createVerticalErrorWhiskerNode, deriveFaceFills, edgePointToward, elementCenter, ellipsizeToWidth, errorBarRange, estimateTextWidth, extrudeFootprint, finite, flattenPath, formatBarLabel, formatFieldValue, formatRollingNumber, freeformPathData, gapInsetAngle, getComponentDescriptor, getLineMidpoint, heuristicRichMeasure, horizontalRows, interpolateHexColorStops, isBuiltInComponentType, isChartObject, isDimensionObject, isGenericComponent, isHorizontalBar, isIsometricObject, isLightColor, isPathObject, isSwimlaneObject, isometricBounds, isometricFaceCenter, isometricFaces, isometricTopFaceCenter, labelAboveFrame, labelBelowFrame, labelGapDash, labelTilt, leftRoundedRectPath, linePathData, localShapePath, mapChartValue, maxApexCornerRadius, maxPieCornerRadius, paint, parseSource, pathBounds, pathToSymbol, personLabelArea, pieApexRadius, pieArcPoint, pieUsesInnerArc, pillCornerRadius, pillPath, pointAtNormalizedPort, pointAtPort, radarCategoryCount, radarPointAt, radarRadius, radarRadiusForValue, radarSeriesPath, radarValueAtPoint, radarVertexPoint, registerComponentDescriptor, relativeOffsetOnRectangleSide, renderPieLabels, representativeColor, resolveChartShadow, resolvePieRadii, resolveRollingNumberStyle, rightRoundedRectPath, rotatedBounds, roundedBarPath, roundedOrthogonalPathData, roundedPolygonPath, rowTop, ruleAtProp, ruleTextProp, sameHueContrastColor, sameHueTint, segmentedBarPath, seriesColorProp, seriesLabelOffsetXProp, seriesLabelOffsetYProp, seriesLabelProp, seriesValueColorProp, seriesValueProp, sflToCanvasState, shadeFill, stackRank, stackSequence, stackedSegment, symbolToPath, tag, tiltedLabelRoom, tokenizeSource, topRoundedRectPath, wrapText, zoneColorAtValue };
|
|
5354
|
+
//# sourceMappingURL=chunk-GLZVHUSW.js.map
|
|
5355
|
+
//# sourceMappingURL=chunk-GLZVHUSW.js.map
|