@formancy/report-builder-react 0.0.0-stage → 0.2.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/LICENSE.md ADDED
@@ -0,0 +1,161 @@
1
+ # Formancy Report Source-Available Licence
2
+
3
+ **Version 1 — in force from 14 October 2026. Not reviewed by a lawyer.**
4
+
5
+ This text states the terms Formancy Report is offered under. Version 1 is in
6
+ force from 14 October 2026. Its terms are those of the Formancy Data
7
+ Source-Available Licence, Version 1.1, with this product's names and with the
8
+ documents a reporting product generates named as yours. **This version has
9
+ not been reviewed by a lawyer.** It is published in the repository so that
10
+ the terms are visible to everyone who reads the source. Production licences,
11
+ which section 3 describes, can be had as section 9 says.
12
+
13
+ This is not an open-source licence. It is not Apache-2.0, and it is not the
14
+ licence of [formancy](https://github.com/sharkysan/formancy.ai), on which this
15
+ software builds and whose packages keep their own Apache-2.0 terms.
16
+
17
+ ## The terms in one table
18
+
19
+ | Use | Terms |
20
+ | --- | --- |
21
+ | Read the source and fork the repository | Free |
22
+ | Evaluate, develop and test — including in companies | Free |
23
+ | Run in production, internally or customer-facing | Paid licence |
24
+ | Redistribute inside another software product | Separate commercial agreement |
25
+ | Customer data, report templates and generated documents | Remain the customer's |
26
+
27
+ The rest of this document says what each row means.
28
+
29
+ ## 1. Definitions
30
+
31
+ **The Software** means the source code, declarations, documentation and
32
+ packages in this repository and the packages published from it under the
33
+ `@formancy/report-*` names, in any version, including modified versions.
34
+
35
+ **The Rightsholder** means Daniel Bacher, or whoever the Rightsholder later
36
+ designates in a revision of this document.
37
+
38
+ **Production Use** means running the Software, or anything that incorporates
39
+ it, in a way that serves real end users or real business operations: an
40
+ application people other than its developers and testers rely on, whether
41
+ inside one organisation or offered to others, whether or not it earns money.
42
+ Production is defined by operational use, not by revenue.
43
+
44
+ **Development Use** means any use that is not Production Use: reading,
45
+ evaluating, building, modifying, testing, demonstrating and running in
46
+ development, test, staging and continuous-integration environments, including
47
+ by and within a commercial organisation. A staging environment that real
48
+ users depend on is Production Use whatever it is called.
49
+
50
+ **Redistribution** means delivering the Software, or anything that
51
+ incorporates it, to a third party as part of a software product, a managed
52
+ service, a platform or a toolkit, such that the third party runs it rather
53
+ than you.
54
+
55
+ **Customer Data** means the contents of any dataset, submission, database or
56
+ file the Software is given or connects to, and anything the Software reads
57
+ from or writes to it.
58
+
59
+ **Generated Definitions** means the report definitions, templates, bindings,
60
+ styles, parameter forms, policies and other configuration the Software
61
+ generates or that a person creates with it, and the documents rendered from
62
+ them, PDF files included.
63
+
64
+ ## 2. What is free
65
+
66
+ Subject to section 4, the Rightsholder grants you a worldwide, royalty-free,
67
+ non-exclusive licence to:
68
+
69
+ 1. read, copy, fork and modify the Software;
70
+ 2. use the Software and your modifications for Development Use, without limit
71
+ of time, number of people or size of organisation;
72
+ 3. share the Software and your modifications with others for their
73
+ Development Use, under this licence and with this document attached.
74
+
75
+ No production licence is required to evaluate the Software for as long as you
76
+ like, and no evaluation period expires.
77
+
78
+ ## 3. What is paid
79
+
80
+ **Production Use requires a production licence from the Rightsholder.** A
81
+ production licence is a separate written agreement. It is expected to be
82
+ granted per application, to cover that application's development, test and
83
+ replica environments without further charge, to specify support and update
84
+ entitlements, and to leave you the right to keep running the versions you
85
+ licensed if you later choose not to renew. Those are intentions; the agreement
86
+ you sign is what governs.
87
+
88
+ **Redistribution requires a separate commercial agreement.** Shipping the
89
+ Software inside a product, a platform or a managed service that other parties
90
+ run is not covered by a production licence for your own applications.
91
+
92
+ Running the Software in production without a production licence is a breach of
93
+ this licence.
94
+
95
+ ## 4. Conditions
96
+
97
+ 1. **Notices travel.** A copy of this document, and the NOTICE file, stays
98
+ with every copy and every modified version of the Software.
99
+ 2. **Modified versions carry these terms.** A modified version of the Software
100
+ is the Software for the purposes of this licence. You may not remove or
101
+ circumvent the terms by modifying it.
102
+ 3. **No trademark grant.** This licence grants no right to use the names
103
+ "Formancy", "Formancy Report", "Formancy Report Studio", "formancy.ai" or
104
+ any associated logo, beyond what is needed to identify the Software
105
+ truthfully.
106
+ 4. **Third-party components keep their own licences.** The Software depends on
107
+ packages licensed under the Apache License, Version 2.0, among others. Those
108
+ licences continue to govern those components, their notices are preserved
109
+ in NOTICE, and nothing in this document narrows the rights they grant.
110
+
111
+ ## 5. What stays yours
112
+
113
+ **Customer Data remains the customer's.** This licence grants the Rightsholder
114
+ no right of any kind over the data the Software is given or reads, and the
115
+ Software is designed not to send any of it anywhere.
116
+
117
+ **Generated Definitions remain yours.** Report definitions, templates,
118
+ bindings and policies you generate or author with the Software, and the
119
+ documents rendered from them, are yours, under whatever terms you choose.
120
+ They are not the Software, and this licence does not restrict them —
121
+ including after a production licence ends. A logo, a font or another asset
122
+ you place in a report keeps the rights it came with.
123
+
124
+ ## 6. Contributions
125
+
126
+ Contributions to the Software are accepted under the Contributor License
127
+ Agreement in `CLA.md`, which grants the Rightsholder the right to distribute
128
+ them under this licence and under commercial agreements, and transfers no
129
+ ownership.
130
+
131
+ ## 7. Termination
132
+
133
+ Your rights under this licence end automatically if you breach it and do not
134
+ cure the breach within thirty days of becoming aware of it. The rights in
135
+ section 5 do not end: your data, your definitions and your documents stay
136
+ yours in every case.
137
+
138
+ ## 8. No warranty, limited liability
139
+
140
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
141
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
142
+ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
143
+ RIGHTSHOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
144
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
145
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
146
+
147
+ A production licence may provide warranties and support; this document does
148
+ not.
149
+
150
+ ## 9. Obtaining a production licence
151
+
152
+ Production licences are requested from the Rightsholder at info@formancy.ai.
153
+ The separate commercial agreement that Redistribution requires, which
154
+ section 3 describes, is requested at the same address. The Software is new
155
+ and has no published price; the plan is to set the price after the first
156
+ design partners have established what the Software is worth to them.
157
+
158
+ ## 10. Governing law and place of jurisdiction
159
+
160
+ This licence is governed by Swiss law, excluding its conflict-of-laws rules.
161
+ The place of jurisdiction is the Rightsholder's domicile in Switzerland.
package/NOTICE ADDED
@@ -0,0 +1,17 @@
1
+ Formancy Report
2
+ Copyright 2026 Daniel Bacher
3
+
4
+ This product is distributed under the Formancy Report Source-Available Licence
5
+ (LICENSE.md). It is not open source.
6
+
7
+ This product includes software developed by the formancy project
8
+ (https://github.com/sharkysan/formancy.ai), licensed under the Apache License,
9
+ Version 2.0. Those packages keep their licence; nothing here changes it.
10
+
11
+ @formancy/report-render-pdf includes the Liberation Sans fonts, version
12
+ 2.1.5, Regular and Bold, in its fonts directory and, as base64, in its
13
+ browser build. Digitized data copyright (c) 2010 Google Corporation, with
14
+ Reserved Font Arimo, Tinos and Cousine. Copyright (c) 2012 Red Hat, Inc.,
15
+ with Reserved Font Name Liberation. They are licensed under the SIL Open
16
+ Font License, Version 1.1, whose text travels with them as
17
+ fonts/LICENSE-LiberationSans.txt; nothing here changes it.
package/README.md CHANGED
@@ -1,3 +1,263 @@
1
- # Temporary Holding Version
1
+ # @formancy/report-builder-react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Formancy Report Studio's report builder for React. It renders the three
4
+ panes of the workbench over one
5
+ [`report-builder-core`](../report-builder-core/README.md) editor: the
6
+ palette and the outline, the design view, and the properties with the
7
+ problems. A toolbar sits above them and a status line below.
8
+
9
+ It renders the editor's state and dispatches what the person did. It
10
+ decides nothing the editor decides: the keys are `actionForKey`'s, the
11
+ places a component may go are the editor's drop targets, what is
12
+ available is the editor's `can`, and every word comes from the editor's
13
+ catalogue. What is React's is the subscription (`useSyncExternalStore`),
14
+ the DOM, and focus, because only the builder knows which element the
15
+ person was on. The Angular builder renders the same state, and neither
16
+ depends on the other
17
+ ([0012](../../docs/decisions/0012-the-builders-are-native-and-share-one-session.md)).
18
+
19
+ ## Mounting it
20
+
21
+ ```tsx
22
+ import '@formancy/themes/workbench.css'
23
+ import '@formancy/report-builder-core/report-builder.css'
24
+ import { createReportEditor } from '@formancy/report-builder-core'
25
+ import { openReportSession } from '@formancy/report-core'
26
+ import { ReportBuilder } from '@formancy/report-builder-react'
27
+
28
+ const opening = openReportSession(report)
29
+ if (!opening.ok) throw new Error('not a report')
30
+ const editor = createReportEditor(opening.session, { locale: 'de-CH' })
31
+
32
+ // The builder fills its container; the host gives the container a height.
33
+ root.render(
34
+ <div style={{ height: '100vh' }}>
35
+ <ReportBuilder editor={editor} />
36
+ </div>,
37
+ )
38
+
39
+ // Once no builder shows it:
40
+ editor.dispose()
41
+ ```
42
+
43
+ The package imports no CSS and sets no style of its own but the state's
44
+ geometry. The host imports `workbench.css` from `@formancy/themes`, then
45
+ `report-builder.css` from `report-builder-core`, and recolours the builder
46
+ by setting the workbench's `--wb-*` variables.
47
+
48
+ **`ReportBuilder` takes the `editor`.** The builder subscribes while
49
+ it is mounted and never disposes the editor. Whoever created the editor
50
+ disposes it, once no builder shows it. Given another editor, the builder
51
+ lets go of the old one and subscribes to the new one.
52
+
53
+ **`hostView` is what it draws in the design view's place** while the
54
+ editor's `view` is the host's: a view of the host's own, which the editor
55
+ was made knowing by name
56
+ ([0029](../../docs/decisions/0029-the-preview-stands-in-the-design-views-place-where-it-does-not-fit-beside-the-builder.md)).
57
+
58
+ ```tsx
59
+ const editor = createReportEditor(opening.session, { hostView: { name: 'Preview', shown: true } })
60
+
61
+ root.render(<ReportBuilder editor={editor} hostView={<Preview />} />)
62
+ ```
63
+
64
+ The builder lends it the middle pane's box and a region named by the
65
+ editor's `hostView`. No rule of `report-builder.css` reaches it, and of
66
+ the workbench's only `.wb *`, which turns transitions off when motion is
67
+ reduced; none of the builder's keys do either, nor from a portal the host
68
+ opens from it, whose events React bubbles through the view wherever its
69
+ DOM is. It is mounted only while it is drawn: the toolbar's Design view
70
+ unmounts it, and the editor's `showHostView` mounts it again.
71
+
72
+ **Images a person adds need nothing of the builder.** A host that keeps
73
+ them gives the editor its store (`createReportEditor`'s `images`,
74
+ report-builder-core's *Images a person adds*), and the builder draws Add
75
+ image… last in the palette, with a hidden file input beside it, and the
76
+ report's images, each with its Remove, under the report's own properties
77
+ ([0033](../../docs/decisions/0033-a-person-adds-an-image-in-either-builder-and-the-host-keeps-its-bytes.md)). Add image… sends `chooseImage` and opens the platform's chooser
78
+ in the same click; the file chosen is taken, the input cleared so the same
79
+ file is a change again, and handed to `editor.addImage`, which says what
80
+ became of it. The keyboard stays on the button; a Remove that removed its
81
+ image puts it on the first field.
82
+
83
+ **`useEditorState(editor)`** is the subscription on its own, for a host
84
+ that shows something of the editor's state outside the builder.
85
+
86
+ The panes are not exported as components of their own. Focus moves
87
+ between them: a place chosen in the dialog focuses its outline row, and a
88
+ problem followed focuses the row it is about. That coordination belongs
89
+ to the builder as a whole.
90
+
91
+ ### One session, many builders
92
+
93
+ The document and its undo history live in the session, and the editor
94
+ holds only one person's view of it (plan 11.4). So the builder can come
95
+ and go without losing anything, and two builders can share one session:
96
+
97
+ - **Unmounted and mounted again** over the same editor, it shows the same
98
+ document and can undo the edit made before it went away. The editor's
99
+ listener count is back where it was after each unmount.
100
+ - **Given another editor** over the same session, in another language, it
101
+ undoes the step the first one made, and the first editor has no listener
102
+ left. This is plan 21's switch between two React editors. The Angular
103
+ half of the switch is the Angular builder's to show.
104
+ - **Two builders on one page** stay in step: an edit in one shows in the
105
+ other, and each keeps its own selection. No element id is minted twice
106
+ (`useId`). A duplicated id would label the second builder's fields with
107
+ the first builder's labels, and a test fails on exactly that.
108
+
109
+ ## What it renders
110
+
111
+ Exactly the structure `report-builder-core`'s README sets out under *What a
112
+ builder renders*, which the Angular builder renders too: a region named
113
+ "Report editor" with a bar above the panes (the title and the toolbar,
114
+ with its four pane buttons), the outline pane with the place dialog
115
+ floating over it, the design view -- or the host's view in its place --
116
+ the properties and the problems sharing the third column, and a bar below
117
+ with the live region.
118
+
119
+ ## The keyboard
120
+
121
+ Every pointer action has a keyboard path (formancy.ai 0046), and the
122
+ keyboard path came first.
123
+
124
+ | Where | Keys | Does |
125
+ | --- | --- | --- |
126
+ | The outline | ↑ ↓, Home, End | Selects the previous, next, first or last row. Focus follows. |
127
+ | The outline | ← → | Selects what holds the row, or the first thing it holds. |
128
+ | The outline | Alt+↑, Alt+↓ | Moves the selection up or down its list. |
129
+ | The outline | Alt+→, Alt+← | Moves it into the container before it, or out of its own. |
130
+ | The outline | Delete, Backspace | Deletes it. Focus goes to the next row, else the one before, else the tree. |
131
+ | The outline | Ctrl+D (⌘D) | Duplicates it, and selects the copy. |
132
+ | Anywhere but a text field | Ctrl+Z, Ctrl+Y, Ctrl+Shift+Z | Undoes, redoes. In the outline, focus goes to the selected row, else to the tree itself, never to a row nothing selected. |
133
+ | Anywhere but a text field | Ctrl and +, −, 0 | Zooms in, out, to actual size. |
134
+ | The toolbar | ← →, Home, End | Moves between tools. The toolbar is one tab stop. → is "next" in a left-to-right page and "previous" under `dir="rtl"`; with Ctrl, Alt or ⌘ held the arrow is the browser's. |
135
+ | A palette entry, Move to… | Enter, Space | Opens the place dialog. Focus goes to its first place. |
136
+ | Add image… | Enter, Space | Opens the platform's file chooser. Focus stays on the button while the image is added and after. |
137
+ | The place dialog | Enter on a place | Inserts or moves there. Focus goes to the row. |
138
+ | The place dialog | Escape, Cancel | Closes it. Focus goes back to what opened it; for a dialog another builder over the same editor opened, to the palette entry of what is placed, else the selected row, else the tree. |
139
+ | A single-line field | Enter | Commits the value, and stays in the field. |
140
+ | A text field | Escape | Gives back what the report holds. |
141
+ | The host's view | Any | The host's, and a portal's the host opens from it. The builder passes none of them on, so Ctrl+Z there undoes nothing of the report. |
142
+
143
+ The keys in the outline and the editor's shortcuts are `actionForKey`'s,
144
+ decided in `report-builder-core` for both builders. A text field, a
145
+ number field and a select keep their own keys: Ctrl+Z there undoes
146
+ typing, not the report. A checkbox has no typing to undo, so Ctrl+Z on it
147
+ undoes the report.
148
+
149
+ **Focus follows the selection.** Moving focus to a row selects it. Every
150
+ action that selects moves focus to that row: a place chosen, a box
151
+ clicked, a problem followed. So a screen reader says what was selected as
152
+ the focused row's name and state. The editor does not say it again in the
153
+ live region.
154
+
155
+ A tool with nothing to act on is `aria-disabled`, not `disabled`, and
156
+ `report-builder.css` draws it as the workbench draws a disabled button. It
157
+ stays focusable, so pressing Redo for the last time does not throw focus
158
+ out of the toolbar. Pressing such a tool says why nothing happened
159
+ ("Nothing to undo.").
160
+
161
+ ## The pointer
162
+
163
+ A palette entry, a box or an outline row can be dragged. It can be dropped
164
+ on the canvas, at the nearest place in the list under the pointer
165
+ (`targetNear`, read inside the sheet's border), or over an outline row,
166
+ before or after it (`targetBeside`). The drag is the editor's state
167
+ machine: `startDrag`, `updateDrag`, `drop`, `cancelDrag`. A pointer is
168
+ never offered a place the session would refuse, and it is offered exactly
169
+ the places the dialog lists.
170
+
171
+ A press becomes a drag only after it moves 4 CSS pixels, Windows' default
172
+ drag distance (a convention, not a measurement). A click stays a click: it
173
+ opens the dialog, or selects a box. Escape, the browser cancelling the
174
+ pointer, and the builder unmounting all end a drag with nothing placed.
175
+ Letting go over nothing says "Nothing was moved." Only the primary button
176
+ of a mouse or pen drags. A touch never starts a drag, so a finger scrolls
177
+ the page as it expects to, and a tap is a click. The Angular builder drags
178
+ with HTML's drag and drop instead, over the same places.
179
+
180
+ ## The words, and what is said aloud
181
+
182
+ Every word the builder shows comes from `report-builder-core`'s catalogue,
183
+ in English, Swiss German and Swiss French, and none is written here.
184
+
185
+ The status line is a polite live region. Each announcement is a new child
186
+ element, so the same words said twice ("Nothing to undo.") are two
187
+ announcements. The zoom `<output>` has `aria-live="off"`: the status line
188
+ already says "Zoom 125%.", and an `<output>` would say it a second time.
189
+ The problems' count is a `status` of its own, so a problem an edit causes
190
+ is announced ("Problems 1") without moving the person.
191
+
192
+ ## What the tests show
193
+
194
+ `pnpm --filter @formancy/report-builder-react test` runs the suite in
195
+ jsdom with Testing Library and user-event:
196
+
197
+ - **Every one of `BUILDER_SCENARIOS`, in all three languages.** Each
198
+ scenario runs step by step, with axe over its end state. A last test
199
+ fails when a scenario was skipped or lost.
200
+ - **axe** holds the builder to WCAG 2.2 AA by its tags (`wcag2a` through
201
+ `wcag22aa`). `best-practice` is left out, as formancy.ai's builders leave
202
+ it out. Two rules are off because jsdom cannot decide them:
203
+ `color-contrast` (jsdom computes no colour) and `target-size` (jsdom
204
+ lays nothing out). The reason for each is written beside it in
205
+ `test-support.tsx`.
206
+ - **Every part, named.** One report holds every kind of component. Each
207
+ row is selected in turn, so every kind of property control is drawn and
208
+ audited. Every element with a role a person operates or reads must have
209
+ a name. A test fails if no row of that report shows some kind of
210
+ property. Each group, the form, the list, the statuses and the dialog
211
+ are named in the editor's words, never after text on the page, which
212
+ Chromium would read in the stylesheet's capitals; jsdom applies no
213
+ stylesheet, so that test reads from the DOM how each name is given.
214
+ - **The keyboard, focus and the pointer** beyond the scenarios: the
215
+ toolbar's tab stop and its arrows, focus after each action, the dialog's
216
+ way out, the panes, a text field's own keys, every pointer drag above,
217
+ the pointer read inside the sheet's border, and the keyboard kept on a
218
+ problem when another is listed before it.
219
+ - **Images**: `image-chooser.test.tsx` gives the file input `files` and a
220
+ `value` that behave as a browser's, where clearing the value empties the
221
+ files, and holds the file taken before the input is cleared, the input
222
+ cleared, a chooser closed without a file doing nothing, the keyboard on
223
+ Add image… while an image is added and after, Enter and Space opening
224
+ the chooser, no chooser where the editor takes no file, nothing drawn
225
+ without a store, and the host's types offered. `properties.test.tsx`
226
+ holds the image rows. These, and the scenarios' `upload`, find the file
227
+ input beside the button in the DOM: it has no role.
228
+ - **One session, many builders**, as above.
229
+ - **The host's view**: a bare region in the design view's place, with the
230
+ middle pane's `data-pane`, its own part, no workbench class and only the
231
+ host's node in it, which is mounted while the region is drawn and
232
+ unmounted with it; and a key pressed in a portal the host opens from it,
233
+ Ctrl+Z on a menu in the body, undoes nothing. That test reads the DOM,
234
+ because which rules reach the host's view is a stylesheet's reach, which
235
+ the accessibility tree cannot show.
236
+
237
+ Each guard was watched failing with the code it guards removed. Among
238
+ them: the subscription left behind on unmount, ids shared between two
239
+ builders, the drag distance, the swallowed click, focus returned after
240
+ Escape, `aria-disabled` turned into `disabled`, an announcement without a
241
+ new child, the sheet's border, and a modified arrow taken by the toolbar.
242
+
243
+ ## What it does not do
244
+
245
+ - **No browser runs in this package's suite.** jsdom has no layout, so
246
+ the suite does not test the three-pane and narrow layouts, scrolling,
247
+ contrast or target sizes, and its pointer tests place the pointer by the
248
+ editor's own pixel geometry. The Studio's browser gate
249
+ (`apps/studio/scripts/browser-test.mjs`) measures them in Chromium for
250
+ this builder in the Studio's page, a real pointer's drag from the
251
+ palette included, and compares its accessible tree with the Angular
252
+ builder's; the root README's pictures of it are taken by a
253
+ script and held to the text they show
254
+ ([0013](../../docs/decisions/0013-the-studio-is-the-same-room-and-its-pictures-are-taken-by-a-script.md));
255
+ a host's own page is its own to measure.
256
+ - **The place dialog's "nowhere" sentence** shows when a component has
257
+ nowhere else to go. No report tried here has such a component. The test
258
+ draws the dialog over a state that says so.
259
+ - Everything `report-builder-core` lists under *What it does not do*
260
+ holds here too: the canvas is not the PDF, some properties have no
261
+ editor yet, and two problems about the report as a whole share a name.
262
+
263
+ Source-available, not open source: see [`LICENSE.md`](../../LICENSE.md).
@@ -0,0 +1,28 @@
1
+ import { ReactElement, ReactNode } from "react";
2
+ import { EditorState, ReportEditor } from "@formancy/report-builder-core";
3
+ //#region src/report-builder.d.ts
4
+ interface ReportBuilderProps {
5
+ /**
6
+ * The editor to render: one person's view of a report session. The
7
+ * builder subscribes while it is mounted and never disposes the editor;
8
+ * whoever created it does, once no builder shows it.
9
+ */
10
+ readonly editor: ReportEditor;
11
+ /**
12
+ * What the builder draws in the design view's place while the editor's
13
+ * `view` is the host's: the host's own view, named by the editor's
14
+ * `hostView`. The builder lends it the middle pane's box and a region's
15
+ * name, none of report-builder.css's rules -- the workbench's `.wb *`
16
+ * reaches it, turning transitions off under reduced motion -- and none of
17
+ * its keys; it is mounted only while drawn.
18
+ */
19
+ readonly hostView?: ReactNode;
20
+ }
21
+ export declare function ReportBuilder({ editor, hostView }: ReportBuilderProps): ReactElement;
22
+ //#endregion
23
+ //#region src/use-editor-state.d.ts
24
+ /** Re-renders the component on every change to `editor`'s state; unsubscribes when it unmounts or the editor is replaced. */
25
+ export declare function useEditorState(editor: ReportEditor): EditorState;
26
+ //#endregion
27
+ export type { ReportBuilderProps };
28
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/report-builder.tsx","../src/use-editor-state.ts"],"mappings":";;;UA4CiB;;;;;;WAMN,QAAQ;;;;;;;;;WASR,WAAW;;wBAgBN,gBAAgB,QAAQ,YAAY,qBAAqB;;;;wBC7DzD,eAAe,QAAQ,eAAe"}