Repository navigation
v0.6.0
This is a minor release because of the changes under "Breaking changes": error messages of input checks are unified, an ID must be a non-empty string everywhere, layoutGridGraph has a new default columnGap, and graphRectsIntersect no longer counts touching rectangles. Each entry below says who is affected and what to change.
Breaking changes
- Graph layouts: every built-in layout (layered, tree, radial, circular, grid, concentric, swimlane, force, flow and incremental) now reports an invalid numeric option in one format that names the option, the rule and the value:
RangeError('<option> must be <rule> (got <value>)'), with the rulesa finite number > 0,a finite number ≥ 0,a finite number,an integer ≥ 1,a finite number in [0, 1]anda safe integer. Before, the texts varied, for examplecolumnGap must be finite and positive (spacing may be zero),rowGap must be finite and nonnegative (node sizes positive),nodeWidth and nodeHeight must be finite and positiveorcrossingSweeps must be a positive integer; nowcolumnGap must be a finite number ≥ 0 (got -1)andcrossingSweeps must be an integer ≥ 1 (got 0). The error class (RangeError) and the accepted values are unchanged. What to do: update code or tests that match these messages. layoutGridGraph: the defaultcolumnGapis 50 (was 40), the default of every other layout, so a grid without an explicitcolumnGapis 10 units wider per column gap. What to do: passcolumnGap: 40to keep the earlier geometry.layoutLayeredGraph: same-rank edges (inside a cycle) and self-loops turnmin(24, max(6, columnGap / 2))units past the box, as in the tree and swimlane layouts (wasmin(24, columnGap / 2)). Only acolumnGapbelow 12 changes the drawing: the turn stays 6 units out instead of shrinking towards the box, and the layout can grow by up to 6 units along the flow when such an edge leaves the last rank. What to do: nothing, unless you compare paths of such layouts exactly.graphRectsIntersect(a, b): rectangles that only touch, along an edge or at a corner, no longer intersect; the test now uses open intervals (a.x < b.x + b.width && b.x < a.x + a.width, and the same for y), compared exactly. A zero-size rectangle intersects a rectangle whose interior it passes through, not one whose border it lies on.cullGraphElements(and socullOffscreen) still keeps elements whose bounds touch the view, because their strokes can still draw into it. What to do: if you need touching rectangles to count, testa.x <= b.x + b.width && b.x <= a.x + a.width(and y) yourself.GraphTreeLayoutOptions,GraphSwimlaneLayoutOptionsandGraphIncrementalLayoutOptionsnow extendGraphLayoutOptionsinstead of declaringdirection,nodeWidth,nodeHeight,columnGap,rowGapandpaddingthemselves. Names, types and optionality are unchanged, so every existing object literal still type-checks; code that augments one of these interfaces with a conflicting declaration of a shared field must now matchGraphLayoutOptions.- One ID rule and one set of error texts for the planning, timeline and data core (see Validation and errors). An ID must be a non-empty string, unique within its collection; any other value is invalid and throws an
Error. Values that the looser check!idlet through now throwInvalid <kind> ID: <value>: numbers other than 0 (such as5),trueand objects as task, dependency and calendar IDs inscheduleTasks,propagateEdit,rescheduleFromStatusDate,levelResources(also resource IDs) and the snapshot functions that run the scheduler; task and resource IDs incalculateResourceLoad; row, bar and dependency IDs invalidateTimelineData(and so GanttChart'svalidation-error,renderTimelineSvgand snapshots); marker and load row IDs inrenderTimelineSvg.scheduleToGraph, which only checked dependency IDs for duplicates, now rejects every invalid one,''andundefinedincluded.createTimelineRowTree, and with ittimelineWbsCodes,moveTimelineRow,indentTimelineRow,outdentTimelineRow,timelineRowPosition,timelineCsvTableandrenderTimelineSvg, now also rejects the row IDs0,nullandundefinedand numbers.buildPlacementInputrejects an assignment whoseresourceIdis not a non-empty string (Unknown resource in assignment: <value>). Anullentry in the tasks, dependencies or calendars ofscheduleTasks, or in the tasks or resources ofcalculateResourceLoadand the resources oflevelResources, throwsInvalid <kind> ID: undefinedinstead of aTypeError. The interchange, windowed data and snapshot checks already used the strict rule; only their texts change. - Invalid and duplicate IDs have separate messages everywhere,
Invalid <kind> ID: <value>andDuplicate <kind> ID: <id>, where several functions saidInvalid or duplicate …. For exampleInvalid or duplicate task ID: a→Duplicate task ID: a;Invalid or duplicate schedule dependency: d1→Duplicate dependency ID: d1,Invalid dependency ID: 5or, for an unknownfromorto,Unknown dependency endpoint: d1(asbuildPlacementInput,projectResourceTimeline,validateTimelineDataandscheduleToGraphalready said);Invalid or duplicate resource: r→Duplicate resource ID: r;Invalid or duplicate workload task: a→Duplicate task ID: a;Invalid or duplicate row IDs→Duplicate row ID: r1;Invalid baseline set ID on bar: x→Invalid baseline set ID: "" (bar x);Duplicate baseline set p on bar x→Duplicate baseline set ID: p (bar x);Duplicate baseline set ID in baselineIds: p→Duplicate baseline set ID: p (baselineIds);Invalid or repeated baseline set ID for baseline 1: b→Invalid baseline set ID: b (baseline 1)orDuplicate baseline set ID: b (baseline 1);Windowed data items need a non-empty string ID→Invalid windowed data item ID: undefined;Duplicate item ID in one response: i→Duplicate windowed data item ID: i (in one response). Snapshot diagnostics for an invalid ID sayInvalid <kind> ID: <value>instead ofMust be a nonempty string. An empty ID now shows as""in messages. - Assignments are checked by one shared checker in
calculateResourceLoad,levelResources,buildPlacementInput,projectResourceTimeline,toMsProjectXml,resourceLoadFromMsProjectandcomparePlans(andproposeResourceAssignmentfor duplicates in its state), with the same texts:Unknown resource in assignment: <id>,Unknown task in assignment: <id>(with theoptions.inactiveTaskIdshint only fromcalculateResourceLoad) andDuplicate assignment of task <task> to resource <resource>, which replacesDuplicate resource assignment for task: <task>(and…: <task>, <resource>) andUnknown task or resource in assignment: <task>, <resource>. The duplicate check keys pairs by nested maps, so IDs that contain separator characters never collide. renderTimelineSvgthrows anError(not aRangeError) for an invalid or duplicate marker ID:Invalid marker ID: <value>orDuplicate marker ID: <id>; a marker time that is not finite is stillRangeError: Invalid timeline marker: <id>. GanttChart's marker prop check now says the same (see the component bullets below).- If you match on error messages: replace
/Invalid or duplicate/and/duplicate …/patterns with the separateInvalid <kind> ID:andDuplicate <kind> ID:texts (note the capital D),Invalid or duplicate schedule dependencywithInvalid dependency ID,Duplicate dependency IDorUnknown dependency endpoint, andDuplicate resource assignment for taskandUnknown task or resourcewith the assignment texts above. Better, match on the error class and the ID rather than the full text. - GanttChart and NetworkGraph prop checks follow the same rule as the core: a RangeError for invalid numbers and geometry and for an unknown value of a string option, an Error for bad references, invalid or duplicate IDs and cycles; GanttChart's own ID checks use the strict ID rule and the
Invalid <kind> IDandDuplicate <kind> IDtexts (see Validation and errors). How each error is surfaced (GanttChart'svalidation-errorplus the rethrow, NetworkGraph's throw while rendering), the order of the checks and the rendering of valid props are unchanged. - GanttChart, error class: overlapping, empty or non-finite
headerBands(also those of a zoom preset) are a RangeError (was Error), with the same textTimeline bands must be finite, ordered and nonoverlapping; a marker whosetimeis not finite isRangeError: Invalid timeline marker: <id>(was Error, same text); a column whosewidthis not finite and positive isRangeError: Invalid timeline column width: <id>(wasError: Invalid timeline column: <id>). These are the class and textrenderTimelineSvguses. - GanttChart, ID texts: invalid and duplicate IDs have separate messages.
Invalid or duplicate load row ID: l→Duplicate load row ID: l;Invalid or duplicate zoom preset: p→Duplicate zoom preset ID: p;Invalid timeline column: c(for an ID) →Duplicate column ID: c;Invalid timeline marker: m(for an ID) →Duplicate marker ID: m; an empty ID givesInvalid load row ID: "",Invalid zoom preset ID: "",Invalid column ID: ""orInvalid marker ID: "". All stay Error. - GanttChart, inputs that are now rejected: a marker, column, zoom preset or load row ID that is not a string (such as
3ortrue), which the looser!idcheck accepted and rendered, is now reported throughvalidation-error(Invalid marker ID: 3); anullentry inloadRowsgivesInvalid load row ID: undefinedinstead of a TypeError. What to do: pass string IDs, for exampleString(id). - NetworkGraph, error class: an unknown
backgroundisRangeError: Unknown NetworkGraph background: <value>(was Error, same text), like an unknownedgeStyleorroutingPolicy; a customlayoutresult without positive finite dimensions is a RangeError (was Error, same textA custom layout must return positive finite dimensions);Missing or invalid layout box: <id>is split intoMissing layout box: <id>(Error) for a node without a box andInvalid layout box: <id>(RangeError) for a box without finite coordinates and a positive size, the texts ofvalidateGraphLayoutResponse. Its group, node, edge and port checks take the graph texts described below. - If you match on component messages: replace
/Invalid or duplicate (load row|zoom preset)/,/Invalid timeline column/and ID matches on/Invalid timeline marker/with theInvalid <kind> ID:andDuplicate <kind> ID:texts above,/Missing or invalid layout box/with/layout box: /, and checks such aserror.constructor === Errororname: 'Error'for header bands, marker times, column widths,backgroundand custom layout geometry with RangeError. - Graph core and NetworkGraph, IDs: the ID rule and texts above now also cover the graph side. Node, edge, named port, group and export group IDs, and the IDs of view binding entities and targets, must be non-empty strings, unique within their collection (port IDs within their node), and are reported as
Invalid <kind> ID: <value>orDuplicate <kind> ID: <id>(Error, as before). Before → after:Graph node IDs must not be empty→Invalid graph node ID: "";Graph edge IDs must not be empty→Invalid graph edge ID: "";Invalid graph port on node: afor a port ID →Invalid port ID: "" (graph node a)orDuplicate port ID: p (graph node a)(the old text stays for an invalid direction or offset);Invalid graph group: gfor a group ID →Invalid graph group ID: ""orDuplicate graph group ID: g(the old text stays for a group without nodes);Invalid or repeated group member: a→Unknown node in graph group g: aorDuplicate group member ID: a (graph group h);Invalid or duplicate export group: g→Invalid export group ID: ""orDuplicate export group ID: g;createId returned an empty node ID for: a→Invalid graph node ID: "" (createId for a)andCloned node ID is already in use: c→Duplicate graph node ID: c (createId for a)(graph edgefor edges);A graph layout request needs a nonempty requestId→Invalid graph layout request ID: "";Invalid entity reference: kind and id must be non-empty stringsfor an invalid ID →Invalid entity ID: <value>(the old text stays for an invalid kind);Invalid view targetfor an invalid ID →Invalid view target ID: <value>;Invalid load target: resourceId must not be empty→Invalid resource ID: <value> (load target). Anullentry ingroupsgivesInvalid graph group ID: undefinedinstead of a TypeError. NetworkGraph's group checks andcollapseGraphGroupsnow share one implementation, so the same defect gives the same text in both. - Graph core, unknown references: one shape,
Unknown <kind> in <owner>: <value>, as inUnknown resource in assignment: <id>, where the owner is what holds the reference.Unknown endpoint on graph edge: e→Unknown node in graph edge e: zz, which names the missing node (fromis checked beforeto), inindexGraphand every function that calls it,collapseGraphGroups,traverseGraph,routeGraphEdges, NetworkGraph and graph snapshot diagnostics;Invalid port on graph edge: efor a port its node does not have →Unknown port in graph edge e: q(the old text stays for a port whosedirectionforbids that end);Unknown parent group: p (group g)→Unknown parent group in graph group g: p;Unknown collapsed group: x→Unknown group in collapsedIds: x;Unknown root node ID: x(layoutTreeGraph,layoutRadialGraph) →Unknown node in roots: x;Unknown graph node ID: x(shortestGraphPath) →Unknown node in fromId: xorUnknown node in toId: x.Unknown node in graph deletion,Unknown edge in graph deletionandUnknown node in graph clonealready had this shape; like every reference text they now show an empty ID as"". - Graph core and NetworkGraph, inputs that are now rejected: a node, edge or port ID that is not a string (such as
5,trueor an object), which the looser!idchecks accepted, now throws inindexGraphand every function that validates a graph through it:layoutLayeredGraph,layoutTreeGraph,layoutRadialGraph,layoutCircularGraph,layoutGridGraph,layoutConcentricGraph,layoutForceGraph,topologicalOrder,findGraphCycles,shortestGraphPath,filterGraph,graphComponents,graphDegreeCentrality,graphBetweennessCentrality,graphPageRank,detectGraphCommunities,graphDeletion,removeGraphElements,cloneGraphElementsandrenderGraphSvg; so does an edge ID intraverseGraph, a group ID incollapseGraphGroupsandbuildGraphLayoutRequests, an export group ID inrenderGraphSvg, and a load targetresourceIdinbuildViewBindingIndex,resolveEntityRefsandresolveLoadTargets. NetworkGraph no longer renders such IDs innodes(also with a customlayout),edges, nodeportsorgroups; it throws while rendering, as for other invalid props. The types already declare these IDs asstring, so typed code is unaffected. What to do: pass string IDs, for exampleString(id). renderTimelineSvgcolumns: an invalid or duplicate column ID givesInvalid column ID: <value>orDuplicate column ID: <id>(wasInvalid timeline column: <id>for both), the texts and the strict rule of GanttChart, which now runs the same column, header band, marker and load row checks asrenderTimelineSvg; a column ID that is not a string (such as7) now throws. A width that is not finite and positive is stillRangeError: Invalid timeline column width: <id>.- GanttChart
snapandminDuration:RangeError: Invalid snap or minDurationis split intosnap must be finite and positiveandminDuration must be finite and positive(the active zoom preset'ssnapcounts assnap; when both are invalid, the snap error is reported).editTimeRangeuses the same texts:Editing requires a finite displacement and positive snap/minimum duration→delta must be finite,snap must be finite and positiveorminDuration must be finite and positive, checked in that order. The class (RangeError), the accepted values and the order relative to the other checks are unchanged. - If you match on graph, column or snap messages: replace
/must not be empty/with/^Invalid graph (node|edge) ID: /;/Unknown endpoint/with/^Unknown node in graph edge /;/Invalid port on graph edge/(for unknown ports) with/^Unknown port in graph edge /;/Invalid graph group/(for IDs) with/graph group ID: /;/Invalid or repeated group member/with/^Unknown node in graph group |^Duplicate group member ID: /;/Unknown parent group: /with/^Unknown parent group in graph group /;/Unknown collapsed group/with/^Unknown group in collapsedIds: /;/Unknown root/with/^Unknown node in roots: /;/Unknown graph node/with/^Unknown node in (fromId|toId): /;/createId returned/and/already in use/with/^(Invalid|Duplicate) graph (node|edge) ID: .* \(createId for /;/Invalid or duplicate export group/with/export group ID: /;/requestId/with/^Invalid graph layout request ID: /;/Invalid entity reference/,/Invalid view target/and/resourceId must not be empty/for IDs with/^Invalid (entity|view target|resource) ID: /;/Invalid timeline column:/with/^(Invalid|Duplicate) column ID: /; and/snap or minDuration/and/Editing requires/with/^(delta|snap|minDuration) must be finite/. - Changes to APIs added in this release cycle (not breaking for 0.5.0 users):
comparePlansvalidates each side with the scheduler's own rules, also when aresultis given, and appends the side to every error of that side, for exampleDuplicate task ID: a (current plan)orInvalid task duration: a (candidate plan); its own messages no longer repeat the label (The candidate plan needs an input→A plan needs an input (candidate plan),Invalid schedule result of the current plan→Invalid schedule result (current plan)). A cycle or an infeasible plan is still a result state.rescheduleFromActualsreports an invalid actual interval with the scheduler's message for the same defect plus(actual interval of task <id>), for exampleActual intervals must align with the horizon and quantum: a→Scheduling dates must align with the horizon and quantum (actual interval of task a),Actual intervals need finite start and end times: a→ the same alignment message,Actual intervals must end after they start: a→Working periods must have finite integer endpoints and positive length (actual interval of task a)andActual intervals must lie inside the schedule range: a→Scheduling dates must lie inside the schedule range (actual interval of task a); overlaps, future and off-calendar actuals and finished tasks with remaining work stay diagnostics with the same codes. Marker ranges, windowed data, the iCalendar import, the MS Project calendars, resources and assignments andplanBaselinesuse the texts above. PlacementDiagnosticis now the unionPlacementPredecessorDiagnostic | PlacementSummaryDiagnostic, discriminated bycode, becausebuildPlacementInputcan reportunplaced-subtasksfor summary tasks. Plans withoutparentIdnever produce it, but TypeScript code that readspredecessorIdordependencyIdof aPlacementDiagnosticno longer type-checks. What to do: checkcode === 'unplaced-predecessor'first.
Added
NetworkGraph
- Obstacle-avoiding orthogonal routing, opt-in: the
avoidNodesprop and theavoidNodesoption ofrouteGraphEdges(trueor aGraphObstacleAvoidancewithclearance, default 8, andbendPenalty, default 24) route orthogonal edges without waypoints around every node box, collapsed-group proxies included, leaving and entering on the same sides as before. Waypoints keep their precedence, self-loops and clear bypass lanes are kept, and an edge without a route around the boxes keeps the plain orthogonal route. Drag and resize previews andexportSvg/exportPngdraw the same routes; the previews also reroute the orthogonal edges without waypoints whose saved route meets the old or new clearance area of a changed box, found with a spatial index of the saved routes, so a route moves out of the way of a box dragged across it during the drag rather than only after the drop (past 32 such edges in one frame, they follow on the drop). The newfindOrthogonalRoute(from, to, obstacles, options)(withGraphRouteEnd) exposes the router: A* over a sparse grid of lines between box edges, deterministic and bounded. Without the option, routes are unchanged. - Port rules, opt-in: the
connectionRulesprop (GraphPortRules: per-portGraphPortRulewithtype,directionin/out/bothandmaxConnections, a rule per node for connections without a port, and adefault) checks every connect and reconnect proposal, pointer and keyboard, beforevalidateConnection; a broken rule is rejected with a readable reason throughconnect-rejectedand the live region, and a proposal that passes still goes tovalidateConnection. While a connection is in progress, handles getvw-is-valid-targetorvw-is-invalid-target(invalid ones also anaria-descriptionwith the reason), styled with the new--vw-connect-validand--vw-connect-invalidvariables and distinguishable without colour. Rules live outside the node data, so existing data and types are unchanged; without the prop, markup and behaviour are unchanged. Core addscreateGraphConnectionChecker,checkGraphConnection(codesunknown-node,unknown-port,direction,type-mismatch,limit-reached; a reconnection leaves its own edge out of the counts),graphConnectionTargets(valid ports and nodes for a connection in progress),graphConnectionViolations(audit of existing edges) andgraphConnectionValidator(rules composed with your own validator), with the typesGraphPortDirection,GraphPortRule,GraphPortRules,GraphConnectionRejectionCode,GraphConnectionRejection,GraphConnectionCheck,GraphConnectionViolation,GraphConnectionOrigin,GraphConnectionTargetsandGraphConnectionChecker. See Port rules and valid-target hints. - Inline label editing (
editableLabels): a double-click, or F2 on a focused node or edge, opens a text editor over the label. Enter or leaving the editor proposes the text throughlabel-edit(GraphLabelEditwithkind,id,beforeandafter), Escape discards it, and new data or a new layout cancels it.validateLabelEditandlabel-edit-rejectedfollow the other validators. The editor is named "Edit label of" plus the label (labels.editLabel);labels.labelRejectedlocalizes the rejection. - Lasso selection:
selectionMode: 'lasso'turns theboxSelectShift-drag into a free-form outline that selects the nodes whose centre it encloses, with the same modifiers, auto-pan, Escape and events as box selection. Core exports the hit testsgraphPointInPolygonandgraphNodesInPolygonand theGraphSelectionModetype. - Slots
node-toolbarandedge-toolbar(HTML anchored above the only selected node or the selected edge, named bylabels.nodeToolbarandlabels.edgeToolbar),group(a group's frame and label, keeping a transparent move handle) andminimap-node(a node in the minimap), typed byNetworkNodeToolbarSlot,NetworkEdgeToolbarSlot,NetworkGroupSlotandNetworkMinimapNodeSlot. Slot content is not exported to SVG or PNG. - Stylesheet for these features: the classes
vw-label-editor,vw-lasso-selection,vw-node-toolbar,vw-edge-toolbar,vw-group-handle,vw-minimap-customand thevw-has-slotandvw-labels-editablemodifiers, and the variables--vw-label-editor-widthand--vw-toolbar-offset. The group frame, group label and minimap rectangle rules no longer reach slot content; their specificity is unchanged. lanesdraws swimlane bands and titles (named groups, titles clipped to the header) behind the graph, in the minimap and inexportSvg/exportPng, with the CSS classesvw-swimlane,vw-swimlane-band,vw-swimlane-header,vw-swimlane-title,vw-minimap-laneand the variables--vw-lane-fill,--vw-lane-fill-alternate,--vw-lane-header-fill,--vw-lane-borderand--vw-lane-title; seelayoutSwimlaneGraphunder Graph core.edgeBands(GraphEdgeBand:width,reference,label;graphFlowBandsbuilds it from a flow layout, see Graph core) strokes the path of each listed edge with the band width (classesvw-network-bandandvw-is-reference, dashed), without markers, with a hit area at least as wide and the band label as its accessible name, widest bands first; the edge slot getsband.exportSvg/exportPngpass it on. New CSS variables--vw-flow-band-opacity,--vw-flow-band-active-opacity,--vw-flow-reference-opacityand--vw-flow-reference-dash. WithoutedgeBands, markup and exports are unchanged.
GanttChart
summaryDependencies(opt-in): a dependency end may name a summary row (a row with child rows) instead of a bar, and is drawn to the start or finish edge of the row'sshowSummariesrollup bar, following the link type and the rollup as its descendants move, drag previews included. Collapsed summaries keep their links; a summary without a drawn rollup bar hides the link like a hidden bar. Connector styles, lag labels, highlights, selection, deletion, reconnect handles, right-to-left charts and virtualisation work as for other links, and the accessible name uses the row label. Withconnectable, rollup bars get link handles and accept dropped links, proposed throughconnectandreconnectas usual (reject FF and SF links into a summary invalidateConnection, asscheduleTasksthrows for them).exportSvg,exportPngandrenderTimelineSvg(optionsummaryDependencies) draw the same links. New core options:validateTimelineData(rows, bars, dependencies, laneCount, { summaryDependencies })(TimelineDataOptions) andtimelineFromMsProject(project, { summaryDependencies }), which keeps links to summary tasks independenciesinstead ofhiddenDependencyIds. Without the options, markup, exports and results are unchanged.markerRanges(TimelineMarkerRange): highlighted half-open ranges[start, end)drawn as a band under the bars, across the body or only acrossrowIds, with a label strip at the bottom of the time header (role="img", named<label> <start>–<end>withformatTime). Optionaltone; otherwise the new--vw-range,--vw-range-line,--vw-range-inkand--vw-range-opacityvariables (dark theme values included). Ranges are clipped torangeand the visible time window, mirrored in right-to-left charts, hatched in forced colors, printed, and drawn byexportSvg,exportPngandrenderTimelineSvg(markerRangesoption; theme coloursrange,rangeLineandrangeInk). A duplicate or missing ID or an unknown row is anError, and endpoints that are not finite withstart < end(including a zero-width range) aRangeError, reported throughvalidation-error. Pointmarkersare unchanged.visible-window-change(TimelineVisibleWindow: the rendered half-open time window[start, end), the rendered row IDs after collapsing with overscan, and the expanded parent rows), emitted after mounting once the window has settled for the newvisibleWindowDelayprop (default 100 ms), and only when it changed; scrolling, resizing, zooming and collapsing re-emit it. Nothing is emitted during server rendering and the markup is unchanged. See Partial data loading.
Graph core (vue-weave/core)
- Swimlane layout for process flows:
layoutSwimlaneGraph(nodes, edges, { lanes, laneOf, direction, ... })puts every node in its own lane's band, with ranks from the layered layout (cycles and self-loops share a rank), lanes in the caller's order (never reordered; empty lanes keep a band) and barycenter ordering inside a lane, with the shared layout defaults (nodes 144 × 58,columnGap50,rowGap24,padding20). It returns aGraphSwimlaneLayout(aGraphLayoutpluslanes: band, header,indexandnodeIdsper lane). A node without a lane or with an unknown lane throws anError.graphSwimlaneAt(lanes, pointOrBox)tells which lane a point or box centre falls in, so an application can turn anode-moveproposal into a lane change.renderGraphSvgtakes the samelanesoption as the NetworkGraph prop. TypesGraphSwimlaneSpec,GraphSwimlaneBand,GraphSwimlane,GraphSwimlaneLayoutandGraphSwimlaneLayoutOptions. - Quantity flow (Sankey) projection:
layoutFlowGraph(nodes, edges, { quantity, unit, displayUnit, direction, nodeThickness, nodeGap, rankGap, scale, ... })returns aGraphFlowLayout, aGraphLayoutfor thelayoutprop plusnodes(GraphFlowNode: box, rank,inflow,outflow,difference,valueand the reference totals),bands(GraphFlowBand: edge ID, quantity, unit,thickness = quantity × scaleon one scale for the whole picture, drawnwidth, source and target sides and offsets, centre-line path and a label such asCut → Inspect: 60 pcs) andexcluded(GraphFlowExcludedEdge). Ranks and orders come from the layered layout with barycenter sweeps; bands are stacked along each side by the position of their other end. The unit is required, and edges in another unit than the displayed one are listed inexcludedand never added. Totals are reported as given, never balanced. A quantity must be a finite number of at least 0 (RangeError); a zero keeps a hairline band. Edges that close a cycle and self-loops becomereferencebands routed below the ranks and counted apart from the totals; loops are not unrolled by period.scaleis{ pixelsPerUnit }or{ fitExtent }(GraphFlowScale).graphFlowBands(flow)builds the band map for the NetworkGraphedgeBandsprop, andrenderGraphSvgtakes the sameedgeBandsoption. See Quantity flow projection and Quantity flows. - Stable incremental placement:
layoutGraphIncrementally(nodes, edges, positions, options?)(GraphIncrementalLayoutOptions,GraphKnownPosition) returns a completeGraphLayout(GraphIncrementalLayout, withplacedIds,movedIdsandfallbackIds) in which every positioned node keeps its box exactly and each new node is placed on the flow side of its placed neighbours (after predecessors, before successors, in all four directions) in free space, keeping the column and row gaps; chains of new nodes follow their dependency order, components without a positioned node are laid out as a layered block next to the others, and positions of unknown IDs are ignored.fixedIdspins nodes; the relaxed modemaxDisplacement(default 0) may push unfixed blocking nodes across the flow by a bounded distance; new boxes stay nonnegative unlessallowNegative;previousLayoutkeeps the paths of edges between unchanged boxes. Deterministic, iterative, with a bucket grid for overlap tests.graphLayoutChangeMetrics(before, after, options?)(GraphLayoutChangeMetrics,GraphLayoutChangeOptions) measures one layout change, as a diagnostic for tests and evaluation: maximum and total displacement of the nodes that had a position, overlapping box pairs and edges through unrelated boxes.
Timeline and calendars (vue-weave/core)
calendarZoomPresets(range, options): readyzoomPresetsfor hours, days, weeks, months, quarters and years (CalendarZoomLevel), each withpixelsPerUnit,tickSteps,snap, header bands fromcalendarBandsin an IANAtimeZoneor fixed offset, and a matchingformatTime, labelled in alocale.calendarBandstakes the new optionslocaleandlabelFormatfor locale-aware band labels.intlTimeFormatter(options): aformatTime-compatible function on a cachedIntl.DateTimeFormatfor a locale, IANA time zone or fixed offset and format options. It never uses the runtime's default locale or time zone, so server and client output match.createWorkingTimeScale(range, periods, pixelsPerUnit, nonWorkingRatio = 0.1)anddefaultNonWorkingRatio: a ready-made piecewise-linearTimeScalefor the GanttChartscaleprop that gives working periods (asbuildWorkPeriodsreturns them) the base width and other time a compressed share of it. It is strictly increasing, continuous and exactly invertible at segment boundaries, extrapolates beyond the range, clips and unites unsorted or overlapping periods, and uses binary search per call. A ratio of 0 is rejected with aRangeErrorso the scale stays invertible.
Scheduling and resources
- Summary tasks in the scheduler:
ScheduleTask.parentIdmakes a task a subtask, and a task that other tasks name as parent is a summary task whose dates are the span of its subtasks. FS and SS links into a summary bind the start of every subtask (FF and SF links into a summary throw an Error, as Microsoft Project does not allow them); links from a summary use its rolled-up start or finish. A summary'sstartNoEarlierThanandfinishNoLaterThanbind its subtasks;fixedStart,startNoLaterThan,finishNoEarlierThan,manualandmode: 'alap'on a summary throw an Error. Results mark summaries withsummary: true, give them the span of their subtasks' latest dates, the smallest float of their subtasks and a critical flag when any subtask is critical, and give subtasks theirparentId. Unknown parents, parent cycles and links between a summary and its own subtask throw an Error that names the tasks; a dependency cycle through a summary's roll-up is acyclefailure.propagateEditrefuses to edit a summary,rescheduleFromStatusDatefrees started subtasks from the start bounds of their summaries,levelResourceslevels the subtasks and gives summaries no load, andbuildPlacementInputkeeps what binds the placed subtasks of an unplaced summary: they move to their nearest placed ancestor and take over thestartNoEarlierThanandfinishNoLaterThanof the unplaced summaries they skip, stay inactive below an inactive one, and links into an unplaced summary still bind its placed leaf subtasks (anunplaced-predecessordiagnostic when the link comes from an unplaced task). A placed summary that is active but has no placed active leaf subtask is anunplaced-subtasksdiagnostic (notok) and is left out like an unplaced summary, instead of being scheduled with its own duration.buildPlacementInputchecks the summary rules on the whole input and throws the scheduler's Error for a rule broken by unplaced tasks too. Plans withoutparentIdare scheduled exactly as before. See Summary tasks. PlacementResult.retargetedDependencies(PlacementRetargetedDependency:id,dependencyId,summaryId,taskId), present only when not empty: the links of a placement input that replace a link from a placed task into an unplaced summary, one per placed leaf subtask, so thatcriticalDependencyIdsand traces map back to the input link.buildPlacementInputdiagnostic{ code: 'unplaced-subtasks', taskId }(PlacementSummaryDiagnostic) for a placed summary task without a placed active subtask; it comes before theunplaced-predecessorentries (now also exported asPlacementPredecessorDiagnostic) and makesokfalse.- Time-varying resource capacity, opt-in:
ResourceCapacity.capacityPeriods(ResourceCapacityPeriod:start,end,capacity) replaces a resource'scapacityover fixed half-open intervals; outside themcapacityapplies, and outside the availabilityperiodsthe capacity stays 0. Overlapping, empty or inverted periods and invalid capacities throw a RangeError that names the resource.calculateResourceLoadsplits its segments where the capacity changes and measures overload against the capacity valid at each time, so GanttChart's capacity line andrenderTimelineSvgfollow it with no new prop;levelResourcesreserves against the same capacity, so leveling and the load calculation agree. Planning snapshots validate the field. - Assignments for part of a task, opt-in:
ResourceAssignment.workOffsetandworkDurationlimit an assignment to part of the task's working time, measured along its scheduledworksegments, so the part moves with the task and skips breaks, pauses and splits. A part beyond the work is clipped.calculateResourceLoadandlevelResourcescount the resource only during the part,projectResourceTimelinestill shows the whole task on its row andproposeResourceAssignmentkeeps the part on a replacement. NewassignmentWorkPeriods(work, assignment)returns the part's elapsed periods. Input without the new fields gives the same results as before. See Compare demand with capacity. - Rescheduling from recorded actuals, opt-in:
rescheduleFromActuals(input, statusDate, actuals)takes recorded actual intervals per task (TaskActuals: half-openintervals, optionalremainingWorkandfinished), keeps them exactly as recorded, also on non-working time, and schedules only the remaining work from the status date (or the last actual end, if later) on the task's calendar, links and bounds. The default remaining work is the duration minus the elapsed length of the actuals, at least 0. Started tasks drop their start bounds and incoming FS and SS links and keep FF and SF links, as inrescheduleFromStatusDate; finished tasks end at their last actual end. TheRescheduleFromActualsResulthas the forecastschedule, the originalplan, per-taskActualsTaskentries with separateactualandremainingwork, and diagnostics (ActualsDiagnostic:actual-overlap,actual-after-status-date,actual-outside-calendar,actual-contradiction, followed by those of the schedule); an infeasible forecast is returned with the actuals kept. Summary, manual and inactive tasks are supported.rescheduleFromStatusDateis unchanged.actualsTimelineBars(result, options?)(ActualsTimelineBarOptions) turns the result into GanttChart bars that show the original plan as a baseline, the recorded actuals as a solid<label> · actualbar and the remaining forecast as an outline<label> · forecastbar on one row. - Plan scenario comparison:
comparePlans(current, candidate)compares twoPlanScenarios (ascheduleTasksinput with optional resources and assignments, optional precomputedresultandload,revision,baseRevisionandpartial) and returns aPlanComparisonwith separateinputdifferences (settings, tasks, dependencies, calendars, resources and assignments, with the changed field names) andresultdifferences (schedule state per side, final completion, per-task date shifts and critical changes, tasks edited versus moved as a consequence, critical dependencies,deadline,manual-conflictandleveling-unresolvedviolations gained and lost, and cumulative overload per resource). Cycles and infeasible plans are reported, not thrown; partial plans make the comparison incomplete and a moved base revision marks it stale.planComparisonTargetsturns compared tasks into view and load targets for the highlight props, andplanBaselinesturns a schedule into a named baseline set.PlanComparisonTask.deadlineis an optional due time that the scheduler ignores. New typesPlanComparisonTask,PlanComparisonInput,PlanScenario,PlanScheduleState,PlanTaskSide,PlanFieldChange,PlanCollectionDiff,PlanAssignmentChange,PlanAssignmentDiff,PlanInputDiff,PlanViolation,PlanTaskComparison,PlanResourceOverload,PlanResultDiff,PlanComparison,PlanComparisonTargetOptionsandPlanComparisonTargets.
Interchange
fromMsProjectXmlalso reads calendars, resources and assignments. New optional fields ofMsProjectImport:calendars(MsProjectCalendar, each a completeWorkWeekwith base calendars resolved, weekday working times and exceptions as one-off dates),defaultCalendarId,resources(MsProjectResource, whereIsCostResource1 orType2 is a'cost'resource) andassignments(MsProjectAssignment);MsProjectTask.calendarIdis set from a task'sCalendarUID. Each calendar exception is classified by itsTypebefore its dates are expanded: date ranges and the recurrences that can be expanded exactly (every N days, weekly onDaysOfWeek, monthly or yearly on a day or a weekday position, by end date or byOccurrences) become exactly their dates; other recurrences, alternate work weeks and unresolvable references are reported as warnings, and so is an exception that is a working day without working times (its dates stay days off) (new codesskipped-calendar,invalid-calendar,unsupported-calendar,unknown-calendar,skipped-resource,skipped-assignment). A file without these sections gives the same result as before.workCalendarsFromMsProject(project, range)buildsWorkCalendars from imported calendars, andresourceLoadFromMsProject(project, options?)maps imported resources and assignments to the inputs ofcalculateResourceLoad,levelResourcesandprojectResourceTimeline(units scaled to integers, 100 per full-time resource by default).timelineFromMsProjectaddsresourcesandassignmentsto its result when the plan has resources.toMsProjectXmlwrites optionalcalendars(exceptions as one-off dates),defaultCalendarId,resources(a'cost'resource asType0 withIsCostResource1),assignmentsand a task'scalendarId, so imported calendars, resources and assignments survive a round trip; without them the output is unchanged.fromICalendarreads RFC 5545 text into events (UID, SUMMARY, DESCRIPTION, DTSTART with DTEND or DURATION; UTC, floating,TZIDandVALUE=DATEtimes, resolved withIntl; the days and weeks of a DURATION are added to the local date of aTZIDstart, soP1Dends at the same local time the next day across a daylight saving change, and its hours as elapsed time), with warnings for unknown time zones, recurrence (only the first instance is imported), skipped events and malformed lines.timelineFromICalendarturns events into rows and bars. New typesICalendarImport,ICalendarImportEvent,ICalendarImportOptions,ICalendarImportWarning,ICalendarImportWarningCodeandICalendarTimeline.
Linked views and data loading
- Time range exploration, opt-in:
timelineBarsInRange(bars, range, { rowIds })returns the bars worked on in a half-open range[start, end), using the worksegmentsof a split bar (a pause that covers the whole range does not count), counting a milestone at t whenstart <= t < end, and treatingstart === endas an instant; it throwsRangeErrorfor a range that is not finite or ends before it starts.resolveTimeRangeTargets(index, barIds, { graph, traversal })turns those bars into the entities and targets they stand for through the view bindings and, with atraverseGraphtraversal (successors, predecessors, both, a hop limit), into related entities and targets, kept apart from the active ones.useLinkedSelectiontakes an optionaltimeRange(LinkedTimeRange): active targets join thehighlighted*sets and related ones fill the newrelatedNodeIds,relatedEdgeIds,relatedGroupIds,relatedBarIds,relatedDependencyIds,relatedRowIdsandload.relatedsets (empty without it); the composable also returnstimeRange. The range never changes the selection. New typesTimelineBarActivity,TimelineBarsInRangeOptions,TimeRangeTargetsOptions,TimeRangeTargetsandLinkedTimeRange. - Partial (windowed) data loading, opt-in and additive, driven by the GanttChart
visible-window-changeevent. The new pure core request state (createWindowedDataState,setWindowedView,resolveWindowedRequest,rejectWindowedRequest,retryWindowedData,invalidateWindowedData,cancelWindowedRequests,resetWindowedData,windowedCellStatus,windowedCoverage) aligns views to configurable chunks with padding, keys requests by window, rows and a caller-supplied condition token, aborts superseded requests, ignores late and out-of-order answers, deduplicates items and links by ID across overlapping windows, keeps loaded data on failure, and reports a per-cell status (unloaded,loading,loaded-empty,loaded,failed) and acompletecoverage flag.useWindowedData(options)wires it to Vue with the application'sload(request, { signal }),retry,invalidateandcancel; a new condition aborts and drops everything of the old one before the new view is checked, answers are matched by request ID and condition, and an invalid view (such as more thanmaxCellscells) is reported througherror.splitDanglingLinksseparates links whose both ends are loaded from those that point to missing items and re-attaches them when the items arrive. See Partial data loading and Loading only what is visible. - Graph neighbourhood expansion:
createGraphExpansion,beginGraphExpansion,cancelGraphExpansion,mergeGraphExpansionPageandgraphExpansionViewmerge one-hop pages, track expanded nodes and keep dangling edges out of NetworkGraph's input. They place nothing themselves; to keep the shown nodes in place, place each page withlayoutGraphIncrementally(see Graph core). - Asynchronous layouts: optional
fixedIdsandaddedIds(ReadonlySet<string>) onGraphLayoutRequestInput,GraphLayoutRequest,GraphLayoutKeyInputandAsyncGraphFrame, carried throughbuildGraphLayoutRequests,useAsyncGraphLayoutand the Worker messages (ID arrays in JSON), so an adapter can forward pinned and new nodes to an incremental layout engine. They enter the input key only when present: requests and keys without them are unchanged.
Fixed
fromMsProjectXmlleaves out aDurationorLinkLagtoo large to be a finite number, with aninvalid-valuewarning, instead of importingInfinity, which madetoMsProjectXmlandtimelineFromMsProjectthrow on the imported plan. A date-time whose zone offset is more than 18 hours or 59 minutes is unreadable, and its task is skipped with askipped-taskwarning.renderTimelineSvgno longer throws "Maximum call stack size exceeded" for a chart with very many range or lag labels.- GanttChart and
renderTimelineSvgtick labels no longer overlap where notickStepsentry keeps every tick 76 px apart, such as the squeezed non-working time of acreateWorkingTimeScaleaxis or another non-linearscale: a label without 76 px of room before the next tick is left out, and its grid line stays. Charts whose step fits everywhere are unchanged.
Examples
- New standalone demos:
- Process lanes: a machining process with one lane per department (Purchasing, Machining, Inspection and an empty Shipping lane), controls to add a step to a chosen lane and to switch the flow direction, and drag-to-hand-over between lanes through
graphSwimlaneAt. - Quantity flow: a lot of 100 pieces that splits 60/40 between two lines, merges at inspection, loses 4 pieces on line B and loops 10 pieces through rework (a dashed reference band), with a Flow unit selector (pieces or cost; cost-only overhead edges are listed, not drawn, in the pieces view), a node totals table with differences, band selection that shows the original edge ID and quantity, a direction selector and SVG export.
- Large plan: loads a 1,000-line, 26-week plan by visible weeks and rows from a simulated source with fixed delays and a failure toggle: window and per-row status, Retry, a filter that acts as the loader condition, and counters of fetched versus total bars (demo counters, not a benchmark). Below it, a 5,000-part graph is expanded one hop at a time; with Keep positions when expanding, each neighbourhood page is placed around the shown parts with
layoutGraphIncrementally, the camera stays where it is, and the largest move of a shown part (graphLayoutChangeMetrics) is shown; it stays 0.
- Process lanes: a machining process with one lane per department (Purchasing, Machining, Inspection and an empty Shipping lane), controls to add a step to a chosen lane and to switch the flow direction, and drag-to-hand-over between lanes through
- The design gallery adds a Calendar views showcase.
- The scheduling demo adds:
- Compress non-working time, which swaps both charts to a working-time scale; times, snapping and edits are unchanged.
- Summary task links: a small plan whose links end at a summary task's rollup bar, with link editing and SVG export.
- Recorded actuals: a finished task that overran, a late start that ran into the lunch break and resumed, an upward revision of remaining work (Welding needs 3 h more) and unstarted successors, with plan, actual and forecast on each row and a legend.
- The linked views demo adds:
- Time range controls: start and end times, a resource restriction and Active only, With successors, With predecessors or With direct neighbours. Active tasks are highlighted in every view; related tasks are marked in the graph through
relatedIds. - Compare plan scenarios: plan maintenance of the CNC cell, create a candidate (push the work later or move it to a backup saw), compare final completion, deadline misses, changed assignments and cumulative overload per resource, filter Tasks I changed and Tasks that moved as a result, select a row to highlight the tasks and load in the graph and the Gantt chart (the current plan drawn as a baseline set), then Discard candidate or Adopt candidate, which Undo plan change reverts in one step.
- Time range controls: start and end times, a resource restriction and Active only, With successors, With predecessors or With direct neighbours. Active tasks are highlighted in every view; related tasks are marked in the graph through
- The diagram demo has an Avoid nodes toggle.
- The Edit graph tools add Typed ports (a small graph with typed, directed and limited ports that shows valid-target hints and rejection reasons), Edit labels, Lasso selection and Item toolbars (node and edge toolbars with Frame and Remove actions, a custom group frame and round minimap nodes).
- The demo app lists its examples in one registry (
examples/demos.ts) and shares a panel frame, a status line and an ID helper between demos. Visible text, accessible names and default states are unchanged.
Packaging
- Internal declaration files are no longer shipped: the build removes every file under
dist/typesthat the declarations ofvue-weaveandvue-weave/coredo not reach, andnpm run test:packagefails if one is packed. Deep imports of internal.d.tspaths were never supported. The entry declarations, JavaScript and stylesheet are unchanged.