@weasel-js/diagram 1.12.0 → 1.13.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/README.md +1 -1
- package/dist/{chunk-DYDX6EJC.js → chunk-ESFIS7BB.js} +23 -18
- package/dist/chunk-ESFIS7BB.js.map +1 -0
- package/dist/{chunk-5GIP2LA6.js → chunk-FAQXYGMX.js} +3 -3
- package/dist/{chunk-5GIP2LA6.js.map → chunk-FAQXYGMX.js.map} +1 -1
- package/dist/{chunk-R2XB6D32.js → chunk-L4H444QI.js} +10 -9
- package/dist/chunk-L4H444QI.js.map +1 -0
- package/dist/{chunk-2SYY4W3B.js → chunk-QU4QZUC6.js} +16 -16
- package/dist/chunk-QU4QZUC6.js.map +1 -0
- package/dist/{chunk-GA4BX7SH.js → chunk-Y72FK3Y7.js} +3 -3
- package/dist/{chunk-GA4BX7SH.js.map → chunk-Y72FK3Y7.js.map} +1 -1
- package/dist/{dataTypes-DHdkzCL8.d.ts → dataTypes-DW-MljuN.d.ts} +1 -1
- package/dist/effect-audio.js +3 -3
- package/dist/effect.d.ts +2 -2
- package/dist/effect.js +9 -9
- package/dist/effect.js.map +1 -1
- package/dist/index.d.ts +18 -17
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +2 -2
- package/dist/{layout.entry-B-jJMc50.d.ts → layout.entry-CQoPNfzA.d.ts} +2 -5
- package/dist/layout.js +2 -2
- package/dist/{types-M_ccNAlk.d.ts → types-vbW21fHm.d.ts} +3 -3
- package/package.json +9 -9
- package/dist/chunk-2SYY4W3B.js.map +0 -1
- package/dist/chunk-DYDX6EJC.js.map +0 -1
- package/dist/chunk-R2XB6D32.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { grownBy, labelCenter, diagramEdgeOf, DIAGRAM_TRAIT_KEY, insetOf, subpathOf, portsOf, portSitesOf, routeHolds, sizeToBody, measureBody, layoutBody, layoutOwnsRoute, diagramNodeOf, expandGroupEdges, DEFAULT_GROUP_INSET, bodyTrait, authoredOver, chain, force, tree, layered, planOf, buildBody } from './chunk-
|
|
1
|
+
import { grownBy, labelCenter, diagramEdgeOf, DIAGRAM_TRAIT_KEY, insetOf, subpathOf, portsOf, portSitesOf, routeHolds, sizeToBody, measureBody, layoutBody, layoutOwnsRoute, diagramNodeOf, expandGroupEdges, DEFAULT_GROUP_INSET, bodyTrait, authoredOver, chain, force, tree, layered, planOf, buildBody } from './chunk-L4H444QI.js';
|
|
2
2
|
import { bodyPredicate, AUTO_POSE_DESCRIPTOR, translatePoseViaDescriptor, createTransformOp, polylineFromPoints, PathBuilder, documentDepOf, documentPose, composeAffordanceLayer, ActionDisabledReason, pageName, pageOfBounds, layoutPages, RECT_POSE_DESCRIPTOR, resolveFill, resolveStroke, commandFill, commandStroke, transformPath, registerNodeShape, pathFromD } from '@weasel-js/core';
|
|
3
3
|
import { PathBuilder as PathBuilder$1, polylineFromPoints as polylineFromPoints$1, portCurvePoints } from '@weasel-js/geom';
|
|
4
4
|
import { AUTO_POSE_DESCRIPTOR as AUTO_POSE_DESCRIPTOR$1 } from '@weasel-js/core/math';
|
|
@@ -356,7 +356,7 @@ function edgeLabelSpec(edgeId, text, opts) {
|
|
|
356
356
|
const style = opts.style ?? LABEL_STYLE;
|
|
357
357
|
return {
|
|
358
358
|
id: `${edgeId}/label`,
|
|
359
|
-
kind: "
|
|
359
|
+
kind: "mark",
|
|
360
360
|
layer: opts.layer,
|
|
361
361
|
pickable: false,
|
|
362
362
|
pose: { x: 0, y: 0, ...labelSize(text, style, opts.measure) },
|
|
@@ -409,7 +409,7 @@ function editEdgeLabelAction(opts = {}) {
|
|
|
409
409
|
label: "Edit edge label",
|
|
410
410
|
group: "diagram",
|
|
411
411
|
requires: ["scene", "nodeAtPoint", "textEdit"],
|
|
412
|
-
eligible: { mode:
|
|
412
|
+
eligible: { mode: "normal" },
|
|
413
413
|
invoker: {
|
|
414
414
|
timing: "immediate",
|
|
415
415
|
run(deps, params) {
|
|
@@ -651,7 +651,7 @@ function offPageTagData(edgeId, end, text, look) {
|
|
|
651
651
|
function offPageTagSpec(edgeId, end, text, look) {
|
|
652
652
|
return {
|
|
653
653
|
id: offPageTagId(edgeId, end),
|
|
654
|
-
kind: "
|
|
654
|
+
kind: "mark",
|
|
655
655
|
layer: look.layer,
|
|
656
656
|
pose: { x: 0, y: 0, ...offPageTagSize(text, look) },
|
|
657
657
|
data: offPageTagData(edgeId, end, text, look),
|
|
@@ -1014,7 +1014,7 @@ function regionSpecs(role, axis, pose, title, opts) {
|
|
|
1014
1014
|
const { layout, header } = containerShape(role, axis);
|
|
1015
1015
|
const region = {
|
|
1016
1016
|
id: opts.id,
|
|
1017
|
-
kind: "
|
|
1017
|
+
kind: "mark",
|
|
1018
1018
|
layer: opts.layer,
|
|
1019
1019
|
pose,
|
|
1020
1020
|
parent: opts.parent ?? null,
|
|
@@ -1024,7 +1024,7 @@ function regionSpecs(role, axis, pose, title, opts) {
|
|
|
1024
1024
|
if (title === null) return [region];
|
|
1025
1025
|
return [region, {
|
|
1026
1026
|
id: titleIdOf(opts.id),
|
|
1027
|
-
kind: "
|
|
1027
|
+
kind: "mark",
|
|
1028
1028
|
layer: opts.layer,
|
|
1029
1029
|
parent: opts.id,
|
|
1030
1030
|
pickable: false,
|
|
@@ -1363,13 +1363,13 @@ function markShape(opts = {}) {
|
|
|
1363
1363
|
return {
|
|
1364
1364
|
id: "diagram:mark",
|
|
1365
1365
|
matches: (node) => diagramMarkOf(node) !== null,
|
|
1366
|
-
paint: (node, pose) => {
|
|
1366
|
+
paint: (node, pose, ctx) => {
|
|
1367
1367
|
const mark = diagramMarkOf(node);
|
|
1368
1368
|
if (mark === null) return [];
|
|
1369
1369
|
const box = geometry.getBounds(pose);
|
|
1370
1370
|
const d = node.data;
|
|
1371
|
-
const declaredFill = resolveFill(d.fill);
|
|
1372
|
-
const declaredStroke = resolveStroke(d.stroke);
|
|
1371
|
+
const declaredFill = resolveFill(d.fill, ctx?.inherited?.fill);
|
|
1372
|
+
const declaredStroke = resolveStroke(d.stroke, ctx?.inherited?.stroke);
|
|
1373
1373
|
const fill = declaredFill && commandFill(declaredFill, box);
|
|
1374
1374
|
const stroke = declaredStroke && commandStroke(declaredStroke, box);
|
|
1375
1375
|
return [{
|
|
@@ -1393,7 +1393,7 @@ function markSpecs(nodeId, marks, box, ctx) {
|
|
|
1393
1393
|
const stroke = mark.stroke ?? (mark.fill === void 0 ? ctx.style.stroke : void 0);
|
|
1394
1394
|
return {
|
|
1395
1395
|
id,
|
|
1396
|
-
kind: "
|
|
1396
|
+
kind: "mark",
|
|
1397
1397
|
layer: "main",
|
|
1398
1398
|
parent: nodeId,
|
|
1399
1399
|
pickable: false,
|
|
@@ -1409,7 +1409,7 @@ function markSpecs(nodeId, marks, box, ctx) {
|
|
|
1409
1409
|
const self = mark.self ?? mark.at;
|
|
1410
1410
|
return {
|
|
1411
1411
|
id,
|
|
1412
|
-
kind: "
|
|
1412
|
+
kind: "mark",
|
|
1413
1413
|
layer: "main",
|
|
1414
1414
|
pickable: false,
|
|
1415
1415
|
pose: {
|
|
@@ -1739,7 +1739,7 @@ function groupSpecs(groups, placedAt, styleOf, wireLabels2 = []) {
|
|
|
1739
1739
|
const { x, y, width, height } = boxes.get(g.group.id);
|
|
1740
1740
|
specs.push({
|
|
1741
1741
|
id: g.group.id,
|
|
1742
|
-
kind: "
|
|
1742
|
+
kind: "mark",
|
|
1743
1743
|
layer: "main",
|
|
1744
1744
|
pose: { x, y, width, height },
|
|
1745
1745
|
data: {
|
|
@@ -1765,7 +1765,7 @@ function groupSpecs(groups, placedAt, styleOf, wireLabels2 = []) {
|
|
|
1765
1765
|
const anchor = { at: { u: 0, v: 0 }, offset: { x: g.pad, y: g.pad } };
|
|
1766
1766
|
specs.push({
|
|
1767
1767
|
id: groupLabelIdOf(g.group.id),
|
|
1768
|
-
kind: "
|
|
1768
|
+
kind: "mark",
|
|
1769
1769
|
layer: "main",
|
|
1770
1770
|
pickable: false,
|
|
1771
1771
|
pose: { x: x + g.pad, y: y + g.pad, width: g.title.width, height: g.title.height },
|
|
@@ -1820,7 +1820,7 @@ function edgeSpecs(edges, ctx) {
|
|
|
1820
1820
|
const split = ctx.splits?.get(id);
|
|
1821
1821
|
specs.push({
|
|
1822
1822
|
id,
|
|
1823
|
-
kind: "
|
|
1823
|
+
kind: "mark",
|
|
1824
1824
|
layer: "main",
|
|
1825
1825
|
pickable: false,
|
|
1826
1826
|
pose: { x: 0, y: 0, width: 0, height: 0 },
|
|
@@ -2051,5 +2051,5 @@ function layOut(seeds, edges, groups, boxes, opts, room) {
|
|
|
2051
2051
|
}
|
|
2052
2052
|
|
|
2053
2053
|
export { ANCHOR_DERIVE_POSE, CONTAINER_HEADER, CONTAINER_LAYOUTS, DEFAULT_EDGE_STYLE, DEFAULT_FONT, DEFAULT_GROUP_STYLE, DEFAULT_LANE_SIZE, DEFAULT_NODE_STYLE, DEFAULT_POOL_ACROSS, DIAGRAM_ANCHOR, DIAGRAM_CONTAINER_LAYOUT, DIAGRAM_EDGE, DIAGRAM_GROUP, DIAGRAM_LABEL, DIAGRAM_LANE_COLUMNS_LAYOUT, DIAGRAM_LANE_ROWS_LAYOUT, DIAGRAM_OFF_PAGE_TAG, DIAGRAM_POOL_COLUMNS_LAYOUT, DIAGRAM_POOL_ROWS_LAYOUT, DIAGRAM_ROLES, DIAGRAM_THEMES, DIAGRAM_THEME_KEY, EDGE_DERIVE_PATH, EDGE_STROKE_WIDTH, EDIT_EDGE_LABEL_ACTION_ID, GROUP_DERIVE_POSE, LABEL_DERIVE_POSE, LABEL_DRAG_AFFORDANCE_KIND, LABEL_DRAG_LAYER_ID, LABEL_PLACEMENT, LANE_HEADER_SIZE, LANE_STROKE_WIDTH, MIN_LANE_SIZE, NODE_STROKE_WIDTH, OFF_PAGE_STUB, OFF_PAGE_TAG_DERIVE_POSE, OFF_PAGE_TAG_PADDING, POOL_HEADER_SIZE, ROUTERS, anchorDerivePose, avoid, bezier, bodyBox, bodyLayoutOf, boxAround, boxCenter, buildGraph, containerShape, dataEdgeStyle, dataNodeStyle, dataOffPage, dataRegionStyle, diagramAnchorOf, diagramContainerLayout, diagramContainerOf, diagramGroupOf, diagramLabelOf, diagramMarkOf, diagramPages, diagramScene, diagramThemeFrom, diagramThemeOf, draggableLabels, dropEmptyEdgeLabel, edgeDerivePath, edgeIdOf, edgeLabelSpec, edgeRouter, editEdgeLabelAction, editEdgeLabelBinding, editableLabels, endAims, firstLanes, groupDerivePose, groupLabelIdOf, groupMinWidth, headerBox, labelDerivePose, labelDragLayer, labelFollowsLayout, labelScratchOf, labelSize, labelStyleOf, labelUnder, laneHeader, laneOutlineOf, laneStackLayout, markShape, nestGroups, nextOffPageRef, offPageFarText, offPageSplits, offPageTagData, offPageTagDerivePose, offPageTagId, offPageTagLook, offPageTagOf, offPageTagSize, offPageTagSpec, offPageTagSpecs, offPageTagText, orthogonal, poolHeader, regionSpecs, registerMarkShape, relayoutBodies, resolveEnd, roleEdgeStyle, roleStyle, routerOf, rowTextStyle, selfLoop, stackedLanes, straight, themeDocValue, themeEdgeStroke, themeFont, themeLabelFamily, themeLabelFont, themeLabelStyle, titleIdOf, titlePose, withDiagramRegistry, withHops };
|
|
2054
|
-
//# sourceMappingURL=chunk-
|
|
2055
|
-
//# sourceMappingURL=chunk-
|
|
2054
|
+
//# sourceMappingURL=chunk-QU4QZUC6.js.map
|
|
2055
|
+
//# sourceMappingURL=chunk-QU4QZUC6.js.map
|