@dcs-tech/ui 0.8.0 → 0.9.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,370 @@
1
+ # @dcs-tech/ui
2
+
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1f3104b: Dialog, export and packaging fixes found while adopting 0.8.0.
8
+
9
+ - **Dialog: focus on open.** The contents render once the dialog is open, so a child with `autoFocus` (or one that focuses itself as it mounts) gets the focus. It used to land on the close button.
10
+ - **Dialog: Esc can no longer get past a veto.** Escape is handled on keydown, so Chrome's own close (which skips `cancel` after a repeated Esc) never starts. `onBeforeClose` returning false and `closeOnEscape={false}` now hold however many times Esc is pressed. A child that handles Esc itself (a list closing) is left alone. If the browser closes the dialog anyway while `open` is true, it reopens, so the screen and `open` always agree.
11
+ - **Dialog: focus returns when an open dialog unmounts** (`{cond && <Dialog open />}`, a `useDialog()` confirm), to the element that had it before, as on a normal close.
12
+ - **PDF export on a dev server with engine fonts.** With `createFileEngine({ pdfFonts })`, PDFs in the Vite dev server failed with "Roboto-Regular.ttf not found": the raw pdfmake font file registers its fonts privately, and the engine's fonts hid them. They are now caught and merged, as in a build.
13
+ - **DataTable: failed export messages.** The result in the export panel is announced (`role="alert"` for an error, `status` otherwise). If the panel was closed while the file was being made, a failure or warning shows as a toast instead of being lost.
14
+ - **DataTable: `actionsHeader`** (view option) shows the actions column's "Actions" header. Default stays hidden (screen readers only).
15
+ - **`DialogHost` is exported**, so `useDialog()` works without the whole `UIProvider`.
16
+ - **`--dialog-width` is documented** as the supported way to size a dialog beyond `size` (README, `size` prop docs, Dialog → Custom Width story).
17
+ - **The package ships `CHANGELOG.md`.**
18
+ - **Sidebar: the collapsed rail's flyout closes** when the pointer moves on to a row with no children. It used to stay open, with that row's tooltip on top of it.
19
+
20
+ ## 0.8.0
21
+
22
+ ### Minor Changes
23
+
24
+ - 12b372e: DataTable defaults closer to a compact report table:
25
+
26
+ - Nothing is pinned by default: the first column is pinned only with `pinning: { firstColumn: true }`, a column's `sticky`, or the user pinning it.
27
+ - Row selection is on by default (on demand): the toolbar's Select button shows without bulk actions (the summary and the export follow the selection). Started with that button, selecting stays on until the button or Clear — unticking every row no longer hides the checkboxes. `selection: false` turns it off.
28
+ - The actions column stays pinned on the right at every width (it was unpinned at phone width and scrolled away). `pinning: { actions: false }` unpins it.
29
+ - Up to two row actions are buttons on each table row (new view option `inlineActions`, default 2; 0 = only ⋮): primary ones first, a 'danger' one only when primary. Cards and list items keep their one primary action.
30
+ - Shorter rows and header: the duplicate density paddings that overrode Compact / Default / Comfortable are gone; row action buttons are 28px and the header's filter / menu buttons 20px (default row 57px → 41px, header 46px → 33px).
31
+ - The "Showing all N rows" status line is not drawn while idle (the toolbar shows the count); it appears with selection, filters, grouping or a changed sort.
32
+ - The table fits where it stands: content above it (a date filter, a title) stays on screen with the toolbar, rows and bottom bar, as long as the rows keep 320px; otherwise the rows take the viewport's height as before.
33
+
34
+ ButtonGroup: a button with a tooltip no longer breaks the group's corners (the last button came out square on the right).
35
+
36
+ - 28a17ff: Select and Suggest lists fit the viewport: placed on the side of the field with more room (flipping on the height the list wants), and capped to the room there so their rows scroll inside the list — a long list no longer runs off-screen, where in a modal it could not be reached, and scrolling it never scrolls the page. An inline Suggest list (outside tables) measures its room inside the box that clips it (a dialog body) and opens upward when that side has more. A list whose field scrolls out of sight HIDES and comes back with it (the place in the list is kept); a popover (date calendar, menus) closes. `computePopoverPosition` returns `available` (the room on the chosen side). New Dialog story "All dropdowns inside" (Select, Suggest, calendar, menu; top and bottom of a scrolling body) and tests that each renders inside the dialog and that Escape closes the list, not the dialog.
37
+
38
+ Toasts show above modal dialogs: while a modal is open they render inside the topmost one (in `<body>` the modal — top layer — covered them and made them unclickable, including the error of a save made from that dialog), and move back once it has closed. Modal dialogs carry `data-modal` and their opening order; `useDialogOpen()` now stays true until a dialog has finished closing. New Dialog story "Everything over modals": toasts, tooltips, a confirm and a select over a dialog and a nested dialog.
39
+
40
+ DataTable's own toast (bulk action results, Undo) renders in the portal container too, so a table inside a modal dialog shows it above the dialog.
41
+
42
+ Suggest joins its list on the right side: when the list opens above, the field squares its TOP corners (and the list its bottom edge) instead of the bottom ones — Select already did. `SuggestionListProps.onPlacementChange` reports the side.
43
+
44
+ Lists opened ABOVE their field sit exactly as they do below: joined (outlined / filled) with no gap, floating (standard / underlined) 4px clear on the field's side — they overlapped by 3px (Select) or stood 6px off (Suggest). Placed by their exact rendered height (fractional, untouched by the entrance animation), so no hairline. An inline Suggest list hides while its field is out of sight, like Select's. New `--field-border-t` on the field control. New story: Fields / List placement — every variant of Select and Suggest, top and bottom of a page and of a scrolling modal.
45
+
46
+ - 39d51ae: Navigation gaps found moving an app onto Sidebar and Breadcrumbs:
47
+
48
+ - Sidebar: a parent row that is also a page (`href`, or a router link's `to` in `props`, plus `children`) is a link, and gets its own expand chevron beside it (a sibling button, never inside the link). Without a target a parent stays an expander row.
49
+ - Sidebar: new `beforeNav` slot between the header and the menu (a switcher, a search — the app's own JSX), outside the scrolling list.
50
+ - Sidebar: `header`, `beforeNav` and `footer` take a `SidebarSlot` — plain content, `{ expanded, collapsed }`, or `({ collapsed }) => content`. A state with no content draws no band at all (an `expanded`-only header leaves no empty band in the rail). A phone drawer is never collapsed. New export: type `SidebarSlot`.
51
+ - Sidebar and Breadcrumbs: the collapsed rail's hover menu and the breadcrumb related-pages menu render real links (`as` / `href` / `props`), like the rows, so an app never has to navigate in `onSelect` — and so never navigates twice. `onSelect(item, event)` now receives the click; on a link it is for side effects only.
52
+ - Breadcrumbs: `siblingsOf` may return groups (`group: true` with `children`), shown as section headings; the crumb's own page may be in the list and is marked current (✓, `aria-current`) instead of being offered. A crumb whose only sibling is itself gets no switcher.
53
+ - Sidebar: new `onCollapsedChange` — the sidebar's own collapse control: expanded, a full-width bar at the bottom; in the icon rail, an expand icon right after the last icon (pinned to the bottom when the icons overflow), and every empty space below it expands too, down to the bottom edge (desktop only; a drawer below 600px has none of it).
54
+ - New labels: `sidebar.showChildren`, `sidebar.collapse`, `sidebar.expand`. New stories: Navigation/Sidebar (parent rows that are pages, a branch switcher in `beforeNav` that opens a menu — the same menu from an icon in the rail, never expanding it — the collapse bar, the collapsed rail), Breadcrumbs "Grouped related pages".
55
+ - Sidebar collapse / expand is smooth end to end: the areas keep their width while moving (no squeezed switcher), their content fades out and the other state's fades in, an area the coming state has nothing for folds away (and grows back), open branches fold up during the collapse, and rail rows keep the expanded rows' height — nothing jumps when the rail arrives.
56
+
57
+ - 44afd0a: Form validates any Standard Schema (Zod, Valibot, ArkType, Yup 1.7+) with no `validate` adapter; blur checks only the field left; a failed submit shows every error (they used to stay hidden on untouched fields) and focuses the first. Form's `onChange`, `onBlur` and `validateOnBlur` now fire (they were never wired to the fields). Form's Submit/Reset and error toasts come from `labels.form`. New `Fields` prop `onFieldBlur`; new exports `validateStandardSchema`, `isStandardSchema`, `StandardSchemaV1`.
58
+
59
+ Dialog: a failing `action` in `confirm()` / `choose()` now rejects the caller's promise (it resolved as if it had succeeded). New `useDialogOpen()` for an app's own loading overlay.
60
+
61
+ Scroll: Tabs scroll inside ScrollStrip (fades and ‹ › arrows; the active tab is centred); edge fades on Dialog body, CommandPalette, Select / Suggest lists and Sidebar nav; Dialog body keeps a stable scrollbar gutter; Sidebar and DatePicker no longer override the shared scrollbar. `ScrollStrip` takes `as` and `stripRef`.
62
+
63
+ DropdownMenu: the icon row's tooltips use the library Tooltip, so the menu's edge no longer cuts them off.
64
+
65
+ - ba4fbe3: Tooltip `tone`: `'default' | 'info' | 'success' | 'warning' | 'danger'` — the theme's status colours with their readable text colours (light and dark), on `<Tooltip>` and on every component's `tooltip` prop (`tooltip={{ content, tone: 'danger' }}`). Default stays the neutral tip. New export: type `TooltipTone`.
66
+
67
+ ### Patch Changes
68
+
69
+ - 0a00022: Scroll fades no longer fade the scrollbars. The fade and the scrollbar say the same thing ("there is more this way"), and the thumb only shows while the area is pointed at, focused or scrolling — so at those moments the fade on the edge that carries a bar (the bottom one when there is a horizontal scrollbar, the inline-end one when there is a vertical scrollbar) fades out with the thumb's timing, and back in when the thumb hides. A table with many rows keeps its "more rows" fade at rest, and its horizontal bar is never faded. The listener marks `data-scroll-overflow-x` / `-y`.
70
+ - f3fbd35: DataTable Manage ▸ summary: typing straight into a card's name field just opened could be wiped (the field re-synced to the old name after the first keystrokes) and the rename lost. It now follows the name only when it changes from outside.
71
+
72
+ ## 0.7.0
73
+
74
+ ### Minor Changes
75
+
76
+ - dd961d4: Engine-level PDF fonts. `createFileEngine({ pdfFonts: { fonts, vfs } })` (or `UIProvider fileEngine={{ pdfFonts }}`) sends large fonts, such as a Unicode or script font, to each background worker once, when it starts, instead of with every PDF task. Tasks can then leave `fonts` out; a task's own fonts still go over the engine's. Builds on the main thread use the same fonts.
77
+ - eeaafc1: Stable styling hooks on fields, and Select's `onBlur` fixed.
78
+
79
+ - Every field marks its parts with `data-part`: `root`, `label-row`, `label`, `content`, `control` (the bordered box, or the box / circle / track of Checkbox, Radio and Switch), `trigger` (Select and DatePicker, as `"control trigger"`), `messages`, `error` and `hint`. Class names are hashed per build, so style through these, e.g. `.my-form [data-part~="control"] { … }`.
80
+ - **Fix:** Select's `onBlur` prop was never called. It now fires like every other field's.
81
+ - Select's blur and focus events carry the field name: the trigger has `name` (as a property, like an input) and `data-name`, so one shared `onBlur` can read `event.target.name` for Input, Suggest and Select alike.
82
+
83
+ - fec33a9: The file helpers are public: `downloadBlob`, `shareFile`, `openPreview`, `rawDataToBlob`, `createPdfBlob`, `executeFileAction`, `getExtension`, `getFormatLabel`, `safeFileName`, `safeFileBaseName`, `EXTENSION_MAP`, `MIME_MAP`, and the types `PdfFontConfig` and `FileAction`. An app that kept its own copies for one-off files (an importer, an older export) can use these instead. `createPdfBlob` builds through the hang-safe PDF builder; pdfmake loads on the first PDF.
84
+ - 6a7c4ed: File-engine notices through the app's own toasts. `FileEngineProvider`'s `notify` now also takes a function, and `UIProvider host={{ onFileNotice }}` sets one app-wide. It receives a `FileJobNotice`: `'awaiting-click'` (with `message`, `actionLabel`, `deliver()` and `dismiss()`), `'failed'` (with `message`, `actionLabel`, `retry()` and `dismiss()`), or `'resolved'` (close what you showed for that job). When a function is set, the library's toasts stay silent. Without one, nothing changes.
85
+ - e80ef21: The file engine's worker is published under a stable name, `@dcs-tech/ui/file-worker`, for bundlers other than Vite and webpack 5: build a module worker that imports it and pass `createWorker` to the engine. The README's new "Files and the background worker" section explains when this is needed. Vite and webpack 5 apps need no changes.
86
+ - b8357fc: App-wide hooks on `UIProvider`, and Form confirmations in the library's dialog.
87
+
88
+ - `UIProvider host={{ renderAuthorize, onToast, onNavigate, renderLoading, onConfirm }}` sets the app's hooks once for every Form, Fields, Collapsible and EditableTable below. A component's own prop still wins. `HostProvider` changes them for one section, and `useUIHost()` reads them. New types: `UIHostDefaults` and `UIConfirmRequest`.
89
+ - **Behaviour change:** a Form action with `confirm` no longer uses the browser's `window.confirm`. It asks the form's new `onConfirm` prop first, then `host.onConfirm`, then the library's dialog. Only with no `UIProvider` at all does it fall back to `window.confirm`.
90
+
91
+ - fec33a9: DataTable's Excel and PDF exports build in the file engine's background worker, so a large export no longer freezes the page. The file looks the same: title lines, header colours, stripes, `cellStyle` colours, totals, summary, page numbers.
92
+
93
+ - The worker's task types take plain-data styling. `XlsxSheetSpec` has new optional `before` / `after` rows (`XlsxRowSpec`, with `merge`), `headerStyle`, `stripe`, `cellStyles`, `autoFilter` and `freeze`, using `XlsxCellStyle` and `XlsxBorder`. `XlsxColumnSpec` has a new `style`. A `pdf` task has new `tableLayouts` (`PdfTableLayoutSpec`, used by name as a table's `layout`) and `footer` (`PdfPageFooterSpec`, with `{page}` and `{pages}`). Existing tasks build as before, except that the header row of an XLSX task is now always bold.
94
+ - ExcelJS now loads only when an Excel file is built. Before, the table's export code loaded it as soon as the export code loaded.
95
+ - Where the browser has no workers, or `fileEngine={{ workers: 'off' }}` is set, the same files build on the main thread as before.
96
+
97
+ ## 0.6.0
98
+
99
+ ### Minor Changes
100
+
101
+ - e8c7791: App-wide formatting: set locale, currency and date format once on `UIProvider`.
102
+
103
+ - `UIProvider` takes `locale` (e.g. `'en-IN'`), `currency` (e.g. `'INR'`) and `dateFormat` (`'dd-mm-yyyy'` | `'dd/mm/yyyy'` | `'yyyy-mm-dd'`). `FormatProvider` changes one of them for a section of the app; the rest is inherited.
104
+ - `useFormat()` formats through the browser's `Intl`: `number(1250000.5)` → `12,50,000.5`, `money(1250000)` → `₹12,50,000.00`, `percent(0.725, 1)` → `72.5%`, `day('2026-11-03')` → `03-11-2026`.
105
+ - DataTable (its `locale` prop still wins), DataTable date columns, DatePicker (its `displayFormat` still wins), EditableTable read-only numbers and totals, and Charts (numbers, dates, weekday names, the image) follow these settings.
106
+ - **Behaviour change:** with no locale set anywhere, numbers and dates now use the browser's locale. Summary figures, Charts and export dates used to be fixed to `en-IN` — set `locale="en-IN"` on `UIProvider` to keep Indian formatting.
107
+
108
+ - 222d56d: Collapsible API cleanup (breaking, minor on 0.x).
109
+
110
+ - **`CollapsibleAuthorize` is now any value your app chooses** (`unknown`) — a role, a feature key, an object. The library never reads it; it only passes it to `renderAuthorize`, which now receives it as `any`. It used to be a fixed object shape (`type` / `tab` / `subtab` / `featurename` / …) from one application's permission model. Existing objects still work; code that relied on the type's fields should declare its own type.
111
+ - **Removed `Component`, `JSX` and `props` from `CollapsibleItemProps`.** Pass the content as `children` (`<CollapsibleItem><MyPanel {...p} /></CollapsibleItem>`, or `children: <MyPanel {...p} />` in `items`).
112
+ - A `loading` item now marks its header `aria-disabled` and its panel `aria-busy`.
113
+ - `CollapsibleItem` is no longer wrapped in `React.memo` (it re-rendered on every toggle and every new `children` anyway).
114
+
115
+ - c614d05: File engine: build files, queue them, follow their progress and deliver them — with XLSX and PDF built in a background worker so the page never freezes.
116
+
117
+ - `createFileEngine({ concurrency, maxQueued, timeoutMs, keepFinished, workers, deliver, createWorker })`. Jobs are either a `build` function (main thread) or a plain-data `task` — `{ kind: 'xlsx', workbook }` or `{ kind: 'pdf', document, fonts }` — built in a background worker where possible. Per job: `priority`, `dedupeKey` (a double click makes one file), `replace`, `retry`, `action` (`download` / `share` / `preview` / `print` / `open` / `none`), `onReady`.
118
+ - Cancel (a worker is stopped mid-file), automatic and manual retry, a timeout instead of a hang, progress reporting.
119
+ - Share / preview / print / open need a fresh click in the browser. A file that finishes after that window waits as ready (`awaitingClick`) for `deliver(id)` from a click, instead of failing silently.
120
+ - Falls back to the main thread by itself when a worker cannot start (an unsupported bundler) or a task cannot be copied into one (a pdfmake document with layout functions). Tested with Vite 8 (production and dev) and webpack 5.
121
+ - `UIProvider` provides one engine to the whole app (`fileEngine` prop: options or an engine instance); `FileEngineProvider` gives a section its own.
122
+ - `useFileEngine()`, `useFileJob(id)`, and `<FileJobsTray>` — progress, cancel, retry, dismiss and the deliver button — with `labels`. Under `UIProvider`, a file waiting for a click and a failed file are also toasted, with the button that acts on them.
123
+ - The package now ships `dist/assets/fileTask.worker-*.js`. It imports `exceljs` and `pdfmake` by name — they stay dependencies, not bundled.
124
+ - DataTable exports and the Charts image menu (Download / Share) now run as jobs on the app's file engine: one shared queue, one file per double click, and they appear in `<FileJobsTray>`. Export results are reported in the export popover as before.
125
+ - **Fix:** a PDF export whose document pdfmake could not render (an undefined font, a broken table) hung forever. It now fails with pdfmake's reason.
126
+ - Engine additions: `wait(id)` (resolves with a job's outcome), and per-job `title` (the share sheet / preview window name) and `notify` (`'all'` or `'awaiting-click'`, for callers that report failures themselves).
127
+ - DataTable labels: `exportCancelled`, `exportAwaitingClick`.
128
+
129
+ - 8af90a0: DataTable dates: sorting, filters, grouping, the summary and exports work on the date, not on its text.
130
+
131
+ - New column options for `type: 'date'`: `parse` (`'dd-mm-yyyy'`, `'dd/mm/yyyy'`, `'yyyy-mm-dd'`, or a function) says how the stored value is read; `dateFormat` says how it is shown and exported as text (default `'dd-mm-yyyy'`).
132
+ - Date columns sort chronologically — for Date objects, ISO strings and `parse`d text — with blanks last in both directions. (Before, every date sorted as text: `dd-mm-yyyy` by day of month, Date objects by weekday name.)
133
+ - Date filters (the from / to column search, before / after / equals) compare days read through `parse`. `before` / `after` no longer use `new Date()`, which read `03-11-2026` as 11 March.
134
+ - Grouping uses the local day (a Date used to group by its UTC day, so rows near midnight landed on the wrong day), labelled in the column's format; the summary's per-day / per-month cards read through `parse`; the row menu's Only / Hide use the day.
135
+ - **Behaviour changes:** a date column without `cell` now shows its dates in `dateFormat` (`03-11-2026`) instead of the raw value, and exports them the same way; filter chips show dates in that format. Digits-only date text in an unknown order (`03-11-2026` without `parse`) is now read as no date rather than guessed — set `parse`.
136
+
137
+ - bb4e43b: DataTable value / format: one value per cell that every feature uses, and its text for people.
138
+
139
+ - New column options: `value(row)` (a computed or typed value — `cell` receives it, and sorting, filters, search, grouping and exports read it), `format(value, row)` (the text shown without `cell`, searched, and used by cards, copy and exports), and `numberFormat` presets `'integer'` / `'amount'` / `'currency'` / `'percent'` in the app's locale and currency (UIProvider).
140
+ - Per-feature overrides where they genuinely differ: `sortValue`, `compare`, `searchText`, `groupValue`.
141
+ - Global search matches a cell's text as shown (`03-11-2026`, `₹12,50,000.00`, an option's label) as well as its stored value.
142
+ - **Behaviour changes:** every column sorts blanks last in both directions (blank numbers used to sort as 0; blank text first when ascending). Select columns sort by their option labels.
143
+
144
+ - 95e0601: DataTable exports: each file format gets the right form of each value.
145
+
146
+ - **Excel:** real numbers and real dates (not text), with the column's number format — the date format, the `numberFormat` preset (`"₹"#,##0.00` with the app's currency), `#,##0` for whole numbers. The spreadsheet can sort, filter and sum them. Number formats now apply to date cells too.
147
+ - **CSV, PDF, HTML:** the text as shown on screen (`format`, the date format, the number preset).
148
+ - **JSON, XML:** typed values; dates as ISO days.
149
+ - **Totals** are summed from the typed values (formatted money used to total 0).
150
+ - **Two columns with the same header** no longer overwrite each other: the second becomes `Amount (2)` — also in `prepareExportRows`.
151
+ - **Formula injection:** text starting with `=`, `+`, `-`, `@`, a tab or a carriage return is prefixed with `'` in CSV and Excel, so a spreadsheet shows it instead of running it. Numbers are never touched.
152
+
153
+ - 8483ee6: Built-in words in the app's language: one `labels` dictionary for the whole library.
154
+
155
+ - `UIProvider` takes `labels` — any subset of `DEFAULT_UI_LABELS` (dialog buttons, Clear, Loading…, Select / Suggest / CommandPalette texts, DatePicker words and its 13 preset names, EditableTable row actions, Image picker / viewer, screen-reader names). `LabelsProvider` overrides some for a section; `useUILabels()` reads them. A component's own prop (`confirmLabel`, `clearLabel`, `loadingText`, `placeholder`, …) still wins.
156
+ - `labels.table` and `labels.charts` set DataTable's and Charts' dictionaries app-wide, under each component's own `labels`.
157
+ - DatePicker month and weekday names now come from the browser's `Intl` in the app's locale (English keeps "Su Mo Tu"); `monthNames` / `weekdayNames` still override.
158
+ - No visible change for English apps.
159
+
160
+ ## 0.5.0
161
+
162
+ ### Minor Changes
163
+
164
+ - 04735b6: Collapsible: state, nesting and id fixes.
165
+
166
+ - An item's own `defaultExpanded` now works inside `<Collapsible>` (as a direct child with an `id`, or as an `items` entry). It was ignored, so `Form` sections set to start open started closed.
167
+ - **Behaviour change — controlled mode is now truly controlled.** When `expanded` is passed, a click only calls `onChange`; the panel moves when the parent passes the new value back. Before, it also flipped an internal copy, so a parent that ignored `onChange` still saw panels move and then drift out of sync. If you pass `expanded`, store what `onChange` reports.
168
+ - `onChange` no longer fires twice under React StrictMode.
169
+ - An item's own `onChange` now fires when its header is toggled inside a container.
170
+ - Nested accordions: opening an outer item no longer opens, rotates or tints the items of an accordion inside it, and arrow keys stay within one level.
171
+ - A `CollapsibleItem` used on its own now gets the default (small) size and a turning chevron.
172
+ - Clicking the chevron of an open item now closes it. The rotated chevron used to sit above the header's click area and swallow the click.
173
+ - `animationDuration={0}` now disables the animation instead of falling back to 300ms.
174
+ - Header/panel DOM ids now always include a generated prefix, so two accordions using the same item ids no longer produce duplicate ids. Code that looked up `${id}-header` / `${id}-content` by id must use the `aria-controls` / `aria-labelledby` attributes instead.
175
+ - `items` entries without an `id` now get `item-<index>` as their id.
176
+ - New type exports: `CollapsibleDisclosure`, `CollapsibleTone`, `CollapsibleHeadingLevel`.
177
+
178
+ ### Patch Changes
179
+
180
+ - e6c2a6c: Fix webpack 5 builds: DataTable's PDF export now imports `pdfmake/build/pdfmake.js` and `pdfmake/build/vfs_fonts.js` with their extensions. This package is an ES module package, so webpack 5 resolves its imports strictly, and the extensionless paths failed every webpack 5 build that included DataTable ("failed to resolve only because it was resolved as fully specified"). Vite builds were not affected. A test now requires an extension on any deep import into a dependency without an `exports` map.
181
+
182
+ ## 0.4.0
183
+
184
+ ### Minor Changes
185
+
186
+ - 93177d2: Charts: a button per part when pickable, and the charts follow the UI scale.
187
+
188
+ - **A button per part.** With `onSelect`, a chart is no longer one `role="button"` for the whole plot. Each bar row, column, line point, donut / pie slice, stacked segment, funnel step, treemap tile and calendar day is its own button. It is named by what it shows ("North: 1,500") and carries `aria-pressed` for the selected one. The chart is still ONE tab stop (roving tabindex): Tab lands on the selected part (else the first), and the arrows, Home and End move the focus with the same steps as before. Enter / Space pick the focused part. The focused part is ringed (a donut, a stacked bar and a line ring the plot instead). A part with `selectable: false` is an `aria-disabled` button that is never picked. A BarList row with `href` is its link, not a button, and the arrows skip it. Read-only charts are unchanged (`role="img"`). The pointer, hit testing and tooltips are unchanged.
189
+ - **The UI scale.** Chart text, paddings, label columns, legends, tooltips and the image menu follow `--ui-scale`, through the spacing / font-size tokens or `calc(Npx * var(--ui-scale))`. Sizes laid out in script grow too: plot heights, ring and dial diameters, the room an x label needs, treemap label room, and calendar day and name sizes. **`height` / `size` props are now px at UI scale 1**, so a chart passed `height={72}` is 72 px at scale 1 and 93.6 px at 1.3. At scale 1 nothing moves. The PNG export is unchanged.
190
+ - `treemapLayout`, `calendarCellSize` and `calendarMonthLabels` take an optional trailing `scale` (default 1).
191
+ - BarList rows, treemap tiles and funnel rows have a space between name and number in their text content. On screen this changes nothing; `textContent` reads "North 1,500".
192
+ - ImageStrip: the "+N" thumbnail is named "+2 more, open image 5 of 6" (it opens the first image not shown).
193
+
194
+ DataTable's summary strip switches to four card columns only from 1000px × `--ui-scale` (1300px at 1.3), so larger text no longer squeezes four cards side by side.
195
+
196
+ - 73a86ec: Colour scales, readable text colours, and contrast fixes.
197
+
198
+ **New tokens** (`tokens.css`)
199
+
200
+ - Twelve-step scales for `primary`, `secondary`, `success`, `warning`, `error`, `info` and `neutral` (`--primary-1` … `--primary-12`, …). Each step has one job: 1–2 backgrounds, 3–5 component fills (rest, hover, selected), 6–8 borders, 9–10 solid, 11–12 text. Step 9 is the existing colour and step 10 its hover, so nothing that already uses them changes. The scales are derived from the semantic colours with `color-mix()`, so changing a hue still re-themes every step, in both themes. They're also declared on `[data-theme]`, so a themed subtree gets its own scales.
201
+ - `-text` for each colour (`--accent-primary-text`, `--success-text`, …): the colour as text, at least 5.2:1 on every surface and on its own `-soft`, in both themes.
202
+ - `-soft` for each colour: a translucent tint that reads the same on the page, a card or a tinted panel.
203
+
204
+ **Changed**
205
+
206
+ - Every component that used a solid as **text** now uses its `-text` token (116 declarations). The solids are tuned as fills and failed as text: `--accent-primary` measured 4.4:1 on the light page, info 3.6, warning 2.6, and the dark error 4.5. Light-mode text gets a slightly deeper shade of the same colour; dark-mode text gets slightly lighter.
207
+ - `--text-tertiary` (light) 45% → 41% grey: it measured 4.35:1 on the page and 3.98 on `--bg-tertiary`.
208
+ - Badge `filled`: text now uses the solid's `--on-*` colour instead of white, which failed on warning and info in light mode and on every solid in dark mode.
209
+ - Button: outlined, text, elevated and tonal labels use the tone's readable text colour. The tonal hover label uses `--on-*`.
210
+ - Badge neutral in dark mode, and the badge on an active pill tab, now pass AA.
211
+
212
+ Measured with axe on every story: contrast failures went from 265 to 48 in light and from 179 to 39 in dark. What remains is hardcoded colours in DataTable, Charts and Avatar, plus the Palette story's own sample labels.
213
+
214
+ - 9a8da76: DataTable follows the UI scale and the theme; DataTable and Charts move onto tokens.
215
+
216
+ **DataTable now follows `--ui-scale`.** It used fixed pixels throughout, so at any scale other than 100% its fields and dropdowns grew while the table text, headers, toolbar and rows stayed the same size. Every spacing value, font size and dimension in its CSS (padding, margin, gap, width, height, insets) is now a token where an exact one exists, and `calc(N * var(--ui-scale))` otherwise. That includes the per-table "font size" display setting and DataTable's local `--field-height-xs`. At 100% nothing moves: the 253-story screenshot comparison differs only in the avatar colours below.
217
+
218
+ **Contrast and dark mode (DataTable, Avatar)**
219
+
220
+ - White text on the primary solid (the tonal button, badges, dialog header icons, the active pill) now uses `--on-primary`. White failed on the light dark-mode primary. The ui-local modal's close-button hover uses `--on-error`.
221
+ - Export notice and result messages used fixed amber, green and red that never changed in dark mode. They now use `-soft` / `-text` / scale tokens.
222
+ - The loading overlay was a white wash in dark mode too. It now uses the panel colour.
223
+ - Unavailable summary cards are shown recessed (sunken surface, dashed edge) instead of at 70% opacity, which took their explanation text below AA.
224
+ - Avatars (DataTable and Avatar `tone`) use OKLCH instead of HSL, so every hue gets the same contrast: at least 5.2:1 in DataTable (white on colour), and 5.5:1 light / 7.7:1 dark for Avatar tones. The HSL versions dropped to 2.6:1 and 3.6:1 on yellow hues. **Each person's avatar colour shifts** (OKLCH and HSL hue angles differ), but it's still stable per person.
225
+ - axe now reports no contrast failures in DataTable, Avatar, Card, Badge or Button, in either theme.
226
+
227
+ **Tokens**
228
+
229
+ - DataTable and Charts: exact transition durations and keyword easings use the motion tokens. Exact radii use radius tokens; `--dt-radius` is `--border-radius-lg`.
230
+ - Charts keeps fixed pixel sizes: its SVG layout is computed in JavaScript, so it can't follow `--ui-scale` from CSS alone.
231
+
232
+ - a45fd0d: Token documentation, contrast and accessibility checks in CI, and a visual diff on pull requests.
233
+
234
+ **Changed**
235
+
236
+ - `--info-hover` (light theme) is now **lighter** than `--info` instead of darker. Info carries dark text (`--on-info`), and the darker hover took that text down to 3.6:1, so an info button's label was unreadable on hover. The new contrast check found it.
237
+
238
+ **Docs**
239
+
240
+ - New Storybook pages: **Foundations / Typography, Space and shape, Motion, Elevation and layers**, and **Token reference**, which lists all 288 tokens, read from `tokens.css` itself, with their live values in the current theme, filterable. All of them pass axe in both themes.
241
+ - A design-token guide in the repository: the rules for using and adding tokens, the colour roles and scale steps, motion, layers, and what each check enforces.
242
+
243
+ **Checks** (tooling only, nothing that ships)
244
+
245
+ - `npm run verify:contrast` loads the tokens in Chromium and fails if any of 254 promised pairs is under WCAG AA, in light or dark.
246
+ - `npm run check:a11y` runs axe on every story in both themes. It fails on any colour-contrast violation (currently none, across 253 stories) and reports the other axe rules without failing.
247
+ - CI runs both. A new `visual` job on pull requests builds the base branch's Storybook and the PR's, screenshots every story in both, and reports what changed, with before / after / diff images as an artifact. It never fails the PR.
248
+
249
+ - 9a7d129: Motion system, exit animations, sliding tab indicator, and a token guardrail in the build.
250
+
251
+ **New tokens** (`tokens.css`)
252
+
253
+ - Durations named by what moves: `--duration-micro` 100ms, `--duration-short` 150ms, `--duration-medium` 200ms, `--duration-long` 300ms. Exits use the step below their enter.
254
+ - Easing by purpose: `--ease-standard`, `--ease-enter`, `--ease-exit`, and `--ease-spring` (a `linear()` spring with ~4% overshoot).
255
+ - `--motion-scale`: 1 normally, 0 under `prefers-reduced-motion`. Reduced motion removes movement and keeps the short fade.
256
+ - `--motion-enter-offset` and `--motion-enter-scale`: the shared distance and scale every floating surface enters from.
257
+ - `--transition-fast`, `--transition-base` and `--transition-slow` are now aliases of the new durations, with the same values as before.
258
+
259
+ **Components**
260
+
261
+ - Popover, and everything built on it (DropdownMenu, DatePicker, Breadcrumbs, Sidebar flyout), Select's list and Suggest's list now **animate out** instead of disappearing. They enter from their anchor, flipping direction when placed above it. Joined Select/Suggest lists are revealed from the field's edge. While leaving, a surface is `inert`.
262
+ - Tabs (`line`, `pill`): one indicator now **slides** to the active tab with the spring easing. Under reduced motion it jumps.
263
+ - Tabs: hovering the active tab no longer repaints it (the active pill turned grey, with dark text). The `line` underline now shows its full 2px; half of it was clipped under the strip border.
264
+ - Select: its inline z-index (1000, or 10000 in a modal) overrode the `--z-popover` layer; removed.
265
+ - `SuggestionList`: `zIndex` no longer defaults to 1000. When omitted, the list uses `--z-popover`; a number you pass is still applied. New optional `exiting` prop, which Suggest sets itself.
266
+
267
+ **Build**
268
+
269
+ - New `verify:tokens` step. It fails on a `var(--x)` with no fallback that nothing defines (this would have caught the DropdownMenu hover bug). It also fails when a component CSS file gains hardcoded colours, font sizes or weights, z-indexes, durations or easings beyond `scripts/token-baseline.json`. After removing literals, lower the baseline with `npm run verify:tokens -- --update`.
270
+
271
+ - bbcc4d2: DataTable: its own buttons now use the shared Press feedback. Toolbar and pagination icon buttons, header filter and ⋮ buttons, dialog close buttons, export and template buttons, the bulk-action, retry and footer buttons all show the wave from where you press, or from the centre for Space and Enter. Clickable table rows, cards and split list items show the Press tint while pressed. There is no wave and they do not shrink. Layout, hover colours, handlers and keyboard behaviour are unchanged.
272
+ - 1512a3d: A shared Press engine for press feedback, and an opt-in `feedback` prop on Button.
273
+
274
+ - **Press engine** (`components/Press`, internal): one stylesheet plus a `usePress` hook that any pressable element opts into, so components stop writing their own press and ripple rules.
275
+ - **Every press is seen.** `usePress` holds the pressed look for at least 150ms, however quick the click. CSS `:active` ends the instant the pointer lifts, which is why the old ripple showed nothing on a normal click. Mouse, touch, pen, Space and Enter all count.
276
+ - **State layer:** the element's own text colour over its background. It fades both ways and works on every variant, colour and theme.
277
+ - **Press-down:** shrinks to 97% and springs back. It uses the `scale` property, so it never conflicts with a component's `transform`.
278
+ - **Ripple mode:** a wave that starts exactly where you pressed (the centre for the keyboard) and grows across the element. It holds while pressed and fades as it spreads on release, so a quick click still sends a visible wave across. Each press gets its own wave, so rapid presses overlap. In this mode the wave is the only effect: no pressed tint, no press-down.
279
+ - **Reduced motion:** no press-down, and waves appear in place instead of spreading, so a press is still always visible.
280
+ - **New tokens:** `--state-hover-opacity`, `--state-press-opacity`, `--press-scale`, `--press-transition`, `--ripple-duration`, `--ripple-opacity`. `--state-layer-opacity` is a registered property, so it can animate.
281
+ - **Button press feedback is now a wave by default** (`feedback`, default `'ripple'`). It starts where you press, spreads across the button and fades as it spreads. This replaces the old centred ripple, which grew only while the mouse was held and vanished on release. `feedback="press"` gives a pressed tint and press-down instead; `feedback="none"` turns press feedback off. `ripple={false}` still works and means `feedback="none"`. The hover lift on filled and elevated buttons is removed. Each variant keeps its hover colours.
282
+ - **New Storybook page, Foundations / Press feedback:** every Button variant three ways side by side, plus the engine on tabs, menu rows, chips and a card.
283
+
284
+ - **Fixed:** in dark mode, filled Buttons had light text on their light solids (1.65:1). An old dark-theme rule overrode `--on-*`; it is removed, so filled buttons use their readable on-colour.
285
+ - **Fixed:** the press tint is painted only while it can show (hover, press, fade). At rest it was a transparent background image, which stopped axe from measuring contrast on every pressable element. `check:a11y` now reports how much contrast it couldn't measure, so a blind spot like that shows up.
286
+
287
+ - 1910eee: Menu-like rows now show the shared Press wave when pressed: DropdownMenu items, Select options (and Select all), Suggest suggestions, CommandPalette results, and Sidebar nav items and flyout rows. Rows keep their own hover, cursor and selected fills; nothing moves.
288
+ - 1bee8f7: Tabs (panel and navigation mode) and clickable Cards now show the shared Press wave from where they are pressed; DatePicker day cells show a brief press tint (no wave, no press-down). ChipInput is unchanged: its chips are not clickable and the remove × deletes the chip on press, so there is nothing left to show feedback on.
289
+ - a840251: Checkbox, Radio and Switch now use the shared Press engine for their press feedback: a wave that starts from the centre of the control's round halo and is clipped to it, whether you press the control, its label or Space. Switch gets the wave too. The keyboard focus halo is now steady instead of pulsing forever. `usePress` gains two optional settings: `centered` (start every wave from the centre) and `target` (show the press on another element, such as a halo inside a label).
290
+ - 4cf7d1d: Source moved to its own repository. **Breaking:** `ReportDesigner`, `ReportPreview` and their editors (`BandList`, `Inspector`, `BlockEditor`, `TableEditor`, `ColumnEditor`, `AlignedRowsEditor`, `ConditionEditor`, `StyleEditor`, `FormatEditor`, `FieldSelect`, `FieldPicker`, `OptionsEditor`, `WatermarkEditor`, `BAND_KINDS`, `canSaveTemplate`, `conditionSummary`) are no longer part of this package.
291
+ - 32b0a4f: Shadow and scrim tokens. Popups, dialogs, drawers, sheets, pinned-column edges, knobs and backdrops no longer hardcode their shadow or dim colour, so they deepen in dark mode like the rest of the shadows.
292
+
293
+ New tokens (light / dark):
294
+
295
+ - `--shadow-control`: knobs, slider thumbs, small round buttons that float on content.
296
+ - `--shadow-popover`: floating menus and popovers.
297
+ - `--shadow-dialog`: modal panels (dialogs, drawers, bottom sheets), with a 1px edge ring.
298
+ - `--shadow-edge`: the edge of a pinned column while content scrolls under it; even on all sides, clip it to one side.
299
+ - `--scrim`: the dimming layer behind a dialog.
300
+ - `--scrim-soft`: a lighter dimming layer behind a drawer or action sheet.
301
+
302
+ Now on tokens: Dialog's backdrop, Switch's thumb, Image's viewer buttons and "+N" overlay, and DataTable's container, cards, menus, popovers, settings / sort / filter / export / column modals, keyboard-shortcuts dialog, fields editor, row-detail drawer and scrim, row menu popover and sheet, export bottom sheet, segmented controls, tabs and pinned-column edges.
303
+
304
+ Light mode looks nearly the same; values that were close were snapped to a shared token (the DataTable drawer and bottom sheet now use the dialog shadow instead of a one-sided one, and the keyboard-shortcuts and fields-editor dialogs use the dialog shadow). Dark mode shadows and scrims are now deeper.
305
+
306
+ - f89b4b6: New `Stepper`: a row of numbered steps (done, current, ahead) for a multi-step screen. Done steps can be clicked to go back; steps ahead cannot.
307
+
308
+ Done steps play the shared Press wave when clicked, and are announced as completed to screen readers (`completedLabel`, default "Completed", for translation). An `active` key that matches no step now marks no step current, instead of the first. The step states and clickability are decided in `core/logic` (`stepStates`, `isStepClickable`).
309
+
310
+ - 8effafb: Token fixes: missing variables, one z-index scale, and theme-driven Typography.
311
+
312
+ - DropdownMenu hover now uses `--hover-overlay` (it referenced an undefined `--bg-hover`, so it showed no hover). DataTable's muted cells now use `--disabled-text` instead of an undefined `--text-disabled`.
313
+ - New tokens: `--font-weight-bold`, `--z-appbar` (alias for `--z-fixed`) and `--z-popover` (560, above `--z-modal`).
314
+ - Every stacked layer now uses the `--z-*` scale instead of literals (900–2147483000). The AppBar no longer sits above modals and toasts. Menus, Select and Suggest lists, and DataTable popovers now use `--z-popover`. **If your app positions its own elements with a z-index around 1000, re-check them against these lower values, or override the `--z-*` tokens.**
315
+ - Typography no longer follows the OS `prefers-color-scheme` when the app has chosen a theme; it follows `data-theme` like everything else. `[data-theme="dark"]` now sets `color-scheme: dark`, so native scrollbars and pickers match.
316
+
317
+ - cd2a23c: Type and space tokens, with components moved onto them.
318
+
319
+ **New tokens** (`tokens.css`)
320
+
321
+ - `--font-sans`: the stack the reset always used, so nothing changes. An app with a web font sets it once. `--font-mono` replaces four different monospace stacks.
322
+ - `--font-size-h1` … `--font-size-h6`: fluid heading sizes. They keep Typography's previous min–max ranges but now also follow `--ui-scale` (the old viewport-only `clamp()`s ignored it).
323
+ - `--line-height-tight` (1.2, headings), `--line-height-snug` (1.4, UI text), `--line-height-normal` (1.5, body).
324
+ - `--font-weight-regular` (400), `--spacing-xxs` (2px), `--spacing-2xl` (24px), `--spacing-3xl` (32px), `--border-radius-xs` (4px), `--border-radius-full` (pills). Several of these were already referenced by components, with hardcoded fallbacks.
325
+ - `--label-spacing` and `--message-spacing` now follow `--ui-scale` (`--spacing-md` / `--spacing-sm`, same values at scale 1).
326
+
327
+ **Changed**
328
+
329
+ - Swaps with the same value, so nothing changes on screen: radii, line heights of 1.2/1.4/1.5, font weights and monospace stacks now use tokens in every component. Outside DataTable and Charts, exact font sizes and spacing also moved to the scaled tokens. Literal counts: font weights 170 → 2, radius 180 → 83, line height 90 → 46, spacing 731 → 692.
330
+ - 226 hardcoded fallbacks on tokens that are always defined were removed (`var(--font-size-sm, 13px)` → `var(--font-size-sm)`). Charts keeps its fallbacks deliberately.
331
+ - Typography: headings use the heading tokens. h3/h4 line height 1.3 → 1.2. body2 1.43 → 1.4, subtitle2 1.57 → 1.5 and caption 1.66 → 1.5. `code` and `pre` use `--font-mono` instead of Courier New.
332
+ - Breadcrumbs' focus radius is 4px (it fell back to 2px).
333
+ - DataTable: right-aligned (numeric) cells and the totals row use tabular numbers, so digits line up down the column.
334
+
335
+ **Build**
336
+
337
+ - `verify:tokens` now also tracks hardcoded spacing (`padding`/`margin`/`gap`), line heights and radii in component CSS.
338
+
339
+ Checked by screenshotting all 253 stories before and after: 238 are identical. The others differ by Typography's line-height changes, or are stories that differ between two runs of the same code.
340
+
341
+ ### Patch Changes
342
+
343
+ - bcb0682: Accessible names for fields, tables, breadcrumbs, tabs and charts. axe now passes on every story.
344
+
345
+ - **EditableTable:** every field in a cell takes its column header as its accessible name. The header was the label visually but wasn't connected, so each input, select, checkbox and switch in the grid was announced with no name. A column that names its field itself (`fprop.label`, `aria-label` or `aria-labelledby`) keeps its own. A column with no header text gets a plain header cell, not an empty `<th>`.
346
+ - **Select:** a visible label now names the trigger. `<label for>` only names native form controls, and the trigger is a `div role="combobox"`, so every labelled Select had no accessible name. It now uses `aria-labelledby`, as Input and DatePicker already do.
347
+ - **Breadcrumbs:** the icon-only home link is named "Home". The name was on a wrapping span, where it named nothing.
348
+ - **Tabs:** `aria-controls` points only at panels that are actually rendered. A strip driving routes or other content no longer references missing ids.
349
+ - **DataTable:**
350
+ - cards are `div role="listitem"` (an `article` may not take that role)
351
+ - the loading overlay is a `role="status"`
352
+ - the filter row's selection and action cells are plain cells, not empty headers
353
+ - **Charts (BarList):** rows are divs. Inside a plot with `role="img"` or `"button"`, list items had no list.
354
+
355
+ Visual diff against the previous version: no component renders differently.
356
+
357
+ - a3bf02e: Button rendered as a link (`href`) keeps the button's text colour in every link state. A visited link button took the surrounding text colour (`:visited { color: inherit }`), and an app's own `a:link`, `a:visited` or `a:hover` colour rules outranked the variant colour. Each variant now routes its text colour through `--btn-fg`, and link states use it.
358
+
359
+ Typography `code` and `pre` use `--neutral-3` for their background. They referenced `--background-secondary`, which was never defined, so only a hardcoded fallback applied.
360
+
361
+ - 40164cd: Sidebar: smoother collapse and expand. The column width still animates (`--duration-long`,
362
+ `--ease-standard`), but the content no longer re-lays out on every frame: while moving, the
363
+ header, nav and footer keep their expanded width and are clipped, and labels and group headings
364
+ fade with opacity instead of being squeezed into an ellipsis. The rail layout is applied once the
365
+ width has arrived. Under reduced motion (`--motion-scale: 0`) the collapse is instant. End states
366
+ and the API are unchanged; the header no longer wraps.
367
+
368
+ Typography: `subtitle1` and `overline` use `--line-height-normal` (1.5) instead of the leftover
369
+ Material line heights 1.75 and 2.66, so both are slightly shorter; the colour transition uses
370
+ `--duration-medium`.
package/README.md CHANGED
@@ -129,6 +129,22 @@ Every colour, size and spacing value is a CSS custom property. Override them on
129
129
  `variant` is per family — `outlined | filled | standard | underlined` for text
130
130
  fields, `outlined | filled | standard` for Checkbox and Radio, none for Switch.
131
131
 
132
+ ### Dialog width
133
+
134
+ `Dialog` takes `size="sm | md | lg | xl | full"` (420 / 560 / 720 / 960 px / the whole
135
+ window). For any other width, set `--dialog-width`. It is the supported way, and it wins
136
+ over `size`:
137
+
138
+ ```tsx
139
+ <Dialog open title="Wide" style={{ '--dialog-width': '840px' } as React.CSSProperties} />
140
+ ```
141
+
142
+ ```css
143
+ .invoice-dialog { --dialog-width: min(1100px, 95vw); } /* <Dialog className="invoice-dialog"> */
144
+ ```
145
+
146
+ For a side or top/bottom sheet (`placement`), it sets the panel's width or its max width.
147
+
132
148
  ## Licence
133
149
 
134
150
  UNLICENSED — © 2026 Noyyal Tech. All rights reserved.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { A as e, C as t, Cn as n, Dn as r, E as i, En as a, F as o, J as s, L as c, N as l, Nn as u, O as d, P as f, Q as p, R as m, S as h, T as g, Tn as _, Y as v, _ as y, b, c as x, d as S, et as C, ft as w, g as T, h as ee, i as te, j as ne, kn as re, l as ie, r as ae, rt as oe, st as E, ut as se, w as ce, y as le } from "./geometry-yZmKN662.js";
3
- import { a as ue, l as de, n as fe, o as pe, u as me } from "./fileActions-COf5Q4Eg.js";
4
- import { t as he } from "./runFileTask--4YjQH7Y.js";
3
+ import { a as ue, l as de, n as fe, o as pe, u as me } from "./fileActions-CFNO14Aj.js";
4
+ import { t as he } from "./runFileTask-BIZTFnZP.js";
5
5
  import ge, { cloneElement as _e, createContext as ve, forwardRef as ye, useCallback as D, useContext as be, useEffect as O, useId as xe, useLayoutEffect as Se, useMemo as Ce, useRef as k, useState as A, useSyncExternalStore as we } from "react";
6
6
  import { Fragment as Te, jsx as j, jsxs as M } from "react/jsx-runtime";
7
7
  import { createPortal as Ee } from "react-dom";
@@ -574,7 +574,7 @@ var V = class extends Error {
574
574
  constructor(e, t) {
575
575
  super(t), this.name = "FileEngineError", this.code = e;
576
576
  }
577
- }, at = (e, t, n) => ue(e, me(t.filename) + pe(t.format), t.format, n, t.title ?? t.filename), ot = () => typeof navigator > "u" ? void 0 : navigator.userActivation?.isActive, H = (e) => e instanceof Error ? e.message : String(e), st = () => new Worker(new URL("./assets/fileTask.worker-BHT1olUk.js", import.meta.url), { type: "module" }), ct = () => typeof Worker < "u", lt = 0;
577
+ }, at = (e, t, n) => ue(e, me(t.filename) + pe(t.format), t.format, n, t.title ?? t.filename), ot = () => typeof navigator > "u" ? void 0 : navigator.userActivation?.isActive, H = (e) => e instanceof Error ? e.message : String(e), st = () => new Worker(new URL("./assets/fileTask.worker--Q3rI3Bn.js", import.meta.url), { type: "module" }), ct = () => typeof Worker < "u", lt = 0;
578
578
  function ut(e = {}) {
579
579
  let t = Me(e), n = e.deliver ?? at, r = `file-${++lt}-`, i = [], a = 0, o = !1, s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(), d = null, f = t.workers === "auto" && (!!e.createWorker || ct()), p = () => {
580
580
  if (!f) return null;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "./ChartImageMenu-AsfvmdTH.js";
2
+ import { t as e } from "./ChartImageMenu-DDVNJNc6.js";
3
3
  import { n as t } from "./summaryChartData-CARqGRUl.js";
4
4
  import { jsx as n } from "react/jsx-runtime";
5
5
  // src/components/DataTable/summary/SummaryImage.tsx
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { t as e } from "./ChartImageMenu-AsfvmdTH.js";
2
+ import { t as e } from "./ChartImageMenu-DDVNJNc6.js";
3
3
  import { t } from "./ChartView-CW3m4Z_1.js";
4
4
  import { J as n, Tt as r, U as i, ot as a } from "./geometry-yZmKN662.js";
5
- import { n as o, o as s, s as c } from "./scrollArea-Dd2dNMV4.js";
5
+ import { n as o, o as s, s as c } from "./scrollArea-DbYFqbIH.js";
6
6
  import { r as l, t as u } from "./summaryChartData-CARqGRUl.js";
7
7
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
8
8
  // src/components/DataTable/summary/SummarySeeAll.tsx
@@ -0,0 +1 @@
1
+ const e=()=>new DOMException(`Aborted`,`AbortError`);async function t(t,n){if(n.signal?.aborted)throw e();switch(t.kind){case`xlsx`:return d(t.workbook,n);case`pdf`:return h(t,n);default:throw Error(`Unknown file task: ${t.kind}`)}}const n=globalThis;async function r(){let e=await import(`exceljs`),t=[e.default?.default,e.default,e,n.ExcelJS].find(e=>e&&typeof e.Workbook==`function`);if(!t)throw Error(`ExcelJS did not load`);return t}let i=null;function a(){return i||=o().catch(e=>{throw i=null,e}),i}async function o(){let e=await import(`pdfmake/build/pdfmake.js`),t=[e.default?.default,e.default,e,n.pdfMake].find(e=>e&&typeof e.createPdf==`function`);if(!t)throw Error(`pdfmake did not load`);let r,i=`pdfMake`in n,a=i?n.pdfMake:n.pdfMake={},o=a?.addVirtualFileSystem;a&&(a.addVirtualFileSystem=e=>{r=e,o?.call(a,e)});let s;try{s=await import(`pdfmake/build/vfs_fonts.js`)}finally{i?a&&(o?a.addVirtualFileSystem=o:delete a.addVirtualFileSystem):delete n.pdfMake}return{pdfMake:t,vfs:[s?.default,s,s?.pdfMake?.vfs,s?.default?.pdfMake?.vfs,r,t.vfs,n.pdfMake?.vfs].find(e=>e&&e[`Roboto-Regular.ttf`])}}const s=e=>ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e,c=e=>`FF`+e.replace(`#`,``).toUpperCase();function l(e,t){if(t&&((t.bold!==void 0||t.italic!==void 0||t.size||t.color)&&(e.font={...e.font??{},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.size?{size:t.size}:{},...t.color?{color:{argb:c(t.color)}}:{}}),t.fill&&(e.fill={type:`pattern`,pattern:`solid`,fgColor:{argb:c(t.fill)}}),t.align&&(e.alignment={horizontal:t.align,vertical:`middle`}),t.numFmt&&(typeof e.value==`number`||e.value instanceof Date)&&(e.numFmt=t.numFmt),t.borderTop||t.borderBottom)){let n=e=>({style:e.style,...e.color?{color:{argb:c(e.color)}}:{}});e.border={...t.borderTop?{top:n(t.borderTop)}:{},...t.borderBottom?{bottom:n(t.borderBottom)}:{}}}}function u(e,t,n){let r=e.addRow(t.values);t.style?.bold&&(r.font={bold:!0}),t.merge&&n>1&&e.mergeCells(r.number,1,r.number,n);let i=t.merge?1:Math.max(t.values.length,0);for(let e=0;e<i;e++){let n=r.getCell(e+1);l(n,t.style),l(n,t.cells?.[e])}}async function d(t,n){let i=new(await(r())).Workbook,a=Math.max(1,t.sheets.reduce((e,t)=>e+t.rows.length,0)),o=Math.max(1,Math.floor(a/50)),d=0;for(let r of t.sheets){let t=i.addWorksheet(r.name),s=r.columns.length;t.columns=r.columns.map((e,t)=>({key:String(t),width:e.width}));for(let e of r.before??[])u(t,e,s);let f=t.addRow(r.columns.map(e=>e.header));f.font={bold:r.headerStyle?.bold??!0},f.eachCell((e,t)=>{let n=r.columns[t-1]?.align;n&&(e.alignment={horizontal:n,vertical:`middle`}),l(e,r.headerStyle)});let p=f.number;r.freeze?t.views=[{state:`frozen`,ySplit:r.freeze.rows??0,xSplit:r.freeze.cols??0}]:r.freezeHeader!==!1&&(t.views=[{state:`frozen`,ySplit:p}]),r.rows.forEach((i,s)=>{let u=t.addRow(i),f=r.cellStyles?.[s],p=r.stripe&&s%2==1;if(r.columns.forEach((e,t)=>{let n=u.getCell(t+1);e.numFmt&&(typeof n.value==`number`||n.value instanceof Date)&&(n.numFmt=e.numFmt),e.align&&(n.alignment={horizontal:e.align,vertical:`middle`}),p&&(n.fill={type:`pattern`,pattern:`solid`,fgColor:{argb:c(r.stripe)}}),l(n,e.style),l(n,f?.[t])}),++d%o===0){if(n.signal?.aborted)throw e();n.progress(d/a*.9)}}),r.autoFilter&&r.rows.length>0&&(t.autoFilter={from:{row:p,column:1},to:{row:p,column:s}});for(let e of r.after??[])u(t,e,s)}let f=await i.xlsx.writeBuffer();return n.progress(1),s(f)}const f={Roboto:{normal:`Roboto-Regular.ttf`,bold:`Roboto-Medium.ttf`,italics:`Roboto-Italic.ttf`,bolditalics:`Roboto-MediumItalic.ttf`}};function p(e){let t=e.hLineWidth??1,n=e.edgeLineWidth??t;return{hLineWidth:(e,r)=>e===0||e===(r.table.headerRows??0)||e===r.table.body.length?n:t,vLineWidth:()=>e.vLineWidth??1,...e.hLineColor?{hLineColor:()=>e.hLineColor}:{},...e.vLineColor?{vLineColor:()=>e.vLineColor}:{},...e.paddingX===void 0?{}:{paddingLeft:()=>e.paddingX,paddingRight:()=>e.paddingX},...e.paddingY===void 0?{}:{paddingTop:()=>e.paddingY,paddingBottom:()=>e.paddingY}}}function m(e){return(t,n)=>({text:e.text.replace(/\{page\}/g,String(t)).replace(/\{pages\}/g,String(n)),...e.font?{font:e.font}:{},alignment:e.alignment??`center`,fontSize:e.fontSize??8,...e.color?{color:e.color}:{},...e.margin?{margin:e.margin}:{}})}async function h(t,n){let r=n.pdfFonts?{fonts:{...n.pdfFonts.fonts,...t.fonts?.fonts},vfs:n.pdfFonts.vfs||t.fonts?.vfs?{...n.pdfFonts.vfs,...t.fonts?.vfs}:void 0}:t.fonts,i=t.footer?{...t.document,footer:m(t.footer)}:t.document,o=t.tableLayouts?Object.fromEntries(Object.entries(t.tableLayouts).map(([e,t])=>[e,p(t)])):void 0,{pdfMake:s,vfs:c}=await a();if(n.progress(.1),n.signal?.aborted)throw e();let l={...f,...r?.fonts??{}},u=r?.vfs?{...c??{},...r.vfs}:c,d=await new Promise((e,t)=>{try{let n=s.createPdf(i,o,l,u).getStream(),r=[];n.on(`data`,e=>r.push(e)),n.on(`error`,t),n.on(`end`,()=>{let t=new Uint8Array(r.reduce((e,t)=>e+t.byteLength,0)),n=0;for(let e of r)t.set(e,n),n+=e.byteLength;e(t.buffer)}),n.end()}catch(e){t(e)}});return n.progress(1),d}let g;const _=self;_.onmessage=async e=>{if(e.data.type===`init`){g=e.data.pdfFonts;return}let{id:n,task:r}=e.data;try{let e=await t(r,{progress:e=>_.postMessage({type:`progress`,id:n,fraction:e}),pdfFonts:g});_.postMessage({type:`done`,id:n,buffer:e},[e])}catch(e){_.postMessage({type:`error`,id:n,message:e instanceof Error?e.message:String(e)})}};
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "./runFileTask--4YjQH7Y.js";
3
- import { a as t, c as n, f as r, i, l as a, n as o, o as s, s as c } from "./fileActions-COf5Q4Eg.js";
2
+ import { t as e } from "./runFileTask-BIZTFnZP.js";
3
+ import { a as t, c as n, f as r, i, l as a, n as o, o as s, s as c } from "./fileActions-CFNO14Aj.js";
4
4
  import { a as l, c as u, i as d, n as f, o as p, r as m, s as h } from "./exportContext-BKFnNQ0q.js";
5
5
  // src/components/DataTable/export/exportEngine.ts
6
6
  var g = (e) => JSON.stringify(e).replace(/</g, "\\u003c");
@@ -1 +1 @@
1
- const e=()=>new DOMException(`Aborted`,`AbortError`);async function t(t,n){if(n.signal?.aborted)throw e();switch(t.kind){case`xlsx`:return l(t.workbook,n);case`pdf`:return p(t,n);default:throw Error(`Unknown file task: ${t.kind}`)}}const n=globalThis;async function r(){let e=await import(`exceljs`),t=[e.default?.default,e.default,e,n.ExcelJS].find(e=>e&&typeof e.Workbook==`function`);if(!t)throw Error(`ExcelJS did not load`);return t}async function i(){let e=await import(`pdfmake/build/pdfmake.js`),t=[e.default?.default,e.default,e,n.pdfMake].find(e=>e&&typeof e.createPdf==`function`);if(!t)throw Error(`pdfmake did not load`);let r=await import(`pdfmake/build/vfs_fonts.js`);return{pdfMake:t,vfs:[r?.default,r,r?.pdfMake?.vfs,r?.default?.pdfMake?.vfs,t.vfs,n.pdfMake?.vfs].find(e=>e&&e[`Roboto-Regular.ttf`])}}const a=e=>ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e,o=e=>`FF`+e.replace(`#`,``).toUpperCase();function s(e,t){if(t&&((t.bold!==void 0||t.italic!==void 0||t.size||t.color)&&(e.font={...e.font??{},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.size?{size:t.size}:{},...t.color?{color:{argb:o(t.color)}}:{}}),t.fill&&(e.fill={type:`pattern`,pattern:`solid`,fgColor:{argb:o(t.fill)}}),t.align&&(e.alignment={horizontal:t.align,vertical:`middle`}),t.numFmt&&(typeof e.value==`number`||e.value instanceof Date)&&(e.numFmt=t.numFmt),t.borderTop||t.borderBottom)){let n=e=>({style:e.style,...e.color?{color:{argb:o(e.color)}}:{}});e.border={...t.borderTop?{top:n(t.borderTop)}:{},...t.borderBottom?{bottom:n(t.borderBottom)}:{}}}}function c(e,t,n){let r=e.addRow(t.values);t.style?.bold&&(r.font={bold:!0}),t.merge&&n>1&&e.mergeCells(r.number,1,r.number,n);let i=t.merge?1:Math.max(t.values.length,0);for(let e=0;e<i;e++){let n=r.getCell(e+1);s(n,t.style),s(n,t.cells?.[e])}}async function l(t,n){let i=new(await(r())).Workbook,l=Math.max(1,t.sheets.reduce((e,t)=>e+t.rows.length,0)),u=Math.max(1,Math.floor(l/50)),d=0;for(let r of t.sheets){let t=i.addWorksheet(r.name),a=r.columns.length;t.columns=r.columns.map((e,t)=>({key:String(t),width:e.width}));for(let e of r.before??[])c(t,e,a);let f=t.addRow(r.columns.map(e=>e.header));f.font={bold:r.headerStyle?.bold??!0},f.eachCell((e,t)=>{let n=r.columns[t-1]?.align;n&&(e.alignment={horizontal:n,vertical:`middle`}),s(e,r.headerStyle)});let p=f.number;r.freeze?t.views=[{state:`frozen`,ySplit:r.freeze.rows??0,xSplit:r.freeze.cols??0}]:r.freezeHeader!==!1&&(t.views=[{state:`frozen`,ySplit:p}]),r.rows.forEach((i,a)=>{let c=t.addRow(i),f=r.cellStyles?.[a],p=r.stripe&&a%2==1;if(r.columns.forEach((e,t)=>{let n=c.getCell(t+1);e.numFmt&&(typeof n.value==`number`||n.value instanceof Date)&&(n.numFmt=e.numFmt),e.align&&(n.alignment={horizontal:e.align,vertical:`middle`}),p&&(n.fill={type:`pattern`,pattern:`solid`,fgColor:{argb:o(r.stripe)}}),s(n,e.style),s(n,f?.[t])}),++d%u===0){if(n.signal?.aborted)throw e();n.progress(d/l*.9)}}),r.autoFilter&&r.rows.length>0&&(t.autoFilter={from:{row:p,column:1},to:{row:p,column:a}});for(let e of r.after??[])c(t,e,a)}let f=await i.xlsx.writeBuffer();return n.progress(1),a(f)}const u={Roboto:{normal:`Roboto-Regular.ttf`,bold:`Roboto-Medium.ttf`,italics:`Roboto-Italic.ttf`,bolditalics:`Roboto-MediumItalic.ttf`}};function d(e){let t=e.hLineWidth??1,n=e.edgeLineWidth??t;return{hLineWidth:(e,r)=>e===0||e===(r.table.headerRows??0)||e===r.table.body.length?n:t,vLineWidth:()=>e.vLineWidth??1,...e.hLineColor?{hLineColor:()=>e.hLineColor}:{},...e.vLineColor?{vLineColor:()=>e.vLineColor}:{},...e.paddingX===void 0?{}:{paddingLeft:()=>e.paddingX,paddingRight:()=>e.paddingX},...e.paddingY===void 0?{}:{paddingTop:()=>e.paddingY,paddingBottom:()=>e.paddingY}}}function f(e){return(t,n)=>({text:e.text.replace(/\{page\}/g,String(t)).replace(/\{pages\}/g,String(n)),...e.font?{font:e.font}:{},alignment:e.alignment??`center`,fontSize:e.fontSize??8,...e.color?{color:e.color}:{},...e.margin?{margin:e.margin}:{}})}async function p(t,n){let r=n.pdfFonts?{fonts:{...n.pdfFonts.fonts,...t.fonts?.fonts},vfs:n.pdfFonts.vfs||t.fonts?.vfs?{...n.pdfFonts.vfs,...t.fonts?.vfs}:void 0}:t.fonts,a=t.footer?{...t.document,footer:f(t.footer)}:t.document,o=t.tableLayouts?Object.fromEntries(Object.entries(t.tableLayouts).map(([e,t])=>[e,d(t)])):void 0,{pdfMake:s,vfs:c}=await i();if(n.progress(.1),n.signal?.aborted)throw e();let l={...u,...r?.fonts??{}},p=r?.vfs?{...c??{},...r.vfs}:c,m=await new Promise((e,t)=>{try{let n=s.createPdf(a,o,l,p).getStream(),r=[];n.on(`data`,e=>r.push(e)),n.on(`error`,t),n.on(`end`,()=>{let t=new Uint8Array(r.reduce((e,t)=>e+t.byteLength,0)),n=0;for(let e of r)t.set(e,n),n+=e.byteLength;e(t.buffer)}),n.end()}catch(e){t(e)}});return n.progress(1),m}let m;const h=self;h.onmessage=async e=>{if(e.data.type===`init`){m=e.data.pdfFonts;return}let{id:n,task:r}=e.data;try{let e=await t(r,{progress:e=>h.postMessage({type:`progress`,id:n,fraction:e}),pdfFonts:m});h.postMessage({type:`done`,id:n,buffer:e},[e])}catch(e){h.postMessage({type:`error`,id:n,message:e instanceof Error?e.message:String(e)})}};
1
+ const e=()=>new DOMException(`Aborted`,`AbortError`);async function t(t,n){if(n.signal?.aborted)throw e();switch(t.kind){case`xlsx`:return d(t.workbook,n);case`pdf`:return h(t,n);default:throw Error(`Unknown file task: ${t.kind}`)}}const n=globalThis;async function r(){let e=await import(`exceljs`),t=[e.default?.default,e.default,e,n.ExcelJS].find(e=>e&&typeof e.Workbook==`function`);if(!t)throw Error(`ExcelJS did not load`);return t}let i=null;function a(){return i||=o().catch(e=>{throw i=null,e}),i}async function o(){let e=await import(`pdfmake/build/pdfmake.js`),t=[e.default?.default,e.default,e,n.pdfMake].find(e=>e&&typeof e.createPdf==`function`);if(!t)throw Error(`pdfmake did not load`);let r,i=`pdfMake`in n,a=i?n.pdfMake:n.pdfMake={},o=a?.addVirtualFileSystem;a&&(a.addVirtualFileSystem=e=>{r=e,o?.call(a,e)});let s;try{s=await import(`pdfmake/build/vfs_fonts.js`)}finally{i?a&&(o?a.addVirtualFileSystem=o:delete a.addVirtualFileSystem):delete n.pdfMake}return{pdfMake:t,vfs:[s?.default,s,s?.pdfMake?.vfs,s?.default?.pdfMake?.vfs,r,t.vfs,n.pdfMake?.vfs].find(e=>e&&e[`Roboto-Regular.ttf`])}}const s=e=>ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e,c=e=>`FF`+e.replace(`#`,``).toUpperCase();function l(e,t){if(t&&((t.bold!==void 0||t.italic!==void 0||t.size||t.color)&&(e.font={...e.font??{},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.size?{size:t.size}:{},...t.color?{color:{argb:c(t.color)}}:{}}),t.fill&&(e.fill={type:`pattern`,pattern:`solid`,fgColor:{argb:c(t.fill)}}),t.align&&(e.alignment={horizontal:t.align,vertical:`middle`}),t.numFmt&&(typeof e.value==`number`||e.value instanceof Date)&&(e.numFmt=t.numFmt),t.borderTop||t.borderBottom)){let n=e=>({style:e.style,...e.color?{color:{argb:c(e.color)}}:{}});e.border={...t.borderTop?{top:n(t.borderTop)}:{},...t.borderBottom?{bottom:n(t.borderBottom)}:{}}}}function u(e,t,n){let r=e.addRow(t.values);t.style?.bold&&(r.font={bold:!0}),t.merge&&n>1&&e.mergeCells(r.number,1,r.number,n);let i=t.merge?1:Math.max(t.values.length,0);for(let e=0;e<i;e++){let n=r.getCell(e+1);l(n,t.style),l(n,t.cells?.[e])}}async function d(t,n){let i=new(await(r())).Workbook,a=Math.max(1,t.sheets.reduce((e,t)=>e+t.rows.length,0)),o=Math.max(1,Math.floor(a/50)),d=0;for(let r of t.sheets){let t=i.addWorksheet(r.name),s=r.columns.length;t.columns=r.columns.map((e,t)=>({key:String(t),width:e.width}));for(let e of r.before??[])u(t,e,s);let f=t.addRow(r.columns.map(e=>e.header));f.font={bold:r.headerStyle?.bold??!0},f.eachCell((e,t)=>{let n=r.columns[t-1]?.align;n&&(e.alignment={horizontal:n,vertical:`middle`}),l(e,r.headerStyle)});let p=f.number;r.freeze?t.views=[{state:`frozen`,ySplit:r.freeze.rows??0,xSplit:r.freeze.cols??0}]:r.freezeHeader!==!1&&(t.views=[{state:`frozen`,ySplit:p}]),r.rows.forEach((i,s)=>{let u=t.addRow(i),f=r.cellStyles?.[s],p=r.stripe&&s%2==1;if(r.columns.forEach((e,t)=>{let n=u.getCell(t+1);e.numFmt&&(typeof n.value==`number`||n.value instanceof Date)&&(n.numFmt=e.numFmt),e.align&&(n.alignment={horizontal:e.align,vertical:`middle`}),p&&(n.fill={type:`pattern`,pattern:`solid`,fgColor:{argb:c(r.stripe)}}),l(n,e.style),l(n,f?.[t])}),++d%o===0){if(n.signal?.aborted)throw e();n.progress(d/a*.9)}}),r.autoFilter&&r.rows.length>0&&(t.autoFilter={from:{row:p,column:1},to:{row:p,column:s}});for(let e of r.after??[])u(t,e,s)}let f=await i.xlsx.writeBuffer();return n.progress(1),s(f)}const f={Roboto:{normal:`Roboto-Regular.ttf`,bold:`Roboto-Medium.ttf`,italics:`Roboto-Italic.ttf`,bolditalics:`Roboto-MediumItalic.ttf`}};function p(e){let t=e.hLineWidth??1,n=e.edgeLineWidth??t;return{hLineWidth:(e,r)=>e===0||e===(r.table.headerRows??0)||e===r.table.body.length?n:t,vLineWidth:()=>e.vLineWidth??1,...e.hLineColor?{hLineColor:()=>e.hLineColor}:{},...e.vLineColor?{vLineColor:()=>e.vLineColor}:{},...e.paddingX===void 0?{}:{paddingLeft:()=>e.paddingX,paddingRight:()=>e.paddingX},...e.paddingY===void 0?{}:{paddingTop:()=>e.paddingY,paddingBottom:()=>e.paddingY}}}function m(e){return(t,n)=>({text:e.text.replace(/\{page\}/g,String(t)).replace(/\{pages\}/g,String(n)),...e.font?{font:e.font}:{},alignment:e.alignment??`center`,fontSize:e.fontSize??8,...e.color?{color:e.color}:{},...e.margin?{margin:e.margin}:{}})}async function h(t,n){let r=n.pdfFonts?{fonts:{...n.pdfFonts.fonts,...t.fonts?.fonts},vfs:n.pdfFonts.vfs||t.fonts?.vfs?{...n.pdfFonts.vfs,...t.fonts?.vfs}:void 0}:t.fonts,i=t.footer?{...t.document,footer:m(t.footer)}:t.document,o=t.tableLayouts?Object.fromEntries(Object.entries(t.tableLayouts).map(([e,t])=>[e,p(t)])):void 0,{pdfMake:s,vfs:c}=await a();if(n.progress(.1),n.signal?.aborted)throw e();let l={...f,...r?.fonts??{}},u=r?.vfs?{...c??{},...r.vfs}:c,d=await new Promise((e,t)=>{try{let n=s.createPdf(i,o,l,u).getStream(),r=[];n.on(`data`,e=>r.push(e)),n.on(`error`,t),n.on(`end`,()=>{let t=new Uint8Array(r.reduce((e,t)=>e+t.byteLength,0)),n=0;for(let e of r)t.set(e,n),n+=e.byteLength;e(t.buffer)}),n.end()}catch(e){t(e)}});return n.progress(1),d}let g;const _=self;_.onmessage=async e=>{if(e.data.type===`init`){g=e.data.pdfFonts;return}let{id:n,task:r}=e.data;try{let e=await t(r,{progress:e=>_.postMessage({type:`progress`,id:n,fraction:e}),pdfFonts:g});_.postMessage({type:`done`,id:n,buffer:e},[e])}catch(e){_.postMessage({type:`error`,id:n,message:e instanceof Error?e.message:String(e)})}};
@@ -18,7 +18,7 @@ var e = {
18
18
  png: "image/png"
19
19
  };
20
20
  async function n(e, n) {
21
- let { runFileTask: r } = await import("./runFileTask--4YjQH7Y.js").then((e) => e.n), i = await r({
21
+ let { runFileTask: r } = await import("./runFileTask-BIZTFnZP.js").then((e) => e.n), i = await r({
22
22
  kind: "pdf",
23
23
  document: e,
24
24
  fonts: n ? {