Skip to content

Commit d4a8353

Browse files
committed
chore(footnote): merge main and port caps marker to refactored list-marker (SD-2656)
Resolves conflicts after main's painter-dom refactor (#3269 / SD-2851): * shared/common/list-marker-utils.ts — combined main's new fields (color, letterSpacing, vanish) with our caps marks (allCaps, smallCaps) on MinimalMarkerRun. * packages/layout-engine/painters/dom/src/utils/marker-helpers.ts — accepted main's deletion; createListMarkerElement moved to paragraph/list-marker.ts. * packages/layout-engine/painters/dom/src/renderer.ts — accepted main's removal of WordLayoutMarker type and the renderListItemFragment / renderDropCap methods. Both were superseded by the new paragraph/list-marker.ts and the resolved-fragment pipeline. * packages/layout-engine/painters/dom/src/paragraph/list-marker.ts — ported our caps mark handling (textTransform: uppercase for w:caps, fontVariant: small-caps for w:smallCaps) to the new MarkerRunStyle type and createListMarkerElement implementation. * packages/layout-engine/layout-resolved/src/resolveParagraph.ts — refreshed JSDoc reference to the file's new home. Tests: - 1136 painter-dom pass - 1252 layout-bridge pass + 1 skip - 657 layout-engine pass
2 parents 9700b46 + 83ea57d commit d4a8353

556 files changed

Lines changed: 38391 additions & 10038 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release-stable.yml

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -142,40 +142,37 @@ jobs:
142142
# `git tag --points-at HEAD`. After CLI -> SDK -> MCP, HEAD lands on
143143
# MCP's version commit and the SDK tag is no longer at HEAD.
144144
#
145-
# PyPI publish steps disabled: trusted-publisher config and per-project
146-
# storage cap need to be sorted on the PyPI side before re-enabling.
147-
# Restore by uncommenting once access is back.
148-
# - name: Publish recovered SDK companion Python packages to PyPI
149-
# if: steps.stable_release.outputs.sdk_python_snapshot_companion_dir != ''
150-
# uses: pypa/gh-action-pypi-publish@release/v1
151-
# with:
152-
# packages-dir: ${{ steps.stable_release.outputs.sdk_python_snapshot_companion_dir }}
153-
# skip-existing: true
154-
#
155-
# - name: Publish recovered SDK main Python package to PyPI
156-
# if: steps.stable_release.outputs.sdk_python_snapshot_main_dir != ''
157-
# uses: pypa/gh-action-pypi-publish@release/v1
158-
# with:
159-
# packages-dir: ${{ steps.stable_release.outputs.sdk_python_snapshot_main_dir }}
160-
# skip-existing: true
145+
- name: Publish recovered SDK companion Python packages to PyPI
146+
if: steps.stable_release.outputs.sdk_python_snapshot_companion_dir != ''
147+
uses: pypa/gh-action-pypi-publish@release/v1
148+
with:
149+
packages-dir: ${{ steps.stable_release.outputs.sdk_python_snapshot_companion_dir }}
150+
skip-existing: true
151+
152+
- name: Publish recovered SDK main Python package to PyPI
153+
if: steps.stable_release.outputs.sdk_python_snapshot_main_dir != ''
154+
uses: pypa/gh-action-pypi-publish@release/v1
155+
with:
156+
packages-dir: ${{ steps.stable_release.outputs.sdk_python_snapshot_main_dir }}
157+
skip-existing: true
161158

162159
- name: Build and verify Python SDK
163160
if: steps.stable_release.outputs.sdk_release_present == 'true'
164161
run: node packages/sdk/scripts/build-python-sdk.mjs
165162

166-
# - name: Publish companion Python packages to PyPI
167-
# if: steps.stable_release.outputs.sdk_release_present == 'true'
168-
# uses: pypa/gh-action-pypi-publish@release/v1
169-
# with:
170-
# packages-dir: packages/sdk/langs/python/companion-dist/
171-
# skip-existing: true
172-
#
173-
# - name: Publish main Python SDK to PyPI
174-
# if: steps.stable_release.outputs.sdk_release_present == 'true'
175-
# uses: pypa/gh-action-pypi-publish@release/v1
176-
# with:
177-
# packages-dir: packages/sdk/langs/python/dist/
178-
# skip-existing: true
163+
- name: Publish companion Python packages to PyPI
164+
if: steps.stable_release.outputs.sdk_release_present == 'true'
165+
uses: pypa/gh-action-pypi-publish@release/v1
166+
with:
167+
packages-dir: packages/sdk/langs/python/companion-dist/
168+
skip-existing: true
169+
170+
- name: Publish main Python SDK to PyPI
171+
if: steps.stable_release.outputs.sdk_release_present == 'true'
172+
uses: pypa/gh-action-pypi-publish@release/v1
173+
with:
174+
packages-dir: packages/sdk/langs/python/dist/
175+
skip-existing: true
179176
# Docs promotion lives in promote-stable-docs.yml. It triggers off this
180177
# workflow's completion and gates on whether a real superdoc v* tag was
181178
# created during the run, so tools-only releases leave docs-stable

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ Do not hand-edit `COMMAND_CATALOG`, `OPERATION_MEMBER_PATH_MAP`, `OPERATION_REFE
7272
- `pnpm test` - unit tests
7373
- `pnpm dev` - dev server from `examples/`
7474
- `pnpm check:types` - raw TS compile across all referenced projects (`tsc -b tsconfig.references.json`). Does NOT run the public-interface chain. Legacy alias: `pnpm run type-check`.
75-
- `pnpm check:public` - **canonical pre-merge command for typed public surfaces.** Validates both `superdoc` (tier discipline + jsdoc ratchet + public-method fixture coverage + vite build + postbuild chain + consumer typecheck matrix + deep-type audit + package-shape + snapshots + classification closure) and Document API (contract parity + output staleness + examples + overview). ~5 min. Non-mutating. Combines `check:public:superdoc` + `check:public:docapi`.
76-
- `pnpm check:public:superdoc` - SuperDoc public package surface only. Wraps ten stages in cheap-to-expensive order: `contract-tiers-test`, `contract-tiers`, `jsdoc-ratchet`, `public-method-coverage`, `build`, `consumer-typecheck-matrix`, `deep-type-audit-supported-root`, `package-shape`, `export-snapshots`, `root-classification-closure`. Legacy alias: `pnpm run check:public-contract`.
75+
- `pnpm check:public` - **canonical pre-merge command for typed public surfaces.** Validates both `superdoc` (tier discipline + jsdoc ratchet + ts-jsdoc hygiene + public-method fixture coverage + vite build + postbuild chain + consumer typecheck matrix + deep-type audit + package-shape + snapshots + classification closure) and Document API (contract parity + output staleness + examples + overview). ~5 min. Non-mutating. Combines `check:public:superdoc` + `check:public:docapi`.
76+
- `pnpm check:public:superdoc` - SuperDoc public package surface only. Wraps twelve stages in cheap-to-expensive order: `contract-tiers-test`, `contract-tiers`, `jsdoc-ratchet`, `jsdoc-hygiene-ts-test`, `jsdoc-hygiene-ts`, `public-method-coverage`, `build`, `consumer-typecheck-matrix`, `deep-type-audit-supported-root`, `package-shape`, `export-snapshots`, `root-classification-closure`. Legacy alias: `pnpm run check:public-contract`.
7777
- `pnpm check:public:docapi` - Document API public surface only. Wraps four stages: `contract-parity`, `contract-outputs`, `examples`, `overview-alignment`. Clean-checkout safe: gitignored generated artifacts are built in memory; tracked outputs (reference docs, overview block) are compared byte-for-byte. No mutation. Legacy alias: `pnpm run docapi:check`.
7878
- `pnpm generate:docapi` - regenerate Document API outputs after editing the contract (alias of `docapi:sync`). Writes gitignored Document API generated artifacts. Run only when you need the artifacts materialized locally (SDK builds, publishing); `check:public:docapi` does not require it.
7979
- `pnpm generate:all` - regenerate schemas, SDK clients, tool catalogs, reference docs.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Special thanks to these community members who have contributed code to SuperDoc:
175175
<a href="https://github.com/shri-scale"><img src="https://github.com/shri-scale.png" width="50" height="50" alt="shri-scale" title="Shri H" /></a>
176176
<a href="https://github.com/msviderok"><img src="https://github.com/msviderok.png" width="50" height="50" alt="msviderok" title="Myroslav Sviderok" /></a>
177177
<a href="https://github.com/sergiogomes"><img src="https://github.com/sergiogomes.png" width="50" height="50" alt="sergiogomes" title="Sérgio Paulo Gomes" /></a>
178+
<a href="https://github.com/wookieb"><img src="https://github.com/wookieb.png" width="50" height="50" alt="wookieb" title="Łukasz Kużyński" /></a>
178179

179180
Want to see your avatar here? Check the [Contributing Guide](CONTRIBUTING.md) to get started.
180181

apps/cli/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/cli",
3-
"version": "0.12.0",
3+
"version": "0.13.1",
44
"type": "module",
55
"bin": {
66
"superdoc": "./dist/index.js"

apps/cli/platforms/cli-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/cli-darwin-arm64",
3-
"version": "0.12.0",
3+
"version": "0.13.1",
44
"os": [
55
"darwin"
66
],

apps/cli/platforms/cli-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/cli-darwin-x64",
3-
"version": "0.12.0",
3+
"version": "0.13.1",
44
"os": [
55
"darwin"
66
],

apps/cli/platforms/cli-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/cli-linux-arm64",
3-
"version": "0.12.0",
3+
"version": "0.13.1",
44
"os": [
55
"linux"
66
],

apps/cli/platforms/cli-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/cli-linux-x64",
3-
"version": "0.12.0",
3+
"version": "0.13.1",
44
"os": [
55
"linux"
66
],

apps/cli/platforms/cli-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/cli-windows-x64",
3-
"version": "0.12.0",
3+
"version": "0.13.1",
44
"os": [
55
"win32"
66
],

apps/cli/src/__tests__/cli.test.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ const ENCRYPTED_FIXTURE_SOURCE = join(
6565
REPO_ROOT,
6666
'packages/super-editor/src/editors/v1/core/ooxml-encryption/fixtures/encrypted-advanced-text.docx',
6767
);
68+
const TRACKED_CHANGE_FIXTURE_SOURCE = join(
69+
REPO_ROOT,
70+
'packages/super-editor/src/editors/v1/tests/data/basic-tracked-change.docx',
71+
);
6872
const execFileAsync = promisify(execFile);
6973
const ZIP_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
7074

@@ -2334,6 +2338,35 @@ describe('superdoc CLI', () => {
23342338
expect(verifyEnvelope.data.result.total).toBeGreaterThan(0);
23352339
});
23362340

2341+
test('save --mode final exports accepted OOXML instead of copying review-preserving revisions', async () => {
2342+
const trackedSource = join(TEST_DIR, 'save-final-source.docx');
2343+
const savedOut = join(TEST_DIR, 'save-final-output.docx');
2344+
await copyFile(TRACKED_CHANGE_FIXTURE_SOURCE, trackedSource);
2345+
2346+
const openResult = await runCli(['open', trackedSource, '--session', 'final-export']);
2347+
expect(openResult.code).toBe(0);
2348+
2349+
const saveResult = await runCli([
2350+
'save',
2351+
'--session',
2352+
'final-export',
2353+
'--mode',
2354+
'final',
2355+
'--out',
2356+
savedOut,
2357+
'--force',
2358+
]);
2359+
expect(saveResult.code).toBe(0);
2360+
2361+
const saveEnvelope = parseJsonOutput<SuccessEnvelope<{ mode: string; output: { path: string } }>>(saveResult);
2362+
expect(saveEnvelope.data.mode).toBe('final');
2363+
expect(saveEnvelope.data.output.path).toBe(savedOut);
2364+
2365+
const documentXml = await readDocxPart(savedOut, 'word/document.xml');
2366+
expect(documentXml).not.toContain('<w:ins');
2367+
expect(documentXml).not.toContain('<w:del');
2368+
});
2369+
23372370
test('save --in-place detects source drift unless forced', async () => {
23382371
const driftSource = join(TEST_DIR, 'drift-source.docx');
23392372
await copyFile(SAMPLE_DOC, driftSource);

0 commit comments

Comments
 (0)