@superdoc/mcp 1.0.0-next.10 → 1.0.0-next.12
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/index.js +1002 -76
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -30516,6 +30516,7 @@ var init_contract = __esm(() => {
|
|
|
30516
30516
|
enum: [
|
|
30517
30517
|
"paragraph",
|
|
30518
30518
|
"heading",
|
|
30519
|
+
"listItem",
|
|
30519
30520
|
"table",
|
|
30520
30521
|
"tableOfContents",
|
|
30521
30522
|
"sdt",
|
|
@@ -47271,6 +47272,9 @@ var init_contract = __esm(() => {
|
|
|
47271
47272
|
{
|
|
47272
47273
|
const: "heading"
|
|
47273
47274
|
},
|
|
47275
|
+
{
|
|
47276
|
+
const: "listItem"
|
|
47277
|
+
},
|
|
47274
47278
|
{
|
|
47275
47279
|
const: "table"
|
|
47276
47280
|
},
|
|
@@ -47706,6 +47710,9 @@ var init_contract = __esm(() => {
|
|
|
47706
47710
|
{
|
|
47707
47711
|
const: "heading"
|
|
47708
47712
|
},
|
|
47713
|
+
{
|
|
47714
|
+
const: "listItem"
|
|
47715
|
+
},
|
|
47709
47716
|
{
|
|
47710
47717
|
const: "table"
|
|
47711
47718
|
},
|
|
@@ -48835,6 +48842,9 @@ var init_contract = __esm(() => {
|
|
|
48835
48842
|
{
|
|
48836
48843
|
const: "heading"
|
|
48837
48844
|
},
|
|
48845
|
+
{
|
|
48846
|
+
const: "listItem"
|
|
48847
|
+
},
|
|
48838
48848
|
{
|
|
48839
48849
|
const: "table"
|
|
48840
48850
|
},
|
|
@@ -49270,6 +49280,9 @@ var init_contract = __esm(() => {
|
|
|
49270
49280
|
{
|
|
49271
49281
|
const: "heading"
|
|
49272
49282
|
},
|
|
49283
|
+
{
|
|
49284
|
+
const: "listItem"
|
|
49285
|
+
},
|
|
49273
49286
|
{
|
|
49274
49287
|
const: "table"
|
|
49275
49288
|
},
|
|
@@ -50411,6 +50424,9 @@ var init_contract = __esm(() => {
|
|
|
50411
50424
|
{
|
|
50412
50425
|
const: "heading"
|
|
50413
50426
|
},
|
|
50427
|
+
{
|
|
50428
|
+
const: "listItem"
|
|
50429
|
+
},
|
|
50414
50430
|
{
|
|
50415
50431
|
const: "table"
|
|
50416
50432
|
},
|
|
@@ -50846,6 +50862,9 @@ var init_contract = __esm(() => {
|
|
|
50846
50862
|
{
|
|
50847
50863
|
const: "heading"
|
|
50848
50864
|
},
|
|
50865
|
+
{
|
|
50866
|
+
const: "listItem"
|
|
50867
|
+
},
|
|
50849
50868
|
{
|
|
50850
50869
|
const: "table"
|
|
50851
50870
|
},
|
|
@@ -51996,6 +52015,9 @@ var init_contract = __esm(() => {
|
|
|
51996
52015
|
{
|
|
51997
52016
|
const: "heading"
|
|
51998
52017
|
},
|
|
52018
|
+
{
|
|
52019
|
+
const: "listItem"
|
|
52020
|
+
},
|
|
51999
52021
|
{
|
|
52000
52022
|
const: "table"
|
|
52001
52023
|
},
|
|
@@ -52431,6 +52453,9 @@ var init_contract = __esm(() => {
|
|
|
52431
52453
|
{
|
|
52432
52454
|
const: "heading"
|
|
52433
52455
|
},
|
|
52456
|
+
{
|
|
52457
|
+
const: "listItem"
|
|
52458
|
+
},
|
|
52434
52459
|
{
|
|
52435
52460
|
const: "table"
|
|
52436
52461
|
},
|
|
@@ -55193,6 +55218,9 @@ var init_contract = __esm(() => {
|
|
|
55193
55218
|
{
|
|
55194
55219
|
const: "heading"
|
|
55195
55220
|
},
|
|
55221
|
+
{
|
|
55222
|
+
const: "listItem"
|
|
55223
|
+
},
|
|
55196
55224
|
{
|
|
55197
55225
|
const: "table"
|
|
55198
55226
|
},
|
|
@@ -55628,6 +55656,9 @@ var init_contract = __esm(() => {
|
|
|
55628
55656
|
{
|
|
55629
55657
|
const: "heading"
|
|
55630
55658
|
},
|
|
55659
|
+
{
|
|
55660
|
+
const: "listItem"
|
|
55661
|
+
},
|
|
55631
55662
|
{
|
|
55632
55663
|
const: "table"
|
|
55633
55664
|
},
|
|
@@ -56261,6 +56292,9 @@ var init_contract = __esm(() => {
|
|
|
56261
56292
|
{
|
|
56262
56293
|
const: "heading"
|
|
56263
56294
|
},
|
|
56295
|
+
{
|
|
56296
|
+
const: "listItem"
|
|
56297
|
+
},
|
|
56264
56298
|
{
|
|
56265
56299
|
const: "table"
|
|
56266
56300
|
},
|
|
@@ -56696,6 +56730,9 @@ var init_contract = __esm(() => {
|
|
|
56696
56730
|
{
|
|
56697
56731
|
const: "heading"
|
|
56698
56732
|
},
|
|
56733
|
+
{
|
|
56734
|
+
const: "listItem"
|
|
56735
|
+
},
|
|
56699
56736
|
{
|
|
56700
56737
|
const: "table"
|
|
56701
56738
|
},
|
|
@@ -59802,6 +59839,9 @@ var init_contract = __esm(() => {
|
|
|
59802
59839
|
{
|
|
59803
59840
|
const: "heading"
|
|
59804
59841
|
},
|
|
59842
|
+
{
|
|
59843
|
+
const: "listItem"
|
|
59844
|
+
},
|
|
59805
59845
|
{
|
|
59806
59846
|
const: "table"
|
|
59807
59847
|
},
|
|
@@ -60237,6 +60277,9 @@ var init_contract = __esm(() => {
|
|
|
60237
60277
|
{
|
|
60238
60278
|
const: "heading"
|
|
60239
60279
|
},
|
|
60280
|
+
{
|
|
60281
|
+
const: "listItem"
|
|
60282
|
+
},
|
|
60240
60283
|
{
|
|
60241
60284
|
const: "table"
|
|
60242
60285
|
},
|
|
@@ -61107,6 +61150,9 @@ var init_contract = __esm(() => {
|
|
|
61107
61150
|
{
|
|
61108
61151
|
const: "heading"
|
|
61109
61152
|
},
|
|
61153
|
+
{
|
|
61154
|
+
const: "listItem"
|
|
61155
|
+
},
|
|
61110
61156
|
{
|
|
61111
61157
|
const: "table"
|
|
61112
61158
|
},
|
|
@@ -61542,6 +61588,9 @@ var init_contract = __esm(() => {
|
|
|
61542
61588
|
{
|
|
61543
61589
|
const: "heading"
|
|
61544
61590
|
},
|
|
61591
|
+
{
|
|
61592
|
+
const: "listItem"
|
|
61593
|
+
},
|
|
61545
61594
|
{
|
|
61546
61595
|
const: "table"
|
|
61547
61596
|
},
|
|
@@ -64215,6 +64264,9 @@ var init_contract = __esm(() => {
|
|
|
64215
64264
|
{
|
|
64216
64265
|
const: "heading"
|
|
64217
64266
|
},
|
|
64267
|
+
{
|
|
64268
|
+
const: "listItem"
|
|
64269
|
+
},
|
|
64218
64270
|
{
|
|
64219
64271
|
const: "table"
|
|
64220
64272
|
},
|
|
@@ -64650,6 +64702,9 @@ var init_contract = __esm(() => {
|
|
|
64650
64702
|
{
|
|
64651
64703
|
const: "heading"
|
|
64652
64704
|
},
|
|
64705
|
+
{
|
|
64706
|
+
const: "listItem"
|
|
64707
|
+
},
|
|
64653
64708
|
{
|
|
64654
64709
|
const: "table"
|
|
64655
64710
|
},
|
|
@@ -65728,6 +65783,9 @@ var init_contract = __esm(() => {
|
|
|
65728
65783
|
{
|
|
65729
65784
|
const: "heading"
|
|
65730
65785
|
},
|
|
65786
|
+
{
|
|
65787
|
+
const: "listItem"
|
|
65788
|
+
},
|
|
65731
65789
|
{
|
|
65732
65790
|
const: "table"
|
|
65733
65791
|
},
|
|
@@ -66163,6 +66221,9 @@ var init_contract = __esm(() => {
|
|
|
66163
66221
|
{
|
|
66164
66222
|
const: "heading"
|
|
66165
66223
|
},
|
|
66224
|
+
{
|
|
66225
|
+
const: "listItem"
|
|
66226
|
+
},
|
|
66166
66227
|
{
|
|
66167
66228
|
const: "table"
|
|
66168
66229
|
},
|
|
@@ -73367,6 +73428,9 @@ var init_contract = __esm(() => {
|
|
|
73367
73428
|
{
|
|
73368
73429
|
const: "heading"
|
|
73369
73430
|
},
|
|
73431
|
+
{
|
|
73432
|
+
const: "listItem"
|
|
73433
|
+
},
|
|
73370
73434
|
{
|
|
73371
73435
|
const: "table"
|
|
73372
73436
|
},
|
|
@@ -73802,6 +73866,9 @@ var init_contract = __esm(() => {
|
|
|
73802
73866
|
{
|
|
73803
73867
|
const: "heading"
|
|
73804
73868
|
},
|
|
73869
|
+
{
|
|
73870
|
+
const: "listItem"
|
|
73871
|
+
},
|
|
73805
73872
|
{
|
|
73806
73873
|
const: "table"
|
|
73807
73874
|
},
|
|
@@ -77252,6 +77319,9 @@ var init_contract = __esm(() => {
|
|
|
77252
77319
|
{
|
|
77253
77320
|
const: "heading"
|
|
77254
77321
|
},
|
|
77322
|
+
{
|
|
77323
|
+
const: "listItem"
|
|
77324
|
+
},
|
|
77255
77325
|
{
|
|
77256
77326
|
const: "table"
|
|
77257
77327
|
},
|
|
@@ -77687,6 +77757,9 @@ var init_contract = __esm(() => {
|
|
|
77687
77757
|
{
|
|
77688
77758
|
const: "heading"
|
|
77689
77759
|
},
|
|
77760
|
+
{
|
|
77761
|
+
const: "listItem"
|
|
77762
|
+
},
|
|
77690
77763
|
{
|
|
77691
77764
|
const: "table"
|
|
77692
77765
|
},
|
|
@@ -78583,6 +78656,9 @@ var init_contract = __esm(() => {
|
|
|
78583
78656
|
{
|
|
78584
78657
|
const: "heading"
|
|
78585
78658
|
},
|
|
78659
|
+
{
|
|
78660
|
+
const: "listItem"
|
|
78661
|
+
},
|
|
78586
78662
|
{
|
|
78587
78663
|
const: "table"
|
|
78588
78664
|
},
|
|
@@ -79018,6 +79094,9 @@ var init_contract = __esm(() => {
|
|
|
79018
79094
|
{
|
|
79019
79095
|
const: "heading"
|
|
79020
79096
|
},
|
|
79097
|
+
{
|
|
79098
|
+
const: "listItem"
|
|
79099
|
+
},
|
|
79021
79100
|
{
|
|
79022
79101
|
const: "table"
|
|
79023
79102
|
},
|
|
@@ -79914,6 +79993,9 @@ var init_contract = __esm(() => {
|
|
|
79914
79993
|
{
|
|
79915
79994
|
const: "heading"
|
|
79916
79995
|
},
|
|
79996
|
+
{
|
|
79997
|
+
const: "listItem"
|
|
79998
|
+
},
|
|
79917
79999
|
{
|
|
79918
80000
|
const: "table"
|
|
79919
80001
|
},
|
|
@@ -80349,6 +80431,9 @@ var init_contract = __esm(() => {
|
|
|
80349
80431
|
{
|
|
80350
80432
|
const: "heading"
|
|
80351
80433
|
},
|
|
80434
|
+
{
|
|
80435
|
+
const: "listItem"
|
|
80436
|
+
},
|
|
80352
80437
|
{
|
|
80353
80438
|
const: "table"
|
|
80354
80439
|
},
|
|
@@ -81245,6 +81330,9 @@ var init_contract = __esm(() => {
|
|
|
81245
81330
|
{
|
|
81246
81331
|
const: "heading"
|
|
81247
81332
|
},
|
|
81333
|
+
{
|
|
81334
|
+
const: "listItem"
|
|
81335
|
+
},
|
|
81248
81336
|
{
|
|
81249
81337
|
const: "table"
|
|
81250
81338
|
},
|
|
@@ -81680,6 +81768,9 @@ var init_contract = __esm(() => {
|
|
|
81680
81768
|
{
|
|
81681
81769
|
const: "heading"
|
|
81682
81770
|
},
|
|
81771
|
+
{
|
|
81772
|
+
const: "listItem"
|
|
81773
|
+
},
|
|
81683
81774
|
{
|
|
81684
81775
|
const: "table"
|
|
81685
81776
|
},
|
|
@@ -82691,6 +82782,9 @@ var init_contract = __esm(() => {
|
|
|
82691
82782
|
{
|
|
82692
82783
|
const: "heading"
|
|
82693
82784
|
},
|
|
82785
|
+
{
|
|
82786
|
+
const: "listItem"
|
|
82787
|
+
},
|
|
82694
82788
|
{
|
|
82695
82789
|
const: "table"
|
|
82696
82790
|
},
|
|
@@ -83126,6 +83220,9 @@ var init_contract = __esm(() => {
|
|
|
83126
83220
|
{
|
|
83127
83221
|
const: "heading"
|
|
83128
83222
|
},
|
|
83223
|
+
{
|
|
83224
|
+
const: "listItem"
|
|
83225
|
+
},
|
|
83129
83226
|
{
|
|
83130
83227
|
const: "table"
|
|
83131
83228
|
},
|
|
@@ -84026,6 +84123,9 @@ var init_contract = __esm(() => {
|
|
|
84026
84123
|
{
|
|
84027
84124
|
const: "heading"
|
|
84028
84125
|
},
|
|
84126
|
+
{
|
|
84127
|
+
const: "listItem"
|
|
84128
|
+
},
|
|
84029
84129
|
{
|
|
84030
84130
|
const: "table"
|
|
84031
84131
|
},
|
|
@@ -84461,6 +84561,9 @@ var init_contract = __esm(() => {
|
|
|
84461
84561
|
{
|
|
84462
84562
|
const: "heading"
|
|
84463
84563
|
},
|
|
84564
|
+
{
|
|
84565
|
+
const: "listItem"
|
|
84566
|
+
},
|
|
84464
84567
|
{
|
|
84465
84568
|
const: "table"
|
|
84466
84569
|
},
|
|
@@ -85361,6 +85464,9 @@ var init_contract = __esm(() => {
|
|
|
85361
85464
|
{
|
|
85362
85465
|
const: "heading"
|
|
85363
85466
|
},
|
|
85467
|
+
{
|
|
85468
|
+
const: "listItem"
|
|
85469
|
+
},
|
|
85364
85470
|
{
|
|
85365
85471
|
const: "table"
|
|
85366
85472
|
},
|
|
@@ -85796,6 +85902,9 @@ var init_contract = __esm(() => {
|
|
|
85796
85902
|
{
|
|
85797
85903
|
const: "heading"
|
|
85798
85904
|
},
|
|
85905
|
+
{
|
|
85906
|
+
const: "listItem"
|
|
85907
|
+
},
|
|
85799
85908
|
{
|
|
85800
85909
|
const: "table"
|
|
85801
85910
|
},
|
|
@@ -86694,6 +86803,9 @@ var init_contract = __esm(() => {
|
|
|
86694
86803
|
{
|
|
86695
86804
|
const: "heading"
|
|
86696
86805
|
},
|
|
86806
|
+
{
|
|
86807
|
+
const: "listItem"
|
|
86808
|
+
},
|
|
86697
86809
|
{
|
|
86698
86810
|
const: "table"
|
|
86699
86811
|
},
|
|
@@ -87129,6 +87241,9 @@ var init_contract = __esm(() => {
|
|
|
87129
87241
|
{
|
|
87130
87242
|
const: "heading"
|
|
87131
87243
|
},
|
|
87244
|
+
{
|
|
87245
|
+
const: "listItem"
|
|
87246
|
+
},
|
|
87132
87247
|
{
|
|
87133
87248
|
const: "table"
|
|
87134
87249
|
},
|
|
@@ -88029,6 +88144,9 @@ var init_contract = __esm(() => {
|
|
|
88029
88144
|
{
|
|
88030
88145
|
const: "heading"
|
|
88031
88146
|
},
|
|
88147
|
+
{
|
|
88148
|
+
const: "listItem"
|
|
88149
|
+
},
|
|
88032
88150
|
{
|
|
88033
88151
|
const: "table"
|
|
88034
88152
|
},
|
|
@@ -88464,6 +88582,9 @@ var init_contract = __esm(() => {
|
|
|
88464
88582
|
{
|
|
88465
88583
|
const: "heading"
|
|
88466
88584
|
},
|
|
88585
|
+
{
|
|
88586
|
+
const: "listItem"
|
|
88587
|
+
},
|
|
88467
88588
|
{
|
|
88468
88589
|
const: "table"
|
|
88469
88590
|
},
|
|
@@ -89362,6 +89483,9 @@ var init_contract = __esm(() => {
|
|
|
89362
89483
|
{
|
|
89363
89484
|
const: "heading"
|
|
89364
89485
|
},
|
|
89486
|
+
{
|
|
89487
|
+
const: "listItem"
|
|
89488
|
+
},
|
|
89365
89489
|
{
|
|
89366
89490
|
const: "table"
|
|
89367
89491
|
},
|
|
@@ -89797,6 +89921,9 @@ var init_contract = __esm(() => {
|
|
|
89797
89921
|
{
|
|
89798
89922
|
const: "heading"
|
|
89799
89923
|
},
|
|
89924
|
+
{
|
|
89925
|
+
const: "listItem"
|
|
89926
|
+
},
|
|
89800
89927
|
{
|
|
89801
89928
|
const: "table"
|
|
89802
89929
|
},
|
|
@@ -90713,6 +90840,9 @@ var init_contract = __esm(() => {
|
|
|
90713
90840
|
{
|
|
90714
90841
|
const: "heading"
|
|
90715
90842
|
},
|
|
90843
|
+
{
|
|
90844
|
+
const: "listItem"
|
|
90845
|
+
},
|
|
90716
90846
|
{
|
|
90717
90847
|
const: "table"
|
|
90718
90848
|
},
|
|
@@ -91148,6 +91278,9 @@ var init_contract = __esm(() => {
|
|
|
91148
91278
|
{
|
|
91149
91279
|
const: "heading"
|
|
91150
91280
|
},
|
|
91281
|
+
{
|
|
91282
|
+
const: "listItem"
|
|
91283
|
+
},
|
|
91151
91284
|
{
|
|
91152
91285
|
const: "table"
|
|
91153
91286
|
},
|
|
@@ -92046,6 +92179,9 @@ var init_contract = __esm(() => {
|
|
|
92046
92179
|
{
|
|
92047
92180
|
const: "heading"
|
|
92048
92181
|
},
|
|
92182
|
+
{
|
|
92183
|
+
const: "listItem"
|
|
92184
|
+
},
|
|
92049
92185
|
{
|
|
92050
92186
|
const: "table"
|
|
92051
92187
|
},
|
|
@@ -92481,6 +92617,9 @@ var init_contract = __esm(() => {
|
|
|
92481
92617
|
{
|
|
92482
92618
|
const: "heading"
|
|
92483
92619
|
},
|
|
92620
|
+
{
|
|
92621
|
+
const: "listItem"
|
|
92622
|
+
},
|
|
92484
92623
|
{
|
|
92485
92624
|
const: "table"
|
|
92486
92625
|
},
|
|
@@ -93377,6 +93516,9 @@ var init_contract = __esm(() => {
|
|
|
93377
93516
|
{
|
|
93378
93517
|
const: "heading"
|
|
93379
93518
|
},
|
|
93519
|
+
{
|
|
93520
|
+
const: "listItem"
|
|
93521
|
+
},
|
|
93380
93522
|
{
|
|
93381
93523
|
const: "table"
|
|
93382
93524
|
},
|
|
@@ -93812,6 +93954,9 @@ var init_contract = __esm(() => {
|
|
|
93812
93954
|
{
|
|
93813
93955
|
const: "heading"
|
|
93814
93956
|
},
|
|
93957
|
+
{
|
|
93958
|
+
const: "listItem"
|
|
93959
|
+
},
|
|
93815
93960
|
{
|
|
93816
93961
|
const: "table"
|
|
93817
93962
|
},
|
|
@@ -94708,6 +94853,9 @@ var init_contract = __esm(() => {
|
|
|
94708
94853
|
{
|
|
94709
94854
|
const: "heading"
|
|
94710
94855
|
},
|
|
94856
|
+
{
|
|
94857
|
+
const: "listItem"
|
|
94858
|
+
},
|
|
94711
94859
|
{
|
|
94712
94860
|
const: "table"
|
|
94713
94861
|
},
|
|
@@ -95143,6 +95291,9 @@ var init_contract = __esm(() => {
|
|
|
95143
95291
|
{
|
|
95144
95292
|
const: "heading"
|
|
95145
95293
|
},
|
|
95294
|
+
{
|
|
95295
|
+
const: "listItem"
|
|
95296
|
+
},
|
|
95146
95297
|
{
|
|
95147
95298
|
const: "table"
|
|
95148
95299
|
},
|
|
@@ -96039,6 +96190,9 @@ var init_contract = __esm(() => {
|
|
|
96039
96190
|
{
|
|
96040
96191
|
const: "heading"
|
|
96041
96192
|
},
|
|
96193
|
+
{
|
|
96194
|
+
const: "listItem"
|
|
96195
|
+
},
|
|
96042
96196
|
{
|
|
96043
96197
|
const: "table"
|
|
96044
96198
|
},
|
|
@@ -96474,6 +96628,9 @@ var init_contract = __esm(() => {
|
|
|
96474
96628
|
{
|
|
96475
96629
|
const: "heading"
|
|
96476
96630
|
},
|
|
96631
|
+
{
|
|
96632
|
+
const: "listItem"
|
|
96633
|
+
},
|
|
96477
96634
|
{
|
|
96478
96635
|
const: "table"
|
|
96479
96636
|
},
|
|
@@ -97478,6 +97635,9 @@ var init_contract = __esm(() => {
|
|
|
97478
97635
|
{
|
|
97479
97636
|
const: "heading"
|
|
97480
97637
|
},
|
|
97638
|
+
{
|
|
97639
|
+
const: "listItem"
|
|
97640
|
+
},
|
|
97481
97641
|
{
|
|
97482
97642
|
const: "table"
|
|
97483
97643
|
},
|
|
@@ -97913,6 +98073,9 @@ var init_contract = __esm(() => {
|
|
|
97913
98073
|
{
|
|
97914
98074
|
const: "heading"
|
|
97915
98075
|
},
|
|
98076
|
+
{
|
|
98077
|
+
const: "listItem"
|
|
98078
|
+
},
|
|
97916
98079
|
{
|
|
97917
98080
|
const: "table"
|
|
97918
98081
|
},
|
|
@@ -98945,6 +99108,9 @@ var init_contract = __esm(() => {
|
|
|
98945
99108
|
{
|
|
98946
99109
|
const: "heading"
|
|
98947
99110
|
},
|
|
99111
|
+
{
|
|
99112
|
+
const: "listItem"
|
|
99113
|
+
},
|
|
98948
99114
|
{
|
|
98949
99115
|
const: "table"
|
|
98950
99116
|
},
|
|
@@ -99380,6 +99546,9 @@ var init_contract = __esm(() => {
|
|
|
99380
99546
|
{
|
|
99381
99547
|
const: "heading"
|
|
99382
99548
|
},
|
|
99549
|
+
{
|
|
99550
|
+
const: "listItem"
|
|
99551
|
+
},
|
|
99383
99552
|
{
|
|
99384
99553
|
const: "table"
|
|
99385
99554
|
},
|
|
@@ -100276,6 +100445,9 @@ var init_contract = __esm(() => {
|
|
|
100276
100445
|
{
|
|
100277
100446
|
const: "heading"
|
|
100278
100447
|
},
|
|
100448
|
+
{
|
|
100449
|
+
const: "listItem"
|
|
100450
|
+
},
|
|
100279
100451
|
{
|
|
100280
100452
|
const: "table"
|
|
100281
100453
|
},
|
|
@@ -100711,6 +100883,9 @@ var init_contract = __esm(() => {
|
|
|
100711
100883
|
{
|
|
100712
100884
|
const: "heading"
|
|
100713
100885
|
},
|
|
100886
|
+
{
|
|
100887
|
+
const: "listItem"
|
|
100888
|
+
},
|
|
100714
100889
|
{
|
|
100715
100890
|
const: "table"
|
|
100716
100891
|
},
|
|
@@ -101607,6 +101782,9 @@ var init_contract = __esm(() => {
|
|
|
101607
101782
|
{
|
|
101608
101783
|
const: "heading"
|
|
101609
101784
|
},
|
|
101785
|
+
{
|
|
101786
|
+
const: "listItem"
|
|
101787
|
+
},
|
|
101610
101788
|
{
|
|
101611
101789
|
const: "table"
|
|
101612
101790
|
},
|
|
@@ -102042,6 +102220,9 @@ var init_contract = __esm(() => {
|
|
|
102042
102220
|
{
|
|
102043
102221
|
const: "heading"
|
|
102044
102222
|
},
|
|
102223
|
+
{
|
|
102224
|
+
const: "listItem"
|
|
102225
|
+
},
|
|
102045
102226
|
{
|
|
102046
102227
|
const: "table"
|
|
102047
102228
|
},
|
|
@@ -102938,6 +103119,9 @@ var init_contract = __esm(() => {
|
|
|
102938
103119
|
{
|
|
102939
103120
|
const: "heading"
|
|
102940
103121
|
},
|
|
103122
|
+
{
|
|
103123
|
+
const: "listItem"
|
|
103124
|
+
},
|
|
102941
103125
|
{
|
|
102942
103126
|
const: "table"
|
|
102943
103127
|
},
|
|
@@ -103373,6 +103557,9 @@ var init_contract = __esm(() => {
|
|
|
103373
103557
|
{
|
|
103374
103558
|
const: "heading"
|
|
103375
103559
|
},
|
|
103560
|
+
{
|
|
103561
|
+
const: "listItem"
|
|
103562
|
+
},
|
|
103376
103563
|
{
|
|
103377
103564
|
const: "table"
|
|
103378
103565
|
},
|
|
@@ -104269,6 +104456,9 @@ var init_contract = __esm(() => {
|
|
|
104269
104456
|
{
|
|
104270
104457
|
const: "heading"
|
|
104271
104458
|
},
|
|
104459
|
+
{
|
|
104460
|
+
const: "listItem"
|
|
104461
|
+
},
|
|
104272
104462
|
{
|
|
104273
104463
|
const: "table"
|
|
104274
104464
|
},
|
|
@@ -104704,6 +104894,9 @@ var init_contract = __esm(() => {
|
|
|
104704
104894
|
{
|
|
104705
104895
|
const: "heading"
|
|
104706
104896
|
},
|
|
104897
|
+
{
|
|
104898
|
+
const: "listItem"
|
|
104899
|
+
},
|
|
104707
104900
|
{
|
|
104708
104901
|
const: "table"
|
|
104709
104902
|
},
|
|
@@ -105602,6 +105795,9 @@ var init_contract = __esm(() => {
|
|
|
105602
105795
|
{
|
|
105603
105796
|
const: "heading"
|
|
105604
105797
|
},
|
|
105798
|
+
{
|
|
105799
|
+
const: "listItem"
|
|
105800
|
+
},
|
|
105605
105801
|
{
|
|
105606
105802
|
const: "table"
|
|
105607
105803
|
},
|
|
@@ -106037,6 +106233,9 @@ var init_contract = __esm(() => {
|
|
|
106037
106233
|
{
|
|
106038
106234
|
const: "heading"
|
|
106039
106235
|
},
|
|
106236
|
+
{
|
|
106237
|
+
const: "listItem"
|
|
106238
|
+
},
|
|
106040
106239
|
{
|
|
106041
106240
|
const: "table"
|
|
106042
106241
|
},
|
|
@@ -106935,6 +107134,9 @@ var init_contract = __esm(() => {
|
|
|
106935
107134
|
{
|
|
106936
107135
|
const: "heading"
|
|
106937
107136
|
},
|
|
107137
|
+
{
|
|
107138
|
+
const: "listItem"
|
|
107139
|
+
},
|
|
106938
107140
|
{
|
|
106939
107141
|
const: "table"
|
|
106940
107142
|
},
|
|
@@ -107370,6 +107572,9 @@ var init_contract = __esm(() => {
|
|
|
107370
107572
|
{
|
|
107371
107573
|
const: "heading"
|
|
107372
107574
|
},
|
|
107575
|
+
{
|
|
107576
|
+
const: "listItem"
|
|
107577
|
+
},
|
|
107373
107578
|
{
|
|
107374
107579
|
const: "table"
|
|
107375
107580
|
},
|
|
@@ -108266,6 +108471,9 @@ var init_contract = __esm(() => {
|
|
|
108266
108471
|
{
|
|
108267
108472
|
const: "heading"
|
|
108268
108473
|
},
|
|
108474
|
+
{
|
|
108475
|
+
const: "listItem"
|
|
108476
|
+
},
|
|
108269
108477
|
{
|
|
108270
108478
|
const: "table"
|
|
108271
108479
|
},
|
|
@@ -108701,6 +108909,9 @@ var init_contract = __esm(() => {
|
|
|
108701
108909
|
{
|
|
108702
108910
|
const: "heading"
|
|
108703
108911
|
},
|
|
108912
|
+
{
|
|
108913
|
+
const: "listItem"
|
|
108914
|
+
},
|
|
108704
108915
|
{
|
|
108705
108916
|
const: "table"
|
|
108706
108917
|
},
|
|
@@ -109597,6 +109808,9 @@ var init_contract = __esm(() => {
|
|
|
109597
109808
|
{
|
|
109598
109809
|
const: "heading"
|
|
109599
109810
|
},
|
|
109811
|
+
{
|
|
109812
|
+
const: "listItem"
|
|
109813
|
+
},
|
|
109600
109814
|
{
|
|
109601
109815
|
const: "table"
|
|
109602
109816
|
},
|
|
@@ -110032,6 +110246,9 @@ var init_contract = __esm(() => {
|
|
|
110032
110246
|
{
|
|
110033
110247
|
const: "heading"
|
|
110034
110248
|
},
|
|
110249
|
+
{
|
|
110250
|
+
const: "listItem"
|
|
110251
|
+
},
|
|
110035
110252
|
{
|
|
110036
110253
|
const: "table"
|
|
110037
110254
|
},
|
|
@@ -110928,6 +111145,9 @@ var init_contract = __esm(() => {
|
|
|
110928
111145
|
{
|
|
110929
111146
|
const: "heading"
|
|
110930
111147
|
},
|
|
111148
|
+
{
|
|
111149
|
+
const: "listItem"
|
|
111150
|
+
},
|
|
110931
111151
|
{
|
|
110932
111152
|
const: "table"
|
|
110933
111153
|
},
|
|
@@ -111363,6 +111583,9 @@ var init_contract = __esm(() => {
|
|
|
111363
111583
|
{
|
|
111364
111584
|
const: "heading"
|
|
111365
111585
|
},
|
|
111586
|
+
{
|
|
111587
|
+
const: "listItem"
|
|
111588
|
+
},
|
|
111366
111589
|
{
|
|
111367
111590
|
const: "table"
|
|
111368
111591
|
},
|
|
@@ -112259,6 +112482,9 @@ var init_contract = __esm(() => {
|
|
|
112259
112482
|
{
|
|
112260
112483
|
const: "heading"
|
|
112261
112484
|
},
|
|
112485
|
+
{
|
|
112486
|
+
const: "listItem"
|
|
112487
|
+
},
|
|
112262
112488
|
{
|
|
112263
112489
|
const: "table"
|
|
112264
112490
|
},
|
|
@@ -112694,6 +112920,9 @@ var init_contract = __esm(() => {
|
|
|
112694
112920
|
{
|
|
112695
112921
|
const: "heading"
|
|
112696
112922
|
},
|
|
112923
|
+
{
|
|
112924
|
+
const: "listItem"
|
|
112925
|
+
},
|
|
112697
112926
|
{
|
|
112698
112927
|
const: "table"
|
|
112699
112928
|
},
|
|
@@ -113590,6 +113819,9 @@ var init_contract = __esm(() => {
|
|
|
113590
113819
|
{
|
|
113591
113820
|
const: "heading"
|
|
113592
113821
|
},
|
|
113822
|
+
{
|
|
113823
|
+
const: "listItem"
|
|
113824
|
+
},
|
|
113593
113825
|
{
|
|
113594
113826
|
const: "table"
|
|
113595
113827
|
},
|
|
@@ -114025,6 +114257,9 @@ var init_contract = __esm(() => {
|
|
|
114025
114257
|
{
|
|
114026
114258
|
const: "heading"
|
|
114027
114259
|
},
|
|
114260
|
+
{
|
|
114261
|
+
const: "listItem"
|
|
114262
|
+
},
|
|
114028
114263
|
{
|
|
114029
114264
|
const: "table"
|
|
114030
114265
|
},
|
|
@@ -114921,6 +115156,9 @@ var init_contract = __esm(() => {
|
|
|
114921
115156
|
{
|
|
114922
115157
|
const: "heading"
|
|
114923
115158
|
},
|
|
115159
|
+
{
|
|
115160
|
+
const: "listItem"
|
|
115161
|
+
},
|
|
114924
115162
|
{
|
|
114925
115163
|
const: "table"
|
|
114926
115164
|
},
|
|
@@ -115356,6 +115594,9 @@ var init_contract = __esm(() => {
|
|
|
115356
115594
|
{
|
|
115357
115595
|
const: "heading"
|
|
115358
115596
|
},
|
|
115597
|
+
{
|
|
115598
|
+
const: "listItem"
|
|
115599
|
+
},
|
|
115359
115600
|
{
|
|
115360
115601
|
const: "table"
|
|
115361
115602
|
},
|
|
@@ -116252,6 +116493,9 @@ var init_contract = __esm(() => {
|
|
|
116252
116493
|
{
|
|
116253
116494
|
const: "heading"
|
|
116254
116495
|
},
|
|
116496
|
+
{
|
|
116497
|
+
const: "listItem"
|
|
116498
|
+
},
|
|
116255
116499
|
{
|
|
116256
116500
|
const: "table"
|
|
116257
116501
|
},
|
|
@@ -116687,6 +116931,9 @@ var init_contract = __esm(() => {
|
|
|
116687
116931
|
{
|
|
116688
116932
|
const: "heading"
|
|
116689
116933
|
},
|
|
116934
|
+
{
|
|
116935
|
+
const: "listItem"
|
|
116936
|
+
},
|
|
116690
116937
|
{
|
|
116691
116938
|
const: "table"
|
|
116692
116939
|
},
|
|
@@ -117749,6 +117996,9 @@ var init_contract = __esm(() => {
|
|
|
117749
117996
|
{
|
|
117750
117997
|
const: "heading"
|
|
117751
117998
|
},
|
|
117999
|
+
{
|
|
118000
|
+
const: "listItem"
|
|
118001
|
+
},
|
|
117752
118002
|
{
|
|
117753
118003
|
const: "table"
|
|
117754
118004
|
},
|
|
@@ -118184,6 +118434,9 @@ var init_contract = __esm(() => {
|
|
|
118184
118434
|
{
|
|
118185
118435
|
const: "heading"
|
|
118186
118436
|
},
|
|
118437
|
+
{
|
|
118438
|
+
const: "listItem"
|
|
118439
|
+
},
|
|
118187
118440
|
{
|
|
118188
118441
|
const: "table"
|
|
118189
118442
|
},
|
|
@@ -119084,6 +119337,9 @@ var init_contract = __esm(() => {
|
|
|
119084
119337
|
{
|
|
119085
119338
|
const: "heading"
|
|
119086
119339
|
},
|
|
119340
|
+
{
|
|
119341
|
+
const: "listItem"
|
|
119342
|
+
},
|
|
119087
119343
|
{
|
|
119088
119344
|
const: "table"
|
|
119089
119345
|
},
|
|
@@ -119519,6 +119775,9 @@ var init_contract = __esm(() => {
|
|
|
119519
119775
|
{
|
|
119520
119776
|
const: "heading"
|
|
119521
119777
|
},
|
|
119778
|
+
{
|
|
119779
|
+
const: "listItem"
|
|
119780
|
+
},
|
|
119522
119781
|
{
|
|
119523
119782
|
const: "table"
|
|
119524
119783
|
},
|
|
@@ -120489,6 +120748,9 @@ var init_contract = __esm(() => {
|
|
|
120489
120748
|
{
|
|
120490
120749
|
const: "heading"
|
|
120491
120750
|
},
|
|
120751
|
+
{
|
|
120752
|
+
const: "listItem"
|
|
120753
|
+
},
|
|
120492
120754
|
{
|
|
120493
120755
|
const: "table"
|
|
120494
120756
|
},
|
|
@@ -120924,6 +121186,9 @@ var init_contract = __esm(() => {
|
|
|
120924
121186
|
{
|
|
120925
121187
|
const: "heading"
|
|
120926
121188
|
},
|
|
121189
|
+
{
|
|
121190
|
+
const: "listItem"
|
|
121191
|
+
},
|
|
120927
121192
|
{
|
|
120928
121193
|
const: "table"
|
|
120929
121194
|
},
|
|
@@ -121820,6 +122085,9 @@ var init_contract = __esm(() => {
|
|
|
121820
122085
|
{
|
|
121821
122086
|
const: "heading"
|
|
121822
122087
|
},
|
|
122088
|
+
{
|
|
122089
|
+
const: "listItem"
|
|
122090
|
+
},
|
|
121823
122091
|
{
|
|
121824
122092
|
const: "table"
|
|
121825
122093
|
},
|
|
@@ -122255,6 +122523,9 @@ var init_contract = __esm(() => {
|
|
|
122255
122523
|
{
|
|
122256
122524
|
const: "heading"
|
|
122257
122525
|
},
|
|
122526
|
+
{
|
|
122527
|
+
const: "listItem"
|
|
122528
|
+
},
|
|
122258
122529
|
{
|
|
122259
122530
|
const: "table"
|
|
122260
122531
|
},
|
|
@@ -123259,6 +123530,9 @@ var init_contract = __esm(() => {
|
|
|
123259
123530
|
{
|
|
123260
123531
|
const: "heading"
|
|
123261
123532
|
},
|
|
123533
|
+
{
|
|
123534
|
+
const: "listItem"
|
|
123535
|
+
},
|
|
123262
123536
|
{
|
|
123263
123537
|
const: "table"
|
|
123264
123538
|
},
|
|
@@ -123694,6 +123968,9 @@ var init_contract = __esm(() => {
|
|
|
123694
123968
|
{
|
|
123695
123969
|
const: "heading"
|
|
123696
123970
|
},
|
|
123971
|
+
{
|
|
123972
|
+
const: "listItem"
|
|
123973
|
+
},
|
|
123697
123974
|
{
|
|
123698
123975
|
const: "table"
|
|
123699
123976
|
},
|
|
@@ -124590,6 +124867,9 @@ var init_contract = __esm(() => {
|
|
|
124590
124867
|
{
|
|
124591
124868
|
const: "heading"
|
|
124592
124869
|
},
|
|
124870
|
+
{
|
|
124871
|
+
const: "listItem"
|
|
124872
|
+
},
|
|
124593
124873
|
{
|
|
124594
124874
|
const: "table"
|
|
124595
124875
|
},
|
|
@@ -125025,6 +125305,9 @@ var init_contract = __esm(() => {
|
|
|
125025
125305
|
{
|
|
125026
125306
|
const: "heading"
|
|
125027
125307
|
},
|
|
125308
|
+
{
|
|
125309
|
+
const: "listItem"
|
|
125310
|
+
},
|
|
125028
125311
|
{
|
|
125029
125312
|
const: "table"
|
|
125030
125313
|
},
|
|
@@ -125925,6 +126208,9 @@ var init_contract = __esm(() => {
|
|
|
125925
126208
|
{
|
|
125926
126209
|
const: "heading"
|
|
125927
126210
|
},
|
|
126211
|
+
{
|
|
126212
|
+
const: "listItem"
|
|
126213
|
+
},
|
|
125928
126214
|
{
|
|
125929
126215
|
const: "table"
|
|
125930
126216
|
},
|
|
@@ -126360,6 +126646,9 @@ var init_contract = __esm(() => {
|
|
|
126360
126646
|
{
|
|
126361
126647
|
const: "heading"
|
|
126362
126648
|
},
|
|
126649
|
+
{
|
|
126650
|
+
const: "listItem"
|
|
126651
|
+
},
|
|
126363
126652
|
{
|
|
126364
126653
|
const: "table"
|
|
126365
126654
|
},
|
|
@@ -127556,6 +127845,9 @@ var init_contract = __esm(() => {
|
|
|
127556
127845
|
{
|
|
127557
127846
|
const: "heading"
|
|
127558
127847
|
},
|
|
127848
|
+
{
|
|
127849
|
+
const: "listItem"
|
|
127850
|
+
},
|
|
127559
127851
|
{
|
|
127560
127852
|
const: "table"
|
|
127561
127853
|
},
|
|
@@ -127991,6 +128283,9 @@ var init_contract = __esm(() => {
|
|
|
127991
128283
|
{
|
|
127992
128284
|
const: "heading"
|
|
127993
128285
|
},
|
|
128286
|
+
{
|
|
128287
|
+
const: "listItem"
|
|
128288
|
+
},
|
|
127994
128289
|
{
|
|
127995
128290
|
const: "table"
|
|
127996
128291
|
},
|
|
@@ -128889,6 +129184,9 @@ var init_contract = __esm(() => {
|
|
|
128889
129184
|
{
|
|
128890
129185
|
const: "heading"
|
|
128891
129186
|
},
|
|
129187
|
+
{
|
|
129188
|
+
const: "listItem"
|
|
129189
|
+
},
|
|
128892
129190
|
{
|
|
128893
129191
|
const: "table"
|
|
128894
129192
|
},
|
|
@@ -129324,6 +129622,9 @@ var init_contract = __esm(() => {
|
|
|
129324
129622
|
{
|
|
129325
129623
|
const: "heading"
|
|
129326
129624
|
},
|
|
129625
|
+
{
|
|
129626
|
+
const: "listItem"
|
|
129627
|
+
},
|
|
129327
129628
|
{
|
|
129328
129629
|
const: "table"
|
|
129329
129630
|
},
|
|
@@ -130224,6 +130525,9 @@ var init_contract = __esm(() => {
|
|
|
130224
130525
|
{
|
|
130225
130526
|
const: "heading"
|
|
130226
130527
|
},
|
|
130528
|
+
{
|
|
130529
|
+
const: "listItem"
|
|
130530
|
+
},
|
|
130227
130531
|
{
|
|
130228
130532
|
const: "table"
|
|
130229
130533
|
},
|
|
@@ -130659,6 +130963,9 @@ var init_contract = __esm(() => {
|
|
|
130659
130963
|
{
|
|
130660
130964
|
const: "heading"
|
|
130661
130965
|
},
|
|
130966
|
+
{
|
|
130967
|
+
const: "listItem"
|
|
130968
|
+
},
|
|
130662
130969
|
{
|
|
130663
130970
|
const: "table"
|
|
130664
130971
|
},
|
|
@@ -131559,6 +131866,9 @@ var init_contract = __esm(() => {
|
|
|
131559
131866
|
{
|
|
131560
131867
|
const: "heading"
|
|
131561
131868
|
},
|
|
131869
|
+
{
|
|
131870
|
+
const: "listItem"
|
|
131871
|
+
},
|
|
131562
131872
|
{
|
|
131563
131873
|
const: "table"
|
|
131564
131874
|
},
|
|
@@ -131994,6 +132304,9 @@ var init_contract = __esm(() => {
|
|
|
131994
132304
|
{
|
|
131995
132305
|
const: "heading"
|
|
131996
132306
|
},
|
|
132307
|
+
{
|
|
132308
|
+
const: "listItem"
|
|
132309
|
+
},
|
|
131997
132310
|
{
|
|
131998
132311
|
const: "table"
|
|
131999
132312
|
},
|
|
@@ -132894,6 +133207,9 @@ var init_contract = __esm(() => {
|
|
|
132894
133207
|
{
|
|
132895
133208
|
const: "heading"
|
|
132896
133209
|
},
|
|
133210
|
+
{
|
|
133211
|
+
const: "listItem"
|
|
133212
|
+
},
|
|
132897
133213
|
{
|
|
132898
133214
|
const: "table"
|
|
132899
133215
|
},
|
|
@@ -133329,6 +133645,9 @@ var init_contract = __esm(() => {
|
|
|
133329
133645
|
{
|
|
133330
133646
|
const: "heading"
|
|
133331
133647
|
},
|
|
133648
|
+
{
|
|
133649
|
+
const: "listItem"
|
|
133650
|
+
},
|
|
133332
133651
|
{
|
|
133333
133652
|
const: "table"
|
|
133334
133653
|
},
|
|
@@ -134274,6 +134593,9 @@ var init_contract = __esm(() => {
|
|
|
134274
134593
|
{
|
|
134275
134594
|
const: "heading"
|
|
134276
134595
|
},
|
|
134596
|
+
{
|
|
134597
|
+
const: "listItem"
|
|
134598
|
+
},
|
|
134277
134599
|
{
|
|
134278
134600
|
const: "table"
|
|
134279
134601
|
},
|
|
@@ -134709,6 +135031,9 @@ var init_contract = __esm(() => {
|
|
|
134709
135031
|
{
|
|
134710
135032
|
const: "heading"
|
|
134711
135033
|
},
|
|
135034
|
+
{
|
|
135035
|
+
const: "listItem"
|
|
135036
|
+
},
|
|
134712
135037
|
{
|
|
134713
135038
|
const: "table"
|
|
134714
135039
|
},
|
|
@@ -194706,6 +195031,9 @@ var init_contract = __esm(() => {
|
|
|
194706
195031
|
{
|
|
194707
195032
|
const: "heading"
|
|
194708
195033
|
},
|
|
195034
|
+
{
|
|
195035
|
+
const: "listItem"
|
|
195036
|
+
},
|
|
194709
195037
|
{
|
|
194710
195038
|
const: "table"
|
|
194711
195039
|
},
|
|
@@ -195141,6 +195469,9 @@ var init_contract = __esm(() => {
|
|
|
195141
195469
|
{
|
|
195142
195470
|
const: "heading"
|
|
195143
195471
|
},
|
|
195472
|
+
{
|
|
195473
|
+
const: "listItem"
|
|
195474
|
+
},
|
|
195144
195475
|
{
|
|
195145
195476
|
const: "table"
|
|
195146
195477
|
},
|
|
@@ -196980,6 +197311,9 @@ var init_contract = __esm(() => {
|
|
|
196980
197311
|
{
|
|
196981
197312
|
const: "heading"
|
|
196982
197313
|
},
|
|
197314
|
+
{
|
|
197315
|
+
const: "listItem"
|
|
197316
|
+
},
|
|
196983
197317
|
{
|
|
196984
197318
|
const: "table"
|
|
196985
197319
|
},
|
|
@@ -197415,6 +197749,9 @@ var init_contract = __esm(() => {
|
|
|
197415
197749
|
{
|
|
197416
197750
|
const: "heading"
|
|
197417
197751
|
},
|
|
197752
|
+
{
|
|
197753
|
+
const: "listItem"
|
|
197754
|
+
},
|
|
197418
197755
|
{
|
|
197419
197756
|
const: "table"
|
|
197420
197757
|
},
|
|
@@ -199531,7 +199868,13 @@ var init_contract = __esm(() => {
|
|
|
199531
199868
|
enum: [
|
|
199532
199869
|
"insertion",
|
|
199533
199870
|
"deletion",
|
|
199534
|
-
"replacement"
|
|
199871
|
+
"replacement",
|
|
199872
|
+
"formatting",
|
|
199873
|
+
"move",
|
|
199874
|
+
"structural",
|
|
199875
|
+
"insert",
|
|
199876
|
+
"delete",
|
|
199877
|
+
"format"
|
|
199535
199878
|
]
|
|
199536
199879
|
},
|
|
199537
199880
|
subtype: {
|
|
@@ -200526,7 +200869,13 @@ var init_contract = __esm(() => {
|
|
|
200526
200869
|
enum: [
|
|
200527
200870
|
"insertion",
|
|
200528
200871
|
"deletion",
|
|
200529
|
-
"replacement"
|
|
200872
|
+
"replacement",
|
|
200873
|
+
"formatting",
|
|
200874
|
+
"move",
|
|
200875
|
+
"structural",
|
|
200876
|
+
"insert",
|
|
200877
|
+
"delete",
|
|
200878
|
+
"format"
|
|
200530
200879
|
]
|
|
200531
200880
|
},
|
|
200532
200881
|
subtype: {
|
|
@@ -204833,6 +205182,9 @@ var init_contract = __esm(() => {
|
|
|
204833
205182
|
{
|
|
204834
205183
|
const: "heading"
|
|
204835
205184
|
},
|
|
205185
|
+
{
|
|
205186
|
+
const: "listItem"
|
|
205187
|
+
},
|
|
204836
205188
|
{
|
|
204837
205189
|
const: "table"
|
|
204838
205190
|
},
|
|
@@ -205340,6 +205692,9 @@ var init_contract = __esm(() => {
|
|
|
205340
205692
|
{
|
|
205341
205693
|
const: "heading"
|
|
205342
205694
|
},
|
|
205695
|
+
{
|
|
205696
|
+
const: "listItem"
|
|
205697
|
+
},
|
|
205343
205698
|
{
|
|
205344
205699
|
const: "table"
|
|
205345
205700
|
},
|
|
@@ -207264,6 +207619,9 @@ var init_contract = __esm(() => {
|
|
|
207264
207619
|
{
|
|
207265
207620
|
const: "heading"
|
|
207266
207621
|
},
|
|
207622
|
+
{
|
|
207623
|
+
const: "listItem"
|
|
207624
|
+
},
|
|
207267
207625
|
{
|
|
207268
207626
|
const: "table"
|
|
207269
207627
|
},
|
|
@@ -207699,6 +208057,9 @@ var init_contract = __esm(() => {
|
|
|
207699
208057
|
{
|
|
207700
208058
|
const: "heading"
|
|
207701
208059
|
},
|
|
208060
|
+
{
|
|
208061
|
+
const: "listItem"
|
|
208062
|
+
},
|
|
207702
208063
|
{
|
|
207703
208064
|
const: "table"
|
|
207704
208065
|
},
|
|
@@ -209226,6 +209587,9 @@ var init_contract = __esm(() => {
|
|
|
209226
209587
|
{
|
|
209227
209588
|
const: "heading"
|
|
209228
209589
|
},
|
|
209590
|
+
{
|
|
209591
|
+
const: "listItem"
|
|
209592
|
+
},
|
|
209229
209593
|
{
|
|
209230
209594
|
const: "table"
|
|
209231
209595
|
},
|
|
@@ -209661,6 +210025,9 @@ var init_contract = __esm(() => {
|
|
|
209661
210025
|
{
|
|
209662
210026
|
const: "heading"
|
|
209663
210027
|
},
|
|
210028
|
+
{
|
|
210029
|
+
const: "listItem"
|
|
210030
|
+
},
|
|
209664
210031
|
{
|
|
209665
210032
|
const: "table"
|
|
209666
210033
|
},
|
|
@@ -211113,6 +211480,9 @@ var init_contract = __esm(() => {
|
|
|
211113
211480
|
{
|
|
211114
211481
|
const: "heading"
|
|
211115
211482
|
},
|
|
211483
|
+
{
|
|
211484
|
+
const: "listItem"
|
|
211485
|
+
},
|
|
211116
211486
|
{
|
|
211117
211487
|
const: "table"
|
|
211118
211488
|
},
|
|
@@ -211548,6 +211918,9 @@ var init_contract = __esm(() => {
|
|
|
211548
211918
|
{
|
|
211549
211919
|
const: "heading"
|
|
211550
211920
|
},
|
|
211921
|
+
{
|
|
211922
|
+
const: "listItem"
|
|
211923
|
+
},
|
|
211551
211924
|
{
|
|
211552
211925
|
const: "table"
|
|
211553
211926
|
},
|
|
@@ -212899,6 +213272,9 @@ var init_contract = __esm(() => {
|
|
|
212899
213272
|
{
|
|
212900
213273
|
const: "heading"
|
|
212901
213274
|
},
|
|
213275
|
+
{
|
|
213276
|
+
const: "listItem"
|
|
213277
|
+
},
|
|
212902
213278
|
{
|
|
212903
213279
|
const: "table"
|
|
212904
213280
|
},
|
|
@@ -213334,6 +213710,9 @@ var init_contract = __esm(() => {
|
|
|
213334
213710
|
{
|
|
213335
213711
|
const: "heading"
|
|
213336
213712
|
},
|
|
213713
|
+
{
|
|
213714
|
+
const: "listItem"
|
|
213715
|
+
},
|
|
213337
213716
|
{
|
|
213338
213717
|
const: "table"
|
|
213339
213718
|
},
|
|
@@ -218284,6 +218663,9 @@ var init_contract = __esm(() => {
|
|
|
218284
218663
|
{
|
|
218285
218664
|
const: "heading"
|
|
218286
218665
|
},
|
|
218666
|
+
{
|
|
218667
|
+
const: "listItem"
|
|
218668
|
+
},
|
|
218287
218669
|
{
|
|
218288
218670
|
const: "table"
|
|
218289
218671
|
},
|
|
@@ -218719,6 +219101,9 @@ var init_contract = __esm(() => {
|
|
|
218719
219101
|
{
|
|
218720
219102
|
const: "heading"
|
|
218721
219103
|
},
|
|
219104
|
+
{
|
|
219105
|
+
const: "listItem"
|
|
219106
|
+
},
|
|
218722
219107
|
{
|
|
218723
219108
|
const: "table"
|
|
218724
219109
|
},
|
|
@@ -220246,6 +220631,9 @@ var init_contract = __esm(() => {
|
|
|
220246
220631
|
{
|
|
220247
220632
|
const: "heading"
|
|
220248
220633
|
},
|
|
220634
|
+
{
|
|
220635
|
+
const: "listItem"
|
|
220636
|
+
},
|
|
220249
220637
|
{
|
|
220250
220638
|
const: "table"
|
|
220251
220639
|
},
|
|
@@ -220681,6 +221069,9 @@ var init_contract = __esm(() => {
|
|
|
220681
221069
|
{
|
|
220682
221070
|
const: "heading"
|
|
220683
221071
|
},
|
|
221072
|
+
{
|
|
221073
|
+
const: "listItem"
|
|
221074
|
+
},
|
|
220684
221075
|
{
|
|
220685
221076
|
const: "table"
|
|
220686
221077
|
},
|
|
@@ -222133,6 +222524,9 @@ var init_contract = __esm(() => {
|
|
|
222133
222524
|
{
|
|
222134
222525
|
const: "heading"
|
|
222135
222526
|
},
|
|
222527
|
+
{
|
|
222528
|
+
const: "listItem"
|
|
222529
|
+
},
|
|
222136
222530
|
{
|
|
222137
222531
|
const: "table"
|
|
222138
222532
|
},
|
|
@@ -222568,6 +222962,9 @@ var init_contract = __esm(() => {
|
|
|
222568
222962
|
{
|
|
222569
222963
|
const: "heading"
|
|
222570
222964
|
},
|
|
222965
|
+
{
|
|
222966
|
+
const: "listItem"
|
|
222967
|
+
},
|
|
222571
222968
|
{
|
|
222572
222969
|
const: "table"
|
|
222573
222970
|
},
|
|
@@ -223919,6 +224316,9 @@ var init_contract = __esm(() => {
|
|
|
223919
224316
|
{
|
|
223920
224317
|
const: "heading"
|
|
223921
224318
|
},
|
|
224319
|
+
{
|
|
224320
|
+
const: "listItem"
|
|
224321
|
+
},
|
|
223922
224322
|
{
|
|
223923
224323
|
const: "table"
|
|
223924
224324
|
},
|
|
@@ -224354,6 +224754,9 @@ var init_contract = __esm(() => {
|
|
|
224354
224754
|
{
|
|
224355
224755
|
const: "heading"
|
|
224356
224756
|
},
|
|
224757
|
+
{
|
|
224758
|
+
const: "listItem"
|
|
224759
|
+
},
|
|
224357
224760
|
{
|
|
224358
224761
|
const: "table"
|
|
224359
224762
|
},
|
|
@@ -246441,6 +246844,9 @@ var init_contract = __esm(() => {
|
|
|
246441
246844
|
{
|
|
246442
246845
|
const: "heading"
|
|
246443
246846
|
},
|
|
246847
|
+
{
|
|
246848
|
+
const: "listItem"
|
|
246849
|
+
},
|
|
246444
246850
|
{
|
|
246445
246851
|
const: "table"
|
|
246446
246852
|
},
|
|
@@ -246876,6 +247282,9 @@ var init_contract = __esm(() => {
|
|
|
246876
247282
|
{
|
|
246877
247283
|
const: "heading"
|
|
246878
247284
|
},
|
|
247285
|
+
{
|
|
247286
|
+
const: "listItem"
|
|
247287
|
+
},
|
|
246879
247288
|
{
|
|
246880
247289
|
const: "table"
|
|
246881
247290
|
},
|
|
@@ -248379,6 +248788,9 @@ var init_contract = __esm(() => {
|
|
|
248379
248788
|
{
|
|
248380
248789
|
const: "heading"
|
|
248381
248790
|
},
|
|
248791
|
+
{
|
|
248792
|
+
const: "listItem"
|
|
248793
|
+
},
|
|
248382
248794
|
{
|
|
248383
248795
|
const: "table"
|
|
248384
248796
|
},
|
|
@@ -248814,6 +249226,9 @@ var init_contract = __esm(() => {
|
|
|
248814
249226
|
{
|
|
248815
249227
|
const: "heading"
|
|
248816
249228
|
},
|
|
249229
|
+
{
|
|
249230
|
+
const: "listItem"
|
|
249231
|
+
},
|
|
248817
249232
|
{
|
|
248818
249233
|
const: "table"
|
|
248819
249234
|
},
|
|
@@ -250339,6 +250754,9 @@ var init_contract = __esm(() => {
|
|
|
250339
250754
|
{
|
|
250340
250755
|
const: "heading"
|
|
250341
250756
|
},
|
|
250757
|
+
{
|
|
250758
|
+
const: "listItem"
|
|
250759
|
+
},
|
|
250342
250760
|
{
|
|
250343
250761
|
const: "table"
|
|
250344
250762
|
},
|
|
@@ -250774,6 +251192,9 @@ var init_contract = __esm(() => {
|
|
|
250774
251192
|
{
|
|
250775
251193
|
const: "heading"
|
|
250776
251194
|
},
|
|
251195
|
+
{
|
|
251196
|
+
const: "listItem"
|
|
251197
|
+
},
|
|
250777
251198
|
{
|
|
250778
251199
|
const: "table"
|
|
250779
251200
|
},
|
|
@@ -290426,6 +290847,9 @@ var init_contract = __esm(() => {
|
|
|
290426
290847
|
{
|
|
290427
290848
|
const: "heading"
|
|
290428
290849
|
},
|
|
290850
|
+
{
|
|
290851
|
+
const: "listItem"
|
|
290852
|
+
},
|
|
290429
290853
|
{
|
|
290430
290854
|
const: "table"
|
|
290431
290855
|
},
|
|
@@ -290861,6 +291285,9 @@ var init_contract = __esm(() => {
|
|
|
290861
291285
|
{
|
|
290862
291286
|
const: "heading"
|
|
290863
291287
|
},
|
|
291288
|
+
{
|
|
291289
|
+
const: "listItem"
|
|
291290
|
+
},
|
|
290864
291291
|
{
|
|
290865
291292
|
const: "table"
|
|
290866
291293
|
},
|
|
@@ -339812,6 +340239,9 @@ var init_contract = __esm(() => {
|
|
|
339812
340239
|
{
|
|
339813
340240
|
const: "heading"
|
|
339814
340241
|
},
|
|
340242
|
+
{
|
|
340243
|
+
const: "listItem"
|
|
340244
|
+
},
|
|
339815
340245
|
{
|
|
339816
340246
|
const: "table"
|
|
339817
340247
|
},
|
|
@@ -340247,6 +340677,9 @@ var init_contract = __esm(() => {
|
|
|
340247
340677
|
{
|
|
340248
340678
|
const: "heading"
|
|
340249
340679
|
},
|
|
340680
|
+
{
|
|
340681
|
+
const: "listItem"
|
|
340682
|
+
},
|
|
340250
340683
|
{
|
|
340251
340684
|
const: "table"
|
|
340252
340685
|
},
|
|
@@ -342387,6 +342820,9 @@ var init_contract = __esm(() => {
|
|
|
342387
342820
|
{
|
|
342388
342821
|
const: "heading"
|
|
342389
342822
|
},
|
|
342823
|
+
{
|
|
342824
|
+
const: "listItem"
|
|
342825
|
+
},
|
|
342390
342826
|
{
|
|
342391
342827
|
const: "table"
|
|
342392
342828
|
},
|
|
@@ -342822,6 +343258,9 @@ var init_contract = __esm(() => {
|
|
|
342822
343258
|
{
|
|
342823
343259
|
const: "heading"
|
|
342824
343260
|
},
|
|
343261
|
+
{
|
|
343262
|
+
const: "listItem"
|
|
343263
|
+
},
|
|
342825
343264
|
{
|
|
342826
343265
|
const: "table"
|
|
342827
343266
|
},
|
|
@@ -343691,6 +344130,9 @@ var init_contract = __esm(() => {
|
|
|
343691
344130
|
{
|
|
343692
344131
|
const: "heading"
|
|
343693
344132
|
},
|
|
344133
|
+
{
|
|
344134
|
+
const: "listItem"
|
|
344135
|
+
},
|
|
343694
344136
|
{
|
|
343695
344137
|
const: "table"
|
|
343696
344138
|
},
|
|
@@ -344126,6 +344568,9 @@ var init_contract = __esm(() => {
|
|
|
344126
344568
|
{
|
|
344127
344569
|
const: "heading"
|
|
344128
344570
|
},
|
|
344571
|
+
{
|
|
344572
|
+
const: "listItem"
|
|
344573
|
+
},
|
|
344129
344574
|
{
|
|
344130
344575
|
const: "table"
|
|
344131
344576
|
},
|
|
@@ -349142,7 +349587,6 @@ var init_document_rpc = __esm(() => {
|
|
|
349142
349587
|
|
|
349143
349588
|
// ../../packages/sdk/langs/node/src/runtime/host.ts
|
|
349144
349589
|
import { spawn } from "node:child_process";
|
|
349145
|
-
import { createInterface } from "node:readline";
|
|
349146
349590
|
function mapCliInvocationResult(operation, value) {
|
|
349147
349591
|
const envelopeKey = operation.responseEnvelopeKey;
|
|
349148
349592
|
if (envelopeKey === null || envelopeKey === undefined)
|
|
@@ -349191,7 +349635,8 @@ class HostTransport {
|
|
|
349191
349635
|
user;
|
|
349192
349636
|
documentRpcEnabled;
|
|
349193
349637
|
child = null;
|
|
349194
|
-
|
|
349638
|
+
stdoutBuffer = "";
|
|
349639
|
+
stdoutDataListener = null;
|
|
349195
349640
|
pending = new Map;
|
|
349196
349641
|
nextRequestId = 1;
|
|
349197
349642
|
connecting = null;
|
|
@@ -349476,14 +349921,10 @@ class HostTransport {
|
|
|
349476
349921
|
stdio: ["pipe", "pipe", "pipe"]
|
|
349477
349922
|
});
|
|
349478
349923
|
this.child = child;
|
|
349479
|
-
|
|
349480
|
-
|
|
349481
|
-
|
|
349482
|
-
|
|
349483
|
-
this.stdoutReader = stdoutReader;
|
|
349484
|
-
stdoutReader.on("line", (line) => {
|
|
349485
|
-
this.onStdoutLine(line);
|
|
349486
|
-
});
|
|
349924
|
+
child.stdout.setEncoding("utf8");
|
|
349925
|
+
const stdoutDataListener = (chunk) => this.onStdoutChunk(chunk);
|
|
349926
|
+
this.stdoutDataListener = stdoutDataListener;
|
|
349927
|
+
child.stdout.on("data", stdoutDataListener);
|
|
349487
349928
|
child.stderr.on("data", (chunk) => {
|
|
349488
349929
|
if (!FORWARD_HOST_STDERR) {
|
|
349489
349930
|
return;
|
|
@@ -349724,6 +350165,20 @@ class HostTransport {
|
|
|
349724
350165
|
}
|
|
349725
350166
|
pending.resolve(record3.result);
|
|
349726
350167
|
}
|
|
350168
|
+
onStdoutChunk(chunk) {
|
|
350169
|
+
this.stdoutBuffer += chunk;
|
|
350170
|
+
let newlineIndex = this.stdoutBuffer.indexOf(`
|
|
350171
|
+
`);
|
|
350172
|
+
while (newlineIndex !== -1) {
|
|
350173
|
+
let line = this.stdoutBuffer.slice(0, newlineIndex);
|
|
350174
|
+
this.stdoutBuffer = this.stdoutBuffer.slice(newlineIndex + 1);
|
|
350175
|
+
if (line.endsWith("\r"))
|
|
350176
|
+
line = line.slice(0, -1);
|
|
350177
|
+
this.onStdoutLine(line);
|
|
350178
|
+
newlineIndex = this.stdoutBuffer.indexOf(`
|
|
350179
|
+
`);
|
|
350180
|
+
}
|
|
350181
|
+
}
|
|
349727
350182
|
mapJsonRpcError(rawError) {
|
|
349728
350183
|
if (typeof rawError !== "object" || rawError == null || Array.isArray(rawError)) {
|
|
349729
350184
|
return new SuperDocCliError("Host returned an unknown JSON-RPC error.", {
|
|
@@ -349782,15 +350237,14 @@ class HostTransport {
|
|
|
349782
350237
|
this.indeterminateDiscardCloses.clear();
|
|
349783
350238
|
const child = this.child;
|
|
349784
350239
|
if (child) {
|
|
350240
|
+
if (this.stdoutDataListener)
|
|
350241
|
+
child.stdout.off("data", this.stdoutDataListener);
|
|
349785
350242
|
child.removeAllListeners();
|
|
349786
350243
|
child.kill("SIGKILL");
|
|
349787
350244
|
}
|
|
349788
350245
|
this.child = null;
|
|
349789
|
-
|
|
349790
|
-
|
|
349791
|
-
this.stdoutReader.close();
|
|
349792
|
-
this.stdoutReader = null;
|
|
349793
|
-
}
|
|
350246
|
+
this.stdoutBuffer = "";
|
|
350247
|
+
this.stdoutDataListener = null;
|
|
349794
350248
|
const pendingEntries = Array.from(this.pending.values());
|
|
349795
350249
|
this.pending.clear();
|
|
349796
350250
|
const rejection = error48 ?? new SuperDocCliError("Host process was disposed while request was in flight.", {
|
|
@@ -349815,7 +350269,7 @@ var init_host = __esm(() => {
|
|
|
349815
350269
|
});
|
|
349816
350270
|
|
|
349817
350271
|
// ../../packages/sdk/langs/node/src/runtime/sdk-version.generated.ts
|
|
349818
|
-
var SDK_VERSION = "2.13.0-next.
|
|
350272
|
+
var SDK_VERSION = "2.13.0-next.14";
|
|
349819
350273
|
|
|
349820
350274
|
// ../../packages/sdk/langs/node/src/runtime/embedded-platform.ts
|
|
349821
350275
|
import { chmodSync, existsSync } from "node:fs";
|
|
@@ -389438,8 +389892,8 @@ function evaluateChecks(pre, post, checks4) {
|
|
|
389438
389892
|
} else if (check2.kind === "tracked-change-count-delta") {
|
|
389439
389893
|
results.push({
|
|
389440
389894
|
check: check2,
|
|
389441
|
-
passed: post.trackedChanges
|
|
389442
|
-
detail: `pre=${pre.trackedChanges
|
|
389895
|
+
passed: post.counts.trackedChanges - pre.counts.trackedChanges === check2.delta,
|
|
389896
|
+
detail: `pre=${pre.counts.trackedChanges} post=${post.counts.trackedChanges}`
|
|
389443
389897
|
});
|
|
389444
389898
|
} else if (check2.kind === "revision-changed") {
|
|
389445
389899
|
results.push({
|
|
@@ -390199,11 +390653,19 @@ async function runDeleteBlocks(doc2, args) {
|
|
|
390199
390653
|
const changeMode = parseChangeMode4(args.changeMode);
|
|
390200
390654
|
const executedOperations = [];
|
|
390201
390655
|
const deleted = [];
|
|
390656
|
+
const addressedTrackedChangeIds = new Set;
|
|
390657
|
+
let allTrackedEffectsAddressed = true;
|
|
390202
390658
|
for (const target of targets) {
|
|
390203
390659
|
try {
|
|
390204
390660
|
const result = await deleteFn({ target: { kind: "block", nodeType: target.nodeType, nodeId: target.nodeId } }, changeMode ? { changeMode } : undefined);
|
|
390205
390661
|
executedOperations.push({ operationId: "doc.blocks.delete", result: compactOpResult(result) });
|
|
390206
390662
|
deleted.push({ nodeId: target.nodeId, nodeType: target.nodeType });
|
|
390663
|
+
if (changeMode === "tracked") {
|
|
390664
|
+
const refIds = trackedChangeRefIds(result);
|
|
390665
|
+
allTrackedEffectsAddressed &&= refIds.size > 0;
|
|
390666
|
+
for (const entityId of refIds)
|
|
390667
|
+
addressedTrackedChangeIds.add(entityId);
|
|
390668
|
+
}
|
|
390207
390669
|
} catch (err) {
|
|
390208
390670
|
errors4.push({
|
|
390209
390671
|
code: "ACTION_FAILED",
|
|
@@ -390213,12 +390675,26 @@ async function runDeleteBlocks(doc2, args) {
|
|
|
390213
390675
|
}
|
|
390214
390676
|
}
|
|
390215
390677
|
const post = await buildMutationSnapshot(doc2, { includeDomains: [...domains] });
|
|
390216
|
-
const
|
|
390678
|
+
const observedTrackedChangeDelta = post.counts.trackedChanges - pre.counts.trackedChanges;
|
|
390679
|
+
const expectedTrackedChangeDelta = deleted.length > 1 ? observedTrackedChangeDelta : allTrackedEffectsAddressed ? addressedTrackedChangeIds.size : Math.max(observedTrackedChangeDelta, addressedTrackedChangeIds.size);
|
|
390680
|
+
const checks4 = changeMode === "tracked" ? [
|
|
390681
|
+
{
|
|
390682
|
+
kind: "tracked-change-count-delta",
|
|
390683
|
+
delta: expectedTrackedChangeDelta
|
|
390684
|
+
}
|
|
390685
|
+
] : [...new Set(deleted.map((entry) => entry.nodeType))].map((nodeType) => ({
|
|
390217
390686
|
kind: "block-count-delta",
|
|
390218
390687
|
nodeType,
|
|
390219
390688
|
delta: -deleted.filter((entry) => entry.nodeType === nodeType).length
|
|
390220
390689
|
}));
|
|
390221
390690
|
const verification = evaluateChecks(pre, post, checks4);
|
|
390691
|
+
if (changeMode === "tracked" && observedTrackedChangeDelta <= 0) {
|
|
390692
|
+
verification[0] = {
|
|
390693
|
+
...verification[0],
|
|
390694
|
+
passed: false,
|
|
390695
|
+
detail: `pre=${pre.counts.trackedChanges} post=${post.counts.trackedChanges}; no tracked review entity was created`
|
|
390696
|
+
};
|
|
390697
|
+
}
|
|
390222
390698
|
const allApplied = deleted.length === targets.length && errors4.length === 0;
|
|
390223
390699
|
const verified = verification.every((v) => v.passed);
|
|
390224
390700
|
return {
|
|
@@ -392653,6 +393129,15 @@ function compactOpResult(result) {
|
|
|
392653
393129
|
compact.stepCount = result.steps.length;
|
|
392654
393130
|
return compact;
|
|
392655
393131
|
}
|
|
393132
|
+
function trackedChangeRefIds(result) {
|
|
393133
|
+
const refs = asRecord2(result)?.trackedChangeRefs;
|
|
393134
|
+
if (!Array.isArray(refs))
|
|
393135
|
+
return new Set;
|
|
393136
|
+
return new Set(refs.flatMap((entry) => {
|
|
393137
|
+
const entityId = asString2(asRecord2(entry)?.entityId);
|
|
393138
|
+
return entityId ? [entityId] : [];
|
|
393139
|
+
}));
|
|
393140
|
+
}
|
|
392656
393141
|
function parseScopedReplaceArgs(args, changeMode) {
|
|
392657
393142
|
if (args.action !== "replace_text")
|
|
392658
393143
|
return null;
|
|
@@ -397656,6 +398141,7 @@ var init_address = __esm(() => {
|
|
|
397656
398141
|
SELECTION_EDGE_NODE_TYPES = [
|
|
397657
398142
|
"paragraph",
|
|
397658
398143
|
"heading",
|
|
398144
|
+
"listItem",
|
|
397659
398145
|
"table",
|
|
397660
398146
|
"tableOfContents",
|
|
397661
398147
|
"sdt",
|
|
@@ -408939,7 +409425,7 @@ var init_schemas4 = __esm(() => {
|
|
|
408939
409425
|
type: "array",
|
|
408940
409426
|
items: objectSchema2({
|
|
408941
409427
|
id: { type: "string" },
|
|
408942
|
-
type: { enum: [
|
|
409428
|
+
type: { enum: [...trackChangeBroadTypeEnum] },
|
|
408943
409429
|
subtype: { type: "string" },
|
|
408944
409430
|
sourceIds: trackChangeSourceIdsSchema
|
|
408945
409431
|
}, ["id", "type", "subtype", "sourceIds"])
|
|
@@ -469970,10 +470456,13 @@ function buildTextRewriteReviewGroupId(storyId, origin, noteId) {
|
|
|
469970
470456
|
function projectRewriteGroups(input) {
|
|
469971
470457
|
const groups = new Map;
|
|
469972
470458
|
for (const entry of input.byId.values()) {
|
|
469973
|
-
if (entry.reviewGroup
|
|
470459
|
+
if (entry.reviewGroup)
|
|
470460
|
+
continue;
|
|
470461
|
+
const carriers = ["insertion", "deletion", "replacement"].includes(entry.type) ? entry.fragments : entry.type === "structural" && (entry.subtype === "footnote-deletion" || entry.subtype === "endnote-deletion") ? entry.structuralFragments : [];
|
|
470462
|
+
if (carriers.length === 0)
|
|
469974
470463
|
continue;
|
|
469975
|
-
const origin = readRewriteGroupId(
|
|
469976
|
-
if (!origin ||
|
|
470464
|
+
const origin = readRewriteGroupId(carriers[0]);
|
|
470465
|
+
if (!origin || carriers.some((carrier) => readRewriteGroupId(carrier) !== origin))
|
|
469977
470466
|
continue;
|
|
469978
470467
|
const id = buildTextRewriteReviewGroupId(entry.storyId, origin, entry.noteId);
|
|
469979
470468
|
const members = groups.get(id) ?? [];
|
|
@@ -469985,13 +470474,15 @@ function projectRewriteGroups(input) {
|
|
|
469985
470474
|
const first = children[0];
|
|
469986
470475
|
const display = children.some((child) => child.fragments.some((fragment2) => fragment2.customAttributes?.some((attribute) => attribute.namespaceUri === REWRITE_NAMESPACE && attribute.localName === "display" && attribute.value === "children"))) ? { display: "children" } : {};
|
|
469987
470476
|
const fragments = children.flatMap((child) => child.fragments).sort((a, b) => a.byteStart - b.byteStart);
|
|
470477
|
+
const structuralFragments = children.flatMap((child) => child.structuralFragments).sort((a, b) => a.byteStart - b.byteStart);
|
|
469988
470478
|
const inserted = fragments.filter((fragment2) => fragment2.kind === "ins");
|
|
469989
470479
|
const deleted = fragments.filter((fragment2) => fragment2.kind === "del");
|
|
469990
|
-
const
|
|
470480
|
+
const hasStructuralDeletion = children.some((child) => child.type === "structural" && (child.subtype === "footnote-deletion" || child.subtype === "endnote-deletion"));
|
|
470481
|
+
const type = inserted.length === 0 ? "deletion" : deleted.length === 0 && !hasStructuralDeletion ? "insertion" : "replacement";
|
|
469991
470482
|
const wordIdInsert = inserted.find((fragment2) => fragment2.wId)?.wId;
|
|
469992
|
-
const wordIdDelete = deleted.find((fragment2) => fragment2.wId)?.wId;
|
|
470483
|
+
const wordIdDelete = deleted.find((fragment2) => fragment2.wId)?.wId ?? children.find((child) => child.sourceIds.wordIdDelete)?.sourceIds.wordIdDelete;
|
|
469993
470484
|
const rsids = [
|
|
469994
|
-
...new Set(
|
|
470485
|
+
...new Set(children.flatMap((child) => child.sourceIds.rsids))
|
|
469995
470486
|
];
|
|
469996
470487
|
const parent = {
|
|
469997
470488
|
...first,
|
|
@@ -470010,11 +470501,16 @@ function projectRewriteGroups(input) {
|
|
|
470010
470501
|
wordIdInsert,
|
|
470011
470502
|
wordIdDelete,
|
|
470012
470503
|
wordIdOther: [
|
|
470013
|
-
...new Set(
|
|
470504
|
+
...new Set(children.flatMap((child) => [
|
|
470505
|
+
...child.sourceIds.wordIdOther,
|
|
470506
|
+
...child.sourceIds.wordIdInsert ? [child.sourceIds.wordIdInsert] : [],
|
|
470507
|
+
...child.sourceIds.wordIdDelete ? [child.sourceIds.wordIdDelete] : []
|
|
470508
|
+
]).filter((value) => Boolean(value) && value !== wordIdInsert && value !== wordIdDelete))
|
|
470014
470509
|
],
|
|
470015
470510
|
rsids
|
|
470016
470511
|
},
|
|
470017
470512
|
fragments,
|
|
470513
|
+
structuralFragments,
|
|
470018
470514
|
reviewGroup: {
|
|
470019
470515
|
kind: "text-rewrite",
|
|
470020
470516
|
...display,
|
|
@@ -470022,17 +470518,31 @@ function projectRewriteGroups(input) {
|
|
|
470022
470518
|
parentId: null,
|
|
470023
470519
|
ownedChildIds: children.map((child) => child.id),
|
|
470024
470520
|
duplicateDisplayPolicy: "subsumed",
|
|
470025
|
-
members: children.flatMap((child) =>
|
|
470026
|
-
|
|
470027
|
-
|
|
470028
|
-
|
|
470029
|
-
|
|
470030
|
-
|
|
470031
|
-
|
|
470032
|
-
|
|
470033
|
-
|
|
470034
|
-
|
|
470035
|
-
|
|
470521
|
+
members: children.flatMap((child) => [
|
|
470522
|
+
...child.fragments.map((fragment2) => ({
|
|
470523
|
+
logicalId: child.id,
|
|
470524
|
+
carrier: "text",
|
|
470525
|
+
partUri: fragment2.partUri,
|
|
470526
|
+
storyId: fragment2.storyId,
|
|
470527
|
+
rsid: fragment2.rsid,
|
|
470528
|
+
wordId: fragment2.wId,
|
|
470529
|
+
subtype: child.subtype,
|
|
470530
|
+
byteStart: fragment2.byteStart,
|
|
470531
|
+
byteEnd: fragment2.byteEnd
|
|
470532
|
+
})),
|
|
470533
|
+
...child.structuralFragments.map((fragment2) => ({
|
|
470534
|
+
logicalId: child.id,
|
|
470535
|
+
carrier: "structural",
|
|
470536
|
+
partUri: fragment2.partUri,
|
|
470537
|
+
storyId: fragment2.storyId,
|
|
470538
|
+
rsid: fragment2.rsid,
|
|
470539
|
+
entityKey: fragment2.entityKey,
|
|
470540
|
+
wordId: fragment2.wId,
|
|
470541
|
+
subtype: child.subtype,
|
|
470542
|
+
byteStart: fragment2.byteStart,
|
|
470543
|
+
byteEnd: fragment2.byteEnd
|
|
470544
|
+
}))
|
|
470545
|
+
])
|
|
470036
470546
|
}
|
|
470037
470547
|
};
|
|
470038
470548
|
for (const child of children)
|
|
@@ -488928,9 +489438,10 @@ function isBreakRunToken(token) {
|
|
|
488928
489438
|
return token.kind === "unsupported" && token.inertBreakRun !== undefined;
|
|
488929
489439
|
}
|
|
488930
489440
|
function compileOverlapEdit(input) {
|
|
488931
|
-
const readsComplexDeletionForCollapsedInsert = input.newText.length > 0 && input.rangeStart === input.rangeEnd && ((input.coordinateSpace ?? "visible") === "visible" || input.changeMode === "tracked");
|
|
488932
|
-
const readsComplexDeletions = (input.changeMode === "direct" || input.newText.length === 0) && input.rangeStart < input.rangeEnd || readsComplexDeletionForCollapsedInsert;
|
|
488933
489441
|
const paragraphInlineMap = input.paragraphInlineMap ?? parseParagraphInlineMap(input.paragraphXml, input.namespaceBindings);
|
|
489442
|
+
const readsComplexDeletionForCollapsedInsert = input.newText.length > 0 && input.rangeStart === input.rangeEnd && ((input.coordinateSpace ?? "visible") === "visible" || input.changeMode === "tracked");
|
|
489443
|
+
const readsStructuralDeletionForReplacement = input.changeMode === "tracked" && input.newText.length > 0 && input.rangeStart < input.rangeEnd && paragraphInlineMap.pieces.some((piece) => piece.kind === "tracked" && piece.trackedKind === "del" && piece.visibleStart === piece.visibleEnd && input.rangeStart < piece.visibleStart && input.rangeEnd > piece.visibleEnd && piece.children.some(isSupportedStructuralDeletionChild));
|
|
489444
|
+
const readsComplexDeletions = (input.changeMode === "direct" || input.newText.length === 0) && input.rangeStart < input.rangeEnd || readsComplexDeletionForCollapsedInsert || readsStructuralDeletionForReplacement;
|
|
488934
489445
|
if (input.newText.length > 0 && input.rangeStart === input.rangeEnd && hasNonWordMarkerAtCollapsedMoveBoundary(paragraphInlineMap.pieces, input.rangeStart, input.coordinateSpace ?? "visible")) {
|
|
488935
489446
|
return {
|
|
488936
489447
|
ok: false,
|
|
@@ -488938,7 +489449,7 @@ function compileOverlapEdit(input) {
|
|
|
488938
489449
|
detail: "overlap compiler: foreign marker at a move boundary."
|
|
488939
489450
|
};
|
|
488940
489451
|
}
|
|
488941
|
-
const parsed = tokenizeParagraph(input.paragraphXml, input.coordinateSpace ?? "visible", input.namespaceBindings, readsComplexDeletions, input.rangeStart, input.rangeEnd, paragraphInlineMap, input.changeMode === "tracked", true);
|
|
489452
|
+
const parsed = tokenizeParagraph(input.paragraphXml, input.coordinateSpace ?? "visible", input.namespaceBindings, readsComplexDeletions, input.rangeStart, input.rangeEnd, paragraphInlineMap, input.changeMode === "tracked", true, readsStructuralDeletionForReplacement);
|
|
488942
489453
|
if (!parsed.ok)
|
|
488943
489454
|
return parsed;
|
|
488944
489455
|
const result = compileParsedOverlapEdit(input, parsed.tokens, parsed.descendedEditableContainers);
|
|
@@ -489453,7 +489964,15 @@ function tryPureDeleteAcrossTokens(input, allTokens, touched, touchedBreaks = []
|
|
|
489453
489964
|
function tryRangeReplacementAcrossTokens(input, allTokens, touched) {
|
|
489454
489965
|
if (input.newText.length === 0 || input.rangeStart >= input.rangeEnd)
|
|
489455
489966
|
return null;
|
|
489456
|
-
const firstSelected = touched.
|
|
489967
|
+
const firstSelected = touched.sort((left, right) => left.index - right.index).find(({ token }) => {
|
|
489968
|
+
if (token.kind === "plain") {
|
|
489969
|
+
return input.rangeStart >= token.visibleStart && input.rangeStart < token.visibleEnd;
|
|
489970
|
+
}
|
|
489971
|
+
if (token.kind !== "ins" || input.changeMode !== "tracked")
|
|
489972
|
+
return false;
|
|
489973
|
+
const classification = token._classification;
|
|
489974
|
+
return classification !== "same-user" && input.rangeStart >= token.visibleStart && input.rangeStart < token.visibleEnd && input.rangeEnd > token.visibleEnd;
|
|
489975
|
+
});
|
|
489457
489976
|
if (!firstSelected)
|
|
489458
489977
|
return null;
|
|
489459
489978
|
const touchedInsertions = touched.filter((entry) => entry.token.kind === "ins");
|
|
@@ -489634,6 +490153,21 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
|
|
|
489634
490153
|
}
|
|
489635
490154
|
const nestedHead = renderPlainRun(head, token.inner.runOpen, token.inner.runClose, token.inner.rPr);
|
|
489636
490155
|
const nestedTail = renderPlainRun(tail, token.inner.runOpen, token.inner.runClose, token.inner.rPr);
|
|
490156
|
+
const childIns = !replacementInserted && input.newText.length > 0 && input.rangeStart >= token.visibleStart && input.rangeStart < token.visibleEnd && input.rangeEnd > token.visibleEnd ? buildInsWrapperXml({
|
|
490157
|
+
namespaceReferenceOpenTag: token.openTag,
|
|
490158
|
+
nsPrefix: token.nsPrefix,
|
|
490159
|
+
wId: allocWId("insert", input.insRsid),
|
|
490160
|
+
author: currentAuthor,
|
|
490161
|
+
date: input.txTimestamp,
|
|
490162
|
+
rsidR: input.insRsid,
|
|
490163
|
+
inner: {
|
|
490164
|
+
runOpen: token.inner.runOpen,
|
|
490165
|
+
runClose: token.inner.runClose,
|
|
490166
|
+
rPr: token.inner.rPr,
|
|
490167
|
+
text: input.newText
|
|
490168
|
+
}
|
|
490169
|
+
}) : "";
|
|
490170
|
+
const splitTailWId = childIns && head.length > 0 ? String(input.reserveWId ? input.reserveWId() : fallbackWId++) : token.wId;
|
|
489637
490171
|
const childDel = buildDelWrapperXml({
|
|
489638
490172
|
nsPrefix: token.nsPrefix,
|
|
489639
490173
|
wId: allocWId("delete", input.rsid),
|
|
@@ -489642,7 +490176,35 @@ function authorTrackedPureDelete(input, allTokens, touched, touchedBreaks = [])
|
|
|
489642
490176
|
rsidDel: input.rsid,
|
|
489643
490177
|
inner: { runOpen: token.inner.runOpen, runClose: token.inner.runClose, rPr: token.inner.rPr, text: removed }
|
|
489644
490178
|
});
|
|
489645
|
-
|
|
490179
|
+
if (childIns) {
|
|
490180
|
+
const headIns = head.length > 0 ? buildInsWrapperXml({
|
|
490181
|
+
openTag: token.openTag,
|
|
490182
|
+
namespaceBindings: token.namespaceBindings,
|
|
490183
|
+
nsPrefix: token.nsPrefix,
|
|
490184
|
+
wId: token.wId,
|
|
490185
|
+
author: token.author,
|
|
490186
|
+
date: token.date,
|
|
490187
|
+
rsidR: token.rsidR,
|
|
490188
|
+
inner: { ...token.inner, text: head }
|
|
490189
|
+
}) : "";
|
|
490190
|
+
const tailIns = buildInsWrapperXml({
|
|
490191
|
+
openTag: token.openTag,
|
|
490192
|
+
namespaceBindings: token.namespaceBindings,
|
|
490193
|
+
nsPrefix: token.nsPrefix,
|
|
490194
|
+
wId: splitTailWId,
|
|
490195
|
+
author: token.author,
|
|
490196
|
+
date: token.date,
|
|
490197
|
+
rsidR: token.rsidR,
|
|
490198
|
+
inner: { ...token.inner, text: tail },
|
|
490199
|
+
innerXml: childDel + nestedTail
|
|
490200
|
+
});
|
|
490201
|
+
pieces.push(headIns + childIns + tailIns);
|
|
490202
|
+
replacementInserted = true;
|
|
490203
|
+
if (!emittedRsids.includes(input.insRsid))
|
|
490204
|
+
emittedRsids.push(input.insRsid);
|
|
490205
|
+
} else {
|
|
490206
|
+
pieces.push(`${token.openTag}${nestedHead}${childDel}${nestedTail}${token.closeTag}`);
|
|
490207
|
+
}
|
|
489646
490208
|
emitDeletionRsid();
|
|
489647
490209
|
}
|
|
489648
490210
|
pieces.push(input.paragraphXml.slice(cursor));
|
|
@@ -490684,7 +491246,7 @@ function compilePlainOnlyTrackedDeletion(input, touched) {
|
|
|
490684
491246
|
}
|
|
490685
491247
|
function buildInsWrapperXml(params) {
|
|
490686
491248
|
const inner = params.innerXml ?? renderPlainRun(params.inner.text, params.inner.runOpen, params.inner.runClose, params.inner.rPr);
|
|
490687
|
-
const namespace = wordRevisionNamespace(params.inner.runOpen, inner);
|
|
491249
|
+
const namespace = params.namespaceReferenceOpenTag ? wordReplacementRevisionNamespace(params.namespaceReferenceOpenTag, inner) : wordRevisionNamespace(params.inner.runOpen, inner);
|
|
490688
491250
|
const attrs = buildAttrChain({
|
|
490689
491251
|
id: params.wId,
|
|
490690
491252
|
author: params.author.name,
|
|
@@ -490788,7 +491350,7 @@ function buildAttrChain(params, prefix) {
|
|
|
490788
491350
|
out += ` ${prefix}:rsidDel="${escapeXmlAttribute(params.rsidDel)}"`;
|
|
490789
491351
|
return out;
|
|
490790
491352
|
}
|
|
490791
|
-
function tokenizeParagraph(paragraphXml, coordinateSpace, inheritedNamespaceBindings = {}, allowComplexDeletions = false, rangeStart = 0, rangeEnd = 0, preparedMap, allowTrackedCoordinateEditableTextContainers = false, validateRangeExtent = false) {
|
|
491353
|
+
function tokenizeParagraph(paragraphXml, coordinateSpace, inheritedNamespaceBindings = {}, allowComplexDeletions = false, rangeStart = 0, rangeEnd = 0, preparedMap, allowTrackedCoordinateEditableTextContainers = false, validateRangeExtent = false, allowStructuralDeletionPassThrough = false) {
|
|
490792
491354
|
const paragraph = findRawXmlElementRangeAt(paragraphXml, 0, NS_W3, "p", {
|
|
490793
491355
|
w: NS_W3,
|
|
490794
491356
|
...inheritedNamespaceBindings
|
|
@@ -490835,7 +491397,7 @@ function tokenizeParagraph(paragraphXml, coordinateSpace, inheritedNamespaceBind
|
|
|
490835
491397
|
continue;
|
|
490836
491398
|
}
|
|
490837
491399
|
if (piece.kind === "tracked") {
|
|
490838
|
-
tokens.push(trackedToken(piece, spanStart, spanEnd, allowComplexDeletions));
|
|
491400
|
+
tokens.push(trackedToken(piece, spanStart, spanEnd, allowComplexDeletions, allowStructuralDeletionPassThrough));
|
|
490839
491401
|
i2 += 1;
|
|
490840
491402
|
continue;
|
|
490841
491403
|
}
|
|
@@ -490955,7 +491517,26 @@ function runToken(leaves, runCharStart, runCharEnd, enclosesForeign, spanStart,
|
|
|
490955
491517
|
...inertBreakRun ? { inertBreakRun } : {}
|
|
490956
491518
|
};
|
|
490957
491519
|
}
|
|
490958
|
-
function
|
|
491520
|
+
function isSupportedStructuralDeletionChild(piece) {
|
|
491521
|
+
if (piece.kind === "noteReference")
|
|
491522
|
+
return true;
|
|
491523
|
+
if (piece.kind !== "container")
|
|
491524
|
+
return false;
|
|
491525
|
+
if (piece.containerKind === "complexField") {
|
|
491526
|
+
return piece.resultCharStart != null && piece.resultCharEnd != null && !piece.children.some((child) => child.kind === "container" || child.kind === "control" || child.kind === "unknown");
|
|
491527
|
+
}
|
|
491528
|
+
if (piece.namespaceBindings.get(piece.prefix ?? "") !== NS_W3)
|
|
491529
|
+
return false;
|
|
491530
|
+
if (piece.containerKind === "fldSimple") {
|
|
491531
|
+
return !piece.children.some((child) => child.kind === "container" || child.kind === "control" || child.kind === "unknown");
|
|
491532
|
+
}
|
|
491533
|
+
if (piece.containerKind === "sdt") {
|
|
491534
|
+
const policy = classifySdtMutationPolicy(piece);
|
|
491535
|
+
return policy.ok && policy.contentEditable && !piece.children.some((child) => child.kind === "container" || child.kind === "control" || child.kind === "unknown");
|
|
491536
|
+
}
|
|
491537
|
+
return piece.containerKind === "unknown" && (piece.localName === "smartTag" || piece.localName === "dir" || piece.localName === "bdo");
|
|
491538
|
+
}
|
|
491539
|
+
function trackedToken(piece, spanStart, spanEnd, allowComplexDeletions, allowStructuralDeletionPassThrough) {
|
|
490959
491540
|
const visibleStart = spanStart(piece);
|
|
490960
491541
|
const visibleEnd = spanEnd(piece);
|
|
490961
491542
|
const unsupported2 = (reason, detail) => ({
|
|
@@ -490995,7 +491576,7 @@ function trackedToken(piece, spanStart, spanEnd, allowComplexDeletions) {
|
|
|
490995
491576
|
})).sort((a, b) => a.localOffset - b.localOffset);
|
|
490996
491577
|
}
|
|
490997
491578
|
if (allowComplexDeletions && piece.trackedKind === "del") {
|
|
490998
|
-
const unsupportedChild = piece.children.find((child) => child.kind !== "text" && !(child.kind === "marker" && isCommentMarker2(child.markerKind)));
|
|
491579
|
+
const unsupportedChild = piece.children.find((child) => child.kind !== "text" && !(child.kind === "marker" && isCommentMarker2(child.markerKind)) && !(allowStructuralDeletionPassThrough && isSupportedStructuralDeletionChild(child)));
|
|
490999
491580
|
if (unsupportedChild) {
|
|
491000
491581
|
return unsupported2(unsupportedChild.kind === "control" ? "text-payload-unsupported-control-char" : "text-range-in-unsupported-tracked-wrapper", `overlap compiler: unsupported payload inside w:${piece.trackedKind}`);
|
|
491001
491582
|
}
|
|
@@ -491017,7 +491598,7 @@ function trackedToken(piece, spanStart, spanEnd, allowComplexDeletions) {
|
|
|
491017
491598
|
text: leaves.map((leaf) => leaf.decodedText).join("")
|
|
491018
491599
|
};
|
|
491019
491600
|
});
|
|
491020
|
-
const
|
|
491601
|
+
const hasUnrepresentedChildren = piece.children.some((child) => child.kind !== "text");
|
|
491021
491602
|
const runIdentityOf = (leaf) => `${leaf.runOpenTag}\x00${leaf.runProperties ?? ""}\x00${leaf.runCloseTag}`;
|
|
491022
491603
|
const firstRunIdentity = runIdentityOf(firstText);
|
|
491023
491604
|
const hasMixedRunProperties = textLeaves2.some((leaf) => runIdentityOf(leaf) !== firstRunIdentity);
|
|
@@ -491042,7 +491623,7 @@ function trackedToken(piece, spanStart, spanEnd, allowComplexDeletions) {
|
|
|
491042
491623
|
wId: piece.revisionId ?? "",
|
|
491043
491624
|
rsidDel: decodeNamespacedAttr(openTag2, piece.namespaceBindings, "rsidDel") ?? "",
|
|
491044
491625
|
sourceIdentity: revisionSourceIdentity(piece, openTag2),
|
|
491045
|
-
payloadHasUnrepresentedChildren:
|
|
491626
|
+
payloadHasUnrepresentedChildren: hasUnrepresentedChildren,
|
|
491046
491627
|
payloadHasMixedRunProperties: hasMixedRunProperties,
|
|
491047
491628
|
payloadRunCount: sourceRunCount,
|
|
491048
491629
|
payloadTextLeafCount: textLeaves2.length,
|
|
@@ -492323,6 +492904,7 @@ function runTrackedEditTextBatchCommit(input, edits) {
|
|
|
492323
492904
|
const preconditions = [];
|
|
492324
492905
|
const targetBlockIds = [];
|
|
492325
492906
|
const shifts = [];
|
|
492907
|
+
let requiresCollaborationSessionSync = false;
|
|
492326
492908
|
for (const [blockId, blockEdits] of byBlock) {
|
|
492327
492909
|
const paragraph = index.byParaId(blockId);
|
|
492328
492910
|
if (!paragraph || index.duplicateParaIds.has(blockId) || paragraph.partUri !== partUri || paragraph.partRevision !== first.on.partRevision || paragraph.storyRevision !== first.on.storyRevision || isParagraphInsideContentLockedBlockSdt(state, { storyId, partUri, blockId })) {
|
|
@@ -492394,6 +492976,7 @@ function runTrackedEditTextBatchCommit(input, edits) {
|
|
|
492394
492976
|
});
|
|
492395
492977
|
if (localized?.ok && !(edit.preserveExistingRevisions && localized.foldedInsRsid)) {
|
|
492396
492978
|
afterBytes = localized.bytes;
|
|
492979
|
+
requiresCollaborationSessionSync || (requiresCollaborationSessionSync = localized.requiresCollaborationSessionSync === true);
|
|
492397
492980
|
if (localized.foldedInsRsid) {
|
|
492398
492981
|
emittedByEdit.set(edit, []);
|
|
492399
492982
|
updatedByEdit.set(edit, [localized.foldedInsRsid]);
|
|
@@ -492419,7 +493002,7 @@ function runTrackedEditTextBatchCommit(input, edits) {
|
|
|
492419
493002
|
}
|
|
492420
493003
|
continue;
|
|
492421
493004
|
}
|
|
492422
|
-
if (localized && !localized.ok && localized.reason !== "text-range-in-unsupported-tracked-wrapper") {
|
|
493005
|
+
if (localized && !localized.ok && localized.reason !== "text-range-in-unsupported-tracked-wrapper" && localized.reason !== "text-range-in-field") {
|
|
492423
493006
|
return rejected2(txId, localized.reason);
|
|
492424
493007
|
}
|
|
492425
493008
|
const overlap = tryOverlapRewriteTracked({ ...input, op: batchOp }, afterBytes, paragraphWindow, paragraph.byteStart, {
|
|
@@ -492432,6 +493015,7 @@ function runTrackedEditTextBatchCommit(input, edits) {
|
|
|
492432
493015
|
if (!overlap.ok)
|
|
492433
493016
|
return rejected2(txId, overlap.reason);
|
|
492434
493017
|
afterBytes = overlap.bytes;
|
|
493018
|
+
requiresCollaborationSessionSync || (requiresCollaborationSessionSync = overlap.requiresCollaborationSessionSync === true);
|
|
492435
493019
|
emittedByEdit.set(edit, overlap.emittedRsids);
|
|
492436
493020
|
updatedByEdit.set(edit, overlap.updatedRsids);
|
|
492437
493021
|
for (const rsid of overlap.updatedRsids)
|
|
@@ -492579,6 +493163,7 @@ function runTrackedEditTextBatchCommit(input, edits) {
|
|
|
492579
493163
|
targetBlockIds,
|
|
492580
493164
|
atomCarrierContract: SD_DEFAULT_ATOM_CARRIER_CONTRACT,
|
|
492581
493165
|
resyncFromSession: true,
|
|
493166
|
+
...requiresCollaborationSessionSync ? { sessionSync: { reason: "structural-inline-edit" } } : {},
|
|
492582
493167
|
...trackedAnnotations.length > 0 ? { trackedTextAnnotations: trackedAnnotations } : {},
|
|
492583
493168
|
...trackedTextEditOutcomes.length > 0 ? { trackedTextEditOutcomes } : {},
|
|
492584
493169
|
...resolvedInsertionRevisions.length > 0 ? {
|
|
@@ -496099,6 +496684,7 @@ function parsePlainRun(runXml, textStart, byteStart, byteEnd, options = {}) {
|
|
|
496099
496684
|
childRe.lastIndex = runOpen.length;
|
|
496100
496685
|
let tMatch = null;
|
|
496101
496686
|
let controlKind = null;
|
|
496687
|
+
let controlXml = null;
|
|
496102
496688
|
let leadingTransparentXml = "";
|
|
496103
496689
|
let trailingTransparentXml = "";
|
|
496104
496690
|
while (true) {
|
|
@@ -496171,6 +496757,7 @@ function parsePlainRun(runXml, textStart, byteStart, byteEnd, options = {}) {
|
|
|
496171
496757
|
if (tMatch || controlKind)
|
|
496172
496758
|
return fail4("invalid-range");
|
|
496173
496759
|
controlKind = local;
|
|
496760
|
+
controlXml = m[0];
|
|
496174
496761
|
continue;
|
|
496175
496762
|
}
|
|
496176
496763
|
if (local === "drawing" || local === "pict" || local === "object") {
|
|
@@ -496194,6 +496781,7 @@ function parsePlainRun(runXml, textStart, byteStart, byteEnd, options = {}) {
|
|
|
496194
496781
|
xml: runXml,
|
|
496195
496782
|
kind: "control",
|
|
496196
496783
|
controlKind,
|
|
496784
|
+
...controlXml ? { controlXml } : {},
|
|
496197
496785
|
textStart,
|
|
496198
496786
|
textEnd: textStart + 1,
|
|
496199
496787
|
text: INLINE_CONTROL_PLACEHOLDER,
|
|
@@ -496547,6 +497135,8 @@ function rewriteRunSpanTrackedReplacePreservingMarkers(paragraphXml, span, stamp
|
|
|
496547
497135
|
let emittedDelete = false;
|
|
496548
497136
|
for (let i2 = span.firstRunIdx;i2 <= span.lastRunIdx; i2 += 1) {
|
|
496549
497137
|
const run = span.runs[i2];
|
|
497138
|
+
if (run.kind === "control" && run.controlKind == null)
|
|
497139
|
+
continue;
|
|
496550
497140
|
const start = i2 === span.firstRunIdx ? span.startInFirstRun : 0;
|
|
496551
497141
|
const end = i2 === span.lastRunIdx ? span.endInLastRun : run.text.length;
|
|
496552
497142
|
if (start === end)
|
|
@@ -496576,6 +497166,38 @@ function rewriteRunSpanTrackedReplacePreservingMarkers(paragraphXml, span, stamp
|
|
|
496576
497166
|
inserted || (inserted = wrappedInsert.length > 0);
|
|
496577
497167
|
emittedDelete || (emittedDelete = wrappedDelete.length > 0);
|
|
496578
497168
|
}
|
|
497169
|
+
const model = parseParagraphInlineMap(paragraphXml);
|
|
497170
|
+
const leaves = model.leaves();
|
|
497171
|
+
const paragraphBytes = TE16.encode(paragraphXml);
|
|
497172
|
+
const charOffsetAtByte = (byteOffset) => TD38.decode(paragraphBytes.subarray(0, byteOffset)).length;
|
|
497173
|
+
for (const piece of model.pieces) {
|
|
497174
|
+
const selected = piece.visibleEnd > piece.visibleStart && span.runs[span.firstRunIdx].textStart + span.startInFirstRun <= piece.visibleStart && span.runs[span.lastRunIdx].textStart + span.endInLastRun >= piece.visibleEnd;
|
|
497175
|
+
if (!selected)
|
|
497176
|
+
continue;
|
|
497177
|
+
let start;
|
|
497178
|
+
let end;
|
|
497179
|
+
let inner;
|
|
497180
|
+
if (piece.kind === "noteReference" && !piece.deleted) {
|
|
497181
|
+
const runLeaves = leaves.filter((leaf) => ("runByteStart" in leaf) && leaf.runByteStart === piece.runByteStart && leaf.runByteEnd === piece.runByteEnd);
|
|
497182
|
+
if (runLeaves.length !== 1 || runLeaves[0] !== piece)
|
|
497183
|
+
continue;
|
|
497184
|
+
start = charOffsetAtByte(piece.runByteStart);
|
|
497185
|
+
end = charOffsetAtByte(piece.runByteEnd);
|
|
497186
|
+
inner = paragraphXml.slice(start, end);
|
|
497187
|
+
} else if (piece.kind === "container" && piece.containerKind === "unknown" && piece.namespaceBindings.get(piece.prefix ?? "") === NS_W && (piece.localName === "smartTag" || piece.localName === "dir" || piece.localName === "bdo") && !piece.containerStack.some((scope) => scope.deleted)) {
|
|
497188
|
+
start = piece.charStart;
|
|
497189
|
+
end = piece.charEnd;
|
|
497190
|
+
inner = piece.rawXml;
|
|
497191
|
+
} else {
|
|
497192
|
+
continue;
|
|
497193
|
+
}
|
|
497194
|
+
ops.push({
|
|
497195
|
+
start,
|
|
497196
|
+
end,
|
|
497197
|
+
xml: buildDeletedContentWrapper(inner, inner, delStamp)
|
|
497198
|
+
});
|
|
497199
|
+
emittedDelete = true;
|
|
497200
|
+
}
|
|
496579
497201
|
ops.sort((a, b) => b.start - a.start);
|
|
496580
497202
|
let xml = paragraphXml;
|
|
496581
497203
|
for (const op of ops) {
|
|
@@ -497069,7 +497691,7 @@ function buildDeletedRunXmlFromRunSpan(span) {
|
|
|
497069
497691
|
for (let i2 = span.firstRunIdx;i2 <= span.lastRunIdx; i2 += 1) {
|
|
497070
497692
|
const run = span.runs[i2];
|
|
497071
497693
|
if (run.kind === "control") {
|
|
497072
|
-
const control = `<${wordTextName(run.runOpen, run.controlKind ?? "br")}/>`;
|
|
497694
|
+
const control = run.controlXml ?? `<${wordTextName(run.runOpen, run.controlKind ?? "br")}/>`;
|
|
497073
497695
|
inner += `${run.runOpen}${run.rPr}${control}${run.runClose}`;
|
|
497074
497696
|
continue;
|
|
497075
497697
|
}
|
|
@@ -508458,6 +509080,7 @@ function runParagraphDeleteCommit(input) {
|
|
|
508458
509080
|
if (!trackedStamp)
|
|
508459
509081
|
return rejected8(input.txId, "no-author-configured");
|
|
508460
509082
|
let trackedXml = paraXml;
|
|
509083
|
+
const paragraphMarkCreatedRefs = [];
|
|
508461
509084
|
if (target.entry.textLength > 0) {
|
|
508462
509085
|
const wrapped = wrapParagraphTextSpanTrackedDelete(paraXml, 0, target.entry.textLength, { rsid: trackedStamp.rsid, author: trackedStamp.author, date: trackedStamp.date }, input.state);
|
|
508463
509086
|
if (!wrapped.ok)
|
|
@@ -508465,7 +509088,11 @@ function runParagraphDeleteCommit(input) {
|
|
|
508465
509088
|
trackedXml = wrapped.xml;
|
|
508466
509089
|
}
|
|
508467
509090
|
if (successor) {
|
|
508468
|
-
trackedXml = injectParagraphMarkTrackedMarker(trackedXml, "del", trackedStamp)
|
|
509091
|
+
trackedXml = injectParagraphMarkTrackedMarker(trackedXml, "del", trackedStamp, target.entry.textLength === 0 || structural.hasSectPr ? (entityId) => paragraphMarkCreatedRefs.push({
|
|
509092
|
+
kind: "trackedChange",
|
|
509093
|
+
entityId,
|
|
509094
|
+
storyId: op.target.storyId
|
|
509095
|
+
}) : undefined);
|
|
508469
509096
|
}
|
|
508470
509097
|
const patch = {
|
|
508471
509098
|
kind: "replaceBytes",
|
|
@@ -508482,11 +509109,12 @@ function runParagraphDeleteCommit(input) {
|
|
|
508482
509109
|
patches: [patch],
|
|
508483
509110
|
textRangeShifts: [],
|
|
508484
509111
|
createdRefs: [
|
|
508485
|
-
{
|
|
509112
|
+
...target.entry.textLength > 0 ? [{
|
|
508486
509113
|
kind: "trackedChange",
|
|
508487
509114
|
entityId: trackedStamp.rsid,
|
|
508488
509115
|
storyId: op.target.storyId
|
|
508489
|
-
}
|
|
509116
|
+
}] : [],
|
|
509117
|
+
...paragraphMarkCreatedRefs
|
|
508490
509118
|
],
|
|
508491
509119
|
invalidatedRefs: [],
|
|
508492
509120
|
updatedRefs: [{ kind: "block", nodeId: op.target.paraId, storyId: op.target.storyId }],
|
|
@@ -510049,7 +510677,7 @@ function topLevelMarkRPrSpan2(pPrXml) {
|
|
|
510049
510677
|
return null;
|
|
510050
510678
|
return { start: openOffset, end: openOffset + span.length };
|
|
510051
510679
|
}
|
|
510052
|
-
function injectParagraphMarkTrackedMarker(paraXml, kind, stamp) {
|
|
510680
|
+
function injectParagraphMarkTrackedMarker(paraXml, kind, stamp, collectCreatedRef) {
|
|
510053
510681
|
const openTag = matchParagraphOpenTag(paraXml);
|
|
510054
510682
|
const closeMatch = paraXml.match(/<\/([\w.-]+):p>\s*$/);
|
|
510055
510683
|
if (!openTag || !closeMatch)
|
|
@@ -510058,6 +510686,7 @@ function injectParagraphMarkTrackedMarker(paraXml, kind, stamp) {
|
|
|
510058
510686
|
const closeTag = closeMatch[0];
|
|
510059
510687
|
const inner = paraXml.slice(openTag.length, paraXml.length - closeTag.length);
|
|
510060
510688
|
const marker = buildParagraphMarkTrackedMarker(prefix, kind, stamp);
|
|
510689
|
+
collectCreatedRef?.(String(stamp.wId));
|
|
510061
510690
|
const pPrXml = matchLeadingElement(inner, "pPr");
|
|
510062
510691
|
if (!pPrXml) {
|
|
510063
510692
|
return `${openTag}<${prefix}:pPr><${prefix}:rPr>${marker}</${prefix}:rPr></${prefix}:pPr>${inner}${closeTag}`;
|
|
@@ -542787,6 +543416,7 @@ var init_address2 = __esm(() => {
|
|
|
542787
543416
|
SELECTION_EDGE_NODE_TYPES2 = [
|
|
542788
543417
|
"paragraph",
|
|
542789
543418
|
"heading",
|
|
543419
|
+
"listItem",
|
|
542790
543420
|
"table",
|
|
542791
543421
|
"tableOfContents",
|
|
542792
543422
|
"sdt",
|
|
@@ -552632,7 +553262,7 @@ var init_schemas5 = __esm(() => {
|
|
|
552632
553262
|
type: "array",
|
|
552633
553263
|
items: objectSchema4({
|
|
552634
553264
|
id: { type: "string" },
|
|
552635
|
-
type: { enum: [
|
|
553265
|
+
type: { enum: [...trackChangeBroadTypeEnum2] },
|
|
552636
553266
|
subtype: { type: "string" },
|
|
552637
553267
|
sourceIds: trackChangeSourceIdsSchema2
|
|
552638
553268
|
}, ["id", "type", "subtype", "sourceIds"])
|
|
@@ -581118,6 +581748,47 @@ function planTextReplacement(before, after) {
|
|
|
581118
581748
|
return spans;
|
|
581119
581749
|
}
|
|
581120
581750
|
|
|
581751
|
+
// ../../../v2/document-api-v2-adapter/dist/selection-mutation/structural-rewrite-span.js
|
|
581752
|
+
function planTrackedRewriteReplacement(before, after, scope) {
|
|
581753
|
+
const precise = planTextReplacement(before, after);
|
|
581754
|
+
if (!scope || precise.length <= 1)
|
|
581755
|
+
return precise;
|
|
581756
|
+
const boundary = narrowTextReplacement(before, after);
|
|
581757
|
+
if (!boundary)
|
|
581758
|
+
return [];
|
|
581759
|
+
const start = scope.startOffset + boundary.start;
|
|
581760
|
+
const end = scope.startOffset + boundary.end;
|
|
581761
|
+
return rewriteRangeContainsCoupledStructure(scope.paragraphXml, start, end, scope.coordinateSpace ?? "visible") ? [boundary] : precise;
|
|
581762
|
+
}
|
|
581763
|
+
function rewriteRangeContainsCoupledStructure(paragraphXml, start, end, coordinateSpace) {
|
|
581764
|
+
const model = parseParagraphInlineMap(paragraphXml);
|
|
581765
|
+
const span = (piece) => coordinateSpace === "tracked" ? [piece.trackedStart, piece.trackedEnd] : [piece.visibleStart, piece.visibleEnd];
|
|
581766
|
+
const fullyContains = (piece) => {
|
|
581767
|
+
const [pieceStart2, pieceEnd2] = span(piece);
|
|
581768
|
+
return pieceStart2 === pieceEnd2 ? start < pieceStart2 && end > pieceEnd2 : start <= pieceStart2 && end >= pieceEnd2;
|
|
581769
|
+
};
|
|
581770
|
+
const visit = (pieces) => {
|
|
581771
|
+
for (const piece of pieces) {
|
|
581772
|
+
if ((piece.kind === "marker" || piece.kind === "noteReference") && fullyContains(piece))
|
|
581773
|
+
return true;
|
|
581774
|
+
if (piece.kind === "container") {
|
|
581775
|
+
const supportedOpaqueWrapper = piece.containerKind === "unknown" && (piece.localName === "smartTag" || piece.localName === "dir" || piece.localName === "bdo");
|
|
581776
|
+
if (fullyContains(piece) && (piece.containerKind === "sdt" || piece.containerKind === "fldSimple" || piece.containerKind === "complexField" || supportedOpaqueWrapper))
|
|
581777
|
+
return true;
|
|
581778
|
+
if (visit(piece.children))
|
|
581779
|
+
return true;
|
|
581780
|
+
} else if (piece.kind === "tracked" && visit(piece.children)) {
|
|
581781
|
+
return true;
|
|
581782
|
+
}
|
|
581783
|
+
}
|
|
581784
|
+
return false;
|
|
581785
|
+
};
|
|
581786
|
+
return visit(model.pieces);
|
|
581787
|
+
}
|
|
581788
|
+
var init_structural_rewrite_span = __esm(() => {
|
|
581789
|
+
init_sd_document_session_internal();
|
|
581790
|
+
});
|
|
581791
|
+
|
|
581121
581792
|
// ../../../v2/document-api-v2-adapter/dist/ranges/adapter.js
|
|
581122
581793
|
class V2RangesAdapter {
|
|
581123
581794
|
constructor(context) {
|
|
@@ -582289,10 +582960,24 @@ class V2SelectionMutationAdapter {
|
|
|
582289
582960
|
const planned = [];
|
|
582290
582961
|
for (const [editIndex, edit] of edits.entries()) {
|
|
582291
582962
|
const { on, newText, resolution } = edit;
|
|
582292
|
-
|
|
582963
|
+
let spans = on.coordinateSpace !== "tracked" && resolution.text.length === on.endOffset - on.startOffset && isPlannableTextPayload(newText) ? planTrackedRewriteReplacement(resolution.text, newText) : [{ start: 0, end: on.endOffset - on.startOffset, text: newText }];
|
|
582293
582964
|
const index = isMainStoryId(on.storyId) ? getSDDocumentSessionInternalParagraphIndex(this.context.session) : getSDDocumentSessionInternalStoryParagraphIndex(this.context.session, on.storyId);
|
|
582294
582965
|
if (!index)
|
|
582295
582966
|
return { success: false, failure: { code: "TARGET_NOT_FOUND", message: "rewrite paragraph index unavailable" }, resolution };
|
|
582967
|
+
let structuralRewrite = false;
|
|
582968
|
+
if (options?.changeMode === "tracked" && edit.rewriteIntent === true && spans.length > 1) {
|
|
582969
|
+
const paragraph2 = index.byParaId(on.startBlockId);
|
|
582970
|
+
const paragraphBytes = paragraph2 ? getSDDocumentSessionInternalPartRange(this.context.session, paragraph2.partUri, paragraph2.byteStart, paragraph2.byteEnd) : null;
|
|
582971
|
+
if (paragraphBytes) {
|
|
582972
|
+
const scopedSpans = planTrackedRewriteReplacement(resolution.text, newText, {
|
|
582973
|
+
paragraphXml: TD79.decode(paragraphBytes),
|
|
582974
|
+
startOffset: on.startOffset,
|
|
582975
|
+
...on.coordinateSpace ? { coordinateSpace: on.coordinateSpace } : {}
|
|
582976
|
+
});
|
|
582977
|
+
structuralRewrite = scopedSpans.length === 1 && spans.length > 1;
|
|
582978
|
+
spans = scopedSpans;
|
|
582979
|
+
}
|
|
582980
|
+
}
|
|
582296
582981
|
const preparedKey = `${on.storyId}:${on.startBlockId}:${on.coordinateSpace ?? "visible"}`;
|
|
582297
582982
|
const prepared = preparedByBlock.get(preparedKey) ?? prepareSelectionTargetResolution({
|
|
582298
582983
|
target: {
|
|
@@ -582315,7 +583000,7 @@ class V2SelectionMutationAdapter {
|
|
|
582315
583000
|
return { success: false, failure: { code: narrowed.error, message: narrowed.message }, resolution };
|
|
582316
583001
|
if (narrowed.paintedObjectContained)
|
|
582317
583002
|
return { success: false, failure: { code: "INVALID_CONTEXT", message: "rewrite contains an inline object" }, resolution };
|
|
582318
|
-
planned.push({ on: narrowed, newText: span.text, resolution: { ...resolution, text: resolution.text.slice(span.start, span.end) }, resultKey: String(editIndex), owner: edit.ownerStepId ?? "", rewriteIntent: edit.rewriteIntent === true });
|
|
583003
|
+
planned.push({ on: narrowed, newText: span.text, resolution: { ...resolution, text: resolution.text.slice(span.start, span.end) }, resultKey: String(editIndex), owner: edit.ownerStepId ?? "", rewriteIntent: edit.rewriteIntent === true, structuralRewrite });
|
|
582319
583004
|
}
|
|
582320
583005
|
}
|
|
582321
583006
|
if (planned.length === 0)
|
|
@@ -582329,9 +583014,12 @@ class V2SelectionMutationAdapter {
|
|
|
582329
583014
|
const retiredFieldIds = [];
|
|
582330
583015
|
const independentTracked = options?.changeMode === "tracked" && this.context.trackedChangesReplacementMode === "independent";
|
|
582331
583016
|
let trackedFieldDeletion = false;
|
|
582332
|
-
const kernelEdits = planned.map(({ on, newText, resolution, resultKey, owner, rewriteIntent }, index) => {
|
|
583017
|
+
const kernelEdits = planned.map(({ on, newText, resolution, resultKey, owner, rewriteIntent, structuralRewrite }, index) => {
|
|
582333
583018
|
const stamps = {
|
|
582334
|
-
...options?.changeMode === "tracked" && rewriteIntent ? {
|
|
583019
|
+
...options?.changeMode === "tracked" && rewriteIntent ? {
|
|
583020
|
+
rewriteGroupId: ownerIds.get(owner),
|
|
583021
|
+
...!structuralRewrite ? { preserveExistingRevisions: true } : {}
|
|
583022
|
+
} : {},
|
|
582335
583023
|
...independentTracked && on.startOffset < on.endOffset && newText.length > 0 ? {
|
|
582336
583024
|
rsid: deriveRsid(`${begun.tx.txId}:${index}`, "del"),
|
|
582337
583025
|
insRsid: deriveRsid(`${begun.tx.txId}:${index}`, "ins")
|
|
@@ -582621,7 +583309,20 @@ class V2SelectionMutationAdapter {
|
|
|
582621
583309
|
resolved
|
|
582622
583310
|
});
|
|
582623
583311
|
const buildResolutionMs = nowMs6() - buildResolutionStartedAt;
|
|
582624
|
-
let replacements = resolved.coordinateSpace !== "tracked" && resolved.startOffset < resolved.endOffset && selectedText.length === resolved.endOffset - resolved.startOffset && isPlannableTextPayload(request.text) ?
|
|
583312
|
+
let replacements = resolved.coordinateSpace !== "tracked" && resolved.startOffset < resolved.endOffset && selectedText.length === resolved.endOffset - resolved.startOffset && isPlannableTextPayload(request.text) ? planTrackedRewriteReplacement(selectedText, request.text) : [{ start: 0, end: resolved.endOffset - resolved.startOffset, text: request.text }];
|
|
583313
|
+
let structuralRewrite = false;
|
|
583314
|
+
if (options?.changeMode === "tracked" && isRewrite && replacements.length > 1) {
|
|
583315
|
+
const paragraphBytes = getSDDocumentSessionInternalPartRange(this.context.session, resolved.partUri, resolved.paragraphByteStart ?? resolved.startByte, resolved.paragraphByteEnd ?? resolved.endByte);
|
|
583316
|
+
if (paragraphBytes) {
|
|
583317
|
+
const scopedReplacements = planTrackedRewriteReplacement(selectedText, request.text, {
|
|
583318
|
+
paragraphXml: TD79.decode(paragraphBytes),
|
|
583319
|
+
startOffset: resolved.startOffset,
|
|
583320
|
+
...resolved.coordinateSpace ? { coordinateSpace: resolved.coordinateSpace } : {}
|
|
583321
|
+
});
|
|
583322
|
+
structuralRewrite = scopedReplacements.length === 1 && replacements.length > 1;
|
|
583323
|
+
replacements = scopedReplacements;
|
|
583324
|
+
}
|
|
583325
|
+
}
|
|
582625
583326
|
if (story.storyKind === "textbox" && replacements.length > 1) {
|
|
582626
583327
|
const boundary = narrowTextReplacement(selectedText, request.text);
|
|
582627
583328
|
replacements = boundary ? [boundary] : [];
|
|
@@ -582667,7 +583368,10 @@ class V2SelectionMutationAdapter {
|
|
|
582667
583368
|
const kernelEdits = edits.map((edit, index2) => ({
|
|
582668
583369
|
on: collapsedInlineAffinity && edit.on.startOffset === edit.on.endOffset ? { ...edit.on, collapsedInlineAffinity } : edit.on,
|
|
582669
583370
|
newText: edit.newText,
|
|
582670
|
-
...options?.changeMode === "tracked" && (isRewrite || edits.length > 1) && !typingHistoryMetadata(options) && story.storyKind !== "textbox" ? {
|
|
583371
|
+
...options?.changeMode === "tracked" && (isRewrite || edits.length > 1) && !typingHistoryMetadata(options) && story.storyKind !== "textbox" ? {
|
|
583372
|
+
rewriteGroupId: `${tx.txId}:0`,
|
|
583373
|
+
...isRewrite && !structuralRewrite ? { preserveExistingRevisions: true } : {}
|
|
583374
|
+
} : {},
|
|
582671
583375
|
...trackedTextStampForMode(this.context, `${tx.txId}:${index2}`, options, edit.on, edit.newText)
|
|
582672
583376
|
}));
|
|
582673
583377
|
if (kernelEdits.length === 1 && !kernelEdits[0].rewriteGroupId) {
|
|
@@ -584447,6 +585151,7 @@ var init_adapter7 = __esm(() => {
|
|
|
584447
585151
|
init_adapter5();
|
|
584448
585152
|
init_story_surface();
|
|
584449
585153
|
init_textbox_story();
|
|
585154
|
+
init_structural_rewrite_span();
|
|
584450
585155
|
init_runtime2();
|
|
584451
585156
|
init_adapter6();
|
|
584452
585157
|
init_xml();
|
|
@@ -592992,17 +593697,18 @@ function readTrackedChangeRefs(context, createdRefs, story) {
|
|
|
592992
593697
|
if (trackedChangeRefs.length === 0)
|
|
592993
593698
|
return [];
|
|
592994
593699
|
const { logical } = buildCachedTrackedChangeLogicalView(context);
|
|
592995
|
-
|
|
593700
|
+
const projected = trackedChangeRefs.flatMap((ref5) => {
|
|
592996
593701
|
const byContributingRsid = Array.from(logical.byId.values()).find((entry) => entry.contributingRsids.includes(ref5.entityId) || entry.sourceIds.rsids.includes(ref5.entityId));
|
|
592997
|
-
const
|
|
592998
|
-
const
|
|
592999
|
-
return {
|
|
593702
|
+
const directlyProjected = logical.byId.get(ref5.entityId)?.id ?? logical.rsidToLogicalId.get(ref5.entityId) ?? logical.formattingKeyToLogicalId.get(ref5.entityId) ?? logical.structuralKeyToLogicalId.get(ref5.entityId) ?? byContributingRsid?.id;
|
|
593703
|
+
const entityIds = directlyProjected ? [directlyProjected] : projectTrackedStructuralEntityIds(context, [ref5.entityId]);
|
|
593704
|
+
return entityIds.map((entityId) => ({
|
|
593000
593705
|
kind: "entity",
|
|
593001
593706
|
entityType: "trackedChange",
|
|
593002
593707
|
entityId,
|
|
593003
593708
|
...story ? { story } : {}
|
|
593004
|
-
};
|
|
593709
|
+
}));
|
|
593005
593710
|
});
|
|
593711
|
+
return projected.filter((ref5, index) => projected.findIndex((candidate) => candidate.entityId === ref5.entityId) === index);
|
|
593006
593712
|
}
|
|
593007
593713
|
function createBlocksListAccumulator(input, indexEntryCount, inlineModelDiagnosticsBefore) {
|
|
593008
593714
|
const offset = Math.max(0, input?.offset ?? 0);
|
|
@@ -593990,6 +594696,7 @@ var init_adapter10 = __esm(() => {
|
|
|
593990
594696
|
init_document_reader();
|
|
593991
594697
|
init_visible_text();
|
|
593992
594698
|
init_text_mutation_diagnostics();
|
|
594699
|
+
init_receipt_entities();
|
|
593993
594700
|
init_block_numbering();
|
|
593994
594701
|
init_formatting();
|
|
593995
594702
|
init_table_info();
|
|
@@ -617276,14 +617983,24 @@ class V2ContentControlsAdapter {
|
|
|
617276
617983
|
}
|
|
617277
617984
|
const sdtXml = trackedStamp ? wrapTrackedStructuralXml({ innerXml: baseSdtXml, kind: "ins", stamp: trackedStamp }) : baseSdtXml;
|
|
617278
617985
|
let nextXml;
|
|
617986
|
+
let targetBlockIds2 = [];
|
|
617279
617987
|
if (input.target) {
|
|
617280
617988
|
const destination = this.requireControl(input.target, loaded);
|
|
617281
617989
|
nextXml = `${part.xml.slice(0, destination.end)}${sdtXml}${part.xml.slice(destination.end)}`;
|
|
617282
617990
|
} else if (input.at) {
|
|
617283
617991
|
if (input.kind === "block") {
|
|
617284
617992
|
const at = input.at;
|
|
617993
|
+
const wholeBlocks = resolveWholeBlockSelection(part.xml, part.paragraphs, at);
|
|
617994
|
+
if (wholeBlocks.kind === "failure") {
|
|
617995
|
+
return { success: false, failure: { code: wholeBlocks.code, message: wholeBlocks.message } };
|
|
617996
|
+
}
|
|
617285
617997
|
const anchor = at.start.kind === "text" ? findParagraphById2(part.xml, at.start.blockId) : null;
|
|
617286
|
-
if (
|
|
617998
|
+
if (wholeBlocks.kind === "ok") {
|
|
617999
|
+
const selectedXml = part.xml.slice(wholeBlocks.start, wholeBlocks.end);
|
|
618000
|
+
const wrapped = replaceSdtContentInTemplate(sdtXml, buildInnerXml(selectedXml));
|
|
618001
|
+
nextXml = replaceRange2(part.xml, wholeBlocks.start, wholeBlocks.end, wrapped);
|
|
618002
|
+
targetBlockIds2 = wholeBlocks.blockIds;
|
|
618003
|
+
} else if (anchor && at.start.kind === "text" && at.end.kind === "text" && at.start.offset !== at.end.offset && input.content === undefined && input.html === undefined && input.json === undefined) {
|
|
617287
618004
|
const splitMarker = "<sd-content-control-split/>";
|
|
617288
618005
|
let selected = "";
|
|
617289
618006
|
const split = replaceTextRangeInParagraph2(anchor.xml, at.start.offset, at.end.offset, (text4) => {
|
|
@@ -617304,8 +618021,11 @@ class V2ContentControlsAdapter {
|
|
|
617304
618021
|
right = right.replace(/w14:paraId="[^"]+"/, `w14:paraId="${allocateSplitId()}"`);
|
|
617305
618022
|
const wrapped = replaceSdtContentInTemplate(sdtXml, buildInnerXml(buildContentXml(selected, "block", allocateSplitId)));
|
|
617306
618023
|
nextXml = replaceRange2(part.xml, anchor.start, anchor.end, (keepLeft ? left : "") + wrapped + (keepRight ? right : ""));
|
|
618024
|
+
targetBlockIds2 = [at.start.blockId];
|
|
617307
618025
|
} else {
|
|
617308
618026
|
nextXml = insertBlockContentControlAtSelection(part.xml, part.paragraphs, input.at, sdtXml);
|
|
618027
|
+
if (at.start.kind === "text")
|
|
618028
|
+
targetBlockIds2 = [at.start.blockId];
|
|
617309
618029
|
}
|
|
617310
618030
|
} else {
|
|
617311
618031
|
const wrapped = wrapSelectionInXml(this.context, part.xml, input.at, sdtXml, input.kind, input.content ?? "", input.content !== undefined, repeatingSectionItemId ? (text4) => buildInnerXml(buildContentXml(text4, input.kind, createParaIdAllocator(this.context))) : undefined);
|
|
@@ -617332,7 +618052,7 @@ class V2ContentControlsAdapter {
|
|
|
617332
618052
|
return this.validateDryRun(input, options, target);
|
|
617333
618053
|
return this.commitDocument(nextXml, "content-control-create", input, options, target, {
|
|
617334
618054
|
partUri: part.partUri,
|
|
617335
|
-
storySurface: { family: "storyBlocks", contentControlRewrite: true, targetBlockIds:
|
|
618055
|
+
storySurface: { family: "storyBlocks", contentControlRewrite: true, targetBlockIds: targetBlockIds2 },
|
|
617336
618056
|
preserveRenderCommit: true,
|
|
617337
618057
|
extraPerPart: plannedContent.perPart,
|
|
617338
618058
|
semanticStyleDependencies: plannedContent.semanticStyleDependencies,
|
|
@@ -617702,6 +618422,19 @@ class V2ContentControlsAdapter {
|
|
|
617702
618422
|
}
|
|
617703
618423
|
}
|
|
617704
618424
|
if (at) {
|
|
618425
|
+
const wholeBlocks = resolveWholeBlockSelection(part.xml, part.paragraphs, at);
|
|
618426
|
+
if (wholeBlocks.kind === "failure") {
|
|
618427
|
+
throw operationError(wholeBlocks.code, wholeBlocks.message);
|
|
618428
|
+
}
|
|
618429
|
+
if (wholeBlocks.kind === "ok") {
|
|
618430
|
+
if (input.kind !== "block") {
|
|
618431
|
+
throw operationError("INVALID_TARGET", "A whole-block selection requires a block content control.");
|
|
618432
|
+
}
|
|
618433
|
+
if (input.content !== undefined || input.html !== undefined || input.json !== undefined) {
|
|
618434
|
+
throw operationError("CAPABILITY_UNAVAILABLE", "Replacing a whole-block selection while creating a content control is not supported.");
|
|
618435
|
+
}
|
|
618436
|
+
return part;
|
|
618437
|
+
}
|
|
617705
618438
|
if (at.start.kind !== "text" || at.end.kind !== "text" || at.start.blockId !== at.end.blockId) {
|
|
617706
618439
|
throw operationError("CAPABILITY_UNAVAILABLE", "Content-control creation requires a selection within one paragraph.");
|
|
617707
618440
|
}
|
|
@@ -619636,6 +620369,35 @@ function wrapSelectionInXml(context, documentXml, target, sdtXml, kind, replacem
|
|
|
619636
620369
|
}
|
|
619637
620370
|
};
|
|
619638
620371
|
}
|
|
620372
|
+
if (kind === "inline" && !hasReplacementContent && selectedTextRunCount(para.xml, target.start.offset, target.end.offset) > 1) {
|
|
620373
|
+
const template = splitSdtTemplateAroundContent(sdtXml);
|
|
620374
|
+
if (!template) {
|
|
620375
|
+
return {
|
|
620376
|
+
ok: false,
|
|
620377
|
+
failure: {
|
|
620378
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
620379
|
+
message: "Content-control template does not expose wrappable content."
|
|
620380
|
+
}
|
|
620381
|
+
};
|
|
620382
|
+
}
|
|
620383
|
+
const wrappedRuns = wrapRangeWithMarkupInParagraphXml({
|
|
620384
|
+
paragraphXml: para.xml,
|
|
620385
|
+
rangeStart: target.start.offset,
|
|
620386
|
+
rangeEnd: target.end.offset,
|
|
620387
|
+
open: template.open,
|
|
620388
|
+
close: template.close
|
|
620389
|
+
});
|
|
620390
|
+
if (wrappedRuns.ok) {
|
|
620391
|
+
return { ok: true, xml: replaceRange2(documentXml, para.start, para.end, wrappedRuns.xml) };
|
|
620392
|
+
}
|
|
620393
|
+
return {
|
|
620394
|
+
ok: false,
|
|
620395
|
+
failure: {
|
|
620396
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
620397
|
+
message: "Content-control selection spans unsupported inline structures."
|
|
620398
|
+
}
|
|
620399
|
+
};
|
|
620400
|
+
}
|
|
619639
620401
|
const wrapped = replaceTextRangeInParagraph2(para.xml, target.start.offset, target.end.offset, (selected) => {
|
|
619640
620402
|
const text4 = hasReplacementContent ? replacementContent : selected;
|
|
619641
620403
|
return replaceSdtContentInTemplate(sdtXml, buildReplacementContentXml2(text4));
|
|
@@ -619644,6 +620406,27 @@ function wrapSelectionInXml(context, documentXml, target, sdtXml, kind, replacem
|
|
|
619644
620406
|
return { ok: false, failure: { code: "CAPABILITY_UNAVAILABLE", message: "Content-control selection spans unsupported inline structures." } };
|
|
619645
620407
|
return { ok: true, xml: replaceRange2(documentXml, para.start, para.end, wrapped) };
|
|
619646
620408
|
}
|
|
620409
|
+
function selectedTextRunCount(paragraphXml, start, end) {
|
|
620410
|
+
const runs = new Set;
|
|
620411
|
+
for (const piece of parseParagraphInlineMap(paragraphXml).leaves()) {
|
|
620412
|
+
if (piece.kind === "text" && piece.textRole === "visible" && piece.visibleStart < end && piece.visibleEnd > start) {
|
|
620413
|
+
runs.add(piece.runCharStart);
|
|
620414
|
+
}
|
|
620415
|
+
}
|
|
620416
|
+
return runs.size;
|
|
620417
|
+
}
|
|
620418
|
+
function splitSdtTemplateAroundContent(sdtXml) {
|
|
620419
|
+
const sdtRange = findFirstSdtElementRange(sdtXml);
|
|
620420
|
+
if (!sdtRange)
|
|
620421
|
+
return null;
|
|
620422
|
+
const contentRange = findDirectSdtChildRange(sdtXml.slice(sdtRange.start, sdtRange.end), "sdtContent");
|
|
620423
|
+
if (!contentRange)
|
|
620424
|
+
return null;
|
|
620425
|
+
return {
|
|
620426
|
+
open: sdtXml.slice(0, sdtRange.start + contentRange.openEnd),
|
|
620427
|
+
close: sdtXml.slice(sdtRange.start + contentRange.closeStart)
|
|
620428
|
+
};
|
|
620429
|
+
}
|
|
619647
620430
|
function insertBlockContentControlAtSelection(documentXml, paragraphs, target, sdtXml) {
|
|
619648
620431
|
if (target?.kind !== "selection" || target.start?.kind !== "text" || target.end?.kind !== "text") {
|
|
619649
620432
|
throw operationError("INVALID_TARGET", "A text selection is required.");
|
|
@@ -619658,6 +620441,98 @@ function insertBlockContentControlAtSelection(documentXml, paragraphs, target, s
|
|
|
619658
620441
|
}
|
|
619659
620442
|
return `${documentXml.slice(0, anchor.end)}${sdtXml}${documentXml.slice(anchor.end)}`;
|
|
619660
620443
|
}
|
|
620444
|
+
function resolveWholeBlockSelection(documentXml, paragraphs, target) {
|
|
620445
|
+
let startBlockId;
|
|
620446
|
+
let endBlockId;
|
|
620447
|
+
let textOffsets = null;
|
|
620448
|
+
if (target.start.kind === "text" && target.end.kind === "text") {
|
|
620449
|
+
if (target.start.blockId === target.end.blockId)
|
|
620450
|
+
return { kind: "not-applicable" };
|
|
620451
|
+
if (target.coordinateSpace === "tracked") {
|
|
620452
|
+
return {
|
|
620453
|
+
kind: "failure",
|
|
620454
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
620455
|
+
message: "text-range-cross-paragraph-tracked-coordinate-unsupported"
|
|
620456
|
+
};
|
|
620457
|
+
}
|
|
620458
|
+
startBlockId = target.start.blockId;
|
|
620459
|
+
endBlockId = target.end.blockId;
|
|
620460
|
+
textOffsets = { start: target.start.offset, end: target.end.offset };
|
|
620461
|
+
} else if (target.start.kind === "nodeEdge" && target.end.kind === "nodeEdge") {
|
|
620462
|
+
if (target.start.edge !== "before" || target.end.edge !== "after") {
|
|
620463
|
+
return {
|
|
620464
|
+
kind: "failure",
|
|
620465
|
+
code: "INVALID_TARGET",
|
|
620466
|
+
message: "Whole-block content-control selections must start before the first block and end after the last block."
|
|
620467
|
+
};
|
|
620468
|
+
}
|
|
620469
|
+
const supportedNodeTypes = new Set(["paragraph", "heading", "listItem"]);
|
|
620470
|
+
if (!supportedNodeTypes.has(target.start.node.nodeType) || !supportedNodeTypes.has(target.end.node.nodeType)) {
|
|
620471
|
+
return {
|
|
620472
|
+
kind: "failure",
|
|
620473
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
620474
|
+
message: "Whole-block content-control selections support paragraph, heading, and list-item boundaries."
|
|
620475
|
+
};
|
|
620476
|
+
}
|
|
620477
|
+
startBlockId = target.start.node.nodeId;
|
|
620478
|
+
endBlockId = target.end.node.nodeId;
|
|
620479
|
+
} else {
|
|
620480
|
+
return { kind: "not-applicable" };
|
|
620481
|
+
}
|
|
620482
|
+
const matchingStart = paragraphs.filter((paragraph4) => paragraph4.blockId === startBlockId);
|
|
620483
|
+
const matchingEnd = paragraphs.filter((paragraph4) => paragraph4.blockId === endBlockId);
|
|
620484
|
+
if (matchingStart.length === 0 || matchingEnd.length === 0) {
|
|
620485
|
+
return { kind: "failure", code: "TARGET_NOT_FOUND", message: "A content-control selection boundary was not found." };
|
|
620486
|
+
}
|
|
620487
|
+
if (matchingStart.length !== 1 || matchingEnd.length !== 1) {
|
|
620488
|
+
return { kind: "failure", code: "INVALID_TARGET", message: "Content-control selection boundaries must identify unique blocks." };
|
|
620489
|
+
}
|
|
620490
|
+
const startParagraph = matchingStart[0];
|
|
620491
|
+
const endParagraph = matchingEnd[0];
|
|
620492
|
+
const startIndex = paragraphs.indexOf(startParagraph);
|
|
620493
|
+
const endIndex = paragraphs.indexOf(endParagraph);
|
|
620494
|
+
if (startIndex > endIndex) {
|
|
620495
|
+
return { kind: "failure", code: "INVALID_TARGET", message: "Content-control selection boundaries are reversed." };
|
|
620496
|
+
}
|
|
620497
|
+
if (textOffsets && (textOffsets.start !== 0 || textOffsets.end !== endParagraph.textLength)) {
|
|
620498
|
+
return {
|
|
620499
|
+
kind: "failure",
|
|
620500
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
620501
|
+
message: "A multi-block content-control selection must include the complete first and last blocks."
|
|
620502
|
+
};
|
|
620503
|
+
}
|
|
620504
|
+
const parsed = collectXmlElementRanges(documentXml);
|
|
620505
|
+
if (parsed.errors.length > 0) {
|
|
620506
|
+
return { kind: "failure", code: "PRECONDITION_FAILED", message: "The target story XML could not be parsed safely." };
|
|
620507
|
+
}
|
|
620508
|
+
const paragraphRanges = parsed.ranges.filter((range) => range.tag.localName === "p");
|
|
620509
|
+
const startRange = paragraphRanges.find((range) => range.start === startParagraph.start && range.end === startParagraph.end);
|
|
620510
|
+
const endRange = paragraphRanges.find((range) => range.start === endParagraph.start && range.end === endParagraph.end);
|
|
620511
|
+
if (!startRange || !endRange) {
|
|
620512
|
+
return { kind: "failure", code: "INVALID_TARGET", message: "Content-control selection boundaries are not complete paragraphs." };
|
|
620513
|
+
}
|
|
620514
|
+
const directParent = (child) => parsed.ranges.filter((range) => range.start < child.start && range.end > child.end).sort((left, right) => left.end - left.start - (right.end - right.start))[0];
|
|
620515
|
+
const startParent = directParent(startRange);
|
|
620516
|
+
const endParent = directParent(endRange);
|
|
620517
|
+
const supportedParents = new Set(["body", "hdr", "ftr", "tc", "sdtContent"]);
|
|
620518
|
+
if (!startParent || !endParent || startParent.start !== endParent.start || startParent.end !== endParent.end || !supportedParents.has(startParent.tag.localName)) {
|
|
620519
|
+
return {
|
|
620520
|
+
kind: "failure",
|
|
620521
|
+
code: "INVALID_TARGET",
|
|
620522
|
+
message: "Content-control selection boundaries must share one block-level container."
|
|
620523
|
+
};
|
|
620524
|
+
}
|
|
620525
|
+
const selectedXml = documentXml.slice(startParagraph.start, endParagraph.end);
|
|
620526
|
+
if (/<w:sectPr\b/.test(selectedXml)) {
|
|
620527
|
+
return { kind: "failure", code: "INVALID_TARGET", message: "A content control cannot wrap a section boundary." };
|
|
620528
|
+
}
|
|
620529
|
+
return {
|
|
620530
|
+
kind: "ok",
|
|
620531
|
+
start: startParagraph.start,
|
|
620532
|
+
end: endParagraph.end,
|
|
620533
|
+
blockIds: paragraphs.slice(startIndex, endIndex + 1).map((paragraph4) => paragraph4.blockId)
|
|
620534
|
+
};
|
|
620535
|
+
}
|
|
619661
620536
|
function replaceSdtContentInTemplate(sdtXml, contentXml) {
|
|
619662
620537
|
const sdtRange = findFirstSdtElementRange(sdtXml);
|
|
619663
620538
|
if (!sdtRange)
|
|
@@ -619815,6 +620690,7 @@ var init_adapter12 = __esm(() => {
|
|
|
619815
620690
|
init_visible_text();
|
|
619816
620691
|
init_xml();
|
|
619817
620692
|
init_tracked_pr_change();
|
|
620693
|
+
init_inline();
|
|
619818
620694
|
init_tracked_structural_wrapper();
|
|
619819
620695
|
init_adapter7();
|
|
619820
620696
|
init_rich_fragment_apply();
|
|
@@ -651496,7 +652372,16 @@ async function compileOrderedTextProgram(context, sourceSteps, story, evaluatedR
|
|
|
651496
652372
|
for (const match of matches.slice().reverse()) {
|
|
651497
652373
|
const replacement = sourceStep.op === "text.delete" ? "" : replacementTextForMatch(sourceStep, match.text, match.groups);
|
|
651498
652374
|
if (replacement !== match.text) {
|
|
651499
|
-
|
|
652375
|
+
let spans = paragraph4.coordinateSpace !== "tracked" ? planTextReplacement(match.text, replacement) : [{ start: 0, end: match.text.length, text: replacement }];
|
|
652376
|
+
if (sourceStep.op === "text.rewrite" && paragraph4.coordinateSpace !== "tracked" && currentText === paragraph4.originalText && spans.length > 1) {
|
|
652377
|
+
const paragraphBytes = getSDDocumentSessionInternalPartRange(context.session, paragraph4.seedRange.partUri, paragraph4.seedRange.paragraphByteStart ?? paragraph4.seedRange.startByte, paragraph4.seedRange.paragraphByteEnd ?? paragraph4.seedRange.endByte);
|
|
652378
|
+
if (paragraphBytes) {
|
|
652379
|
+
spans = planTrackedRewriteReplacement(match.text, replacement, {
|
|
652380
|
+
paragraphXml: TD103.decode(paragraphBytes),
|
|
652381
|
+
startOffset: match.from
|
|
652382
|
+
});
|
|
652383
|
+
}
|
|
652384
|
+
}
|
|
651500
652385
|
for (const span of spans.slice().reverse()) {
|
|
651501
652386
|
replaceStagedText(paragraph4, match.from + span.start, match.from + span.end, span.text, sourceStep.id, sourceStepOrder, preserveReviewOrigins);
|
|
651502
652387
|
}
|
|
@@ -652683,6 +653568,7 @@ var init_engine3 = __esm(() => {
|
|
|
652683
653568
|
init_query_adapter();
|
|
652684
653569
|
init_within();
|
|
652685
653570
|
init_tracked_text_search();
|
|
653571
|
+
init_structural_rewrite_span();
|
|
652686
653572
|
init_adapter7();
|
|
652687
653573
|
init_adapter27();
|
|
652688
653574
|
init_adapter6();
|
|
@@ -708378,12 +709264,45 @@ function syncTrackedDecisionTableOverlaysFromSession(session, prepared, storyId,
|
|
|
708378
709264
|
if (!bytes)
|
|
708379
709265
|
throw new Error(`tracked-change sync could not read ${partUri}`);
|
|
708380
709266
|
const tableMap = getStoryTablesMap(doc2);
|
|
709267
|
+
const targetBlockIds2 = new Set(prepared.backendExtensions.storySurface?.targetBlockIds ?? []);
|
|
709268
|
+
for (const ref5 of [
|
|
709269
|
+
...prepared.semanticDelta.createdRefs,
|
|
709270
|
+
...prepared.semanticDelta.updatedRefs,
|
|
709271
|
+
...prepared.semanticDelta.invalidatedRefs
|
|
709272
|
+
]) {
|
|
709273
|
+
if (ref5.kind === "block")
|
|
709274
|
+
targetBlockIds2.add(ref5.nodeId);
|
|
709275
|
+
if (ref5.kind === "text")
|
|
709276
|
+
targetBlockIds2.add(ref5.blockId);
|
|
709277
|
+
}
|
|
709278
|
+
for (const shift of prepared.semanticDelta.textRangeShifts) {
|
|
709279
|
+
if (shift.blockId)
|
|
709280
|
+
targetBlockIds2.add(shift.blockId);
|
|
709281
|
+
}
|
|
709282
|
+
const scopedTextDecision = prepared.source.kind === "trackedChangeDecide" && prepared.source.targets.every((target) => (!target.structural || target.structural.entityKey.includes("|paragraph-mark-insertion|") || target.structural.entityKey.includes("|paragraph-mark-deletion|")) && !target.derivedStructural && !target.formatting && !target.partial && !target.moveRangeMarkers) && targetBlockIds2.size > 0;
|
|
709283
|
+
const affectedTableIds = new Set;
|
|
709284
|
+
if (targetBlockIds2.size > 0) {
|
|
709285
|
+
for (const table of currentCatalog.tables) {
|
|
709286
|
+
if (currentIndex.entries.some((entry) => targetBlockIds2.has(entry.blockId) && entry.byteStart >= table.tableByteStart && entry.byteEnd <= table.tableByteEnd)) {
|
|
709287
|
+
affectedTableIds.add(table.tableNodeId);
|
|
709288
|
+
}
|
|
709289
|
+
}
|
|
709290
|
+
for (const [tableNodeId, overlay] of tableMap) {
|
|
709291
|
+
if (!(overlay instanceof YMap))
|
|
709292
|
+
continue;
|
|
709293
|
+
const tableBlocks = overlay.get("tableBlocks");
|
|
709294
|
+
if (tableBlocks instanceof YArray && tableBlocks.toArray().some((blockId) => targetBlockIds2.has(blockId))) {
|
|
709295
|
+
affectedTableIds.add(tableNodeId);
|
|
709296
|
+
}
|
|
709297
|
+
}
|
|
709298
|
+
}
|
|
709299
|
+
const shouldSyncTable = (tableNodeId) => !scopedTextDecision || affectedTableIds.has(tableNodeId);
|
|
708381
709300
|
const skipMissingTableOverlay = isRejectedStructureUndo(prepared);
|
|
708382
709301
|
const liveTableIds = new Set(currentCatalog.tables.map((table) => table.tableNodeId));
|
|
708383
709302
|
const liveBlockIds = new Set(currentIndex.entries.map((entry) => entry.blockId));
|
|
708384
709303
|
resolveStoryShardScope(doc2).doc.transact(() => {
|
|
708385
709304
|
for (const [tableNodeId, overlay] of tableMap) {
|
|
708386
|
-
if (liveTableIds.has(tableNodeId) || !(overlay instanceof YMap))
|
|
709305
|
+
if (!shouldSyncTable(tableNodeId) || liveTableIds.has(tableNodeId) || !(overlay instanceof YMap))
|
|
708387
709306
|
continue;
|
|
708388
709307
|
const tableBlocks = overlay.get("tableBlocks");
|
|
708389
709308
|
if (tableBlocks instanceof YArray && !tableBlocks.toArray().some((blockId) => liveBlockIds.has(blockId))) {
|
|
@@ -708391,11 +709310,16 @@ function syncTrackedDecisionTableOverlaysFromSession(session, prepared, storyId,
|
|
|
708391
709310
|
}
|
|
708392
709311
|
}
|
|
708393
709312
|
for (const table of currentCatalog.tables) {
|
|
708394
|
-
const
|
|
709313
|
+
const currentOverlay = tableMap.get(table.tableNodeId);
|
|
709314
|
+
const tableXml = TD108.decode(bytes.slice(table.tableByteStart, table.tableByteEnd));
|
|
709315
|
+
const existingOverlay = currentOverlay instanceof YMap;
|
|
709316
|
+
const tableCoordinatesChanged = currentOverlay instanceof YMap && (currentOverlay.get("sourceByteStart") !== table.tableByteStart || currentOverlay.get("sourceByteEnd") !== table.tableByteEnd);
|
|
709317
|
+
const tableXmlChanged = currentOverlay instanceof YMap && currentOverlay.get("xml") !== tableXml;
|
|
709318
|
+
if (!shouldSyncTable(table.tableNodeId) && !tableCoordinatesChanged && !tableXmlChanged)
|
|
709319
|
+
continue;
|
|
708395
709320
|
if (!existingOverlay && skipMissingTableOverlay)
|
|
708396
709321
|
continue;
|
|
708397
709322
|
const affectedBlockIds = currentIndex.entries.filter((entry) => entry.byteStart >= table.tableByteStart && entry.byteEnd <= table.tableByteEnd).map((entry) => entry.blockId);
|
|
708398
|
-
const tableXml = TD108.decode(bytes.slice(table.tableByteStart, table.tableByteEnd));
|
|
708399
709323
|
const sourceXmlStart = byteOffsetToCharOffset(bytes, table.tableByteStart);
|
|
708400
709324
|
writeTableOverlayState({
|
|
708401
709325
|
tableMap,
|
|
@@ -709918,6 +710842,8 @@ function usesTrackedDecisionSessionSync(prepared, extension2, options) {
|
|
|
709918
710842
|
return true;
|
|
709919
710843
|
if (hasPreparedCommentRefRemaps(prepared))
|
|
709920
710844
|
return true;
|
|
710845
|
+
if (prepared.source.kind === "trackedChangeDecide" && prepared.source.targets.some((target) => (target.moveRangeMarkers?.ids.length ?? 0) > 0))
|
|
710846
|
+
return true;
|
|
709921
710847
|
if (!extension2.trackedTextDecide) {
|
|
709922
710848
|
if (prepared.source.kind !== "trackedChangeDecide")
|
|
709923
710849
|
return false;
|