Commit 4d5c879
committed
chore(sdk): 1.4.0 [skip ci]
### What's New
- **scrollToElement** β Navigate to any element (paragraph, comment, tracked change) by ID with automatic type resolution; cascading fallback handles block index lookup β comment/tracked-change mark β canonical ID.
- **Headless toolbar** β React hook (`useHeadlessToolbar`) and Vue composable for typed, framework-agnostic toolbar control; includes `ToolbarPayloadMap` and `ToolbarValueMap` for compile-time safety on command execution.
- **Math delimiters** β m:d converter renders ECMA-376 delimiter syntax with custom Unicode delimiters (floor, ceiling, abs), separator handling, and nested delimiter support.
- **Math radicals** β m:rad converter renders square roots and n-th roots with correct nesting and degree placement.
- **Math functions** β m:func converter renders function names with upright styling per ECMA-376.
- **Math scripts** β m:sSub, m:sSup, and m:sSubSup converters render subscripts, superscripts, and combined sub-superscripts with operands wrapped in `<mrow>` for valid MathML arity.
- **Contained mode** β Fixed-height container embedding with `contained: true`; document scrolls within parent instead of expanding vertically.
### Improvements
- **Type safety** β Chain commands return `ChainableCommandObject` instead of `boolean`; restored module augmentation support via `AugmentedChainedCommands` and `AugmentedCanCommands`.
- **Comment types** β Expanded `Comment` type with full runtime shape (`commentId`, `elements`); added `CommentElement` type for comment body nodes and `FontConfig` type for toolbar font picker options.
- **Type exports** β Added `exportDocx` overloads for narrowed return types per flag; added `loadXmlData` and `replaceFile` overloads accepting `ArrayBuffer`.
- **Block formatting** β Formatting now resolves through the full style cascade (docDefaults β Normal style β paragraph style β inline marks) instead of inline marks only; ensures accurate fontFamily, fontSize, color, and bold even on style-driven formatting.
- **Per-script fonts** β Mark round-trip now preserves `eastAsiaFontFamily` and `csFontFamily` separately so multi-script documents maintain correct font metadata across import/export.
- **Math height estimation** β Inline math height now estimated from OMML structure (counting fractions, bars, limits, arrays) instead of fixed 24px, improving paragraph line-height accuracy with complex equations.
- **Navigation fallback** β `scrollToElement` uses cascading fallback: block index (O(1)) β comment/tracked-change mark β canonical ID resolution.
- **Comment rendering** β Fixed sidebar overflow so multiple tracked-change bubbles render without clipping when clicking the last bubble.
- **Table styling from HTML** β Google Docs HTML paste now preserves cell background colors, margins, borders, row heights, and vertical alignment.
- **Table cell hyperlinks** β Hyperlinks on DrawingML images (a:hlinkClick) now serialize and round-trip correctly.
### Fixes
- **Track changes mark lookup** β Fixed keystroke-by-keystroke splitting by matching user.email fallback in both mark creation and lookup (`` || '' `` consistent).
- **Tracked change undo** β Partial undo on format suggestions now reverts all properties, not just the last one changed; attrs merge instead of replace for multi-property marks.
- **Text rewrite with splits** β Whole-textblock replacement now respects `splitBefore`/`splitAfter` signals, producing correct paragraph splits instead of literal newline characters.
- **Caret in comments** β Click positioning inside commented text now activates the comment; `elementFromPoint` fallback handles pointer capture redirect.
- **Scroll after cursor** β `setCursorById` for comments and tracked changes now scrolls viewport into view instead of placing cursor off-screen.
- **Per-script font export** β Inline keys guard prevents false-positive mark-derived formatting injection; when importer set `runPropertiesInlineKeys` to `[]`, plugin respects that decision.
- **TOC on paragraphs** β Table of contents now loads on paragraphs; fixed double-decoding of nested children.
- **Pagination state sync** β Paginator state stays in sync when pruning empty pages; blank-page and section-break fallbacks now reset pagination correctly.
- **Image constraints in web layout** β Table cell width constraint now applies in web layout mode; images inserted into cells resize to fit.
- **Word-spacing with tabs** β Manual tab runs no longer inject negative word-spacing on justified lines; tab-based positioning supersedes justify.
- **Floating-only documents** β Layout now handles documents with only floating elements without crashing; ignores non-visual image ID churn.
- **Document part normalization** β Non-TOC gallery types (page numbers, bibliographies) now normalize inline nodes (bookmarks, comments, permissions) instead of failing.
- **SVG namespace in DOCX** β DOCX export handles null or undefined converter declaration with standard XML fallback.
- **Type generation** β Auto-generate TypeScript types by converting super-editor barrel to TypeScript; types now derive from actual source files instead of hand-written declarations.1 parent a5a5114 commit 4d5c879
File tree
14 files changed
+19
-19
lines changed- packages/sdk
- langs
- node
- platforms
- sdk-darwin-arm64
- sdk-darwin-x64
- sdk-linux-arm64
- sdk-linux-x64
- sdk-windows-x64
- python
- platforms
- superdoc-sdk-cli-darwin-arm64
- superdoc-sdk-cli-darwin-x64
- superdoc-sdk-cli-linux-arm64
- superdoc-sdk-cli-linux-x64
- superdoc-sdk-cli-windows-x64
14 files changed
+19
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments