Skip to content

v0.1.0

Choose a tag to compare

@casoon casoon released this 27 Sep 07:04

First release of opengrid — npm install @casoon/opengrid: a portable Rust/WASM data and query engine with an accessible data grid, table and pivot as web components — and adapters for React, Vue and Svelte.

Not yet verified by a screen reader. Everything here is built and tested — keyboard, focus, announcements, axe-core in every state — but no screen reader has been run over it yet. The passes follow this release (#5).

One query model. A JSON AST — never SQL from a browser — whose semantics are pinned by 53 query and 5 pivot conformance cases: NULL ordering, binary collation, exact decimals, non-finite floats, microsecond timestamps.

Three ways to run it, proven to agree. In the tab over Apache Arrow compiled to WebAssembly; on a server against PostgreSQL as one compiled statement; or split between the two, with a planner deciding from what the source declares it can do. All three answer every conformance case identically.

Three elements. <opengrid-table> for display, <opengrid-grid> for work (keyboard navigation under the WAI-ARIA grid pattern, virtualization over 100,000 rows, filtering, multi-sort, selection, editing, movable/resizable/hideable columns, paging), and <opengrid-pivot>.

Configurable views. The schema from the source is the truth; set_columns narrows it and refuses, in words, what the type contradicts. The reader's view — sort, filters, columns, density, grouping, facets — is one value (get_view, set_view, opengrid-view-change), so saved views are a few lines of page code. Grouping by up to two columns stays virtualized and becomes a treegrid, with aggregates, ranges and a grand total; a search field takes free text or a filter written out; facets count without their own restriction; a toolbar shows the active filters as chips; a column menu is a second way to every column action. Eighteen --og-* custom properties theme it, with system colours as defaults.

The engine in the package. @casoon/opengrid ships the in-browser query engine under engine/ (335 KiB brotli, next to 194 KiB for the elements); createWorkerProvider() without options uses it.

Frameworks. connect(host, options) supplies an element from one object and keeps it supplied. On top of it: @casoon/opengrid-react (React 18 and 19), @casoon/opengrid-vue (Vue 3.3+) and @casoon/opengrid-svelte (Svelte 5), each rendered on the server and hydrated in tests; Angular through a documented directive.

Export. What the reader sees, every match of it, as CSV or JSON in raw values: get_query(host) gives the view's query, exportRows(provider, query, options) fetches it in pieces through any provider — or in one streamed request from POST /export/{source} on the server, under the same token, field allowlist and tenant filter as a query. CSV per RFC 4180 with a guard against formula injection; a pivot exports as shown with get_pivot(host). See the export guide.

A gateway. opengrid-server with bearer tokens, a mandatory row filter a client cannot opt out of, a field allowlist, explicit CORS origins, and bounded, streamed exports.

Errors a page can branch on. A refused request carries status, code and path on the Error; the codes are a closed list, typed and frozen with the API.

Accessibility

Every feature is keyboard-operable, nothing requires dragging, and one polite live region carries every state. 872 end-to-end test runs — most specs on a desktop and a narrow viewport — with axe-core in every state including open menus and all five looks of the design prototype, a spec that records the status line's successive states so an announcement made twice, never, or too early fails the build, and checks of the language of every leaf node and accessible name in the real DOM. A grid never takes the focus it did not have.

Screen-reader pairings tested: none yet (#5). Browsers tested: Chromium, Firefox and WebKit through the end-to-end suite (Firefox and WebKit at a desktop viewport); Safari itself, iOS and Edge not tested.

Known limitations

  • No calculated fields beyond date parts (year, month).
  • One column dimension per pivot; at most 256 generated columns and 2,000 rows.
  • Paging and virtualization are mutually exclusive, and so are paging and grouping.
  • At most two levels of grouping; while grouped, rows can be neither selected nor edited.
  • <opengrid-pivot> needs a server — the browser engine has no pivot export.
  • The Rust crates, opengrid-server included, are not on crates.io; the server runs from the repository.
  • Under a production bundler, a worker needs engine/ and worker.js served by the page and passed as moduleUrl and workerUrl — the same rule as for the element module (frameworks guide).
  • No CDN build. Not tested as whole applications: SvelteKit, Nuxt, Next.js, Astro; React 18 is not rendered on the server in tests. A Vite production build needs loadOpengrid({ moduleUrl }).