@texuli/data
v0.18.0
Published
Data views: grid, tree, board, calendar, timeline, map, activity and files.
Maintainers
Readme
@texuli/data
Data views for Svelte 5 applications: a data grid (with column operations, virtualization and inline editing), a tree view, a board, a calendar, a Gantt timeline, an offline map, an activity feed and a file browser. Each view sits on a framework-free TypeScript engine that you can also use on its own, in Node or behind a view of your own. It is part of Texuli, "Small pieces. Infinite possibilities.": an MIT Svelte 5 component library by Dailybot, Inc., for teams building data-heavy product screens.
In the stack: layer L4, a domain package on the @texuli/core texels, @texuli/primitives, @texuli/drag, the @texuli/tokens token engine and the texuli components. @texuli/blocks, @texuli/sheets, the agent catalog and the player build on it.
Status: 0.x release.
@texuli/datais published on npm as0.18.0, a pre-1.0 release (1.0.0 will be the first stable release). Under 0.x, a new minor (0.14.0) may contain breaking changes, so pin the exact version or use^0.18.0, which accepts only 0.18.x.
Install
npm install @texuli/data @texuli/tokens sveltesvelte(^5.57.2) is a peer dependency.- The views style themselves with the Texuli
--tx-*design tokens. Import the token stylesheet once in your app (installing@texuli/tokensdirectly lets your bundler resolve it); each view imports its own component CSS.
@import '@texuli/tokens/base.css';Quick start
<script lang="ts">
import { DataGrid, type DataGridColumn } from '@texuli/data/grid-core';
type Deal = { id: string; name: string; amount: number };
const deals: Deal[] = [
{ id: 'd1', name: 'Harbor Labs', amount: 12000 },
{ id: 'd2', name: 'Northwind Example', amount: 8400 },
];
const columns: DataGridColumn<Deal>[] = [
{ key: 'name', header: 'Deal', type: 'text' },
{ key: 'amount', header: 'Amount', type: 'number' },
];
let sort = $state([{ key: 'amount', direction: 'desc' as const }]);
let selected = $state<string[]>([]);
</script>
<DataGrid
rows={deals}
{columns}
getRowId={(deal) => deal.id}
caption="Open deals"
searchable
selectable
bind:sort
bind:selected
/>caption is required and names the grid for assistive technology. Every
visible and announced string is translatable through labels.
What's inside
Views (Svelte components):
| Import | What it gives you |
| --- | --- |
| @texuli/data/grid-core | DataGrid: sorting, search, filtering, row selection, client paging, toolbar and bulk-action snippets, and grid keyboard navigation |
| @texuli/data/filter-bar | FilterBar: applied-filter chips, add filter (opens FilterBuilder), clear and saved state (data-filter-bar) |
| @texuli/data/filter-builder | FilterBuilder: nested and/or filter groups with operators by field type, plus the pure applyFilter |
| @texuli/data/grid-columns | ColumnGrid: resize, reorder, pin, hide, group headers and column menus |
| @texuli/data/grid-virtual | VirtualDataGrid: independent row and column windows for large tables |
| @texuli/data/grid-editing | EditableDataGrid: inline cell editors, validation, undo and redo, TSV clipboard |
| @texuli/data/tree-view | TreeDataView: outline and file-tree view with lazy children, drag reorder and checkboxes |
| @texuli/data/board | Board: columns and swimlanes with WIP limits, keyboard moves, column footers and heading levels; collapsible lanes and cell footers (new in 0.14.1) |
| @texuli/data/dashboard | Dashboard and DashboardWidget: a widget grid moved and resized by pointer, keyboard or an arrange toolbar, with breakpoints and a saved layout (new in 0.8.0; docs) |
| @texuli/data/calendar/view | CalendarView: month, time-grid and agenda views with move and reschedule, an event content snippet and month overflow (new in 0.14.1) |
| @texuli/data/timeline | TimelineView: virtualized Gantt timeline with dependencies, zoom, critical path, collapsible groups with bands, row selection and markers; compact day ticks, formatTick and an opening date (initialDate, today by default when in range; new in 0.14.2), held as rows arrive and zoom changes, and scrollToDate (0.14.4) |
| @texuli/data/map | MapView: an offline, fictional vector basemap with markers, clusters, routes and fences |
| @texuli/data/activity | ActivityFeed: day-grouped activity with avatars, reactions and pagination |
| @texuli/data/activity/inbox | NotificationInbox: unread state, mark read and unread, mark all, item actions and arrival announcements |
| @texuli/data/cohort | CohortTable: a cohort retention table with row and period headers, readable numbers and heat cells |
| @texuli/data/files | FileBrowser: grid or list browser with breadcrumbs, previews and multi-select |
| @texuli/data/virtual-list | createVirtualList and createInfiniteLoader for windowed lists, and VirtualListView (catalog data-virtual-list, new in 0.16.0): a windowed APG listbox that renders rows through a snippet, or with mode="feed" an APG feed of articles for rows with their own controls (new in 0.16.1) (docs) |
Engines (framework-free TypeScript, no Svelte needed):
| Import | What it gives you |
| --- | --- |
| @texuli/data/grid | Windowing, column state, multi-sort, grouping, a validated filter AST and saved views |
| @texuli/data/tree | Flattening with ARIA level and position, cycle-safe moves, indent and outdent |
| @texuli/data/board/engine | Fractional rank keys, grouping, WIP limits and move validation |
| @texuli/data/dashboard/engine | Dashboard layout math: packing, collision, moves, resizes, keyboard steps, breakpoints and persistence, bounded on hostile input (new in 0.8.0; docs) |
| @texuli/data/calendar | Dates in an explicit IANA zone, an RFC 5545 recurrence subset, overlap layout and rescheduling, with no date library |
| @texuli/data/timeline/engine | Working-day calendars, dependencies with lag, critical path and cascading moves |
| @texuli/data/geo | The offline map engine: Web Mercator views, clustering, geofences, distances and routes |
| @texuli/data/activity/engine | Mention tokens, day groups, change summaries, threads, reactions and inbox read state |
| @texuli/data/files/engine | Natural-order children, breadcrumbs, name and move checks, deterministic thumbnails |
The package root, @texuli/data, re-exports the main views and helpers. The dashboard is subpath-only.
Key guarantees
Accessible keyboard models. The grid follows the WAI-ARIA grid pattern as a single tab stop with arrow, Home and End navigation,
aria-sortand a polite live region for row and selection counts; the other views have documented keyboard maps.Plain-text cells. Grid cells render as text (a
formatresult or the value), never as markup.Right-to-left aware. Arrow keys swap or mirror under
dir="rtl"in the grid, board, calendar, activity feed and file browser.Deterministic engines. The calendar never reads the system clock or time zone (you pass
todayandnow), and grid text sorting uses an explicitlocale, so results do not depend on the host machine.No network from the map. The map engine has no tiles, no geocoding and no real geography.
Your rules stay yours. Board and calendar moves are validated in the engine, but persisting them, and enforcing authorization and hard limits, belongs to your application.
Host data sources in generated views (new in
0.8.0). In a blueprint, the grid's rows, the board's items, the tree view's items, the calendar's events, the file browser's entries, the timeline's tasks and the notification inbox's items may read a host-registered data source (@texuli/core/data-source): the source's filter is this package's grid filter model, and@texuli/playershows loading, empty and error states around the view, pages, and saves edits optimistically. A board move is saved through the board's asynconMove: the card moves at once and goes back, announced, when the save fails (player data sources).
Known limit: fence editing on the map is not implemented yet; fences are drawn and listed only.
New in 0.6.0
Ships in 0.6.0; the 0.5.0 release predates it:
@texuli/data/filter-builder: a property catalog of host operators with typed editors, validation and predicates, field groups, and saved segments (G49). Breaking:FilterCondition.operatorwidens toFilterOperator | FilterCustomOperatorId(data-filter-builder).@texuli/data/activity/inbox:allowMarkUnreadandonMarkUnread(G50).@texuli/data/cohort:heatScaleandheatTextwith a 4.5:1 contrast check (G51).DataGrid:activateOnClick,mode="table", columnhideBelow, anemptysnippet with{ query, filtered }(G55), and rows that glide to their new place (motion) (data-grid-core).Board: columndescription, acolumnHeadersnippet, column-only mode withoutgetRank(G67, G69), a positioned scroller that can't widen a phone page (G76), and cards that glide on a move (motion) (data-board).
New in 0.5.0
Ships in 0.5.0; the 0.4.0 release predates it:
DataGrid: client paging (pageSize,bind:page),rowClass(row), andfilters,toolbarand selection-awarebulkActionssnippets (data-grid-core).Board: acolumnFooter(column, { count })snippet andheadingLevel(data-board).- New subpaths:
@texuli/data/filter-builder(data-filter-builder),@texuli/data/activity/inbox(data-activity-inbox) and@texuli/data/cohort(data-cohort).
New in 0.4.0
Not in the 0.3.0 release:
- One drag engine. The board, tree view, calendar, timeline and grid
column moves run on
@texuli/drag(in development, on npm in the 0.18 line;@texuli/data0.3.0predates this migration): one pointer gesture tracker (capture, threshold,pointercancelas cancel). The board and tree view also announce moves from localizedDragMessagestemplates, overridable with their newmessagesprop. - Breaking:
@texuli/data/boardand@texuli/data/tree-viewno longer exportDRAG_THRESHOLD_PXorindexFromPointer(0.3.0had them). The threshold is thethresholdoption ofcreatePointerTrackerin@texuli/drag/gesture(default 4 px, the old constant's value; there is no exported constant), and the pointer index ismidpointIndex(midpoints, coordinate)in@texuli/drag/collision(the same index asindexFromPointer(middles, y)for ascending midpoints).
Documentation
- Site: texuli.com and the live examples
- Grid: core, columns, virtualization, editing, editing accessibility, virtualized editing
- Views: tree view, board, calendar and rescheduling, timeline, offline map, activity feed, notification inbox, cohort table, filter builder, file browser
- Source: github.com/DailybotHQ/texuli · Issues: github.com/DailybotHQ/texuli/issues
Contributing
Contributions are welcome; start at the GitHub repository.
License
MIT © Dailybot, Inc. Powered by Dailybot.
