Skip to content

Commit 4d5c879

Browse files
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

14 files changed

+19
-19
lines changed

β€Žpackages/sdk/langs/node/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@superdoc-dev/sdk",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"private": false,
55
"type": "module",
66
"main": "./dist/index.cjs",

β€Žpackages/sdk/langs/node/platforms/sdk-darwin-arm64/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@superdoc-dev/sdk-darwin-arm64",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"os": [
55
"darwin"
66
],

β€Žpackages/sdk/langs/node/platforms/sdk-darwin-x64/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@superdoc-dev/sdk-darwin-x64",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"os": [
55
"darwin"
66
],

β€Žpackages/sdk/langs/node/platforms/sdk-linux-arm64/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@superdoc-dev/sdk-linux-arm64",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"os": [
55
"linux"
66
],

β€Žpackages/sdk/langs/node/platforms/sdk-linux-x64/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@superdoc-dev/sdk-linux-x64",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"os": [
55
"linux"
66
],

β€Žpackages/sdk/langs/node/platforms/sdk-windows-x64/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@superdoc-dev/sdk-windows-x64",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"os": [
55
"win32"
66
],

β€Žpackages/sdk/langs/python/platforms/superdoc-sdk-cli-darwin-arm64/pyproject.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "superdoc-sdk-cli-darwin-arm64"
7-
version = "1.3.0"
7+
version = "1.4.0"
88
description = "SuperDoc CLI binary for macOS ARM64 (Apple Silicon)"
99
readme = "README.md"
1010
requires-python = ">=3.9"

β€Žpackages/sdk/langs/python/platforms/superdoc-sdk-cli-darwin-x64/pyproject.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "superdoc-sdk-cli-darwin-x64"
7-
version = "1.3.0"
7+
version = "1.4.0"
88
description = "SuperDoc CLI binary for macOS x64 (Intel)"
99
readme = "README.md"
1010
requires-python = ">=3.9"

β€Žpackages/sdk/langs/python/platforms/superdoc-sdk-cli-linux-arm64/pyproject.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "superdoc-sdk-cli-linux-arm64"
7-
version = "1.3.0"
7+
version = "1.4.0"
88
description = "SuperDoc CLI binary for Linux ARM64"
99
readme = "README.md"
1010
requires-python = ">=3.9"

β€Žpackages/sdk/langs/python/platforms/superdoc-sdk-cli-linux-x64/pyproject.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "superdoc-sdk-cli-linux-x64"
7-
version = "1.3.0"
7+
version = "1.4.0"
88
description = "SuperDoc CLI binary for Linux x64"
99
readme = "README.md"
1010
requires-python = ">=3.9"

0 commit comments

Comments
Β (0)