superdoc 2.22.1-next.2 → 2.23.0-next.10
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-MSiU8Kg0.cjs → create-super-doc-ui-CbiiPcgr.cjs} +5 -1
- package/dist/chunks/{create-super-doc-ui-DmGX1w-i.es.js → create-super-doc-ui-DHW9Toxn.es.js} +5 -1
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/capabilities/capabilities.d.ts +7 -0
- package/dist/document-api/src/index.d.ts +11 -3
- package/dist/document-api/src/insert/insert.d.ts +2 -1
- package/dist/document-api/src/types/clipboard.d.ts +25 -0
- package/dist/document-api/src/types/sd-contract.d.ts +1 -1
- package/dist/document-api/src/write/operation-cancellation.d.ts +54 -0
- package/dist/layout-engine/contracts/src/index.d.ts +2 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +2 -0
- package/dist/layout-engine/layout-engine/src/index.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +3 -1
- package/dist/layout-engine/painters/dom/src/table/border-utils.d.ts +1 -1
- package/dist/layout-engine/style-engine/src/normalize/index.d.ts +1 -1
- package/dist/layout-engine/style-engine/src/normalize/run-attrs.d.ts +12 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/shared/common/list-marker-utils.d.ts +1 -1
- package/dist/style.css +106 -114
- package/dist/style.layered.css +106 -114
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +1 -0
- package/dist/superdoc.cjs +95 -47
- package/dist/superdoc.es.js +95 -47
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +43 -42
- package/package.json +2 -2
|
@@ -5090,8 +5090,12 @@ function selectionBlockRange(selection) {
|
|
|
5090
5090
|
*/
|
|
5091
5091
|
function selectionBlockIds(selection) {
|
|
5092
5092
|
const ids = [];
|
|
5093
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5093
5094
|
const push = (id) => {
|
|
5094
|
-
if (typeof id === "string" && id.length > 0 && !
|
|
5095
|
+
if (typeof id === "string" && id.length > 0 && !seen.has(id)) {
|
|
5096
|
+
seen.add(id);
|
|
5097
|
+
ids.push(id);
|
|
5098
|
+
}
|
|
5095
5099
|
};
|
|
5096
5100
|
const target = selection.target;
|
|
5097
5101
|
const segments = target && Array.isArray(target.segments) ? target.segments : [];
|
package/dist/chunks/{create-super-doc-ui-DmGX1w-i.es.js → create-super-doc-ui-DHW9Toxn.es.js}
RENAMED
|
@@ -5089,8 +5089,12 @@ function selectionBlockRange(selection) {
|
|
|
5089
5089
|
*/
|
|
5090
5090
|
function selectionBlockIds(selection) {
|
|
5091
5091
|
const ids = [];
|
|
5092
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5092
5093
|
const push = (id) => {
|
|
5093
|
-
if (typeof id === "string" && id.length > 0 && !
|
|
5094
|
+
if (typeof id === "string" && id.length > 0 && !seen.has(id)) {
|
|
5095
|
+
seen.add(id);
|
|
5096
|
+
ids.push(id);
|
|
5097
|
+
}
|
|
5094
5098
|
};
|
|
5095
5099
|
const target = selection.target;
|
|
5096
5100
|
const segments = target && Array.isArray(target.segments) ? target.segments : [];
|
|
@@ -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.
|
|
22
|
+
superdocVersion: "2.23.0-next.10",
|
|
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.
|
|
21
|
+
superdocVersion: "2.23.0-next.10",
|
|
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
|
|
@@ -51,6 +51,13 @@ export type OperationCapabilities = Record<OperationId, OperationRuntimeCapabili
|
|
|
51
51
|
export interface PlanEngineCapabilities {
|
|
52
52
|
/** Step op codes the engine can execute (e.g., 'text.rewrite', 'format.apply'). */
|
|
53
53
|
supportedStepOps: readonly string[];
|
|
54
|
+
/** Proven targeting modes; operation-specific restrictions remain in unsupported cells. */
|
|
55
|
+
supportedTargets?: readonly string[];
|
|
56
|
+
/** Named unsupported combinations with stable, discoverable reasons. */
|
|
57
|
+
unsupported?: readonly {
|
|
58
|
+
cell: string;
|
|
59
|
+
reason: string;
|
|
60
|
+
}[];
|
|
54
61
|
/** Non-uniform style resolution strategies available for `onNonUniform`. */
|
|
55
62
|
supportedNonUniformStrategies: readonly string[];
|
|
56
63
|
/** Mark names that `setMarks` can override (e.g., 'bold', 'italic'). */
|
|
@@ -31,6 +31,7 @@ import { BlocksAdapter, BlocksApi } from './blocks/blocks.js';
|
|
|
31
31
|
import { TableLocator, TableMutationResult, TablesConvertFromTextInput, TablesMoveInput, TablesSplitInput, TablesConvertToTextInput, TablesSetLayoutInput, TablesInsertRowInput, TablesDeleteRowInput, TablesMoveRowInput, TablesSetRowHeightInput, TablesDistributeRowsInput, TablesSetRowOptionsInput, TablesInsertColumnInput, TablesDeleteColumnInput, TablesMoveColumnInput, TablesSetColumnWidthInput, TablesDistributeColumnsInput, TablesInsertCellInput, TablesDeleteCellInput, TablesMergeCellsInput, TablesUnmergeCellsInput, TablesSplitCellInput, TablesSetCellPropertiesInput, TablesSetCellTextInput, TablesSortInput, TablesSetAltTextInput, TablesSetStyleInput, TablesClearStyleInput, TablesSetStyleOptionInput, TablesSetBorderInput, TablesClearBorderInput, TablesApplyBorderPresetInput, TablesSetShadingInput, TablesClearShadingInput, TablesSetTablePaddingInput, TablesSetCellPaddingInput, TablesSetCellSpacingInput, TablesClearCellSpacingInput, TablesApplyStyleInput, TablesSetBordersInput, TablesSetTableOptionsInput, TablesApplyPresetInput, TablesGetInput, TablesGetOutput, TablesGetCellsInput, TablesGetCellsOutput, TablesGetPropertiesInput, TablesGetPropertiesOutput, TablesGetStylesInput, TablesGetStylesOutput, TablesSetDefaultStyleInput, TablesClearDefaultStyleInput } from './types/table-operations.types.js';
|
|
32
32
|
import { TrackChangesAdapter, TrackChangesApi } from './track-changes/track-changes.js';
|
|
33
33
|
import { MutationOptions, RichContentMutationOptions, WriteAdapter } from './write/write.js';
|
|
34
|
+
import { OperationCancellation } from './write/operation-cancellation.js';
|
|
34
35
|
import { SelectionMutationAdapter } from './selection-mutation.js';
|
|
35
36
|
import { CapabilitiesAdapter, DocumentApiCapabilities, OperationCapabilityResolveInput, OperationCapabilityResolveResult } from './capabilities/capabilities.js';
|
|
36
37
|
import { SDHtmlMarkdownSupportCheckInput, SDHtmlMarkdownSupportCheckResult } from './capabilities/html-markdown-support.js';
|
|
@@ -105,6 +106,8 @@ export type { GetHtmlAdapter, GetHtmlInput } from './get-html/get-html.js';
|
|
|
105
106
|
export type { InfoAdapter, InfoInput } from './info/info.js';
|
|
106
107
|
export type { ExtractAdapter, ExtractInput } from './extract/extract.js';
|
|
107
108
|
export type { WriteAdapter, WriteRequest, RichContentMutationOptions } from './write/write.js';
|
|
109
|
+
export type { OperationCancellation, OperationCancellationCode } from './write/operation-cancellation.js';
|
|
110
|
+
export { OperationCancellationError, assertOperationCanStart, indeterminateOperation, splitOperationCancellation, } from './write/operation-cancellation.js';
|
|
108
111
|
export type { FormatInlineAliasApi, FormatInlineAliasInput, FormatBoldInput, FormatItalicInput, FormatRangeInput, FormatUnderlineInput, FormatStrikethroughInput, StyleApplyInput, StyleApplyOptions, } from './format/format.js';
|
|
109
112
|
export type { InlineRunPatch, InlineRunPatchKey, InlinePropertyStorage, InlinePropertyType, InlinePropertyCarrier, InlinePropertyRegistryEntry, UnderlinePatch, ShadingPatch, BorderPatch, FitTextPatch, LangPatch, RFontsPatch, EastAsianLayoutPatch, StylisticSetPatch, } from './format/inline-run-patch.js';
|
|
110
113
|
export { INLINE_PROPERTY_REGISTRY, INLINE_PROPERTY_KEY_SET, INLINE_PROPERTY_BY_KEY, INLINE_PROPERTY_KEYS_BY_STORAGE, validateInlineRunPatch, buildInlineRunPatchSchema, } from './format/inline-run-patch.js';
|
|
@@ -251,7 +254,11 @@ export interface QueryApi {
|
|
|
251
254
|
}
|
|
252
255
|
export interface MutationsApi {
|
|
253
256
|
preview(input: MutationsPreviewInput): Promise<MutationsPreviewOutput>;
|
|
254
|
-
|
|
257
|
+
/**
|
|
258
|
+
* Apply an atomic plan. `options` is host-side cancellation and is not part
|
|
259
|
+
* of the plan payload.
|
|
260
|
+
*/
|
|
261
|
+
apply(input: MutationsApplyInput, options?: OperationCancellation): Promise<PlanReceipt>;
|
|
255
262
|
}
|
|
256
263
|
export interface RangesApi {
|
|
257
264
|
resolve(input: ResolveRangeInput): ResolveRangeOutput;
|
|
@@ -323,8 +330,9 @@ export interface DocumentApiSurface {
|
|
|
323
330
|
/**
|
|
324
331
|
* Extract all document content with stable IDs for RAG pipelines.
|
|
325
332
|
* Returns blocks with full text, comments, and tracked changes.
|
|
333
|
+
* `options` cancels or deadlines the browser call. It is not an extract filter.
|
|
326
334
|
*/
|
|
327
|
-
extract(input: ExtractInput): ExtractResult;
|
|
335
|
+
extract(input: ExtractInput, options?: OperationCancellation): ExtractResult;
|
|
328
336
|
/**
|
|
329
337
|
* Clear all document body content, leaving a single empty paragraph.
|
|
330
338
|
*/
|
|
@@ -337,7 +345,7 @@ export interface DocumentApiSurface {
|
|
|
337
345
|
* Insert content at a target location.
|
|
338
346
|
* If target is omitted, inserts at the end of the document.
|
|
339
347
|
*/
|
|
340
|
-
insert(input: InsertInput, options?: RichContentMutationOptions): SDMutationReceipt;
|
|
348
|
+
insert(input: InsertInput, options?: RichContentMutationOptions & OperationCancellation): SDMutationReceipt;
|
|
341
349
|
/**
|
|
342
350
|
* Replace text at a target range.
|
|
343
351
|
*/
|
|
@@ -4,6 +4,7 @@ import { SDInsertInput } from '../types/structural-input.js';
|
|
|
4
4
|
import { StoryLocator } from '../types/story.types.js';
|
|
5
5
|
import { BlockNodeAddress } from '../types/base.js';
|
|
6
6
|
import { Placement } from '../types/placement.js';
|
|
7
|
+
import { OperationCancellation } from '../write/operation-cancellation.js';
|
|
7
8
|
import { SelectionMutationAdapter } from '../selection-mutation.js';
|
|
8
9
|
/** Content format for the text insert operation payload. */
|
|
9
10
|
export type InsertContentType = 'text' | 'markdown' | 'html';
|
|
@@ -70,5 +71,5 @@ export declare function validateInsertInput(input: unknown): asserts input is In
|
|
|
70
71
|
* @param options - Optional mutation options (changeMode, dryRun, expectedRevision).
|
|
71
72
|
* @returns Receipt indicating success/failure and mutation metadata.
|
|
72
73
|
*/
|
|
73
|
-
export declare function executeInsert(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: InsertInput, options?: RichContentMutationOptions): SDMutationReceipt;
|
|
74
|
+
export declare function executeInsert(selectionAdapter: SelectionMutationAdapter, writeAdapter: WriteAdapter, input: InsertInput, options?: RichContentMutationOptions & OperationCancellation): SDMutationReceipt;
|
|
74
75
|
export {};
|
|
@@ -222,6 +222,31 @@ export interface SDPasteTableCell {
|
|
|
222
222
|
bottomPt?: number;
|
|
223
223
|
leftPt?: number;
|
|
224
224
|
};
|
|
225
|
+
/** Direct vertical cell alignment. */
|
|
226
|
+
verticalAlign?: 'top' | 'center' | 'bottom';
|
|
227
|
+
/** Direct per-edge cell borders in OOXML-compatible form. */
|
|
228
|
+
borders?: {
|
|
229
|
+
top?: {
|
|
230
|
+
lineStyle: string;
|
|
231
|
+
lineWeightPt: number;
|
|
232
|
+
color: string;
|
|
233
|
+
};
|
|
234
|
+
right?: {
|
|
235
|
+
lineStyle: string;
|
|
236
|
+
lineWeightPt: number;
|
|
237
|
+
color: string;
|
|
238
|
+
};
|
|
239
|
+
bottom?: {
|
|
240
|
+
lineStyle: string;
|
|
241
|
+
lineWeightPt: number;
|
|
242
|
+
color: string;
|
|
243
|
+
};
|
|
244
|
+
left?: {
|
|
245
|
+
lineStyle: string;
|
|
246
|
+
lineWeightPt: number;
|
|
247
|
+
color: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
225
250
|
sourcePath?: readonly (string | number)[];
|
|
226
251
|
}
|
|
227
252
|
export interface SDPasteTableRow {
|
|
@@ -2,7 +2,7 @@ import { BlockNodeAddress } from './base.js';
|
|
|
2
2
|
import { SelectionTarget, TextAddress } from './address.js';
|
|
3
3
|
import { ReceiptEffects, ReceiptSuccess, TextMutationRange } from './receipt.js';
|
|
4
4
|
import { BodyStoryLocator } from './story.types.js';
|
|
5
|
-
export type SDErrorCode = 'INVALID_PAYLOAD' | 'INVALID_TARGET' | 'TARGET_NOT_FOUND' | 'ADDRESS_STALE' | 'PRECONDITION_FAILED' | 'REVISION_MISMATCH' | 'CHECK_MISMATCH' | 'INVALID_CONTEXT' | 'INVALID_NESTING' | 'INVALID_PLACEMENT' | 'DUPLICATE_ID' | 'CAPABILITY_UNSUPPORTED' | 'RAW_MODE_REQUIRED' | 'PRESERVE_ONLY_VIOLATION' | 'NO_OP' | 'UNSUPPORTED_ENVIRONMENT' | 'INTERNAL_ERROR';
|
|
5
|
+
export type SDErrorCode = 'INVALID_PAYLOAD' | 'INVALID_TARGET' | 'TARGET_NOT_FOUND' | 'ADDRESS_STALE' | 'PERMISSION_DENIED' | 'PRECONDITION_FAILED' | 'REVISION_MISMATCH' | 'CHECK_MISMATCH' | 'INVALID_CONTEXT' | 'INVALID_NESTING' | 'INVALID_PLACEMENT' | 'DUPLICATE_ID' | 'CAPABILITY_UNSUPPORTED' | 'RAW_MODE_REQUIRED' | 'PRESERVE_ONLY_VIOLATION' | 'NO_OP' | 'UNSUPPORTED_ENVIRONMENT' | 'INTERNAL_ERROR';
|
|
6
6
|
export declare const SD_HTML_MARKDOWN_OUTCOMES: readonly ["preserved", "preserved-with-warnings", "simplified", "rejected", "no-op", "invalid-target", "outdated"];
|
|
7
7
|
export type SDHtmlMarkdownOutcome = (typeof SD_HTML_MARKDOWN_OUTCOMES)[number];
|
|
8
8
|
export interface SDError {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-side cancellation for browser `insert`, `mutations.apply`, and `extract`.
|
|
3
|
+
*
|
|
4
|
+
* `signal` and `timeoutMs` stay on the caller side. They are not serialized
|
|
5
|
+
* into the worker. An already-aborted signal or a `timeoutMs` of 0 finishes
|
|
6
|
+
* as {@link OperationCancellationError} `CANCELLED` before dispatch and does
|
|
7
|
+
* not change the document. Aborting after the worker has started the command
|
|
8
|
+
* does not roll it back: the call rejects as `INDETERMINATE` so the caller
|
|
9
|
+
* stops waiting, and must read the document before deciding whether to retry.
|
|
10
|
+
* Replacing the document or closing the editor also settles as `INDETERMINATE`.
|
|
11
|
+
*/
|
|
12
|
+
export interface OperationCancellation {
|
|
13
|
+
/** Abort before dispatch, or ask the host to cancel a command that has not started. */
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
/**
|
|
16
|
+
* Milliseconds from the call. `0` is already expired and does not dispatch.
|
|
17
|
+
* A positive deadline uses the same outcome rules as `signal`.
|
|
18
|
+
*/
|
|
19
|
+
timeoutMs?: number;
|
|
20
|
+
}
|
|
21
|
+
export type OperationCancellationCode = 'CANCELLED' | 'INDETERMINATE';
|
|
22
|
+
/**
|
|
23
|
+
* Machine-readable outcome for a cancellation that did not return the
|
|
24
|
+
* operation's normal receipt.
|
|
25
|
+
*
|
|
26
|
+
* `CANCELLED` means the command did not start and the document is unchanged.
|
|
27
|
+
* Retrying that same call is safe. `INDETERMINATE` means the call cannot
|
|
28
|
+
* prove whether a mutation committed. Read the current document before
|
|
29
|
+
* retrying. A resolved receipt means the work committed; do not retry it.
|
|
30
|
+
*/
|
|
31
|
+
export declare class OperationCancellationError extends Error {
|
|
32
|
+
readonly code: OperationCancellationCode;
|
|
33
|
+
readonly details?: {
|
|
34
|
+
cause?: string;
|
|
35
|
+
};
|
|
36
|
+
constructor(code: OperationCancellationCode, message: string, details?: {
|
|
37
|
+
cause?: string;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export declare function cancelledBeforeDispatch(): OperationCancellationError;
|
|
41
|
+
export declare function indeterminateOperation(cause: 'replaced' | 'disposed' | 'in-flight'): OperationCancellationError;
|
|
42
|
+
/**
|
|
43
|
+
* Reject a call that is already cancelled or whose deadline has already
|
|
44
|
+
* expired. Returns without effect when the caller did not ask for control.
|
|
45
|
+
*/
|
|
46
|
+
export declare function assertOperationCanStart(options?: OperationCancellation): void;
|
|
47
|
+
/**
|
|
48
|
+
* Separate host-only cancellation fields from a value that will be
|
|
49
|
+
* structured-cloned into the worker. `AbortSignal` cannot cross that boundary.
|
|
50
|
+
*/
|
|
51
|
+
export declare function splitOperationCancellation(value: unknown): {
|
|
52
|
+
cancellation?: OperationCancellation;
|
|
53
|
+
rest: unknown;
|
|
54
|
+
};
|
|
@@ -2254,6 +2254,8 @@ export type Line = {
|
|
|
2254
2254
|
lineHeight: number;
|
|
2255
2255
|
/** Maximum available width for this line (used during measurement). */
|
|
2256
2256
|
maxWidth?: number;
|
|
2257
|
+
/** First-line list prefix displacement imposed by a left float exclusion. */
|
|
2258
|
+
listMarkerOffsetX?: number;
|
|
2257
2259
|
/** Content width before justify compression (used for negative word-spacing calculation). */
|
|
2258
2260
|
naturalWidth?: number;
|
|
2259
2261
|
/** Number of spaces in the line (pre-computed for efficiency in justify calculations). */
|
|
@@ -568,6 +568,8 @@ declare function incrementalLayoutComplete(previousBlocks: FlowBlock[], _previou
|
|
|
568
568
|
fontCapabilities?: FontMeasureCapabilities;
|
|
569
569
|
}, warmStart?: {
|
|
570
570
|
footnoteReserveSeed?: FootnoteReserveSeed | null;
|
|
571
|
+
/** Per-open-document diagnostic lifetime, including cold relayouts. */
|
|
572
|
+
footnoteWarningOwner?: object;
|
|
571
573
|
/** Host proved the authoritative note projection bundle was retained exactly. */
|
|
572
574
|
noteMeasurePlaneRetainedExact?: true;
|
|
573
575
|
/** Host proved this seed is an exact, geometry-equivalent subset of the current note plane. */
|
|
@@ -167,6 +167,8 @@ export type LayoutOptions = {
|
|
|
167
167
|
startContext?: {
|
|
168
168
|
/** Physical page-number offset for emitted `Page.number` values. */
|
|
169
169
|
pageNumberOffset?: number;
|
|
170
|
+
/** The resumed first paragraph follows an omitted authored pageBreakBefore block. */
|
|
171
|
+
startsAfterPageBreakBefore?: boolean;
|
|
170
172
|
/** Display/effective page counter to stamp on the first emitted page. */
|
|
171
173
|
activePageCounter?: number;
|
|
172
174
|
/** Active section index at the page boundary. */
|
|
@@ -9,8 +9,9 @@ type PainterListTextStartParams = {
|
|
|
9
9
|
hangingIndentPx: number;
|
|
10
10
|
firstLineIndentPx: number;
|
|
11
11
|
markerTextWidthPx?: number;
|
|
12
|
+
markerOffsetX?: number;
|
|
12
13
|
};
|
|
13
|
-
export declare const resolvePainterListMarkerGeometry: ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx, }: PainterListTextStartParams) => ResolvedListMarkerGeometry | undefined;
|
|
14
|
+
export declare const resolvePainterListMarkerGeometry: ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx, markerOffsetX, }: PainterListTextStartParams) => ResolvedListMarkerGeometry | undefined;
|
|
14
15
|
export declare const resolvePainterListTextStartPx: ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx, }: PainterListTextStartParams) => number | undefined;
|
|
15
16
|
type MarkerRunStyle = {
|
|
16
17
|
fontFamily?: string | null;
|
|
@@ -31,6 +32,7 @@ export declare const renderLegacyListMarker: (params: {
|
|
|
31
32
|
markerLayout: MinimalMarker;
|
|
32
33
|
markerMeasure: ParagraphMeasure["marker"];
|
|
33
34
|
markerTextWidthPx?: number;
|
|
35
|
+
markerOffsetX?: number;
|
|
34
36
|
indentLeftPx: number;
|
|
35
37
|
hangingIndentPx: number;
|
|
36
38
|
firstLineIndentPx: number;
|
|
@@ -54,7 +54,7 @@ export declare const applyBorder: (element: HTMLElement, side: BorderSide, borde
|
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
56
|
export declare const applyCellBorders: (element: HTMLElement, borders?: CellBorders, useSvgOverlay?: boolean) => void;
|
|
57
|
-
/** Paints cell
|
|
57
|
+
/** Paints cell border patterns and fractional strokes that native CSS cannot represent. */
|
|
58
58
|
export declare const createCellBorderOverlay: (doc: Document, borders: CellBorders | undefined, geometry: {
|
|
59
59
|
left: string;
|
|
60
60
|
top: string;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* ProseMirror or v1 editor runtime.
|
|
8
8
|
*/
|
|
9
9
|
export { normalizeParagraphAttrsFromOoxml } from './paragraph-attrs.js';
|
|
10
|
-
export { normalizeRunAttrsFromOoxml, type NormalizeRunAttrsContext } from './run-attrs.js';
|
|
10
|
+
export { normalizeRunAttrsFromOoxml, splitEastAsianFontSegments, type NormalizeRunAttrsContext } from './run-attrs.js';
|
|
11
11
|
export type { TextRunStyleAttrs, ParagraphAttrs } from './types.js';
|
|
12
12
|
export { applyThemeTintShade, normalizeHexColor, resolveThemeColor } from './colors.js';
|
|
13
13
|
export { PX_PER_EIGHTH_POINT, PX_PER_POINT, PX_PER_TWIP, eighthPointsToPx, halfPointsToPx, twipsToPx, } from './units.js';
|
|
@@ -2,6 +2,8 @@ import { RunProperties } from '../ooxml/types.js';
|
|
|
2
2
|
import { WordThemeColorPalette, WordThemeFontScheme } from '../ooxml/word-style-model/parse-theme.js';
|
|
3
3
|
import { TextRunStyleAttrs } from './types.js';
|
|
4
4
|
export interface NormalizeRunAttrsContext {
|
|
5
|
+
/** Font track selected from the text segment, independently of run language. */
|
|
6
|
+
fontScript?: 'eastAsia';
|
|
5
7
|
/** Compiled theme color palette from the Word style model. */
|
|
6
8
|
themeColors?: WordThemeColorPalette;
|
|
7
9
|
/** Compiled theme font scheme. */
|
|
@@ -20,3 +22,13 @@ export interface NormalizeRunAttrsContext {
|
|
|
20
22
|
backgroundColor?: string;
|
|
21
23
|
}
|
|
22
24
|
export declare function normalizeRunAttrsFromOoxml(props: RunProperties | null | undefined, context?: NormalizeRunAttrsContext): TextRunStyleAttrs;
|
|
25
|
+
interface FontScriptSegment {
|
|
26
|
+
text: string;
|
|
27
|
+
fontScript?: 'eastAsia';
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Preserve Latin and East Asian font attribution across compatible text leaves.
|
|
31
|
+
* Iteration uses code points so supplementary Han and combining marks stay intact.
|
|
32
|
+
*/
|
|
33
|
+
export declare function splitEastAsianFontSegments(text: string, precedingFontScript?: 'eastAsia'): FontScriptSegment[];
|
|
34
|
+
export {};
|
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-CbiiPcgr.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
//#region src/public/ui/react.ts
|
|
@@ -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-DHW9Toxn.es.js";
|
|
2
2
|
import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
|
|
3
3
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
4
4
|
//#region src/public/ui/react.ts
|
package/dist/public/ui-vue.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-CbiiPcgr.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let superdoc_entry_vue = require("vue");
|
|
5
5
|
//#region src/public/ui/vue.ts
|
package/dist/public/ui-vue.es.js
CHANGED
|
@@ -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-DHW9Toxn.es.js";
|
|
2
2
|
import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
|
|
3
3
|
import { computed, inject, onScopeDispose, provide, shallowRef, toRaw, toValue, watch } from "vue";
|
|
4
4
|
//#region src/public/ui/vue.ts
|
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-CbiiPcgr.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 { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-DHW9Toxn.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|
|
@@ -145,7 +145,7 @@ export type ResolvedListMarkerGeometry = {
|
|
|
145
145
|
* @param measureMarkerText - Callback used when marker glyph width is not precomputed
|
|
146
146
|
* @returns Resolved list prefix geometry, or undefined when the paragraph has no marker
|
|
147
147
|
*/
|
|
148
|
-
export declare function resolveListMarkerGeometry(wordLayout: MinimalWordLayout | undefined, indentLeft: number, firstLine: number, hanging: number, measureMarkerText: MarkerTextMeasurer): ResolvedListMarkerGeometry | undefined;
|
|
148
|
+
export declare function resolveListMarkerGeometry(wordLayout: MinimalWordLayout | undefined, indentLeft: number, firstLine: number, hanging: number, measureMarkerText: MarkerTextMeasurer, markerOffsetX?: number): ResolvedListMarkerGeometry | undefined;
|
|
149
149
|
/**
|
|
150
150
|
* Convenience wrapper that returns only the text-start X coordinate from
|
|
151
151
|
* {@link resolveListMarkerGeometry}. Falls back to `wordLayout.textStartPx`
|