superdoc 2.24.0-next.8 → 2.24.0
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/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/authorities/authorities.types.d.ts +2 -0
- package/dist/document-api/src/bookmarks/bookmarks.types.d.ts +1 -0
- package/dist/document-api/src/captions/captions.types.d.ts +1 -0
- package/dist/document-api/src/citations/citations.types.d.ts +2 -0
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +1 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +22 -4
- package/dist/document-api/src/cross-refs/cross-refs.types.d.ts +1 -0
- package/dist/document-api/src/fields/fields.types.d.ts +1 -0
- package/dist/document-api/src/footnotes/footnotes.types.d.ts +2 -0
- package/dist/document-api/src/get/get.d.ts +2 -1
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +1 -0
- package/dist/document-api/src/images/images.types.d.ts +2 -0
- package/dist/document-api/src/index/index.types.d.ts +2 -0
- package/dist/document-api/src/index.d.ts +9 -6
- package/dist/document-api/src/inline-semantics/token-sets.d.ts +11 -0
- package/dist/document-api/src/lists/lists.types.d.ts +10 -0
- package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +3 -0
- package/dist/document-api/src/receipt-bridge.d.ts +1 -0
- package/dist/document-api/src/sections/sections.types.d.ts +4 -1
- package/dist/document-api/src/styles/apply.d.ts +5 -0
- package/dist/document-api/src/styles/catalog.d.ts +40 -19
- package/dist/document-api/src/styles/create.d.ts +160 -0
- package/dist/document-api/src/styles/index.d.ts +8 -4
- package/dist/document-api/src/styles/registry.d.ts +34 -2
- package/dist/document-api/src/styles/schema.d.ts +24 -5
- package/dist/document-api/src/styles/theme.d.ts +32 -0
- package/dist/document-api/src/styles/validation.d.ts +11 -2
- package/dist/document-api/src/templates/apply.d.ts +13 -15
- package/dist/document-api/src/toc/toc.types.d.ts +3 -0
- package/dist/document-api/src/types/blocks.types.d.ts +6 -1
- package/dist/document-api/src/types/create.types.d.ts +3 -1
- package/dist/document-api/src/types/fragment.d.ts +3 -0
- package/dist/document-api/src/types/mutation-plan.types.d.ts +4 -0
- package/dist/document-api/src/types/query-match.types.d.ts +43 -5
- package/dist/document-api/src/types/receipt.d.ts +8 -0
- package/dist/document-api/src/types/sd-contract.d.ts +2 -0
- package/dist/document-api/src/types/sd-props.d.ts +54 -14
- package/dist/document-api/src/types/sd-styles.d.ts +58 -3
- package/dist/document-api/src/types/table-operations.types.d.ts +2 -0
- package/dist/style.css +22 -22
- package/dist/style.layered.css +22 -22
- package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +2 -0
- package/dist/superdoc.cjs +11 -8
- package/dist/superdoc.es.js +11 -8
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +18 -18
- package/package.json +2 -2
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* SDM/1 property models: run, paragraph, table, list, image, drawing props.
|
|
3
|
-
*
|
|
4
|
-
* These define the direct formatting ("authored") property bags carried by
|
|
5
|
-
* style-bearing nodes. Resolved/provenance fields are separate concerns
|
|
6
|
-
* populated at read time by the style-engine.
|
|
7
|
-
*/
|
|
1
|
+
import { ST_HIGHLIGHT_VALUES } from '../inline-semantics/token-sets.js';
|
|
8
2
|
export type SDThemeFontRef = 'majorAscii' | 'majorHAnsi' | 'majorEastAsia' | 'majorBidi' | 'minorAscii' | 'minorHAnsi' | 'minorEastAsia' | 'minorBidi';
|
|
9
3
|
export interface SDRunFonts {
|
|
10
4
|
ascii?: string;
|
|
@@ -34,7 +28,7 @@ export type SDColorRef = {
|
|
|
34
28
|
} | {
|
|
35
29
|
model: 'auto';
|
|
36
30
|
};
|
|
37
|
-
export type SDHighlightColor =
|
|
31
|
+
export type SDHighlightColor = (typeof ST_HIGHLIGHT_VALUES)[number];
|
|
38
32
|
export type SDUnderlineStyle = 'none' | 'single' | 'words' | 'double' | 'thick' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashedHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dashDotHeavy' | 'dotDotDash' | 'dashDotDotHeavy' | 'wave' | 'wavyHeavy' | 'wavyDouble';
|
|
39
33
|
export interface SDUnderline {
|
|
40
34
|
style?: SDUnderlineStyle;
|
|
@@ -47,7 +41,9 @@ export interface SDShading {
|
|
|
47
41
|
}
|
|
48
42
|
export interface SDRunBorder {
|
|
49
43
|
style?: string;
|
|
44
|
+
/** Line width in points. */
|
|
50
45
|
width?: number;
|
|
46
|
+
/** Spacing from the content in points. */
|
|
51
47
|
space?: number;
|
|
52
48
|
color?: SDColorRef;
|
|
53
49
|
frame?: boolean;
|
|
@@ -186,10 +182,31 @@ export type SDTableWidth = {
|
|
|
186
182
|
} | {
|
|
187
183
|
kind: 'none';
|
|
188
184
|
};
|
|
185
|
+
/** Table border lines; `width` and `space` in points. */
|
|
186
|
+
export interface SDTableBorders {
|
|
187
|
+
top?: SDRunBorder;
|
|
188
|
+
right?: SDRunBorder;
|
|
189
|
+
bottom?: SDRunBorder;
|
|
190
|
+
left?: SDRunBorder;
|
|
191
|
+
start?: SDRunBorder;
|
|
192
|
+
end?: SDRunBorder;
|
|
193
|
+
insideH?: SDRunBorder;
|
|
194
|
+
insideV?: SDRunBorder;
|
|
195
|
+
}
|
|
196
|
+
/** Cell padding in points. */
|
|
197
|
+
export interface SDCellPadding {
|
|
198
|
+
top?: number;
|
|
199
|
+
right?: number;
|
|
200
|
+
bottom?: number;
|
|
201
|
+
left?: number;
|
|
202
|
+
start?: number;
|
|
203
|
+
end?: number;
|
|
204
|
+
}
|
|
189
205
|
export interface SDTableProps {
|
|
190
206
|
width?: SDTableWidth;
|
|
191
207
|
layout?: 'fixed' | 'autofit';
|
|
192
208
|
alignment?: 'left' | 'center' | 'right' | 'inside' | 'outside';
|
|
209
|
+
/** Normalized CSS-like edge borders retained for document and fragment compatibility. */
|
|
193
210
|
borders?: {
|
|
194
211
|
top?: string;
|
|
195
212
|
right?: string;
|
|
@@ -198,28 +215,51 @@ export interface SDTableProps {
|
|
|
198
215
|
insideH?: string;
|
|
199
216
|
insideV?: string;
|
|
200
217
|
};
|
|
218
|
+
/** Leading-edge indent in points. */
|
|
219
|
+
indent?: number;
|
|
220
|
+
/** Spacing between cells in points. */
|
|
221
|
+
cellSpacing?: number;
|
|
222
|
+
/** Default cell padding in points. */
|
|
223
|
+
cellPadding?: SDCellPadding;
|
|
224
|
+
shading?: SDShading;
|
|
225
|
+
/** Right-to-left visual column order (`w:bidiVisual`). */
|
|
226
|
+
bidiVisual?: boolean;
|
|
227
|
+
}
|
|
228
|
+
/** Table formatting authored on a table style. Borders are structured lines, not strings. */
|
|
229
|
+
export interface SDTableStyleProps extends Omit<SDTableProps, 'borders'> {
|
|
230
|
+
borders?: SDTableBorders;
|
|
201
231
|
}
|
|
202
232
|
export interface SDRowProps {
|
|
203
233
|
/** Minimum row height in points. */
|
|
204
234
|
minHeight?: number;
|
|
205
235
|
cantSplit?: boolean;
|
|
236
|
+
/** Repeat this row as a header row on each page (`w:tblHeader`). */
|
|
237
|
+
repeatHeader?: boolean;
|
|
238
|
+
}
|
|
239
|
+
/** Cell border lines; `width` and `space` in points. */
|
|
240
|
+
export interface SDCellBorders extends SDTableBorders {
|
|
241
|
+
/** Diagonal from top-left to bottom-right. */
|
|
242
|
+
tl2br?: SDRunBorder;
|
|
243
|
+
/** Diagonal from top-right to bottom-left. */
|
|
244
|
+
tr2bl?: SDRunBorder;
|
|
206
245
|
}
|
|
207
246
|
export interface SDCellProps {
|
|
208
247
|
verticalAlign?: 'top' | 'center' | 'bottom';
|
|
209
248
|
shading?: SDColorRef;
|
|
210
249
|
/** Cell padding in points. */
|
|
211
|
-
padding?:
|
|
212
|
-
|
|
213
|
-
right?: number;
|
|
214
|
-
bottom?: number;
|
|
215
|
-
left?: number;
|
|
216
|
-
};
|
|
250
|
+
padding?: SDCellPadding;
|
|
251
|
+
/** Normalized CSS-like edge borders, such as `'single 1pt #000000'` or `'none'`. */
|
|
217
252
|
borders?: {
|
|
218
253
|
top?: string;
|
|
219
254
|
right?: string;
|
|
220
255
|
bottom?: string;
|
|
221
256
|
left?: string;
|
|
222
257
|
};
|
|
258
|
+
noWrap?: boolean;
|
|
259
|
+
}
|
|
260
|
+
/** Cell formatting authored on a table style. Borders are structured lines, not strings. */
|
|
261
|
+
export interface SDTableStyleCellProps extends Omit<SDCellProps, 'borders'> {
|
|
262
|
+
borders?: SDCellBorders;
|
|
223
263
|
}
|
|
224
264
|
export interface SDImageProps {
|
|
225
265
|
alignment?: 'left' | 'center' | 'right';
|
|
@@ -1,20 +1,69 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SDParagraphProps, SDRowProps, SDRunProps, SDTableProps, SDTableStyleProps, SDTableStyleCellProps, SDThemeColorName } from './sd-props.js';
|
|
2
|
+
import { SDResolvedProvenance } from './sd-objects.js';
|
|
2
3
|
export interface SDStyleBase<TProps> {
|
|
3
4
|
name?: string;
|
|
4
5
|
basedOn?: string;
|
|
5
6
|
next?: string;
|
|
6
7
|
linked?: string;
|
|
8
|
+
/** Properties authored on this style, with theme references left raw. */
|
|
7
9
|
props?: TProps;
|
|
10
|
+
/** Cascaded values (basedOn chain, docDefaults, theme). Present with `includeResolved`. */
|
|
11
|
+
resolved?: Partial<TProps>;
|
|
12
|
+
/** Where each resolved value came from. Present with `includeProvenance`. */
|
|
13
|
+
provenance?: SDResolvedProvenance<TProps>;
|
|
14
|
+
}
|
|
15
|
+
export interface SDParagraphStyleDef extends SDStyleBase<SDParagraphProps> {
|
|
16
|
+
/** Run properties authored on this paragraph style (`w:rPr`). */
|
|
17
|
+
runProps?: SDRunProps;
|
|
18
|
+
/** Cascaded run values for text in this paragraph style. Present with `includeResolved`. */
|
|
19
|
+
resolvedRun?: Partial<SDRunProps>;
|
|
20
|
+
/** Where each resolved run value came from. Present with `includeProvenance`. */
|
|
21
|
+
runProvenance?: SDResolvedProvenance<SDRunProps>;
|
|
8
22
|
}
|
|
9
|
-
export type SDParagraphStyleDef = SDStyleBase<SDParagraphProps>;
|
|
10
23
|
export type SDCharacterStyleDef = SDStyleBase<SDRunProps>;
|
|
11
|
-
|
|
24
|
+
/** Table regions that a table style can format conditionally (`w:tblStylePr/@w:type`). */
|
|
25
|
+
export type SDTableStyleRegion = 'wholeTable' | 'firstRow' | 'lastRow' | 'firstCol' | 'lastCol' | 'band1Vert' | 'band2Vert' | 'band1Horz' | 'band2Horz' | 'neCell' | 'nwCell' | 'seCell' | 'swCell';
|
|
26
|
+
/** Formatting a table style applies to one region, as authored. */
|
|
27
|
+
export interface SDTableStyleFormatting {
|
|
28
|
+
table?: SDTableStyleProps;
|
|
29
|
+
row?: SDRowProps;
|
|
30
|
+
cell?: SDTableStyleCellProps;
|
|
31
|
+
paragraph?: SDParagraphProps;
|
|
32
|
+
run?: SDRunProps;
|
|
33
|
+
}
|
|
34
|
+
export interface SDTableStyleDef extends SDStyleBase<SDTableStyleProps> {
|
|
35
|
+
/** Row defaults (`w:trPr`). */
|
|
36
|
+
rowProps?: SDRowProps;
|
|
37
|
+
/** Cell defaults (`w:tcPr`). */
|
|
38
|
+
cellProps?: SDTableStyleCellProps;
|
|
39
|
+
/** Paragraph formatting for text in the table (`w:pPr`). */
|
|
40
|
+
paragraphProps?: SDParagraphProps;
|
|
41
|
+
/** Run formatting for text in the table (`w:rPr`). */
|
|
42
|
+
runProps?: SDRunProps;
|
|
43
|
+
/**
|
|
44
|
+
* Conditional formatting per table region (`w:tblStylePr`), as authored.
|
|
45
|
+
* `resolved` / `provenance` cover table-level props only; regions are not cascaded.
|
|
46
|
+
*/
|
|
47
|
+
conditional?: Partial<Record<SDTableStyleRegion, SDTableStyleFormatting>>;
|
|
48
|
+
/** Rows per horizontal band (`w:tblStyleRowBandSize`). */
|
|
49
|
+
rowBandSize?: number;
|
|
50
|
+
/** Columns per vertical band (`w:tblStyleColBandSize`). */
|
|
51
|
+
columnBandSize?: number;
|
|
52
|
+
}
|
|
12
53
|
export interface SDStyles {
|
|
13
54
|
paragraph?: Record<string, SDParagraphStyleDef>;
|
|
14
55
|
character?: Record<string, SDCharacterStyleDef>;
|
|
15
56
|
table?: Record<string, SDTableStyleDef>;
|
|
16
57
|
}
|
|
58
|
+
/** Theme color roles that `w:clrSchemeMapping` maps onto theme color slots. */
|
|
59
|
+
export type SDThemeColorRole = 'bg1' | 't1' | 'bg2' | 't2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hyperlink' | 'followedHyperlink';
|
|
17
60
|
export interface SDTheme {
|
|
61
|
+
/**
|
|
62
|
+
* `document` when read from the package theme part; `fallback` when the part is
|
|
63
|
+
* missing or unreadable and the default Office theme stands in (see diagnostics).
|
|
64
|
+
*/
|
|
65
|
+
source?: 'document' | 'fallback';
|
|
66
|
+
/** Six-digit hex colors without `#`, matching `SDColorRef` rgb values. */
|
|
18
67
|
colorScheme: Record<SDThemeColorName, string>;
|
|
19
68
|
fontScheme?: {
|
|
20
69
|
major?: {
|
|
@@ -28,9 +77,15 @@ export interface SDTheme {
|
|
|
28
77
|
complexScript?: string;
|
|
29
78
|
};
|
|
30
79
|
};
|
|
80
|
+
/** From `w:settings/w:clrSchemeMapping`; absent when the document declares none. */
|
|
81
|
+
colorSchemeMapping?: Partial<Record<SDThemeColorRole, SDThemeColorName>>;
|
|
31
82
|
}
|
|
32
83
|
export interface SDDocDefaults {
|
|
33
84
|
run?: SDRunProps;
|
|
34
85
|
paragraph?: SDParagraphProps;
|
|
35
86
|
table?: SDTableProps;
|
|
87
|
+
/** `run` with theme references resolved. Present with `includeResolved`. */
|
|
88
|
+
resolvedRun?: Partial<SDRunProps>;
|
|
89
|
+
/** `paragraph` with theme references resolved. Present with `includeResolved`. */
|
|
90
|
+
resolvedParagraph?: Partial<SDParagraphProps>;
|
|
36
91
|
}
|
|
@@ -133,6 +133,7 @@ export type TableCreateLocation = TableAnchorLocation
|
|
|
133
133
|
*/
|
|
134
134
|
export interface TableMutationSuccess {
|
|
135
135
|
success: true;
|
|
136
|
+
appliedChangeMode?: 'direct' | 'tracked';
|
|
136
137
|
table?: TableAddress;
|
|
137
138
|
trackedChangeRefs?: ReceiptInsert[];
|
|
138
139
|
}
|
|
@@ -154,6 +155,7 @@ export interface CreateTableInput {
|
|
|
154
155
|
}
|
|
155
156
|
export interface CreateTableSuccessResult {
|
|
156
157
|
success: true;
|
|
158
|
+
appliedChangeMode?: 'direct' | 'tracked';
|
|
157
159
|
table: TableAddress;
|
|
158
160
|
trackedChangeRefs?: ReceiptInsert[];
|
|
159
161
|
}
|
package/dist/style.css
CHANGED
|
@@ -2348,34 +2348,34 @@ img[data-v-c95b2073] {
|
|
|
2348
2348
|
pointer-events: auto;
|
|
2349
2349
|
}
|
|
2350
2350
|
|
|
2351
|
-
.superdoc[data-v-
|
|
2351
|
+
.superdoc[data-v-38ecd481] {
|
|
2352
2352
|
display: flex;
|
|
2353
2353
|
position: relative;
|
|
2354
2354
|
}
|
|
2355
|
-
.right-sidebar[data-v-
|
|
2355
|
+
.right-sidebar[data-v-38ecd481] {
|
|
2356
2356
|
min-width: 320px;
|
|
2357
2357
|
height: 100%;
|
|
2358
2358
|
}
|
|
2359
|
-
.floating-comments[data-v-
|
|
2359
|
+
.floating-comments[data-v-38ecd481] {
|
|
2360
2360
|
min-width: 300px;
|
|
2361
2361
|
width: 300px;
|
|
2362
2362
|
height: 100%;
|
|
2363
2363
|
overflow: visible;
|
|
2364
2364
|
}
|
|
2365
|
-
.superdoc__layers[data-v-
|
|
2365
|
+
.superdoc__layers[data-v-38ecd481] {
|
|
2366
2366
|
height: 100%;
|
|
2367
2367
|
position: relative;
|
|
2368
2368
|
box-sizing: border-box;
|
|
2369
2369
|
}
|
|
2370
|
-
.superdoc__document[data-v-
|
|
2370
|
+
.superdoc__document[data-v-38ecd481] {
|
|
2371
2371
|
width: 100%;
|
|
2372
2372
|
position: relative;
|
|
2373
2373
|
}
|
|
2374
|
-
.superdoc__sub-document[data-v-
|
|
2374
|
+
.superdoc__sub-document[data-v-38ecd481] {
|
|
2375
2375
|
width: 100%;
|
|
2376
2376
|
position: relative;
|
|
2377
2377
|
}
|
|
2378
|
-
.superdoc__selection-layer[data-v-
|
|
2378
|
+
.superdoc__selection-layer[data-v-38ecd481] {
|
|
2379
2379
|
position: absolute;
|
|
2380
2380
|
min-width: 100%;
|
|
2381
2381
|
min-height: 100%;
|
|
@@ -2386,13 +2386,13 @@ img[data-v-c95b2073] {
|
|
|
2386
2386
|
/* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
|
|
2387
2387
|
the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
|
|
2388
2388
|
clickable, and below the selection layer (z-index 10). */
|
|
2389
|
-
.superdoc__whiteboard-layer[data-v-
|
|
2389
|
+
.superdoc__whiteboard-layer[data-v-38ecd481] {
|
|
2390
2390
|
z-index: 4;
|
|
2391
2391
|
}
|
|
2392
|
-
.superdoc__temp-selection[data-v-
|
|
2392
|
+
.superdoc__temp-selection[data-v-38ecd481] {
|
|
2393
2393
|
position: absolute;
|
|
2394
2394
|
}
|
|
2395
|
-
.superdoc__right-sidebar[data-v-
|
|
2395
|
+
.superdoc__right-sidebar[data-v-38ecd481] {
|
|
2396
2396
|
width: 320px;
|
|
2397
2397
|
min-width: 320px;
|
|
2398
2398
|
padding: 0 10px;
|
|
@@ -2400,7 +2400,7 @@ img[data-v-c95b2073] {
|
|
|
2400
2400
|
position: relative;
|
|
2401
2401
|
z-index: 2;
|
|
2402
2402
|
}
|
|
2403
|
-
.superdoc__compact-comment-popover[data-v-
|
|
2403
|
+
.superdoc__compact-comment-popover[data-v-38ecd481] {
|
|
2404
2404
|
position: absolute;
|
|
2405
2405
|
top: 12px;
|
|
2406
2406
|
right: 12px;
|
|
@@ -2409,14 +2409,14 @@ img[data-v-c95b2073] {
|
|
|
2409
2409
|
}
|
|
2410
2410
|
|
|
2411
2411
|
/* Tools styles */
|
|
2412
|
-
.tools[data-v-
|
|
2412
|
+
.tools[data-v-38ecd481] {
|
|
2413
2413
|
position: absolute;
|
|
2414
2414
|
z-index: 3;
|
|
2415
2415
|
display: flex;
|
|
2416
2416
|
flex-direction: column;
|
|
2417
2417
|
gap: var(--sd-ui-tools-gap, 6px);
|
|
2418
2418
|
}
|
|
2419
|
-
.tools-item[data-v-
|
|
2419
|
+
.tools-item[data-v-38ecd481] {
|
|
2420
2420
|
display: flex;
|
|
2421
2421
|
align-items: center;
|
|
2422
2422
|
justify-content: center;
|
|
@@ -2427,10 +2427,10 @@ img[data-v-c95b2073] {
|
|
|
2427
2427
|
cursor: pointer;
|
|
2428
2428
|
position: relative;
|
|
2429
2429
|
}
|
|
2430
|
-
.tools-item i[data-v-
|
|
2430
|
+
.tools-item i[data-v-38ecd481] {
|
|
2431
2431
|
cursor: pointer;
|
|
2432
2432
|
}
|
|
2433
|
-
.superdoc__tools-icon[data-v-
|
|
2433
|
+
.superdoc__tools-icon[data-v-38ecd481] {
|
|
2434
2434
|
width: var(--sd-ui-tools-icon-size, 20px);
|
|
2435
2435
|
height: var(--sd-ui-tools-icon-size, 20px);
|
|
2436
2436
|
flex-shrink: 0;
|
|
@@ -2445,22 +2445,22 @@ img[data-v-c95b2073] {
|
|
|
2445
2445
|
|
|
2446
2446
|
/* 834px is iPad screen size in portrait orientation */
|
|
2447
2447
|
@media (max-width: 834px) {
|
|
2448
|
-
.superdoc .superdoc__layers[data-v-
|
|
2448
|
+
.superdoc .superdoc__layers[data-v-38ecd481] {
|
|
2449
2449
|
margin: 0;
|
|
2450
2450
|
border: 0 !important;
|
|
2451
2451
|
box-shadow: none;
|
|
2452
2452
|
}
|
|
2453
|
-
.superdoc__sub-document[data-v-
|
|
2453
|
+
.superdoc__sub-document[data-v-38ecd481] {
|
|
2454
2454
|
max-width: 100%;
|
|
2455
2455
|
}
|
|
2456
|
-
.superdoc__right-sidebar[data-v-
|
|
2456
|
+
.superdoc__right-sidebar[data-v-38ecd481] {
|
|
2457
2457
|
padding: 10px;
|
|
2458
2458
|
position: relative;
|
|
2459
2459
|
}
|
|
2460
2460
|
}
|
|
2461
2461
|
|
|
2462
2462
|
/* AI Writer styles */
|
|
2463
|
-
.ai-writer-container[data-v-
|
|
2463
|
+
.ai-writer-container[data-v-38ecd481] {
|
|
2464
2464
|
position: fixed;
|
|
2465
2465
|
z-index: 1000;
|
|
2466
2466
|
background: white;
|
|
@@ -2476,10 +2476,10 @@ img[data-v-c95b2073] {
|
|
|
2476
2476
|
transform: translateY(-50%);
|
|
2477
2477
|
z-index: 50;
|
|
2478
2478
|
} */
|
|
2479
|
-
.ai-tool > svg[data-v-
|
|
2479
|
+
.ai-tool > svg[data-v-38ecd481] {
|
|
2480
2480
|
fill: transparent;
|
|
2481
2481
|
}
|
|
2482
|
-
.ai-tool[data-v-
|
|
2482
|
+
.ai-tool[data-v-38ecd481]::before {
|
|
2483
2483
|
content: '';
|
|
2484
2484
|
position: absolute;
|
|
2485
2485
|
width: 20px;
|
|
@@ -2500,7 +2500,7 @@ img[data-v-c95b2073] {
|
|
|
2500
2500
|
filter: brightness(1.2);
|
|
2501
2501
|
transition: filter 0.2s ease;
|
|
2502
2502
|
}
|
|
2503
|
-
.ai-tool[data-v-
|
|
2503
|
+
.ai-tool[data-v-38ecd481]:hover::before {
|
|
2504
2504
|
filter: brightness(1.3);
|
|
2505
2505
|
}
|
|
2506
2506
|
|
package/dist/style.layered.css
CHANGED
|
@@ -2348,34 +2348,34 @@ img[data-v-c95b2073] {
|
|
|
2348
2348
|
pointer-events: auto;
|
|
2349
2349
|
}
|
|
2350
2350
|
|
|
2351
|
-
.superdoc[data-v-
|
|
2351
|
+
.superdoc[data-v-38ecd481] {
|
|
2352
2352
|
display: flex;
|
|
2353
2353
|
position: relative;
|
|
2354
2354
|
}
|
|
2355
|
-
.right-sidebar[data-v-
|
|
2355
|
+
.right-sidebar[data-v-38ecd481] {
|
|
2356
2356
|
min-width: 320px;
|
|
2357
2357
|
height: 100%;
|
|
2358
2358
|
}
|
|
2359
|
-
.floating-comments[data-v-
|
|
2359
|
+
.floating-comments[data-v-38ecd481] {
|
|
2360
2360
|
min-width: 300px;
|
|
2361
2361
|
width: 300px;
|
|
2362
2362
|
height: 100%;
|
|
2363
2363
|
overflow: visible;
|
|
2364
2364
|
}
|
|
2365
|
-
.superdoc__layers[data-v-
|
|
2365
|
+
.superdoc__layers[data-v-38ecd481] {
|
|
2366
2366
|
height: 100%;
|
|
2367
2367
|
position: relative;
|
|
2368
2368
|
box-sizing: border-box;
|
|
2369
2369
|
}
|
|
2370
|
-
.superdoc__document[data-v-
|
|
2370
|
+
.superdoc__document[data-v-38ecd481] {
|
|
2371
2371
|
width: 100%;
|
|
2372
2372
|
position: relative;
|
|
2373
2373
|
}
|
|
2374
|
-
.superdoc__sub-document[data-v-
|
|
2374
|
+
.superdoc__sub-document[data-v-38ecd481] {
|
|
2375
2375
|
width: 100%;
|
|
2376
2376
|
position: relative;
|
|
2377
2377
|
}
|
|
2378
|
-
.superdoc__selection-layer[data-v-
|
|
2378
|
+
.superdoc__selection-layer[data-v-38ecd481] {
|
|
2379
2379
|
position: absolute;
|
|
2380
2380
|
min-width: 100%;
|
|
2381
2381
|
min-height: 100%;
|
|
@@ -2386,13 +2386,13 @@ img[data-v-c95b2073] {
|
|
|
2386
2386
|
/* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
|
|
2387
2387
|
the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
|
|
2388
2388
|
clickable, and below the selection layer (z-index 10). */
|
|
2389
|
-
.superdoc__whiteboard-layer[data-v-
|
|
2389
|
+
.superdoc__whiteboard-layer[data-v-38ecd481] {
|
|
2390
2390
|
z-index: 4;
|
|
2391
2391
|
}
|
|
2392
|
-
.superdoc__temp-selection[data-v-
|
|
2392
|
+
.superdoc__temp-selection[data-v-38ecd481] {
|
|
2393
2393
|
position: absolute;
|
|
2394
2394
|
}
|
|
2395
|
-
.superdoc__right-sidebar[data-v-
|
|
2395
|
+
.superdoc__right-sidebar[data-v-38ecd481] {
|
|
2396
2396
|
width: 320px;
|
|
2397
2397
|
min-width: 320px;
|
|
2398
2398
|
padding: 0 10px;
|
|
@@ -2400,7 +2400,7 @@ img[data-v-c95b2073] {
|
|
|
2400
2400
|
position: relative;
|
|
2401
2401
|
z-index: 2;
|
|
2402
2402
|
}
|
|
2403
|
-
.superdoc__compact-comment-popover[data-v-
|
|
2403
|
+
.superdoc__compact-comment-popover[data-v-38ecd481] {
|
|
2404
2404
|
position: absolute;
|
|
2405
2405
|
top: 12px;
|
|
2406
2406
|
right: 12px;
|
|
@@ -2409,14 +2409,14 @@ img[data-v-c95b2073] {
|
|
|
2409
2409
|
}
|
|
2410
2410
|
|
|
2411
2411
|
/* Tools styles */
|
|
2412
|
-
.tools[data-v-
|
|
2412
|
+
.tools[data-v-38ecd481] {
|
|
2413
2413
|
position: absolute;
|
|
2414
2414
|
z-index: 3;
|
|
2415
2415
|
display: flex;
|
|
2416
2416
|
flex-direction: column;
|
|
2417
2417
|
gap: var(--sd-ui-tools-gap, 6px);
|
|
2418
2418
|
}
|
|
2419
|
-
.tools-item[data-v-
|
|
2419
|
+
.tools-item[data-v-38ecd481] {
|
|
2420
2420
|
display: flex;
|
|
2421
2421
|
align-items: center;
|
|
2422
2422
|
justify-content: center;
|
|
@@ -2427,10 +2427,10 @@ img[data-v-c95b2073] {
|
|
|
2427
2427
|
cursor: pointer;
|
|
2428
2428
|
position: relative;
|
|
2429
2429
|
}
|
|
2430
|
-
.tools-item i[data-v-
|
|
2430
|
+
.tools-item i[data-v-38ecd481] {
|
|
2431
2431
|
cursor: pointer;
|
|
2432
2432
|
}
|
|
2433
|
-
.superdoc__tools-icon[data-v-
|
|
2433
|
+
.superdoc__tools-icon[data-v-38ecd481] {
|
|
2434
2434
|
width: var(--sd-ui-tools-icon-size, 20px);
|
|
2435
2435
|
height: var(--sd-ui-tools-icon-size, 20px);
|
|
2436
2436
|
flex-shrink: 0;
|
|
@@ -2445,22 +2445,22 @@ img[data-v-c95b2073] {
|
|
|
2445
2445
|
|
|
2446
2446
|
/* 834px is iPad screen size in portrait orientation */
|
|
2447
2447
|
@media (max-width: 834px) {
|
|
2448
|
-
.superdoc .superdoc__layers[data-v-
|
|
2448
|
+
.superdoc .superdoc__layers[data-v-38ecd481] {
|
|
2449
2449
|
margin: 0;
|
|
2450
2450
|
border: 0 !important;
|
|
2451
2451
|
box-shadow: none;
|
|
2452
2452
|
}
|
|
2453
|
-
.superdoc__sub-document[data-v-
|
|
2453
|
+
.superdoc__sub-document[data-v-38ecd481] {
|
|
2454
2454
|
max-width: 100%;
|
|
2455
2455
|
}
|
|
2456
|
-
.superdoc__right-sidebar[data-v-
|
|
2456
|
+
.superdoc__right-sidebar[data-v-38ecd481] {
|
|
2457
2457
|
padding: 10px;
|
|
2458
2458
|
position: relative;
|
|
2459
2459
|
}
|
|
2460
2460
|
}
|
|
2461
2461
|
|
|
2462
2462
|
/* AI Writer styles */
|
|
2463
|
-
.ai-writer-container[data-v-
|
|
2463
|
+
.ai-writer-container[data-v-38ecd481] {
|
|
2464
2464
|
position: fixed;
|
|
2465
2465
|
z-index: 1000;
|
|
2466
2466
|
background: white;
|
|
@@ -2476,10 +2476,10 @@ img[data-v-c95b2073] {
|
|
|
2476
2476
|
transform: translateY(-50%);
|
|
2477
2477
|
z-index: 50;
|
|
2478
2478
|
} */
|
|
2479
|
-
.ai-tool > svg[data-v-
|
|
2479
|
+
.ai-tool > svg[data-v-38ecd481] {
|
|
2480
2480
|
fill: transparent;
|
|
2481
2481
|
}
|
|
2482
|
-
.ai-tool[data-v-
|
|
2482
|
+
.ai-tool[data-v-38ecd481]::before {
|
|
2483
2483
|
content: '';
|
|
2484
2484
|
position: absolute;
|
|
2485
2485
|
width: 20px;
|
|
@@ -2500,7 +2500,7 @@ img[data-v-c95b2073] {
|
|
|
2500
2500
|
filter: brightness(1.2);
|
|
2501
2501
|
transition: filter 0.2s ease;
|
|
2502
2502
|
}
|
|
2503
|
-
.ai-tool[data-v-
|
|
2503
|
+
.ai-tool[data-v-38ecd481]:hover::before {
|
|
2504
2504
|
filter: brightness(1.3);
|
|
2505
2505
|
}
|
|
2506
2506
|
|
|
@@ -45,6 +45,8 @@ export interface CreateV2SessionShortcutRoutesDeps {
|
|
|
45
45
|
resolveToolbarElement: () => HTMLElement | null | undefined;
|
|
46
46
|
/** Resolve the live public Document API facade, or null when unavailable. */
|
|
47
47
|
getDocumentApi: () => ReferenceDocumentApi | null | undefined;
|
|
48
|
+
/** Scope each first-party mutation after its asynchronous list has resolved. */
|
|
49
|
+
runReferenceMutation?: (memberPath: 'toc.update' | 'fields.rebuild' | 'index.rebuild', input: unknown) => unknown;
|
|
48
50
|
/**
|
|
49
51
|
* The built-in page-number command. When present, the PAGE shortcut runs it,
|
|
50
52
|
* so the shortcut and the toolbar control insert and place the caret the same way.
|
package/dist/superdoc.cjs
CHANGED
|
@@ -304,7 +304,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
304
304
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
305
305
|
function getSuperdocVersion() {
|
|
306
306
|
try {
|
|
307
|
-
return "2.24.0
|
|
307
|
+
return "2.24.0";
|
|
308
308
|
} catch {
|
|
309
309
|
return "unknown";
|
|
310
310
|
}
|
|
@@ -21117,9 +21117,10 @@ function createV2SessionShortcutRoutes(deps) {
|
|
|
21117
21117
|
handled: false,
|
|
21118
21118
|
reason: "document-api-unavailable"
|
|
21119
21119
|
};
|
|
21120
|
-
|
|
21121
|
-
ran = runListThenApply(doc.
|
|
21122
|
-
ran = runListThenApply(doc.
|
|
21120
|
+
const apply = (memberPath, mutation) => isFn(mutation) ? (input) => deps.runReferenceMutation ? deps.runReferenceMutation(memberPath, input) : mutation(input) : void 0;
|
|
21121
|
+
let ran = runListThenApply(doc.toc?.list, apply("toc.update", doc.toc?.update));
|
|
21122
|
+
ran = runListThenApply(doc.fields?.list, apply("fields.rebuild", doc.fields?.rebuild)) || ran;
|
|
21123
|
+
ran = runListThenApply(doc.index?.list, apply("index.rebuild", doc.index?.rebuild)) || ran;
|
|
21123
21124
|
return ran ? true : {
|
|
21124
21125
|
handled: false,
|
|
21125
21126
|
reason: "field-update-workflow-unavailable"
|
|
@@ -22488,7 +22489,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22488
22489
|
console.warn("[SuperDoc] v2 session-shortcut unbind failed", err);
|
|
22489
22490
|
}
|
|
22490
22491
|
};
|
|
22491
|
-
const installV2SessionShortcutBinding = ({ documentId, bindSessionShortcuts, documentApi }) => {
|
|
22492
|
+
const installV2SessionShortcutBinding = ({ documentId, bindSessionShortcuts, documentApi, firstPartyCommandMutation }) => {
|
|
22492
22493
|
if (!documentId) return;
|
|
22493
22494
|
clearV2SessionShortcutBinding(documentId);
|
|
22494
22495
|
if (typeof bindSessionShortcuts !== "function") return;
|
|
@@ -22496,6 +22497,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22496
22497
|
routes: createV2SessionShortcutRoutes({
|
|
22497
22498
|
resolveToolbarElement: () => proxy.$superdoc?.toolbar?.toolbarContainer ?? null,
|
|
22498
22499
|
getDocumentApi: () => documentApi ?? null,
|
|
22500
|
+
...firstPartyCommandMutation ? { runReferenceMutation: (memberPath, input) => firstPartyCommandMutation.run(memberPath, [input]) } : {},
|
|
22499
22501
|
pageNumberCommand: {
|
|
22500
22502
|
isEnabled: () => getSuperDocUI()?.commands.get("page-number-insert").getState().enabled === true,
|
|
22501
22503
|
execute: () => {
|
|
@@ -23002,7 +23004,8 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23002
23004
|
installV2SessionShortcutBinding({
|
|
23003
23005
|
documentId,
|
|
23004
23006
|
bindSessionShortcuts,
|
|
23005
|
-
documentApi
|
|
23007
|
+
documentApi,
|
|
23008
|
+
firstPartyCommandMutation
|
|
23006
23009
|
});
|
|
23007
23010
|
if (collaborationProvider && resolveDocumentV2Collaboration(getDocument(documentId)).state === "valid") onEditorCollaborationReady({ editor: facade });
|
|
23008
23011
|
if (pageMetrics && pageLayout) syncV2RulerActiveEditor();
|
|
@@ -24817,7 +24820,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24817
24820
|
], 38);
|
|
24818
24821
|
};
|
|
24819
24822
|
}
|
|
24820
|
-
}, [["__scopeId", "data-v-
|
|
24823
|
+
}, [["__scopeId", "data-v-38ecd481"]]);
|
|
24821
24824
|
//#endregion
|
|
24822
24825
|
//#region src/core/create-app.js
|
|
24823
24826
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -46621,7 +46624,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46621
46624
|
}
|
|
46622
46625
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46623
46626
|
this.colorIndex = 0;
|
|
46624
|
-
this.version = "2.24.0
|
|
46627
|
+
this.version = "2.24.0";
|
|
46625
46628
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46626
46629
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
46627
46630
|
this.colors = this.config.colors ?? [];
|
package/dist/superdoc.es.js
CHANGED
|
@@ -302,7 +302,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
302
302
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
303
303
|
function getSuperdocVersion() {
|
|
304
304
|
try {
|
|
305
|
-
return "2.24.0
|
|
305
|
+
return "2.24.0";
|
|
306
306
|
} catch {
|
|
307
307
|
return "unknown";
|
|
308
308
|
}
|
|
@@ -21084,9 +21084,10 @@ function createV2SessionShortcutRoutes(deps) {
|
|
|
21084
21084
|
handled: false,
|
|
21085
21085
|
reason: "document-api-unavailable"
|
|
21086
21086
|
};
|
|
21087
|
-
|
|
21088
|
-
ran = runListThenApply(doc.
|
|
21089
|
-
ran = runListThenApply(doc.
|
|
21087
|
+
const apply = (memberPath, mutation) => isFn(mutation) ? (input) => deps.runReferenceMutation ? deps.runReferenceMutation(memberPath, input) : mutation(input) : void 0;
|
|
21088
|
+
let ran = runListThenApply(doc.toc?.list, apply("toc.update", doc.toc?.update));
|
|
21089
|
+
ran = runListThenApply(doc.fields?.list, apply("fields.rebuild", doc.fields?.rebuild)) || ran;
|
|
21090
|
+
ran = runListThenApply(doc.index?.list, apply("index.rebuild", doc.index?.rebuild)) || ran;
|
|
21090
21091
|
return ran ? true : {
|
|
21091
21092
|
handled: false,
|
|
21092
21093
|
reason: "field-update-workflow-unavailable"
|
|
@@ -22447,7 +22448,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
22447
22448
|
console.warn("[SuperDoc] v2 session-shortcut unbind failed", err);
|
|
22448
22449
|
}
|
|
22449
22450
|
};
|
|
22450
|
-
const installV2SessionShortcutBinding = ({ documentId, bindSessionShortcuts, documentApi }) => {
|
|
22451
|
+
const installV2SessionShortcutBinding = ({ documentId, bindSessionShortcuts, documentApi, firstPartyCommandMutation }) => {
|
|
22451
22452
|
if (!documentId) return;
|
|
22452
22453
|
clearV2SessionShortcutBinding(documentId);
|
|
22453
22454
|
if (typeof bindSessionShortcuts !== "function") return;
|
|
@@ -22455,6 +22456,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
22455
22456
|
routes: createV2SessionShortcutRoutes({
|
|
22456
22457
|
resolveToolbarElement: () => proxy.$superdoc?.toolbar?.toolbarContainer ?? null,
|
|
22457
22458
|
getDocumentApi: () => documentApi ?? null,
|
|
22459
|
+
...firstPartyCommandMutation ? { runReferenceMutation: (memberPath, input) => firstPartyCommandMutation.run(memberPath, [input]) } : {},
|
|
22458
22460
|
pageNumberCommand: {
|
|
22459
22461
|
isEnabled: () => getSuperDocUI()?.commands.get("page-number-insert").getState().enabled === true,
|
|
22460
22462
|
execute: () => {
|
|
@@ -22961,7 +22963,8 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
22961
22963
|
installV2SessionShortcutBinding({
|
|
22962
22964
|
documentId,
|
|
22963
22965
|
bindSessionShortcuts,
|
|
22964
|
-
documentApi
|
|
22966
|
+
documentApi,
|
|
22967
|
+
firstPartyCommandMutation
|
|
22965
22968
|
});
|
|
22966
22969
|
if (collaborationProvider && resolveDocumentV2Collaboration(getDocument(documentId)).state === "valid") onEditorCollaborationReady({ editor: facade });
|
|
22967
22970
|
if (pageMetrics && pageLayout) syncV2RulerActiveEditor();
|
|
@@ -24776,7 +24779,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
24776
24779
|
], 38);
|
|
24777
24780
|
};
|
|
24778
24781
|
}
|
|
24779
|
-
}, [["__scopeId", "data-v-
|
|
24782
|
+
}, [["__scopeId", "data-v-38ecd481"]]);
|
|
24780
24783
|
//#endregion
|
|
24781
24784
|
//#region src/core/create-app.js
|
|
24782
24785
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -46550,7 +46553,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46550
46553
|
}
|
|
46551
46554
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46552
46555
|
this.colorIndex = 0;
|
|
46553
|
-
this.version = "2.24.0
|
|
46556
|
+
this.version = "2.24.0";
|
|
46554
46557
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46555
46558
|
this.superdocId = config.superdocId || v4();
|
|
46556
46559
|
this.colors = this.config.colors ?? [];
|