stickyflow 0.2.0 → 0.4.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 +38 -0
- package/README.md +1 -1
- package/dist/{chunk-KFJIFHXG.js → chunk-65IVT4GK.js} +475 -199
- package/dist/chunk-65IVT4GK.js.map +1 -0
- package/dist/{chunk-6JKNT2YC.js → chunk-BYMIYXP5.js} +17 -7
- package/dist/chunk-BYMIYXP5.js.map +1 -0
- package/dist/{chunk-N6WVHOUQ.js → chunk-CSXQD3ON.js} +28 -15
- package/dist/chunk-CSXQD3ON.js.map +1 -0
- package/dist/{chunk-YM3XFBI4.cjs → chunk-CXL254BT.cjs} +17 -6
- package/dist/chunk-CXL254BT.cjs.map +1 -0
- package/dist/{chunk-S5BVAAEF.cjs → chunk-DDCTNLLD.cjs} +989 -713
- package/dist/chunk-DDCTNLLD.cjs.map +1 -0
- package/dist/{chunk-34PK7HEU.cjs → chunk-HFOGKSNU.cjs} +18 -18
- package/dist/{chunk-34PK7HEU.cjs.map → chunk-HFOGKSNU.cjs.map} +1 -1
- package/dist/{chunk-IIOJFR73.cjs → chunk-UXDWH2JC.cjs} +56 -43
- package/dist/chunk-UXDWH2JC.cjs.map +1 -0
- package/dist/{chunk-6LQJUAD4.js → chunk-XEN5QIIJ.js} +6 -6
- package/dist/{chunk-6LQJUAD4.js.map → chunk-XEN5QIIJ.js.map} +1 -1
- package/dist/index.cjs +24 -24
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/interaction/index.cjs +780 -382
- package/dist/interaction/index.cjs.map +1 -1
- package/dist/interaction/index.d.cts +12 -3
- package/dist/interaction/index.d.ts +12 -3
- package/dist/interaction/index.js +562 -165
- package/dist/interaction/index.js.map +1 -1
- package/dist/{render-r1GYvjNm.d.cts → render-C5X74hds.d.cts} +75 -4
- package/dist/{render-r1GYvjNm.d.ts → render-C5X74hds.d.ts} +75 -4
- package/dist/{runtimeTypes-ByiafBwg.d.ts → runtimeTypes-D8hPZ62T.d.ts} +1 -1
- package/dist/{runtimeTypes-DwLeD-em.d.cts → runtimeTypes-yTSAvtCn.d.cts} +1 -1
- package/dist/stickyflow-diagram.global.js +37 -35
- package/dist/stickyflow-diagram.global.js.map +1 -1
- package/dist/{types-T7W2yTQF.d.cts → types-BDKDf4zr.d.cts} +1 -1
- package/dist/{types-ndGA1kbl.d.ts → types-CdgGdtoD.d.ts} +1 -1
- package/dist/viewer/index.cjs +9 -9
- package/dist/viewer/index.d.cts +4 -4
- package/dist/viewer/index.d.ts +4 -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-6JKNT2YC.js.map +0 -1
- package/dist/chunk-IIOJFR73.cjs.map +0 -1
- package/dist/chunk-KFJIFHXG.js.map +0 -1
- package/dist/chunk-N6WVHOUQ.js.map +0 -1
- package/dist/chunk-S5BVAAEF.cjs.map +0 -1
- package/dist/chunk-YM3XFBI4.cjs.map +0 -1
|
@@ -2813,12 +2813,12 @@ function radarValueAtPoint(frame, index, px, py) {
|
|
|
2813
2813
|
const ratio = frame.radius === 0 ? 0 : Math.max(0, Math.min(1, projected / frame.radius));
|
|
2814
2814
|
return frame.min + ratio * (frame.max - frame.min);
|
|
2815
2815
|
}
|
|
2816
|
-
function radarSeriesPath(points, curved) {
|
|
2816
|
+
function radarSeriesPath(points, curved, tension = CURVED_TENSION) {
|
|
2817
2817
|
if (points.length === 0) {
|
|
2818
2818
|
return "";
|
|
2819
2819
|
}
|
|
2820
2820
|
if (curved) {
|
|
2821
|
-
return freeformPathData({ points, tension
|
|
2821
|
+
return freeformPathData({ points, tension, closed: true });
|
|
2822
2822
|
}
|
|
2823
2823
|
const commands = points.map((point, index) => `${index ? "L " : ""}${point.x} ${point.y}`);
|
|
2824
2824
|
return `M ${commands.join(" ")} Z`;
|
|
@@ -3034,6 +3034,16 @@ function wrapText(text, width, fontSize, metrics) {
|
|
|
3034
3034
|
}
|
|
3035
3035
|
return result;
|
|
3036
3036
|
}
|
|
3037
|
+
function ellipsizeToWidth(text, width, fontSize, bold) {
|
|
3038
|
+
if (estimateTextWidth(text, fontSize, bold) <= width) {
|
|
3039
|
+
return text;
|
|
3040
|
+
}
|
|
3041
|
+
let end = text.length;
|
|
3042
|
+
while (end > 1 && estimateTextWidth(`${text.slice(0, end)}\u2026`, fontSize, bold) > width) {
|
|
3043
|
+
end -= 1;
|
|
3044
|
+
}
|
|
3045
|
+
return `${text.slice(0, end)}\u2026`;
|
|
3046
|
+
}
|
|
3037
3047
|
function estimateTextWidth(text, fontSize, bold) {
|
|
3038
3048
|
return text.length * fontSize * (bold ? BOLD_CHAR_FACTOR : PLAIN_CHAR_FACTOR);
|
|
3039
3049
|
}
|
|
@@ -3609,7 +3619,7 @@ function pieFillet(geometry, circleRadius, filletCenterRadius, edgeAngle, corner
|
|
|
3609
3619
|
function maxPieCornerRadius(outerRadius, innerRadius, sweep) {
|
|
3610
3620
|
const halfSweep = Math.min(Math.abs(sweep) / 2, Math.PI / 2);
|
|
3611
3621
|
const angleFactor = Math.sin(halfSweep * CORNER_ANGLE_HEADROOM);
|
|
3612
|
-
const outerLimit = outerRadius * angleFactor;
|
|
3622
|
+
const outerLimit = outerRadius * angleFactor / (1 + angleFactor);
|
|
3613
3623
|
const innerLimit = innerRadius > 0 ? innerRadius * angleFactor : Number.POSITIVE_INFINITY;
|
|
3614
3624
|
const ringLimit = innerRadius > 0 ? (outerRadius - innerRadius) / 2 : outerRadius / 2;
|
|
3615
3625
|
return Math.max(0, Math.min(outerLimit, innerLimit, ringLimit));
|
|
@@ -3617,7 +3627,7 @@ function maxPieCornerRadius(outerRadius, innerRadius, sweep) {
|
|
|
3617
3627
|
function maxApexCornerRadius(outerRadius, apexRadius, sweep) {
|
|
3618
3628
|
const halfSweep = Math.min(Math.abs(sweep) / 2, Math.PI / 2);
|
|
3619
3629
|
const angleFactor = Math.sin(halfSweep * CORNER_ANGLE_HEADROOM);
|
|
3620
|
-
const outerLimit = outerRadius * angleFactor;
|
|
3630
|
+
const outerLimit = outerRadius * angleFactor / (1 + angleFactor);
|
|
3621
3631
|
const depthLimit = (outerRadius * outerRadius - apexRadius * apexRadius) / (2 * outerRadius);
|
|
3622
3632
|
return Math.max(0, Math.min(outerLimit, depthLimit));
|
|
3623
3633
|
}
|
|
@@ -4680,6 +4690,6 @@ function localShapePath(type, x, y, width, height) {
|
|
|
4680
4690
|
}
|
|
4681
4691
|
}
|
|
4682
4692
|
|
|
4683
|
-
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_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, clipSegmentToRect, colorWithAlpha, computeBoxplotStats, contrastTextColor, cornersRoundedRectPath, createPieGeometry, createPieSlicePath, createVerticalErrorWhiskerNode, deriveFaceFills, edgePointToward, elementCenter, errorBarRange, estimateTextWidth, finite, formatBarLabel, formatFieldValue, freeformPathData, gapInsetAngle, getLineMidpoint, heuristicRichMeasure, horizontalRows, interpolateHexColorStops, isChartObject, isHorizontalBar, isIsometricObject, isLightColor, isPathObject, isSwimlaneObject, isometricBounds, isometricFaceCenter, isometricFaces, isometricTopFaceCenter, labelGapDash, leftRoundedRectPath, linePathData, localShapePath, mapChartValue, maxApexCornerRadius, maxPieCornerRadius, paint, parseSource, personLabelArea, pieApexRadius, pieArcPoint, pieUsesInnerArc, pillCornerRadius, pillPath, pointAtNormalizedPort, pointAtPort, radarCategoryCount, radarPointAt, radarRadius, radarRadiusForValue, radarSeriesPath, radarValueAtPoint, radarVertexPoint, relativeOffsetOnRectangleSide, renderPieLabels, representativeColor, resolveChartShadow, resolvePieRadii, rightRoundedRectPath, rotatedBounds, roundedBarPath, roundedOrthogonalPathData, roundedPolygonPath, rowTop, ruleAtProp, ruleTextProp, sameHueContrastColor, sameHueTint, segmentedBarPath, seriesColorProp, seriesLabelOffsetXProp, seriesLabelOffsetYProp, seriesLabelProp, seriesValueColorProp, seriesValueProp, sflToCanvasState, stackRank, stackSequence, stackedSegment, tag, tokenizeSource, topRoundedRectPath, wrapText, zoneColorAtValue };
|
|
4684
|
-
//# sourceMappingURL=chunk-
|
|
4685
|
-
//# sourceMappingURL=chunk-
|
|
4693
|
+
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_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, clipSegmentToRect, colorWithAlpha, computeBoxplotStats, contrastTextColor, cornersRoundedRectPath, createPieGeometry, createPieSlicePath, createVerticalErrorWhiskerNode, deriveFaceFills, edgePointToward, elementCenter, ellipsizeToWidth, errorBarRange, estimateTextWidth, finite, formatBarLabel, formatFieldValue, freeformPathData, gapInsetAngle, getLineMidpoint, heuristicRichMeasure, horizontalRows, interpolateHexColorStops, isChartObject, isHorizontalBar, isIsometricObject, isLightColor, isPathObject, isSwimlaneObject, isometricBounds, isometricFaceCenter, isometricFaces, isometricTopFaceCenter, labelGapDash, leftRoundedRectPath, linePathData, localShapePath, mapChartValue, maxApexCornerRadius, maxPieCornerRadius, paint, parseSource, personLabelArea, pieApexRadius, pieArcPoint, pieUsesInnerArc, pillCornerRadius, pillPath, pointAtNormalizedPort, pointAtPort, radarCategoryCount, radarPointAt, radarRadius, radarRadiusForValue, radarSeriesPath, radarValueAtPoint, radarVertexPoint, relativeOffsetOnRectangleSide, renderPieLabels, representativeColor, resolveChartShadow, resolvePieRadii, rightRoundedRectPath, rotatedBounds, roundedBarPath, roundedOrthogonalPathData, roundedPolygonPath, rowTop, ruleAtProp, ruleTextProp, sameHueContrastColor, sameHueTint, segmentedBarPath, seriesColorProp, seriesLabelOffsetXProp, seriesLabelOffsetYProp, seriesLabelProp, seriesValueColorProp, seriesValueProp, sflToCanvasState, stackRank, stackSequence, stackedSegment, tag, tokenizeSource, topRoundedRectPath, wrapText, zoneColorAtValue };
|
|
4694
|
+
//# sourceMappingURL=chunk-BYMIYXP5.js.map
|
|
4695
|
+
//# sourceMappingURL=chunk-BYMIYXP5.js.map
|