Problem
static-embed.js is built as a self-executing ESM bundle (packages/js/static-embed.tsx) that auto-runs main() on load. It bundles parquetRead / parquetMetadata from hyparquet internally but does not re-export them.
This means there is no way to load raw parquet bytes from a file and decode them client-side when using the sidecar bundle. The only path today is:
Python → snappy parquet → base64 → inline JSON → JS b64decode → parquetRead
When serving files over HTTP (Mode 3b), you'd want:
Python → snappy parquet → raw file → fetch() ArrayBuffer → parquetRead
The raw-file path skips the ~33% base64 size overhead and lets you serve the data file separately from the HTML (better caching, smaller initial parse). But parquetRead is not accessible from outside the bundle.
Expected behaviour
static-embed.js exports parquetRead and parquetMetadata (already re-exported in buckaroo-js-core/src/index.ts) so a page can:
fetch('data.parquet') → ArrayBuffer
const { parquetRead } = await import('./static-embed.js')
- Decode rows, inject as a plain array into the artifact, let static-embed's auto-init render it
Workaround
Import hyparquet separately from esm.sh CDN — but that adds a network dependency to what is supposed to be a fully-offline sidecar bundle.
Fix
In packages/js/static-embed.tsx, add:
export { parquetRead, parquetMetadata } from 'hyparquet';
// or re-export from buckaroo-js-core which already re-exports them
export { parquetRead, parquetMetadata, resolveDFDataAsync } from 'buckaroo-js-core';
The esbuild step (build:static) already produces ESM format (--format=esm), so named exports work fine.
Problem
static-embed.jsis built as a self-executing ESM bundle (packages/js/static-embed.tsx) that auto-runsmain()on load. It bundlesparquetRead/parquetMetadatafrom hyparquet internally but does not re-export them.This means there is no way to load raw parquet bytes from a file and decode them client-side when using the sidecar bundle. The only path today is:
When serving files over HTTP (Mode 3b), you'd want:
The raw-file path skips the ~33% base64 size overhead and lets you serve the data file separately from the HTML (better caching, smaller initial parse). But
parquetReadis not accessible from outside the bundle.Expected behaviour
static-embed.jsexportsparquetReadandparquetMetadata(already re-exported inbuckaroo-js-core/src/index.ts) so a page can:fetch('data.parquet')→ArrayBufferconst { parquetRead } = await import('./static-embed.js')Workaround
Import hyparquet separately from esm.sh CDN — but that adds a network dependency to what is supposed to be a fully-offline sidecar bundle.
Fix
In
packages/js/static-embed.tsx, add:The esbuild step (
build:static) already produces ESM format (--format=esm), so named exports work fine.