@weasel-js/diagram 1.14.0 → 1.14.2

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.
@@ -1,6 +1,6 @@
1
- import { formatParam, uniqueStages, runOrder, paramValues, PREVIEW_DENSITY, closeBitmaps, previewsOf, PREVIEW_SIZE } from './chunk-TBG6DFB2.js';
2
- import './chunk-ZWXM5F4I.js';
3
- import './chunk-VB6HUKNG.js';
1
+ import { formatParam, uniqueStages, runOrder, paramValues, PREVIEW_DENSITY, closeBitmaps, previewsOf, PREVIEW_SIZE } from './chunk-AXL4JQBM.js';
2
+ import './chunk-DE7UILJA.js';
3
+ import './chunk-FDCODMFW.js';
4
4
  import { createMixNode, createFileSourceNode, compressorNode, reverbNode, delayNode, filterNode, createPanNode, createGainNode, createNoiseNode, createOscillatorNode } from '@weasel-js/audio';
5
5
  import { useEffect, useSyncExternalStore, useMemo, useState } from 'react';
6
6
  import { useVisibleRaf, useStableByContent, useLatest } from '@weasel-js/react';
package/dist/effect.js CHANGED
@@ -1,9 +1,9 @@
1
- import { DiagramView, reorderContribution, ANYWHERE, isBodyEnd, sequenceSlots } from './chunk-62SMY45E.js';
2
- import './chunk-5VNPLOIX.js';
3
- import { stageFromType, LOOK_THEME, drawableWires, uniqueStages, shownPorts, valueRowId, NO_VALUE, previewRowId, formatParam, stageStyle, PROBLEM_COLOR, typeColors, kindOf, boxNode, portOn, wireStyle, isControl, wireEdge, sceneStyles, uniqueGroups, wireEdges, exitLabel, splitProblem, checkPipeline, PREVIEW_DENSITY, runOrder, PREVIEW_SIZE, closeBitmaps, previewsOf, paramValues } from './chunk-TBG6DFB2.js';
4
- export { LOOK_THEME, NO_VALUE, PREVIEW_SIZE, PROBLEM_COLOR, checkPipeline, drawableWires, exitLabel, formatParam, isControl, kindOf, portOn, previewRowId, runOrder, shownPorts, stageFromType, stageRows, stageStyle, typeColors, uniqueGroups, uniqueStages, valueRowId, wireEdges, wireStyle } from './chunk-TBG6DFB2.js';
5
- import { diagramScene, diagramPages, edgeIdOf, titleIdOf, groupLabelIdOf, nestGroups, groupMinWidth, LABEL_PLACEMENT, EDGE_DERIVE_PATH } from './chunk-ZWXM5F4I.js';
6
- import { portOf, insetOf, diagramNodeOf, DEFAULT_GROUP_INSET, SIDE_TRACK_GAP, widenForMinWidth, rankGaps, portSitesOf, labelCenter, resolveOutline } from './chunk-VB6HUKNG.js';
1
+ import { DiagramView, reorderContribution, ANYWHERE, isBodyEnd, sequenceSlots } from './chunk-GR2DK4S2.js';
2
+ import './chunk-IYUU5KUY.js';
3
+ import { stageFromType, LOOK_THEME, drawableWires, uniqueStages, shownPorts, valueRowId, NO_VALUE, previewRowId, formatParam, stageStyle, PROBLEM_COLOR, typeColors, kindOf, boxNode, portOn, wireStyle, isControl, wireEdge, sceneStyles, uniqueGroups, wireEdges, exitLabel, splitProblem, checkPipeline, PREVIEW_DENSITY, runOrder, PREVIEW_SIZE, closeBitmaps, previewsOf, paramValues } from './chunk-AXL4JQBM.js';
4
+ export { LOOK_THEME, NO_VALUE, PREVIEW_SIZE, PROBLEM_COLOR, checkPipeline, drawableWires, exitLabel, formatParam, isControl, kindOf, portOn, previewRowId, runOrder, shownPorts, stageFromType, stageRows, stageStyle, typeColors, uniqueGroups, uniqueStages, valueRowId, wireEdges, wireStyle } from './chunk-AXL4JQBM.js';
5
+ import { diagramScene, diagramPages, edgeIdOf, titleIdOf, groupLabelIdOf, nestGroups, groupMinWidth, LABEL_PLACEMENT, EDGE_DERIVE_PATH } from './chunk-DE7UILJA.js';
6
+ import { portOf, insetOf, diagramNodeOf, DEFAULT_GROUP_INSET, SIDE_TRACK_GAP, widenForMinWidth, rankGaps, portSitesOf, labelCenter, resolveOutline } from './chunk-FDCODMFW.js';
7
7
  import { moveItems, imeKey, isNoopDrop } from '@weasel-js/headless';
8
8
  import { useLatest, bitmapSrc, ActionDisabledReason, worldPosesOf, RIGID_POSE_COMPOSITION, IDENTITY_POSE_COMPOSITION, pointAlongPath } from '@weasel-js/core';
9
9
  import { polygonFromPoints } from '@weasel-js/core/math';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { f as Port, g as DiagramNodeLike, h as DiagramNodeReader, C as ContainerRole, i as DiagramContainer, O as Outline, a as Row, B as BodySpec, M as MeasureRowText, j as ContainerHeader, E as EdgeHop, R as RowTextStyle, k as Bounds$2, d as LayoutOptions, l as LayoutResult, G as Graph, c as LayoutFn, m as GraphSource, n as LayoutPlanner, o as LayoutDirection, L as LayoutPorts, p as LayoutPlan, q as GraphNodeLike, S as StyleField, F as FontField } from './types-B0n2CNTW.js';
2
2
  export { r as BodyDivider, s as BodyFloor, t as BodyLayout, u as BuildGraphOptions, v as BuiltinOutline, w as DEFAULT_GROUP_INSET, x as DEFAULT_HOP_SIZE, y as DEFAULT_NODE_GAP, z as DEFAULT_RANK_GAP, A as DIAGRAM_TRAIT_KEY, H as DIVIDER_HEIGHT, D as DiagramGroup, e as DiagramNode, I as DiagramNodeEntry, J as EdgeLabelRoom, K as GraphEdge, N as GraphGroup, Q as GraphNode, T as GroupInset, U as HOPS_DOC_KEY, V as HopsDocValue, W as LayoutAxes, X as OutlineDef, P as PortAnchor, Y as PortSite, b as PortSpec, Z as RowBox, _ as RowPort, $ as RowPortBox, a0 as Slot, a1 as anchorOffset, a2 as axesFor, a3 as bodyBox, a4 as bodyOutline, a5 as bodyTrait, a6 as boxForContent, a7 as buildGraph, a8 as canvasMeasure, a9 as contentBox, aa as createDiagramNodes, ab as dataKeyReader, ac as diagramContainerOf, ad as diagramNodeOf, ae as expandGroupEdges, af as graphOrder, ag as headerBox, ah as insetOf, ai as isPinned, aj as layoutBody, ak as layoutRowPorts, al as measureBody, am as outlineDetail, an as outlinePath, ao as packAcross, ap as packClusters, aq as pinnedSet, ar as planOf, as as plannerPlan, at as rankGaps, au as registerOutline, av as seededOrder, aw as settle, ax as sizeToBody, ay as titleIdOf, az as translated, aA as untilSettled } from './types-B0n2CNTW.js';
3
- import { P as PortsOptions, A as AvoidInput, a as AvoidRouter, b as AvoidOptions, c as AvoidRoutes, d as PlaceLabelsOptions, F as ForceOptions } from './layout.entry-Ca6pVvqo.js';
4
- export { e as AVOID_DEFAULTS, f as AvoidEdge, g as AvoidEnd, h as AvoidLabel, i as AvoidObstacle, j as AvoidPort, k as AvoidUpdateOptions, B as BodyNodeSpec, l as BuildBodyOptions, C as COMPASS, D as DEFAULT_PORTS, m as ForceBody, n as ForceRelaxation, o as Forest, L as LabelPlacements, p as LayeredPlan, q as PORT_LABEL_GAP, r as PerimeterPortLabelBox, s as PlaceLabel, t as PlaceLabelsInput, u as PlaceRoute, v as PortLabelPlacement, R as RowNodeData, w as backEdges, x as buildBody, y as chain, z as createAvoidRouter, E as edgeHops, G as footprintNode, H as force, I as forceRelaxation, J as forestOf, K as labelCenter, M as layered, N as layeredPlan, O as marginOf, Q as outlineFromD, S as outlinePolyline, T as placeLabels, U as portLabelBox, V as portLabelsOf, W as portOf, X as portSitesOf, Y as portsOf, Z as portsOnOutline, _ as radial, $ as ranksByLength, a0 as ranksOf, a1 as rayHit, a2 as routeHolds, a3 as subtreeBlocks, a4 as tree } from './layout.entry-Ca6pVvqo.js';
3
+ import { P as PortsOptions, A as AvoidInput, a as AvoidRouter, b as AvoidOptions, c as AvoidRoutes, d as PlaceLabelsOptions, F as ForceOptions } from './layout.entry-CbmGuqE-.js';
4
+ export { e as AVOID_DEFAULTS, f as AvoidEdge, g as AvoidEnd, h as AvoidLabel, i as AvoidObstacle, j as AvoidPort, k as AvoidUpdateOptions, B as BodyNodeSpec, l as BuildBodyOptions, C as COMPASS, D as DEFAULT_PORTS, m as ForceBody, n as ForceRelaxation, o as Forest, L as LabelPlacements, p as LayeredPlan, q as PORT_LABEL_GAP, r as PerimeterPortLabelBox, s as PlaceLabel, t as PlaceLabelsInput, u as PlaceRoute, v as PortLabelPlacement, R as RowNodeData, w as backEdges, x as buildBody, y as chain, z as createAvoidRouter, E as edgeHops, G as footprintNode, H as force, I as forceRelaxation, J as forestOf, K as labelCenter, M as layered, N as layeredPlan, O as marginOf, Q as outlineFromD, S as outlinePolyline, T as placeLabels, U as portLabelBox, V as portLabelsOf, W as portOf, X as portSitesOf, Y as portsOf, Z as portsOnOutline, _ as radial, $ as ranksByLength, a0 as ranksOf, a1 as rayHit, a2 as routeHolds, a3 as subtreeBlocks, a4 as tree } from './layout.entry-CbmGuqE-.js';
5
5
  import { Vec2, ActionDeps, Action, InvocationCtx, TargetPredicate, GestureBinding, Contribution, DerivedDep, Path, SceneRegistry, paintsLayer, PoseDescriptor, ChromeState, CommandFill, CommandStroke, CursorSpec, Affordance, DropVerdict, Stroke, RectPose, DepName, CarryCallbacks, Carry, Tool, AddNodeSpec, NodeId, Scene, Op, MarkerRef, LayoutStrategy, ContainerBounds, RenderLayer, TransformFollower, PoseComposition, PlacedPage, Bounds as Bounds$3, GatedLayer, NodeShapeEntry, Paint, View, SelectionApi } from '@weasel-js/core';
6
6
  export { DropRefusal, DropVerdict } from '@weasel-js/core';
7
7
  import { Vec2 as Vec2$1, Path as Path$2 } from '@weasel-js/core/math';
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import './chunk-WDIE35AK.js';
2
- import { CONTAINERS_GROUP, createConnectAction, avoidSceneInput, sceneEdges, inOrUnder, withHopsData, edgePolylines, themeWrites, hopDataOps, worldWith, diagramDropParentAt, containerBuild } from './chunk-62SMY45E.js';
3
- export { ADD_LANE_ACTION_ID, CONNECT_ACTION_ID, CONTAINERS_GROUP, CONTAINER_STENCILS, DEFAULT_EDGE_STROKE, DIAGRAM_ITEM_CARRY, DiagramView, EASED_LAYOUTS, EDGE_END_AFFORDANCE_KIND, EDGE_END_LAYER_ID, EDIT_CONTAINER_TITLE_ACTION_ID, GRAB_EDGE_END_ACTION_ID, GRAB_LABEL_ACTION_ID, GRAB_PORT_ACTION_ID, GRAB_WAYPOINT_ACTION_ID, ITEM_DROP_ACTION_ID, LANE_AFFORDANCE_KIND, LANE_LAYER_ID, LANE_RESIZE_ACTION_ID, LAYOUTS, LAYOUT_ACTION_ID, MOVE_LABEL_ACTION_ID, PORT_AFFORDANCE_KIND, PORT_LAYER_ID, RECONNECT_ACTION_ID, RELEASE_MEMBERS_ACTION_ID, REMOVE_WAYPOINT_ACTION_ID, REORDER_ACTION_ID, RESET_LABEL_ACTION_ID, RESET_ROUTE_ACTION_ID, ROUTER_LABELS, ROUTE_EDIT_ACTION_ID, SELECT_LABEL_EDGE_ACTION_ID, SET_HOPS_ACTION_ID, SET_ROUTER_ACTION_IDS, STEP_REORDER_ACTION_ID, WAYPOINT_AFFORDANCE_KIND, WAYPOINT_HIT_PX, WAYPOINT_LAYER_ID, addLane, applyLayout, avoidSceneInput, bodyAt, commitEdgeToScene, commitLabelToScene, commitLaneResizeToScene, commitReconnectToScene, commitRouteToScene, commitRouterToScene, connectBinding, containerBuild, createAddLaneAction, createConnectAction, createDiagramContribution, createEdgeEndAffordance, createItemDropAction, createLabelDragAction, createLaneAffordance, createLaneResizeAction, createLayoutAction, createPortAffordance, createReconnectAction, createReleaseMembersAction, createRemoveWaypointAction, createReorderAction, createResetLabelAction, createResetRouteAction, createRouteEditAction, createSetHopsAction, createSetRouterAction, createSpecHops, createSpecLabelPlacer, createSpecRouter, createStepReorderAction, createWaypointAffordance, defaultCanConnect, diagramCanDropInto, diagramContainers, diagramDropParentAt, diagramEdgeEnds, diagramLabelDrag, diagramLayoutOf, diagramPorts, diagramResizable, diagramShape, diagramWaypoints, dragItemProps, dragSegment, dragVertex, easedProducer, edgeEndLayer, edgeEndScratchOf, editContainerTitleAction, editContainerTitleBinding, forceProducer, grabPortAction, grabPortBindings, groupReorderContribution, groupReorderSlots, headerIdOf, insertWaypoint, isBodyEnd, isBodyOrRegion, isDiagramBody, itemDropContribution, laneLayer, laneResizeFrame, laneScratchOf, lanesOf, layoutDiagram, layoutPoses, movedLabelData, pinSegment, poolAxisOf, poolsOf, portLayer, portScratchOf, reconnectBinding, regionHeaderAt, registerDiagramShape, releaseMembers, removeSegment, removeWaypoint, reorderBinding, reorderContribution, routeHandles, routeStateOf, routeWrites, routedData, routerActions, routesOf, sceneParticipants, segmentAxis, sequenceSlots, startItemDrag, themeWrites, unpinSegment, useLiveLayout, useMirroredSelection, waypointLayer, waypointScratchOf, withRouter } from './chunk-62SMY45E.js';
4
- import { createAvoidRouter, HOPS_DOC_KEY, edgeHops, placeLabels } from './chunk-5VNPLOIX.js';
5
- export { AVOID_DEFAULTS, DEFAULT_HOP_SIZE, HOPS_DOC_KEY, createAvoidRouter, edgeHops, placeLabels, radial, simplifyStops } from './chunk-5VNPLOIX.js';
6
- import { DEFAULT_NODE_STYLE, NODE_STROKE_WIDTH, rowTextStyle, DEFAULT_FONT, bodyLayoutOf, offPageTagLook, diagramThemeOf, offPageSplits, offPageTagOf, DIAGRAM_THEMES, DIAGRAM_THEME_KEY, themeDocValue, DIAGRAM_ROLES, themeEdgeStroke, diagramLabelOf, diagramContainerOf, diagramGroupOf, offPageTagId, offPageFarText, offPageTagSpec, offPageTagData, offPageTagSize, relayoutBodies, recordedRows, labelSize, labelStyleOf } from './chunk-ZWXM5F4I.js';
7
- export { ANCHOR_DERIVE_POSE, CONTAINER_HEADER, CONTAINER_LAYOUTS, DEFAULT_EDGE_STYLE, 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, boxAround, buildGraph, containerShape, dataEdgeStyle, dataNodeStyle, dataOffPage, dataRegionStyle, diagramAnchorOf, diagramContainerLayout, diagramContainerOf, diagramGroupOf, diagramLabelOf, diagramMarkOf, diagramPages, diagramScene, diagramThemeFrom, diagramThemeOf, draggableLabels, dropEmptyEdgeLabel, edgeDerivePath, edgeIdOf, edgeLabelSpec, edgeRouter, editEdgeLabelAction, editEdgeLabelBinding, firstLanes, groupDerivePose, headerBox, labelDerivePose, labelDragLayer, labelScratchOf, labelSize, labelUnder, laneHeader, laneStackLayout, markShape, nextOffPageRef, offPageFarText, offPageSplits, offPageTagData, offPageTagDerivePose, offPageTagId, offPageTagLook, offPageTagOf, offPageTagSize, offPageTagSpec, offPageTagSpecs, offPageTagText, orthogonal, poolHeader, regionSpecs, registerMarkShape, relayoutBodies, resolveEnd, roleEdgeStyle, roleStyle, rowTextStyle, selfLoop, stackedLanes, straight, themeDocValue, themeEdgeStroke, themeFont, themeLabelFont, themeLabelStyle, titleIdOf, titlePose, withDiagramRegistry, withHops } from './chunk-ZWXM5F4I.js';
8
- import { EVENT_SIZE, GATEWAY_SIZE, DEVICE_SIZE, buildBody, outlineDetail, outlinePath, diagramEdgeOf, samePoints, diagramNodeOf, layoutBody, labelCenter } from './chunk-VB6HUKNG.js';
9
- export { COMPASS, DEFAULT_GROUP_INSET, DEFAULT_NODE_GAP, DEFAULT_PORTS, DEFAULT_RANK_GAP, DIAGRAM_TRAIT_KEY, DIVIDER_HEIGHT, PORT_LABEL_GAP, anchorOffset, axesFor, backEdges, bodyOutline, bodyTrait, boxForContent, buildBody, canvasMeasure, chain, contentBox, createDiagramNodes, dataKeyReader, diagramEdgeOf, diagramNodeOf, expandGroupEdges, footprintNode, force, forceRelaxation, forestOf, graphOrder, insetOf, isPinned, labelCenter, layered, layeredPlan, layeredRoutes, layoutBody, layoutOwnsPort, layoutOwnsRoute, layoutRowPorts, layoutWritesRoute, marginOf, measureBody, outlineDetail, outlineFromD, outlinePath, outlinePolyline, packAcross, packClusters, pinnedSet, planOf, plannerPlan, portLabelBox, portLabelsOf, portOf, portSitesOf, portsOf, portsOnOutline, rankGaps, ranksByLength, ranksOf, rayHit, registerOutline, routeHolds, seededOrder, settle, sizeToBody, subpathOf, subtreeBlocks, translated, tree, untilSettled } from './chunk-VB6HUKNG.js';
2
+ import { CONTAINERS_GROUP, createConnectAction, avoidSceneInput, sceneEdges, inOrUnder, withHopsData, edgePolylines, themeWrites, hopDataOps, worldWith, diagramDropParentAt, containerBuild } from './chunk-GR2DK4S2.js';
3
+ export { ADD_LANE_ACTION_ID, CONNECT_ACTION_ID, CONTAINERS_GROUP, CONTAINER_STENCILS, DEFAULT_EDGE_STROKE, DIAGRAM_ITEM_CARRY, DiagramView, EASED_LAYOUTS, EDGE_END_AFFORDANCE_KIND, EDGE_END_LAYER_ID, EDIT_CONTAINER_TITLE_ACTION_ID, GRAB_EDGE_END_ACTION_ID, GRAB_LABEL_ACTION_ID, GRAB_PORT_ACTION_ID, GRAB_WAYPOINT_ACTION_ID, ITEM_DROP_ACTION_ID, LANE_AFFORDANCE_KIND, LANE_LAYER_ID, LANE_RESIZE_ACTION_ID, LAYOUTS, LAYOUT_ACTION_ID, MOVE_LABEL_ACTION_ID, PORT_AFFORDANCE_KIND, PORT_LAYER_ID, RECONNECT_ACTION_ID, RELEASE_MEMBERS_ACTION_ID, REMOVE_WAYPOINT_ACTION_ID, REORDER_ACTION_ID, RESET_LABEL_ACTION_ID, RESET_ROUTE_ACTION_ID, ROUTER_LABELS, ROUTE_EDIT_ACTION_ID, SELECT_LABEL_EDGE_ACTION_ID, SET_HOPS_ACTION_ID, SET_ROUTER_ACTION_IDS, STEP_REORDER_ACTION_ID, WAYPOINT_AFFORDANCE_KIND, WAYPOINT_HIT_PX, WAYPOINT_LAYER_ID, addLane, applyLayout, avoidSceneInput, bodyAt, commitEdgeToScene, commitLabelToScene, commitLaneResizeToScene, commitReconnectToScene, commitRouteToScene, commitRouterToScene, connectBinding, containerBuild, createAddLaneAction, createConnectAction, createDiagramContribution, createEdgeEndAffordance, createItemDropAction, createLabelDragAction, createLaneAffordance, createLaneResizeAction, createLayoutAction, createPortAffordance, createReconnectAction, createReleaseMembersAction, createRemoveWaypointAction, createReorderAction, createResetLabelAction, createResetRouteAction, createRouteEditAction, createSetHopsAction, createSetRouterAction, createSpecHops, createSpecLabelPlacer, createSpecRouter, createStepReorderAction, createWaypointAffordance, defaultCanConnect, diagramCanDropInto, diagramContainers, diagramDropParentAt, diagramEdgeEnds, diagramLabelDrag, diagramLayoutOf, diagramPorts, diagramResizable, diagramShape, diagramWaypoints, dragItemProps, dragSegment, dragVertex, easedProducer, edgeEndLayer, edgeEndScratchOf, editContainerTitleAction, editContainerTitleBinding, forceProducer, grabPortAction, grabPortBindings, groupReorderContribution, groupReorderSlots, headerIdOf, insertWaypoint, isBodyEnd, isBodyOrRegion, isDiagramBody, itemDropContribution, laneLayer, laneResizeFrame, laneScratchOf, lanesOf, layoutDiagram, layoutPoses, movedLabelData, pinSegment, poolAxisOf, poolsOf, portLayer, portScratchOf, reconnectBinding, regionHeaderAt, registerDiagramShape, releaseMembers, removeSegment, removeWaypoint, reorderBinding, reorderContribution, routeHandles, routeStateOf, routeWrites, routedData, routerActions, routesOf, sceneParticipants, segmentAxis, sequenceSlots, startItemDrag, themeWrites, unpinSegment, useLiveLayout, useMirroredSelection, waypointLayer, waypointScratchOf, withRouter } from './chunk-GR2DK4S2.js';
4
+ import { createAvoidRouter, HOPS_DOC_KEY, edgeHops, placeLabels } from './chunk-IYUU5KUY.js';
5
+ export { AVOID_DEFAULTS, DEFAULT_HOP_SIZE, HOPS_DOC_KEY, createAvoidRouter, edgeHops, placeLabels, radial, simplifyStops } from './chunk-IYUU5KUY.js';
6
+ import { DEFAULT_NODE_STYLE, NODE_STROKE_WIDTH, rowTextStyle, DEFAULT_FONT, bodyLayoutOf, offPageTagLook, diagramThemeOf, offPageSplits, offPageTagOf, DIAGRAM_THEMES, DIAGRAM_THEME_KEY, themeDocValue, DIAGRAM_ROLES, themeEdgeStroke, diagramLabelOf, diagramContainerOf, diagramGroupOf, offPageTagId, offPageFarText, offPageTagSpec, offPageTagData, offPageTagSize, relayoutBodies, recordedRows, labelSize, labelStyleOf } from './chunk-DE7UILJA.js';
7
+ export { ANCHOR_DERIVE_POSE, CONTAINER_HEADER, CONTAINER_LAYOUTS, DEFAULT_EDGE_STYLE, 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, boxAround, buildGraph, containerShape, dataEdgeStyle, dataNodeStyle, dataOffPage, dataRegionStyle, diagramAnchorOf, diagramContainerLayout, diagramContainerOf, diagramGroupOf, diagramLabelOf, diagramMarkOf, diagramPages, diagramScene, diagramThemeFrom, diagramThemeOf, draggableLabels, dropEmptyEdgeLabel, edgeDerivePath, edgeIdOf, edgeLabelSpec, edgeRouter, editEdgeLabelAction, editEdgeLabelBinding, firstLanes, groupDerivePose, headerBox, labelDerivePose, labelDragLayer, labelScratchOf, labelSize, labelUnder, laneHeader, laneStackLayout, markShape, nextOffPageRef, offPageFarText, offPageSplits, offPageTagData, offPageTagDerivePose, offPageTagId, offPageTagLook, offPageTagOf, offPageTagSize, offPageTagSpec, offPageTagSpecs, offPageTagText, orthogonal, poolHeader, regionSpecs, registerMarkShape, relayoutBodies, resolveEnd, roleEdgeStyle, roleStyle, rowTextStyle, selfLoop, stackedLanes, straight, themeDocValue, themeEdgeStroke, themeFont, themeLabelFont, themeLabelStyle, titleIdOf, titlePose, withDiagramRegistry, withHops } from './chunk-DE7UILJA.js';
8
+ import { EVENT_SIZE, GATEWAY_SIZE, DEVICE_SIZE, buildBody, outlineDetail, outlinePath, diagramEdgeOf, samePoints, diagramNodeOf, layoutBody, labelCenter } from './chunk-FDCODMFW.js';
9
+ export { COMPASS, DEFAULT_GROUP_INSET, DEFAULT_NODE_GAP, DEFAULT_PORTS, DEFAULT_RANK_GAP, DIAGRAM_TRAIT_KEY, DIVIDER_HEIGHT, PORT_LABEL_GAP, anchorOffset, axesFor, backEdges, bodyOutline, bodyTrait, boxForContent, buildBody, canvasMeasure, chain, contentBox, createDiagramNodes, dataKeyReader, diagramEdgeOf, diagramNodeOf, expandGroupEdges, footprintNode, force, forceRelaxation, forestOf, graphOrder, insetOf, isPinned, labelCenter, layered, layeredPlan, layeredRoutes, layoutBody, layoutOwnsPort, layoutOwnsRoute, layoutRowPorts, layoutWritesRoute, marginOf, measureBody, outlineDetail, outlineFromD, outlinePath, outlinePolyline, packAcross, packClusters, pinnedSet, planOf, plannerPlan, portLabelBox, portLabelsOf, portOf, portSitesOf, portsOf, portsOnOutline, rankGaps, ranksByLength, ranksOf, rayHit, registerOutline, routeHolds, seededOrder, settle, sizeToBody, subpathOf, subtreeBlocks, translated, tree, untilSettled } from './chunk-FDCODMFW.js';
10
10
  import { useMemo, useRef, useEffect } from 'react';
11
11
  import { bodyPredicate, AUTO_POSE_DESCRIPTOR, defineTool, localizeWorldPoses, RIGID_POSE_COMPOSITION, createInsertOp, INSERT_REPOSITION_BINDING, useDepRegistry, useLatest, useDepSource, commitOps, createSetDataOp, useOptionalDepRegistry, useTransformFollower, composeWorldPose, scenePoseAdapter, placedPagesOf, PAGES_DOC_KEY, ActionDisabledReason, measureTextBounds, createTransformOp, writtenBy, documentDepOf, documentPose, createDeleteOp, fitViewToPage, scenePoseFrame, parseColor } from '@weasel-js/core';
12
12
  import { pathToD, pathPoint } from '@weasel-js/geom';
package/dist/layout.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { s as BodyFloor, B as BodySpec, k as Bounds, v as BuiltinOutline, x as DEFAULT_HOP_SIZE, y as DEFAULT_NODE_GAP, z as DEFAULT_RANK_GAP, e as DiagramNode, E as EdgeHop, J as EdgeLabelRoom, G as Graph, K as GraphEdge, N as GraphGroup, Q as GraphNode, U as HOPS_DOC_KEY, V as HopsDocValue, W as LayoutAxes, o as LayoutDirection, c as LayoutFn, d as LayoutOptions, p as LayoutPlan, n as LayoutPlanner, L as LayoutPorts, l as LayoutResult, M as MeasureRowText, O as Outline, X as OutlineDef, f as Port, P as PortAnchor, Y as PortSite, b as PortSpec, a as Row, Z as RowBox, _ as RowPort, $ as RowPortBox, R as RowTextStyle, a0 as Slot, a1 as anchorOffset, a2 as axesFor, a4 as bodyOutline, a6 as boxForContent, a8 as canvasMeasure, a9 as contentBox, aB as extent, af as graphOrder, aj as layoutBody, ak as layoutRowPorts, al as measureBody, am as outlineDetail, an as outlinePath, ao as packAcross, aq as pinnedSet, ar as planOf, as as plannerPlan, au as registerOutline, av as seededOrder, aw as settle, ax as sizeToBody, az as translated, aA as untilSettled } from './types-B0n2CNTW.js';
2
- export { e as AVOID_DEFAULTS, f as AvoidEdge, g as AvoidEnd, A as AvoidInput, h as AvoidLabel, i as AvoidObstacle, b as AvoidOptions, j as AvoidPort, a as AvoidRouter, c as AvoidRoutes, k as AvoidUpdateOptions, B as BodyNodeSpec, l as BuildBodyOptions, C as COMPASS, D as DEFAULT_PORTS, m as ForceBody, F as ForceOptions, n as ForceRelaxation, L as LabelPlacements, p as LayeredPlan, q as PORT_LABEL_GAP, r as PerimeterPortLabelBox, s as PlaceLabel, t as PlaceLabelsInput, d as PlaceLabelsOptions, u as PlaceRoute, P as PortsOptions, R as RowNodeData, w as backEdges, x as buildBody, y as chain, z as createAvoidRouter, E as edgeHops, G as footprintNode, H as force, I as forceRelaxation, J as forestOf, K as labelCenter, M as layered, N as layeredPlan, O as marginOf, Q as outlineFromD, S as outlinePolyline, T as placeLabels, U as portLabelBox, W as portOf, X as portSitesOf, Y as portsOf, Z as portsOnOutline, _ as radial, $ as ranksByLength, a0 as ranksOf, a1 as rayHit, a2 as routeHolds, a3 as subtreeBlocks, a4 as tree } from './layout.entry-Ca6pVvqo.js';
2
+ export { e as AVOID_DEFAULTS, f as AvoidEdge, g as AvoidEnd, A as AvoidInput, h as AvoidLabel, i as AvoidObstacle, b as AvoidOptions, j as AvoidPort, a as AvoidRouter, c as AvoidRoutes, k as AvoidUpdateOptions, B as BodyNodeSpec, l as BuildBodyOptions, C as COMPASS, D as DEFAULT_PORTS, m as ForceBody, F as ForceOptions, n as ForceRelaxation, L as LabelPlacements, p as LayeredPlan, q as PORT_LABEL_GAP, r as PerimeterPortLabelBox, s as PlaceLabel, t as PlaceLabelsInput, d as PlaceLabelsOptions, u as PlaceRoute, P as PortsOptions, R as RowNodeData, w as backEdges, x as buildBody, y as chain, z as createAvoidRouter, E as edgeHops, G as footprintNode, H as force, I as forceRelaxation, J as forestOf, K as labelCenter, M as layered, N as layeredPlan, O as marginOf, Q as outlineFromD, S as outlinePolyline, T as placeLabels, U as portLabelBox, W as portOf, X as portSitesOf, Y as portsOf, Z as portsOnOutline, _ as radial, $ as ranksByLength, a0 as ranksOf, a1 as rayHit, a2 as routeHolds, a3 as subtreeBlocks, a4 as tree } from './layout.entry-CbmGuqE-.js';
3
3
  export { D as DiagramLabel, L as LabelSpot } from './labelTrait-BBjRgxbz.js';
4
4
  import '@weasel-js/geom';
5
5
  import '@weasel-js/core/math';
@@ -546,7 +546,12 @@ declare function layeredPlan(graph: Graph, opts?: LayoutOptions): LayeredPlan;
546
546
  *
547
547
  * An edge in `back` counts as running the other way, so it is ranked and kept
548
548
  * forward like any other; a self-loop is ignored; parallel edges each count.
549
- * Each connected component is ranked on its own and starts at rank 0.
549
+ * A group's members are also drawn into as few ranks as they can share: each
550
+ * rank between its first member's and its last costs every member
551
+ * `GROUP_WEIGHT` edge lengths, so a group sits in one rank unless an edge
552
+ * between its members, or a much longer route elsewhere, needs more. Each
553
+ * connected component, joining a group's members as one, is ranked on its own
554
+ * and starts at rank 0.
550
555
  *
551
556
  * Starts from the longest-path ranking and improves it by network simplex,
552
557
  * stopping after a number of rounds proportional to the edge count. Every
package/dist/layout.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import './chunk-WDIE35AK.js';
2
- export { AVOID_DEFAULTS, DEFAULT_HOP_SIZE, HOPS_DOC_KEY, createAvoidRouter, edgeHops, placeLabels, radial } from './chunk-5VNPLOIX.js';
3
- export { COMPASS, DEFAULT_NODE_GAP, DEFAULT_PORTS, DEFAULT_RANK_GAP, PORT_LABEL_GAP, anchorOffset, axesFor, backEdges, bodyOutline, boxForContent, buildBody, canvasMeasure, chain, contentBox, extent, footprintNode, force, forceRelaxation, forestOf, graphOrder, labelCenter, layered, layeredPlan, layoutBody, layoutRowPorts, marginOf, measureBody, outlineDetail, outlineFromD, outlinePath, outlinePolyline, packAcross, pinnedSet, planOf, plannerPlan, portLabelBox, portOf, portSitesOf, portsOf, portsOnOutline, ranksByLength, ranksOf, rayHit, registerOutline, routeHolds, seededOrder, settle, sizeToBody, subtreeBlocks, translated, tree, untilSettled } from './chunk-VB6HUKNG.js';
2
+ export { AVOID_DEFAULTS, DEFAULT_HOP_SIZE, HOPS_DOC_KEY, createAvoidRouter, edgeHops, placeLabels, radial } from './chunk-IYUU5KUY.js';
3
+ export { COMPASS, DEFAULT_NODE_GAP, DEFAULT_PORTS, DEFAULT_RANK_GAP, PORT_LABEL_GAP, anchorOffset, axesFor, backEdges, bodyOutline, boxForContent, buildBody, canvasMeasure, chain, contentBox, extent, footprintNode, force, forceRelaxation, forestOf, graphOrder, labelCenter, layered, layeredPlan, layoutBody, layoutRowPorts, marginOf, measureBody, outlineDetail, outlineFromD, outlinePath, outlinePolyline, packAcross, pinnedSet, planOf, plannerPlan, portLabelBox, portOf, portSitesOf, portsOf, portsOnOutline, ranksByLength, ranksOf, rayHit, registerOutline, routeHolds, seededOrder, settle, sizeToBody, subtreeBlocks, translated, tree, untilSettled } from './chunk-FDCODMFW.js';
4
4
  //# sourceMappingURL=layout.js.map
5
5
  //# sourceMappingURL=layout.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weasel-js/diagram",
3
- "version": "1.14.0",
3
+ "version": "1.14.2",
4
4
  "description": "Node-link diagramming for weasel: any scene node becomes a diagram participant, with ports on its perimeter and an optional body builder for flowchart-shaped boxes.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,13 +33,13 @@
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=18",
36
- "@weasel-js/animator": "1.14.0",
37
- "@weasel-js/audio": "1.14.0",
38
- "@weasel-js/core": "1.14.0",
39
- "@weasel-js/font": "1.14.0",
40
- "@weasel-js/geom": "1.14.0",
41
- "@weasel-js/react": "1.14.0",
42
- "@weasel-js/simulation": "1.14.0"
36
+ "@weasel-js/animator": "1.14.2",
37
+ "@weasel-js/audio": "1.14.2",
38
+ "@weasel-js/core": "1.14.2",
39
+ "@weasel-js/font": "1.14.2",
40
+ "@weasel-js/geom": "1.14.2",
41
+ "@weasel-js/react": "1.14.2",
42
+ "@weasel-js/simulation": "1.14.2"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "@weasel-js/audio": {
@@ -50,9 +50,9 @@
50
50
  "table": "./dist/icons.table.json"
51
51
  },
52
52
  "dependencies": {
53
- "@weasel-js/clock": "1.14.0",
54
- "@weasel-js/headless": "1.14.0",
55
- "@weasel-js/icons": "1.14.0"
53
+ "@weasel-js/clock": "1.14.2",
54
+ "@weasel-js/headless": "1.14.2",
55
+ "@weasel-js/icons": "1.14.2"
56
56
  },
57
57
  "author": "orochi235",
58
58
  "homepage": "https://orochi235.github.io/weasel/",