Changelog
[1.4.0] - 2026-05-08
Added
- Multi-lane timelines. Adds
options.lane,ArticleData.lane,timeline.loadLanes(...),timeline.loadLaneArticles(...), and a newLaneruntime API, enabling events to be organised into separate horizontal lanes while sharing a single bottom timeline axis. Maintainstimeline.articlesas a flat array for backwards compatibility. - Lane rendering and layout. Introduces DOM-based lane backgrounds and titles with CSS-first styling (inline styles only when explicitly set). Supports per-lane article option overrides (e.g. default styles), and handles density grouping, row stacking, and baseline scaling independently within each lane.
- Lane layout controls. Adds options for lane header visibility, top gap, height weighting, and period-line baseline/anchor spacing.
- Lane visibility and reordering APIs. Adds lane hide/show helpers and convenience methods on both
timelineandLanefor reordering by index, relative position, or adjacent step. - Timeline pan momentum. Adds configurable momentum after viewport drag release via
options.pan.momentum, with controls for enabling, velocity sampling, friction, stop velocity, and maximum duration. - Discrete wheel zoom animation. Adds
options.zoom.discreteWheelAnimation, enabled by default for notched mouse-wheel input, providing smooth animated zoom transitions that preserve the cursor anchor while repeated wheel input continues the zoom fluidly. - Date range fitting API. Adds
timeline.fitDateRange(start, end, options)to zoom and position the timeline so a supplied date range fits the viewport. Accepts eitherDmyinstances or plain{ year, month?, day? }inputs, treats year-only and month-only dates as full periods for fit calculations, supports symmetric or per-side horizontal padding, and can optionally animate zoom and pan together. - Article range fitting APIs. Adds
timeline.fitArticleRange(article, options)to fit a single article’s full period, andtimeline.fitArticles(options)to fit all currently unfiltered article cards into the viewport. - Responsive baseline distance. Adds responsive baseline settings under
article.distanceToBaseline, withvalueas the static fallback andresponsive.byCardLayoutproviding per-card-layout ratios and bounds. Responsive distances are chosen from the resolved default card layout; unmatched layouts usevalue. - Article card layout breakpoints. Adds ordered
article.cardLayoutBreakpointsfor height-based layout overrides, including defaults that switch low-height timelines tolandscapewhenportraitcards would be unusable. - Article pixel snapping control. Adds
article.rendering.pixelSnapwithdevice,css, andnonemodes so article rendering can trade crisp device-pixel alignment for smoother subpixel motion when needed. - Public
TimeBandexports. Exposes theTimeBandconstructor as bothHistropedia.TimeBandon the default export and a direct named ESM export. This brings it in line with other main classes such asTimelineandArticle, and enables advanced prototype-based extensions.
Changed
- Package distribution metadata and typings. Aligns package entry points and named exports, declares supported Node.js versions, limits published package contents to runtime essentials, and fills missing index typings for package consumers.
- Default wheel zoom responsiveness. Increases the default
options.zoom.wheelStepfrom0.1to0.2so wheel zooming feels more responsive out of the box.
Deprecated
- Legacy baseline option.
article.distanceToMainLineis deprecated in favour ofarticle.distanceToBaseline.value. The old option name still maps through as an explicit numeric override for backwards compatibility, includinglane.article.distanceToMainLine.
Fixed
- False double-click detection. Tightens click tracking so
article-dblclickandtimeline-dblclickonly fire after two completed clicks on the same target, clears pending click state when touch input turns into a pinch, and suppresses legacy synthetic mouse events that could make a single tap register twice. - Compatibility wrapper for article.activated(). Maintains functionality of article method removed in v1.3.0 by triggering
article-clickevent. - Occluded article hover states. Prevents articles from entering hover styles when the pointer is over another DOM element stacked above the timeline, while preserving window-level drag tracking beyond the canvas edge.
- Timeline item ID matching. Compares article and lane IDs without implicit type coercion so values such as
1and"1"are treated as distinct IDs. - Boolean article opacity values. Normalizes boolean opacity values to numeric values, which occurred
- Article pixel jitter during slow pans. Stabilizes article rendering by using a shared snapped origin for card internals, aligning connector endpoints to the rendered card position, and snapping portrait and landscape card geometry to the active device-pixel grid by default.
Documentation & Internal
- Lane docs and demo coverage. Adds lane examples to the README, demo scenarios, public type fixtures, and unit tests, and updates the type-check script so the verification pipeline passes consistently.
[1.3.3] - 2026-02-04
Fixed
- Time Band opacity bleed. Resets the canvas
globalAlphaat the start of each Time Band draw so the overlay does not inherit the last rendered article’s fade opacity when it has no image.
[1.3.2] - 2026-01-25
Fixed
- Legacy event handler
thiscontext. Preserves the timeline instance asthisinside legacy event handlers (onSave,onArticleClick,onArticleDoubleClick,onRedraw) to maintain backward compatibility with code that relies onthisreferring to the timeline.
[1.3.1] - 2025-12-18
Fixed
- HiDPI shadows. Aligns shadow dimensions with the canvas DPR to keep shadows constant size and offset according to CSS pixels for high-density displays.
- Card border toggles. Prevents
landscapecards from drawing borders when the border width is set to 0. This was defaulting to 1px if not set, or keeping previously set value if individual articles differed. - Card height refresh. Recalculates card height when border width changes to fix misalignment of the bottom of the article card.
[1.3.0] - 2025-12-04
Added
- Time Bands overlay API. Introduces a schema and styling model that mirrors article layouts, configured through
options.timeBandand adjustable post-init withsetOption/setStyleso bands share the same visibility, alignment, and reserved-space controls as articles. - Pluggable article card layouts. A new feature to draw articles using different layouts, which can then be adjusted as before using the style options. Launches with two built-in options:
portrait(the layout used before this release) and the newlandscapelayout. Layouts can have style options specific to the layout, which override normal style options. Choose layout usingoptions.article.defaultCardLayout, or for individual articles callarticle.setCardLayout. Developers can register their own custom layouts, giving them full control over the rendering and click area. - EventManager. Debuts a dedicated event surface that registers via
options.onor the timeline.onhelper, spanning 18 events such astimeline-render-start,timeline-render-end,timeline-click,timeline-state-change,article-activated, pointer enter/leave/move, zoom, wheel, pinch, and viewport drag notifications, plus.offfor unsubscribing. - Rendering and UX options. Provides
options.canvasfor DPR-aware high definition canvases, cursor configuration, toggles for date indicators and article connectors, marker extension controls, and new article style options such as image shape. - Logger and debug toggles. Ships a centralized
Histropedia.LoggerplusHistropedia.enableDebug/setDebughelpers so developers can turn on deprecation warnings and internal diagnostics during development. - Article data defaults.
options.article.defaultDataprovides a way to set defaults for any fields when loading article data. - TypeScript definitions. Coverage now spans image options, dragging vicinities, article data (
Dmyhelpers and function properties),PointerEventpayloads, deprecated handler types, easing options, and more so the full API stays consumable in TypeScript projects.
Changed
- Image loading pipeline. Uses a byte-aware cache, safe eviction ordering, dynamic queue prioritization,
fetchPriorityhints, visible-only enqueueing, aborts for out-of-range requests, and addscreateImageBitmapsupport so decoded bitmaps can flow directly into canvas draws. - Pointer and tween engine. Runs entirely on vanilla pointer/tween utilities (no jQuery), bringing smooth trackpad zoom, unified pointer/touch handling, and new animation helpers for article moves, fades, pans, and zoom transitions.
- Event naming and payloads. Aligns with the new
EventManagerby standardizingPointerEventpayloads, routing background clicks throughtimeline-click, renamingarticle-double-clicktoarticle-dblclick, and mapping every legacy hook onto the modern event names for backwards compatibility. - Text and layout calculations. Hardens via memoized helpers, a binary-search
ellipsizeroutine, and a new font watcher that forces text measurement cache invalidation on load to eliminate fixing on placeholder font sizes.
Deprecated
All scheduled for removal in v2.0.0
- Legacy timeline event handlers.
onRedrawnow maps totimeline-render-end/timeline-render-start, whileonSavemaps totimeline-state-change. - Legacy Article event handlers.
onArticleClickandonArticleDoubleClickare replaced byarticle-select/article-clickandarticle-dblclickevents from theEventManager. These options will be removed in 2.0.0. - Deprecated style option.
maxImageHeightarticle style option is superceded byimage.maxHeightto work alongside other new image style options. - Deprecated article default option.
periodLine.defaultHidearticle option is superceded by the new generic defaults setting usingdefaultData.hidePeriodLine.
Removed
- jQuery dependencies. Removes every jQuery dependency (DOM size helpers, mousewheel, animation shims, dummy nodes) for a completely dependency free bundle.
- Legacy handlers and pub/sub. Removes legacy click, double-click, and background click handlers plus the old pub/sub implementation after migrating to the
EventManager. - Unused modules. Removes unused storage modules and legacy helper functions.
Fixed
- Drag release handling. Keeps dragging state from sticking when users release the mouse or touch outside the browser window or an embedded iframe so interactions always complete cleanly.
- Font loading. Prevents squashed text when custom fonts were still loading during timeline init by waiting for the new font watcher to confirm real fonts before caching text measurements.
- Article sorting with string IDs. Fixed stable sort order for articles with string
idvalues when their ranks are equal by properly handling string comparison in the fallback sorting logic.
Security
- Adds URL sanitization and configurable image sanitizer options so external article imagery cannot inject unsafe URLs.
- Hardens the deep merge helper against prototype pollution, ensures branding links open with
noopener/noreferrer, and documents the threat model inSECURITY.md. - Patches npm audit findings and refreshes all dev dependencies to eliminate known vulnerabilities.
Documentation & Internal
- Event documentation. Documents the expanded event surface in a new guide, simplifies the README, and adds explicit license information so the API reference stays accurate.
- Demo tooling. Adds a version selector, previous release support, restored legacy widths, and performance scenarios so regressions are easy to compare between releases.
- Distribution pipeline. Introduces ES Module and UMD bundles, overhauls the bundler/dev asset pipeline, and adds a build test HTML file to verify outputs.
- Source restructuring. Moves code into service-specific folders, splits helpers, simplifies the font watcher, and reorganizes article defaults and engines for maintainability.
- Tooling and automation. Adds ESLint with auto-fix hooks, Husky/pre-commit automation, new testing scripts, updated Vitest packages, and commit automation for consistent CI runs.
- Debugging and performance infrastructure. Adds logger toggles, a scenario runner, a performance demo with small or large image modes, non-fullscreen test scenarios, and versioned demos to aid regression testing.
Note: All notable changes to this project are documented here, starting from v1.3.0 onward.