@broadpaper/core 0.2.1 → 0.4.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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  The document model, expression language, theme resolution and paginator behind BroadPaper. Framework-free.
8
8
 
9
- Part of [**BroadPaper**](https://www.broadpaper.com) — an embeddable visual report designer and PDF renderer.
9
+ Part of [**BroadPaper**](https://www.broadpaper.com/developers/) — an embeddable visual report designer and PDF renderer.
10
10
  Your users design the report in your application; BroadPaper owns the layout, the branding,
11
11
  the pagination and the output.
12
12
 
@@ -32,14 +32,16 @@ before a single row of data exists.
32
32
  ## Licensing
33
33
 
34
34
  BroadPaper is **free to evaluate, with no trial clock and nothing behind a feature gate**.
35
- Install it, use every feature, run it against your real data, in production if you like.
35
+ Install it, use every feature and evaluate it against your real data for as long as you like.
36
+ Production use needs a licence.
36
37
 
37
- The only difference without a licence is that generated PDFs carry an evaluation mark. A
38
- licence removes it — that is the entire commercial mechanism. No seats, no activation, no
39
- machine binding, no telemetry, and no call home at any point.
38
+ In the software, the only difference without a licence is that generated PDFs carry an
39
+ evaluation mark, and a licence removes it. Contractually, the licence is also what permits
40
+ production use. No seats, no activation, no machine binding, no telemetry, and no call home at
41
+ any point.
40
42
 
41
43
  - [How licensing works](https://www.broadpaper.com/docs/guide/licensing/)
42
- - [Pricing](https://www.broadpaper.com/pricing/)
44
+ - [Pricing](https://www.broadpaper.com/developers/pricing/)
43
45
  - [Licence agreement](https://www.broadpaper.com/legal/terms/)
44
46
 
45
47
  ## Documentation
package/dist/index.d.ts CHANGED
@@ -318,9 +318,20 @@ interface PageContext {
318
318
  * Brand theme supplied by the host. A template references theme values via
319
319
  * tokens (`$colors.primary`) so one template renders under any brand.
320
320
  */
321
+ /**
322
+ * A font, declared once for the canvas, the designer's pickers and the PDF.
323
+ *
324
+ * Include a TrueType or OpenType file among the sources: the browser reads any
325
+ * format, but the browserless PDF engine reads only those two, and a face with
326
+ * nothing else is drawn in a standard face in the file (with a warning saying so).
327
+ */
321
328
  interface ThemeFontFace {
322
329
  family: string;
323
- /** URL(s) to the font file(s). `data:` URLs are supported for fully offline rendering. */
330
+ /**
331
+ * URL(s) to the font file(s), in order of preference, as `@font-face` lists them.
332
+ * `data:` URLs are supported for fully offline rendering. The PDF engine takes the
333
+ * first TrueType or OpenType one and skips WOFF and WOFF2.
334
+ */
324
335
  src: string | string[];
325
336
  weight?: number | string;
326
337
  style?: "normal" | "italic";
@@ -1165,6 +1176,26 @@ interface BlockDefinition<P extends Record<string, unknown> = Record<string, unk
1165
1176
  * Derived from `split` when omitted.
1166
1177
  */
1167
1178
  measure?: "text" | "table" | "none";
1179
+ /**
1180
+ * Props for a block created by dropping a data field onto the page.
1181
+ *
1182
+ * The designer lets a user drag a field out of the data panel, and what should
1183
+ * appear is not the same thing for every block: a list wants a table with a
1184
+ * column per item field, each already formatted the way the schema says; a
1185
+ * scalar wants a labelled value. Only the block knows what its own props mean,
1186
+ * so the block decides — including a custom block, which is the reason this is
1187
+ * a hook rather than a rule in the editor.
1188
+ *
1189
+ * `expr` is the bare path; `formatted` is the same path with the field's own
1190
+ * formatter appended, which is what a prop rendering the value as text should
1191
+ * use. Return undefined to take the designer's default.
1192
+ */
1193
+ fromField?(field: {
1194
+ expr: string;
1195
+ formatted: string;
1196
+ schema: FieldSchema;
1197
+ label: string;
1198
+ }): Partial<P> | undefined;
1168
1199
  /** Adjust resolved props after binding resolution (compute derived data, sort, etc.). */
1169
1200
  resolve?(ctx: ResolveHookContext<P>): P | void;
1170
1201
  render(ctx: RenderContext<P>): VNode | null;
@@ -2347,6 +2378,244 @@ declare function synthesizeValue(schema: FieldSchema, opts?: {
2347
2378
  declare function labelForPath(segments: PathSegment[], scope: SchemaScope): string;
2348
2379
  declare function humanizeKey(key: string): string;
2349
2380
 
2381
+ /**
2382
+ * The formatter a field wants, when nobody has said otherwise.
2383
+ *
2384
+ * A schema already knows that a field is money in sterling, or a date the host
2385
+ * writes as `d MMMM yyyy`, or a fraction meant to be read as a percentage.
2386
+ * Nothing was doing anything with that: a binding inserted from the data panel
2387
+ * was the bare path, so a currency field rendered as `482310.4` and a date as
2388
+ * `2026-08-31T00:00:00.000Z` until somebody typed a pipe after it.
2389
+ *
2390
+ * That is a fine default for a developer who knows the expression language and
2391
+ * a poor one for anybody else, so the pipe is written into the expression at the
2392
+ * moment the binding is created. Written in, and not applied invisibly at render
2393
+ * time, for two reasons worth stating:
2394
+ *
2395
+ * - it stays visible and editable. The template says `| currency:'USD'`, so
2396
+ * somebody reading it can see why the document shows dollars, and somebody who
2397
+ * wants three decimal places can change it;
2398
+ * - it cannot change what an existing template does. Formatting bound values at
2399
+ * render time would alter the output of every document already saved against a
2400
+ * typed schema, which is not a change a published SDK gets to make quietly.
2401
+ *
2402
+ * Blocks that evaluate their own expressions — a table's columns, a chart's
2403
+ * series — get the same treatment from the same function, which is what keeps a
2404
+ * total in a table footer formatted like the column above it.
2405
+ */
2406
+
2407
+ /**
2408
+ * The pipe expression for a field, or null when the value should be shown as it
2409
+ * is.
2410
+ *
2411
+ * Text, booleans, URLs and rich text are already what they should look like.
2412
+ * Everything numeric or temporal is not.
2413
+ */
2414
+ declare function defaultPipeFor(schema: FieldSchema | undefined): string | null;
2415
+ /**
2416
+ * Adds the field's default formatter to a path expression.
2417
+ *
2418
+ * Leaves anything that already has a pipe alone — the author said what they
2419
+ * wanted — and leaves anything that is not a plain path alone too, because a
2420
+ * computed expression's type is its own business and appending to it could
2421
+ * change what it means.
2422
+ */
2423
+ declare function withDefaultPipe(expr: string, schema: FieldSchema | undefined): string;
2424
+ /** Whether an expression already ends in a formatter, ignoring `||`. */
2425
+ declare function hasPipe(expr: string): boolean;
2426
+ /**
2427
+ * A dotted path and nothing else: `client.name`, `row.amount`, `holdings[0].value`.
2428
+ *
2429
+ * Anything with an operator, a call or a literal in it is left alone. `a + b`
2430
+ * with a currency pipe bolted on would format the sum, which may be what the
2431
+ * author wanted or may not, and guessing is worse than doing nothing.
2432
+ */
2433
+ declare function isPlainPath(expr: string): boolean;
2434
+
2435
+ /**
2436
+ * A calculation, as a person would describe it rather than as the expression
2437
+ * language would.
2438
+ *
2439
+ * The designer has always been able to *bind* a value — point a property at a
2440
+ * field — and never to work one out. Arithmetic arrived only inside a template
2441
+ * somebody wrote by hand, so a host with the expression editor switched off had a
2442
+ * document whose totals it could read and not change, and a host with it on asked
2443
+ * a business user to write `sum(invoice.lineItems.amount) * (1 + taxRate)`. Both
2444
+ * are the same missing feature.
2445
+ *
2446
+ * So: a small closed model of the arithmetic documents actually contain, and a
2447
+ * codec between it and the expression language. The builder in the editor edits
2448
+ * this; the template still holds an ordinary expression, so nothing downstream —
2449
+ * the interpreter, the validator, the renderer, the PDF backends — learns anything
2450
+ * new. A calculation is a *view* of an expression, never a second way to store one.
2451
+ *
2452
+ * ## Left to right, and no brackets
2453
+ *
2454
+ * `start` and then a list of `steps`, each applied to the running total. That is
2455
+ * the one decision here worth defending, because a tree would be more general and
2456
+ * much worse: an interface with brackets in it is a formula editor, and a business
2457
+ * user with a formula editor is a business user writing formulas. Left-to-right
2458
+ * covers what invoices and reports do — a subtotal, VAT on it, a discount off it,
2459
+ * a division for an average — and reads as a sentence:
2460
+ *
2461
+ * Total of Lines › Amount, add VAT rate as a percentage
2462
+ *
2463
+ * Precedence never arises, because there is none to get wrong: every step applies
2464
+ * to everything before it, and `toExpression` brackets accordingly.
2465
+ *
2466
+ * ## Percentages are an operator, not multiplication
2467
+ *
2468
+ * "Add VAT rate as a percentage" rather than "multiply by (1 + VAT rate)". It is
2469
+ * the same arithmetic and it is the difference between a step somebody can choose
2470
+ * and one they have to derive. It is also emitted null-safe — `coalesce(rate, 0)`
2471
+ * — because a business that has not set a VAT rate wants an invoice without VAT,
2472
+ * not one with a hole where the total was.
2473
+ *
2474
+ * ## The contract that makes this safe
2475
+ *
2476
+ * {@link fromExpression} returns `null` for anything it cannot rebuild **byte for
2477
+ * byte**. An interface that offered to edit an expression it would then rewrite
2478
+ * differently is an interface that silently changes documents on being looked at;
2479
+ * refusing is the honest answer, and the caller shows the value as read-only
2480
+ * instead. `calculation.test.ts` asserts the round trip on every expression the
2481
+ * starter templates ship.
2482
+ */
2483
+
2484
+ /** The five aggregates a document asks for. Deliberately not every function. */
2485
+ type CalcAggregate = "sum" | "avg" | "count" | "min" | "max";
2486
+ /** One thing a calculation reads or holds. Flat: a term is never itself a calculation. */
2487
+ type CalcTerm =
2488
+ /** A field, by its dotted path. `invoice.taxRate`, `row.amount`. */
2489
+ {
2490
+ kind: "field";
2491
+ path: string;
2492
+ }
2493
+ /** A column of a list, across every row of it. `sum(invoice.lineItems.amount)`. */
2494
+ | {
2495
+ kind: "aggregate";
2496
+ fn: CalcAggregate;
2497
+ path: string;
2498
+ }
2499
+ /** A number somebody typed. */
2500
+ | {
2501
+ kind: "number";
2502
+ value: number;
2503
+ };
2504
+ /**
2505
+ * What to do with a term, given everything so far.
2506
+ *
2507
+ * `addPercent` and `subtractPercent` treat the term as a rate: 0.2 is a fifth.
2508
+ * That matches `percent`-typed fields and the mapping package's own reading of a
2509
+ * typed rate, so a VAT rate is the same number everywhere in the product.
2510
+ */
2511
+ type CalcOp = "add" | "subtract" | "multiply" | "divide" | "addPercent" | "subtractPercent";
2512
+ interface CalcStep {
2513
+ op: CalcOp;
2514
+ term: CalcTerm;
2515
+ }
2516
+ interface Calculation {
2517
+ start: CalcTerm;
2518
+ steps: CalcStep[];
2519
+ /**
2520
+ * How the result is shown: a pipe chain, exactly as it appears after `|` in the
2521
+ * expression. `currency:"GBP"`, `number:0`, `percent:1`. Presentation only, and
2522
+ * applied once at the end — a format in the middle of arithmetic would turn a
2523
+ * number into a string and the next step into a concatenation.
2524
+ */
2525
+ format?: string;
2526
+ }
2527
+ /** Everything a calculation reads, for validation and for naming it. */
2528
+ declare function calcPaths(calc: Calculation): string[];
2529
+ /** The AST, for a caller that wants to type-check a calculation before storing it. */
2530
+ declare function calcToAst(calc: Calculation): Expr;
2531
+ declare function toExpression(calc: Calculation): string;
2532
+ /**
2533
+ * Reads an expression back as a calculation, or refuses.
2534
+ *
2535
+ * `null` means "this is not something the builder can represent", and the caller's
2536
+ * job is then to show the value rather than offer to edit it. Everything this
2537
+ * accepts, {@link toExpression} reproduces character for character — which is
2538
+ * asserted, because the failure otherwise is a template quietly rewritten by
2539
+ * somebody opening a panel.
2540
+ */
2541
+ declare function fromExpression(expr: string): Calculation | null;
2542
+ /** Whether an expression is arithmetic rather than a plain field or a formatted one. */
2543
+ declare function isCalculation(calc: Calculation): boolean;
2544
+
2545
+ /**
2546
+ * What changed between two saved templates, said in words.
2547
+ *
2548
+ * A revision history is only useful if it can answer "what is different about
2549
+ * this one" without asking anybody to read a template. A structural diff of the
2550
+ * JSON answers a different question — which keys moved — and it answers it in
2551
+ * the vocabulary of the format: `body[2].children[0].props.columns`. This speaks
2552
+ * the vocabulary of the designer instead: the table in “Summary”, the page
2553
+ * margins, the Heading 1 style.
2554
+ *
2555
+ * Three decisions shape everything below.
2556
+ *
2557
+ * **Nodes are matched by id, never by position.** Every node already carries a
2558
+ * stable id, and matching by position is how inserting one section at the top
2559
+ * becomes "changed every section in the document". A subtree added or removed
2560
+ * is one change, not one per descendant — a person who deleted a section
2561
+ * deleted a section.
2562
+ *
2563
+ * **Expression syntax never reaches the words.** A host may hide expressions
2564
+ * entirely (`expressions: false`), and a revision list that printed
2565
+ * `sum(invoice.lineItems.amount) | currency` would put back exactly what that
2566
+ * flag took away. Bindings are named with `describeExpression`, the same
2567
+ * function the canvas chips use, and anything that still would not read as
2568
+ * words is called "a calculated value".
2569
+ *
2570
+ * **It is pure.** No DOM, no registry required, deterministic output — the same
2571
+ * two templates always produce the same list in the same order, so a host can
2572
+ * store the summary beside a revision and trust it later.
2573
+ */
2574
+
2575
+ type ChangeKind = "added" | "removed" | "changed" | "moved";
2576
+ type ChangeArea = "document" | "page" | "styles" | "header" | "footer" | "body";
2577
+ interface TemplateChange {
2578
+ kind: ChangeKind;
2579
+ area: ChangeArea;
2580
+ /** The node's id, when the change is to a node. */
2581
+ nodeId?: string;
2582
+ /** What changed, named for a person: "Table", "Top margin", "Heading 1 style". */
2583
+ subject: string;
2584
+ /** One sentence: `Added a table to “Summary”`, `Changed the page margins`. */
2585
+ summary: string;
2586
+ /** Display strings, only when a single simple value changed. ≤ 80 chars each, truncated with "…". */
2587
+ before?: string;
2588
+ after?: string;
2589
+ }
2590
+ interface TemplateDiff {
2591
+ changes: TemplateChange[];
2592
+ counts: Record<ChangeKind, number>;
2593
+ /** Changes beyond `maxChanges` that were counted but not listed. */
2594
+ truncated: number;
2595
+ identical: boolean;
2596
+ }
2597
+ interface DiffOptions {
2598
+ /** Block definitions, for naming block types and their properties. */
2599
+ registry?: BlockRegistry;
2600
+ /** Default 200. */
2601
+ maxChanges?: number;
2602
+ /**
2603
+ * The data sources the template binds to, so a binding is named by its field's
2604
+ * own label ("Invoice number") rather than a humanised key ("Number").
2605
+ * Optional: without them the names are still words, just plainer ones.
2606
+ */
2607
+ dataSources?: DataSource[];
2608
+ }
2609
+ declare function diffTemplates(before: ReportTemplate, after: ReportTemplate, options?: DiffOptions): TemplateDiff;
2610
+ /**
2611
+ * One line for a list of revisions.
2612
+ *
2613
+ * A single change is worth naming outright; several are counted, because a list
2614
+ * row that tried to name seven changes would be truncated into saying none of
2615
+ * them properly.
2616
+ */
2617
+ declare function summariseDiff(diff: TemplateDiff): string;
2618
+
2350
2619
  interface ResolveOptions {
2351
2620
  template: ReportTemplate;
2352
2621
  registry: BlockRegistry;
@@ -2875,4 +3144,4 @@ declare function renderNode(node: ResolvedNode, opts: RenderTreeOptions, width?:
2875
3144
  /** Renders a list of resolved sections into a fragment-less flat list. */
2876
3145
  declare function renderSections(sections: ResolvedNode[], opts: RenderTreeOptions): VNode[];
2877
3146
 
2878
- export { type AnyVersionTemplate, type BinaryOp, type BindingInfo, type BindingKind, type BindingSpec, type BlockCategory, type BlockDefinition, type BlockNode, BlockRegistry, type BlockRegistryLike, type BlockStyle, type BorderSpec, type BorderStyle, type BreakMode, type BreakRun, CONDITION_OPERATORS, CURRENT_SCHEMA_VERSION, type CardStyle, type ColorValue, type Command, CommandError, type Condition, type ConditionGroup, type ConditionRule, type ContainerSpec, type CreateNodeOptions, type CreateTemplateOptions, type CustomPageSize, DEFAULT_PAGE_CONTEXT, DEFAULT_THEME, type DataSource, type DispatchOptions, type DocumentStyles, type EditorState, EditorStore, type EditorStoreOptions, type EvalContext, type Expr, ExpressionError, FUNCTION_NAMES, type FieldSchema, type FieldType, type FlowOptions, type FontValue, type FormatContext, GLOBAL_SCHEMAS, type GeometryMap, type HistoryEntry, type InlineNode, type InspectorApi, type InspectorComponent, type InspectorField, type InspectorFieldBase, type InspectorSection, type Issue, type IssueCode, type IssueSeverity, type IssueSource, type LayoutWarning, type LibraryItem, type LicenseTier, type List, type ListItem, MIGRATIONS, type Measurer, type Migration, MigrationError, type MigrationResult, type Node, type NodeEntry, type NodeGeometry, type NodeIndex, type NodeLocation, type OutputCheckOptions, PAGE_SIZES_MM, PIPES, PX_PER_MM, type Page, type PageContext, type PageFragment, type PageGeometry, type PageMargins, type PageOrientation, type PageRegionSettings, type PageSettings, type PageSize, type PageSizeName, type PagedDocument, type PaginateOptions, type Paragraph, type ParseResult, type PathSegment, type PipeDefinition, type PipeFn, REGION_IDS, ROW_LAYOUTS, type RegionContent, type RegionId, type RegistryOptions, type RenderContext, type RenderMode, type RenderTreeOptions, type RepeatedHeader, type ReportData, type ReportTemplate, type ResolveHookContext, type ResolveOptions, type ResolvedDocument, type ResolvedFlow, type ResolvedNode, type ResolvedRegion, type ResolvedRole, type ResolvedSegment, type ResolvedStyle, type RichTextDoc, SchemaScope, type SchemaVersion, Scope, type SectionGeometry, type SelectOption, type Spacing, type SplitMode, type StyleCascadeInput, type StyleGroup, type TableRowGeometry, type TableStyle, type TemplateMeta, type TemplateSegment, type TemplateSettings, type TextAlign, type TextMarks, type TextRun, type TextStyle, type TextStyleId, type Theme, type ThemeColors, type ThemeFontFace, type ThemeTableDefaults, type ThemeTokenInfo, type ThemeTypography, type TokenRef, type TokenRun, type TypeIssue, type TypeResult, type VChild, type VNode, type VProps, type ValidateContext, type ValidateOptions, type ValidationResult, type ValueType, type VerticalAlign, ancestors, applyCommand, bestBreak, bindingSpecsFor, blockStyleSchema, checkExpressionSyntax, checkOutput, classNames, cloneWithNewIds, collectPaths, columnWidth, compareValues, compileCondition, computePageGeometry, countNodes, createColumn, createId, createNode, createParagraph, createRichText, createRow, createSchemaScope, createSection, createTemplate, cssText, dataSourceSchemas, defaultDocumentStyles, defaultPageSettings, defineBlock, describeExpression, documentStylesSchema, escapeHtml, evaluate, evaluateAst, evaluateCondition, evaluateText, evaluateToText, exprToString, extractTemplateTokens, findNode, formatCurrency, formatDate, formatDatePattern, formatNumber, formatPercent, getField, getRegion, h, humaniseLabel, humanize, humanizeKey, indexTemplate, inlineFromTemplate, inlineToPlain, interpolate, isDarkColor, isDescendant, isEmptyValue, isRichTextDoc, isSafeUrl, isTokenRef, isVNode, issue, itemSchemaOf, labelForPath, listAt, listThemeTokens, looseEquals, mergeTheme, migrateTemplate, missingThemeValues, mmToPx, needsMigration, nodeAt, nodeAttrs, nodeSchema, pageSettingsSchema, pageSizeMm, paginate, parseExpression, parseTemplate, pathToString, pxToMm, readProperty, readRegion, renderInline, renderNode, renderRichText, renderSections, renderSegments, resolveDefaultProps, resolvePath, resolvePathSchema, resolveStyle, resolveTemplate, resolveToken, resolveValue, richTextFromTemplate, richTextToPlain, richTextTokens, setDeterministicIds, splitTemplate, styleString, styleToCss, synthesizeSampleData, synthesizeValue, templateSchema, textStyleLabel, toDate, toDisplayString, toHtml, toNumber, tokenChip, tokenize, truthy, typeCheck, typeCheckAst, usedBlockTypes, validateTemplate, walkTemplate, walkVNodes };
3147
+ export { type AnyVersionTemplate, type BinaryOp, type BindingInfo, type BindingKind, type BindingSpec, type BlockCategory, type BlockDefinition, type BlockNode, BlockRegistry, type BlockRegistryLike, type BlockStyle, type BorderSpec, type BorderStyle, type BreakMode, type BreakRun, CONDITION_OPERATORS, CURRENT_SCHEMA_VERSION, type CalcAggregate, type CalcOp, type CalcStep, type CalcTerm, type Calculation, type CardStyle, type ChangeArea, type ChangeKind, type ColorValue, type Command, CommandError, type Condition, type ConditionGroup, type ConditionRule, type ContainerSpec, type CreateNodeOptions, type CreateTemplateOptions, type CustomPageSize, DEFAULT_PAGE_CONTEXT, DEFAULT_THEME, type DataSource, type DiffOptions, type DispatchOptions, type DocumentStyles, type EditorState, EditorStore, type EditorStoreOptions, type EvalContext, type Expr, ExpressionError, FUNCTION_NAMES, type FieldSchema, type FieldType, type FlowOptions, type FontValue, type FormatContext, GLOBAL_SCHEMAS, type GeometryMap, type HistoryEntry, type InlineNode, type InspectorApi, type InspectorComponent, type InspectorField, type InspectorFieldBase, type InspectorSection, type Issue, type IssueCode, type IssueSeverity, type IssueSource, type LayoutWarning, type LibraryItem, type LicenseTier, type List, type ListItem, MIGRATIONS, type Measurer, type Migration, MigrationError, type MigrationResult, type Node, type NodeEntry, type NodeGeometry, type NodeIndex, type NodeLocation, type OutputCheckOptions, PAGE_SIZES_MM, PIPES, PX_PER_MM, type Page, type PageContext, type PageFragment, type PageGeometry, type PageMargins, type PageOrientation, type PageRegionSettings, type PageSettings, type PageSize, type PageSizeName, type PagedDocument, type PaginateOptions, type Paragraph, type ParseResult, type PathSegment, type PipeDefinition, type PipeFn, REGION_IDS, ROW_LAYOUTS, type RegionContent, type RegionId, type RegistryOptions, type RenderContext, type RenderMode, type RenderTreeOptions, type RepeatedHeader, type ReportData, type ReportTemplate, type ResolveHookContext, type ResolveOptions, type ResolvedDocument, type ResolvedFlow, type ResolvedNode, type ResolvedRegion, type ResolvedRole, type ResolvedSegment, type ResolvedStyle, type RichTextDoc, SchemaScope, type SchemaVersion, Scope, type SectionGeometry, type SelectOption, type Spacing, type SplitMode, type StyleCascadeInput, type StyleGroup, type TableRowGeometry, type TableStyle, type TemplateChange, type TemplateDiff, type TemplateMeta, type TemplateSegment, type TemplateSettings, type TextAlign, type TextMarks, type TextRun, type TextStyle, type TextStyleId, type Theme, type ThemeColors, type ThemeFontFace, type ThemeTableDefaults, type ThemeTokenInfo, type ThemeTypography, type TokenRef, type TokenRun, type TypeIssue, type TypeResult, type VChild, type VNode, type VProps, type ValidateContext, type ValidateOptions, type ValidationResult, type ValueType, type VerticalAlign, ancestors, applyCommand, bestBreak, bindingSpecsFor, blockStyleSchema, calcPaths, calcToAst, checkExpressionSyntax, checkOutput, classNames, cloneWithNewIds, collectPaths, columnWidth, compareValues, compileCondition, computePageGeometry, countNodes, createColumn, createId, createNode, createParagraph, createRichText, createRow, createSchemaScope, createSection, createTemplate, cssText, dataSourceSchemas, defaultDocumentStyles, defaultPageSettings, defaultPipeFor, defineBlock, describeExpression, diffTemplates, documentStylesSchema, escapeHtml, evaluate, evaluateAst, evaluateCondition, evaluateText, evaluateToText, exprToString, extractTemplateTokens, findNode, formatCurrency, formatDate, formatDatePattern, formatNumber, formatPercent, fromExpression, getField, getRegion, h, hasPipe, humaniseLabel, humanize, humanizeKey, indexTemplate, inlineFromTemplate, inlineToPlain, interpolate, isCalculation, isDarkColor, isDescendant, isEmptyValue, isPlainPath, isRichTextDoc, isSafeUrl, isTokenRef, isVNode, issue, itemSchemaOf, labelForPath, listAt, listThemeTokens, looseEquals, mergeTheme, migrateTemplate, missingThemeValues, mmToPx, needsMigration, nodeAt, nodeAttrs, nodeSchema, pageSettingsSchema, pageSizeMm, paginate, parseExpression, parseTemplate, pathToString, pxToMm, readProperty, readRegion, renderInline, renderNode, renderRichText, renderSections, renderSegments, resolveDefaultProps, resolvePath, resolvePathSchema, resolveStyle, resolveTemplate, resolveToken, resolveValue, richTextFromTemplate, richTextToPlain, richTextTokens, setDeterministicIds, splitTemplate, styleString, styleToCss, summariseDiff, synthesizeSampleData, synthesizeValue, templateSchema, textStyleLabel, toDate, toDisplayString, toExpression, toHtml, toNumber, tokenChip, tokenize, truthy, typeCheck, typeCheckAst, usedBlockTypes, validateTemplate, walkTemplate, walkVNodes, withDefaultPipe };