stickyflow 0.8.0 → 0.9.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 +11 -0
- package/README.md +1 -1
- 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-XPM3E7NV.cjs → chunk-B3YRZVMR.cjs} +23 -23
- package/dist/chunk-B3YRZVMR.cjs.map +1 -0
- package/dist/{chunk-CZW3ARXQ.js → chunk-BUVUJMWT.js} +5 -5
- package/dist/chunk-BUVUJMWT.js.map +1 -0
- package/dist/{chunk-LFEGZJWC.js → chunk-CM35H45Z.js} +3 -3
- package/dist/{chunk-LFEGZJWC.js.map → chunk-CM35H45Z.js.map} +1 -1
- package/dist/{chunk-GLZVHUSW.js → chunk-D2266VBZ.js} +393 -5
- package/dist/chunk-D2266VBZ.js.map +1 -0
- package/dist/{chunk-MAPNY7MJ.js → chunk-FS6L462E.js} +128 -15
- package/dist/chunk-FS6L462E.js.map +1 -0
- package/dist/{chunk-FQ7GMLCM.cjs → chunk-OUWGWDJ2.cjs} +15 -15
- package/dist/{chunk-FQ7GMLCM.cjs.map → chunk-OUWGWDJ2.cjs.map} +1 -1
- package/dist/{chunk-LNW5VIEA.cjs → chunk-QL7MNEMT.cjs} +393 -4
- package/dist/chunk-QL7MNEMT.cjs.map +1 -0
- package/dist/{chunk-IR2T47NW.cjs → chunk-SQBF2BKT.cjs} +257 -75
- package/dist/chunk-SQBF2BKT.cjs.map +1 -0
- package/dist/{chunk-VOYX6JMW.cjs → chunk-YSXD5IVZ.cjs} +778 -665
- package/dist/chunk-YSXD5IVZ.cjs.map +1 -0
- package/dist/{chunk-EDOPENSE.js → chunk-ZCGZJBAT.js} +228 -46
- package/dist/chunk-ZCGZJBAT.js.map +1 -0
- package/dist/index.cjs +36 -36
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/interaction/index.cjs +232 -230
- 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 +4 -2
- package/dist/interaction/index.js.map +1 -1
- package/dist/{render-Bp2FLEzv.d.cts → render-DU4lYbRl.d.cts} +19 -11
- package/dist/{render-Bp2FLEzv.d.ts → render-DU4lYbRl.d.ts} +19 -11
- package/dist/{runtime-DIag-XBa.d.cts → runtime-DG8X3Fwf.d.cts} +2 -2
- package/dist/{runtime-CWIGxRcL.d.ts → runtime-kqD1RS17.d.ts} +2 -2
- package/dist/{runtimeTypes-C7sSLfOK.d.ts → runtimeTypes-CvjlBZds.d.cts} +7 -3
- package/dist/{runtimeTypes-BYODuxHk.d.cts → runtimeTypes-vRaHOIHi.d.ts} +7 -3
- package/dist/stickyflow-diagram.global.js +192 -40
- package/dist/stickyflow-diagram.global.js.map +1 -1
- package/dist/{types-D2w6D_wG.d.cts → types-B5jrEEcF.d.cts} +1 -1
- package/dist/{types-B9QM_H3R.d.ts → types-B7IkZ0w4.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-CZW3ARXQ.js.map +0 -1
- package/dist/chunk-EDOPENSE.js.map +0 -1
- package/dist/chunk-GLZVHUSW.js.map +0 -1
- package/dist/chunk-IR2T47NW.cjs.map +0 -1
- package/dist/chunk-LNW5VIEA.cjs.map +0 -1
- package/dist/chunk-MAPNY7MJ.js.map +0 -1
- package/dist/chunk-VOYX6JMW.cjs.map +0 -1
- package/dist/chunk-XPM3E7NV.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { componentRegistryVersion, isDimensionObject, isIsometricObject, sflToCanvasState, registerComponentDescriptor, isBuiltInComponentType, getComponentDescriptor, tag, EMPTY_BOUNDS, DOM_CONTRACT_VERSION, edgePointToward, elementCenter, VISIBLE_ISOMETRIC_FACES, isometricFaceCenter, finite, freeformPathData, rotatedBounds, DEFAULT_FONT, isGenericComponent, cleanFootprint, pointAtNormalizedPort, boxBounds, cornersRoundedRectPath, calculateLinkRoute, labelGapDash, getLineMidpoint, personLabelArea, wrapText, heuristicRichMeasure, shadeFill, extrudeFootprint, isometricFaces, roundedPolygonPath, stackSequence, stackRank, topRoundedRectPath, rightRoundedRectPath, leftRoundedRectPath, bottomRoundedRectPath, isHorizontalBar, paint, CHART_TITLE_PROP, chartText, chartTicks, mapChartValue, roundedOrthogonalPathData, localShapePath, pillCornerRadius, isometricBounds, AXIS_SIN, deriveFaceFills, labelTilt, tiltedLabelRoom, resolveChartShadow, CHART_COLORS, angleForAxisValue, horizontalRows, rowTop, categoryProp, isometricTopFaceCenter, ISOMETRIC_SIZE_ATTR, CORNER_RADIUS_ATTR, ISOMETRIC_LABEL_OFFSET_ATTR, PATH_POINTS_ATTR, PATH_TENSION_ATTR, PATH_CLOSED_ATTR, SYMBOL_BOUNDS_ATTR, SYMBOL_POINTS_ATTR, SYMBOL_TENSION_ATTR, SQUARE_CORNER_ATTR, resolvePieRadii, radarCategoryCount, radarRadius, createPieGeometry, DEFAULT_HEX_RADIUS, DEFAULT_HEATMAP_ZONES, axisBands, DEFAULT_ZONE_FILL, representativeColor, computeBoxplotStats, barCategoryCount, ruleAtProp, ruleTextProp, labelBelowFrame, seriesLabelProp, axisLabelProp, seriesColorProp, seriesValueProp, radarSeriesPath, radarRadiusForValue, createPieSlicePath, clipSegmentToRect, formatFieldValue, renderPieLabels, interpolateHexColorStops, contrastTextColor, sameHueTint, isLightColor, barShapePath, linePathData, colorWithAlpha, estimateTextWidth, segmentedBarPath, roundedBarPath, radarPointAt, gapInsetAngle, pieUsesInnerArc, maxPieCornerRadius, pieApexRadius, maxApexCornerRadius, pieArcPoint, sameHueContrastColor, zoneColorAtValue, ellipsizeToWidth, barPath, labelAboveFrame, seriesValueColorProp, stackedSegment, errorBarRange, createVerticalErrorWhiskerNode, formatBarLabel, barLabelSize, CATEGORY_LABEL_ROW, BAR_LABEL, pillPath, resolveRollingNumberStyle, formatRollingNumber } from './chunk-
|
|
1
|
+
import { componentRegistryVersion, isDimensionObject, isIsometricObject, sflToCanvasState, registerComponentDescriptor, isBuiltInComponentType, getComponentDescriptor, tag, EMPTY_BOUNDS, DOM_CONTRACT_VERSION, edgePointToward, elementCenter, VISIBLE_ISOMETRIC_FACES, isometricFaceCenter, finite, freeformPathData, rotatedBounds, DEFAULT_FONT, isGenericComponent, cleanFootprint, pointAtNormalizedPort, boxBounds, cornersRoundedRectPath, calculateLinkRoute, labelGapDash, getLineMidpoint, personLabelArea, wrapText, heuristicRichMeasure, shadeFill, extrudeFootprint, isometricFaces, roundedPolygonPath, stackSequence, stackRank, topRoundedRectPath, rightRoundedRectPath, leftRoundedRectPath, bottomRoundedRectPath, isHorizontalBar, paint, CHART_TITLE_PROP, chartText, chartTicks, mapChartValue, roundedOrthogonalPathData, localShapePath, pillCornerRadius, isometricBounds, AXIS_SIN, deriveFaceFills, labelTilt, tiltedLabelRoom, resolveChartShadow, CHART_COLORS, angleForAxisValue, horizontalRows, rowTop, categoryProp, isometricTopFaceCenter, ISOMETRIC_SIZE_ATTR, CORNER_RADIUS_ATTR, ISOMETRIC_LABEL_OFFSET_ATTR, PATH_POINTS_ATTR, PATH_TENSION_ATTR, PATH_CLOSED_ATTR, SYMBOL_BOUNDS_ATTR, SYMBOL_POINTS_ATTR, SYMBOL_TENSION_ATTR, SQUARE_CORNER_ATTR, resolvePieRadii, radarCategoryCount, radarRadius, createPieGeometry, DEFAULT_HEX_RADIUS, DEFAULT_HEATMAP_ZONES, axisBands, DEFAULT_ZONE_FILL, representativeColor, computeBoxplotStats, barCategoryCount, ruleAtProp, ruleTextProp, labelBelowFrame, seriesLabelProp, axisLabelProp, seriesColorProp, seriesValueProp, radarSeriesPath, radarRadiusForValue, createPieSlicePath, clipSegmentToRect, formatFieldValue, renderPieLabels, interpolateHexColorStops, contrastTextColor, sameHueTint, isLightColor, barShapePath, linePathData, colorWithAlpha, estimateTextWidth, segmentedBarPath, roundedBarPath, radarPointAt, gapInsetAngle, pieUsesInnerArc, maxPieCornerRadius, pieApexRadius, maxApexCornerRadius, pieArcPoint, sameHueContrastColor, zoneColorAtValue, ellipsizeToWidth, barPath, labelAboveFrame, seriesValueColorProp, stackedSegment, errorBarRange, createVerticalErrorWhiskerNode, formatBarLabel, barLabelSize, CATEGORY_LABEL_ROW, BAR_LABEL, pillPath, resolveRollingNumberStyle, formatRollingNumber } from './chunk-D2266VBZ.js';
|
|
2
2
|
|
|
3
3
|
// src/renderInput/styleDecoding/colorToken.ts
|
|
4
4
|
var COLOR_TOKEN_PATTERN = String.raw`rgba?\([^)]*\)|#[0-9a-fA-F]+|[a-zA-Z][\w-]*`;
|
|
@@ -161,6 +161,23 @@ var PATH_TYPES = ["straight", "curved", "orthogonal"];
|
|
|
161
161
|
function optionalOneOf(value, allowed) {
|
|
162
162
|
return value !== void 0 && allowed.includes(value) ? value : void 0;
|
|
163
163
|
}
|
|
164
|
+
var BLEND_MODES = [
|
|
165
|
+
"multiply",
|
|
166
|
+
"screen",
|
|
167
|
+
"overlay",
|
|
168
|
+
"darken",
|
|
169
|
+
"lighten",
|
|
170
|
+
"color-dodge",
|
|
171
|
+
"color-burn",
|
|
172
|
+
"hard-light",
|
|
173
|
+
"soft-light",
|
|
174
|
+
"difference",
|
|
175
|
+
"exclusion",
|
|
176
|
+
"hue",
|
|
177
|
+
"saturation",
|
|
178
|
+
"color",
|
|
179
|
+
"luminosity"
|
|
180
|
+
];
|
|
164
181
|
var SHAPE_STROKE_STYLES = ["solid", "dashed", "dotted", "double"];
|
|
165
182
|
var MARKER_TYPES = [
|
|
166
183
|
"none",
|
|
@@ -896,6 +913,7 @@ function frameObject(e) {
|
|
|
896
913
|
showLabel: p.showLabel !== "false",
|
|
897
914
|
labelPosition: oneOf(p.labelPosition, LABEL_POSITIONS, "top"),
|
|
898
915
|
shadow: p.shadow !== "false",
|
|
916
|
+
clip: p.clip === "true" || void 0,
|
|
899
917
|
order: e.order,
|
|
900
918
|
sourceIndex: e.sourceIndex
|
|
901
919
|
};
|
|
@@ -923,6 +941,7 @@ function isometricObject(canvasObject) {
|
|
|
923
941
|
strokeColor: solidColor(presentation.stroke) ?? "#111827",
|
|
924
942
|
strokeWidth: numOf(presentation.strokeWidth) ?? 1,
|
|
925
943
|
cornerRadius: numOf(presentation.cornerRadius) ?? (canvasObject.isometric.footprint ? 0 : 8),
|
|
944
|
+
seams: presentation.seams === "false" ? false : void 0,
|
|
926
945
|
hasShadow: shadowStyle?.enabled ?? false,
|
|
927
946
|
shadowStyle,
|
|
928
947
|
labelOffsetX: numOf(presentation.labelOffsetX) ?? 0,
|
|
@@ -1027,6 +1046,8 @@ function shapeObject(e, shaders) {
|
|
|
1027
1046
|
dash: dashArray(p.dash),
|
|
1028
1047
|
strokeStyle: optionalOneOf(p.strokeStyle, SHAPE_STROKE_STYLES),
|
|
1029
1048
|
opacity: numOf(p.opacity),
|
|
1049
|
+
blur: numOf(p.blur),
|
|
1050
|
+
blend: optionalOneOf(p.blend, BLEND_MODES),
|
|
1030
1051
|
parentFrameId: e.parentFrameId,
|
|
1031
1052
|
order: e.order,
|
|
1032
1053
|
sourceIndex: e.sourceIndex,
|
|
@@ -2957,10 +2978,10 @@ function buildBox(object, index) {
|
|
|
2957
2978
|
const hullPath = roundedPolygonPath(silhouette(object), cornerRadius);
|
|
2958
2979
|
const hullClip = { type: "path", d: hullPath };
|
|
2959
2980
|
const groundShadow = groundShadowNode(context, faces.top);
|
|
2960
|
-
const seams = seamsNode(context, faces, hullClip);
|
|
2981
|
+
const seams = object.seams === false ? void 0 : seamsNode(context, faces, hullClip);
|
|
2961
2982
|
const hull = hullNode(context, hullPath, cornerRadius);
|
|
2962
2983
|
const facesNodes = faceNodes(context, faces, hullClip);
|
|
2963
|
-
const objectNodes = groundShadow ? [hull, ...facesNodes, groundShadow, seams] : [hull, ...facesNodes, seams];
|
|
2984
|
+
const objectNodes = groundShadow ? [hull, ...facesNodes, groundShadow, ...seams ? [seams] : []] : [hull, ...facesNodes, ...seams ? [seams] : []];
|
|
2964
2985
|
return object.text ? [...objectNodes, ...labelNodes(context, object.text)] : objectNodes;
|
|
2965
2986
|
}
|
|
2966
2987
|
|
|
@@ -3553,7 +3574,8 @@ var RECT_PROGRAMS = /* @__PURE__ */ new Set([
|
|
|
3553
3574
|
"ledMatrix",
|
|
3554
3575
|
"lightBand",
|
|
3555
3576
|
"silkFolds",
|
|
3556
|
-
"glowCard"
|
|
3577
|
+
"glowCard",
|
|
3578
|
+
"glassDots"
|
|
3557
3579
|
]);
|
|
3558
3580
|
function shaderMask(context) {
|
|
3559
3581
|
if (context.shape.shapeType === "circle" || context.shape.shapeType === "oval") {
|
|
@@ -3664,6 +3686,8 @@ function shapeStyle(shape, diagnostics) {
|
|
|
3664
3686
|
dash: shapeDash(shape, strokeWidth),
|
|
3665
3687
|
lineCap: shape.strokeStyle === "dotted" ? "round" : "butt",
|
|
3666
3688
|
opacity: finite(shape.opacity, defaults.opacity),
|
|
3689
|
+
blur: shape.blur !== void 0 && shape.blur > 0 ? shape.blur : void 0,
|
|
3690
|
+
blend: shape.blend,
|
|
3667
3691
|
shadow: shadow?.enabled ? {
|
|
3668
3692
|
color: shadow.color ?? "#000000",
|
|
3669
3693
|
opacity: finite(shadow.opacity, 0.25),
|
|
@@ -9473,6 +9497,86 @@ function buildCharts(charts, diagnostics) {
|
|
|
9473
9497
|
);
|
|
9474
9498
|
}
|
|
9475
9499
|
|
|
9500
|
+
// src/renderScene/scene/frameClip.ts
|
|
9501
|
+
var ARC_STEPS = 8;
|
|
9502
|
+
function turnOf(node) {
|
|
9503
|
+
const turned = node;
|
|
9504
|
+
if (!turned.rotation) {
|
|
9505
|
+
return void 0;
|
|
9506
|
+
}
|
|
9507
|
+
if (turned.rotationCenter) {
|
|
9508
|
+
return { angle: turned.rotation, x: turned.rotationCenter.x, y: turned.rotationCenter.y };
|
|
9509
|
+
}
|
|
9510
|
+
if (turned.cx !== void 0 && turned.cy !== void 0) {
|
|
9511
|
+
return { angle: turned.rotation, x: turned.cx, y: turned.cy };
|
|
9512
|
+
}
|
|
9513
|
+
if (turned.x !== void 0 && turned.y !== void 0 && turned.width !== void 0 && turned.height !== void 0) {
|
|
9514
|
+
return { angle: turned.rotation, x: turned.x + turned.width / 2, y: turned.y + turned.height / 2 };
|
|
9515
|
+
}
|
|
9516
|
+
return void 0;
|
|
9517
|
+
}
|
|
9518
|
+
function roundedRectPoints(frame) {
|
|
9519
|
+
const { x, y, width, height } = frame;
|
|
9520
|
+
const r = Math.max(0, Math.min(frame.cornerRadius, width / 2, height / 2));
|
|
9521
|
+
if (r === 0) {
|
|
9522
|
+
return [
|
|
9523
|
+
[x, y],
|
|
9524
|
+
[x + width, y],
|
|
9525
|
+
[x + width, y + height],
|
|
9526
|
+
[x, y + height]
|
|
9527
|
+
];
|
|
9528
|
+
}
|
|
9529
|
+
const corners = [
|
|
9530
|
+
[x + width - r, y + r, -90],
|
|
9531
|
+
[x + width - r, y + height - r, 0],
|
|
9532
|
+
[x + r, y + height - r, 90],
|
|
9533
|
+
[x + r, y + r, 180]
|
|
9534
|
+
];
|
|
9535
|
+
return corners.flatMap(
|
|
9536
|
+
([cx, cy, start]) => Array.from({ length: ARC_STEPS + 1 }, (_, step) => {
|
|
9537
|
+
const angle = (start + 90 * step / ARC_STEPS) * Math.PI / 180;
|
|
9538
|
+
return [cx + r * Math.cos(angle), cy + r * Math.sin(angle)];
|
|
9539
|
+
})
|
|
9540
|
+
);
|
|
9541
|
+
}
|
|
9542
|
+
function clipFor(frame, turn) {
|
|
9543
|
+
if (!turn) {
|
|
9544
|
+
return { type: "rect", x: frame.x, y: frame.y, width: frame.width, height: frame.height, rx: frame.cornerRadius };
|
|
9545
|
+
}
|
|
9546
|
+
const back = -turn.angle * Math.PI / 180;
|
|
9547
|
+
const cos = Math.cos(back);
|
|
9548
|
+
const sin = Math.sin(back);
|
|
9549
|
+
const points = roundedRectPoints(frame).map(([px, py]) => {
|
|
9550
|
+
const dx = px - turn.x;
|
|
9551
|
+
const dy = py - turn.y;
|
|
9552
|
+
return [turn.x + dx * cos - dy * sin, turn.y + dx * sin + dy * cos];
|
|
9553
|
+
});
|
|
9554
|
+
const round2 = (value) => Math.round(value * 100) / 100;
|
|
9555
|
+
return { type: "path", d: `M${points.map(([px, py]) => `${round2(px)} ${round2(py)}`).join("L")}Z` };
|
|
9556
|
+
}
|
|
9557
|
+
function applyFrameClips(nodes, frames) {
|
|
9558
|
+
const clipping = new Map(frames.filter((frame) => frame.clip).map((frame) => [frame.id, frame]));
|
|
9559
|
+
if (clipping.size === 0) {
|
|
9560
|
+
return;
|
|
9561
|
+
}
|
|
9562
|
+
const inside = /* @__PURE__ */ new Map();
|
|
9563
|
+
for (const node of nodes) {
|
|
9564
|
+
const parent = node.identity?.parentFrameId;
|
|
9565
|
+
const frame = parent ? clipping.get(parent) : void 0;
|
|
9566
|
+
if (node.identity && frame) {
|
|
9567
|
+
inside.set(`${node.identity.role}:${node.identity.id}`, frame);
|
|
9568
|
+
}
|
|
9569
|
+
}
|
|
9570
|
+
for (const node of nodes) {
|
|
9571
|
+
const frame = node.identity ? inside.get(`${node.identity.role}:${node.identity.id}`) : void 0;
|
|
9572
|
+
const styled = node;
|
|
9573
|
+
if (frame && styled.style) {
|
|
9574
|
+
const edge = clipFor(frame, turnOf(node));
|
|
9575
|
+
styled.style = { ...styled.style, clip: styled.style.clip ? { ...styled.style.clip, within: edge } : edge };
|
|
9576
|
+
}
|
|
9577
|
+
}
|
|
9578
|
+
}
|
|
9579
|
+
|
|
9476
9580
|
// src/renderScene/scene/build.ts
|
|
9477
9581
|
function sceneBounds(nodes) {
|
|
9478
9582
|
if (!nodes.length) {
|
|
@@ -9531,6 +9635,7 @@ function buildRenderScene(input, options = {}) {
|
|
|
9531
9635
|
...buildIsometricObjects(input.isometricObjects ?? []),
|
|
9532
9636
|
...buildDimensions(input.dimensions ?? [])
|
|
9533
9637
|
];
|
|
9638
|
+
applyFrameClips(nodes, input.frames);
|
|
9534
9639
|
stampStacking(nodes, input);
|
|
9535
9640
|
nodes.sort(
|
|
9536
9641
|
(a, b) => (a.rank ?? 0) - (b.rank ?? 0) || (a.sequence ?? 0) - (b.sequence ?? 0) || a.order - b.order || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0)
|
|
@@ -9553,17 +9658,17 @@ var SvgClipDefinitions = class {
|
|
|
9553
9658
|
prefix;
|
|
9554
9659
|
ids = /* @__PURE__ */ new Map();
|
|
9555
9660
|
clip(style) {
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
const key = JSON.stringify(
|
|
9661
|
+
return style.clip ? this.define(style.clip) : void 0;
|
|
9662
|
+
}
|
|
9663
|
+
define(clip) {
|
|
9664
|
+
const key = JSON.stringify(clip);
|
|
9560
9665
|
let id = this.ids.get(key);
|
|
9561
9666
|
if (!id) {
|
|
9667
|
+
const outer = clip.within ? this.define(clip.within) : void 0;
|
|
9562
9668
|
id = safeId(`${this.prefix}clip-${this.ids.size}`);
|
|
9563
9669
|
this.ids.set(key, id);
|
|
9564
|
-
const clip = style.clip;
|
|
9565
9670
|
const shape = clip.type === "path" ? `<path clip-rule="evenodd" d="${xml(clip.d)}"/>` : `<rect x="${num(clip.x)}" y="${num(clip.y)}" width="${num(clip.width)}" height="${num(clip.height)}" rx="${num(clip.rx)}"/>`;
|
|
9566
|
-
this.addDefinition(`<clipPath id="${id}">${shape}</clipPath>`);
|
|
9671
|
+
this.addDefinition(`<clipPath id="${id}"${outer ? ` clip-path="url(#${outer})"` : ""}>${shape}</clipPath>`);
|
|
9567
9672
|
}
|
|
9568
9673
|
return id;
|
|
9569
9674
|
}
|
|
@@ -9592,7 +9697,8 @@ var SvgFilterDefinitions = class {
|
|
|
9592
9697
|
);
|
|
9593
9698
|
}
|
|
9594
9699
|
if (style.blur || style.saturate !== void 0) {
|
|
9595
|
-
|
|
9700
|
+
const margin = size && size > 0 && style.blur ? Math.max(0.5, style.blur * 1.5 / size) : 0.5;
|
|
9701
|
+
return this.define(nodeId, { blur: style.blur ?? 0, saturate: style.saturate ?? 1 }, blurPrimitives, margin);
|
|
9596
9702
|
}
|
|
9597
9703
|
return void 0;
|
|
9598
9704
|
}
|
|
@@ -9839,12 +9945,19 @@ function addStrokeAttrs(attrs, style) {
|
|
|
9839
9945
|
if (style.pointerEvents) {
|
|
9840
9946
|
attrs.push(`pointer-events="${style.pointerEvents}"`);
|
|
9841
9947
|
}
|
|
9948
|
+
const css = [];
|
|
9842
9949
|
if (style.transition && style.transition > 0) {
|
|
9843
9950
|
const time = `${num(style.transition)}ms ease`;
|
|
9844
|
-
|
|
9845
|
-
`
|
|
9951
|
+
css.push(
|
|
9952
|
+
`transition: x ${time}, y ${time}, width ${time}, height ${time}, cx ${time}, cy ${time}, rx ${time}, ry ${time}, fill ${time}, stroke ${time}, stroke-width ${time}, stroke-dasharray ${time}, opacity ${time}`
|
|
9846
9953
|
);
|
|
9847
9954
|
}
|
|
9955
|
+
if (style.blend) {
|
|
9956
|
+
css.push(`mix-blend-mode: ${xml(style.blend)}`);
|
|
9957
|
+
}
|
|
9958
|
+
if (css.length > 0) {
|
|
9959
|
+
attrs.push(`style="${css.join("; ")}"`);
|
|
9960
|
+
}
|
|
9848
9961
|
}
|
|
9849
9962
|
function elementSize(node) {
|
|
9850
9963
|
const shape = node;
|
|
@@ -10212,5 +10325,5 @@ function defineComponent(definition) {
|
|
|
10212
10325
|
}
|
|
10213
10326
|
|
|
10214
10327
|
export { collectCanvasObjects, decodeColor, decodeShadow, defineComponent, render, renderCanvas, sflToRenderInput, sliderReach };
|
|
10215
|
-
//# sourceMappingURL=chunk-
|
|
10216
|
-
//# sourceMappingURL=chunk-
|
|
10328
|
+
//# sourceMappingURL=chunk-FS6L462E.js.map
|
|
10329
|
+
//# sourceMappingURL=chunk-FS6L462E.js.map
|