Repository navigation
v1.3.0
Adds recurring events, automatic edge label placement, GanttChart header sorting and filtering, PropertyInspector assignment and dependency fields, TaskBoard collapse, filters and WIP minimums, and an opt-in CSV formula escape. It also fixes the findings of a full review of the components, the core and the interchange (including imports that a small hostile file could stall for seconds), and refactors large parts of GanttChart, NetworkGraph and the core without changing their results. A few changes are not strictly backward compatible: they are listed under "Breaking changes" and marked Behaviour change under "Fixed"; read them before upgrading.
Breaking changes
resourceLoadHistogramnow throws aRangeError, not anError, for load segments that overlap within a resource, like its other checks of times, load and capacity (an unknown resource still throws anError). GanttChart reports overlappingloadSegmentsthroughvalidation-errorwith the sameRangeError. Who is affected: code that tells this failure apart by its class, for exampleerror.constructor === Erroror!(error instanceof RangeError). What to do: check forRangeError; the message is unchanged.
Added
- Recurring events (RFC 5545 RRULE), opt-in: new core functions
parseRecurrenceRule,formatRecurrenceRule,expandRecurrence,expandRecurringEventsandapplyRecurringEditwith the typesRecurrenceFrequency,RecurrenceWeekday,RecurrenceRule,RecurrenceZoneOptions,CalendarRecurrence,RecurrenceSeries,RecurrenceOccurrence,RecurrenceExpandOptions,RecurringEditScope,RecurringEditTarget,RecurringEditChangeandRecurringEditOptions. DAILY, WEEKLY, MONTHLY and YEARLY rules with INTERVAL, COUNT, UNTIL, BYDAY (with ordinals), BYMONTHDAY, BYMONTH, BYSETPOS and WKST, plus EXDATE and RDATE, expand in an IANA time zone or fixed offset and keep their local time across daylight-saving changes; sub-daily frequencies, BYHOUR, BYMINUTE, BYSECOND, BYYEARDAY and BYWEEKNO are rejected.CalendarEventgains the optionalrecurrence,seriesIdandrecurrenceId,EventCalendarEditthe optionaloccurrence, andEventCalendarLabelsthe optionalrecurring; EventCalendar names occurrences "…, Recurring" and marks them withvw-is-recurring, while events without these fields render as before.applyRecurringEditapplies an edit to one occurrence (override or EXDATE), to it and the following ones (split series) or to the whole series.fromICalendartakesrecurrence: 'series'(parsed rule, EXDATEs, RDATEs and RECURRENCE-ID overrides) orrecurrence: { range }(expanded occurrences, new typeICalendarExpandOptions); the default is unchanged.toICalendarwrites RRULE, EXDATE and RDATE for events withrecurrence, with TZID times and a VTIMEZONE for an IANA zone. The "Event calendar" demo has a weekly sync with a choice of edit scope. TaskBoard(opt-in, controlled): collapsible columns and lanes (collapsible,v-model:collapsed-column-ids,v-model:collapsed-lane-ids; collapsed areas render a narrow strip or only a header, are skipped by the keyboard and are not drop targets), afilterprop with "3 of 7" column counts (moves keep indices that count hidden cards, soapplyBoardCardMoveon the full array is right), andTaskBoardColumn.wipMinmarking columns under a minimum (vw-is-under-minimum).groupBoardCardstakes{ filter };TaskBoardCellgainsindicesandtotal,TaskBoardColumnStatusgainstotal,wipMinandunderMinimum(these new fields are required, so code that buildsTaskBoardCellorTaskBoardColumnStatusobjects by hand, for example in test doubles, must add them; values fromgroupBoardCardsalready have them), andTaskBoardLabelsgainswipMin,underMinimum,collapseandexpand. New CSS variables--vw-board-wip-under,--vw-board-collapsed-widthand--vw-board-collapsed-fill. The "Task board" demo shows them. Without the new props nothing changes.- NetworkGraph
edgeLabelPlacementprop (opt-in, default'midpoint', which keeps the current output):'avoid'or an options object moves edge labels along and beside their routes, away from node boxes, other labels and other edges where there is space. It runs after all routing,avoidNodesincluded; drag and resize previews place the labels of the changed edges and those near the changed nodes, and exportSvg and exportPng draw the placed labels. The diagram styles demo has a "Place labels clear" toggle. - Core
placeGraphEdgeLabels(layout, edges, options)withGraphEdgeLabelPlacementOptions(fontSize,glyphWidth,labelSize,labelText,gap,margin,samples,edgeIds,obstacles),GraphEdgeLabelSizeandGraphEdgeLabelPlacement: a deterministic greedy label placement that returns a new layout and keeps theedgeLabelsanchor meaning (centre and baseline of the text). - GanttChart header sorting and filtering, opt-in:
sortableColumns(true or column IDs,timelineLabelColumnIdfor the row label column) adds a sort button to each header ("Sort by Finish") that cycles that column's rule through ascending, descending and none, keeping the other rules, and proposes the sort throughupdate:sort; the button name carries the controlledsort("Sort by Finish (ascending)").filterableColumnsadds a filter button that opens a small dialog with a text filter (and a value list for aselectfield), proposingupdate:filtersfor the controlledfiltersprop; Escape closes it and returns focus. The chart never reorders or filters rows; apply the proposals withuseTimelineView(newsetFilters). NewGanttLabelsentriessortBy,sortedAscending,sortedDescending,filterBy,filtered,filterContains,filterValuesandclearFilter. Without the new props the markup is unchanged. - Timeline views:
TimelineViewState.filters(TimelineViewFilter:columnId, optionaltextandvalues), optional so states saved without filters still parse;projectTimelineViewkeeps the ancestors of filtered rows and sorts or filters by row label fortimelineLabelColumnId. New core helpersfilterTimelineRows(rows, predicate)(matches with their ancestors) andnextTimelineSort(sort, columnId). - PropertyInspector list fields, opt-in:
assignments(resource select, units, add and remove) anddependencies(predecessor, FS/SS/FF/SF type, lag, add and remove) tables infields, with accessible names such as "Units for Crane" and "Remove Crane". Each edit proposes the whole list through the newlist-changeevent, checked by the new corevalidateInspectorListand a synchronousvalidateListChange(list-change-rejected, reason shown inline). New typesInspectorListFieldKind,InspectorOption,InspectorAssignment,InspectorDependency,InspectorAssignmentsField,InspectorDependenciesField,InspectorListField,InspectorListChangeandInspectorListChangeValidator, and optionalPropertyInspectorLabelsentries for the table.changeandInspectorChangeare unchanged. toCsv(table, { escapeFormulas: true })(opt-in, new typeCsvOptions) writes text cells that start with=,+,-,@, a tab or a carriage return with a leading apostrophe, so spreadsheets do not run them as formulas. Number cells are unchanged, and without the option the output is the same as before.GraphEdgeLabelPlacementOptions.edgeWidth(edge), opt-in: the drawn width of wide edges such as flow bands, so a label keeps itsgapfrom the outer side of its band and other labels stay off the band. NetworkGraph passes theedgeBandswidths whenedgeLabelPlacementis on.labelSizeandedgeWidthmay returnnullas well as nothing.
Fixed
fromDrawioandfromDrawioAsyncread deeply nested containers in linear time (20,000 levels took about 36 seconds, now under half a second) and collect the label cells of edges in linear time; label cells now count againstmaxItemslike nodes, edges and groups, so a file with more thanmaxItemsitems including its label cells now throws a RangeError.toDrawiowrites a node label that has a line break also asvwLabelin the style, sofromDrawioreads it back whole instead of splitting it into label and detail. Files withoutvwLabelare read as before.timelineFromCsvTablebuilds WBS ancestors and the row order without quadratic work (a 20,000-level code in about 40 KB took about 10 seconds) and throws a RangeError for a WBS code of more than 1,000 levels.toMsProjectXmlwrites carriage returns in project, task, calendar and resource names as , so they survive a round trip instead of being read as line feeds.- Character references in draw.io HTML labels and Mermaid entity codes are decoded only for characters XML allows, as in the XML reader: references to C0 controls (other than tab and line breaks), U+FFFE and U+FFFF stay as written.
toMermaiddrops those characters and unpaired surrogates from labels, as the XML writers do. - SVG export theme colours must be CSS colour values (hex, colour names and keywords, and the functions
rgb,rgba,hsl,hsla,hwb,lab,lch,oklab,oklch,color,color-mix,light-dark,varandcalc), so a theme cannot put aurl()reference into the exported image. Behaviour change: other values, which were written into the SVG unchecked before, now throw a RangeError naming the key; the colours the components read from the stylesheet are not affected. - Behaviour change: the exposed TaskBoard
cancelMove()now reportscard-move-cancelwith the new reasonapi(added toTaskBoardMoveCancelReason), like EventCalendar'scancelEdit(); it reportedescapebefore. Code that switches on the reason should handleapi. - TaskBoard: with a
filteron, the arrow keys moved the focus to the wrong card, because the index counted hidden cards. Collapsed column and lane IDs are now compared by value andfilterby the cards it shows, so an equal array or a new function passed inline no longer cancels a move on every render of the parent; afilterthat is not a function is reported throughvalidation-error(TypeError fromgroupBoardCards). A drop on the card's own place now reportscard-move-cancel(no-target), as documented. Column and lane toggles are described by the column's count and WIP state and the lane's count, so collapsed areas still report them, and a card is described by itsdetail(its name is unchanged). Styles: the collapse chevron points the right way in right-to-left boards, forced-colors mode marks columns under their minimum and collapsed strips with dashed borders, and print shows the whole board without toggles. - EventCalendar: a keyboard edit that
validateEditrejected no longer takes the focus back to that event after a later, unrelated change ofevents, and the focus request is dropped when the focus moves elsewhere. A pointer cancellation no longer swallows the next click or Space.locale(andheightanddir) are validated and reported throughvalidation-errorinstead of failing during rendering. The hour gutter usesformatTimewhen it is given (default output unchanged), and month view events get a keyboard hint that names Up and Down (new optionalEventCalendarLabels.monthEditHint, defaulting todayEditHintwhen only that is localized). In forced-colors mode today's column keeps a system-colour background with aHighlightframe. - Edge label placement: with a
gapsmaller thanmargin, a label no longer lands on its own route instead of beside it; duplicate or invalid edge IDs throwDuplicate edge ID: <id>/Invalid edge ID: <id>instead of depending on the input order; an obstacle that is not a rectangle (such asnull) throwsRangeError('Invalid edge label obstacle at index <i>');labelSizereturningnulluses the estimate;samplesout of range readssamples must be an integer from 1 to 32 (got …); the outside-the-layout cost is weighed in label area. NetworkGraph drag previews also place labels whose estimated box (not just the anchor) comes near a changed node, and keep the saved anchors of edges rerouted along an unchanged path, so labels no longer jump when a drag starts. - NetworkGraph:
node-moveandnodes-movepayloads are plain objects again (the drag preview held reactive proxies, sostructuredClone(change)threw); an inlineavoidNodesobject literal no longer reroutes every edge and cancels a gesture in flight each time the parent renders; arrow keys on a node no longer propose a move while a keyboard connection is armed; hover tooltips and context menus treat resize and waypoint handle drags like the other pointer gestures; moving saved positions with collapsed groups no longer lays out the expanded graph again; alignment guide candidates are collected once per drag. rescheduleFromStatusDatelets a partly done task meet its ownfinishNoEarlierThan: the remaining work resumes later, as it already did for FF and SF links and asrescheduleFromActualsdoes, instead of returninginfeasiblewith['finishNoEarlierThan', 'fixedStart'].levelResourceswith{ explain: true }no longer takes cubic time: 1,000 unit tasks on one resource took about 16 seconds and recorded 503,500 reasons, and now take well under a second with 4,999. Adjacent capacity shortages with the same capacity now form onecapacityreason that names every holding task (see Explain a plan). Leveling withoutexplainscans each resource from a task's earliest start instead of from the start of the horizon; its results are unchanged.filterGraphwalks once from all matching nodes instead of once per match, so a 20,000-node chain where every node matches, withneighborhood: 20000, takes a fraction of a second instead of about two minutes. The result is unchanged.countGraphCrossingsvalidates its input: an unknowndirectionand a box without finite geometry and rank throw aRangeError, and an edge end without a box throws anError(Unknown node in graph edge <id>: <node>) instead of being skipped silently.traverseGraphrejects duplicate and empty node IDs with anError, as it already did for edges.graphAlignmentGuides,snapGraphPoint,graphNodesInPolygon,findOrthogonalRouteandgraphLayoutChangeMetricsthrow aRangeErrorinstead of aTypeErrorfor a missing (null or undefined) rectangle, box or point.layoutFlowGraphwith the default scale no longer throws for a rank too wide for 360 units (about 23 or more nodes): the default extent grows to that rank's gaps and minimum node sizes. Small graphs lay out as before, and an explicitfitExtentthat is too small still throws.validateTimelineDatanames the dependency inInvalid dependency type: <id>.- The numeric options of the graph routing, snapping, analysis and filter functions use the layout options' message format,
<option> must be <rule> (got <value>). Error classes are unchanged. - GanttChart header controls: the header cells no longer claim
role="columnheader"andaria-sortoutside a table row (assistive technology could ignore them, and only some headers had the role); the sort state is in the sort button name instead, also for secondary sort rules.nextTimelineSortkeeps the other sort rules and rotates only the activated column (a new column becomes the first rule). The filter text box is controlled like the value checkboxes (text the parent does not apply is replaced by the applied filter), whitespace-only text removes the filter, and text composed with an input method is proposed once, when the composition ends. EmptysortableColumnsorfilterableColumnslists no longer reserve thetimelineLabelColumnIdcolumn ID, and unknown IDs in these lists are reported throughvalidation-error. - GanttChart: a keyboard row move that is rejected or ignored no longer pulls focus back to the bar on a later
barsupdate; bar keys no longer edit, and a bar press no longer starts a drag, while an armed connection or another pointer gesture is in flight. A spreadsheet fill handle drag is now cancelled by Escape,cancelEdit(), new rows or columns andreadonlyorspreadsheetchanges withedit-cancel(emptybarIds), starts only for a primary pointer with no other gesture in flight, and blocks other gestures while it runs. A zoom change (buttons, presets, Ctrl+wheel,fitToBars) now cancels progress, constraint, connection and create drags withsource-changed, as documented. Validated props that do not change the rows (such asnow,markersortooltipDelay) no longer rebuild the row tree, which also cancelled a fill drag. Scrolling no longer reads the label column's layout on everyscrollevent, and vertical scrolling no longer recomputes the time window. - PropertyInspector list fields:
validateInspectorListrequires positive safe integer units (anddefaultUnitsandmaxUnitsmust be positive integers), asResourceAssignmentdoes, and safe integer lags, as schedule links do; a lag typed in display units (lagUnitSize) is rounded to whole model units. Messages andaria-invalidnow belong to the box or select that caused them (the type select included), so Escape or typing in one box no longer clears another box's rejection. useEditTransaction:submit,undoandredono longer throw when the adapter'svalidateorapplyorcreateOperationIdthrows; they resolve toinvalidwith the error message and save nothing.- EventCalendar, TaskBoard, GanttChart and NetworkGraph: a blank or whitespace-only rejection reason from any validator (
validateEdit,validateCreate,validateCardMove, GanttChart'svalidateConnection,validateCellEditorvalidateSheetEdit, NetworkGraph'svalidateConnection,validateDelete,validateEdgeReshape,validateNodeResizeorvalidateLabelEdit) now rejects with that validator's default text (such aslabels.rejected,labels.createRejected,labels.moveRejectedorlabels.connectionRejected), as PropertyInspector already did, instead of emitting and announcing an empty reason. - EventCalendar: a pointer drag in the day or week time grid that rests near the top or bottom of the visible grid now scrolls it, so an event can be moved, resized or created into hours scrolled out of view.
- GraphPalette and PropertyInspector use the default colours of the other components when
--vw-mutedand--vw-surface-hoverare unset: secondary text is#4c6371(was#4f6574) and hovered palette items and inspector buttons are#edf5fa(was#e4ecf2and#e3edf5). The stylesheet now defines these shared defaults once on the component roots; themes set through--vw-*variables are unaffected. toGraphMlandtoMermaidindent nested groups at most 32 levels deep, so their output grows linearly with the nesting depth instead of quadratically:toGraphMlthrew "Invalid string length" for 20,000 nested groups. Output for 32 or fewer levels is unchanged.fromMermaidskips anaccDescr { … }block up to the first}after it. A}earlier on the same line (such as}; accDescr {or a quoted label) sent the reader back before the block, so it looped without end, adding warnings until memory ran out, or failed with a misleading syntax error.- NetworkGraph: a pointer capture that the browser refuses (for example for a synthetic or already released pointer) no longer throws after the drag state was set, which left a half-started drag without
gesture-start.
These fix the unreleased recurring events:
applyRecurringEditwith'following'no longer throws "Duplicate event ID" after an'occurrence'edit of the same occurrence; the dropped override frees its ID for the new series.applyRecurringEditwith'following'on an RDATE now ends the series before it and starts the new series at the next rule instance, with the changed occurrence as an RDATE, instead of moving the rule onto the RDATE's weekday. ArecurrenceIdthat is not an occurrence of the series throws an Error.applyRecurringEditthrows an Error, instead of silently changing the rule's meaning, for a move to another day of a rule with BYDAY ordinals (2MO), BYSETPOS, BYMONTHDAY days outside 1–28, or BYMONTH when the occurrence changes month. Moves within the day are unchanged.toICalendarwrites a series with a nonzeroutcOffsetMinutesas local times with a fixed-offset TZID (UTC+0900) and VTIMEZONE instead of UTC, so BYDAY and BYMONTHDAY keep their local days;fromICalendarreads such a fixed-offset VTIMEZONE back asutcOffsetMinutes.toICalendarwrites overrides (seriesIdandrecurrenceId, new optional fields ofICalendarEvent) of a series in the same export with the series' UID and a RECURRENCE-ID, so a reimport with{ range }no longer shows the changed occurrence twice.- VTIMEZONE observances written by
toICalendarnow begin in the year before the zone's first event instead of after it (for example in the southern hemisphere). - Rules that can never match, such as
FREQ=DAILY;BYMONTH=2;BYMONTHDAY=30, are detected up front instead of walking 146,097 days on every expansion.
Changed
- Less repeated work in the core, with the same results:
propagateEdit,rescheduleFromStatusDateandrescheduleFromActualsbuild the scheduling model of the unedited plan once instead of twice, andresolveEntityRefschecks a load target only against the bound load targets of its own resource.
Demo
- Four new design gallery showcases: CI/CD pipeline (a live job DAG linked to a run timeline, with failure injection and retry), Knowledge graph (a force-directed graph with clusters, search, neighbourhoods and shortest paths), Construction program (a scheduled master programme with critical path, baseline, resource leveling, earned value and a what-if delay) and Service map (a live service topology with grouped namespaces, traffic-weighted edges, an incident blast radius and an alert timeline).
Development
- Browser tests on CI: the browser job retries a failed test once, keeps traces and uploads the Playwright report as an artifact on failure. The test server starts with the new
--strict-portflag ofscripts/serve.mjsand fails with a clear message when the port is taken instead of moving to another one;VW_PORT=0is rejected by the Playwright config and means "any free port" fornpm start. The gantt tooltip test no longer waits on the wall clock. - The npm release workflow now waits up to about 10 minutes, instead of 90 seconds, for the registry to list a new version before it compares the integrity, and logs each wait. npm took longer than 90 seconds for 1.1.0 and 1.2.0, so the job failed after a successful publish and needed a rerun.