strata-react 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -122,7 +122,7 @@ function KilnRoom() {
122
122
  | Form | `Field`, `Input`, `Textarea`, `NativeSelect`, `ChoiceGroup`, `Checkbox` | `Field` wires label, hint, error, `aria-describedby`, `aria-invalid`, and `action` puts a one-field form's button on the control's row with the hint and error under both; `Checkbox` requires `label` and is one target with it, and has a mixed state |
123
123
  | Status and figures | `Status`, `Metric`, `MetricStrip`, `Meter`, `crossedThreshold`, `CompositionBar` | A status is always a word; figures have no icons or sparklines; `Meter` is a `meter` named for what it measures, with its reading in words ("72% used"), threshold notches, and a `Status` word once a threshold is crossed (each threshold must name its state); `CompositionBar` is a stacked bar over a table naming every part, its amount and share, and names the remainder (`total` needs `restLabel`); a part that is there reads "<1%" and keeps a sliver, never "0%"; `JobStatus` is a long-running server job: a required word per state beside the app's sentence, a progress bar when the total is known, each failure named with its reason, announced only when the item changes or the job ends |
124
124
  | Data | `DataView`, `Load<T>`, `Stale`, `StaleNotice`, `LoadError`, `EmptyState`, `Skeleton`, `Thumbnail`, `ThumbnailSkeleton`, `DataTable`, `TableSkeleton`, `VirtualList`, `InfiniteList`, `LoadMore`, `useInView`, `LineChart` | `DataView` requires skeleton and empty, keeps data on screen under a `StaleNotice` (why, how old, Try again) when a refresh fails, and takes an `error` renderer for an app's own look of a failed read (default `LoadError`, always inside an alert); `Thumbnail` is a remote image in a box of fixed `aspect`, with a skeleton while it loads, the required `missing` words (or a `fallback` drawing, such as an avatar's initial) when it fails or `src` is null, required `alt`, `children` overlaid in its corners, and a request only once it nears the screen (`eager` for the first few); tables and lists virtualise from 100 rows; a `DataTable` column with `value` sorts by type with missing values last both ways and draws a placeholder (`missing`, default an en dash); `InfiniteList` loads the next page on approach, with a skeleton for it, a Try again row when it fails and a Show more button for the keyboard, and `scroll="page"` draws a grid that scrolls with the page; `LoadMore` is that next-page row for any list or grid; charts label values directly |
125
- | Compare | `Compare`, `ViewportFrame`, `useViewport`, `FullscreenFrame` | Two pictures judged together: side by side, swipe (a divider that moves from the keyboard), fade and blink (`x` flips), one zoom and pan for both sides (buttons, `+` `-` `0`, Ctrl-wheel or trackpad pinch, drag, arrow keys, double click, `1:1`), and full screen (the browser's Fullscreen API, a modal where there is none). `blind` is required: a blind comparison names pictures by `label` only and never writes the variant `id`, `note` or `alt`. A picture that fails shows the required `missing` words in its place; the keys come from one `Shortcut[]` shared with `KeysLegend`, and `keys={false}` leaves them to a surrounding screen. Pictures only so far: difference view, voting, text, audio and video are the next changes |
125
+ | Compare | `Compare`, `CompareGrid`, `ViewportFrame`, `useViewport`, `FullscreenFrame`, `useDifference`, `differences` | Two pictures judged together: side by side, swipe (a divider that moves from the keyboard), fade, blink (`x` flips) and difference (a live difference blend with amplify, or pixelmatch's changed pixels with a tolerance and the share that differ; pixels are read only when that view is open, at most 2048 px on the long side, and a picture the browser will not let the page read says so in words); `CompareGrid` is every candidate at once with the same zoom and full screen, and `actions` for what a tile offers; one zoom and pan for both sides (buttons, `+` `-` `0`, Ctrl-wheel or trackpad pinch, drag, arrow keys, double click, `1:1`), and full screen (the browser's Fullscreen API, a modal where there is none). `blind` is required: a blind comparison names pictures by `label` only and never writes the variant `id`, `note` or `alt`. A picture that fails shows the required `missing` words in its place; the keys come from one `Shortcut[]` shared with `KeysLegend`, and `keys={false}` leaves them to a surrounding screen. Pictures only so far: voting, text, audio and video are the next changes |
126
126
  | Selection | `useSelection`, `BulkBar`, `SelectableGrid`, `DataTable`'s `selection` (`RowSelection<T>`) | Opt-in checkbox column with "Select all shown" that respects `isSelectable`; Shift-click or Shift+Space chooses or clears the run from the last row clicked, in the order shown; `initial` (keys or a test on the row) chooses a row the first time it appears, so it applies to data that loads later; the selection drops rows that are gone; `BulkBar` announces the count politely, and while it is up its one filled action is the view's only one (the screen's primary goes to `outline`); `SelectableGrid` is the same selection as a grid of pictures (`renderImage`), each tile one labelled target, virtualised from 100 tiles |
127
127
  | Expansion | `Disclosure`, `useExpanded`, `DataTable`'s `expansion` (`RowExpansion<T>`) | Show more of one row in place. The toggle is a button with `aria-expanded`; the body is mounted only while open, so a request inside it runs on first open (unlike `<details>`, which mounts every closed body); `useExpanded({ param })` shares the open keys across a list or table and keeps them in the URL; a table's detail row spans the data columns and is measured when virtualised |
128
128
  | Data loading | `StrataQueryProvider`, `createQueryClient`, `useLoad`, `useInfiniteLoad`, `useJob`, `toLoad`, `staleOf`, `fetchJson`, `HttpError`, `readErrorBody`, `fieldErrorsOf` | TanStack Query in, `Load<T>` out; a refetch that fails after a good read stays `ready` with `stale` set, never an error panel; `useInfiniteLoad` works out the cursor itself (after the last item held), merges pages by key and can `dismiss` an item at once; `useJob` polls a job's status only while it runs and invalidates the queries it changes once, when it ends; `fetchJson` reads an error response's body onto the `HttpError` (`body`, `reason`, `fieldErrors`, read by `readErrorBody` or the API's own `readError`) |
@@ -134,6 +134,7 @@ function KilnRoom() {
134
134
  | Overlays | `Dialog`, `DialogProps`, `AlertDialog`, `Popover`, `Tooltip` | React Aria underneath. A dialog always has a title and, via `actions`'s close render prop, a way out; `closable={false}` while work cannot stop; `placement="end"` is a sheet. `AlertDialog` is the only confirm: required verb on the confirm button, Cancel focused first, no outside dismiss, stays open with the reason when an async confirm fails. `Popover` needs a `label`. `Tooltip` opens on hover and focus and `IconButton` uses it. All portal onto the `layer-*` stacking utilities |
135
135
  | Value controls | `NumberField`, `Slider`, `ColorField` | Set a number or colour precisely, inside `Field`. `NumberField` and `Slider` are React Aria's; the number field runs with `commitBehavior="validate"`, so a typed value outside `min`/`max` is kept on screen, explained in the `Field` ("Enter a value from 0% to 500%.") and never passed to `onChange`. A value that is not known is `null` and shows an en dash, never 0 or NaN. Digits and decimal mark follow `locale`. The unit sits inside the control, and in the slider's spoken value when `Intl` has it (%, °, ms, s, kB, MB, GB, kbps, Mbps). Arrows step, Home/End jump to the limits; `Slider editable` adds a number field. `ColorField`: platform picker, typed hex that is normalised, app suggestions, and a contrast note against `against`. No motion on value changes |
136
136
  | Notices and progress | `Alert`, `toast`, `StrataToastRegion`, `useClientWork`, `JobStatus` | Three weights. A `toast` confirms finished work and goes by itself (5 s plus 40 ms a character, 8 s minimum with an action, paused under the pointer or focus, always dismissable); it has no danger tone, because an error a person must act on is an inline `Alert` with its recovery as `action` (`announce` makes it `role="alert"` only when it answers something the person just did). `StrataToastRegion` goes once at the app root. `useClientWork` runs browser work with progress, cancel (aborts its `signal`, ends `cancelled`, never `failed`) and a double-start guard; `JobStatus` shows it exactly as it shows a server job, with `onCancel`, `cancelled` and `onDismiss` |
137
+ | Inspector | `Inspector`, `InspectorSection`, `PropertyRow`, `PropertyList` | Properties of the selected thing. `Inspector` is a labelled region with the selection's name as its heading and the empty state (`empty`, required) when `title` is `null`; `selectionKey` gives a new selection fresh controls and keeps focus in the panel. `InspectorSection` is React Aria's `Disclosure` with the body mounted only while open; open and closed are remembered under `storageKey` (storage that throws just means defaults). `PropertyRow` is a `Field` with a "Reset <label>" that shows only while `modified`. `PropertyList` is a `dl`: missing values print an en dash heard as "Not known", units follow a non-breaking space, long values truncate with the whole value in a tooltip |
137
138
  | Feedback | `UndoBar`, `useUndoable`, `Done` | Undo before confirm; the hook owns which rows are out of view (`isRemoved`), a failed commit brings the row back with Try again in the same bar, and `flush()` commits before a dependent action; `Done` is the one celebration, and it must say what happens next |
138
139
  | Helpers | `cn`, `format`, `createFormat`, `NBSP` | `cn` knows `type-*`; all numbers and dates through `Intl`; `format.integer(n)`, `.decimal(n)`, `.percent(n)` are callable and keep Intl's methods; `format.bytes(n, unit?)` writes sizes in decimal units (`byteUnit` shares one unit across figures); `format.date(at)` ("8 Nov 2026") and `format.dateTime(at)` ("8 Nov 2026, 06:05"), like `clock`, `day` and `shortDay`, take a Date, ISO string or epoch ms; `format.ago(at, now?)` ("3 weeks ago"), `format.compact(n)` ("1.2k", and `count(n, one, many, { compact: true })`), `format.runningTime(seconds)` ("1:02:09") and `format.share(n)` ("<1%" for a part that rounds to 0); every number and date formatter prints the placeholder (`format.missing`, an en dash) for `null` or `undefined`; `createFormat(locale, { timeZone, missing })` fixes the zone and the placeholder; units and counts join with a non-breaking space |
139
140
  | Testing | `strata-react/testing`: `renderWithStrata`, `renderRoutes`, `createTestQueryClient`, `installLayoutShims`, `installFakeIntersectionObserver`, `filledButtons`, `expectOneFilledButton`, `asyncButtonPhase` | Router + query client around Testing Library's `render`; `renderRoutes(routes, { route, basename })` renders the app's own `RouteObject[]` in a memory data router, so layout routes, redirects, loaders and error elements run, and returns the `router` (where a redirect landed is `router.state.location`) and an act-wrapped `navigate`; a fixed box and ResizeObserver so measuring components render in jsdom; an IntersectionObserver the test fires with `scrollToEnd()` or `intersect(el)`; `filledButtons()` and `expectOneFilledButton()` check "one filled button per view" from `data-variant`, and `asyncButtonPhase(el)` reads an `AsyncButton`'s phase. Role names keep the non-breaking space from `format.count`, so match them with the same call or a `\s` regex |
package/UPGRADING.md CHANGED
@@ -16,6 +16,8 @@ Every PR that changes what an app sees adds a line here (see `CLAUDE.md`, "Chang
16
16
  React Aria Components is now the primitives layer (`react-aria-components`, installed with the
17
17
  package). `@radix-ui/react-slot` is gone.
18
18
 
19
+ - **State classes are the `tailwindcss-react-aria-components` variants** (`selected:`, `focus-visible:`, `hover:`, `disabled:`), loaded by `strata.css` (the plugin is installed with the package). A test that matched a class such as `data-[selected]:border-foreground` now matches `selected:border-foreground`; hover colours no longer apply on touch screens.
20
+ - **`Compare`'s default view switch has a fifth view, `difference`** (key `5`). An app that renders `Compare` without `modes` sees one more toggle (and its visual baselines move); pass `modes={["side", "swipe", "fade", "blink"]}` to keep the previous four.
19
21
  - **`Button` has no `asChild`.** A button that navigates is a link: use a router `Link`.
20
22
  Do not rely on `@radix-ui/react-slot` arriving through Strata.
21
23
  - **`IconButton` shows `label` as a tooltip**, not a `title` attribute. New optional `hint`
@@ -0,0 +1,21 @@
1
+ import { Candidate } from './compare';
2
+ import * as React from "react";
3
+ /** Props for `CompareGrid`. */
4
+ export type CompareGridProps = {
5
+ /** Names the grid for screen readers: "Four versions of this photo". Required. */
6
+ label: string;
7
+ items: readonly Candidate[];
8
+ /** Whether the person must not learn which variant is which: tiles are named by label only. Required, no default. */
9
+ blind: boolean;
10
+ /** The words shown where a picture could not be loaded. Required. */
11
+ missing: string;
12
+ /** What goes under a tile's caption: a button to compare it, a choice, a flag. */
13
+ actions?: (item: Candidate) => React.ReactNode;
14
+ /** Tiles per row at full width. Default 3. A narrow screen uses fewer. */
15
+ columns?: 2 | 3 | 4;
16
+ /** Bind the zoom and full-screen keys on the window. Default true. */
17
+ keys?: boolean;
18
+ className?: string;
19
+ };
20
+ /** Many pictures in a grid, zoomed and panned together, and full screen. */
21
+ export declare function CompareGrid({ label, items, blind, missing, actions, columns, keys, className }: CompareGridProps): React.JSX.Element;
@@ -0,0 +1,45 @@
1
+ import { Viewport } from '../lib/viewport';
2
+ import { Shortcut } from './hotkeys';
3
+ import { Candidate } from './compare';
4
+ import * as React from "react";
5
+ /** A word for a picture's name on the page: its label, with its note unless blind. */
6
+ export declare function Caption({ c, blind }: {
7
+ c: Candidate;
8
+ blind: boolean;
9
+ }): React.JSX.Element;
10
+ /** One picture inside a frame: a skeleton while it loads, the product's words if it fails. */
11
+ export declare function Picture({ c, blind, missing, onNatural, imgRef }: {
12
+ c: Candidate;
13
+ blind: boolean;
14
+ missing: string;
15
+ onNatural?: (w: number, h: number) => void;
16
+ imgRef?: React.Ref<HTMLImageElement>;
17
+ }): React.JSX.Element;
18
+ type ZoomProps = {
19
+ viewport: Viewport;
20
+ setViewport: (next: Viewport) => void;
21
+ /** The frame whose size zoom is measured against. */
22
+ frame: React.RefObject<HTMLElement | null>;
23
+ /** The picture's natural size, if known, for 1:1. */
24
+ natural: readonly [number, number] | null;
25
+ };
26
+ /** Zoom steps about the frame's centre, and 1:1. */
27
+ export declare function useZoom({ viewport, setViewport, frame, natural }: ZoomProps): {
28
+ by: (k: number) => void;
29
+ actual: () => void;
30
+ fit: () => void;
31
+ };
32
+ /** The shortcuts for zoom and full screen, to join a screen's own list. */
33
+ export declare function zoomShortcuts(zoom: ReturnType<typeof useZoom>, full: boolean, setFull: (f: boolean) => void): Shortcut[];
34
+ /** Zoom out, in, fit, 1:1 and the zoom now, for inside a `Toolbar`. */
35
+ export declare function ZoomControls({ viewport, zoom, natural }: {
36
+ viewport: Viewport;
37
+ zoom: ReturnType<typeof useZoom>;
38
+ natural: readonly [number, number] | null;
39
+ }): React.JSX.Element;
40
+ /** The full-screen button, for inside a `Toolbar`. */
41
+ export declare function FullscreenButton({ full, setFull }: {
42
+ full: boolean;
43
+ setFull: (f: boolean) => void;
44
+ }): React.JSX.Element;
45
+ export {};
@@ -1,3 +1,4 @@
1
+ import { ReadPixels } from './difference';
1
2
  import * as React from "react";
2
3
  /** A picture to compare. */
3
4
  export type ImageMedia = {
@@ -19,7 +20,7 @@ export type Candidate<M = ImageMedia> = {
19
20
  note?: string;
20
21
  };
21
22
  /** How two pictures are laid out. */
22
- export type CompareMode = "side" | "swipe" | "fade" | "blink";
23
+ export type CompareMode = "side" | "swipe" | "fade" | "blink" | "difference";
23
24
  /** Props for `Compare`. */
24
25
  export type CompareProps = {
25
26
  /** Names the comparison for screen readers: "Photo 1 of 12, two versions". Required. */
@@ -32,11 +33,17 @@ export type CompareProps = {
32
33
  missing: string;
33
34
  mode: CompareMode;
34
35
  onModeChange: (mode: CompareMode) => void;
35
- /** Which views are offered. Default all four. Must include `mode`. */
36
+ /** Words for when the difference view cannot read the pictures' pixels (a picture from another site without CORS headers). Default says so plainly. */
37
+ cannotCompare?: string;
38
+ /** Which difference the difference view opens on: `brightness` (live, any picture) or `pixels` (the changed pixels marked, with a tolerance and the share that differ). Default `brightness`. */
39
+ defaultDifference?: "brightness" | "pixels";
40
+ /** How pictures become pixels for the difference view. Default draws them on a canvas. */
41
+ readPixels?: ReadPixels;
42
+ /** Which views are offered. Default all five. Must include `mode`. */
36
43
  modes?: readonly CompareMode[];
37
44
  /** Bind the view, zoom and full-screen keys on the window. Default true; turn off when a surrounding screen binds the same keys. */
38
45
  keys?: boolean;
39
46
  className?: string;
40
47
  };
41
48
  /** Two pictures to judge, side by side or laid over each other, zoomed and panned together, and full screen. */
42
- export declare function Compare({ label, a, b, blind, missing, mode, onModeChange, modes, keys, className }: CompareProps): React.JSX.Element;
49
+ export declare function Compare({ label, a, b, blind, missing, mode, onModeChange, modes, keys, cannotCompare, readPixels, defaultDifference, className }: CompareProps): React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { Difference, Pixels } from '../lib/image-diff';
2
+ import * as React from "react";
3
+ /** How pictures become pixels. The default draws them on a canvas; supply another where that does not fit (an authenticated request, a picture the browser will not let a page read). */
4
+ export type ReadPixels = (src: string) => Promise<Pixels>;
5
+ /** The state of a difference: reading the pictures, unable to, or the result. */
6
+ export type DifferenceState = {
7
+ status: "loading";
8
+ } | {
9
+ status: "failed";
10
+ } | {
11
+ status: "ready";
12
+ difference: Difference;
13
+ };
14
+ /** The pixels that differ between two pictures at a tolerance (0 to 1), read only while `enabled`. */
15
+ export declare function useDifference(a: string, b: string, tolerance: number, enabled: boolean, read?: ReadPixels): DifferenceState;
16
+ /** The marks of a difference drawn over the picture: a canvas that fits its frame the way the picture does (`object-contain`). */
17
+ export declare function DifferenceMarks({ difference }: {
18
+ difference: Difference;
19
+ }): React.JSX.Element;
@@ -0,0 +1,66 @@
1
+ import * as React from "react";
2
+ export type InspectorProps = {
3
+ /** The selection's name, as the panel's heading ("run-02.mp4", "Clip: Title card"). `null` when nothing is selected. */
4
+ title: string | null;
5
+ /** What kind of thing it is, under the heading ("Video", "Text clip"). */
6
+ kind?: string;
7
+ /** Shown when `title` is `null`: an `EmptyState` that says what to select and what appears ("Select a clip on the timeline to change how it looks"). */
8
+ empty: React.ReactNode;
9
+ /** The selected thing's id. A new value remounts the sections' bodies so no control shows the last item's typed text. */
10
+ selectionKey?: string;
11
+ /** localStorage key under which closed and opened sections are remembered. Omit to remember only for this visit. */
12
+ storageKey?: string;
13
+ /** The panel's few actions (a menu, a "Delete"), beside the heading. */
14
+ actions?: React.ReactNode;
15
+ /** A picture or summary of the selection above the sections (a `Thumbnail`). */
16
+ summary?: React.ReactNode;
17
+ /** `InspectorSection`s and `PropertyList`s. */
18
+ children?: React.ReactNode;
19
+ className?: string;
20
+ };
21
+ /** A panel of properties for the selected thing: a labelled region with a heading, an empty state when `title` is null, and sections whose open state is remembered. */
22
+ export declare function Inspector({ title, kind, empty, selectionKey, storageKey, actions, summary, children, className }: InspectorProps): React.JSX.Element;
23
+ export type InspectorSectionProps = {
24
+ /** Identifies the section for remembering, stable across selections of the same kind ("audio", "text-style"). */
25
+ id: string;
26
+ title: string;
27
+ /** Open when the person has not chosen. Default true; start the few that answer the next question open and the rest closed. */
28
+ defaultOpen?: boolean;
29
+ /** The section's few actions (add, reset all), beside its heading and outside its toggle. Name them for the section ("Add track"). */
30
+ actions?: React.ReactNode;
31
+ /** Mounted only while the section is open. */
32
+ children: React.ReactNode;
33
+ className?: string;
34
+ };
35
+ /** A titled group of rows that collapses. The body is mounted only while open; the open state is remembered by the surrounding `Inspector` (and held locally outside one). */
36
+ export declare function InspectorSection({ id, title, defaultOpen, actions, children, className }: InspectorSectionProps): React.JSX.Element;
37
+ export type PropertyRowProps = {
38
+ label: string;
39
+ hint?: React.ReactNode;
40
+ error?: string;
41
+ /** Whether the value differs from its default. With `onReset`, shows a "Reset" button named for the property. */
42
+ modified?: boolean;
43
+ /** Puts the value back to its default. */
44
+ onReset?: () => void;
45
+ /** The control: an `Input`, `NumberField`, `Slider`, `NativeSelect`… It picks up the label from the row. */
46
+ children: React.ReactNode;
47
+ className?: string;
48
+ };
49
+ /** One editable property: a `Field` (label, hint, error wired to the control) with a "Reset <label>" that shows only while `modified`. */
50
+ export declare function PropertyRow({ label, hint, error, modified, onReset, children, className }: PropertyRowProps): React.JSX.Element;
51
+ export type Property = {
52
+ /** The fact's name ("Frame rate"). */
53
+ term: string;
54
+ /** Its value. `null` or `undefined` prints the missing mark; a string is truncated with the whole value in a tooltip. */
55
+ value: React.ReactNode | null | undefined;
56
+ /** A unit, joined with a non-breaking space and muted. */
57
+ unit?: string;
58
+ };
59
+ export type PropertyListProps = {
60
+ items: readonly Property[];
61
+ /** Names the list for a screen reader ("Video details") when a visible heading does not. */
62
+ label?: string;
63
+ className?: string;
64
+ };
65
+ /** Read-only facts as a description list: term left, value right, long strings truncated with the full value on hover, a missing value printed as an en dash, units muted after a non-breaking space. */
66
+ export declare function PropertyList({ items, label, className }: PropertyListProps): React.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -34,6 +34,7 @@ export { useClientWork, type ClientWork, type WorkContext, type WorkPhase } from
34
34
  export { JobStatus, type JobStatusProps, type JobFailure, type JobWords } from './components/job-status';
35
35
  export { Thumbnail, ThumbnailSkeleton, type ThumbnailProps, type AspectRatio } from './components/thumbnail';
36
36
  export { DataTable, TableSkeleton, parseSort, serialiseSort, type CellValue, type Column, type Sort, type DataTableProps, type RowSelection, type RowExpansion, } from './components/data-table';
37
+ export { Inspector, InspectorSection, PropertyRow, PropertyList, type InspectorProps, type InspectorSectionProps, type PropertyRowProps, type Property, type PropertyListProps } from './components/inspector';
37
38
  export { Disclosure, useExpanded, type DisclosureProps, type DisclosureOpenProps, type Expanded, type ExpandedOptions } from './components/disclosure';
38
39
  export { BulkBar, useSelection, type InitialSelection } from './components/selection';
39
40
  export { SelectableGrid, type SelectableGridProps, type TileAspect, type TileSize, } from './components/selectable-grid';
@@ -54,3 +55,6 @@ export { Compare, type CompareProps, type CompareMode, type Candidate, type Imag
54
55
  export { ViewportFrame, useViewport, type ViewportFrameProps, type ViewportState } from './components/viewport';
55
56
  export { FullscreenFrame, canFullscreen, type FullscreenFrameProps } from './components/fullscreen-frame';
56
57
  export { FIT, MIN_SCALE, MAX_SCALE, clampViewport, zoomAt, actualPixelsScale, type Viewport } from './lib/viewport';
58
+ export { CompareGrid, type CompareGridProps } from './components/compare-grid';
59
+ export { useDifference, type DifferenceState, type ReadPixels } from './components/difference';
60
+ export { differences, readPixels, resample, MAX_SIDE, DEFAULT_TOLERANCE, type Difference, type Pixels } from './lib/image-diff';