superdoc 2.6.0 → 2.6.1-next.2
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/dist/chunks/{create-super-doc-ui-Bom7oDPv.cjs → create-super-doc-ui-CwCvqMOa.cjs} +12 -2
- package/dist/chunks/{create-super-doc-ui-DbzVC0rr.es.js → create-super-doc-ui-DCjm-_Xo.es.js} +12 -2
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/layout-engine/contracts/src/graphic-placement.d.ts +13 -0
- package/dist/layout-engine/contracts/src/index.d.ts +3 -1
- package/dist/layout-engine/layout-engine/src/index.d.ts +3 -2
- package/dist/layout-engine/layout-engine/src/normalize-header-footer-fragments.d.ts +3 -3
- package/dist/layout-engine/style-engine/src/ooxml/numbering-types.d.ts +2 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist-cdn/superdoc.min.js +19 -19
- package/package.json +2 -2
|
@@ -5509,9 +5509,18 @@ function createSuperDocUI(options) {
|
|
|
5509
5509
|
const entry = readListApplyStateEntry();
|
|
5510
5510
|
const shippedStatus = typeof entry?.shippedStatus === "string" ? entry.shippedStatus : null;
|
|
5511
5511
|
const supported = shippedStatus !== "not-shipped" && shippedStatus !== "disabled";
|
|
5512
|
+
const enabled = supported && (typeof entry?.enabled === "boolean" ? entry.enabled : true);
|
|
5513
|
+
const activeSeed = supported ? readListActiveSeed(entry) : null;
|
|
5514
|
+
if (readonly) return normalizeCommandState({
|
|
5515
|
+
enabled: false,
|
|
5516
|
+
active: activeSeed === listKind,
|
|
5517
|
+
supported,
|
|
5518
|
+
value: entry?.value,
|
|
5519
|
+
reason: SUPERDOC_UI_REASONS.documentReadonly
|
|
5520
|
+
}, "builtin");
|
|
5512
5521
|
return normalizeCommandState({
|
|
5513
|
-
enabled
|
|
5514
|
-
active:
|
|
5522
|
+
enabled,
|
|
5523
|
+
active: activeSeed === listKind,
|
|
5515
5524
|
supported,
|
|
5516
5525
|
value: entry?.value
|
|
5517
5526
|
}, "builtin");
|
|
@@ -8154,6 +8163,7 @@ function createSuperDocUI(options) {
|
|
|
8154
8163
|
}
|
|
8155
8164
|
const listKind = listToggleKind(id);
|
|
8156
8165
|
if (listKind) {
|
|
8166
|
+
if (readDocumentMode() === "viewing") return false;
|
|
8157
8167
|
if (typeof (getEditCommands()?.lists)?.apply === "function") return executeListToggleCommand(listKind, payload);
|
|
8158
8168
|
}
|
|
8159
8169
|
const trackCommand = trackDecisionCommand(id);
|
package/dist/chunks/{create-super-doc-ui-DbzVC0rr.es.js → create-super-doc-ui-DCjm-_Xo.es.js}
RENAMED
|
@@ -5509,9 +5509,18 @@ function createSuperDocUI(options) {
|
|
|
5509
5509
|
const entry = readListApplyStateEntry();
|
|
5510
5510
|
const shippedStatus = typeof entry?.shippedStatus === "string" ? entry.shippedStatus : null;
|
|
5511
5511
|
const supported = shippedStatus !== "not-shipped" && shippedStatus !== "disabled";
|
|
5512
|
+
const enabled = supported && (typeof entry?.enabled === "boolean" ? entry.enabled : true);
|
|
5513
|
+
const activeSeed = supported ? readListActiveSeed(entry) : null;
|
|
5514
|
+
if (readonly) return normalizeCommandState({
|
|
5515
|
+
enabled: false,
|
|
5516
|
+
active: activeSeed === listKind,
|
|
5517
|
+
supported,
|
|
5518
|
+
value: entry?.value,
|
|
5519
|
+
reason: SUPERDOC_UI_REASONS.documentReadonly
|
|
5520
|
+
}, "builtin");
|
|
5512
5521
|
return normalizeCommandState({
|
|
5513
|
-
enabled
|
|
5514
|
-
active:
|
|
5522
|
+
enabled,
|
|
5523
|
+
active: activeSeed === listKind,
|
|
5515
5524
|
supported,
|
|
5516
5525
|
value: entry?.value
|
|
5517
5526
|
}, "builtin");
|
|
@@ -8154,6 +8163,7 @@ function createSuperDocUI(options) {
|
|
|
8154
8163
|
}
|
|
8155
8164
|
const listKind = listToggleKind(id);
|
|
8156
8165
|
if (listKind) {
|
|
8166
|
+
if (readDocumentMode() === "viewing") return false;
|
|
8157
8167
|
if (typeof (getEditCommands()?.lists)?.apply === "function") return executeListToggleCommand(listKind, payload);
|
|
8158
8168
|
}
|
|
8159
8169
|
const trackCommand = trackDecisionCommand(id);
|
|
@@ -19,7 +19,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
19
19
|
var PRIVATE_ENGINE_INFO = (0, _superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
|
|
20
20
|
var ENGINE_INFO = Object.freeze({
|
|
21
21
|
...PRIVATE_ENGINE_INFO,
|
|
22
|
-
superdocVersion: "2.6.
|
|
22
|
+
superdocVersion: "2.6.1-next.2",
|
|
23
23
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
24
24
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
25
25
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
18
18
|
var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
|
|
19
19
|
var ENGINE_INFO = Object.freeze({
|
|
20
20
|
...PRIVATE_ENGINE_INFO,
|
|
21
|
-
superdocVersion: "2.6.
|
|
21
|
+
superdocVersion: "2.6.1-next.2",
|
|
22
22
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
23
23
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
24
24
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -28,6 +28,19 @@ export declare function isPagePositionedParagraphFrame(frame: {
|
|
|
28
28
|
vAnchor: 'page';
|
|
29
29
|
y: number;
|
|
30
30
|
};
|
|
31
|
+
export declare function isPagePositionedFloatingTable<T extends {
|
|
32
|
+
kind?: string;
|
|
33
|
+
anchor?: {
|
|
34
|
+
isAnchored?: boolean;
|
|
35
|
+
vRelativeFrom?: string;
|
|
36
|
+
};
|
|
37
|
+
}>(block: T | undefined): block is T & {
|
|
38
|
+
kind: 'table';
|
|
39
|
+
anchor: {
|
|
40
|
+
isAnchored: true;
|
|
41
|
+
vRelativeFrom: 'page';
|
|
42
|
+
};
|
|
43
|
+
};
|
|
31
44
|
/**
|
|
32
45
|
* Resolve the page-space origin used for page-anchored paragraph frames in a footer.
|
|
33
46
|
* Invalid or negative bottom margins behave like a zero margin.
|
|
@@ -18,7 +18,7 @@ export { shouldApplyJustify, calculateJustifySpacing, getFirstLineIndentOffset,
|
|
|
18
18
|
export { parseInsetClipPathForScale, formatInsetClipPathTransform, type InsetClipPathScale, } from './clip-path-inset.js';
|
|
19
19
|
export { SUBSCRIPT_SUPERSCRIPT_SCALE, normalizeBaselineShift, hasExplicitBaselineShift, isSuperscriptOrSubscript, usesDefaultScriptLayout, scaleFontSizeForVerticalText, resolveBaseFontSizeForVerticalText, type VerticalTextAlign, } from './vertical-text.js';
|
|
20
20
|
export { computeFragmentPmRange, computeLinePmRange, type LinePmRange } from './pm-range.js';
|
|
21
|
-
export { resolveAnchoredGraphicY, resolveAnchoredGraphicX, resolveFooterPageFrameOriginY, isPositionedParagraphFrame, isPagePositionedParagraphFrame, isAnchorHRelative, isAnchorVRelative, isAnchorAlignH, isAnchorAlignV, ANCHOR_H_RELATIVE_VALUES, ANCHOR_V_RELATIVE_VALUES, ANCHOR_H_ALIGN_VALUES, ANCHOR_V_ALIGN_VALUES, type ColumnLayoutForAnchor, type ResolveAnchoredGraphicYInput, type ResolveAnchoredGraphicXContext, type AnchorHRelative, type AnchorVRelative, type AnchorAlignH, type AnchorAlignV, } from './graphic-placement.js';
|
|
21
|
+
export { resolveAnchoredGraphicY, resolveAnchoredGraphicX, resolveFooterPageFrameOriginY, isPositionedParagraphFrame, isPagePositionedParagraphFrame, isPagePositionedFloatingTable, isAnchorHRelative, isAnchorVRelative, isAnchorAlignH, isAnchorAlignV, ANCHOR_H_RELATIVE_VALUES, ANCHOR_V_RELATIVE_VALUES, ANCHOR_H_ALIGN_VALUES, ANCHOR_V_ALIGN_VALUES, type ColumnLayoutForAnchor, type ResolveAnchoredGraphicYInput, type ResolveAnchoredGraphicXContext, type AnchorHRelative, type AnchorVRelative, type AnchorAlignH, type AnchorAlignV, } from './graphic-placement.js';
|
|
22
22
|
export { LAYOUT_BOUNDARY_SCHEMA, bodyStoryLocator, namedStoryLocator, computeLayoutFragmentId, buildLayoutSourceIdentity, buildLayoutSourceIdentityForFragment, } from './layout-identity.js';
|
|
23
23
|
export type { LayoutBlockRef, LayoutFragmentId, LayoutPartialRowIdentity, LayoutSourceIdentity, LayoutStoryKind, LayoutStoryLocator, } from './layout-identity.js';
|
|
24
24
|
export { LAYOUT_SEGMENT_GEOMETRY_SCHEMA } from './segment-geometry.js';
|
|
@@ -2604,6 +2604,8 @@ export type PartialRowInfo = {
|
|
|
2604
2604
|
export type TableFragment = {
|
|
2605
2605
|
kind: 'table';
|
|
2606
2606
|
blockId: BlockId;
|
|
2607
|
+
/** True when this fragment was emitted by floating-table placement. */
|
|
2608
|
+
isAnchored?: boolean;
|
|
2607
2609
|
/** Flow column that owns this fragment, distinct from visual x when overflow crosses margins. */
|
|
2608
2610
|
columnIndex?: number;
|
|
2609
2611
|
fromRow: number;
|
|
@@ -331,8 +331,9 @@ export declare function layoutDocumentRange(input: LayoutRangeInput): LayoutRang
|
|
|
331
331
|
* transformations and computing the actual height required by visible content.
|
|
332
332
|
*
|
|
333
333
|
* When `kind` and `constraints.pageHeight` are provided, page-relative and
|
|
334
|
-
* margin-relative anchored drawings
|
|
335
|
-
* measurement canvas to
|
|
334
|
+
* margin-relative anchored drawings and page-relative floating footer tables
|
|
335
|
+
* are post-normalized from the synthetic measurement canvas to
|
|
336
|
+
* header/footer-local coordinates.
|
|
336
337
|
*
|
|
337
338
|
* Returns separate measurement bounds (for pagination) and render bounds
|
|
338
339
|
* (for overlay shift). See the Coordinate Contract in the fix plan for details.
|
|
@@ -32,9 +32,9 @@ export type RegionConstraints = {
|
|
|
32
32
|
* offset so they do not inflate the reserved header height by carrying
|
|
33
33
|
* body-canvas coordinates.
|
|
34
34
|
*
|
|
35
|
-
* Page-anchored paragraph frames
|
|
36
|
-
* coordinates; other paragraphs, inline images,
|
|
37
|
-
* through unchanged.
|
|
35
|
+
* Page-anchored paragraph frames and floating footer tables are likewise
|
|
36
|
+
* converted from physical-page coordinates; other paragraphs, inline images,
|
|
37
|
+
* and absolute overlays pass through unchanged.
|
|
38
38
|
*/
|
|
39
39
|
export declare function normalizeFragmentsForRegion(pages: Array<{
|
|
40
40
|
number: number;
|
|
@@ -28,6 +28,8 @@ export interface NumberingProperties {
|
|
|
28
28
|
export interface AbstractNumberingDefinition {
|
|
29
29
|
/** Abstract numbering identifier. */
|
|
30
30
|
abstractNumId?: number;
|
|
31
|
+
/** Restart this numbering definition after each section break. */
|
|
32
|
+
restartNumberingAfterBreak?: boolean;
|
|
31
33
|
/** Numbering namespace identifier. */
|
|
32
34
|
nsid?: number;
|
|
33
35
|
/** Numbering template identifier. */
|
package/dist/public/ui-react.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CwCvqMOa.cjs");
|
|
3
3
|
let react = require("react");
|
|
4
4
|
//#region src/public/ui/react.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-DCjm-_Xo.es.js";
|
|
2
2
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
3
3
|
//#region src/public/ui/react.ts
|
|
4
4
|
/**
|
package/dist/public/ui.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-CwCvqMOa.cjs");
|
|
3
3
|
exports.BUILT_IN_COMMAND_IDS = require_create_super_doc_ui.BUILT_IN_COMMAND_IDS;
|
|
4
4
|
exports.createSuperDocUI = require_create_super_doc_ui.createSuperDocUI;
|
|
5
5
|
exports.shallowEqual = require_create_super_doc_ui.shallowEqual;
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-DCjm-_Xo.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|
package/dist/superdoc.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
|
4
4
|
const require_eventemitter3 = require("./chunks/eventemitter3-D38u8ta_.cjs");
|
|
5
5
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
6
6
|
const require_jszip = require("./chunks/jszip-RC64TPzL.cjs");
|
|
7
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
7
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-CwCvqMOa.cjs");
|
|
8
8
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-SDR04tiH.cjs");
|
|
9
9
|
const require_constants = require("./chunks/constants-DpXuDx_g.cjs");
|
|
10
10
|
let vue = require("vue");
|
|
@@ -43605,7 +43605,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
43605
43605
|
this.config.colors = shuffleArray(this.config.colors);
|
|
43606
43606
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
43607
43607
|
this.colorIndex = 0;
|
|
43608
|
-
this.version = "2.6.
|
|
43608
|
+
this.version = "2.6.1-next.2";
|
|
43609
43609
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
43610
43610
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
43611
43611
|
this.colors = this.config.colors ?? [];
|
package/dist/superdoc.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
|
|
|
3
3
|
import { t as import_eventemitter3 } from "./chunks/eventemitter3-CMOjDs74.es.js";
|
|
4
4
|
import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
|
|
5
5
|
import { a as init_dist$1, i as global, n as init_dist$2, o as Buffer, r as process$1, s as init_dist, t as require_jszip_min } from "./chunks/jszip-VxCFV9YS.es.js";
|
|
6
|
-
import { a as DOM_CLASS_NAMES, i as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-
|
|
6
|
+
import { a as DOM_CLASS_NAMES, i as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-DCjm-_Xo.es.js";
|
|
7
7
|
import { t as _plugin_vue_export_helper_default } from "./chunks/_plugin-vue_export-helper-BOaGB7Aw.es.js";
|
|
8
8
|
import { t as PDF_TO_CSS_UNITS } from "./chunks/constants-B6VBlmKp.es.js";
|
|
9
9
|
import * as Vue from "vue";
|
|
@@ -43538,7 +43538,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
43538
43538
|
this.config.colors = shuffleArray(this.config.colors);
|
|
43539
43539
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
43540
43540
|
this.colorIndex = 0;
|
|
43541
|
-
this.version = "2.6.
|
|
43541
|
+
this.version = "2.6.1-next.2";
|
|
43542
43542
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
43543
43543
|
this.superdocId = config.superdocId || v4();
|
|
43544
43544
|
this.colors = this.config.colors ?? [];
|