@superdoc-dev/cli 0.2.0-next.107 → 0.2.0-next.108
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 +2545 -284
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1202,7 +1202,7 @@ function formatInlineAliasDescription(key) {
|
|
|
1202
1202
|
function projectFromDefinitions(fn) {
|
|
1203
1203
|
return Object.fromEntries(OPERATION_IDS.map((id) => [id, fn(id, OPERATION_DEFINITIONS[id])]));
|
|
1204
1204
|
}
|
|
1205
|
-
var NONE_FAILURES, NONE_THROWS, T_NOT_FOUND, T_NOT_FOUND_CAPABLE, T_PLAN_ENGINE, T_NOT_FOUND_COMMAND, T_NOT_FOUND_COMMAND_TRACKED, T_IMAGE_COMMAND, T_CC_READ, T_CC_MUTATION, T_CC_TYPED, T_CC_TYPED_READ, T_CC_RAW, T_QUERY_MATCH, T_SECTION_CREATE, T_SECTION_READ, T_PARAGRAPH_MUTATION, T_SECTION_MUTATION, T_SECTION_SETTINGS_MUTATION, T_REF_READ_LIST, T_REF_MUTATION, T_REF_MUTATION_REMOVE, T_REF_INSERT, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS, OPERATION_DEFINITIONS, OPERATION_IDS, SINGLETON_OPERATION_IDS, NAMESPACED_OPERATION_IDS;
|
|
1205
|
+
var NONE_FAILURES, NONE_THROWS, T_NOT_FOUND, T_NOT_FOUND_CAPABLE, T_PLAN_ENGINE, T_NOT_FOUND_COMMAND, T_NOT_FOUND_COMMAND_TRACKED, T_IMAGE_COMMAND, T_CC_READ, T_CC_MUTATION, T_CC_TYPED, T_CC_TYPED_READ, T_CC_RAW, T_QUERY_MATCH, T_SECTION_CREATE, T_SECTION_READ, T_PARAGRAPH_MUTATION, T_SECTION_MUTATION, T_SECTION_SETTINGS_MUTATION, T_HEADER_FOOTER_MUTATION, T_REF_READ_LIST, T_REF_MUTATION, T_REF_MUTATION_REMOVE, T_REF_INSERT, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS, OPERATION_DEFINITIONS, OPERATION_IDS, SINGLETON_OPERATION_IDS, NAMESPACED_OPERATION_IDS;
|
|
1206
1206
|
var init_operation_definitions = __esm(() => {
|
|
1207
1207
|
init_inline_run_patch();
|
|
1208
1208
|
NONE_FAILURES = [];
|
|
@@ -1261,6 +1261,13 @@ var init_operation_definitions = __esm(() => {
|
|
|
1261
1261
|
"INTERNAL_ERROR"
|
|
1262
1262
|
];
|
|
1263
1263
|
T_SECTION_SETTINGS_MUTATION = ["INVALID_INPUT", "CAPABILITY_UNAVAILABLE", "INTERNAL_ERROR"];
|
|
1264
|
+
T_HEADER_FOOTER_MUTATION = [
|
|
1265
|
+
"TARGET_NOT_FOUND",
|
|
1266
|
+
"INVALID_TARGET",
|
|
1267
|
+
"INVALID_INPUT",
|
|
1268
|
+
"CAPABILITY_UNAVAILABLE",
|
|
1269
|
+
"INTERNAL_ERROR"
|
|
1270
|
+
];
|
|
1264
1271
|
T_REF_READ_LIST = ["CAPABILITY_UNAVAILABLE", "INVALID_INPUT"];
|
|
1265
1272
|
T_REF_MUTATION = ["TARGET_NOT_FOUND", "INVALID_TARGET", "INVALID_INPUT", "CAPABILITY_UNAVAILABLE"];
|
|
1266
1273
|
T_REF_MUTATION_REMOVE = ["TARGET_NOT_FOUND", "INVALID_TARGET", "CAPABILITY_UNAVAILABLE"];
|
|
@@ -4079,6 +4086,130 @@ var init_operation_definitions = __esm(() => {
|
|
|
4079
4086
|
referenceDocPath: "hyperlinks/remove.mdx",
|
|
4080
4087
|
referenceGroup: "hyperlinks"
|
|
4081
4088
|
},
|
|
4089
|
+
"headerFooters.list": {
|
|
4090
|
+
memberPath: "headerFooters.list",
|
|
4091
|
+
description: "List header/footer slot entries across sections.",
|
|
4092
|
+
expectedResult: "Returns a paginated DiscoveryOutput of HeaderFooterSlotEntry items.",
|
|
4093
|
+
requiresDocumentContext: true,
|
|
4094
|
+
metadata: readOperation({
|
|
4095
|
+
throws: ["INVALID_INPUT", "INVALID_TARGET"]
|
|
4096
|
+
}),
|
|
4097
|
+
referenceDocPath: "header-footers/list.mdx",
|
|
4098
|
+
referenceGroup: "headerFooters"
|
|
4099
|
+
},
|
|
4100
|
+
"headerFooters.get": {
|
|
4101
|
+
memberPath: "headerFooters.get",
|
|
4102
|
+
description: "Get a single header/footer slot entry by address.",
|
|
4103
|
+
expectedResult: "Returns a HeaderFooterSlotEntry for the targeted section slot.",
|
|
4104
|
+
requiresDocumentContext: true,
|
|
4105
|
+
metadata: readOperation({
|
|
4106
|
+
throws: ["TARGET_NOT_FOUND", "INVALID_TARGET", "INVALID_INPUT"]
|
|
4107
|
+
}),
|
|
4108
|
+
referenceDocPath: "header-footers/get.mdx",
|
|
4109
|
+
referenceGroup: "headerFooters"
|
|
4110
|
+
},
|
|
4111
|
+
"headerFooters.resolve": {
|
|
4112
|
+
memberPath: "headerFooters.resolve",
|
|
4113
|
+
description: "Resolve the effective header/footer reference for a slot, walking the section inheritance chain.",
|
|
4114
|
+
expectedResult: "Returns a HeaderFooterResolveResult indicating explicit, inherited, or none status with the resolved refId.",
|
|
4115
|
+
requiresDocumentContext: true,
|
|
4116
|
+
metadata: readOperation({
|
|
4117
|
+
throws: ["TARGET_NOT_FOUND", "INVALID_TARGET", "INVALID_INPUT"]
|
|
4118
|
+
}),
|
|
4119
|
+
referenceDocPath: "header-footers/resolve.mdx",
|
|
4120
|
+
referenceGroup: "headerFooters"
|
|
4121
|
+
},
|
|
4122
|
+
"headerFooters.refs.set": {
|
|
4123
|
+
memberPath: "headerFooters.refs.set",
|
|
4124
|
+
description: "Set an explicit header/footer reference on a section slot.",
|
|
4125
|
+
expectedResult: "Returns a SectionMutationResult receipt; reports NO_OP if the reference already matches, INVALID_TARGET if the relationship does not exist.",
|
|
4126
|
+
requiresDocumentContext: true,
|
|
4127
|
+
metadata: mutationOperation({
|
|
4128
|
+
idempotency: "conditional",
|
|
4129
|
+
supportsDryRun: true,
|
|
4130
|
+
supportsTrackedMode: false,
|
|
4131
|
+
possibleFailureCodes: ["NO_OP", "INVALID_TARGET", "CAPABILITY_UNAVAILABLE"],
|
|
4132
|
+
throws: T_HEADER_FOOTER_MUTATION,
|
|
4133
|
+
historyUnsafe: true
|
|
4134
|
+
}),
|
|
4135
|
+
referenceDocPath: "header-footers/refs/set.mdx",
|
|
4136
|
+
referenceGroup: "headerFooters"
|
|
4137
|
+
},
|
|
4138
|
+
"headerFooters.refs.clear": {
|
|
4139
|
+
memberPath: "headerFooters.refs.clear",
|
|
4140
|
+
description: "Clear an explicit header/footer reference from a section slot.",
|
|
4141
|
+
expectedResult: "Returns a SectionMutationResult receipt; reports NO_OP if no explicit reference existed.",
|
|
4142
|
+
requiresDocumentContext: true,
|
|
4143
|
+
metadata: mutationOperation({
|
|
4144
|
+
idempotency: "conditional",
|
|
4145
|
+
supportsDryRun: true,
|
|
4146
|
+
supportsTrackedMode: false,
|
|
4147
|
+
possibleFailureCodes: ["NO_OP"],
|
|
4148
|
+
throws: T_HEADER_FOOTER_MUTATION,
|
|
4149
|
+
historyUnsafe: true
|
|
4150
|
+
}),
|
|
4151
|
+
referenceDocPath: "header-footers/refs/clear.mdx",
|
|
4152
|
+
referenceGroup: "headerFooters"
|
|
4153
|
+
},
|
|
4154
|
+
"headerFooters.refs.setLinkedToPrevious": {
|
|
4155
|
+
memberPath: "headerFooters.refs.setLinkedToPrevious",
|
|
4156
|
+
description: "Link or unlink a header/footer slot to/from the previous section.",
|
|
4157
|
+
expectedResult: "Returns a SectionMutationResult receipt; reports NO_OP if the link state already matches, INVALID_TARGET for the first section.",
|
|
4158
|
+
requiresDocumentContext: true,
|
|
4159
|
+
metadata: mutationOperation({
|
|
4160
|
+
idempotency: "conditional",
|
|
4161
|
+
supportsDryRun: true,
|
|
4162
|
+
supportsTrackedMode: false,
|
|
4163
|
+
possibleFailureCodes: ["NO_OP", "INVALID_TARGET", "CAPABILITY_UNAVAILABLE"],
|
|
4164
|
+
throws: T_HEADER_FOOTER_MUTATION,
|
|
4165
|
+
historyUnsafe: true
|
|
4166
|
+
}),
|
|
4167
|
+
referenceDocPath: "header-footers/refs/set-linked-to-previous.mdx",
|
|
4168
|
+
referenceGroup: "headerFooters"
|
|
4169
|
+
},
|
|
4170
|
+
"headerFooters.parts.list": {
|
|
4171
|
+
memberPath: "headerFooters.parts.list",
|
|
4172
|
+
description: "List unique header/footer part records from document relationships.",
|
|
4173
|
+
expectedResult: "Returns a paginated DiscoveryOutput of HeaderFooterPartEntry items.",
|
|
4174
|
+
requiresDocumentContext: true,
|
|
4175
|
+
metadata: readOperation({
|
|
4176
|
+
throws: ["CAPABILITY_UNAVAILABLE", "INVALID_INPUT"]
|
|
4177
|
+
}),
|
|
4178
|
+
referenceDocPath: "header-footers/parts/list.mdx",
|
|
4179
|
+
referenceGroup: "headerFooters"
|
|
4180
|
+
},
|
|
4181
|
+
"headerFooters.parts.create": {
|
|
4182
|
+
memberPath: "headerFooters.parts.create",
|
|
4183
|
+
description: "Create a new independent header/footer part, optionally cloned from an existing part.",
|
|
4184
|
+
expectedResult: "Returns a HeaderFooterPartsMutationResult with the new refId/partPath on success, INVALID_TARGET failure when sourceRefId is invalid or mismatched.",
|
|
4185
|
+
requiresDocumentContext: true,
|
|
4186
|
+
metadata: mutationOperation({
|
|
4187
|
+
idempotency: "non-idempotent",
|
|
4188
|
+
supportsDryRun: true,
|
|
4189
|
+
supportsTrackedMode: false,
|
|
4190
|
+
possibleFailureCodes: ["INVALID_TARGET"],
|
|
4191
|
+
throws: ["INVALID_TARGET", "INVALID_INPUT", "CAPABILITY_UNAVAILABLE", "INTERNAL_ERROR"],
|
|
4192
|
+
historyUnsafe: true
|
|
4193
|
+
}),
|
|
4194
|
+
referenceDocPath: "header-footers/parts/create.mdx",
|
|
4195
|
+
referenceGroup: "headerFooters"
|
|
4196
|
+
},
|
|
4197
|
+
"headerFooters.parts.delete": {
|
|
4198
|
+
memberPath: "headerFooters.parts.delete",
|
|
4199
|
+
description: "Delete a header/footer part and its associated relationship when no section slots reference it.",
|
|
4200
|
+
expectedResult: "Returns a HeaderFooterPartsMutationResult on success; INVALID_TARGET failure if sections still reference the part.",
|
|
4201
|
+
requiresDocumentContext: true,
|
|
4202
|
+
metadata: mutationOperation({
|
|
4203
|
+
idempotency: "conditional",
|
|
4204
|
+
supportsDryRun: true,
|
|
4205
|
+
supportsTrackedMode: false,
|
|
4206
|
+
possibleFailureCodes: ["INVALID_TARGET"],
|
|
4207
|
+
throws: ["TARGET_NOT_FOUND", "INVALID_TARGET", "INVALID_INPUT", "CAPABILITY_UNAVAILABLE", "INTERNAL_ERROR"],
|
|
4208
|
+
historyUnsafe: true
|
|
4209
|
+
}),
|
|
4210
|
+
referenceDocPath: "header-footers/parts/delete.mdx",
|
|
4211
|
+
referenceGroup: "headerFooters"
|
|
4212
|
+
},
|
|
4082
4213
|
"create.contentControl": {
|
|
4083
4214
|
memberPath: "create.contentControl",
|
|
4084
4215
|
description: "Create a new content control (SDT) in the document.",
|
|
@@ -10656,6 +10787,178 @@ var init_schemas = __esm(() => {
|
|
|
10656
10787
|
success: hyperlinkMutationSuccessSchema,
|
|
10657
10788
|
failure: hyperlinkMutationFailureSchema
|
|
10658
10789
|
},
|
|
10790
|
+
"headerFooters.list": {
|
|
10791
|
+
input: objectSchema({
|
|
10792
|
+
kind: { enum: ["header", "footer"] },
|
|
10793
|
+
section: sectionAddressSchema,
|
|
10794
|
+
limit: { type: "integer", minimum: 1 },
|
|
10795
|
+
offset: { type: "integer", minimum: 0 }
|
|
10796
|
+
}),
|
|
10797
|
+
output: discoveryResultSchema(discoveryItemSchema({
|
|
10798
|
+
section: sectionAddressSchema,
|
|
10799
|
+
sectionIndex: { type: "integer", minimum: 0 },
|
|
10800
|
+
kind: { enum: ["header", "footer"] },
|
|
10801
|
+
variant: { enum: ["default", "first", "even"] },
|
|
10802
|
+
refId: { type: ["string", "null"] },
|
|
10803
|
+
isExplicit: { type: "boolean" }
|
|
10804
|
+
}, ["section", "sectionIndex", "kind", "variant", "isExplicit"]))
|
|
10805
|
+
},
|
|
10806
|
+
"headerFooters.get": {
|
|
10807
|
+
input: objectSchema({
|
|
10808
|
+
target: objectSchema({
|
|
10809
|
+
kind: { const: "headerFooterSlot" },
|
|
10810
|
+
section: sectionAddressSchema,
|
|
10811
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
10812
|
+
variant: { enum: ["default", "first", "even"] }
|
|
10813
|
+
}, ["kind", "section", "headerFooterKind", "variant"])
|
|
10814
|
+
}, ["target"]),
|
|
10815
|
+
output: objectSchema({
|
|
10816
|
+
section: sectionAddressSchema,
|
|
10817
|
+
sectionIndex: { type: "integer", minimum: 0 },
|
|
10818
|
+
kind: { enum: ["header", "footer"] },
|
|
10819
|
+
variant: { enum: ["default", "first", "even"] },
|
|
10820
|
+
refId: { type: ["string", "null"] },
|
|
10821
|
+
isExplicit: { type: "boolean" }
|
|
10822
|
+
}, ["section", "sectionIndex", "kind", "variant", "isExplicit"])
|
|
10823
|
+
},
|
|
10824
|
+
"headerFooters.resolve": {
|
|
10825
|
+
input: objectSchema({
|
|
10826
|
+
target: objectSchema({
|
|
10827
|
+
kind: { const: "headerFooterSlot" },
|
|
10828
|
+
section: sectionAddressSchema,
|
|
10829
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
10830
|
+
variant: { enum: ["default", "first", "even"] }
|
|
10831
|
+
}, ["kind", "section", "headerFooterKind", "variant"])
|
|
10832
|
+
}, ["target"]),
|
|
10833
|
+
output: {
|
|
10834
|
+
oneOf: [
|
|
10835
|
+
objectSchema({ status: { const: "explicit" }, refId: { type: "string" }, section: sectionAddressSchema }, [
|
|
10836
|
+
"status",
|
|
10837
|
+
"refId",
|
|
10838
|
+
"section"
|
|
10839
|
+
]),
|
|
10840
|
+
objectSchema({
|
|
10841
|
+
status: { const: "inherited" },
|
|
10842
|
+
refId: { type: "string" },
|
|
10843
|
+
resolvedFromSection: sectionAddressSchema,
|
|
10844
|
+
resolvedVariant: { enum: ["default", "first", "even"] }
|
|
10845
|
+
}, ["status", "refId", "resolvedFromSection", "resolvedVariant"]),
|
|
10846
|
+
objectSchema({ status: { const: "none" } }, ["status"])
|
|
10847
|
+
]
|
|
10848
|
+
}
|
|
10849
|
+
},
|
|
10850
|
+
"headerFooters.refs.set": {
|
|
10851
|
+
input: objectSchema({
|
|
10852
|
+
target: objectSchema({
|
|
10853
|
+
kind: { const: "headerFooterSlot" },
|
|
10854
|
+
section: sectionAddressSchema,
|
|
10855
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
10856
|
+
variant: { enum: ["default", "first", "even"] }
|
|
10857
|
+
}, ["kind", "section", "headerFooterKind", "variant"]),
|
|
10858
|
+
refId: { type: "string", minLength: 1 }
|
|
10859
|
+
}, ["target", "refId"]),
|
|
10860
|
+
output: sectionMutationResultSchemaFor("headerFooters.refs.set"),
|
|
10861
|
+
success: sectionMutationSuccessSchema,
|
|
10862
|
+
failure: sectionMutationFailureSchemaFor("headerFooters.refs.set")
|
|
10863
|
+
},
|
|
10864
|
+
"headerFooters.refs.clear": {
|
|
10865
|
+
input: objectSchema({
|
|
10866
|
+
target: objectSchema({
|
|
10867
|
+
kind: { const: "headerFooterSlot" },
|
|
10868
|
+
section: sectionAddressSchema,
|
|
10869
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
10870
|
+
variant: { enum: ["default", "first", "even"] }
|
|
10871
|
+
}, ["kind", "section", "headerFooterKind", "variant"])
|
|
10872
|
+
}, ["target"]),
|
|
10873
|
+
output: sectionMutationResultSchemaFor("headerFooters.refs.clear"),
|
|
10874
|
+
success: sectionMutationSuccessSchema,
|
|
10875
|
+
failure: sectionMutationFailureSchemaFor("headerFooters.refs.clear")
|
|
10876
|
+
},
|
|
10877
|
+
"headerFooters.refs.setLinkedToPrevious": {
|
|
10878
|
+
input: objectSchema({
|
|
10879
|
+
target: objectSchema({
|
|
10880
|
+
kind: { const: "headerFooterSlot" },
|
|
10881
|
+
section: sectionAddressSchema,
|
|
10882
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
10883
|
+
variant: { enum: ["default", "first", "even"] }
|
|
10884
|
+
}, ["kind", "section", "headerFooterKind", "variant"]),
|
|
10885
|
+
linked: { type: "boolean" }
|
|
10886
|
+
}, ["target", "linked"]),
|
|
10887
|
+
output: sectionMutationResultSchemaFor("headerFooters.refs.setLinkedToPrevious"),
|
|
10888
|
+
success: sectionMutationSuccessSchema,
|
|
10889
|
+
failure: sectionMutationFailureSchemaFor("headerFooters.refs.setLinkedToPrevious")
|
|
10890
|
+
},
|
|
10891
|
+
"headerFooters.parts.list": {
|
|
10892
|
+
input: objectSchema({
|
|
10893
|
+
kind: { enum: ["header", "footer"] },
|
|
10894
|
+
limit: { type: "integer", minimum: 1 },
|
|
10895
|
+
offset: { type: "integer", minimum: 0 }
|
|
10896
|
+
}),
|
|
10897
|
+
output: discoveryResultSchema(discoveryItemSchema({
|
|
10898
|
+
refId: { type: "string" },
|
|
10899
|
+
kind: { enum: ["header", "footer"] },
|
|
10900
|
+
partPath: { type: "string" },
|
|
10901
|
+
referencedBySections: arraySchema(sectionAddressSchema)
|
|
10902
|
+
}, ["refId", "kind", "partPath", "referencedBySections"]))
|
|
10903
|
+
},
|
|
10904
|
+
"headerFooters.parts.create": {
|
|
10905
|
+
input: objectSchema({
|
|
10906
|
+
kind: { enum: ["header", "footer"] },
|
|
10907
|
+
sourceRefId: { type: "string", minLength: 1 }
|
|
10908
|
+
}, ["kind"]),
|
|
10909
|
+
output: {
|
|
10910
|
+
oneOf: [
|
|
10911
|
+
objectSchema({ success: { const: true }, refId: { type: "string" }, partPath: { type: "string" } }, [
|
|
10912
|
+
"success",
|
|
10913
|
+
"refId",
|
|
10914
|
+
"partPath"
|
|
10915
|
+
]),
|
|
10916
|
+
objectSchema({
|
|
10917
|
+
success: { const: false },
|
|
10918
|
+
failure: receiptFailureSchemaFor("headerFooters.parts.create")
|
|
10919
|
+
}, ["success", "failure"])
|
|
10920
|
+
]
|
|
10921
|
+
},
|
|
10922
|
+
success: objectSchema({ success: { const: true }, refId: { type: "string" }, partPath: { type: "string" } }, [
|
|
10923
|
+
"success",
|
|
10924
|
+
"refId",
|
|
10925
|
+
"partPath"
|
|
10926
|
+
]),
|
|
10927
|
+
failure: objectSchema({
|
|
10928
|
+
success: { const: false },
|
|
10929
|
+
failure: receiptFailureSchemaFor("headerFooters.parts.create")
|
|
10930
|
+
}, ["success", "failure"])
|
|
10931
|
+
},
|
|
10932
|
+
"headerFooters.parts.delete": {
|
|
10933
|
+
input: objectSchema({
|
|
10934
|
+
target: objectSchema({
|
|
10935
|
+
kind: { const: "headerFooterPart" },
|
|
10936
|
+
refId: { type: "string", minLength: 1 }
|
|
10937
|
+
}, ["kind", "refId"])
|
|
10938
|
+
}, ["target"]),
|
|
10939
|
+
output: {
|
|
10940
|
+
oneOf: [
|
|
10941
|
+
objectSchema({ success: { const: true }, refId: { type: "string" }, partPath: { type: "string" } }, [
|
|
10942
|
+
"success",
|
|
10943
|
+
"refId",
|
|
10944
|
+
"partPath"
|
|
10945
|
+
]),
|
|
10946
|
+
objectSchema({
|
|
10947
|
+
success: { const: false },
|
|
10948
|
+
failure: receiptFailureSchemaFor("headerFooters.parts.delete")
|
|
10949
|
+
}, ["success", "failure"])
|
|
10950
|
+
]
|
|
10951
|
+
},
|
|
10952
|
+
success: objectSchema({ success: { const: true }, refId: { type: "string" }, partPath: { type: "string" } }, [
|
|
10953
|
+
"success",
|
|
10954
|
+
"refId",
|
|
10955
|
+
"partPath"
|
|
10956
|
+
]),
|
|
10957
|
+
failure: objectSchema({
|
|
10958
|
+
success: { const: false },
|
|
10959
|
+
failure: receiptFailureSchemaFor("headerFooters.parts.delete")
|
|
10960
|
+
}, ["success", "failure"])
|
|
10961
|
+
},
|
|
10659
10962
|
...buildContentControlSchemas(),
|
|
10660
10963
|
"bookmarks.list": {
|
|
10661
10964
|
input: refListQuerySchema,
|
|
@@ -11097,6 +11400,11 @@ var init_reference_doc_map = __esm(() => {
|
|
|
11097
11400
|
description: "Hyperlink discovery, creation, and metadata management.",
|
|
11098
11401
|
pagePath: "hyperlinks/index.mdx"
|
|
11099
11402
|
},
|
|
11403
|
+
headerFooters: {
|
|
11404
|
+
title: "Headers & Footers",
|
|
11405
|
+
description: "Structure, references, and part lifecycle for document headers and footers.",
|
|
11406
|
+
pagePath: "header-footers/index.mdx"
|
|
11407
|
+
},
|
|
11100
11408
|
contentControls: {
|
|
11101
11409
|
title: "Content Controls",
|
|
11102
11410
|
description: "Content control (SDT) discovery, mutation, typed controls, and Word compatibility.",
|
|
@@ -11373,7 +11681,6 @@ var init_inline_semantics = __esm(() => {
|
|
|
11373
11681
|
init_token_parsers();
|
|
11374
11682
|
init_error_types();
|
|
11375
11683
|
});
|
|
11376
|
-
|
|
11377
11684
|
// ../../packages/document-api/src/markdown-to-fragment/markdown-to-fragment.ts
|
|
11378
11685
|
function executeMarkdownToFragment(adapter, input) {
|
|
11379
11686
|
return adapter.markdownToFragment(input);
|
|
@@ -12920,6 +13227,15 @@ function buildDispatchTable(api) {
|
|
|
12920
13227
|
"hyperlinks.insert": (input, options) => api.hyperlinks.insert(input, options),
|
|
12921
13228
|
"hyperlinks.patch": (input, options) => api.hyperlinks.patch(input, options),
|
|
12922
13229
|
"hyperlinks.remove": (input, options) => api.hyperlinks.remove(input, options),
|
|
13230
|
+
"headerFooters.list": (input) => api.headerFooters.list(input),
|
|
13231
|
+
"headerFooters.get": (input) => api.headerFooters.get(input),
|
|
13232
|
+
"headerFooters.resolve": (input) => api.headerFooters.resolve(input),
|
|
13233
|
+
"headerFooters.refs.set": (input, options) => api.headerFooters.refs.set(input, options),
|
|
13234
|
+
"headerFooters.refs.clear": (input, options) => api.headerFooters.refs.clear(input, options),
|
|
13235
|
+
"headerFooters.refs.setLinkedToPrevious": (input, options) => api.headerFooters.refs.setLinkedToPrevious(input, options),
|
|
13236
|
+
"headerFooters.parts.list": (input) => api.headerFooters.parts.list(input),
|
|
13237
|
+
"headerFooters.parts.create": (input, options) => api.headerFooters.parts.create(input, options),
|
|
13238
|
+
"headerFooters.parts.delete": (input, options) => api.headerFooters.parts.delete(input, options),
|
|
12923
13239
|
"create.contentControl": (input, options) => api.create.contentControl(input, options),
|
|
12924
13240
|
"contentControls.list": (input) => api.contentControls.list(input),
|
|
12925
13241
|
"contentControls.get": (input) => api.contentControls.get(input),
|
|
@@ -13158,7 +13474,38 @@ var init_tables = __esm(() => {
|
|
|
13158
13474
|
MERGE_RANGE_LOCATOR_OPS = new Set(["tables.mergeCells"]);
|
|
13159
13475
|
});
|
|
13160
13476
|
|
|
13161
|
-
// ../../packages/document-api/src/
|
|
13477
|
+
// ../../packages/document-api/src/header-footers/header-footers.ts
|
|
13478
|
+
function assertOneOf2(value, fieldName, allowed) {
|
|
13479
|
+
if (typeof value !== "string" || !allowed.includes(value)) {
|
|
13480
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${fieldName} must be one of: ${allowed.join(", ")}.`, {
|
|
13481
|
+
field: fieldName,
|
|
13482
|
+
value,
|
|
13483
|
+
allowed
|
|
13484
|
+
});
|
|
13485
|
+
}
|
|
13486
|
+
}
|
|
13487
|
+
function assertNonEmptyString2(value, fieldName) {
|
|
13488
|
+
if (typeof value !== "string") {
|
|
13489
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${fieldName} must be a string.`, {
|
|
13490
|
+
field: fieldName,
|
|
13491
|
+
value
|
|
13492
|
+
});
|
|
13493
|
+
}
|
|
13494
|
+
if (value.trim().length === 0) {
|
|
13495
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${fieldName} must be a non-empty string.`, {
|
|
13496
|
+
field: fieldName,
|
|
13497
|
+
value
|
|
13498
|
+
});
|
|
13499
|
+
}
|
|
13500
|
+
}
|
|
13501
|
+
function assertBoolean(value, fieldName) {
|
|
13502
|
+
if (typeof value !== "boolean") {
|
|
13503
|
+
throw new DocumentApiValidationError("INVALID_INPUT", `${fieldName} must be a boolean.`, {
|
|
13504
|
+
field: fieldName,
|
|
13505
|
+
value
|
|
13506
|
+
});
|
|
13507
|
+
}
|
|
13508
|
+
}
|
|
13162
13509
|
function assertSectionAddress(value, fieldName) {
|
|
13163
13510
|
if (!isRecord(value) || value.kind !== "section" || typeof value.sectionId !== "string" || value.sectionId.length === 0) {
|
|
13164
13511
|
throw new DocumentApiValidationError("INVALID_TARGET", `${fieldName} must be a section address.`, {
|
|
@@ -13167,13 +13514,100 @@ function assertSectionAddress(value, fieldName) {
|
|
|
13167
13514
|
});
|
|
13168
13515
|
}
|
|
13169
13516
|
}
|
|
13517
|
+
function assertHeaderFooterSlotTarget(input, operationName) {
|
|
13518
|
+
if (!isRecord(input)) {
|
|
13519
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} input must be an object.`);
|
|
13520
|
+
}
|
|
13521
|
+
const target = input.target;
|
|
13522
|
+
if (!isRecord(target) || target.kind !== "headerFooterSlot") {
|
|
13523
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName}.target must be a headerFooterSlot address.`, { field: `${operationName}.target`, value: target });
|
|
13524
|
+
}
|
|
13525
|
+
assertSectionAddress(target.section, `${operationName}.target.section`);
|
|
13526
|
+
assertOneOf2(target.headerFooterKind, `${operationName}.target.headerFooterKind`, HEADER_FOOTER_KINDS);
|
|
13527
|
+
assertOneOf2(target.variant, `${operationName}.target.variant`, HEADER_FOOTER_VARIANTS);
|
|
13528
|
+
}
|
|
13529
|
+
function assertHeaderFooterPartTarget(input, operationName) {
|
|
13530
|
+
if (!isRecord(input)) {
|
|
13531
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} input must be an object.`);
|
|
13532
|
+
}
|
|
13533
|
+
const target = input.target;
|
|
13534
|
+
if (!isRecord(target) || target.kind !== "headerFooterPart") {
|
|
13535
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName}.target must be a headerFooterPart address.`, { field: `${operationName}.target`, value: target });
|
|
13536
|
+
}
|
|
13537
|
+
assertNonEmptyString2(target.refId, `${operationName}.target.refId`);
|
|
13538
|
+
}
|
|
13539
|
+
function executeHeaderFootersList(adapter, query2) {
|
|
13540
|
+
if (query2?.kind !== undefined) {
|
|
13541
|
+
assertOneOf2(query2.kind, "headerFooters.list.kind", HEADER_FOOTER_KINDS);
|
|
13542
|
+
}
|
|
13543
|
+
if (query2?.section !== undefined) {
|
|
13544
|
+
assertSectionAddress(query2.section, "headerFooters.list.section");
|
|
13545
|
+
}
|
|
13546
|
+
return adapter.list(query2);
|
|
13547
|
+
}
|
|
13548
|
+
function executeHeaderFootersGet(adapter, input) {
|
|
13549
|
+
assertHeaderFooterSlotTarget(input, "headerFooters.get");
|
|
13550
|
+
return adapter.get(input);
|
|
13551
|
+
}
|
|
13552
|
+
function executeHeaderFootersResolve(adapter, input) {
|
|
13553
|
+
assertHeaderFooterSlotTarget(input, "headerFooters.resolve");
|
|
13554
|
+
return adapter.resolve(input);
|
|
13555
|
+
}
|
|
13556
|
+
function executeHeaderFootersRefsSet(adapter, input, options) {
|
|
13557
|
+
assertHeaderFooterSlotTarget(input, "headerFooters.refs.set");
|
|
13558
|
+
assertNonEmptyString2(input.refId, "headerFooters.refs.set.refId");
|
|
13559
|
+
return adapter.refs.set(input, normalizeMutationOptions(options));
|
|
13560
|
+
}
|
|
13561
|
+
function executeHeaderFootersRefsClear(adapter, input, options) {
|
|
13562
|
+
assertHeaderFooterSlotTarget(input, "headerFooters.refs.clear");
|
|
13563
|
+
return adapter.refs.clear(input, normalizeMutationOptions(options));
|
|
13564
|
+
}
|
|
13565
|
+
function executeHeaderFootersRefsSetLinkedToPrevious(adapter, input, options) {
|
|
13566
|
+
assertHeaderFooterSlotTarget(input, "headerFooters.refs.setLinkedToPrevious");
|
|
13567
|
+
assertBoolean(input.linked, "headerFooters.refs.setLinkedToPrevious.linked");
|
|
13568
|
+
return adapter.refs.setLinkedToPrevious(input, normalizeMutationOptions(options));
|
|
13569
|
+
}
|
|
13570
|
+
function executeHeaderFootersPartsList(adapter, query2) {
|
|
13571
|
+
if (query2?.kind !== undefined) {
|
|
13572
|
+
assertOneOf2(query2.kind, "headerFooters.parts.list.kind", HEADER_FOOTER_KINDS);
|
|
13573
|
+
}
|
|
13574
|
+
return adapter.parts.list(query2);
|
|
13575
|
+
}
|
|
13576
|
+
function executeHeaderFootersPartsCreate(adapter, input, options) {
|
|
13577
|
+
assertOneOf2(input?.kind, "headerFooters.parts.create.kind", HEADER_FOOTER_KINDS);
|
|
13578
|
+
if (input.sourceRefId !== undefined) {
|
|
13579
|
+
assertNonEmptyString2(input.sourceRefId, "headerFooters.parts.create.sourceRefId");
|
|
13580
|
+
}
|
|
13581
|
+
return adapter.parts.create(input, normalizeMutationOptions(options));
|
|
13582
|
+
}
|
|
13583
|
+
function executeHeaderFootersPartsDelete(adapter, input, options) {
|
|
13584
|
+
assertHeaderFooterPartTarget(input, "headerFooters.parts.delete");
|
|
13585
|
+
return adapter.parts.delete(input, normalizeMutationOptions(options));
|
|
13586
|
+
}
|
|
13587
|
+
var HEADER_FOOTER_KINDS, HEADER_FOOTER_VARIANTS;
|
|
13588
|
+
var init_header_footers = __esm(() => {
|
|
13589
|
+
init_errors2();
|
|
13590
|
+
init_validation_primitives();
|
|
13591
|
+
HEADER_FOOTER_KINDS = ["header", "footer"];
|
|
13592
|
+
HEADER_FOOTER_VARIANTS = ["default", "first", "even"];
|
|
13593
|
+
});
|
|
13594
|
+
|
|
13595
|
+
// ../../packages/document-api/src/sections/sections.ts
|
|
13596
|
+
function assertSectionAddress2(value, fieldName) {
|
|
13597
|
+
if (!isRecord(value) || value.kind !== "section" || typeof value.sectionId !== "string" || value.sectionId.length === 0) {
|
|
13598
|
+
throw new DocumentApiValidationError("INVALID_TARGET", `${fieldName} must be a section address.`, {
|
|
13599
|
+
field: fieldName,
|
|
13600
|
+
value
|
|
13601
|
+
});
|
|
13602
|
+
}
|
|
13603
|
+
}
|
|
13170
13604
|
function assertSectionTarget(input, operationName) {
|
|
13171
13605
|
if (!isRecord(input)) {
|
|
13172
13606
|
throw new DocumentApiValidationError("INVALID_TARGET", `${operationName} input must be an object.`);
|
|
13173
13607
|
}
|
|
13174
|
-
|
|
13608
|
+
assertSectionAddress2(input.target, `${operationName}.target`);
|
|
13175
13609
|
}
|
|
13176
|
-
function
|
|
13610
|
+
function assertBoolean2(value, fieldName) {
|
|
13177
13611
|
if (typeof value !== "boolean") {
|
|
13178
13612
|
throw new DocumentApiValidationError("INVALID_INPUT", `${fieldName} must be a boolean.`, {
|
|
13179
13613
|
field: fieldName,
|
|
@@ -13189,7 +13623,7 @@ function assertString(value, fieldName) {
|
|
|
13189
13623
|
});
|
|
13190
13624
|
}
|
|
13191
13625
|
}
|
|
13192
|
-
function
|
|
13626
|
+
function assertNonEmptyString3(value, fieldName) {
|
|
13193
13627
|
assertString(value, fieldName);
|
|
13194
13628
|
if (value.trim().length === 0) {
|
|
13195
13629
|
throw new DocumentApiValidationError("INVALID_INPUT", `${fieldName} must be a non-empty string.`, {
|
|
@@ -13214,7 +13648,7 @@ function assertNonNegativeNumber(value, fieldName) {
|
|
|
13214
13648
|
});
|
|
13215
13649
|
}
|
|
13216
13650
|
}
|
|
13217
|
-
function
|
|
13651
|
+
function assertOneOf3(value, fieldName, allowed) {
|
|
13218
13652
|
if (typeof value !== "string" || !allowed.includes(value)) {
|
|
13219
13653
|
throw new DocumentApiValidationError("INVALID_INPUT", `${fieldName} must be one of: ${allowed.join(", ")}.`, {
|
|
13220
13654
|
field: fieldName,
|
|
@@ -13248,9 +13682,9 @@ function validateBorderSpec(value, fieldName) {
|
|
|
13248
13682
|
if (value.color !== undefined)
|
|
13249
13683
|
assertString(value.color, `${fieldName}.color`);
|
|
13250
13684
|
if (value.shadow !== undefined)
|
|
13251
|
-
|
|
13685
|
+
assertBoolean2(value.shadow, `${fieldName}.shadow`);
|
|
13252
13686
|
if (value.frame !== undefined)
|
|
13253
|
-
|
|
13687
|
+
assertBoolean2(value.frame, `${fieldName}.frame`);
|
|
13254
13688
|
}
|
|
13255
13689
|
function validatePageBorders(value, fieldName) {
|
|
13256
13690
|
assertObject(value, fieldName);
|
|
@@ -13261,12 +13695,12 @@ function validatePageBorders(value, fieldName) {
|
|
|
13261
13695
|
});
|
|
13262
13696
|
}
|
|
13263
13697
|
if (value.display !== undefined)
|
|
13264
|
-
|
|
13698
|
+
assertOneOf3(value.display, `${fieldName}.display`, PAGE_BORDER_DISPLAYS);
|
|
13265
13699
|
if (value.offsetFrom !== undefined) {
|
|
13266
|
-
|
|
13700
|
+
assertOneOf3(value.offsetFrom, `${fieldName}.offsetFrom`, PAGE_BORDER_OFFSET_FROM_VALUES);
|
|
13267
13701
|
}
|
|
13268
13702
|
if (value.zOrder !== undefined)
|
|
13269
|
-
|
|
13703
|
+
assertOneOf3(value.zOrder, `${fieldName}.zOrder`, PAGE_BORDER_Z_ORDER_VALUES);
|
|
13270
13704
|
if (value.top !== undefined)
|
|
13271
13705
|
validateBorderSpec(value.top, `${fieldName}.top`);
|
|
13272
13706
|
if (value.right !== undefined)
|
|
@@ -13294,19 +13728,19 @@ function normalizeSectionsListQuery(query2) {
|
|
|
13294
13728
|
return { limit: Number(limit), offset: Number(offset) };
|
|
13295
13729
|
}
|
|
13296
13730
|
function validateHeaderFooterRefParams(operationName, kind, variant) {
|
|
13297
|
-
|
|
13298
|
-
|
|
13731
|
+
assertOneOf3(kind, `${operationName}.kind`, HEADER_FOOTER_KINDS2);
|
|
13732
|
+
assertOneOf3(variant, `${operationName}.variant`, HEADER_FOOTER_VARIANTS2);
|
|
13299
13733
|
}
|
|
13300
13734
|
function executeSectionsList(adapter, query2) {
|
|
13301
13735
|
return adapter.list(normalizeSectionsListQuery(query2));
|
|
13302
13736
|
}
|
|
13303
13737
|
function executeSectionsGet(adapter, input) {
|
|
13304
|
-
|
|
13738
|
+
assertSectionAddress2(input?.address, "sections.get.address");
|
|
13305
13739
|
return adapter.get(input);
|
|
13306
13740
|
}
|
|
13307
13741
|
function executeSectionsSetBreakType(adapter, input, options) {
|
|
13308
13742
|
assertSectionTarget(input, "sections.setBreakType");
|
|
13309
|
-
|
|
13743
|
+
assertOneOf3(input.breakType, "sections.setBreakType.breakType", SECTION_BREAK_TYPES2);
|
|
13310
13744
|
return adapter.setBreakType(input, normalizeMutationOptions(options));
|
|
13311
13745
|
}
|
|
13312
13746
|
function executeSectionsSetPageMargins(adapter, input, options) {
|
|
@@ -13347,10 +13781,10 @@ function executeSectionsSetPageSetup(adapter, input, options) {
|
|
|
13347
13781
|
if (input.height !== undefined)
|
|
13348
13782
|
assertNonNegativeNumber(input.height, "sections.setPageSetup.height");
|
|
13349
13783
|
if (input.orientation !== undefined) {
|
|
13350
|
-
|
|
13784
|
+
assertOneOf3(input.orientation, "sections.setPageSetup.orientation", SECTION_ORIENTATIONS);
|
|
13351
13785
|
}
|
|
13352
13786
|
if (input.paperSize !== undefined)
|
|
13353
|
-
|
|
13787
|
+
assertNonEmptyString3(input.paperSize, "sections.setPageSetup.paperSize");
|
|
13354
13788
|
return adapter.setPageSetup(input, normalizeMutationOptions(options));
|
|
13355
13789
|
}
|
|
13356
13790
|
function executeSectionsSetColumns(adapter, input, options) {
|
|
@@ -13363,12 +13797,12 @@ function executeSectionsSetColumns(adapter, input, options) {
|
|
|
13363
13797
|
if (input.gap !== undefined)
|
|
13364
13798
|
assertNonNegativeNumber(input.gap, "sections.setColumns.gap");
|
|
13365
13799
|
if (input.equalWidth !== undefined)
|
|
13366
|
-
|
|
13800
|
+
assertBoolean2(input.equalWidth, "sections.setColumns.equalWidth");
|
|
13367
13801
|
return adapter.setColumns(input, normalizeMutationOptions(options));
|
|
13368
13802
|
}
|
|
13369
13803
|
function executeSectionsSetLineNumbering(adapter, input, options) {
|
|
13370
13804
|
assertSectionTarget(input, "sections.setLineNumbering");
|
|
13371
|
-
|
|
13805
|
+
assertBoolean2(input.enabled, "sections.setLineNumbering.enabled");
|
|
13372
13806
|
if (input.countBy !== undefined)
|
|
13373
13807
|
assertPositiveInteger2(input.countBy, "sections.setLineNumbering.countBy");
|
|
13374
13808
|
if (input.start !== undefined)
|
|
@@ -13376,7 +13810,7 @@ function executeSectionsSetLineNumbering(adapter, input, options) {
|
|
|
13376
13810
|
if (input.distance !== undefined)
|
|
13377
13811
|
assertNonNegativeNumber(input.distance, "sections.setLineNumbering.distance");
|
|
13378
13812
|
if (input.restart !== undefined) {
|
|
13379
|
-
|
|
13813
|
+
assertOneOf3(input.restart, "sections.setLineNumbering.restart", LINE_NUMBER_RESTARTS);
|
|
13380
13814
|
}
|
|
13381
13815
|
return adapter.setLineNumbering(input, normalizeMutationOptions(options));
|
|
13382
13816
|
}
|
|
@@ -13388,33 +13822,33 @@ function executeSectionsSetPageNumbering(adapter, input, options) {
|
|
|
13388
13822
|
if (input.start !== undefined)
|
|
13389
13823
|
assertPositiveInteger2(input.start, "sections.setPageNumbering.start");
|
|
13390
13824
|
if (input.format !== undefined) {
|
|
13391
|
-
|
|
13825
|
+
assertOneOf3(input.format, "sections.setPageNumbering.format", PAGE_NUMBER_FORMATS);
|
|
13392
13826
|
}
|
|
13393
13827
|
return adapter.setPageNumbering(input, normalizeMutationOptions(options));
|
|
13394
13828
|
}
|
|
13395
13829
|
function executeSectionsSetTitlePage(adapter, input, options) {
|
|
13396
13830
|
assertSectionTarget(input, "sections.setTitlePage");
|
|
13397
|
-
|
|
13831
|
+
assertBoolean2(input.enabled, "sections.setTitlePage.enabled");
|
|
13398
13832
|
return adapter.setTitlePage(input, normalizeMutationOptions(options));
|
|
13399
13833
|
}
|
|
13400
13834
|
function executeSectionsSetOddEvenHeadersFooters(adapter, input, options) {
|
|
13401
|
-
|
|
13835
|
+
assertBoolean2(input?.enabled, "sections.setOddEvenHeadersFooters.enabled");
|
|
13402
13836
|
return adapter.setOddEvenHeadersFooters(input, normalizeMutationOptions(options));
|
|
13403
13837
|
}
|
|
13404
13838
|
function executeSectionsSetVerticalAlign(adapter, input, options) {
|
|
13405
13839
|
assertSectionTarget(input, "sections.setVerticalAlign");
|
|
13406
|
-
|
|
13840
|
+
assertOneOf3(input.value, "sections.setVerticalAlign.value", SECTION_VERTICAL_ALIGNS);
|
|
13407
13841
|
return adapter.setVerticalAlign(input, normalizeMutationOptions(options));
|
|
13408
13842
|
}
|
|
13409
13843
|
function executeSectionsSetSectionDirection(adapter, input, options) {
|
|
13410
13844
|
assertSectionTarget(input, "sections.setSectionDirection");
|
|
13411
|
-
|
|
13845
|
+
assertOneOf3(input.direction, "sections.setSectionDirection.direction", SECTION_DIRECTIONS);
|
|
13412
13846
|
return adapter.setSectionDirection(input, normalizeMutationOptions(options));
|
|
13413
13847
|
}
|
|
13414
13848
|
function executeSectionsSetHeaderFooterRef(adapter, input, options) {
|
|
13415
13849
|
assertSectionTarget(input, "sections.setHeaderFooterRef");
|
|
13416
13850
|
validateHeaderFooterRefParams("sections.setHeaderFooterRef", input.kind, input.variant);
|
|
13417
|
-
|
|
13851
|
+
assertNonEmptyString3(input.refId, "sections.setHeaderFooterRef.refId");
|
|
13418
13852
|
return adapter.setHeaderFooterRef(input, normalizeMutationOptions(options));
|
|
13419
13853
|
}
|
|
13420
13854
|
function executeSectionsClearHeaderFooterRef(adapter, input, options) {
|
|
@@ -13425,7 +13859,7 @@ function executeSectionsClearHeaderFooterRef(adapter, input, options) {
|
|
|
13425
13859
|
function executeSectionsSetLinkToPrevious(adapter, input, options) {
|
|
13426
13860
|
assertSectionTarget(input, "sections.setLinkToPrevious");
|
|
13427
13861
|
validateHeaderFooterRefParams("sections.setLinkToPrevious", input.kind, input.variant);
|
|
13428
|
-
|
|
13862
|
+
assertBoolean2(input.linked, "sections.setLinkToPrevious.linked");
|
|
13429
13863
|
return adapter.setLinkToPrevious(input, normalizeMutationOptions(options));
|
|
13430
13864
|
}
|
|
13431
13865
|
function executeSectionsSetPageBorders(adapter, input, options) {
|
|
@@ -13437,7 +13871,7 @@ function executeSectionsClearPageBorders(adapter, input, options) {
|
|
|
13437
13871
|
assertSectionTarget(input, "sections.clearPageBorders");
|
|
13438
13872
|
return adapter.clearPageBorders(input, normalizeMutationOptions(options));
|
|
13439
13873
|
}
|
|
13440
|
-
var DEFAULT_SECTIONS_LIST_LIMIT = 250, SECTION_BREAK_TYPES2, SECTION_ORIENTATIONS, SECTION_VERTICAL_ALIGNS, SECTION_DIRECTIONS,
|
|
13874
|
+
var DEFAULT_SECTIONS_LIST_LIMIT = 250, SECTION_BREAK_TYPES2, SECTION_ORIENTATIONS, SECTION_VERTICAL_ALIGNS, SECTION_DIRECTIONS, HEADER_FOOTER_KINDS2, HEADER_FOOTER_VARIANTS2, LINE_NUMBER_RESTARTS, PAGE_NUMBER_FORMATS, PAGE_BORDER_DISPLAYS, PAGE_BORDER_OFFSET_FROM_VALUES, PAGE_BORDER_Z_ORDER_VALUES;
|
|
13441
13875
|
var init_sections = __esm(() => {
|
|
13442
13876
|
init_errors2();
|
|
13443
13877
|
init_validation_primitives();
|
|
@@ -13445,8 +13879,8 @@ var init_sections = __esm(() => {
|
|
|
13445
13879
|
SECTION_ORIENTATIONS = ["portrait", "landscape"];
|
|
13446
13880
|
SECTION_VERTICAL_ALIGNS = ["top", "center", "bottom", "both"];
|
|
13447
13881
|
SECTION_DIRECTIONS = ["ltr", "rtl"];
|
|
13448
|
-
|
|
13449
|
-
|
|
13882
|
+
HEADER_FOOTER_KINDS2 = ["header", "footer"];
|
|
13883
|
+
HEADER_FOOTER_VARIANTS2 = ["default", "first", "even"];
|
|
13450
13884
|
LINE_NUMBER_RESTARTS = ["continuous", "newPage", "newSection"];
|
|
13451
13885
|
PAGE_NUMBER_FORMATS = [
|
|
13452
13886
|
"decimal",
|
|
@@ -15149,6 +15583,39 @@ function createDocumentApi(adapters) {
|
|
|
15149
15583
|
return executeHyperlinksRemove(adapters.hyperlinks, input, options);
|
|
15150
15584
|
}
|
|
15151
15585
|
},
|
|
15586
|
+
headerFooters: {
|
|
15587
|
+
list(query2) {
|
|
15588
|
+
return executeHeaderFootersList(adapters.headerFooters, query2);
|
|
15589
|
+
},
|
|
15590
|
+
get(input) {
|
|
15591
|
+
return executeHeaderFootersGet(adapters.headerFooters, input);
|
|
15592
|
+
},
|
|
15593
|
+
resolve(input) {
|
|
15594
|
+
return executeHeaderFootersResolve(adapters.headerFooters, input);
|
|
15595
|
+
},
|
|
15596
|
+
refs: {
|
|
15597
|
+
set(input, options) {
|
|
15598
|
+
return executeHeaderFootersRefsSet(adapters.headerFooters, input, options);
|
|
15599
|
+
},
|
|
15600
|
+
clear(input, options) {
|
|
15601
|
+
return executeHeaderFootersRefsClear(adapters.headerFooters, input, options);
|
|
15602
|
+
},
|
|
15603
|
+
setLinkedToPrevious(input, options) {
|
|
15604
|
+
return executeHeaderFootersRefsSetLinkedToPrevious(adapters.headerFooters, input, options);
|
|
15605
|
+
}
|
|
15606
|
+
},
|
|
15607
|
+
parts: {
|
|
15608
|
+
list(query2) {
|
|
15609
|
+
return executeHeaderFootersPartsList(adapters.headerFooters, query2);
|
|
15610
|
+
},
|
|
15611
|
+
create(input, options) {
|
|
15612
|
+
return executeHeaderFootersPartsCreate(adapters.headerFooters, input, options);
|
|
15613
|
+
},
|
|
15614
|
+
delete(input, options) {
|
|
15615
|
+
return executeHeaderFootersPartsDelete(adapters.headerFooters, input, options);
|
|
15616
|
+
}
|
|
15617
|
+
}
|
|
15618
|
+
},
|
|
15152
15619
|
contentControls: {
|
|
15153
15620
|
list: (query2) => executeContentControlsList(adapters.contentControls, query2),
|
|
15154
15621
|
get: (input) => executeContentControlsGet(adapters.contentControls, input),
|
|
@@ -15486,6 +15953,7 @@ var init_src = __esm(() => {
|
|
|
15486
15953
|
init_invoke();
|
|
15487
15954
|
init_tables();
|
|
15488
15955
|
init_paragraphs();
|
|
15956
|
+
init_header_footers();
|
|
15489
15957
|
init_sections();
|
|
15490
15958
|
init_images();
|
|
15491
15959
|
init_toc();
|
|
@@ -16600,7 +17068,16 @@ var init_operation_hints = __esm(() => {
|
|
|
16600
17068
|
"images.setWrapDistances": "result",
|
|
16601
17069
|
"images.setPosition": "result",
|
|
16602
17070
|
"images.setAnchorOptions": "result",
|
|
16603
|
-
"images.setZOrder": "result"
|
|
17071
|
+
"images.setZOrder": "result",
|
|
17072
|
+
"headerFooters.list": "result",
|
|
17073
|
+
"headerFooters.get": "result",
|
|
17074
|
+
"headerFooters.resolve": "result",
|
|
17075
|
+
"headerFooters.refs.set": "result",
|
|
17076
|
+
"headerFooters.refs.clear": "result",
|
|
17077
|
+
"headerFooters.refs.setLinkedToPrevious": "result",
|
|
17078
|
+
"headerFooters.parts.list": "result",
|
|
17079
|
+
"headerFooters.parts.create": "result",
|
|
17080
|
+
"headerFooters.parts.delete": "result"
|
|
16604
17081
|
};
|
|
16605
17082
|
RESPONSE_VALIDATION_KEY = {
|
|
16606
17083
|
insert: "receipt",
|
|
@@ -37760,7 +38237,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
|
|
|
37760
38237
|
emptyOptions2 = {};
|
|
37761
38238
|
});
|
|
37762
38239
|
|
|
37763
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
38240
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-CnKjdAUR.es.js
|
|
37764
38241
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
37765
38242
|
const fieldValue = extension$1.config[field];
|
|
37766
38243
|
if (typeof fieldValue === "function")
|
|
@@ -38958,14 +39435,14 @@ function assertPositiveInteger$1(value, fieldName, operation) {
|
|
|
38958
39435
|
value
|
|
38959
39436
|
});
|
|
38960
39437
|
}
|
|
38961
|
-
function assertOneOf$
|
|
39438
|
+
function assertOneOf$2(value, fieldName, allowed, operation) {
|
|
38962
39439
|
if (typeof value !== "string" || !allowed.includes(value))
|
|
38963
39440
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${operation} ${fieldName} must be one of: ${allowed.join(", ")}. Got ${JSON.stringify(value)}.`, {
|
|
38964
39441
|
field: fieldName,
|
|
38965
39442
|
value
|
|
38966
39443
|
});
|
|
38967
39444
|
}
|
|
38968
|
-
function assertNonEmptyString$
|
|
39445
|
+
function assertNonEmptyString$2(value, fieldName, operation) {
|
|
38969
39446
|
if (typeof value !== "string" || value.length === 0)
|
|
38970
39447
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${operation} ${fieldName} must be a non-empty string, got ${JSON.stringify(value)}.`, {
|
|
38971
39448
|
field: fieldName,
|
|
@@ -38979,7 +39456,7 @@ function assertNotEmptyPatch2(input, patchKeys, operation) {
|
|
|
38979
39456
|
function validateSetStyle2(input) {
|
|
38980
39457
|
assertParagraphTarget2(input, "styles.paragraph.setStyle");
|
|
38981
39458
|
assertNoUnknownFields3(input, SET_STYLE_KEYS2, "styles.paragraph.setStyle");
|
|
38982
|
-
assertNonEmptyString$
|
|
39459
|
+
assertNonEmptyString$2(input.styleId, "styleId", "styles.paragraph.setStyle");
|
|
38983
39460
|
}
|
|
38984
39461
|
function validateClearStyle2(input) {
|
|
38985
39462
|
assertParagraphTarget2(input, "styles.paragraph.clearStyle");
|
|
@@ -38995,7 +39472,7 @@ function validateSetAlignment2(input) {
|
|
|
38995
39472
|
const rec = input;
|
|
38996
39473
|
if (rec.alignment === undefined)
|
|
38997
39474
|
throw new DocumentApiValidationError2("INVALID_INPUT", "format.paragraph.setAlignment requires an alignment field.");
|
|
38998
|
-
assertOneOf$
|
|
39475
|
+
assertOneOf$2(rec.alignment, "alignment", PARAGRAPH_ALIGNMENTS2, "format.paragraph.setAlignment");
|
|
38999
39476
|
}
|
|
39000
39477
|
function validateClearAlignment2(input) {
|
|
39001
39478
|
assertParagraphTarget2(input, "format.paragraph.clearAlignment");
|
|
@@ -39048,7 +39525,7 @@ function validateSetSpacing2(input) {
|
|
|
39048
39525
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${op}: lineRule is required when line is provided.`);
|
|
39049
39526
|
}
|
|
39050
39527
|
if (rec.lineRule !== undefined)
|
|
39051
|
-
assertOneOf$
|
|
39528
|
+
assertOneOf$2(rec.lineRule, "lineRule", LINE_RULES2, op);
|
|
39052
39529
|
}
|
|
39053
39530
|
function validateClearSpacing2(input) {
|
|
39054
39531
|
assertParagraphTarget2(input, "format.paragraph.clearSpacing");
|
|
@@ -39113,9 +39590,9 @@ function validateSetTabStop2(input) {
|
|
|
39113
39590
|
assertNonNegativeInteger2(rec.position, "position", op);
|
|
39114
39591
|
if (rec.alignment === undefined)
|
|
39115
39592
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${op} requires an alignment field.`);
|
|
39116
|
-
assertOneOf$
|
|
39593
|
+
assertOneOf$2(rec.alignment, "alignment", TAB_STOP_ALIGNMENTS2, op);
|
|
39117
39594
|
if (rec.leader !== undefined)
|
|
39118
|
-
assertOneOf$
|
|
39595
|
+
assertOneOf$2(rec.leader, "leader", TAB_STOP_LEADERS2, op);
|
|
39119
39596
|
}
|
|
39120
39597
|
function validateClearTabStop2(input) {
|
|
39121
39598
|
const op = "format.paragraph.clearTabStop";
|
|
@@ -39137,12 +39614,12 @@ function validateSetBorder2(input) {
|
|
|
39137
39614
|
const rec = input;
|
|
39138
39615
|
if (rec.side === undefined)
|
|
39139
39616
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${op} requires a side field.`);
|
|
39140
|
-
assertOneOf$
|
|
39617
|
+
assertOneOf$2(rec.side, "side", BORDER_SIDES2, op);
|
|
39141
39618
|
if (rec.style === undefined)
|
|
39142
39619
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${op} requires a style field.`);
|
|
39143
|
-
assertNonEmptyString$
|
|
39620
|
+
assertNonEmptyString$2(rec.style, "style", op);
|
|
39144
39621
|
if (rec.color !== undefined)
|
|
39145
|
-
assertNonEmptyString$
|
|
39622
|
+
assertNonEmptyString$2(rec.color, "color", op);
|
|
39146
39623
|
if (rec.size !== undefined)
|
|
39147
39624
|
assertNonNegativeInteger2(rec.size, "size", op);
|
|
39148
39625
|
if (rec.space !== undefined)
|
|
@@ -39155,7 +39632,7 @@ function validateClearBorder2(input) {
|
|
|
39155
39632
|
const rec = input;
|
|
39156
39633
|
if (rec.side === undefined)
|
|
39157
39634
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${op} requires a side field.`);
|
|
39158
|
-
assertOneOf$
|
|
39635
|
+
assertOneOf$2(rec.side, "side", CLEAR_BORDER_SIDES2, op);
|
|
39159
39636
|
}
|
|
39160
39637
|
function validateSetShading2(input) {
|
|
39161
39638
|
const op = "format.paragraph.setShading";
|
|
@@ -39168,11 +39645,11 @@ function validateSetShading2(input) {
|
|
|
39168
39645
|
"pattern"
|
|
39169
39646
|
], op);
|
|
39170
39647
|
if (rec.fill !== undefined)
|
|
39171
|
-
assertNonEmptyString$
|
|
39648
|
+
assertNonEmptyString$2(rec.fill, "fill", op);
|
|
39172
39649
|
if (rec.color !== undefined)
|
|
39173
|
-
assertNonEmptyString$
|
|
39650
|
+
assertNonEmptyString$2(rec.color, "color", op);
|
|
39174
39651
|
if (rec.pattern !== undefined)
|
|
39175
|
-
assertNonEmptyString$
|
|
39652
|
+
assertNonEmptyString$2(rec.pattern, "pattern", op);
|
|
39176
39653
|
}
|
|
39177
39654
|
function validateClearShading2(input) {
|
|
39178
39655
|
assertParagraphTarget2(input, "format.paragraph.clearShading");
|
|
@@ -41564,6 +42041,15 @@ function buildDispatchTable2(api) {
|
|
|
41564
42041
|
"hyperlinks.insert": (input, options) => api.hyperlinks.insert(input, options),
|
|
41565
42042
|
"hyperlinks.patch": (input, options) => api.hyperlinks.patch(input, options),
|
|
41566
42043
|
"hyperlinks.remove": (input, options) => api.hyperlinks.remove(input, options),
|
|
42044
|
+
"headerFooters.list": (input) => api.headerFooters.list(input),
|
|
42045
|
+
"headerFooters.get": (input) => api.headerFooters.get(input),
|
|
42046
|
+
"headerFooters.resolve": (input) => api.headerFooters.resolve(input),
|
|
42047
|
+
"headerFooters.refs.set": (input, options) => api.headerFooters.refs.set(input, options),
|
|
42048
|
+
"headerFooters.refs.clear": (input, options) => api.headerFooters.refs.clear(input, options),
|
|
42049
|
+
"headerFooters.refs.setLinkedToPrevious": (input, options) => api.headerFooters.refs.setLinkedToPrevious(input, options),
|
|
42050
|
+
"headerFooters.parts.list": (input) => api.headerFooters.parts.list(input),
|
|
42051
|
+
"headerFooters.parts.create": (input, options) => api.headerFooters.parts.create(input, options),
|
|
42052
|
+
"headerFooters.parts.delete": (input, options) => api.headerFooters.parts.delete(input, options),
|
|
41567
42053
|
"create.contentControl": (input, options) => api.create.contentControl(input, options),
|
|
41568
42054
|
"contentControls.list": (input) => api.contentControls.list(input),
|
|
41569
42055
|
"contentControls.get": (input) => api.contentControls.get(input),
|
|
@@ -41743,7 +42229,109 @@ function executeTableOperation2(operationName, adapter, input, options) {
|
|
|
41743
42229
|
validateTableScopedLocator2(input, operationName);
|
|
41744
42230
|
return adapter(input, normalizeMutationOptions2(options));
|
|
41745
42231
|
}
|
|
41746
|
-
function
|
|
42232
|
+
function assertOneOf$1(value, fieldName, allowed) {
|
|
42233
|
+
if (typeof value !== "string" || !allowed.includes(value))
|
|
42234
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be one of: ${allowed.join(", ")}.`, {
|
|
42235
|
+
field: fieldName,
|
|
42236
|
+
value,
|
|
42237
|
+
allowed
|
|
42238
|
+
});
|
|
42239
|
+
}
|
|
42240
|
+
function assertNonEmptyString$1(value, fieldName) {
|
|
42241
|
+
if (typeof value !== "string")
|
|
42242
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be a string.`, {
|
|
42243
|
+
field: fieldName,
|
|
42244
|
+
value
|
|
42245
|
+
});
|
|
42246
|
+
if (value.trim().length === 0)
|
|
42247
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be a non-empty string.`, {
|
|
42248
|
+
field: fieldName,
|
|
42249
|
+
value
|
|
42250
|
+
});
|
|
42251
|
+
}
|
|
42252
|
+
function assertBoolean$1(value, fieldName) {
|
|
42253
|
+
if (typeof value !== "boolean")
|
|
42254
|
+
throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be a boolean.`, {
|
|
42255
|
+
field: fieldName,
|
|
42256
|
+
value
|
|
42257
|
+
});
|
|
42258
|
+
}
|
|
42259
|
+
function assertSectionAddress$1(value, fieldName) {
|
|
42260
|
+
if (!isRecord3(value) || value.kind !== "section" || typeof value.sectionId !== "string" || value.sectionId.length === 0)
|
|
42261
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${fieldName} must be a section address.`, {
|
|
42262
|
+
field: fieldName,
|
|
42263
|
+
value
|
|
42264
|
+
});
|
|
42265
|
+
}
|
|
42266
|
+
function assertHeaderFooterSlotTarget2(input, operationName) {
|
|
42267
|
+
if (!isRecord3(input))
|
|
42268
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} input must be an object.`);
|
|
42269
|
+
const target = input.target;
|
|
42270
|
+
if (!isRecord3(target) || target.kind !== "headerFooterSlot")
|
|
42271
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}.target must be a headerFooterSlot address.`, {
|
|
42272
|
+
field: `${operationName}.target`,
|
|
42273
|
+
value: target
|
|
42274
|
+
});
|
|
42275
|
+
assertSectionAddress$1(target.section, `${operationName}.target.section`);
|
|
42276
|
+
assertOneOf$1(target.headerFooterKind, `${operationName}.target.headerFooterKind`, HEADER_FOOTER_KINDS$1);
|
|
42277
|
+
assertOneOf$1(target.variant, `${operationName}.target.variant`, HEADER_FOOTER_VARIANTS$1);
|
|
42278
|
+
}
|
|
42279
|
+
function assertHeaderFooterPartTarget2(input, operationName) {
|
|
42280
|
+
if (!isRecord3(input))
|
|
42281
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} input must be an object.`);
|
|
42282
|
+
const target = input.target;
|
|
42283
|
+
if (!isRecord3(target) || target.kind !== "headerFooterPart")
|
|
42284
|
+
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}.target must be a headerFooterPart address.`, {
|
|
42285
|
+
field: `${operationName}.target`,
|
|
42286
|
+
value: target
|
|
42287
|
+
});
|
|
42288
|
+
assertNonEmptyString$1(target.refId, `${operationName}.target.refId`);
|
|
42289
|
+
}
|
|
42290
|
+
function executeHeaderFootersList2(adapter, query2) {
|
|
42291
|
+
if (query2?.kind !== undefined)
|
|
42292
|
+
assertOneOf$1(query2.kind, "headerFooters.list.kind", HEADER_FOOTER_KINDS$1);
|
|
42293
|
+
if (query2?.section !== undefined)
|
|
42294
|
+
assertSectionAddress$1(query2.section, "headerFooters.list.section");
|
|
42295
|
+
return adapter.list(query2);
|
|
42296
|
+
}
|
|
42297
|
+
function executeHeaderFootersGet2(adapter, input) {
|
|
42298
|
+
assertHeaderFooterSlotTarget2(input, "headerFooters.get");
|
|
42299
|
+
return adapter.get(input);
|
|
42300
|
+
}
|
|
42301
|
+
function executeHeaderFootersResolve2(adapter, input) {
|
|
42302
|
+
assertHeaderFooterSlotTarget2(input, "headerFooters.resolve");
|
|
42303
|
+
return adapter.resolve(input);
|
|
42304
|
+
}
|
|
42305
|
+
function executeHeaderFootersRefsSet2(adapter, input, options) {
|
|
42306
|
+
assertHeaderFooterSlotTarget2(input, "headerFooters.refs.set");
|
|
42307
|
+
assertNonEmptyString$1(input.refId, "headerFooters.refs.set.refId");
|
|
42308
|
+
return adapter.refs.set(input, normalizeMutationOptions2(options));
|
|
42309
|
+
}
|
|
42310
|
+
function executeHeaderFootersRefsClear2(adapter, input, options) {
|
|
42311
|
+
assertHeaderFooterSlotTarget2(input, "headerFooters.refs.clear");
|
|
42312
|
+
return adapter.refs.clear(input, normalizeMutationOptions2(options));
|
|
42313
|
+
}
|
|
42314
|
+
function executeHeaderFootersRefsSetLinkedToPrevious2(adapter, input, options) {
|
|
42315
|
+
assertHeaderFooterSlotTarget2(input, "headerFooters.refs.setLinkedToPrevious");
|
|
42316
|
+
assertBoolean$1(input.linked, "headerFooters.refs.setLinkedToPrevious.linked");
|
|
42317
|
+
return adapter.refs.setLinkedToPrevious(input, normalizeMutationOptions2(options));
|
|
42318
|
+
}
|
|
42319
|
+
function executeHeaderFootersPartsList2(adapter, query2) {
|
|
42320
|
+
if (query2?.kind !== undefined)
|
|
42321
|
+
assertOneOf$1(query2.kind, "headerFooters.parts.list.kind", HEADER_FOOTER_KINDS$1);
|
|
42322
|
+
return adapter.parts.list(query2);
|
|
42323
|
+
}
|
|
42324
|
+
function executeHeaderFootersPartsCreate2(adapter, input, options) {
|
|
42325
|
+
assertOneOf$1(input?.kind, "headerFooters.parts.create.kind", HEADER_FOOTER_KINDS$1);
|
|
42326
|
+
if (input.sourceRefId !== undefined)
|
|
42327
|
+
assertNonEmptyString$1(input.sourceRefId, "headerFooters.parts.create.sourceRefId");
|
|
42328
|
+
return adapter.parts.create(input, normalizeMutationOptions2(options));
|
|
42329
|
+
}
|
|
42330
|
+
function executeHeaderFootersPartsDelete2(adapter, input, options) {
|
|
42331
|
+
assertHeaderFooterPartTarget2(input, "headerFooters.parts.delete");
|
|
42332
|
+
return adapter.parts.delete(input, normalizeMutationOptions2(options));
|
|
42333
|
+
}
|
|
42334
|
+
function assertSectionAddress3(value, fieldName) {
|
|
41747
42335
|
if (!isRecord3(value) || value.kind !== "section" || typeof value.sectionId !== "string" || value.sectionId.length === 0)
|
|
41748
42336
|
throw new DocumentApiValidationError2("INVALID_TARGET", `${fieldName} must be a section address.`, {
|
|
41749
42337
|
field: fieldName,
|
|
@@ -41753,9 +42341,9 @@ function assertSectionAddress2(value, fieldName) {
|
|
|
41753
42341
|
function assertSectionTarget2(input, operationName) {
|
|
41754
42342
|
if (!isRecord3(input))
|
|
41755
42343
|
throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} input must be an object.`);
|
|
41756
|
-
|
|
42344
|
+
assertSectionAddress3(input.target, `${operationName}.target`);
|
|
41757
42345
|
}
|
|
41758
|
-
function
|
|
42346
|
+
function assertBoolean3(value, fieldName) {
|
|
41759
42347
|
if (typeof value !== "boolean")
|
|
41760
42348
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be a boolean.`, {
|
|
41761
42349
|
field: fieldName,
|
|
@@ -41769,7 +42357,7 @@ function assertString2(value, fieldName) {
|
|
|
41769
42357
|
value
|
|
41770
42358
|
});
|
|
41771
42359
|
}
|
|
41772
|
-
function
|
|
42360
|
+
function assertNonEmptyString4(value, fieldName) {
|
|
41773
42361
|
assertString2(value, fieldName);
|
|
41774
42362
|
if (value.trim().length === 0)
|
|
41775
42363
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be a non-empty string.`, {
|
|
@@ -41791,7 +42379,7 @@ function assertNonNegativeNumber2(value, fieldName) {
|
|
|
41791
42379
|
value
|
|
41792
42380
|
});
|
|
41793
42381
|
}
|
|
41794
|
-
function
|
|
42382
|
+
function assertOneOf4(value, fieldName, allowed) {
|
|
41795
42383
|
if (typeof value !== "string" || !allowed.includes(value))
|
|
41796
42384
|
throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be one of: ${allowed.join(", ")}.`, {
|
|
41797
42385
|
field: fieldName,
|
|
@@ -41832,9 +42420,9 @@ function validateBorderSpec2(value, fieldName) {
|
|
|
41832
42420
|
if (value.color !== undefined)
|
|
41833
42421
|
assertString2(value.color, `${fieldName}.color`);
|
|
41834
42422
|
if (value.shadow !== undefined)
|
|
41835
|
-
|
|
42423
|
+
assertBoolean3(value.shadow, `${fieldName}.shadow`);
|
|
41836
42424
|
if (value.frame !== undefined)
|
|
41837
|
-
|
|
42425
|
+
assertBoolean3(value.frame, `${fieldName}.frame`);
|
|
41838
42426
|
}
|
|
41839
42427
|
function validatePageBorders2(value, fieldName) {
|
|
41840
42428
|
assertObject2(value, fieldName);
|
|
@@ -41852,11 +42440,11 @@ function validatePageBorders2(value, fieldName) {
|
|
|
41852
42440
|
value
|
|
41853
42441
|
});
|
|
41854
42442
|
if (value.display !== undefined)
|
|
41855
|
-
|
|
42443
|
+
assertOneOf4(value.display, `${fieldName}.display`, PAGE_BORDER_DISPLAYS2);
|
|
41856
42444
|
if (value.offsetFrom !== undefined)
|
|
41857
|
-
|
|
42445
|
+
assertOneOf4(value.offsetFrom, `${fieldName}.offsetFrom`, PAGE_BORDER_OFFSET_FROM_VALUES2);
|
|
41858
42446
|
if (value.zOrder !== undefined)
|
|
41859
|
-
|
|
42447
|
+
assertOneOf4(value.zOrder, `${fieldName}.zOrder`, PAGE_BORDER_Z_ORDER_VALUES2);
|
|
41860
42448
|
if (value.top !== undefined)
|
|
41861
42449
|
validateBorderSpec2(value.top, `${fieldName}.top`);
|
|
41862
42450
|
if (value.right !== undefined)
|
|
@@ -41885,19 +42473,19 @@ function normalizeSectionsListQuery2(query2) {
|
|
|
41885
42473
|
};
|
|
41886
42474
|
}
|
|
41887
42475
|
function validateHeaderFooterRefParams2(operationName, kind, variant) {
|
|
41888
|
-
|
|
41889
|
-
|
|
42476
|
+
assertOneOf4(kind, `${operationName}.kind`, HEADER_FOOTER_KINDS3);
|
|
42477
|
+
assertOneOf4(variant, `${operationName}.variant`, HEADER_FOOTER_VARIANTS3);
|
|
41890
42478
|
}
|
|
41891
42479
|
function executeSectionsList2(adapter, query2) {
|
|
41892
42480
|
return adapter.list(normalizeSectionsListQuery2(query2));
|
|
41893
42481
|
}
|
|
41894
42482
|
function executeSectionsGet2(adapter, input) {
|
|
41895
|
-
|
|
42483
|
+
assertSectionAddress3(input?.address, "sections.get.address");
|
|
41896
42484
|
return adapter.get(input);
|
|
41897
42485
|
}
|
|
41898
42486
|
function executeSectionsSetBreakType2(adapter, input, options) {
|
|
41899
42487
|
assertSectionTarget2(input, "sections.setBreakType");
|
|
41900
|
-
|
|
42488
|
+
assertOneOf4(input.breakType, "sections.setBreakType.breakType", SECTION_BREAK_TYPES3);
|
|
41901
42489
|
return adapter.setBreakType(input, normalizeMutationOptions2(options));
|
|
41902
42490
|
}
|
|
41903
42491
|
function executeSectionsSetPageMargins2(adapter, input, options) {
|
|
@@ -41946,9 +42534,9 @@ function executeSectionsSetPageSetup2(adapter, input, options) {
|
|
|
41946
42534
|
if (input.height !== undefined)
|
|
41947
42535
|
assertNonNegativeNumber2(input.height, "sections.setPageSetup.height");
|
|
41948
42536
|
if (input.orientation !== undefined)
|
|
41949
|
-
|
|
42537
|
+
assertOneOf4(input.orientation, "sections.setPageSetup.orientation", SECTION_ORIENTATIONS2);
|
|
41950
42538
|
if (input.paperSize !== undefined)
|
|
41951
|
-
|
|
42539
|
+
assertNonEmptyString4(input.paperSize, "sections.setPageSetup.paperSize");
|
|
41952
42540
|
return adapter.setPageSetup(input, normalizeMutationOptions2(options));
|
|
41953
42541
|
}
|
|
41954
42542
|
function executeSectionsSetColumns2(adapter, input, options) {
|
|
@@ -41964,12 +42552,12 @@ function executeSectionsSetColumns2(adapter, input, options) {
|
|
|
41964
42552
|
if (input.gap !== undefined)
|
|
41965
42553
|
assertNonNegativeNumber2(input.gap, "sections.setColumns.gap");
|
|
41966
42554
|
if (input.equalWidth !== undefined)
|
|
41967
|
-
|
|
42555
|
+
assertBoolean3(input.equalWidth, "sections.setColumns.equalWidth");
|
|
41968
42556
|
return adapter.setColumns(input, normalizeMutationOptions2(options));
|
|
41969
42557
|
}
|
|
41970
42558
|
function executeSectionsSetLineNumbering2(adapter, input, options) {
|
|
41971
42559
|
assertSectionTarget2(input, "sections.setLineNumbering");
|
|
41972
|
-
|
|
42560
|
+
assertBoolean3(input.enabled, "sections.setLineNumbering.enabled");
|
|
41973
42561
|
if (input.countBy !== undefined)
|
|
41974
42562
|
assertPositiveInteger3(input.countBy, "sections.setLineNumbering.countBy");
|
|
41975
42563
|
if (input.start !== undefined)
|
|
@@ -41977,7 +42565,7 @@ function executeSectionsSetLineNumbering2(adapter, input, options) {
|
|
|
41977
42565
|
if (input.distance !== undefined)
|
|
41978
42566
|
assertNonNegativeNumber2(input.distance, "sections.setLineNumbering.distance");
|
|
41979
42567
|
if (input.restart !== undefined)
|
|
41980
|
-
|
|
42568
|
+
assertOneOf4(input.restart, "sections.setLineNumbering.restart", LINE_NUMBER_RESTARTS2);
|
|
41981
42569
|
return adapter.setLineNumbering(input, normalizeMutationOptions2(options));
|
|
41982
42570
|
}
|
|
41983
42571
|
function executeSectionsSetPageNumbering2(adapter, input, options) {
|
|
@@ -41987,32 +42575,32 @@ function executeSectionsSetPageNumbering2(adapter, input, options) {
|
|
|
41987
42575
|
if (input.start !== undefined)
|
|
41988
42576
|
assertPositiveInteger3(input.start, "sections.setPageNumbering.start");
|
|
41989
42577
|
if (input.format !== undefined)
|
|
41990
|
-
|
|
42578
|
+
assertOneOf4(input.format, "sections.setPageNumbering.format", PAGE_NUMBER_FORMATS2);
|
|
41991
42579
|
return adapter.setPageNumbering(input, normalizeMutationOptions2(options));
|
|
41992
42580
|
}
|
|
41993
42581
|
function executeSectionsSetTitlePage2(adapter, input, options) {
|
|
41994
42582
|
assertSectionTarget2(input, "sections.setTitlePage");
|
|
41995
|
-
|
|
42583
|
+
assertBoolean3(input.enabled, "sections.setTitlePage.enabled");
|
|
41996
42584
|
return adapter.setTitlePage(input, normalizeMutationOptions2(options));
|
|
41997
42585
|
}
|
|
41998
42586
|
function executeSectionsSetOddEvenHeadersFooters2(adapter, input, options) {
|
|
41999
|
-
|
|
42587
|
+
assertBoolean3(input?.enabled, "sections.setOddEvenHeadersFooters.enabled");
|
|
42000
42588
|
return adapter.setOddEvenHeadersFooters(input, normalizeMutationOptions2(options));
|
|
42001
42589
|
}
|
|
42002
42590
|
function executeSectionsSetVerticalAlign2(adapter, input, options) {
|
|
42003
42591
|
assertSectionTarget2(input, "sections.setVerticalAlign");
|
|
42004
|
-
|
|
42592
|
+
assertOneOf4(input.value, "sections.setVerticalAlign.value", SECTION_VERTICAL_ALIGNS2);
|
|
42005
42593
|
return adapter.setVerticalAlign(input, normalizeMutationOptions2(options));
|
|
42006
42594
|
}
|
|
42007
42595
|
function executeSectionsSetSectionDirection2(adapter, input, options) {
|
|
42008
42596
|
assertSectionTarget2(input, "sections.setSectionDirection");
|
|
42009
|
-
|
|
42597
|
+
assertOneOf4(input.direction, "sections.setSectionDirection.direction", SECTION_DIRECTIONS2);
|
|
42010
42598
|
return adapter.setSectionDirection(input, normalizeMutationOptions2(options));
|
|
42011
42599
|
}
|
|
42012
42600
|
function executeSectionsSetHeaderFooterRef2(adapter, input, options) {
|
|
42013
42601
|
assertSectionTarget2(input, "sections.setHeaderFooterRef");
|
|
42014
42602
|
validateHeaderFooterRefParams2("sections.setHeaderFooterRef", input.kind, input.variant);
|
|
42015
|
-
|
|
42603
|
+
assertNonEmptyString4(input.refId, "sections.setHeaderFooterRef.refId");
|
|
42016
42604
|
return adapter.setHeaderFooterRef(input, normalizeMutationOptions2(options));
|
|
42017
42605
|
}
|
|
42018
42606
|
function executeSectionsClearHeaderFooterRef2(adapter, input, options) {
|
|
@@ -42023,7 +42611,7 @@ function executeSectionsClearHeaderFooterRef2(adapter, input, options) {
|
|
|
42023
42611
|
function executeSectionsSetLinkToPrevious2(adapter, input, options) {
|
|
42024
42612
|
assertSectionTarget2(input, "sections.setLinkToPrevious");
|
|
42025
42613
|
validateHeaderFooterRefParams2("sections.setLinkToPrevious", input.kind, input.variant);
|
|
42026
|
-
|
|
42614
|
+
assertBoolean3(input.linked, "sections.setLinkToPrevious.linked");
|
|
42027
42615
|
return adapter.setLinkToPrevious(input, normalizeMutationOptions2(options));
|
|
42028
42616
|
}
|
|
42029
42617
|
function executeSectionsSetPageBorders2(adapter, input, options) {
|
|
@@ -43525,6 +44113,39 @@ function createDocumentApi2(adapters) {
|
|
|
43525
44113
|
return executeHyperlinksRemove2(adapters.hyperlinks, input, options);
|
|
43526
44114
|
}
|
|
43527
44115
|
},
|
|
44116
|
+
headerFooters: {
|
|
44117
|
+
list(query2) {
|
|
44118
|
+
return executeHeaderFootersList2(adapters.headerFooters, query2);
|
|
44119
|
+
},
|
|
44120
|
+
get(input) {
|
|
44121
|
+
return executeHeaderFootersGet2(adapters.headerFooters, input);
|
|
44122
|
+
},
|
|
44123
|
+
resolve(input) {
|
|
44124
|
+
return executeHeaderFootersResolve2(adapters.headerFooters, input);
|
|
44125
|
+
},
|
|
44126
|
+
refs: {
|
|
44127
|
+
set(input, options) {
|
|
44128
|
+
return executeHeaderFootersRefsSet2(adapters.headerFooters, input, options);
|
|
44129
|
+
},
|
|
44130
|
+
clear(input, options) {
|
|
44131
|
+
return executeHeaderFootersRefsClear2(adapters.headerFooters, input, options);
|
|
44132
|
+
},
|
|
44133
|
+
setLinkedToPrevious(input, options) {
|
|
44134
|
+
return executeHeaderFootersRefsSetLinkedToPrevious2(adapters.headerFooters, input, options);
|
|
44135
|
+
}
|
|
44136
|
+
},
|
|
44137
|
+
parts: {
|
|
44138
|
+
list(query2) {
|
|
44139
|
+
return executeHeaderFootersPartsList2(adapters.headerFooters, query2);
|
|
44140
|
+
},
|
|
44141
|
+
create(input, options) {
|
|
44142
|
+
return executeHeaderFootersPartsCreate2(adapters.headerFooters, input, options);
|
|
44143
|
+
},
|
|
44144
|
+
delete(input, options) {
|
|
44145
|
+
return executeHeaderFootersPartsDelete2(adapters.headerFooters, input, options);
|
|
44146
|
+
}
|
|
44147
|
+
}
|
|
44148
|
+
},
|
|
43528
44149
|
contentControls: {
|
|
43529
44150
|
list: (query2) => executeContentControlsList2(adapters.contentControls, query2),
|
|
43530
44151
|
get: (input) => executeContentControlsGet2(adapters.contentControls, input),
|
|
@@ -61118,7 +61739,7 @@ var isRegExp = (value) => {
|
|
|
61118
61739
|
tracked: false,
|
|
61119
61740
|
carrier: runAttributeCarrier2(runPropertyKey ?? key),
|
|
61120
61741
|
schema
|
|
61121
|
-
}), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_NOT_FOUND_COMMAND_TRACKED2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY3, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdSelectorSchema2, sdAddressSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES2, CREATE_COMMENT_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, LEGACY_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LEGACY_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, TABLE_LOCATOR_OPS2, ROW_LOCATOR_OPS2, COLUMN_LOCATOR_OPS2, MERGE_RANGE_LOCATOR_OPS2, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2,
|
|
61742
|
+
}), INLINE_PROPERTY_REGISTRY2, INLINE_PROPERTY_KEY_SET2, INLINE_PROPERTY_BY_KEY2, UNDERLINE_OBJECT_ALLOWED_KEYS2, SHADING_ALLOWED_KEYS2, BORDER_ALLOWED_KEYS2, FIT_TEXT_ALLOWED_KEYS2, LANG_ALLOWED_KEYS2, RFONTS_ALLOWED_KEYS2, EAST_ASIAN_LAYOUT_ALLOWED_KEYS2, STYLISTIC_SET_ALLOWED_KEYS2, VERT_ALIGN_VALUES2, NONE_FAILURES2, NONE_THROWS2, T_NOT_FOUND2, T_NOT_FOUND_CAPABLE2, T_PLAN_ENGINE2, T_NOT_FOUND_COMMAND2, T_NOT_FOUND_COMMAND_TRACKED2, T_IMAGE_COMMAND2, T_CC_READ2, T_CC_MUTATION2, T_CC_TYPED2, T_CC_TYPED_READ2, T_CC_RAW2, T_QUERY_MATCH2, T_SECTION_CREATE2, T_SECTION_READ2, T_PARAGRAPH_MUTATION2, T_SECTION_MUTATION2, T_SECTION_SETTINGS_MUTATION2, T_HEADER_FOOTER_MUTATION2, T_REF_READ_LIST2, T_REF_MUTATION2, T_REF_MUTATION_REMOVE2, T_REF_INSERT2, FORMAT_INLINE_ALIAS_OPERATION_DEFINITIONS2, OPERATION_DEFINITIONS2, OPERATION_IDS2, COMMAND_CATALOG3, PARAGRAPH_ALIGNMENTS2, TAB_STOP_ALIGNMENTS2, TAB_STOP_LEADERS2, BORDER_SIDES2, CLEAR_BORDER_SIDES2, LINE_RULES2, PARAGRAPH_BLOCK_TYPES2, SET_STYLE_KEYS2, CLEAR_STYLE_KEYS2, RESET_DIRECT_FORMATTING_KEYS2, SET_ALIGNMENT_KEYS2, CLEAR_ALIGNMENT_KEYS2, SET_INDENTATION_KEYS2, CLEAR_INDENTATION_KEYS2, SET_SPACING_KEYS2, CLEAR_SPACING_KEYS2, SET_KEEP_OPTIONS_KEYS2, SET_OUTLINE_LEVEL_KEYS2, SET_FLOW_OPTIONS_KEYS2, SET_TAB_STOP_KEYS2, CLEAR_TAB_STOP_KEYS2, CLEAR_ALL_TAB_STOPS_KEYS2, SET_BORDER_KEYS2, CLEAR_BORDER_KEYS2, SET_SHADING_KEYS2, CLEAR_SHADING_KEYS2, ST_ON_OFF_ON_VALUES2, ST_ON_OFF_OFF_VALUES2, ST_UNDERLINE_VALUES2, ST_UNDERLINE_VALUE_SET2, ST_VERTICAL_ALIGN_RUN2, ST_EM2, ST_TEXT_ALIGNMENT2, ST_TEXT_DIRECTION2, ST_TEXTBOX_TIGHT_WRAP2, ST_TEXT_TRANSFORM2, ST_JUSTIFICATION2, FONT_FAMILY_SCHEMA2, COLOR_SCHEMA2, SPACING_SCHEMA2, INDENT_SCHEMA2, UNDERLINE_SCHEMA2, BORDER_PROPERTIES_SCHEMA2, SHADING_SCHEMA2, LANG_SCHEMA2, EAST_ASIAN_LAYOUT_SCHEMA2, FIT_TEXT_SCHEMA2, NUMBERING_PROPERTIES_SCHEMA2, FRAME_PR_SCHEMA2, PARAGRAPH_BORDERS_SCHEMA2, TAB_STOP_SCHEMA2, PROPERTY_REGISTRY3, ALLOWED_KEYS_BY_CHANNEL2, PROPERTY_INDEX2, EXCLUDED_KEYS2, INPUT_ALLOWED_KEYS2, TARGET_ALLOWED_KEYS2, OPTIONS_ALLOWED_KEYS2, VALID_CHANNELS2, Z_ORDER_RELATIVE_HEIGHT_MAX2 = 4294967295, nodeTypeValues2, blockNodeTypeValues2, deletableBlockNodeTypeValues2, inlineNodeTypeValues2, rangeSchema2, textAddressSchema2, textTargetSchema2, blockNodeAddressSchema2, deletableBlockNodeAddressSchema2, paragraphAddressSchema2, headingAddressSchema2, listItemAddressSchema2, paragraphTargetSchema2, sectionAddressSchema2, nodeAddressSchema2, commentAddressSchema2, trackedChangeAddressSchema2, entityAddressSchema2, resolvedHandleSchema2, pageInfoSchema2, receiptSuccessSchema2, textMutationResolutionSchema2, textMutationSuccessSchema2, matchBlockSchema2, trackChangeRefSchema2, createParagraphSuccessSchema2, createHeadingSuccessSchema2, headingLevelSchema2, listsInsertSuccessSchema2, listsMutateItemSuccessSchema2, textSelectorSchema2, nodeSelectorSchema2, sdSelectorSchema2, sdAddressSchema2, sdMutationResolutionSchema2, sdMutationSuccessSchema2, documentInfoCountsSchema2, documentInfoOutlineItemSchema2, documentInfoCapabilitiesSchema2, listKindSchema2, listInsertPositionSchema2, sectionBreakTypeSchema2, sectionOrientationSchema2, sectionVerticalAlignSchema2, sectionDirectionSchema2, sectionHeaderFooterKindSchema2, sectionHeaderFooterVariantSchema2, sectionLineNumberRestartSchema2, sectionPageNumberFormatSchema2, sectionRangeDomainSchema2, sectionPageMarginsSchema2, sectionHeaderFooterMarginsSchema2, sectionPageSetupSchema2, sectionColumnsSchema2, sectionLineNumberingSchema2, sectionPageNumberingSchema2, sectionHeaderFooterRefsSchema2, sectionBorderSpecSchema2, sectionPageBordersSchema2, sectionMutationSuccessSchema2, documentMutationSuccessSchema2, paragraphMutationTargetSchema2, paragraphMutationSuccessSchema2, createSectionBreakSuccessSchema2, capabilityReasonsSchema2, capabilityFlagSchema2, operationRuntimeCapabilitySchema2, operationCapabilitiesSchema2, inlinePropertyCapabilitySchema2, formatCapabilitiesSchema2, planEngineCapabilitiesSchema2, tableCreateLocationSchema2, formatInlineAliasOperationSchemas2, tocMutationFailureSchema2, tocMutationSuccessSchema2, tocEntryMutationFailureSchema2, tocEntryMutationSuccessSchema2, hyperlinkTargetSchema2, hyperlinkReadPropertiesSchema2, hyperlinkSpecSchema2, hyperlinkPatchSchema2, hyperlinkDomainSchema2, hyperlinkMutationSuccessSchema2, hyperlinkMutationFailureSchema2, contentControlTargetSchema2, contentControlMutationSuccessSchema2, contentControlMutationFailureSchema2, ccListResultSchema2, ccInfoSchema2, refFailureSchema2, bookmarkAddressSchema2, bookmarkMutation2, footnoteAddressSchema2, footnoteConfigScopeSchema2, footnoteNumberingSchema2, footnoteMutation2, footnoteConfig2, crossRefAddressSchema2, crossRefTargetSchema2, crossRefDisplaySchema2, crossRefMutation2, indexAddressSchema2, indexEntryAddressSchema2, indexConfigSchema2, indexEntryDataSchema2, indexEntryPatchSchema2, indexMutation2, indexEntryMutation2, captionAddressSchema2, captionMutation2, captionConfig2, fieldAddressSchema2, fieldMutation2, citationAddressSchema2, citationSourceAddressSchema2, bibliographyAddressSchema2, citationMutation2, citationSourceMutation2, bibliographyMutation2, citationPersonSchema2, citationSourceFieldsSchema2, tocCreateLocationSchema2, authoritiesAddressSchema2, authorityEntryAddressSchema2, authoritiesConfigSchema2, authorityEntryDataSchema2, authorityEntryPatchSchema2, authoritiesMutation2, authorityEntryMutation2, GROUP_METADATA2, STEP_OP_CATALOG_UNFROZEN2, PUBLIC_STEP_OP_CATALOG_UNFROZEN2, PUBLIC_MUTATION_STEP_OP_IDS2, PUBLIC_MUTATION_STEP_OP_SET2, CAPABILITY_REASON_CODES2, CREATE_COMMENT_ALLOWED_KEYS2, PATCH_COMMENT_ALLOWED_KEYS2, STYLE_APPLY_INPUT_ALLOWED_KEYS2, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, DELETE_INPUT_ALLOWED_KEYS2, CONTENT_KIND_SET2, INLINE_KIND_SET2, LEGACY_TOP_LEVEL_TYPES2, LEGACY_INSERT_ALLOWED_KEYS2, STRUCTURAL_INSERT_ALLOWED_KEYS2, VALID_INSERT_TYPES2, LEGACY_REPLACE_ALLOWED_KEYS2, STRUCTURAL_REPLACE_ALLOWED_KEYS2, SECTION_BREAK_TYPES$1, SUPPORTED_DELETE_NODE_TYPES2, REJECTED_DELETE_NODE_TYPES2, TABLE_LOCATOR_OPS2, ROW_LOCATOR_OPS2, COLUMN_LOCATOR_OPS2, MERGE_RANGE_LOCATOR_OPS2, HEADER_FOOTER_KINDS$1, HEADER_FOOTER_VARIANTS$1, DEFAULT_SECTIONS_LIST_LIMIT2 = 250, SECTION_BREAK_TYPES3, SECTION_ORIENTATIONS2, SECTION_VERTICAL_ALIGNS2, SECTION_DIRECTIONS2, HEADER_FOOTER_KINDS3, HEADER_FOOTER_VARIANTS3, LINE_NUMBER_RESTARTS2, PAGE_NUMBER_FORMATS2, PAGE_BORDER_DISPLAYS2, PAGE_BORDER_OFFSET_FROM_VALUES2, PAGE_BORDER_Z_ORDER_VALUES2, VALID_WRAP_TYPES2, VALID_WRAP_SIDES2, VALID_IMAGE_SIZE_UNITS2, PATCH_FIELDS2, ADAPTER_GATED_PREFIXES2, _buffers, _defaultCollectionId = null, _nextCollectionId = 1, generateV2HandlerEntity = (handlerName, translator$215) => ({
|
|
61122
61743
|
handlerName,
|
|
61123
61744
|
handler: (params) => {
|
|
61124
61745
|
const { nodes } = params;
|
|
@@ -73031,7 +73652,7 @@ var isRegExp = (value) => {
|
|
|
73031
73652
|
state.kern = kernNode.attributes["w:val"];
|
|
73032
73653
|
}
|
|
73033
73654
|
}, SuperConverter;
|
|
73034
|
-
var
|
|
73655
|
+
var init_SuperConverter_CnKjdAUR_es = __esm(() => {
|
|
73035
73656
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
73036
73657
|
init_jszip_ChlR43oI_es();
|
|
73037
73658
|
init_xml_js_DLE8mr0n_es();
|
|
@@ -75903,6 +76524,13 @@ var init_SuperConverter_BDyjQdwB_es = __esm(() => {
|
|
|
75903
76524
|
"CAPABILITY_UNAVAILABLE",
|
|
75904
76525
|
"INTERNAL_ERROR"
|
|
75905
76526
|
];
|
|
76527
|
+
T_HEADER_FOOTER_MUTATION2 = [
|
|
76528
|
+
"TARGET_NOT_FOUND",
|
|
76529
|
+
"INVALID_TARGET",
|
|
76530
|
+
"INVALID_INPUT",
|
|
76531
|
+
"CAPABILITY_UNAVAILABLE",
|
|
76532
|
+
"INTERNAL_ERROR"
|
|
76533
|
+
];
|
|
75906
76534
|
T_REF_READ_LIST2 = ["CAPABILITY_UNAVAILABLE", "INVALID_INPUT"];
|
|
75907
76535
|
T_REF_MUTATION2 = [
|
|
75908
76536
|
"TARGET_NOT_FOUND",
|
|
@@ -78981,6 +79609,149 @@ var init_SuperConverter_BDyjQdwB_es = __esm(() => {
|
|
|
78981
79609
|
referenceDocPath: "hyperlinks/remove.mdx",
|
|
78982
79610
|
referenceGroup: "hyperlinks"
|
|
78983
79611
|
},
|
|
79612
|
+
"headerFooters.list": {
|
|
79613
|
+
memberPath: "headerFooters.list",
|
|
79614
|
+
description: "List header/footer slot entries across sections.",
|
|
79615
|
+
expectedResult: "Returns a paginated DiscoveryOutput of HeaderFooterSlotEntry items.",
|
|
79616
|
+
requiresDocumentContext: true,
|
|
79617
|
+
metadata: readOperation2({ throws: ["INVALID_INPUT", "INVALID_TARGET"] }),
|
|
79618
|
+
referenceDocPath: "header-footers/list.mdx",
|
|
79619
|
+
referenceGroup: "headerFooters"
|
|
79620
|
+
},
|
|
79621
|
+
"headerFooters.get": {
|
|
79622
|
+
memberPath: "headerFooters.get",
|
|
79623
|
+
description: "Get a single header/footer slot entry by address.",
|
|
79624
|
+
expectedResult: "Returns a HeaderFooterSlotEntry for the targeted section slot.",
|
|
79625
|
+
requiresDocumentContext: true,
|
|
79626
|
+
metadata: readOperation2({ throws: [
|
|
79627
|
+
"TARGET_NOT_FOUND",
|
|
79628
|
+
"INVALID_TARGET",
|
|
79629
|
+
"INVALID_INPUT"
|
|
79630
|
+
] }),
|
|
79631
|
+
referenceDocPath: "header-footers/get.mdx",
|
|
79632
|
+
referenceGroup: "headerFooters"
|
|
79633
|
+
},
|
|
79634
|
+
"headerFooters.resolve": {
|
|
79635
|
+
memberPath: "headerFooters.resolve",
|
|
79636
|
+
description: "Resolve the effective header/footer reference for a slot, walking the section inheritance chain.",
|
|
79637
|
+
expectedResult: "Returns a HeaderFooterResolveResult indicating explicit, inherited, or none status with the resolved refId.",
|
|
79638
|
+
requiresDocumentContext: true,
|
|
79639
|
+
metadata: readOperation2({ throws: [
|
|
79640
|
+
"TARGET_NOT_FOUND",
|
|
79641
|
+
"INVALID_TARGET",
|
|
79642
|
+
"INVALID_INPUT"
|
|
79643
|
+
] }),
|
|
79644
|
+
referenceDocPath: "header-footers/resolve.mdx",
|
|
79645
|
+
referenceGroup: "headerFooters"
|
|
79646
|
+
},
|
|
79647
|
+
"headerFooters.refs.set": {
|
|
79648
|
+
memberPath: "headerFooters.refs.set",
|
|
79649
|
+
description: "Set an explicit header/footer reference on a section slot.",
|
|
79650
|
+
expectedResult: "Returns a SectionMutationResult receipt; reports NO_OP if the reference already matches, INVALID_TARGET if the relationship does not exist.",
|
|
79651
|
+
requiresDocumentContext: true,
|
|
79652
|
+
metadata: mutationOperation2({
|
|
79653
|
+
idempotency: "conditional",
|
|
79654
|
+
supportsDryRun: true,
|
|
79655
|
+
supportsTrackedMode: false,
|
|
79656
|
+
possibleFailureCodes: [
|
|
79657
|
+
"NO_OP",
|
|
79658
|
+
"INVALID_TARGET",
|
|
79659
|
+
"CAPABILITY_UNAVAILABLE"
|
|
79660
|
+
],
|
|
79661
|
+
throws: T_HEADER_FOOTER_MUTATION2,
|
|
79662
|
+
historyUnsafe: true
|
|
79663
|
+
}),
|
|
79664
|
+
referenceDocPath: "header-footers/refs/set.mdx",
|
|
79665
|
+
referenceGroup: "headerFooters"
|
|
79666
|
+
},
|
|
79667
|
+
"headerFooters.refs.clear": {
|
|
79668
|
+
memberPath: "headerFooters.refs.clear",
|
|
79669
|
+
description: "Clear an explicit header/footer reference from a section slot.",
|
|
79670
|
+
expectedResult: "Returns a SectionMutationResult receipt; reports NO_OP if no explicit reference existed.",
|
|
79671
|
+
requiresDocumentContext: true,
|
|
79672
|
+
metadata: mutationOperation2({
|
|
79673
|
+
idempotency: "conditional",
|
|
79674
|
+
supportsDryRun: true,
|
|
79675
|
+
supportsTrackedMode: false,
|
|
79676
|
+
possibleFailureCodes: ["NO_OP"],
|
|
79677
|
+
throws: T_HEADER_FOOTER_MUTATION2,
|
|
79678
|
+
historyUnsafe: true
|
|
79679
|
+
}),
|
|
79680
|
+
referenceDocPath: "header-footers/refs/clear.mdx",
|
|
79681
|
+
referenceGroup: "headerFooters"
|
|
79682
|
+
},
|
|
79683
|
+
"headerFooters.refs.setLinkedToPrevious": {
|
|
79684
|
+
memberPath: "headerFooters.refs.setLinkedToPrevious",
|
|
79685
|
+
description: "Link or unlink a header/footer slot to/from the previous section.",
|
|
79686
|
+
expectedResult: "Returns a SectionMutationResult receipt; reports NO_OP if the link state already matches, INVALID_TARGET for the first section.",
|
|
79687
|
+
requiresDocumentContext: true,
|
|
79688
|
+
metadata: mutationOperation2({
|
|
79689
|
+
idempotency: "conditional",
|
|
79690
|
+
supportsDryRun: true,
|
|
79691
|
+
supportsTrackedMode: false,
|
|
79692
|
+
possibleFailureCodes: [
|
|
79693
|
+
"NO_OP",
|
|
79694
|
+
"INVALID_TARGET",
|
|
79695
|
+
"CAPABILITY_UNAVAILABLE"
|
|
79696
|
+
],
|
|
79697
|
+
throws: T_HEADER_FOOTER_MUTATION2,
|
|
79698
|
+
historyUnsafe: true
|
|
79699
|
+
}),
|
|
79700
|
+
referenceDocPath: "header-footers/refs/set-linked-to-previous.mdx",
|
|
79701
|
+
referenceGroup: "headerFooters"
|
|
79702
|
+
},
|
|
79703
|
+
"headerFooters.parts.list": {
|
|
79704
|
+
memberPath: "headerFooters.parts.list",
|
|
79705
|
+
description: "List unique header/footer part records from document relationships.",
|
|
79706
|
+
expectedResult: "Returns a paginated DiscoveryOutput of HeaderFooterPartEntry items.",
|
|
79707
|
+
requiresDocumentContext: true,
|
|
79708
|
+
metadata: readOperation2({ throws: ["CAPABILITY_UNAVAILABLE", "INVALID_INPUT"] }),
|
|
79709
|
+
referenceDocPath: "header-footers/parts/list.mdx",
|
|
79710
|
+
referenceGroup: "headerFooters"
|
|
79711
|
+
},
|
|
79712
|
+
"headerFooters.parts.create": {
|
|
79713
|
+
memberPath: "headerFooters.parts.create",
|
|
79714
|
+
description: "Create a new independent header/footer part, optionally cloned from an existing part.",
|
|
79715
|
+
expectedResult: "Returns a HeaderFooterPartsMutationResult with the new refId/partPath on success, INVALID_TARGET failure when sourceRefId is invalid or mismatched.",
|
|
79716
|
+
requiresDocumentContext: true,
|
|
79717
|
+
metadata: mutationOperation2({
|
|
79718
|
+
idempotency: "non-idempotent",
|
|
79719
|
+
supportsDryRun: true,
|
|
79720
|
+
supportsTrackedMode: false,
|
|
79721
|
+
possibleFailureCodes: ["INVALID_TARGET"],
|
|
79722
|
+
throws: [
|
|
79723
|
+
"INVALID_TARGET",
|
|
79724
|
+
"INVALID_INPUT",
|
|
79725
|
+
"CAPABILITY_UNAVAILABLE",
|
|
79726
|
+
"INTERNAL_ERROR"
|
|
79727
|
+
],
|
|
79728
|
+
historyUnsafe: true
|
|
79729
|
+
}),
|
|
79730
|
+
referenceDocPath: "header-footers/parts/create.mdx",
|
|
79731
|
+
referenceGroup: "headerFooters"
|
|
79732
|
+
},
|
|
79733
|
+
"headerFooters.parts.delete": {
|
|
79734
|
+
memberPath: "headerFooters.parts.delete",
|
|
79735
|
+
description: "Delete a header/footer part and its associated relationship when no section slots reference it.",
|
|
79736
|
+
expectedResult: "Returns a HeaderFooterPartsMutationResult on success; INVALID_TARGET failure if sections still reference the part.",
|
|
79737
|
+
requiresDocumentContext: true,
|
|
79738
|
+
metadata: mutationOperation2({
|
|
79739
|
+
idempotency: "conditional",
|
|
79740
|
+
supportsDryRun: true,
|
|
79741
|
+
supportsTrackedMode: false,
|
|
79742
|
+
possibleFailureCodes: ["INVALID_TARGET"],
|
|
79743
|
+
throws: [
|
|
79744
|
+
"TARGET_NOT_FOUND",
|
|
79745
|
+
"INVALID_TARGET",
|
|
79746
|
+
"INVALID_INPUT",
|
|
79747
|
+
"CAPABILITY_UNAVAILABLE",
|
|
79748
|
+
"INTERNAL_ERROR"
|
|
79749
|
+
],
|
|
79750
|
+
historyUnsafe: true
|
|
79751
|
+
}),
|
|
79752
|
+
referenceDocPath: "header-footers/parts/delete.mdx",
|
|
79753
|
+
referenceGroup: "headerFooters"
|
|
79754
|
+
},
|
|
78984
79755
|
"create.contentControl": {
|
|
78985
79756
|
memberPath: "create.contentControl",
|
|
78986
79757
|
description: "Create a new content control (SDT) in the document.",
|
|
@@ -84861,7 +85632,235 @@ var init_SuperConverter_BDyjQdwB_es = __esm(() => {
|
|
|
84861
85632
|
}, ["target", "patch"]), hyperlinkMutationResultSchema2(), objectSchema2({
|
|
84862
85633
|
target: hyperlinkTargetSchema2,
|
|
84863
85634
|
mode: { enum: ["unwrap", "deleteText"] }
|
|
84864
|
-
}, ["target"]), hyperlinkMutationResultSchema2(),
|
|
85635
|
+
}, ["target"]), hyperlinkMutationResultSchema2(), objectSchema2({
|
|
85636
|
+
kind: { enum: ["header", "footer"] },
|
|
85637
|
+
section: sectionAddressSchema2,
|
|
85638
|
+
limit: {
|
|
85639
|
+
type: "integer",
|
|
85640
|
+
minimum: 1
|
|
85641
|
+
},
|
|
85642
|
+
offset: {
|
|
85643
|
+
type: "integer",
|
|
85644
|
+
minimum: 0
|
|
85645
|
+
}
|
|
85646
|
+
}), discoveryResultSchema2(discoveryItemSchema2({
|
|
85647
|
+
section: sectionAddressSchema2,
|
|
85648
|
+
sectionIndex: {
|
|
85649
|
+
type: "integer",
|
|
85650
|
+
minimum: 0
|
|
85651
|
+
},
|
|
85652
|
+
kind: { enum: ["header", "footer"] },
|
|
85653
|
+
variant: { enum: [
|
|
85654
|
+
"default",
|
|
85655
|
+
"first",
|
|
85656
|
+
"even"
|
|
85657
|
+
] },
|
|
85658
|
+
refId: { type: ["string", "null"] },
|
|
85659
|
+
isExplicit: { type: "boolean" }
|
|
85660
|
+
}, [
|
|
85661
|
+
"section",
|
|
85662
|
+
"sectionIndex",
|
|
85663
|
+
"kind",
|
|
85664
|
+
"variant",
|
|
85665
|
+
"isExplicit"
|
|
85666
|
+
])), objectSchema2({ target: objectSchema2({
|
|
85667
|
+
kind: { const: "headerFooterSlot" },
|
|
85668
|
+
section: sectionAddressSchema2,
|
|
85669
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
85670
|
+
variant: { enum: [
|
|
85671
|
+
"default",
|
|
85672
|
+
"first",
|
|
85673
|
+
"even"
|
|
85674
|
+
] }
|
|
85675
|
+
}, [
|
|
85676
|
+
"kind",
|
|
85677
|
+
"section",
|
|
85678
|
+
"headerFooterKind",
|
|
85679
|
+
"variant"
|
|
85680
|
+
]) }, ["target"]), objectSchema2({
|
|
85681
|
+
section: sectionAddressSchema2,
|
|
85682
|
+
sectionIndex: {
|
|
85683
|
+
type: "integer",
|
|
85684
|
+
minimum: 0
|
|
85685
|
+
},
|
|
85686
|
+
kind: { enum: ["header", "footer"] },
|
|
85687
|
+
variant: { enum: [
|
|
85688
|
+
"default",
|
|
85689
|
+
"first",
|
|
85690
|
+
"even"
|
|
85691
|
+
] },
|
|
85692
|
+
refId: { type: ["string", "null"] },
|
|
85693
|
+
isExplicit: { type: "boolean" }
|
|
85694
|
+
}, [
|
|
85695
|
+
"section",
|
|
85696
|
+
"sectionIndex",
|
|
85697
|
+
"kind",
|
|
85698
|
+
"variant",
|
|
85699
|
+
"isExplicit"
|
|
85700
|
+
]), objectSchema2({ target: objectSchema2({
|
|
85701
|
+
kind: { const: "headerFooterSlot" },
|
|
85702
|
+
section: sectionAddressSchema2,
|
|
85703
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
85704
|
+
variant: { enum: [
|
|
85705
|
+
"default",
|
|
85706
|
+
"first",
|
|
85707
|
+
"even"
|
|
85708
|
+
] }
|
|
85709
|
+
}, [
|
|
85710
|
+
"kind",
|
|
85711
|
+
"section",
|
|
85712
|
+
"headerFooterKind",
|
|
85713
|
+
"variant"
|
|
85714
|
+
]) }, ["target"]), objectSchema2({
|
|
85715
|
+
status: { const: "explicit" },
|
|
85716
|
+
refId: { type: "string" },
|
|
85717
|
+
section: sectionAddressSchema2
|
|
85718
|
+
}, [
|
|
85719
|
+
"status",
|
|
85720
|
+
"refId",
|
|
85721
|
+
"section"
|
|
85722
|
+
]), objectSchema2({
|
|
85723
|
+
status: { const: "inherited" },
|
|
85724
|
+
refId: { type: "string" },
|
|
85725
|
+
resolvedFromSection: sectionAddressSchema2,
|
|
85726
|
+
resolvedVariant: { enum: [
|
|
85727
|
+
"default",
|
|
85728
|
+
"first",
|
|
85729
|
+
"even"
|
|
85730
|
+
] }
|
|
85731
|
+
}, [
|
|
85732
|
+
"status",
|
|
85733
|
+
"refId",
|
|
85734
|
+
"resolvedFromSection",
|
|
85735
|
+
"resolvedVariant"
|
|
85736
|
+
]), objectSchema2({ status: { const: "none" } }, ["status"]), objectSchema2({
|
|
85737
|
+
target: objectSchema2({
|
|
85738
|
+
kind: { const: "headerFooterSlot" },
|
|
85739
|
+
section: sectionAddressSchema2,
|
|
85740
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
85741
|
+
variant: { enum: [
|
|
85742
|
+
"default",
|
|
85743
|
+
"first",
|
|
85744
|
+
"even"
|
|
85745
|
+
] }
|
|
85746
|
+
}, [
|
|
85747
|
+
"kind",
|
|
85748
|
+
"section",
|
|
85749
|
+
"headerFooterKind",
|
|
85750
|
+
"variant"
|
|
85751
|
+
]),
|
|
85752
|
+
refId: {
|
|
85753
|
+
type: "string",
|
|
85754
|
+
minLength: 1
|
|
85755
|
+
}
|
|
85756
|
+
}, ["target", "refId"]), sectionMutationResultSchemaFor2("headerFooters.refs.set"), sectionMutationFailureSchemaFor2("headerFooters.refs.set"), objectSchema2({ target: objectSchema2({
|
|
85757
|
+
kind: { const: "headerFooterSlot" },
|
|
85758
|
+
section: sectionAddressSchema2,
|
|
85759
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
85760
|
+
variant: { enum: [
|
|
85761
|
+
"default",
|
|
85762
|
+
"first",
|
|
85763
|
+
"even"
|
|
85764
|
+
] }
|
|
85765
|
+
}, [
|
|
85766
|
+
"kind",
|
|
85767
|
+
"section",
|
|
85768
|
+
"headerFooterKind",
|
|
85769
|
+
"variant"
|
|
85770
|
+
]) }, ["target"]), sectionMutationResultSchemaFor2("headerFooters.refs.clear"), sectionMutationFailureSchemaFor2("headerFooters.refs.clear"), objectSchema2({
|
|
85771
|
+
target: objectSchema2({
|
|
85772
|
+
kind: { const: "headerFooterSlot" },
|
|
85773
|
+
section: sectionAddressSchema2,
|
|
85774
|
+
headerFooterKind: { enum: ["header", "footer"] },
|
|
85775
|
+
variant: { enum: [
|
|
85776
|
+
"default",
|
|
85777
|
+
"first",
|
|
85778
|
+
"even"
|
|
85779
|
+
] }
|
|
85780
|
+
}, [
|
|
85781
|
+
"kind",
|
|
85782
|
+
"section",
|
|
85783
|
+
"headerFooterKind",
|
|
85784
|
+
"variant"
|
|
85785
|
+
]),
|
|
85786
|
+
linked: { type: "boolean" }
|
|
85787
|
+
}, ["target", "linked"]), sectionMutationResultSchemaFor2("headerFooters.refs.setLinkedToPrevious"), sectionMutationFailureSchemaFor2("headerFooters.refs.setLinkedToPrevious"), objectSchema2({
|
|
85788
|
+
kind: { enum: ["header", "footer"] },
|
|
85789
|
+
limit: {
|
|
85790
|
+
type: "integer",
|
|
85791
|
+
minimum: 1
|
|
85792
|
+
},
|
|
85793
|
+
offset: {
|
|
85794
|
+
type: "integer",
|
|
85795
|
+
minimum: 0
|
|
85796
|
+
}
|
|
85797
|
+
}), discoveryResultSchema2(discoveryItemSchema2({
|
|
85798
|
+
refId: { type: "string" },
|
|
85799
|
+
kind: { enum: ["header", "footer"] },
|
|
85800
|
+
partPath: { type: "string" },
|
|
85801
|
+
referencedBySections: arraySchema2(sectionAddressSchema2)
|
|
85802
|
+
}, [
|
|
85803
|
+
"refId",
|
|
85804
|
+
"kind",
|
|
85805
|
+
"partPath",
|
|
85806
|
+
"referencedBySections"
|
|
85807
|
+
])), objectSchema2({
|
|
85808
|
+
kind: { enum: ["header", "footer"] },
|
|
85809
|
+
sourceRefId: {
|
|
85810
|
+
type: "string",
|
|
85811
|
+
minLength: 1
|
|
85812
|
+
}
|
|
85813
|
+
}, ["kind"]), objectSchema2({
|
|
85814
|
+
success: { const: true },
|
|
85815
|
+
refId: { type: "string" },
|
|
85816
|
+
partPath: { type: "string" }
|
|
85817
|
+
}, [
|
|
85818
|
+
"success",
|
|
85819
|
+
"refId",
|
|
85820
|
+
"partPath"
|
|
85821
|
+
]), objectSchema2({
|
|
85822
|
+
success: { const: false },
|
|
85823
|
+
failure: receiptFailureSchemaFor2("headerFooters.parts.create")
|
|
85824
|
+
}, ["success", "failure"]), objectSchema2({
|
|
85825
|
+
success: { const: true },
|
|
85826
|
+
refId: { type: "string" },
|
|
85827
|
+
partPath: { type: "string" }
|
|
85828
|
+
}, [
|
|
85829
|
+
"success",
|
|
85830
|
+
"refId",
|
|
85831
|
+
"partPath"
|
|
85832
|
+
]), objectSchema2({
|
|
85833
|
+
success: { const: false },
|
|
85834
|
+
failure: receiptFailureSchemaFor2("headerFooters.parts.create")
|
|
85835
|
+
}, ["success", "failure"]), objectSchema2({ target: objectSchema2({
|
|
85836
|
+
kind: { const: "headerFooterPart" },
|
|
85837
|
+
refId: {
|
|
85838
|
+
type: "string",
|
|
85839
|
+
minLength: 1
|
|
85840
|
+
}
|
|
85841
|
+
}, ["kind", "refId"]) }, ["target"]), objectSchema2({
|
|
85842
|
+
success: { const: true },
|
|
85843
|
+
refId: { type: "string" },
|
|
85844
|
+
partPath: { type: "string" }
|
|
85845
|
+
}, [
|
|
85846
|
+
"success",
|
|
85847
|
+
"refId",
|
|
85848
|
+
"partPath"
|
|
85849
|
+
]), objectSchema2({
|
|
85850
|
+
success: { const: false },
|
|
85851
|
+
failure: receiptFailureSchemaFor2("headerFooters.parts.delete")
|
|
85852
|
+
}, ["success", "failure"]), objectSchema2({
|
|
85853
|
+
success: { const: true },
|
|
85854
|
+
refId: { type: "string" },
|
|
85855
|
+
partPath: { type: "string" }
|
|
85856
|
+
}, [
|
|
85857
|
+
"success",
|
|
85858
|
+
"refId",
|
|
85859
|
+
"partPath"
|
|
85860
|
+
]), objectSchema2({
|
|
85861
|
+
success: { const: false },
|
|
85862
|
+
failure: receiptFailureSchemaFor2("headerFooters.parts.delete")
|
|
85863
|
+
}, ["success", "failure"]), { ...buildContentControlSchemas2() }, objectSchema2({ target: bookmarkAddressSchema2 }, ["target"]), objectSchema2({
|
|
84865
85864
|
name: { type: "string" },
|
|
84866
85865
|
at: textTargetSchema2,
|
|
84867
85866
|
tableColumn: objectSchema2({
|
|
@@ -85106,6 +86105,11 @@ var init_SuperConverter_BDyjQdwB_es = __esm(() => {
|
|
|
85106
86105
|
description: "Hyperlink discovery, creation, and metadata management.",
|
|
85107
86106
|
pagePath: "hyperlinks/index.mdx"
|
|
85108
86107
|
},
|
|
86108
|
+
headerFooters: {
|
|
86109
|
+
title: "Headers & Footers",
|
|
86110
|
+
description: "Structure, references, and part lifecycle for document headers and footers.",
|
|
86111
|
+
pagePath: "header-footers/index.mdx"
|
|
86112
|
+
},
|
|
85109
86113
|
contentControls: {
|
|
85110
86114
|
title: "Content Controls",
|
|
85111
86115
|
description: "Content control (SDT) discovery, mutation, typed controls, and Word compatibility.",
|
|
@@ -85324,6 +86328,12 @@ var init_SuperConverter_BDyjQdwB_es = __esm(() => {
|
|
|
85324
86328
|
"tables.setColumnWidth"
|
|
85325
86329
|
]);
|
|
85326
86330
|
MERGE_RANGE_LOCATOR_OPS2 = new Set(["tables.mergeCells"]);
|
|
86331
|
+
HEADER_FOOTER_KINDS$1 = ["header", "footer"];
|
|
86332
|
+
HEADER_FOOTER_VARIANTS$1 = [
|
|
86333
|
+
"default",
|
|
86334
|
+
"first",
|
|
86335
|
+
"even"
|
|
86336
|
+
];
|
|
85327
86337
|
SECTION_BREAK_TYPES3 = [
|
|
85328
86338
|
"continuous",
|
|
85329
86339
|
"nextPage",
|
|
@@ -85338,8 +86348,8 @@ var init_SuperConverter_BDyjQdwB_es = __esm(() => {
|
|
|
85338
86348
|
"both"
|
|
85339
86349
|
];
|
|
85340
86350
|
SECTION_DIRECTIONS2 = ["ltr", "rtl"];
|
|
85341
|
-
|
|
85342
|
-
|
|
86351
|
+
HEADER_FOOTER_KINDS3 = ["header", "footer"];
|
|
86352
|
+
HEADER_FOOTER_VARIANTS3 = [
|
|
85343
86353
|
"default",
|
|
85344
86354
|
"first",
|
|
85345
86355
|
"even"
|
|
@@ -132419,9 +133429,9 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
132419
133429
|
init_remark_gfm_z_sDF4ss_es();
|
|
132420
133430
|
});
|
|
132421
133431
|
|
|
132422
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
132423
|
-
var
|
|
132424
|
-
__export(
|
|
133432
|
+
// ../../packages/superdoc/dist/chunks/src-C3qSPIeN.es.js
|
|
133433
|
+
var exports_src_C3qSPIeN_es = {};
|
|
133434
|
+
__export(exports_src_C3qSPIeN_es, {
|
|
132425
133435
|
zt: () => defineMark,
|
|
132426
133436
|
z: () => cM,
|
|
132427
133437
|
yt: () => removeAwarenessStates,
|
|
@@ -141129,11 +142139,11 @@ function pxToInches$1(value) {
|
|
|
141129
142139
|
function buildSectionId(index2) {
|
|
141130
142140
|
return `section-${index2}`;
|
|
141131
142141
|
}
|
|
141132
|
-
function getConverter$
|
|
142142
|
+
function getConverter$4(editor) {
|
|
141133
142143
|
return editor.converter;
|
|
141134
142144
|
}
|
|
141135
142145
|
function getBodySectPrFromEditor(editor) {
|
|
141136
|
-
const converter = getConverter$
|
|
142146
|
+
const converter = getConverter$4(editor);
|
|
141137
142147
|
if (isSectPrElement$1(converter?.bodySectPr))
|
|
141138
142148
|
return cloneXmlElement(converter.bodySectPr);
|
|
141139
142149
|
const docAttrs = editor.state.doc.attrs ?? {};
|
|
@@ -141182,7 +142192,7 @@ function resolveAnalysisDoc(editor, paragraphs) {
|
|
|
141182
142192
|
return buildAnalysisDocFromParagraphs(paragraphs);
|
|
141183
142193
|
}
|
|
141184
142194
|
function getSettingsRoot(editor) {
|
|
141185
|
-
const settingsPart = getConverter$
|
|
142195
|
+
const settingsPart = getConverter$4(editor)?.convertedXml?.["word/settings.xml"];
|
|
141186
142196
|
if (!settingsPart)
|
|
141187
142197
|
return null;
|
|
141188
142198
|
if (settingsPart.name === "w:settings")
|
|
@@ -141192,7 +142202,7 @@ function getSettingsRoot(editor) {
|
|
|
141192
142202
|
return settingsPart.elements.find((entry) => entry.name === "w:settings") ?? null;
|
|
141193
142203
|
}
|
|
141194
142204
|
function readOddEvenHeadersFlag(editor) {
|
|
141195
|
-
const converter = getConverter$
|
|
142205
|
+
const converter = getConverter$4(editor);
|
|
141196
142206
|
if (converter?.pageStyles?.alternateHeaders != null)
|
|
141197
142207
|
return converter.pageStyles.alternateHeaders === true;
|
|
141198
142208
|
const settingsRoot = getSettingsRoot(editor);
|
|
@@ -155454,10 +156464,10 @@ function cloneValue(value) {
|
|
|
155454
156464
|
return JSON.parse(JSON.stringify(value));
|
|
155455
156465
|
}
|
|
155456
156466
|
function toRelationshipType(kind) {
|
|
155457
|
-
return kind === "header" ?
|
|
156467
|
+
return kind === "header" ? HEADER_RELATIONSHIP_TYPE$1 : FOOTER_RELATIONSHIP_TYPE$1;
|
|
155458
156468
|
}
|
|
155459
156469
|
function toFilePattern(kind) {
|
|
155460
|
-
return kind === "header" ? HEADER_FILE_PATTERN : FOOTER_FILE_PATTERN;
|
|
156470
|
+
return kind === "header" ? HEADER_FILE_PATTERN$1 : FOOTER_FILE_PATTERN$1;
|
|
155461
156471
|
}
|
|
155462
156472
|
function normalizeRelationshipTarget(target) {
|
|
155463
156473
|
let normalized = target.replace(/^\.\//, "");
|
|
@@ -155483,13 +156493,13 @@ function ensureConvertedXml(converter) {
|
|
|
155483
156493
|
}
|
|
155484
156494
|
function ensureRelationshipsRoot(converter) {
|
|
155485
156495
|
const convertedXml = ensureConvertedXml(converter);
|
|
155486
|
-
let relsPart = convertedXml[DOCUMENT_RELS_PATH];
|
|
156496
|
+
let relsPart = convertedXml[DOCUMENT_RELS_PATH$1];
|
|
155487
156497
|
if (!relsPart || typeof relsPart !== "object") {
|
|
155488
156498
|
relsPart = {
|
|
155489
156499
|
name: "document.xml.rels",
|
|
155490
156500
|
elements: []
|
|
155491
156501
|
};
|
|
155492
|
-
convertedXml[DOCUMENT_RELS_PATH] = relsPart;
|
|
156502
|
+
convertedXml[DOCUMENT_RELS_PATH$1] = relsPart;
|
|
155493
156503
|
}
|
|
155494
156504
|
if (!Array.isArray(relsPart.elements))
|
|
155495
156505
|
relsPart.elements = [];
|
|
@@ -155512,7 +156522,7 @@ function ensureRelationshipsRoot(converter) {
|
|
|
155512
156522
|
return relationshipsRoot;
|
|
155513
156523
|
}
|
|
155514
156524
|
function readRelationshipsRoot(converter) {
|
|
155515
|
-
const relsPart = converter.convertedXml?.[DOCUMENT_RELS_PATH];
|
|
156525
|
+
const relsPart = converter.convertedXml?.[DOCUMENT_RELS_PATH$1];
|
|
155516
156526
|
if (!relsPart || typeof relsPart !== "object" || !Array.isArray(relsPart.elements))
|
|
155517
156527
|
return null;
|
|
155518
156528
|
const relationshipsRoot = relsPart.elements.find((entry) => entry.name === "Relationships");
|
|
@@ -155602,7 +156612,7 @@ function getCollection(converter, kind) {
|
|
|
155602
156612
|
converter.footers = {};
|
|
155603
156613
|
return converter.footers;
|
|
155604
156614
|
}
|
|
155605
|
-
function getVariantIds(converter, kind) {
|
|
156615
|
+
function getVariantIds$1(converter, kind) {
|
|
155606
156616
|
if (kind === "header") {
|
|
155607
156617
|
if (!converter.headerIds || typeof converter.headerIds !== "object")
|
|
155608
156618
|
converter.headerIds = {};
|
|
@@ -155670,7 +156680,7 @@ function createHeaderFooterPart(converter, input2) {
|
|
|
155670
156680
|
});
|
|
155671
156681
|
const collection = getCollection(converter, input2.kind);
|
|
155672
156682
|
collection[newRefId] = sourceSnapshot.jsonPart ?? createEmptyJsonPart();
|
|
155673
|
-
const variantIds = getVariantIds(converter, input2.kind);
|
|
156683
|
+
const variantIds = getVariantIds$1(converter, input2.kind);
|
|
155674
156684
|
if (!Array.isArray(variantIds.ids))
|
|
155675
156685
|
variantIds.ids = [];
|
|
155676
156686
|
if (!variantIds.ids.includes(newRefId))
|
|
@@ -155682,10 +156692,187 @@ function createHeaderFooterPart(converter, input2) {
|
|
|
155682
156692
|
relationshipTarget: newPartPath
|
|
155683
156693
|
};
|
|
155684
156694
|
}
|
|
155685
|
-
function
|
|
156695
|
+
function readParagraphSectPr$1(node3) {
|
|
156696
|
+
const sectPr = (node3.attrs ?? {}).paragraphProperties?.sectPr;
|
|
156697
|
+
return sectPr && typeof sectPr === "object" ? sectPr : null;
|
|
156698
|
+
}
|
|
156699
|
+
function readTargetSectPr(editor, projection) {
|
|
156700
|
+
if (projection.target.kind === "paragraph")
|
|
156701
|
+
return readParagraphSectPr$1(projection.target.node);
|
|
156702
|
+
return getBodySectPrFromEditor(editor);
|
|
156703
|
+
}
|
|
156704
|
+
function resolveEffectiveRef(editor, sections, startSectionIndex, kind, variant) {
|
|
156705
|
+
for (let i$1 = startSectionIndex - 1;i$1 >= 0; i$1--) {
|
|
156706
|
+
const section = sections.find((s2) => s2.range.sectionIndex === i$1);
|
|
156707
|
+
if (!section)
|
|
156708
|
+
continue;
|
|
156709
|
+
const sectPr = readTargetSectPr(editor, section);
|
|
156710
|
+
if (!sectPr)
|
|
156711
|
+
continue;
|
|
156712
|
+
const refs = readSectPrHeaderFooterRefs(sectPr, kind);
|
|
156713
|
+
if (!refs)
|
|
156714
|
+
continue;
|
|
156715
|
+
if (refs[variant])
|
|
156716
|
+
return {
|
|
156717
|
+
refId: refs[variant],
|
|
156718
|
+
resolvedFromSection: section.address,
|
|
156719
|
+
resolvedVariant: variant
|
|
156720
|
+
};
|
|
156721
|
+
if (variant !== "default" && refs.default)
|
|
156722
|
+
return {
|
|
156723
|
+
refId: refs.default,
|
|
156724
|
+
resolvedFromSection: section.address,
|
|
156725
|
+
resolvedVariant: "default"
|
|
156726
|
+
};
|
|
156727
|
+
}
|
|
156728
|
+
return null;
|
|
156729
|
+
}
|
|
156730
|
+
function getConverter$3(editor) {
|
|
155686
156731
|
return editor.converter;
|
|
155687
156732
|
}
|
|
155688
|
-
function
|
|
156733
|
+
function setHeaderFooterRefMutation(sectPr, kind, variant, refId, converter, operationName, dryRun = false) {
|
|
156734
|
+
if (!converter)
|
|
156735
|
+
return {
|
|
156736
|
+
success: false,
|
|
156737
|
+
failure: {
|
|
156738
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
156739
|
+
message: `${operationName} requires an active document converter to validate relationship references.`
|
|
156740
|
+
}
|
|
156741
|
+
};
|
|
156742
|
+
if (!hasHeaderFooterRelationship(converter, {
|
|
156743
|
+
kind,
|
|
156744
|
+
refId
|
|
156745
|
+
}))
|
|
156746
|
+
return {
|
|
156747
|
+
success: false,
|
|
156748
|
+
failure: {
|
|
156749
|
+
code: "INVALID_TARGET",
|
|
156750
|
+
message: `${operationName} could not find ${kind} relationship "${refId}" in word/_rels/document.xml.rels.`
|
|
156751
|
+
}
|
|
156752
|
+
};
|
|
156753
|
+
if (getSectPrHeaderFooterRef(sectPr, kind, variant) === refId)
|
|
156754
|
+
return {
|
|
156755
|
+
success: false,
|
|
156756
|
+
failure: {
|
|
156757
|
+
code: "NO_OP",
|
|
156758
|
+
message: `${operationName} already matches the requested reference.`
|
|
156759
|
+
}
|
|
156760
|
+
};
|
|
156761
|
+
setSectPrHeaderFooterRef(sectPr, kind, variant, refId);
|
|
156762
|
+
if (!dryRun)
|
|
156763
|
+
reconcileVariantPointerOnSet(converter, kind, variant, refId);
|
|
156764
|
+
}
|
|
156765
|
+
function clearHeaderFooterRefMutation(sectPr, kind, variant, converter, dryRun = false) {
|
|
156766
|
+
const currentRef = getSectPrHeaderFooterRef(sectPr, kind, variant);
|
|
156767
|
+
clearSectPrHeaderFooterRef(sectPr, kind, variant);
|
|
156768
|
+
if (!dryRun && currentRef && converter)
|
|
156769
|
+
reconcileVariantPointerOnClear(converter, kind, currentRef);
|
|
156770
|
+
}
|
|
156771
|
+
function setLinkedToPreviousMutation(sectPr, projection, sections, kind, variant, linked, editor, dryRun, operationName) {
|
|
156772
|
+
if (projection.range.sectionIndex === 0)
|
|
156773
|
+
return {
|
|
156774
|
+
success: false,
|
|
156775
|
+
failure: {
|
|
156776
|
+
code: "INVALID_TARGET",
|
|
156777
|
+
message: `${operationName} cannot target the first section.`
|
|
156778
|
+
}
|
|
156779
|
+
};
|
|
156780
|
+
if (linked) {
|
|
156781
|
+
const clearedRef = getSectPrHeaderFooterRef(sectPr, kind, variant);
|
|
156782
|
+
if (!clearSectPrHeaderFooterRef(sectPr, kind, variant))
|
|
156783
|
+
return {
|
|
156784
|
+
success: false,
|
|
156785
|
+
failure: {
|
|
156786
|
+
code: "NO_OP",
|
|
156787
|
+
message: `${operationName} found no explicit reference to remove.`
|
|
156788
|
+
}
|
|
156789
|
+
};
|
|
156790
|
+
if (!dryRun && clearedRef) {
|
|
156791
|
+
const converter$1 = getConverter$3(editor);
|
|
156792
|
+
if (converter$1)
|
|
156793
|
+
reconcileVariantPointerOnClear(converter$1, kind, clearedRef);
|
|
156794
|
+
}
|
|
156795
|
+
return;
|
|
156796
|
+
}
|
|
156797
|
+
if (getSectPrHeaderFooterRef(sectPr, kind, variant))
|
|
156798
|
+
return {
|
|
156799
|
+
success: false,
|
|
156800
|
+
failure: {
|
|
156801
|
+
code: "NO_OP",
|
|
156802
|
+
message: `${operationName} already has an explicit reference.`
|
|
156803
|
+
}
|
|
156804
|
+
};
|
|
156805
|
+
const resolved = resolveEffectiveRef(editor, sections, projection.range.sectionIndex, kind, variant);
|
|
156806
|
+
if (dryRun) {
|
|
156807
|
+
setSectPrHeaderFooterRef(sectPr, kind, variant, "(dry-run)");
|
|
156808
|
+
return;
|
|
156809
|
+
}
|
|
156810
|
+
const explicitRefId = createExplicitHeaderFooterReference(editor, {
|
|
156811
|
+
kind,
|
|
156812
|
+
sourceRefId: resolved?.refId
|
|
156813
|
+
});
|
|
156814
|
+
if (!explicitRefId) {
|
|
156815
|
+
if (resolved?.refId) {
|
|
156816
|
+
setSectPrHeaderFooterRef(sectPr, kind, variant, resolved.refId);
|
|
156817
|
+
return;
|
|
156818
|
+
}
|
|
156819
|
+
return {
|
|
156820
|
+
success: false,
|
|
156821
|
+
failure: {
|
|
156822
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
156823
|
+
message: `${operationName} could not allocate an explicit header/footer reference for this section.`
|
|
156824
|
+
}
|
|
156825
|
+
};
|
|
156826
|
+
}
|
|
156827
|
+
setSectPrHeaderFooterRef(sectPr, kind, variant, explicitRefId);
|
|
156828
|
+
const converter = getConverter$3(editor);
|
|
156829
|
+
if (converter)
|
|
156830
|
+
reconcileVariantPointerOnSet(converter, kind, variant, explicitRefId);
|
|
156831
|
+
}
|
|
156832
|
+
function createExplicitHeaderFooterReference(editor, input2) {
|
|
156833
|
+
const converter = getConverter$3(editor);
|
|
156834
|
+
if (!converter)
|
|
156835
|
+
return null;
|
|
156836
|
+
try {
|
|
156837
|
+
const { refId } = createHeaderFooterPart(converter, {
|
|
156838
|
+
kind: input2.kind,
|
|
156839
|
+
variant: "default",
|
|
156840
|
+
sourceRefId: input2.sourceRefId
|
|
156841
|
+
});
|
|
156842
|
+
return refId;
|
|
156843
|
+
} catch {
|
|
156844
|
+
return null;
|
|
156845
|
+
}
|
|
156846
|
+
}
|
|
156847
|
+
function getVariantIds(converter, kind) {
|
|
156848
|
+
if (kind === "header") {
|
|
156849
|
+
if (!converter.headerIds || typeof converter.headerIds !== "object")
|
|
156850
|
+
converter.headerIds = {};
|
|
156851
|
+
return converter.headerIds;
|
|
156852
|
+
}
|
|
156853
|
+
if (!converter.footerIds || typeof converter.footerIds !== "object")
|
|
156854
|
+
converter.footerIds = {};
|
|
156855
|
+
return converter.footerIds;
|
|
156856
|
+
}
|
|
156857
|
+
function reconcileVariantPointerOnSet(converter, kind, variant, refId) {
|
|
156858
|
+
const variantIds = getVariantIds(converter, kind);
|
|
156859
|
+
variantIds[variant] = refId;
|
|
156860
|
+
}
|
|
156861
|
+
function reconcileVariantPointerOnClear(converter, kind, clearedRefId) {
|
|
156862
|
+
const variantIds = getVariantIds(converter, kind);
|
|
156863
|
+
for (const key$1 of [
|
|
156864
|
+
"default",
|
|
156865
|
+
"first",
|
|
156866
|
+
"even",
|
|
156867
|
+
"odd"
|
|
156868
|
+
])
|
|
156869
|
+
if (variantIds[key$1] === clearedRefId)
|
|
156870
|
+
variantIds[key$1] = null;
|
|
156871
|
+
}
|
|
156872
|
+
function getConverter$2(editor) {
|
|
156873
|
+
return editor.converter;
|
|
156874
|
+
}
|
|
156875
|
+
function toSectionFailure$1(code$1, message) {
|
|
155689
156876
|
return {
|
|
155690
156877
|
success: false,
|
|
155691
156878
|
failure: {
|
|
@@ -155694,7 +156881,7 @@ function toSectionFailure(code$1, message) {
|
|
|
155694
156881
|
}
|
|
155695
156882
|
};
|
|
155696
156883
|
}
|
|
155697
|
-
function toSectionSuccess(section) {
|
|
156884
|
+
function toSectionSuccess$1(section) {
|
|
155698
156885
|
return {
|
|
155699
156886
|
success: true,
|
|
155700
156887
|
section
|
|
@@ -155733,12 +156920,12 @@ function readParagraphSectPr(node3) {
|
|
|
155733
156920
|
const sectPr = (node3.attrs ?? {}).paragraphProperties?.sectPr;
|
|
155734
156921
|
return sectPr && typeof sectPr === "object" ? sectPr : null;
|
|
155735
156922
|
}
|
|
155736
|
-
function readTargetSectPr(editor, projection) {
|
|
156923
|
+
function readTargetSectPr$1(editor, projection) {
|
|
155737
156924
|
if (projection.target.kind === "paragraph")
|
|
155738
156925
|
return readParagraphSectPr(projection.target.node);
|
|
155739
156926
|
return getBodySectPrFromEditor(editor);
|
|
155740
156927
|
}
|
|
155741
|
-
function buildSectionMarginsForAttrs(sectPr) {
|
|
156928
|
+
function buildSectionMarginsForAttrs$1(sectPr) {
|
|
155742
156929
|
const margins = readSectPrMargins(sectPr);
|
|
155743
156930
|
return {
|
|
155744
156931
|
top: margins.top ?? null,
|
|
@@ -155749,8 +156936,8 @@ function buildSectionMarginsForAttrs(sectPr) {
|
|
|
155749
156936
|
footer: margins.footer ?? null
|
|
155750
156937
|
};
|
|
155751
156938
|
}
|
|
155752
|
-
function syncConverterBodySection(editor, sectPr) {
|
|
155753
|
-
const converter = getConverter(editor);
|
|
156939
|
+
function syncConverterBodySection$1(editor, sectPr) {
|
|
156940
|
+
const converter = getConverter$2(editor);
|
|
155754
156941
|
if (!converter)
|
|
155755
156942
|
return;
|
|
155756
156943
|
converter.bodySectPr = cloneXmlElement(sectPr);
|
|
@@ -155788,7 +156975,7 @@ function syncConverterBodySection(editor, sectPr) {
|
|
|
155788
156975
|
if (margins.gutter !== undefined)
|
|
155789
156976
|
pageMargins.gutter = margins.gutter;
|
|
155790
156977
|
}
|
|
155791
|
-
function applySectPrToProjection(editor, projection, sectPr) {
|
|
156978
|
+
function applySectPrToProjection$1(editor, projection, sectPr) {
|
|
155792
156979
|
if (projection.target.kind === "paragraph") {
|
|
155793
156980
|
const paragraph2 = projection.target.node;
|
|
155794
156981
|
const attrs = paragraph2.attrs ?? {};
|
|
@@ -155800,7 +156987,7 @@ function applySectPrToProjection(editor, projection, sectPr) {
|
|
|
155800
156987
|
...attrs,
|
|
155801
156988
|
paragraphProperties,
|
|
155802
156989
|
pageBreakSource: "sectPr",
|
|
155803
|
-
sectionMargins: buildSectionMarginsForAttrs(sectPr)
|
|
156990
|
+
sectionMargins: buildSectionMarginsForAttrs$1(sectPr)
|
|
155804
156991
|
};
|
|
155805
156992
|
const tr$1 = applyDirectMutationMeta(editor.state.tr);
|
|
155806
156993
|
tr$1.setNodeMarkup(projection.target.pos, undefined, nextAttrs, paragraph2.marks);
|
|
@@ -155816,9 +157003,9 @@ function applySectPrToProjection(editor, projection, sectPr) {
|
|
|
155816
157003
|
});
|
|
155817
157004
|
tr.setMeta("forceUpdatePagination", true);
|
|
155818
157005
|
editor.dispatch(tr);
|
|
155819
|
-
syncConverterBodySection(editor, sectPr);
|
|
157006
|
+
syncConverterBodySection$1(editor, sectPr);
|
|
155820
157007
|
}
|
|
155821
|
-
function sectionMutationBySectPr(editor, input2, options, operationName, mutate) {
|
|
157008
|
+
function sectionMutationBySectPr$1(editor, input2, options, operationName, mutate) {
|
|
155822
157009
|
rejectTrackedMode(operationName, options);
|
|
155823
157010
|
checkRevision(editor, options?.expectedRevision);
|
|
155824
157011
|
const sections = resolveSectionProjections(editor);
|
|
@@ -155826,18 +157013,18 @@ function sectionMutationBySectPr(editor, input2, options, operationName, mutate)
|
|
|
155826
157013
|
if (!projection)
|
|
155827
157014
|
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Section target was not found.", { target: input2.target });
|
|
155828
157015
|
const dryRun = options?.dryRun === true;
|
|
155829
|
-
const nextSectPr = ensureSectPrElement(readTargetSectPr(editor, projection));
|
|
157016
|
+
const nextSectPr = ensureSectPrElement(readTargetSectPr$1(editor, projection));
|
|
155830
157017
|
const before = JSON.stringify(nextSectPr);
|
|
155831
157018
|
const earlyResult = mutate(nextSectPr, projection, sections, dryRun);
|
|
155832
157019
|
if (earlyResult)
|
|
155833
157020
|
return earlyResult;
|
|
155834
157021
|
if (!(before !== JSON.stringify(nextSectPr)))
|
|
155835
|
-
return toSectionFailure("NO_OP", `${operationName} did not produce a section change.`);
|
|
157022
|
+
return toSectionFailure$1("NO_OP", `${operationName} did not produce a section change.`);
|
|
155836
157023
|
if (options?.dryRun)
|
|
155837
|
-
return toSectionSuccess(projection.address);
|
|
155838
|
-
applySectPrToProjection(editor, projection, nextSectPr);
|
|
157024
|
+
return toSectionSuccess$1(projection.address);
|
|
157025
|
+
applySectPrToProjection$1(editor, projection, nextSectPr);
|
|
155839
157026
|
clearIndexCache(editor);
|
|
155840
|
-
return toSectionSuccess(projection.address);
|
|
157027
|
+
return toSectionSuccess$1(projection.address);
|
|
155841
157028
|
}
|
|
155842
157029
|
function resolveInsertPosition(editor, location$1) {
|
|
155843
157030
|
const target = location$1 ?? { kind: "documentEnd" };
|
|
@@ -155866,7 +157053,7 @@ function createSectionBreakNode(editor, breakParagraphId, input2) {
|
|
|
155866
157053
|
sdBlockId: breakParagraphId,
|
|
155867
157054
|
paragraphProperties: { sectPr },
|
|
155868
157055
|
pageBreakSource: "sectPr",
|
|
155869
|
-
sectionMargins: buildSectionMarginsForAttrs(sectPr)
|
|
157056
|
+
sectionMargins: buildSectionMarginsForAttrs$1(sectPr)
|
|
155870
157057
|
};
|
|
155871
157058
|
const paragraphNode = paragraphType.createAndFill(attrs, undefined) ?? paragraphType.create(attrs, undefined);
|
|
155872
157059
|
if (!paragraphNode)
|
|
@@ -155874,7 +157061,7 @@ function createSectionBreakNode(editor, breakParagraphId, input2) {
|
|
|
155874
157061
|
return paragraphNode;
|
|
155875
157062
|
}
|
|
155876
157063
|
function updateGlobalTitlePageFlag(editor) {
|
|
155877
|
-
const converter = getConverter(editor);
|
|
157064
|
+
const converter = getConverter$2(editor);
|
|
155878
157065
|
if (!converter)
|
|
155879
157066
|
return;
|
|
155880
157067
|
const anyTitlePage = resolveSectionProjections(editor).some((entry) => entry.domain.titlePage === true);
|
|
@@ -155885,21 +157072,6 @@ function updateGlobalTitlePageFlag(editor) {
|
|
|
155885
157072
|
converter.headerIds.titlePg = anyTitlePage;
|
|
155886
157073
|
converter.footerIds.titlePg = anyTitlePage;
|
|
155887
157074
|
}
|
|
155888
|
-
function createExplicitHeaderFooterReference(editor, input2) {
|
|
155889
|
-
const converter = getConverter(editor);
|
|
155890
|
-
if (!converter)
|
|
155891
|
-
return input2.sourceRefId ?? null;
|
|
155892
|
-
try {
|
|
155893
|
-
const { refId } = createHeaderFooterPart(converter, {
|
|
155894
|
-
kind: input2.kind,
|
|
155895
|
-
variant: input2.variant,
|
|
155896
|
-
sourceRefId: input2.sourceRefId
|
|
155897
|
-
});
|
|
155898
|
-
return refId;
|
|
155899
|
-
} catch {
|
|
155900
|
-
return null;
|
|
155901
|
-
}
|
|
155902
|
-
}
|
|
155903
157075
|
function createSectionBreakAdapter(editor, input2, options) {
|
|
155904
157076
|
rejectTrackedMode("create.sectionBreak", options);
|
|
155905
157077
|
checkRevision(editor, options?.expectedRevision);
|
|
@@ -155929,42 +157101,42 @@ function sectionsGetAdapterByInput(editor, input2) {
|
|
|
155929
157101
|
return sectionsGetAdapter(editor, input2.address);
|
|
155930
157102
|
}
|
|
155931
157103
|
function sectionsSetBreakTypeAdapter(editor, input2, options) {
|
|
155932
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setBreakType", (sectPr) => {
|
|
157104
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setBreakType", (sectPr) => {
|
|
155933
157105
|
writeSectPrBreakType(sectPr, input2.breakType);
|
|
155934
157106
|
});
|
|
155935
157107
|
}
|
|
155936
157108
|
function sectionsSetPageMarginsAdapter(editor, input2, options) {
|
|
155937
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setPageMargins", (sectPr) => {
|
|
157109
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setPageMargins", (sectPr) => {
|
|
155938
157110
|
writeSectPrPageMargins(sectPr, input2);
|
|
155939
157111
|
});
|
|
155940
157112
|
}
|
|
155941
157113
|
function sectionsSetHeaderFooterMarginsAdapter(editor, input2, options) {
|
|
155942
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setHeaderFooterMargins", (sectPr) => {
|
|
157114
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setHeaderFooterMargins", (sectPr) => {
|
|
155943
157115
|
writeSectPrHeaderFooterMargins(sectPr, input2);
|
|
155944
157116
|
});
|
|
155945
157117
|
}
|
|
155946
157118
|
function sectionsSetPageSetupAdapter(editor, input2, options) {
|
|
155947
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setPageSetup", (sectPr) => {
|
|
157119
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setPageSetup", (sectPr) => {
|
|
155948
157120
|
writeSectPrPageSetup(sectPr, input2);
|
|
155949
157121
|
});
|
|
155950
157122
|
}
|
|
155951
157123
|
function sectionsSetColumnsAdapter(editor, input2, options) {
|
|
155952
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setColumns", (sectPr) => {
|
|
157124
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setColumns", (sectPr) => {
|
|
155953
157125
|
writeSectPrColumns(sectPr, input2);
|
|
155954
157126
|
});
|
|
155955
157127
|
}
|
|
155956
157128
|
function sectionsSetLineNumberingAdapter(editor, input2, options) {
|
|
155957
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setLineNumbering", (sectPr) => {
|
|
157129
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setLineNumbering", (sectPr) => {
|
|
155958
157130
|
writeSectPrLineNumbering(sectPr, input2);
|
|
155959
157131
|
});
|
|
155960
157132
|
}
|
|
155961
157133
|
function sectionsSetPageNumberingAdapter(editor, input2, options) {
|
|
155962
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setPageNumbering", (sectPr) => {
|
|
157134
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setPageNumbering", (sectPr) => {
|
|
155963
157135
|
writeSectPrPageNumbering(sectPr, input2);
|
|
155964
157136
|
});
|
|
155965
157137
|
}
|
|
155966
157138
|
function sectionsSetTitlePageAdapter(editor, input2, options) {
|
|
155967
|
-
const result = sectionMutationBySectPr(editor, input2, options, "sections.setTitlePage", (sectPr) => {
|
|
157139
|
+
const result = sectionMutationBySectPr$1(editor, input2, options, "sections.setTitlePage", (sectPr) => {
|
|
155968
157140
|
writeSectPrTitlePage(sectPr, input2.enabled);
|
|
155969
157141
|
});
|
|
155970
157142
|
if (result.success && !options?.dryRun)
|
|
@@ -155973,7 +157145,7 @@ function sectionsSetTitlePageAdapter(editor, input2, options) {
|
|
|
155973
157145
|
}
|
|
155974
157146
|
function sectionsSetOddEvenHeadersFootersAdapter(editor, input2, options) {
|
|
155975
157147
|
rejectTrackedMode("sections.setOddEvenHeadersFooters", options);
|
|
155976
|
-
const converter = getConverter(editor);
|
|
157148
|
+
const converter = getConverter$2(editor);
|
|
155977
157149
|
if (!converter)
|
|
155978
157150
|
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", "sections.setOddEvenHeadersFooters requires an active document converter.");
|
|
155979
157151
|
return executeOutOfBandMutation(editor, (dryRun) => {
|
|
@@ -155982,7 +157154,7 @@ function sectionsSetOddEvenHeadersFootersAdapter(editor, input2, options) {
|
|
|
155982
157154
|
if (!changed)
|
|
155983
157155
|
return {
|
|
155984
157156
|
changed: false,
|
|
155985
|
-
payload: toSectionFailure("NO_OP", "sections.setOddEvenHeadersFooters did not produce a document settings change.")
|
|
157157
|
+
payload: toSectionFailure$1("NO_OP", "sections.setOddEvenHeadersFooters did not produce a document settings change.")
|
|
155986
157158
|
};
|
|
155987
157159
|
if (!dryRun) {
|
|
155988
157160
|
setOddEvenHeadersFooters(ensureSettingsRoot(converter), input2.enabled);
|
|
@@ -156000,75 +157172,39 @@ function sectionsSetOddEvenHeadersFootersAdapter(editor, input2, options) {
|
|
|
156000
157172
|
});
|
|
156001
157173
|
}
|
|
156002
157174
|
function sectionsSetVerticalAlignAdapter(editor, input2, options) {
|
|
156003
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setVerticalAlign", (sectPr) => {
|
|
157175
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setVerticalAlign", (sectPr) => {
|
|
156004
157176
|
writeSectPrVerticalAlign(sectPr, input2.value);
|
|
156005
157177
|
});
|
|
156006
157178
|
}
|
|
156007
157179
|
function sectionsSetSectionDirectionAdapter(editor, input2, options) {
|
|
156008
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setSectionDirection", (sectPr) => {
|
|
157180
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setSectionDirection", (sectPr) => {
|
|
156009
157181
|
writeSectPrDirection(sectPr, input2.direction);
|
|
156010
157182
|
});
|
|
156011
157183
|
}
|
|
156012
157184
|
function sectionsSetHeaderFooterRefAdapter(editor, input2, options) {
|
|
156013
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setHeaderFooterRef", (sectPr) => {
|
|
156014
|
-
const converter = getConverter(editor);
|
|
156015
|
-
|
|
156016
|
-
return toSectionFailure("CAPABILITY_UNAVAILABLE", "sections.setHeaderFooterRef requires an active document converter to validate relationship references.");
|
|
156017
|
-
if (!hasHeaderFooterRelationship(converter, {
|
|
156018
|
-
kind: input2.kind,
|
|
156019
|
-
refId: input2.refId
|
|
156020
|
-
}))
|
|
156021
|
-
return toSectionFailure("INVALID_TARGET", `sections.setHeaderFooterRef could not find ${input2.kind} relationship "${input2.refId}" in word/_rels/document.xml.rels.`);
|
|
156022
|
-
if (getSectPrHeaderFooterRef(sectPr, input2.kind, input2.variant) === input2.refId)
|
|
156023
|
-
return toSectionFailure("NO_OP", "sections.setHeaderFooterRef already matches the requested reference.");
|
|
156024
|
-
setSectPrHeaderFooterRef(sectPr, input2.kind, input2.variant, input2.refId);
|
|
157185
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setHeaderFooterRef", (sectPr, _projection, _sections, dryRun) => {
|
|
157186
|
+
const converter = getConverter$2(editor) ?? null;
|
|
157187
|
+
return setHeaderFooterRefMutation(sectPr, input2.kind, input2.variant, input2.refId, converter, "sections.setHeaderFooterRef", dryRun);
|
|
156025
157188
|
});
|
|
156026
157189
|
}
|
|
156027
157190
|
function sectionsClearHeaderFooterRefAdapter(editor, input2, options) {
|
|
156028
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.clearHeaderFooterRef", (sectPr) => {
|
|
156029
|
-
|
|
157191
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.clearHeaderFooterRef", (sectPr, _projection, _sections, dryRun) => {
|
|
157192
|
+
const converter = getConverter$2(editor) ?? null;
|
|
157193
|
+
clearHeaderFooterRefMutation(sectPr, input2.kind, input2.variant, converter, dryRun);
|
|
156030
157194
|
});
|
|
156031
157195
|
}
|
|
156032
157196
|
function sectionsSetLinkToPreviousAdapter(editor, input2, options) {
|
|
156033
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setLinkToPrevious", (sectPr, projection, sections, dryRun) => {
|
|
156034
|
-
|
|
156035
|
-
return toSectionFailure("INVALID_TARGET", "sections.setLinkToPrevious cannot target the first section.");
|
|
156036
|
-
if (input2.linked) {
|
|
156037
|
-
if (!clearSectPrHeaderFooterRef(sectPr, input2.kind, input2.variant))
|
|
156038
|
-
return toSectionFailure("NO_OP", "sections.setLinkToPrevious found no explicit reference to remove.");
|
|
156039
|
-
return;
|
|
156040
|
-
}
|
|
156041
|
-
if (getSectPrHeaderFooterRef(sectPr, input2.kind, input2.variant))
|
|
156042
|
-
return toSectionFailure("NO_OP", "sections.setLinkToPrevious already has an explicit reference.");
|
|
156043
|
-
const previous3 = sections.find((entry) => entry.range.sectionIndex === projection.range.sectionIndex - 1);
|
|
156044
|
-
if (!previous3)
|
|
156045
|
-
return toSectionFailure("INVALID_TARGET", "sections.setLinkToPrevious requires a previous section.");
|
|
156046
|
-
const previousSectPr = readTargetSectPr(editor, previous3);
|
|
156047
|
-
if (!previousSectPr)
|
|
156048
|
-
return toSectionFailure("INVALID_TARGET", "Previous section has no reference to inherit.");
|
|
156049
|
-
const refs = readSectPrHeaderFooterRefs(previousSectPr, input2.kind);
|
|
156050
|
-
const inheritedRef = refs?.[input2.variant] ?? refs?.default;
|
|
156051
|
-
if (dryRun) {
|
|
156052
|
-
setSectPrHeaderFooterRef(sectPr, input2.kind, input2.variant, "(dry-run)");
|
|
156053
|
-
return;
|
|
156054
|
-
}
|
|
156055
|
-
const explicitRefId = createExplicitHeaderFooterReference(editor, {
|
|
156056
|
-
kind: input2.kind,
|
|
156057
|
-
variant: input2.variant,
|
|
156058
|
-
sourceRefId: inheritedRef
|
|
156059
|
-
});
|
|
156060
|
-
if (!explicitRefId)
|
|
156061
|
-
return toSectionFailure("CAPABILITY_UNAVAILABLE", "sections.setLinkToPrevious could not allocate an explicit header/footer reference for this section.");
|
|
156062
|
-
setSectPrHeaderFooterRef(sectPr, input2.kind, input2.variant, explicitRefId);
|
|
157197
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setLinkToPrevious", (sectPr, projection, sections, dryRun) => {
|
|
157198
|
+
return setLinkedToPreviousMutation(sectPr, projection, sections, input2.kind, input2.variant, input2.linked, editor, dryRun, "sections.setLinkToPrevious");
|
|
156063
157199
|
});
|
|
156064
157200
|
}
|
|
156065
157201
|
function sectionsSetPageBordersAdapter(editor, input2, options) {
|
|
156066
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.setPageBorders", (sectPr) => {
|
|
157202
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.setPageBorders", (sectPr) => {
|
|
156067
157203
|
writeSectPrPageBorders(sectPr, input2.borders);
|
|
156068
157204
|
});
|
|
156069
157205
|
}
|
|
156070
157206
|
function sectionsClearPageBordersAdapter(editor, input2, options) {
|
|
156071
|
-
return sectionMutationBySectPr(editor, input2, options, "sections.clearPageBorders", (sectPr) => {
|
|
157207
|
+
return sectionMutationBySectPr$1(editor, input2, options, "sections.clearPageBorders", (sectPr) => {
|
|
156072
157208
|
clearSectPrPageBorders(sectPr);
|
|
156073
157209
|
});
|
|
156074
157210
|
}
|
|
@@ -160056,6 +161192,470 @@ function createContentControlsAdapter(editor) {
|
|
|
160056
161192
|
create: (input2, options) => createWrapper(editor, input2, options)
|
|
160057
161193
|
};
|
|
160058
161194
|
}
|
|
161195
|
+
function toSectionFailure(code$1, message) {
|
|
161196
|
+
return {
|
|
161197
|
+
success: false,
|
|
161198
|
+
failure: {
|
|
161199
|
+
code: code$1,
|
|
161200
|
+
message
|
|
161201
|
+
}
|
|
161202
|
+
};
|
|
161203
|
+
}
|
|
161204
|
+
function toSectionSuccess(section) {
|
|
161205
|
+
return {
|
|
161206
|
+
success: true,
|
|
161207
|
+
section
|
|
161208
|
+
};
|
|
161209
|
+
}
|
|
161210
|
+
function buildSectionMarginsForAttrs(sectPr) {
|
|
161211
|
+
const margins = readSectPrMargins(sectPr);
|
|
161212
|
+
return {
|
|
161213
|
+
top: margins.top ?? null,
|
|
161214
|
+
right: margins.right ?? null,
|
|
161215
|
+
bottom: margins.bottom ?? null,
|
|
161216
|
+
left: margins.left ?? null,
|
|
161217
|
+
header: margins.header ?? null,
|
|
161218
|
+
footer: margins.footer ?? null
|
|
161219
|
+
};
|
|
161220
|
+
}
|
|
161221
|
+
function syncConverterBodySection(editor, sectPr) {
|
|
161222
|
+
const converter = getConverter$1(editor);
|
|
161223
|
+
if (!converter)
|
|
161224
|
+
return;
|
|
161225
|
+
converter.bodySectPr = cloneXmlElement(sectPr);
|
|
161226
|
+
const savedBodyNode = converter.savedTagsToRestore?.find((entry) => entry?.name === "w:body");
|
|
161227
|
+
if (savedBodyNode && Array.isArray(savedBodyNode.elements)) {
|
|
161228
|
+
const preservedChildren = savedBodyNode.elements.filter((entry) => entry?.name !== "w:sectPr");
|
|
161229
|
+
preservedChildren.push(cloneXmlElement(sectPr));
|
|
161230
|
+
savedBodyNode.elements = preservedChildren;
|
|
161231
|
+
}
|
|
161232
|
+
const margins = readSectPrMargins(sectPr);
|
|
161233
|
+
const pageSetup = readSectPrPageSetup(sectPr);
|
|
161234
|
+
if (!converter.pageStyles)
|
|
161235
|
+
converter.pageStyles = {};
|
|
161236
|
+
if (!converter.pageStyles.pageSize)
|
|
161237
|
+
converter.pageStyles.pageSize = {};
|
|
161238
|
+
if (pageSetup?.width !== undefined)
|
|
161239
|
+
converter.pageStyles.pageSize.width = pageSetup.width;
|
|
161240
|
+
if (pageSetup?.height !== undefined)
|
|
161241
|
+
converter.pageStyles.pageSize.height = pageSetup.height;
|
|
161242
|
+
if (!converter.pageStyles.pageMargins)
|
|
161243
|
+
converter.pageStyles.pageMargins = {};
|
|
161244
|
+
const pageMargins = converter.pageStyles.pageMargins;
|
|
161245
|
+
if (margins.top !== undefined)
|
|
161246
|
+
pageMargins.top = margins.top;
|
|
161247
|
+
if (margins.right !== undefined)
|
|
161248
|
+
pageMargins.right = margins.right;
|
|
161249
|
+
if (margins.bottom !== undefined)
|
|
161250
|
+
pageMargins.bottom = margins.bottom;
|
|
161251
|
+
if (margins.left !== undefined)
|
|
161252
|
+
pageMargins.left = margins.left;
|
|
161253
|
+
if (margins.header !== undefined)
|
|
161254
|
+
pageMargins.header = margins.header;
|
|
161255
|
+
if (margins.footer !== undefined)
|
|
161256
|
+
pageMargins.footer = margins.footer;
|
|
161257
|
+
if (margins.gutter !== undefined)
|
|
161258
|
+
pageMargins.gutter = margins.gutter;
|
|
161259
|
+
}
|
|
161260
|
+
function getConverter$1(editor) {
|
|
161261
|
+
return editor.converter;
|
|
161262
|
+
}
|
|
161263
|
+
function applySectPrToProjection(editor, projection, sectPr) {
|
|
161264
|
+
if (projection.target.kind === "paragraph") {
|
|
161265
|
+
const paragraph2 = projection.target.node;
|
|
161266
|
+
const attrs = paragraph2.attrs ?? {};
|
|
161267
|
+
const paragraphProperties = {
|
|
161268
|
+
...attrs.paragraphProperties ?? {},
|
|
161269
|
+
sectPr
|
|
161270
|
+
};
|
|
161271
|
+
const nextAttrs = {
|
|
161272
|
+
...attrs,
|
|
161273
|
+
paragraphProperties,
|
|
161274
|
+
pageBreakSource: "sectPr",
|
|
161275
|
+
sectionMargins: buildSectionMarginsForAttrs(sectPr)
|
|
161276
|
+
};
|
|
161277
|
+
const tr$1 = applyDirectMutationMeta(editor.state.tr);
|
|
161278
|
+
tr$1.setNodeMarkup(projection.target.pos, undefined, nextAttrs, paragraph2.marks);
|
|
161279
|
+
tr$1.setMeta("forceUpdatePagination", true);
|
|
161280
|
+
editor.dispatch(tr$1);
|
|
161281
|
+
return;
|
|
161282
|
+
}
|
|
161283
|
+
const docAttrs = editor.state.doc.attrs ?? {};
|
|
161284
|
+
const tr = applyDirectMutationMeta(editor.state.tr);
|
|
161285
|
+
tr.setNodeMarkup(0, undefined, {
|
|
161286
|
+
...docAttrs,
|
|
161287
|
+
bodySectPr: sectPr
|
|
161288
|
+
});
|
|
161289
|
+
tr.setMeta("forceUpdatePagination", true);
|
|
161290
|
+
editor.dispatch(tr);
|
|
161291
|
+
syncConverterBodySection(editor, sectPr);
|
|
161292
|
+
}
|
|
161293
|
+
function sectionMutationBySectPr(editor, input2, options, operationName, mutate) {
|
|
161294
|
+
rejectTrackedMode(operationName, options);
|
|
161295
|
+
checkRevision(editor, options?.expectedRevision);
|
|
161296
|
+
const sections = resolveSectionProjections(editor);
|
|
161297
|
+
const projection = sections.find((entry) => entry.sectionId === input2.target.sectionId);
|
|
161298
|
+
if (!projection)
|
|
161299
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Section target was not found.", { target: input2.target });
|
|
161300
|
+
const dryRun = options?.dryRun === true;
|
|
161301
|
+
const nextSectPr = ensureSectPrElement(readTargetSectPr(editor, projection));
|
|
161302
|
+
const before = JSON.stringify(nextSectPr);
|
|
161303
|
+
const earlyResult = mutate(nextSectPr, projection, sections, dryRun);
|
|
161304
|
+
if (earlyResult)
|
|
161305
|
+
return earlyResult;
|
|
161306
|
+
if (!(before !== JSON.stringify(nextSectPr)))
|
|
161307
|
+
return toSectionFailure("NO_OP", `${operationName} did not produce a section change.`);
|
|
161308
|
+
if (options?.dryRun)
|
|
161309
|
+
return toSectionSuccess(projection.address);
|
|
161310
|
+
applySectPrToProjection(editor, projection, nextSectPr);
|
|
161311
|
+
clearIndexCache(editor);
|
|
161312
|
+
return toSectionSuccess(projection.address);
|
|
161313
|
+
}
|
|
161314
|
+
function getConverter(editor) {
|
|
161315
|
+
return editor.converter;
|
|
161316
|
+
}
|
|
161317
|
+
function requireConverter(editor, operationName) {
|
|
161318
|
+
const converter = getConverter(editor);
|
|
161319
|
+
if (!converter)
|
|
161320
|
+
throw new DocumentApiAdapterError("CAPABILITY_UNAVAILABLE", `${operationName} requires an active document converter.`);
|
|
161321
|
+
return converter;
|
|
161322
|
+
}
|
|
161323
|
+
function effectiveLimitOf(limit, total) {
|
|
161324
|
+
return limit ?? total;
|
|
161325
|
+
}
|
|
161326
|
+
function buildSlotEntries(editor, sections, kindFilter, sectionFilter) {
|
|
161327
|
+
const entries = [];
|
|
161328
|
+
for (const projection of sections) {
|
|
161329
|
+
if (sectionFilter && projection.sectionId !== sectionFilter.sectionId)
|
|
161330
|
+
continue;
|
|
161331
|
+
const sectPr = readTargetSectPr(editor, projection);
|
|
161332
|
+
const kinds = kindFilter ? [kindFilter] : KIND_ORDER;
|
|
161333
|
+
for (const kind of kinds) {
|
|
161334
|
+
const refs = sectPr ? readSectPrHeaderFooterRefs(sectPr, kind) : undefined;
|
|
161335
|
+
for (const variant of VARIANT_ORDER) {
|
|
161336
|
+
const refId = refs?.[variant] ?? null;
|
|
161337
|
+
entries.push({
|
|
161338
|
+
section: projection.address,
|
|
161339
|
+
sectionIndex: projection.range.sectionIndex,
|
|
161340
|
+
kind,
|
|
161341
|
+
variant,
|
|
161342
|
+
refId,
|
|
161343
|
+
isExplicit: refId !== null
|
|
161344
|
+
});
|
|
161345
|
+
}
|
|
161346
|
+
}
|
|
161347
|
+
}
|
|
161348
|
+
return entries;
|
|
161349
|
+
}
|
|
161350
|
+
function headerFootersListAdapter(editor, query2) {
|
|
161351
|
+
validatePaginationInput(query2?.offset, query2?.limit);
|
|
161352
|
+
const allEntries = buildSlotEntries(editor, resolveSectionProjections(editor), query2?.kind, query2?.section);
|
|
161353
|
+
const offset$1 = query2?.offset ?? 0;
|
|
161354
|
+
const effectiveLimit = effectiveLimitOf(query2?.limit, allEntries.length);
|
|
161355
|
+
const { total, items: paged } = paginate(allEntries, offset$1, effectiveLimit);
|
|
161356
|
+
const evaluatedRevision = getRevision(editor);
|
|
161357
|
+
const items = paged.map((entry) => {
|
|
161358
|
+
const id2 = `slot:${entry.section.sectionId}:${entry.kind}:${entry.variant}`;
|
|
161359
|
+
return buildDiscoveryItem2(id2, buildResolvedHandle2(id2, "ephemeral", "ext:headerFooterSlot"), entry);
|
|
161360
|
+
});
|
|
161361
|
+
return buildDiscoveryResult2({
|
|
161362
|
+
evaluatedRevision,
|
|
161363
|
+
total,
|
|
161364
|
+
items,
|
|
161365
|
+
page: {
|
|
161366
|
+
limit: effectiveLimit,
|
|
161367
|
+
offset: offset$1,
|
|
161368
|
+
returned: items.length
|
|
161369
|
+
}
|
|
161370
|
+
});
|
|
161371
|
+
}
|
|
161372
|
+
function headerFootersGetAdapter(editor, input2) {
|
|
161373
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
161374
|
+
const projection = resolveSectionProjections(editor).find((s2) => s2.sectionId === section.sectionId);
|
|
161375
|
+
if (!projection)
|
|
161376
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Section target was not found.", { target: section });
|
|
161377
|
+
const sectPr = readTargetSectPr(editor, projection);
|
|
161378
|
+
const refId = (sectPr ? readSectPrHeaderFooterRefs(sectPr, headerFooterKind) : undefined)?.[variant] ?? null;
|
|
161379
|
+
return {
|
|
161380
|
+
section: projection.address,
|
|
161381
|
+
sectionIndex: projection.range.sectionIndex,
|
|
161382
|
+
kind: headerFooterKind,
|
|
161383
|
+
variant,
|
|
161384
|
+
refId,
|
|
161385
|
+
isExplicit: refId !== null
|
|
161386
|
+
};
|
|
161387
|
+
}
|
|
161388
|
+
function headerFootersResolveAdapter(editor, input2) {
|
|
161389
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
161390
|
+
const sections = resolveSectionProjections(editor);
|
|
161391
|
+
const projection = sections.find((s2) => s2.sectionId === section.sectionId);
|
|
161392
|
+
if (!projection)
|
|
161393
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", "Section target was not found.", { target: section });
|
|
161394
|
+
const sectPr = readTargetSectPr(editor, projection);
|
|
161395
|
+
if (sectPr) {
|
|
161396
|
+
const refs = readSectPrHeaderFooterRefs(sectPr, headerFooterKind);
|
|
161397
|
+
if (refs?.[variant])
|
|
161398
|
+
return {
|
|
161399
|
+
status: "explicit",
|
|
161400
|
+
refId: refs[variant],
|
|
161401
|
+
section: projection.address
|
|
161402
|
+
};
|
|
161403
|
+
}
|
|
161404
|
+
const resolved = resolveEffectiveRef(editor, sections, projection.range.sectionIndex, headerFooterKind, variant);
|
|
161405
|
+
if (resolved)
|
|
161406
|
+
return {
|
|
161407
|
+
status: "inherited",
|
|
161408
|
+
refId: resolved.refId,
|
|
161409
|
+
resolvedFromSection: resolved.resolvedFromSection,
|
|
161410
|
+
resolvedVariant: resolved.resolvedVariant
|
|
161411
|
+
};
|
|
161412
|
+
return { status: "none" };
|
|
161413
|
+
}
|
|
161414
|
+
function headerFootersRefsSetAdapter(editor, input2, options) {
|
|
161415
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
161416
|
+
return sectionMutationBySectPr(editor, { target: section }, options, "headerFooters.refs.set", (sectPr, _projection, _sections, dryRun) => {
|
|
161417
|
+
const converter = getConverter(editor) ?? null;
|
|
161418
|
+
return setHeaderFooterRefMutation(sectPr, headerFooterKind, variant, input2.refId, converter, "headerFooters.refs.set", dryRun);
|
|
161419
|
+
});
|
|
161420
|
+
}
|
|
161421
|
+
function headerFootersRefsClearAdapter(editor, input2, options) {
|
|
161422
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
161423
|
+
return sectionMutationBySectPr(editor, { target: section }, options, "headerFooters.refs.clear", (sectPr, _projection, _sections, dryRun) => {
|
|
161424
|
+
clearHeaderFooterRefMutation(sectPr, headerFooterKind, variant, getConverter(editor) ?? null, dryRun);
|
|
161425
|
+
});
|
|
161426
|
+
}
|
|
161427
|
+
function headerFootersRefsSetLinkedToPreviousAdapter(editor, input2, options) {
|
|
161428
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
161429
|
+
return sectionMutationBySectPr(editor, { target: section }, options, "headerFooters.refs.setLinkedToPrevious", (sectPr, projection, sections, dryRun) => {
|
|
161430
|
+
return setLinkedToPreviousMutation(sectPr, projection, sections, headerFooterKind, variant, input2.linked, editor, dryRun, "headerFooters.refs.setLinkedToPrevious");
|
|
161431
|
+
});
|
|
161432
|
+
}
|
|
161433
|
+
function kindFromRelationshipType(type) {
|
|
161434
|
+
if (type === HEADER_RELATIONSHIP_TYPE2)
|
|
161435
|
+
return "header";
|
|
161436
|
+
if (type === FOOTER_RELATIONSHIP_TYPE2)
|
|
161437
|
+
return "footer";
|
|
161438
|
+
return null;
|
|
161439
|
+
}
|
|
161440
|
+
function normalizeTarget(target) {
|
|
161441
|
+
let normalized = target.replace(/^\.\//, "");
|
|
161442
|
+
if (normalized.startsWith("../"))
|
|
161443
|
+
normalized = normalized.slice(3);
|
|
161444
|
+
if (normalized.startsWith("/"))
|
|
161445
|
+
normalized = normalized.slice(1);
|
|
161446
|
+
if (!normalized.startsWith("word/"))
|
|
161447
|
+
normalized = `word/${normalized}`;
|
|
161448
|
+
return normalized;
|
|
161449
|
+
}
|
|
161450
|
+
function readRelationshipElements(converter) {
|
|
161451
|
+
const relsPart = converter.convertedXml?.[DOCUMENT_RELS_PATH];
|
|
161452
|
+
if (!relsPart?.elements)
|
|
161453
|
+
return [];
|
|
161454
|
+
const root$1 = relsPart.elements.find((e) => e.name === "Relationships");
|
|
161455
|
+
if (!root$1?.elements)
|
|
161456
|
+
return [];
|
|
161457
|
+
return root$1.elements.filter((e) => e.name === "Relationship");
|
|
161458
|
+
}
|
|
161459
|
+
function extractPartIndex(kind, partPath) {
|
|
161460
|
+
const pattern = kind === "header" ? HEADER_FILE_PATTERN : FOOTER_FILE_PATTERN;
|
|
161461
|
+
const match$1 = partPath.match(pattern);
|
|
161462
|
+
if (!match$1)
|
|
161463
|
+
return null;
|
|
161464
|
+
const num = Number(match$1[1]);
|
|
161465
|
+
return Number.isFinite(num) ? num : null;
|
|
161466
|
+
}
|
|
161467
|
+
function headerFootersPartsListAdapter(editor, query2) {
|
|
161468
|
+
const converter = requireConverter(editor, "headerFooters.parts.list");
|
|
161469
|
+
validatePaginationInput(query2?.offset, query2?.limit);
|
|
161470
|
+
const relationships = readRelationshipElements(converter);
|
|
161471
|
+
const sections = resolveSectionProjections(editor);
|
|
161472
|
+
const refToSections = /* @__PURE__ */ new Map;
|
|
161473
|
+
for (const projection of sections) {
|
|
161474
|
+
const sectPr = readTargetSectPr(editor, projection);
|
|
161475
|
+
if (!sectPr)
|
|
161476
|
+
continue;
|
|
161477
|
+
for (const kind of KIND_ORDER) {
|
|
161478
|
+
const refs = readSectPrHeaderFooterRefs(sectPr, kind);
|
|
161479
|
+
if (!refs)
|
|
161480
|
+
continue;
|
|
161481
|
+
for (const variant of VARIANT_ORDER) {
|
|
161482
|
+
const refId = refs[variant];
|
|
161483
|
+
if (!refId)
|
|
161484
|
+
continue;
|
|
161485
|
+
if (!refToSections.has(refId))
|
|
161486
|
+
refToSections.set(refId, []);
|
|
161487
|
+
if (!refToSections.get(refId).some((a2) => a2.sectionId === projection.sectionId))
|
|
161488
|
+
refToSections.get(refId).push(projection.address);
|
|
161489
|
+
}
|
|
161490
|
+
}
|
|
161491
|
+
}
|
|
161492
|
+
const allEntries = [];
|
|
161493
|
+
for (const rel of relationships) {
|
|
161494
|
+
const kind = kindFromRelationshipType(String(rel.attributes?.Type ?? ""));
|
|
161495
|
+
if (!kind)
|
|
161496
|
+
continue;
|
|
161497
|
+
if (query2?.kind && kind !== query2.kind)
|
|
161498
|
+
continue;
|
|
161499
|
+
const refId = String(rel.attributes?.Id ?? "");
|
|
161500
|
+
const partPath = normalizeTarget(String(rel.attributes?.Target ?? ""));
|
|
161501
|
+
allEntries.push({
|
|
161502
|
+
refId,
|
|
161503
|
+
kind,
|
|
161504
|
+
partPath,
|
|
161505
|
+
referencedBySections: refToSections.get(refId) ?? []
|
|
161506
|
+
});
|
|
161507
|
+
}
|
|
161508
|
+
allEntries.sort((a2, b$1) => {
|
|
161509
|
+
const kindDiff = KIND_ORDER.indexOf(a2.kind) - KIND_ORDER.indexOf(b$1.kind);
|
|
161510
|
+
if (kindDiff !== 0)
|
|
161511
|
+
return kindDiff;
|
|
161512
|
+
const indexA = extractPartIndex(a2.kind, a2.partPath);
|
|
161513
|
+
const indexB = extractPartIndex(b$1.kind, b$1.partPath);
|
|
161514
|
+
if (indexA !== null && indexB !== null)
|
|
161515
|
+
return indexA - indexB;
|
|
161516
|
+
if (indexA !== null)
|
|
161517
|
+
return -1;
|
|
161518
|
+
if (indexB !== null)
|
|
161519
|
+
return 1;
|
|
161520
|
+
const pathCmp = a2.partPath.localeCompare(b$1.partPath);
|
|
161521
|
+
if (pathCmp !== 0)
|
|
161522
|
+
return pathCmp;
|
|
161523
|
+
return a2.refId.localeCompare(b$1.refId);
|
|
161524
|
+
});
|
|
161525
|
+
const offset$1 = query2?.offset ?? 0;
|
|
161526
|
+
const effectiveLimit = effectiveLimitOf(query2?.limit, allEntries.length);
|
|
161527
|
+
const { total, items: paged } = paginate(allEntries, offset$1, effectiveLimit);
|
|
161528
|
+
const evaluatedRevision = getRevision(editor);
|
|
161529
|
+
const items = paged.map((entry) => {
|
|
161530
|
+
const id2 = `part:${entry.refId}`;
|
|
161531
|
+
return buildDiscoveryItem2(id2, buildResolvedHandle2(id2, "stable", "ext:headerFooterPart"), entry);
|
|
161532
|
+
});
|
|
161533
|
+
return buildDiscoveryResult2({
|
|
161534
|
+
evaluatedRevision,
|
|
161535
|
+
total,
|
|
161536
|
+
items,
|
|
161537
|
+
page: {
|
|
161538
|
+
limit: effectiveLimit,
|
|
161539
|
+
offset: offset$1,
|
|
161540
|
+
returned: items.length
|
|
161541
|
+
}
|
|
161542
|
+
});
|
|
161543
|
+
}
|
|
161544
|
+
function toPartsMutationFailure(code$1, message) {
|
|
161545
|
+
return {
|
|
161546
|
+
success: false,
|
|
161547
|
+
failure: {
|
|
161548
|
+
code: code$1,
|
|
161549
|
+
message
|
|
161550
|
+
}
|
|
161551
|
+
};
|
|
161552
|
+
}
|
|
161553
|
+
function headerFootersPartsCreateAdapter(editor, input2, options) {
|
|
161554
|
+
rejectTrackedMode("headerFooters.parts.create", options);
|
|
161555
|
+
checkRevision(editor, options?.expectedRevision);
|
|
161556
|
+
const converter = requireConverter(editor, "headerFooters.parts.create");
|
|
161557
|
+
if (input2.sourceRefId) {
|
|
161558
|
+
const sourceRel = readRelationshipElements(converter).find((rel) => String(rel.attributes?.Id ?? "") === input2.sourceRefId);
|
|
161559
|
+
if (!sourceRel)
|
|
161560
|
+
return toPartsMutationFailure("INVALID_TARGET", `sourceRefId '${input2.sourceRefId}' does not reference an existing header/footer relationship`);
|
|
161561
|
+
const sourceKind = kindFromRelationshipType(String(sourceRel.attributes?.Type ?? ""));
|
|
161562
|
+
if (sourceKind !== input2.kind)
|
|
161563
|
+
return toPartsMutationFailure("INVALID_TARGET", `sourceRefId '${input2.sourceRefId}' is a ${sourceKind ?? "unknown"}, not a ${input2.kind}`);
|
|
161564
|
+
}
|
|
161565
|
+
if (options?.dryRun)
|
|
161566
|
+
return {
|
|
161567
|
+
success: true,
|
|
161568
|
+
refId: "(dry-run)",
|
|
161569
|
+
partPath: `word/${input2.kind}(dry-run).xml`
|
|
161570
|
+
};
|
|
161571
|
+
try {
|
|
161572
|
+
const result = createHeaderFooterPart(converter, {
|
|
161573
|
+
kind: input2.kind,
|
|
161574
|
+
variant: "default",
|
|
161575
|
+
sourceRefId: input2.sourceRefId
|
|
161576
|
+
});
|
|
161577
|
+
return {
|
|
161578
|
+
success: true,
|
|
161579
|
+
refId: result.refId,
|
|
161580
|
+
partPath: result.relationshipTarget
|
|
161581
|
+
};
|
|
161582
|
+
} catch (err) {
|
|
161583
|
+
throw new DocumentApiAdapterError("INTERNAL_ERROR", `headerFooters.parts.create failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
161584
|
+
}
|
|
161585
|
+
}
|
|
161586
|
+
function headerFootersPartsDeleteAdapter(editor, input2, options) {
|
|
161587
|
+
rejectTrackedMode("headerFooters.parts.delete", options);
|
|
161588
|
+
checkRevision(editor, options?.expectedRevision);
|
|
161589
|
+
const converter = requireConverter(editor, "headerFooters.parts.delete");
|
|
161590
|
+
const refId = input2.target.refId;
|
|
161591
|
+
const targetRel = readRelationshipElements(converter).find((rel) => String(rel.attributes?.Id ?? "") === refId);
|
|
161592
|
+
if (!targetRel)
|
|
161593
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `refId '${refId}' not found in document relationships.`);
|
|
161594
|
+
const kind = kindFromRelationshipType(String(targetRel.attributes?.Type ?? ""));
|
|
161595
|
+
if (!kind)
|
|
161596
|
+
throw new DocumentApiAdapterError("TARGET_NOT_FOUND", `refId '${refId}' is not a header/footer relationship.`);
|
|
161597
|
+
const sections = resolveSectionProjections(editor);
|
|
161598
|
+
const referencingSections = [];
|
|
161599
|
+
for (const projection of sections) {
|
|
161600
|
+
const sectPr = readTargetSectPr(editor, projection);
|
|
161601
|
+
if (!sectPr)
|
|
161602
|
+
continue;
|
|
161603
|
+
const refs = readSectPrHeaderFooterRefs(sectPr, kind);
|
|
161604
|
+
if (!refs)
|
|
161605
|
+
continue;
|
|
161606
|
+
for (const variant of VARIANT_ORDER)
|
|
161607
|
+
if (refs[variant] === refId) {
|
|
161608
|
+
referencingSections.push(projection.address);
|
|
161609
|
+
break;
|
|
161610
|
+
}
|
|
161611
|
+
}
|
|
161612
|
+
if (referencingSections.length > 0)
|
|
161613
|
+
return toPartsMutationFailure("INVALID_TARGET", `Cannot delete part '${refId}': still referenced by sections [${referencingSections.map((s2) => s2.sectionId).join(", ")}].`);
|
|
161614
|
+
const partPath = normalizeTarget(String(targetRel.attributes?.Target ?? ""));
|
|
161615
|
+
if (options?.dryRun)
|
|
161616
|
+
return {
|
|
161617
|
+
success: true,
|
|
161618
|
+
refId,
|
|
161619
|
+
partPath
|
|
161620
|
+
};
|
|
161621
|
+
const convertedXml = converter.convertedXml ?? {};
|
|
161622
|
+
const relsPart = convertedXml[DOCUMENT_RELS_PATH];
|
|
161623
|
+
if (relsPart?.elements) {
|
|
161624
|
+
const root$1 = relsPart.elements.find((e) => e.name === "Relationships");
|
|
161625
|
+
if (root$1?.elements)
|
|
161626
|
+
root$1.elements = root$1.elements.filter((e) => !(e.name === "Relationship" && String(e.attributes?.Id ?? "") === refId));
|
|
161627
|
+
}
|
|
161628
|
+
delete convertedXml[partPath];
|
|
161629
|
+
const partFileName = partPath.split("/").pop();
|
|
161630
|
+
if (partFileName)
|
|
161631
|
+
delete convertedXml[`word/_rels/${partFileName}.rels`];
|
|
161632
|
+
const collection = kind === "header" ? converter.headers : converter.footers;
|
|
161633
|
+
if (collection && typeof collection === "object")
|
|
161634
|
+
delete collection[refId];
|
|
161635
|
+
const variantIds = kind === "header" ? converter.headerIds : converter.footerIds;
|
|
161636
|
+
if (variantIds && Array.isArray(variantIds.ids)) {
|
|
161637
|
+
const idx = variantIds.ids.indexOf(refId);
|
|
161638
|
+
if (idx !== -1)
|
|
161639
|
+
variantIds.ids.splice(idx, 1);
|
|
161640
|
+
}
|
|
161641
|
+
if (variantIds) {
|
|
161642
|
+
for (const key$1 of [
|
|
161643
|
+
"default",
|
|
161644
|
+
"first",
|
|
161645
|
+
"even",
|
|
161646
|
+
"odd"
|
|
161647
|
+
])
|
|
161648
|
+
if (variantIds[key$1] === refId)
|
|
161649
|
+
variantIds[key$1] = null;
|
|
161650
|
+
}
|
|
161651
|
+
converter.headerFooterModified = true;
|
|
161652
|
+
converter.documentModified = true;
|
|
161653
|
+
return {
|
|
161654
|
+
success: true,
|
|
161655
|
+
refId,
|
|
161656
|
+
partPath
|
|
161657
|
+
};
|
|
161658
|
+
}
|
|
160059
161659
|
function findAllBookmarks(doc$2) {
|
|
160060
161660
|
const results = [];
|
|
160061
161661
|
const endPositions = collectBookmarkEndPositions(doc$2);
|
|
@@ -163359,6 +164959,21 @@ function assembleDocumentApiAdapters(editor) {
|
|
|
163359
164959
|
patch: (input2, options) => hyperlinksPatchWrapper(editor, input2, options),
|
|
163360
164960
|
remove: (input2, options) => hyperlinksRemoveWrapper(editor, input2, options)
|
|
163361
164961
|
},
|
|
164962
|
+
headerFooters: {
|
|
164963
|
+
list: (query2) => headerFootersListAdapter(editor, query2),
|
|
164964
|
+
get: (input2) => headerFootersGetAdapter(editor, input2),
|
|
164965
|
+
resolve: (input2) => headerFootersResolveAdapter(editor, input2),
|
|
164966
|
+
refs: {
|
|
164967
|
+
set: (input2, options) => headerFootersRefsSetAdapter(editor, input2, options),
|
|
164968
|
+
clear: (input2, options) => headerFootersRefsClearAdapter(editor, input2, options),
|
|
164969
|
+
setLinkedToPrevious: (input2, options) => headerFootersRefsSetLinkedToPreviousAdapter(editor, input2, options)
|
|
164970
|
+
},
|
|
164971
|
+
parts: {
|
|
164972
|
+
list: (query2) => headerFootersPartsListAdapter(editor, query2),
|
|
164973
|
+
create: (input2, options) => headerFootersPartsCreateAdapter(editor, input2, options),
|
|
164974
|
+
delete: (input2, options) => headerFootersPartsDeleteAdapter(editor, input2, options)
|
|
164975
|
+
}
|
|
164976
|
+
},
|
|
163362
164977
|
contentControls: ccAdapter,
|
|
163363
164978
|
bookmarks: {
|
|
163364
164979
|
list: (query2) => bookmarksListWrapper(editor, query2),
|
|
@@ -199412,7 +201027,7 @@ var Node$13 = class Node$14 {
|
|
|
199412
201027
|
console.warn("Failed to initialize developer tools:", error);
|
|
199413
201028
|
}
|
|
199414
201029
|
}
|
|
199415
|
-
}, BLANK_DOCX_DATA_URI = `data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,UEsDBBQAAAAIAAAAIQA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AAAAAEAAACkgXcMAAB3b3JkL3NldHRpbmdzLnhtbFVUBQADMNDOEnV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQDbhWzDfQQAAJcdAAASABgAAAAAAAEAAACkge0QAAB3b3JkL251bWJlcmluZy54bWxVVAUAAzDQzhJ1eAsAAQT1AQAABBQAAABQSwECHgMUAAAACAAAACEAvn52YlYBAADQAwAAFAAYAAAAAAABAAAApIG2FQAAd29yZC93ZWJTZXR0aW5ncy54bWxVVAUAAzDQzhJ1eAsAAQT1AQAABBQAAABQSwECHgMUAAAACAAAACEAP6/hZl8PAAANpgAADwAYAAAAAAABAAAApIFaFwAAd29yZC9zdHlsZXMueG1sVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsBAh4DCgAAAAAAk2RNWwAAAAAAAAAAAAAAAAsAGAAAAAAAAAAQAO1BAicAAHdvcmQvdGhlbWUvVVQFAAOGHO1odXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgAAAAhAGeA/LSbBgAAzSAAABUAGAAAAAAAAQAAAKSBRycAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFVUBQADMNDOEnV4CwABBPUBAAAEFAAAAFBLAQIeAwoAAAAAAJNkTVsAAAAAAAAAAAAAAAALABgAAAAAAAAAEADtQTEuAAB3b3JkL19yZWxzL1VUBQADhhztaHV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQCzvosd/gAAALYDAAAcABgAAAAAAAEAAACkgXYuAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==`, DocumentApiAdapterError, ALIAS_ELIGIBLE_TYPES, TAB_LEADER_TO_SEPARATOR, SEPARATOR_TO_TAB_LEADER, DEFAULT_TOC_CONFIG, SWITCH_PATTERN$1, SectionType, DEFAULT_PARAGRAPH_SECTION_TYPE, DEFAULT_BODY_SECTION_TYPE, TWIPS_PER_INCH$2 = 1440, PX_PER_INCH$2 = 96, DEFAULT_COLUMN_GAP_INCHES = 0.5, DEFAULT_HEADER_FOOTER_MARGIN_PX = 0, PlanError, revisionMap, subscribedEditors, LINK_MARK_NAME = "link", COMMENT_MARK_NAME, SUPPORTED_INLINE_TYPES, cacheByEditor, OBJECT_REPLACEMENT_CHAR = "", LINE_NUMBER_RESTART_VALUES, PAGE_NUMBER_FORMAT_VALUES, SECTION_ORIENTATION_VALUES, SECTION_VERTICAL_ALIGN_VALUES, readSectPrHeaderFooterRefs, PIXELS_PER_INCH$2 = 96, BULLET_FORMATS$1, LOCK_MODE_TO_SDT_LOCK, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, SNIPPET_PADDING = 30, DUAL_KIND_TYPES, KNOWN_BLOCK_PM_NODE_TYPES, KNOWN_INLINE_PM_NODE_TYPES, MAX_PATTERN_LENGTH = 1024, HEADING_STYLE_DEPTH, BULLET_FORMATS, MARK_PRIORITY, remarkProcessor, DEFAULT_UNFLATTEN_LISTS = true, everSyncedProviders, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, registry, TOGGLE_MARK_SPECS, CORE_MARK_NAMES, METADATA_MARK_NAMES, VALID_CREATE_POSITIONS, REF_HANDLERS, STEP_INTERACTION_MATRIX, MATRIX_EXEMPT_OPS, DEFAULT_INLINE_POLICY, CORE_SET_MARK_KEYS, BOOLEAN_INLINE_MARK_KEYS, TEXT_STYLE_KEYS, PRESERVE_RUN_PROPERTIES_META_KEY = "sdPreserveRunPropertiesKeys", CONTENT_CAPABILITIES, INLINE_CAPABILITIES, SDT_LOCK_TO_LOCK_MODE, STUB_WHERE, FALLBACK_STORE_KEY = "__documentApiComments", STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, PARAGRAPH_NODE_TYPES, ALIGNMENT_TO_JUSTIFICATION, DERIVED_ID_LENGTH = 24, groupedCache, SUPPORTED_NODE_TYPES, REJECTED_NODE_TYPES, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, DEFAULT_PRESET_FOR_KIND, CSS_NAMED_COLORS, SETTINGS_PART_PATH = "word/settings.xml", POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, TABLE_ADAPTER_DISPATCH, ROW_OPS, TABLE_SCOPED_OPS, registered = false, DOCUMENT_RELS_PATH = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", WORDPROCESSINGML_XMLNS = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", OFFICE_DOCUMENT_RELS_XMLNS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", RELATIONSHIP_ID_PATTERN, HEADER_FILE_PATTERN, FOOTER_FILE_PATTERN, HISTORY_UNSAFE_OPS, DEFAULT_LEVEL = 1, SWITCH_PATTERN, DEFAULT_RIGHT_TAB_POS = 9350, TAB_LEADER_MAP, NO_ENTRIES_PLACEHOLDER, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, DEFAULT_MIME_TYPE = "application/octet-stream", simpleHash2 = (str) => {
|
|
201030
|
+
}, BLANK_DOCX_DATA_URI = `data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,UEsDBBQAAAAIAAAAIQAykW9XXgEAAKUFAAATABwAW0NvbnRlbnRfVHlwZXNdLnhtbFVUCQADMNDOEjDQzhJ1eAsAAQT1AQAABBQAAAC1lMtqwzAQRfeF/oPRNthKuiilxMmij2UbaPoBijRORPVCmrz+vuM4NaWkMeSxMcgz994zQsxwvLEmW0FM2ruSDYo+y8BJr7Sbl+xz+po/sCyhcEoY76BkW0hsPLq9GU63AVJGapdKtkAMj5wnuQArUuEDOKpUPlqBdIxzHoT8EnPgd/3+PZfeITjMsfZgo+EzVGJpMHvZ0O+GJIJJLHtqGuuskokQjJYCqc5XTv1JyfcJBSl3PWmhQ+pRA+MHE+rK/wF73TtdTdQKsomI+CYsdfG1j4orL5eWlMVxmwOcvqq0hFZfu4XoJaREd25N0Vas0K7XxeGWdgaRlJcHaa07IRJuDaTLEzS+3fGASIJrAOydOxHWMPu4GsUv806QinKnYmbg8hitdScE0hqA5js4m2NncyySOifRh0RrJZ4w9s/eqNU5DRwgoj7+6tpEsj57PqhXkgJ1IJvvluzoG1BLAwQKAAAAAACTZE1bAAAAAAAAAAAAAAAACQAcAGRvY1Byb3BzL1VUCQADhhztaIcc7Wh1eAsAAQT1AQAABBQAAABQSwMEFAAAAAgAAAAhACEYr1llAQAAxQIAABAAHABkb2NQcm9wcy9hcHAueG1sVVQJAAMw0M4SMNDOEnV4CwABBPUBAAAEFAAAAJ1STU/DMAy9I/Efqt63dBwmNHlBaAhx4GPSCpyjxG0j0iRKson9e5wVSoEbOdnP9st7TuDqvTfFAUPUzq7LxbwqC7TSKW3bdflc384uyyImYZUwzuK6PGIsr/j5GWyD8xiSxlgQhY3rskvJrxiLssNexDmVLVUaF3qRKA0tc02jJd44ue/RJnZRVUuG7wmtQjXzI2E5MK4O6b+kysmsL77UR098HGrsvREJ+WOeNHPlUg9sRKF2SZha98grgscEtqLFyBfAhgBeXVAx9wwBbDoRhEy0vwxOMr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CH_PATTERN$1, SectionType, DEFAULT_PARAGRAPH_SECTION_TYPE, DEFAULT_BODY_SECTION_TYPE, TWIPS_PER_INCH$2 = 1440, PX_PER_INCH$2 = 96, DEFAULT_COLUMN_GAP_INCHES = 0.5, DEFAULT_HEADER_FOOTER_MARGIN_PX = 0, PlanError, revisionMap, subscribedEditors, LINK_MARK_NAME = "link", COMMENT_MARK_NAME, SUPPORTED_INLINE_TYPES, cacheByEditor, OBJECT_REPLACEMENT_CHAR = "", LINE_NUMBER_RESTART_VALUES, PAGE_NUMBER_FORMAT_VALUES, SECTION_ORIENTATION_VALUES, SECTION_VERTICAL_ALIGN_VALUES, readSectPrHeaderFooterRefs, PIXELS_PER_INCH$2 = 96, BULLET_FORMATS$1, LOCK_MODE_TO_SDT_LOCK, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, SNIPPET_PADDING = 30, DUAL_KIND_TYPES, KNOWN_BLOCK_PM_NODE_TYPES, KNOWN_INLINE_PM_NODE_TYPES, MAX_PATTERN_LENGTH = 1024, HEADING_STYLE_DEPTH, BULLET_FORMATS, MARK_PRIORITY, remarkProcessor, DEFAULT_UNFLATTEN_LISTS = true, everSyncedProviders, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, registry, TOGGLE_MARK_SPECS, CORE_MARK_NAMES, METADATA_MARK_NAMES, VALID_CREATE_POSITIONS, REF_HANDLERS, STEP_INTERACTION_MATRIX, MATRIX_EXEMPT_OPS, DEFAULT_INLINE_POLICY, CORE_SET_MARK_KEYS, BOOLEAN_INLINE_MARK_KEYS, TEXT_STYLE_KEYS, PRESERVE_RUN_PROPERTIES_META_KEY = "sdPreserveRunPropertiesKeys", CONTENT_CAPABILITIES, INLINE_CAPABILITIES, SDT_LOCK_TO_LOCK_MODE, STUB_WHERE, FALLBACK_STORE_KEY = "__documentApiComments", STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, PARAGRAPH_NODE_TYPES, ALIGNMENT_TO_JUSTIFICATION, DERIVED_ID_LENGTH = 24, groupedCache, SUPPORTED_NODE_TYPES, REJECTED_NODE_TYPES, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, DEFAULT_PRESET_FOR_KIND, CSS_NAMED_COLORS, SETTINGS_PART_PATH = "word/settings.xml", POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, TABLE_ADAPTER_DISPATCH, ROW_OPS, TABLE_SCOPED_OPS, registered = false, DOCUMENT_RELS_PATH$1 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", WORDPROCESSINGML_XMLNS = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", OFFICE_DOCUMENT_RELS_XMLNS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", RELATIONSHIP_ID_PATTERN, HEADER_FILE_PATTERN$1, FOOTER_FILE_PATTERN$1, HISTORY_UNSAFE_OPS, DEFAULT_LEVEL = 1, SWITCH_PATTERN, DEFAULT_RIGHT_TAB_POS = 9350, TAB_LEADER_MAP, NO_ENTRIES_PLACEHOLDER, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, DEFAULT_MIME_TYPE = "application/octet-stream", simpleHash2 = (str) => {
|
|
199416
201031
|
let hash$3 = 0;
|
|
199417
201032
|
for (let i$1 = 0;i$1 < str.length; i$1++) {
|
|
199418
201033
|
const char = str.charCodeAt(i$1);
|
|
@@ -199891,7 +201506,7 @@ var Node$13 = class Node$14 {
|
|
|
199891
201506
|
candidate = String(parseInt(hex$1, 16));
|
|
199892
201507
|
} while (!candidate || existingIds.has(candidate));
|
|
199893
201508
|
return candidate;
|
|
199894
|
-
}, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, FIELD_NODE_TYPES, TOA_LEADER_REVERSE_MAP, empty_exports, init_empty, PIXELS_PER_INCH$1 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, Editor, ContextMenuPluginKey, MENU_OFFSET_X = 0, MENU_OFFSET_Y = 28, CONTEXT_MENU_OFFSET_X = 10, CONTEXT_MENU_OFFSET_Y = 10, SLASH_COOLDOWN_MS = 5000, ContextMenu, SearchQuery = class {
|
|
201509
|
+
}, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN, FOOTER_FILE_PATTERN, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, FIELD_NODE_TYPES, TOA_LEADER_REVERSE_MAP, empty_exports, init_empty, PIXELS_PER_INCH$1 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, Editor, ContextMenuPluginKey, MENU_OFFSET_X = 0, MENU_OFFSET_Y = 28, CONTEXT_MENU_OFFSET_X = 10, CONTEXT_MENU_OFFSET_Y = 10, SLASH_COOLDOWN_MS = 5000, ContextMenu, SearchQuery = class {
|
|
199895
201510
|
constructor(config2) {
|
|
199896
201511
|
this.search = config2.search;
|
|
199897
201512
|
this.caseSensitive = !!config2.caseSensitive;
|
|
@@ -211563,7 +213178,7 @@ var Node$13 = class Node$14 {
|
|
|
211563
213178
|
pushHeaderFooterToYjs(mainEditor, type, sectionId, updatedData);
|
|
211564
213179
|
}, setEditorToolbar = ({ editor }, mainEditor) => {
|
|
211565
213180
|
editor.setToolbar(mainEditor.toolbar);
|
|
211566
|
-
},
|
|
213181
|
+
}, HEADER_FOOTER_VARIANTS4, DEFAULT_HEADER_FOOTER_HEIGHT = 100, EDITOR_READY_TIMEOUT_MS = 5000, MAX_CACHED_EDITORS_LIMIT = 100, HeaderFooterEditorManager, HeaderFooterLayoutAdapter = class {
|
|
211567
213182
|
#manager;
|
|
211568
213183
|
#mediaFiles;
|
|
211569
213184
|
#blockCache = /* @__PURE__ */ new Map;
|
|
@@ -218274,9 +219889,9 @@ var Node$13 = class Node$14 {
|
|
|
218274
219889
|
trackedChanges: context.trackedChanges ?? []
|
|
218275
219890
|
});
|
|
218276
219891
|
}, _hoisted_1$6, _hoisted_2$2, _hoisted_3, _hoisted_4, ContextMenu_default, _hoisted_1$5, BasicUpload_default, _hoisted_1$4, MIN_WIDTH = 200, PPI = 96, alignment = "flex-end", Ruler_default, GenericPopover_default, _hoisted_1$3, _hoisted_2$1, RESIZE_HANDLE_WIDTH_PX = 9, RESIZE_HANDLE_HEIGHT_PX = 9, RESIZE_HANDLE_OFFSET_PX = 4, DRAG_OVERLAY_EXTENSION_PX = 1000, MIN_DRAG_OVERLAY_WIDTH_PX = 2000, THROTTLE_INTERVAL_MS = 16, MIN_RESIZE_DELTA_PX = 1, TableResizeOverlay_default, _hoisted_1$2, OVERLAY_EXPANSION_PX = 2000, RESIZE_HANDLE_SIZE_PX = 12, MOUSE_MOVE_THROTTLE_MS = 16, DIMENSION_CHANGE_THRESHOLD_PX = 1, Z_INDEX_OVERLAY = 10, Z_INDEX_HANDLE = 15, Z_INDEX_GUIDELINE = 20, ImageResizeOverlay_default, LINK_CLICK_DEBOUNCE_MS = 300, CURSOR_UPDATE_TIMEOUT_MS = 10, POPOVER_VERTICAL_OFFSET_PX = 15, LinkClickHandler_default, _hoisted_1$1, _hoisted_2, DOCX2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", TABLE_RESIZE_HOVER_THRESHOLD = 8, TABLE_RESIZE_THROTTLE_MS = 16, SuperEditor_default, _hoisted_1, SuperInput_default, SlashMenu, Extensions;
|
|
218277
|
-
var
|
|
219892
|
+
var init_src_C3qSPIeN_es = __esm(() => {
|
|
218278
219893
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
218279
|
-
|
|
219894
|
+
init_SuperConverter_CnKjdAUR_es();
|
|
218280
219895
|
init_jszip_ChlR43oI_es();
|
|
218281
219896
|
init_uuid_qzgm05fK_es();
|
|
218282
219897
|
init_constants_CMPtQbp7_es();
|
|
@@ -226705,6 +228320,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
226705
228320
|
"sections.setHeaderFooterRef": (editor) => Boolean(editor.converter),
|
|
226706
228321
|
"tables.setDefaultStyle": (editor) => Boolean(editor.converter),
|
|
226707
228322
|
"tables.clearDefaultStyle": (editor) => Boolean(editor.converter),
|
|
228323
|
+
"headerFooters.refs.set": (editor) => Boolean(editor.converter),
|
|
228324
|
+
"headerFooters.refs.setLinkedToPrevious": (editor) => Boolean(editor.converter),
|
|
228325
|
+
"headerFooters.parts.list": (editor) => Boolean(editor.converter),
|
|
228326
|
+
"headerFooters.parts.create": (editor) => Boolean(editor.converter),
|
|
228327
|
+
"headerFooters.parts.delete": (editor) => Boolean(editor.converter),
|
|
226708
228328
|
"lists.setLevelPictureBullet": (editor) => {
|
|
226709
228329
|
const converter = editor.converter;
|
|
226710
228330
|
return Boolean(converter?.convertedXml?.["word/numbering.xml"]);
|
|
@@ -227391,8 +229011,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
227391
229011
|
"tables.mergeCells"
|
|
227392
229012
|
]);
|
|
227393
229013
|
RELATIONSHIP_ID_PATTERN = /^rId(\d+)$/;
|
|
227394
|
-
HEADER_FILE_PATTERN = /^word\/header(\d+)\.xml$/;
|
|
227395
|
-
FOOTER_FILE_PATTERN = /^word\/footer(\d+)\.xml$/;
|
|
229014
|
+
HEADER_FILE_PATTERN$1 = /^word\/header(\d+)\.xml$/;
|
|
229015
|
+
FOOTER_FILE_PATTERN$1 = /^word\/footer(\d+)\.xml$/;
|
|
227396
229016
|
HISTORY_UNSAFE_OPS = OPERATION_IDS2.filter((id2) => COMMAND_CATALOG3[id2].historyUnsafe === true);
|
|
227397
229017
|
SWITCH_PATTERN = /\\([a-z])(?:\s*(?:"([^"]*)"|([^\s\\]+)))?/gi;
|
|
227398
229018
|
TAB_LEADER_MAP = {
|
|
@@ -227464,6 +229084,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
227464
229084
|
repeatingSectionItem: "w15:repeatingSectionItem",
|
|
227465
229085
|
group: "w:group"
|
|
227466
229086
|
};
|
|
229087
|
+
VARIANT_ORDER = [
|
|
229088
|
+
"default",
|
|
229089
|
+
"first",
|
|
229090
|
+
"even"
|
|
229091
|
+
];
|
|
229092
|
+
KIND_ORDER = ["header", "footer"];
|
|
229093
|
+
HEADER_FILE_PATTERN = /header(\d+)\.xml$/;
|
|
229094
|
+
FOOTER_FILE_PATTERN = /footer(\d+)\.xml$/;
|
|
227467
229095
|
RESTART_POLICY_TO_OOXML = {
|
|
227468
229096
|
continuous: "continuous",
|
|
227469
229097
|
eachSection: "eachSect",
|
|
@@ -236622,7 +238250,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
236622
238250
|
".tif"
|
|
236623
238251
|
]);
|
|
236624
238252
|
new PluginKey("paginationPlugin");
|
|
236625
|
-
|
|
238253
|
+
HEADER_FOOTER_VARIANTS4 = [
|
|
236626
238254
|
"default",
|
|
236627
238255
|
"first",
|
|
236628
238256
|
"even",
|
|
@@ -236863,7 +238491,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
236863
238491
|
variant
|
|
236864
238492
|
});
|
|
236865
238493
|
};
|
|
236866
|
-
|
|
238494
|
+
HEADER_FOOTER_VARIANTS4.forEach((variant) => {
|
|
236867
238495
|
const headerId = collections.headerIds?.[variant];
|
|
236868
238496
|
const footerId = collections.footerIds?.[variant];
|
|
236869
238497
|
if (typeof headerId === "string")
|
|
@@ -251045,8 +252673,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
251045
252673
|
return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
251046
252674
|
};
|
|
251047
252675
|
stubFalse_default = stubFalse;
|
|
251048
|
-
freeExports$2 = typeof
|
|
251049
|
-
freeModule$2 = freeExports$2 && typeof
|
|
252676
|
+
freeExports$2 = typeof exports_src_C3qSPIeN_es == "object" && exports_src_C3qSPIeN_es && !exports_src_C3qSPIeN_es.nodeType && exports_src_C3qSPIeN_es;
|
|
252677
|
+
freeModule$2 = freeExports$2 && typeof module_src_C3qSPIeN_es == "object" && module_src_C3qSPIeN_es && !module_src_C3qSPIeN_es.nodeType && module_src_C3qSPIeN_es;
|
|
251050
252678
|
Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
|
|
251051
252679
|
isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
|
|
251052
252680
|
typedArrayTags = {};
|
|
@@ -251054,8 +252682,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
251054
252682
|
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
|
|
251055
252683
|
_baseIsTypedArray_default = baseIsTypedArray;
|
|
251056
252684
|
_baseUnary_default = baseUnary;
|
|
251057
|
-
freeExports$1 = typeof
|
|
251058
|
-
freeModule$1 = freeExports$1 && typeof
|
|
252685
|
+
freeExports$1 = typeof exports_src_C3qSPIeN_es == "object" && exports_src_C3qSPIeN_es && !exports_src_C3qSPIeN_es.nodeType && exports_src_C3qSPIeN_es;
|
|
252686
|
+
freeModule$1 = freeExports$1 && typeof module_src_C3qSPIeN_es == "object" && module_src_C3qSPIeN_es && !module_src_C3qSPIeN_es.nodeType && module_src_C3qSPIeN_es;
|
|
251059
252687
|
freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
|
|
251060
252688
|
_nodeUtil_default = function() {
|
|
251061
252689
|
try {
|
|
@@ -251160,8 +252788,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
251160
252788
|
Stack.prototype.has = _stackHas_default;
|
|
251161
252789
|
Stack.prototype.set = _stackSet_default;
|
|
251162
252790
|
_Stack_default = Stack;
|
|
251163
|
-
freeExports = typeof
|
|
251164
|
-
freeModule = freeExports && typeof
|
|
252791
|
+
freeExports = typeof exports_src_C3qSPIeN_es == "object" && exports_src_C3qSPIeN_es && !exports_src_C3qSPIeN_es.nodeType && exports_src_C3qSPIeN_es;
|
|
252792
|
+
freeModule = freeExports && typeof module_src_C3qSPIeN_es == "object" && module_src_C3qSPIeN_es && !module_src_C3qSPIeN_es.nodeType && module_src_C3qSPIeN_es;
|
|
251165
252793
|
Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
|
|
251166
252794
|
allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
|
|
251167
252795
|
_cloneBuffer_default = cloneBuffer;
|
|
@@ -259241,8 +260869,8 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
259241
260869
|
|
|
259242
260870
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
259243
260871
|
var init_super_editor_es = __esm(() => {
|
|
259244
|
-
|
|
259245
|
-
|
|
260872
|
+
init_src_C3qSPIeN_es();
|
|
260873
|
+
init_SuperConverter_CnKjdAUR_es();
|
|
259246
260874
|
init_jszip_ChlR43oI_es();
|
|
259247
260875
|
init_xml_js_DLE8mr0n_es();
|
|
259248
260876
|
init_constants_CMPtQbp7_es();
|
|
@@ -320712,15 +322340,15 @@ var init_SuperConverter = __esm(() => {
|
|
|
320712
322340
|
const relationships = relsData.elements.find((x) => x.name === "Relationships");
|
|
320713
322341
|
if (!relationships?.elements)
|
|
320714
322342
|
return;
|
|
320715
|
-
const
|
|
322343
|
+
const normalizeTarget2 = (target) => {
|
|
320716
322344
|
if (!target)
|
|
320717
322345
|
return "";
|
|
320718
322346
|
return target.replace(/^\.\//, "").replace(/^\//, "").replace(/^word\//, "");
|
|
320719
322347
|
};
|
|
320720
|
-
const removedSet = new Set(removedTargets.map(
|
|
322348
|
+
const removedSet = new Set(removedTargets.map(normalizeTarget2));
|
|
320721
322349
|
relationships.elements = relationships.elements.filter((rel) => {
|
|
320722
322350
|
const type = rel.attributes?.Type;
|
|
320723
|
-
const target =
|
|
322351
|
+
const target = normalizeTarget2(rel.attributes?.Target);
|
|
320724
322352
|
if (COMMENT_RELATIONSHIP_TYPES2.has(type) && removedSet.has(target)) {
|
|
320725
322353
|
return false;
|
|
320726
322354
|
}
|
|
@@ -325743,6 +327371,11 @@ var init_capabilities_adapter = __esm(() => {
|
|
|
325743
327371
|
"sections.setHeaderFooterRef": (editor) => Boolean(editor.converter),
|
|
325744
327372
|
"tables.setDefaultStyle": (editor) => Boolean(editor.converter),
|
|
325745
327373
|
"tables.clearDefaultStyle": (editor) => Boolean(editor.converter),
|
|
327374
|
+
"headerFooters.refs.set": (editor) => Boolean(editor.converter),
|
|
327375
|
+
"headerFooters.refs.setLinkedToPrevious": (editor) => Boolean(editor.converter),
|
|
327376
|
+
"headerFooters.parts.list": (editor) => Boolean(editor.converter),
|
|
327377
|
+
"headerFooters.parts.create": (editor) => Boolean(editor.converter),
|
|
327378
|
+
"headerFooters.parts.delete": (editor) => Boolean(editor.converter),
|
|
325746
327379
|
"lists.setLevelPictureBullet": (editor) => {
|
|
325747
327380
|
const converter = editor.converter;
|
|
325748
327381
|
return Boolean(converter?.convertedXml?.["word/numbering.xml"]);
|
|
@@ -339467,10 +341100,201 @@ var init_header_footer_parts = __esm(() => {
|
|
|
339467
341100
|
FOOTER_FILE_PATTERN2 = /^word\/footer(\d+)\.xml$/;
|
|
339468
341101
|
});
|
|
339469
341102
|
|
|
339470
|
-
// ../../packages/super-editor/src/document-api-adapters/
|
|
341103
|
+
// ../../packages/super-editor/src/document-api-adapters/helpers/section-projection-access.ts
|
|
341104
|
+
function readParagraphSectPr2(node4) {
|
|
341105
|
+
const attrs = node4.attrs ?? {};
|
|
341106
|
+
const sectPr = attrs.paragraphProperties?.sectPr;
|
|
341107
|
+
return sectPr && typeof sectPr === "object" ? sectPr : null;
|
|
341108
|
+
}
|
|
341109
|
+
function readTargetSectPr2(editor, projection) {
|
|
341110
|
+
if (projection.target.kind === "paragraph") {
|
|
341111
|
+
return readParagraphSectPr2(projection.target.node);
|
|
341112
|
+
}
|
|
341113
|
+
return getBodySectPrFromEditor2(editor);
|
|
341114
|
+
}
|
|
341115
|
+
var init_section_projection_access = __esm(() => {
|
|
341116
|
+
init_sections_resolver();
|
|
341117
|
+
});
|
|
341118
|
+
|
|
341119
|
+
// ../../packages/super-editor/src/document-api-adapters/helpers/header-footer-refs-mutation.ts
|
|
341120
|
+
function resolveEffectiveRef2(editor, sections, startSectionIndex, kind, variant) {
|
|
341121
|
+
for (let i5 = startSectionIndex - 1;i5 >= 0; i5--) {
|
|
341122
|
+
const section = sections.find((s2) => s2.range.sectionIndex === i5);
|
|
341123
|
+
if (!section)
|
|
341124
|
+
continue;
|
|
341125
|
+
const sectPr = readTargetSectPr2(editor, section);
|
|
341126
|
+
if (!sectPr)
|
|
341127
|
+
continue;
|
|
341128
|
+
const refs = readSectPrHeaderFooterRefs2(sectPr, kind);
|
|
341129
|
+
if (!refs)
|
|
341130
|
+
continue;
|
|
341131
|
+
if (refs[variant]) {
|
|
341132
|
+
return {
|
|
341133
|
+
refId: refs[variant],
|
|
341134
|
+
resolvedFromSection: section.address,
|
|
341135
|
+
resolvedVariant: variant
|
|
341136
|
+
};
|
|
341137
|
+
}
|
|
341138
|
+
if (variant !== "default" && refs.default) {
|
|
341139
|
+
return {
|
|
341140
|
+
refId: refs.default,
|
|
341141
|
+
resolvedFromSection: section.address,
|
|
341142
|
+
resolvedVariant: "default"
|
|
341143
|
+
};
|
|
341144
|
+
}
|
|
341145
|
+
}
|
|
341146
|
+
return null;
|
|
341147
|
+
}
|
|
339471
341148
|
function getConverter3(editor) {
|
|
339472
341149
|
return editor.converter;
|
|
339473
341150
|
}
|
|
341151
|
+
function setHeaderFooterRefMutation2(sectPr, kind, variant, refId, converter, operationName, dryRun = false) {
|
|
341152
|
+
if (!converter) {
|
|
341153
|
+
return {
|
|
341154
|
+
success: false,
|
|
341155
|
+
failure: {
|
|
341156
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
341157
|
+
message: `${operationName} requires an active document converter to validate relationship references.`
|
|
341158
|
+
}
|
|
341159
|
+
};
|
|
341160
|
+
}
|
|
341161
|
+
const relationshipExists = hasHeaderFooterRelationship2(converter, { kind, refId });
|
|
341162
|
+
if (!relationshipExists) {
|
|
341163
|
+
return {
|
|
341164
|
+
success: false,
|
|
341165
|
+
failure: {
|
|
341166
|
+
code: "INVALID_TARGET",
|
|
341167
|
+
message: `${operationName} could not find ${kind} relationship "${refId}" in word/_rels/document.xml.rels.`
|
|
341168
|
+
}
|
|
341169
|
+
};
|
|
341170
|
+
}
|
|
341171
|
+
const currentRef = getSectPrHeaderFooterRef2(sectPr, kind, variant);
|
|
341172
|
+
if (currentRef === refId) {
|
|
341173
|
+
return {
|
|
341174
|
+
success: false,
|
|
341175
|
+
failure: { code: "NO_OP", message: `${operationName} already matches the requested reference.` }
|
|
341176
|
+
};
|
|
341177
|
+
}
|
|
341178
|
+
setSectPrHeaderFooterRef2(sectPr, kind, variant, refId);
|
|
341179
|
+
if (!dryRun) {
|
|
341180
|
+
reconcileVariantPointerOnSet2(converter, kind, variant, refId);
|
|
341181
|
+
}
|
|
341182
|
+
}
|
|
341183
|
+
function clearHeaderFooterRefMutation2(sectPr, kind, variant, converter, dryRun = false) {
|
|
341184
|
+
const currentRef = getSectPrHeaderFooterRef2(sectPr, kind, variant);
|
|
341185
|
+
clearSectPrHeaderFooterRef2(sectPr, kind, variant);
|
|
341186
|
+
if (!dryRun && currentRef && converter) {
|
|
341187
|
+
reconcileVariantPointerOnClear2(converter, kind, currentRef);
|
|
341188
|
+
}
|
|
341189
|
+
}
|
|
341190
|
+
function setLinkedToPreviousMutation2(sectPr, projection, sections, kind, variant, linked, editor, dryRun, operationName) {
|
|
341191
|
+
if (projection.range.sectionIndex === 0) {
|
|
341192
|
+
return {
|
|
341193
|
+
success: false,
|
|
341194
|
+
failure: { code: "INVALID_TARGET", message: `${operationName} cannot target the first section.` }
|
|
341195
|
+
};
|
|
341196
|
+
}
|
|
341197
|
+
if (linked) {
|
|
341198
|
+
const clearedRef = getSectPrHeaderFooterRef2(sectPr, kind, variant);
|
|
341199
|
+
const removed = clearSectPrHeaderFooterRef2(sectPr, kind, variant);
|
|
341200
|
+
if (!removed) {
|
|
341201
|
+
return {
|
|
341202
|
+
success: false,
|
|
341203
|
+
failure: { code: "NO_OP", message: `${operationName} found no explicit reference to remove.` }
|
|
341204
|
+
};
|
|
341205
|
+
}
|
|
341206
|
+
if (!dryRun && clearedRef) {
|
|
341207
|
+
const converter2 = getConverter3(editor);
|
|
341208
|
+
if (converter2) {
|
|
341209
|
+
reconcileVariantPointerOnClear2(converter2, kind, clearedRef);
|
|
341210
|
+
}
|
|
341211
|
+
}
|
|
341212
|
+
return;
|
|
341213
|
+
}
|
|
341214
|
+
const existing = getSectPrHeaderFooterRef2(sectPr, kind, variant);
|
|
341215
|
+
if (existing) {
|
|
341216
|
+
return {
|
|
341217
|
+
success: false,
|
|
341218
|
+
failure: { code: "NO_OP", message: `${operationName} already has an explicit reference.` }
|
|
341219
|
+
};
|
|
341220
|
+
}
|
|
341221
|
+
const resolved = resolveEffectiveRef2(editor, sections, projection.range.sectionIndex, kind, variant);
|
|
341222
|
+
if (dryRun) {
|
|
341223
|
+
setSectPrHeaderFooterRef2(sectPr, kind, variant, "(dry-run)");
|
|
341224
|
+
return;
|
|
341225
|
+
}
|
|
341226
|
+
const explicitRefId = createExplicitHeaderFooterReference2(editor, {
|
|
341227
|
+
kind,
|
|
341228
|
+
sourceRefId: resolved?.refId
|
|
341229
|
+
});
|
|
341230
|
+
if (!explicitRefId) {
|
|
341231
|
+
if (resolved?.refId) {
|
|
341232
|
+
setSectPrHeaderFooterRef2(sectPr, kind, variant, resolved.refId);
|
|
341233
|
+
return;
|
|
341234
|
+
}
|
|
341235
|
+
return {
|
|
341236
|
+
success: false,
|
|
341237
|
+
failure: {
|
|
341238
|
+
code: "CAPABILITY_UNAVAILABLE",
|
|
341239
|
+
message: `${operationName} could not allocate an explicit header/footer reference for this section.`
|
|
341240
|
+
}
|
|
341241
|
+
};
|
|
341242
|
+
}
|
|
341243
|
+
setSectPrHeaderFooterRef2(sectPr, kind, variant, explicitRefId);
|
|
341244
|
+
const converter = getConverter3(editor);
|
|
341245
|
+
if (converter) {
|
|
341246
|
+
reconcileVariantPointerOnSet2(converter, kind, variant, explicitRefId);
|
|
341247
|
+
}
|
|
341248
|
+
}
|
|
341249
|
+
function createExplicitHeaderFooterReference2(editor, input2) {
|
|
341250
|
+
const converter = getConverter3(editor);
|
|
341251
|
+
if (!converter) {
|
|
341252
|
+
return null;
|
|
341253
|
+
}
|
|
341254
|
+
try {
|
|
341255
|
+
const { refId } = createHeaderFooterPart2(converter, {
|
|
341256
|
+
kind: input2.kind,
|
|
341257
|
+
variant: "default",
|
|
341258
|
+
sourceRefId: input2.sourceRefId
|
|
341259
|
+
});
|
|
341260
|
+
return refId;
|
|
341261
|
+
} catch {
|
|
341262
|
+
return null;
|
|
341263
|
+
}
|
|
341264
|
+
}
|
|
341265
|
+
function getVariantIds3(converter, kind) {
|
|
341266
|
+
if (kind === "header") {
|
|
341267
|
+
if (!converter.headerIds || typeof converter.headerIds !== "object")
|
|
341268
|
+
converter.headerIds = {};
|
|
341269
|
+
return converter.headerIds;
|
|
341270
|
+
}
|
|
341271
|
+
if (!converter.footerIds || typeof converter.footerIds !== "object")
|
|
341272
|
+
converter.footerIds = {};
|
|
341273
|
+
return converter.footerIds;
|
|
341274
|
+
}
|
|
341275
|
+
function reconcileVariantPointerOnSet2(converter, kind, variant, refId) {
|
|
341276
|
+
const variantIds = getVariantIds3(converter, kind);
|
|
341277
|
+
variantIds[variant] = refId;
|
|
341278
|
+
}
|
|
341279
|
+
function reconcileVariantPointerOnClear2(converter, kind, clearedRefId) {
|
|
341280
|
+
const variantIds = getVariantIds3(converter, kind);
|
|
341281
|
+
const namedKeys = ["default", "first", "even", "odd"];
|
|
341282
|
+
for (const key2 of namedKeys) {
|
|
341283
|
+
if (variantIds[key2] === clearedRefId) {
|
|
341284
|
+
variantIds[key2] = null;
|
|
341285
|
+
}
|
|
341286
|
+
}
|
|
341287
|
+
}
|
|
341288
|
+
var init_header_footer_refs_mutation = __esm(() => {
|
|
341289
|
+
init_sections_xml();
|
|
341290
|
+
init_header_footer_parts();
|
|
341291
|
+
init_section_projection_access();
|
|
341292
|
+
});
|
|
341293
|
+
|
|
341294
|
+
// ../../packages/super-editor/src/document-api-adapters/sections-adapter.ts
|
|
341295
|
+
function getConverter4(editor) {
|
|
341296
|
+
return editor.converter;
|
|
341297
|
+
}
|
|
339474
341298
|
function toSectionFailure2(code10, message) {
|
|
339475
341299
|
return {
|
|
339476
341300
|
success: false,
|
|
@@ -339515,14 +341339,14 @@ function createSectionBreakId2() {
|
|
|
339515
341339
|
return randomUuid;
|
|
339516
341340
|
return `section-break-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
339517
341341
|
}
|
|
339518
|
-
function
|
|
341342
|
+
function readParagraphSectPr3(node4) {
|
|
339519
341343
|
const attrs = node4.attrs ?? {};
|
|
339520
341344
|
const sectPr = attrs.paragraphProperties?.sectPr;
|
|
339521
341345
|
return sectPr && typeof sectPr === "object" ? sectPr : null;
|
|
339522
341346
|
}
|
|
339523
|
-
function
|
|
341347
|
+
function readTargetSectPr3(editor, projection) {
|
|
339524
341348
|
if (projection.target.kind === "paragraph") {
|
|
339525
|
-
return
|
|
341349
|
+
return readParagraphSectPr3(projection.target.node);
|
|
339526
341350
|
}
|
|
339527
341351
|
return getBodySectPrFromEditor2(editor);
|
|
339528
341352
|
}
|
|
@@ -339538,7 +341362,7 @@ function buildSectionMarginsForAttrs2(sectPr) {
|
|
|
339538
341362
|
};
|
|
339539
341363
|
}
|
|
339540
341364
|
function syncConverterBodySection2(editor, sectPr) {
|
|
339541
|
-
const converter =
|
|
341365
|
+
const converter = getConverter4(editor);
|
|
339542
341366
|
if (!converter)
|
|
339543
341367
|
return;
|
|
339544
341368
|
converter.bodySectPr = cloneXmlElement2(sectPr);
|
|
@@ -339612,7 +341436,7 @@ function sectionMutationBySectPr2(editor, input2, options, operationName, mutate
|
|
|
339612
341436
|
throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", "Section target was not found.", { target: input2.target });
|
|
339613
341437
|
}
|
|
339614
341438
|
const dryRun = options?.dryRun === true;
|
|
339615
|
-
const currentSectPr =
|
|
341439
|
+
const currentSectPr = readTargetSectPr3(editor, projection);
|
|
339616
341440
|
const nextSectPr = ensureSectPrElement2(currentSectPr);
|
|
339617
341441
|
const before = JSON.stringify(nextSectPr);
|
|
339618
341442
|
const earlyResult = mutate(nextSectPr, projection, sections, dryRun);
|
|
@@ -339668,7 +341492,7 @@ function createSectionBreakNode2(editor, breakParagraphId, input2) {
|
|
|
339668
341492
|
return paragraphNode;
|
|
339669
341493
|
}
|
|
339670
341494
|
function updateGlobalTitlePageFlag2(editor) {
|
|
339671
|
-
const converter =
|
|
341495
|
+
const converter = getConverter4(editor);
|
|
339672
341496
|
if (!converter)
|
|
339673
341497
|
return;
|
|
339674
341498
|
const anyTitlePage = resolveSectionProjections2(editor).some((entry) => entry.domain.titlePage === true);
|
|
@@ -339679,22 +341503,6 @@ function updateGlobalTitlePageFlag2(editor) {
|
|
|
339679
341503
|
converter.headerIds.titlePg = anyTitlePage;
|
|
339680
341504
|
converter.footerIds.titlePg = anyTitlePage;
|
|
339681
341505
|
}
|
|
339682
|
-
function createExplicitHeaderFooterReference2(editor, input2) {
|
|
339683
|
-
const converter = getConverter3(editor);
|
|
339684
|
-
if (!converter) {
|
|
339685
|
-
return input2.sourceRefId ?? null;
|
|
339686
|
-
}
|
|
339687
|
-
try {
|
|
339688
|
-
const { refId } = createHeaderFooterPart2(converter, {
|
|
339689
|
-
kind: input2.kind,
|
|
339690
|
-
variant: input2.variant,
|
|
339691
|
-
sourceRefId: input2.sourceRefId
|
|
339692
|
-
});
|
|
339693
|
-
return refId;
|
|
339694
|
-
} catch {
|
|
339695
|
-
return null;
|
|
339696
|
-
}
|
|
339697
|
-
}
|
|
339698
341506
|
function createSectionBreakAdapter2(editor, input2, options) {
|
|
339699
341507
|
rejectTrackedMode2("create.sectionBreak", options);
|
|
339700
341508
|
checkRevision2(editor, options?.expectedRevision);
|
|
@@ -339768,7 +341576,7 @@ function sectionsSetTitlePageAdapter2(editor, input2, options) {
|
|
|
339768
341576
|
}
|
|
339769
341577
|
function sectionsSetOddEvenHeadersFootersAdapter2(editor, input2, options) {
|
|
339770
341578
|
rejectTrackedMode2("sections.setOddEvenHeadersFooters", options);
|
|
339771
|
-
const converter =
|
|
341579
|
+
const converter = getConverter4(editor);
|
|
339772
341580
|
if (!converter) {
|
|
339773
341581
|
throw new DocumentApiAdapterError3("CAPABILITY_UNAVAILABLE", "sections.setOddEvenHeadersFooters requires an active document converter.");
|
|
339774
341582
|
}
|
|
@@ -339809,69 +341617,20 @@ function sectionsSetSectionDirectionAdapter2(editor, input2, options) {
|
|
|
339809
341617
|
});
|
|
339810
341618
|
}
|
|
339811
341619
|
function sectionsSetHeaderFooterRefAdapter2(editor, input2, options) {
|
|
339812
|
-
return sectionMutationBySectPr2(editor, input2, options, "sections.setHeaderFooterRef", (sectPr) => {
|
|
339813
|
-
const converter =
|
|
339814
|
-
|
|
339815
|
-
return toSectionFailure2("CAPABILITY_UNAVAILABLE", "sections.setHeaderFooterRef requires an active document converter to validate relationship references.");
|
|
339816
|
-
}
|
|
339817
|
-
const relationshipExists = hasHeaderFooterRelationship2(converter, {
|
|
339818
|
-
kind: input2.kind,
|
|
339819
|
-
refId: input2.refId
|
|
339820
|
-
});
|
|
339821
|
-
if (!relationshipExists) {
|
|
339822
|
-
return toSectionFailure2("INVALID_TARGET", `sections.setHeaderFooterRef could not find ${input2.kind} relationship "${input2.refId}" in word/_rels/document.xml.rels.`);
|
|
339823
|
-
}
|
|
339824
|
-
const currentRef = getSectPrHeaderFooterRef2(sectPr, input2.kind, input2.variant);
|
|
339825
|
-
if (currentRef === input2.refId) {
|
|
339826
|
-
return toSectionFailure2("NO_OP", "sections.setHeaderFooterRef already matches the requested reference.");
|
|
339827
|
-
}
|
|
339828
|
-
setSectPrHeaderFooterRef2(sectPr, input2.kind, input2.variant, input2.refId);
|
|
341620
|
+
return sectionMutationBySectPr2(editor, input2, options, "sections.setHeaderFooterRef", (sectPr, _projection, _sections, dryRun) => {
|
|
341621
|
+
const converter = getConverter4(editor) ?? null;
|
|
341622
|
+
return setHeaderFooterRefMutation2(sectPr, input2.kind, input2.variant, input2.refId, converter, "sections.setHeaderFooterRef", dryRun);
|
|
339829
341623
|
});
|
|
339830
341624
|
}
|
|
339831
341625
|
function sectionsClearHeaderFooterRefAdapter2(editor, input2, options) {
|
|
339832
|
-
return sectionMutationBySectPr2(editor, input2, options, "sections.clearHeaderFooterRef", (sectPr) => {
|
|
339833
|
-
|
|
341626
|
+
return sectionMutationBySectPr2(editor, input2, options, "sections.clearHeaderFooterRef", (sectPr, _projection, _sections, dryRun) => {
|
|
341627
|
+
const converter = getConverter4(editor) ?? null;
|
|
341628
|
+
clearHeaderFooterRefMutation2(sectPr, input2.kind, input2.variant, converter, dryRun);
|
|
339834
341629
|
});
|
|
339835
341630
|
}
|
|
339836
341631
|
function sectionsSetLinkToPreviousAdapter2(editor, input2, options) {
|
|
339837
341632
|
return sectionMutationBySectPr2(editor, input2, options, "sections.setLinkToPrevious", (sectPr, projection, sections, dryRun) => {
|
|
339838
|
-
|
|
339839
|
-
return toSectionFailure2("INVALID_TARGET", "sections.setLinkToPrevious cannot target the first section.");
|
|
339840
|
-
}
|
|
339841
|
-
if (input2.linked) {
|
|
339842
|
-
const removed = clearSectPrHeaderFooterRef2(sectPr, input2.kind, input2.variant);
|
|
339843
|
-
if (!removed) {
|
|
339844
|
-
return toSectionFailure2("NO_OP", "sections.setLinkToPrevious found no explicit reference to remove.");
|
|
339845
|
-
}
|
|
339846
|
-
return;
|
|
339847
|
-
}
|
|
339848
|
-
const existing = getSectPrHeaderFooterRef2(sectPr, input2.kind, input2.variant);
|
|
339849
|
-
if (existing) {
|
|
339850
|
-
return toSectionFailure2("NO_OP", "sections.setLinkToPrevious already has an explicit reference.");
|
|
339851
|
-
}
|
|
339852
|
-
const previous5 = sections.find((entry) => entry.range.sectionIndex === projection.range.sectionIndex - 1);
|
|
339853
|
-
if (!previous5) {
|
|
339854
|
-
return toSectionFailure2("INVALID_TARGET", "sections.setLinkToPrevious requires a previous section.");
|
|
339855
|
-
}
|
|
339856
|
-
const previousSectPr = readTargetSectPr2(editor, previous5);
|
|
339857
|
-
if (!previousSectPr) {
|
|
339858
|
-
return toSectionFailure2("INVALID_TARGET", "Previous section has no reference to inherit.");
|
|
339859
|
-
}
|
|
339860
|
-
const refs = readSectPrHeaderFooterRefs2(previousSectPr, input2.kind);
|
|
339861
|
-
const inheritedRef = refs?.[input2.variant] ?? refs?.default;
|
|
339862
|
-
if (dryRun) {
|
|
339863
|
-
setSectPrHeaderFooterRef2(sectPr, input2.kind, input2.variant, "(dry-run)");
|
|
339864
|
-
return;
|
|
339865
|
-
}
|
|
339866
|
-
const explicitRefId = createExplicitHeaderFooterReference2(editor, {
|
|
339867
|
-
kind: input2.kind,
|
|
339868
|
-
variant: input2.variant,
|
|
339869
|
-
sourceRefId: inheritedRef
|
|
339870
|
-
});
|
|
339871
|
-
if (!explicitRefId) {
|
|
339872
|
-
return toSectionFailure2("CAPABILITY_UNAVAILABLE", "sections.setLinkToPrevious could not allocate an explicit header/footer reference for this section.");
|
|
339873
|
-
}
|
|
339874
|
-
setSectPrHeaderFooterRef2(sectPr, input2.kind, input2.variant, explicitRefId);
|
|
341633
|
+
return setLinkedToPreviousMutation2(sectPr, projection, sections, input2.kind, input2.variant, input2.linked, editor, dryRun, "sections.setLinkToPrevious");
|
|
339875
341634
|
});
|
|
339876
341635
|
}
|
|
339877
341636
|
function sectionsSetPageBordersAdapter2(editor, input2, options) {
|
|
@@ -339892,7 +341651,7 @@ var init_sections_adapter = __esm(() => {
|
|
|
339892
341651
|
init_mutation_helpers();
|
|
339893
341652
|
init_out_of_band_mutation();
|
|
339894
341653
|
init_sections_resolver();
|
|
339895
|
-
|
|
341654
|
+
init_header_footer_refs_mutation();
|
|
339896
341655
|
init_sections_xml();
|
|
339897
341656
|
});
|
|
339898
341657
|
|
|
@@ -343843,6 +345602,492 @@ var init_content_controls_wrappers = __esm(() => {
|
|
|
343843
345602
|
};
|
|
343844
345603
|
});
|
|
343845
345604
|
|
|
345605
|
+
// ../../packages/super-editor/src/document-api-adapters/helpers/section-mutation-wrapper.ts
|
|
345606
|
+
function toSectionFailure3(code10, message) {
|
|
345607
|
+
return { success: false, failure: { code: code10, message } };
|
|
345608
|
+
}
|
|
345609
|
+
function toSectionSuccess3(section) {
|
|
345610
|
+
return { success: true, section };
|
|
345611
|
+
}
|
|
345612
|
+
function buildSectionMarginsForAttrs3(sectPr) {
|
|
345613
|
+
const margins = readSectPrMargins2(sectPr);
|
|
345614
|
+
return {
|
|
345615
|
+
top: margins.top ?? null,
|
|
345616
|
+
right: margins.right ?? null,
|
|
345617
|
+
bottom: margins.bottom ?? null,
|
|
345618
|
+
left: margins.left ?? null,
|
|
345619
|
+
header: margins.header ?? null,
|
|
345620
|
+
footer: margins.footer ?? null
|
|
345621
|
+
};
|
|
345622
|
+
}
|
|
345623
|
+
function syncConverterBodySection3(editor, sectPr) {
|
|
345624
|
+
const converter = getConverter5(editor);
|
|
345625
|
+
if (!converter)
|
|
345626
|
+
return;
|
|
345627
|
+
converter.bodySectPr = cloneXmlElement2(sectPr);
|
|
345628
|
+
const savedBodyNode = converter.savedTagsToRestore?.find((entry) => entry?.name === "w:body");
|
|
345629
|
+
if (savedBodyNode && Array.isArray(savedBodyNode.elements)) {
|
|
345630
|
+
const preservedChildren = savedBodyNode.elements.filter((entry) => entry?.name !== "w:sectPr");
|
|
345631
|
+
preservedChildren.push(cloneXmlElement2(sectPr));
|
|
345632
|
+
savedBodyNode.elements = preservedChildren;
|
|
345633
|
+
}
|
|
345634
|
+
const margins = readSectPrMargins2(sectPr);
|
|
345635
|
+
const pageSetup = readSectPrPageSetup2(sectPr);
|
|
345636
|
+
if (!converter.pageStyles)
|
|
345637
|
+
converter.pageStyles = {};
|
|
345638
|
+
if (!converter.pageStyles.pageSize)
|
|
345639
|
+
converter.pageStyles.pageSize = {};
|
|
345640
|
+
if (pageSetup?.width !== undefined)
|
|
345641
|
+
converter.pageStyles.pageSize.width = pageSetup.width;
|
|
345642
|
+
if (pageSetup?.height !== undefined)
|
|
345643
|
+
converter.pageStyles.pageSize.height = pageSetup.height;
|
|
345644
|
+
if (!converter.pageStyles.pageMargins)
|
|
345645
|
+
converter.pageStyles.pageMargins = {};
|
|
345646
|
+
const pageMargins = converter.pageStyles.pageMargins;
|
|
345647
|
+
if (margins.top !== undefined)
|
|
345648
|
+
pageMargins.top = margins.top;
|
|
345649
|
+
if (margins.right !== undefined)
|
|
345650
|
+
pageMargins.right = margins.right;
|
|
345651
|
+
if (margins.bottom !== undefined)
|
|
345652
|
+
pageMargins.bottom = margins.bottom;
|
|
345653
|
+
if (margins.left !== undefined)
|
|
345654
|
+
pageMargins.left = margins.left;
|
|
345655
|
+
if (margins.header !== undefined)
|
|
345656
|
+
pageMargins.header = margins.header;
|
|
345657
|
+
if (margins.footer !== undefined)
|
|
345658
|
+
pageMargins.footer = margins.footer;
|
|
345659
|
+
if (margins.gutter !== undefined)
|
|
345660
|
+
pageMargins.gutter = margins.gutter;
|
|
345661
|
+
}
|
|
345662
|
+
function getConverter5(editor) {
|
|
345663
|
+
return editor.converter;
|
|
345664
|
+
}
|
|
345665
|
+
function applySectPrToProjection3(editor, projection, sectPr) {
|
|
345666
|
+
if (projection.target.kind === "paragraph") {
|
|
345667
|
+
const paragraph3 = projection.target.node;
|
|
345668
|
+
const attrs = paragraph3.attrs ?? {};
|
|
345669
|
+
const paragraphProperties = {
|
|
345670
|
+
...attrs.paragraphProperties ?? {},
|
|
345671
|
+
sectPr
|
|
345672
|
+
};
|
|
345673
|
+
const nextAttrs = {
|
|
345674
|
+
...attrs,
|
|
345675
|
+
paragraphProperties,
|
|
345676
|
+
pageBreakSource: "sectPr",
|
|
345677
|
+
sectionMargins: buildSectionMarginsForAttrs3(sectPr)
|
|
345678
|
+
};
|
|
345679
|
+
const tr2 = applyDirectMutationMeta2(editor.state.tr);
|
|
345680
|
+
tr2.setNodeMarkup(projection.target.pos, undefined, nextAttrs, paragraph3.marks);
|
|
345681
|
+
tr2.setMeta("forceUpdatePagination", true);
|
|
345682
|
+
editor.dispatch(tr2);
|
|
345683
|
+
return;
|
|
345684
|
+
}
|
|
345685
|
+
const docAttrs = editor.state.doc.attrs ?? {};
|
|
345686
|
+
const tr = applyDirectMutationMeta2(editor.state.tr);
|
|
345687
|
+
tr.setNodeMarkup(0, undefined, { ...docAttrs, bodySectPr: sectPr });
|
|
345688
|
+
tr.setMeta("forceUpdatePagination", true);
|
|
345689
|
+
editor.dispatch(tr);
|
|
345690
|
+
syncConverterBodySection3(editor, sectPr);
|
|
345691
|
+
}
|
|
345692
|
+
function sectionMutationBySectPr3(editor, input2, options, operationName, mutate) {
|
|
345693
|
+
rejectTrackedMode2(operationName, options);
|
|
345694
|
+
checkRevision2(editor, options?.expectedRevision);
|
|
345695
|
+
const sections = resolveSectionProjections2(editor);
|
|
345696
|
+
const projection = sections.find((entry) => entry.sectionId === input2.target.sectionId);
|
|
345697
|
+
if (!projection) {
|
|
345698
|
+
throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", "Section target was not found.", { target: input2.target });
|
|
345699
|
+
}
|
|
345700
|
+
const dryRun = options?.dryRun === true;
|
|
345701
|
+
const currentSectPr = readTargetSectPr2(editor, projection);
|
|
345702
|
+
const nextSectPr = ensureSectPrElement2(currentSectPr);
|
|
345703
|
+
const before = JSON.stringify(nextSectPr);
|
|
345704
|
+
const earlyResult = mutate(nextSectPr, projection, sections, dryRun);
|
|
345705
|
+
if (earlyResult)
|
|
345706
|
+
return earlyResult;
|
|
345707
|
+
const changed = before !== JSON.stringify(nextSectPr);
|
|
345708
|
+
if (!changed) {
|
|
345709
|
+
return toSectionFailure3("NO_OP", `${operationName} did not produce a section change.`);
|
|
345710
|
+
}
|
|
345711
|
+
if (options?.dryRun) {
|
|
345712
|
+
return toSectionSuccess3(projection.address);
|
|
345713
|
+
}
|
|
345714
|
+
applySectPrToProjection3(editor, projection, nextSectPr);
|
|
345715
|
+
clearIndexCache2(editor);
|
|
345716
|
+
return toSectionSuccess3(projection.address);
|
|
345717
|
+
}
|
|
345718
|
+
var init_section_mutation_wrapper = __esm(() => {
|
|
345719
|
+
init_errors3();
|
|
345720
|
+
init_revision_tracker();
|
|
345721
|
+
init_index_cache();
|
|
345722
|
+
init_mutation_helpers();
|
|
345723
|
+
init_sections_resolver();
|
|
345724
|
+
init_sections_xml();
|
|
345725
|
+
init_section_projection_access();
|
|
345726
|
+
});
|
|
345727
|
+
|
|
345728
|
+
// ../../packages/super-editor/src/document-api-adapters/header-footers-adapter.ts
|
|
345729
|
+
function getConverter6(editor) {
|
|
345730
|
+
return editor.converter;
|
|
345731
|
+
}
|
|
345732
|
+
function requireConverter2(editor, operationName) {
|
|
345733
|
+
const converter = getConverter6(editor);
|
|
345734
|
+
if (!converter) {
|
|
345735
|
+
throw new DocumentApiAdapterError3("CAPABILITY_UNAVAILABLE", `${operationName} requires an active document converter.`);
|
|
345736
|
+
}
|
|
345737
|
+
return converter;
|
|
345738
|
+
}
|
|
345739
|
+
function effectiveLimitOf2(limit, total) {
|
|
345740
|
+
return limit ?? total;
|
|
345741
|
+
}
|
|
345742
|
+
function buildSlotEntries2(editor, sections, kindFilter, sectionFilter) {
|
|
345743
|
+
const entries = [];
|
|
345744
|
+
for (const projection of sections) {
|
|
345745
|
+
if (sectionFilter && projection.sectionId !== sectionFilter.sectionId)
|
|
345746
|
+
continue;
|
|
345747
|
+
const sectPr = readTargetSectPr2(editor, projection);
|
|
345748
|
+
const kinds = kindFilter ? [kindFilter] : KIND_ORDER2;
|
|
345749
|
+
for (const kind of kinds) {
|
|
345750
|
+
const refs = sectPr ? readSectPrHeaderFooterRefs2(sectPr, kind) : undefined;
|
|
345751
|
+
for (const variant of VARIANT_ORDER2) {
|
|
345752
|
+
const refId = refs?.[variant] ?? null;
|
|
345753
|
+
entries.push({
|
|
345754
|
+
section: projection.address,
|
|
345755
|
+
sectionIndex: projection.range.sectionIndex,
|
|
345756
|
+
kind,
|
|
345757
|
+
variant,
|
|
345758
|
+
refId,
|
|
345759
|
+
isExplicit: refId !== null
|
|
345760
|
+
});
|
|
345761
|
+
}
|
|
345762
|
+
}
|
|
345763
|
+
}
|
|
345764
|
+
return entries;
|
|
345765
|
+
}
|
|
345766
|
+
function headerFootersListAdapter2(editor, query2) {
|
|
345767
|
+
validatePaginationInput2(query2?.offset, query2?.limit);
|
|
345768
|
+
const sections = resolveSectionProjections2(editor);
|
|
345769
|
+
const allEntries = buildSlotEntries2(editor, sections, query2?.kind, query2?.section);
|
|
345770
|
+
const offset2 = query2?.offset ?? 0;
|
|
345771
|
+
const effectiveLimit = effectiveLimitOf2(query2?.limit, allEntries.length);
|
|
345772
|
+
const { total, items: paged } = paginate2(allEntries, offset2, effectiveLimit);
|
|
345773
|
+
const evaluatedRevision = getRevision2(editor);
|
|
345774
|
+
const items = paged.map((entry) => {
|
|
345775
|
+
const id2 = `slot:${entry.section.sectionId}:${entry.kind}:${entry.variant}`;
|
|
345776
|
+
const handle4 = buildResolvedHandle(id2, "ephemeral", "ext:headerFooterSlot");
|
|
345777
|
+
return buildDiscoveryItem(id2, handle4, entry);
|
|
345778
|
+
});
|
|
345779
|
+
return buildDiscoveryResult({
|
|
345780
|
+
evaluatedRevision,
|
|
345781
|
+
total,
|
|
345782
|
+
items,
|
|
345783
|
+
page: { limit: effectiveLimit, offset: offset2, returned: items.length }
|
|
345784
|
+
});
|
|
345785
|
+
}
|
|
345786
|
+
function headerFootersGetAdapter2(editor, input2) {
|
|
345787
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
345788
|
+
const sections = resolveSectionProjections2(editor);
|
|
345789
|
+
const projection = sections.find((s2) => s2.sectionId === section.sectionId);
|
|
345790
|
+
if (!projection) {
|
|
345791
|
+
throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", "Section target was not found.", { target: section });
|
|
345792
|
+
}
|
|
345793
|
+
const sectPr = readTargetSectPr2(editor, projection);
|
|
345794
|
+
const refs = sectPr ? readSectPrHeaderFooterRefs2(sectPr, headerFooterKind) : undefined;
|
|
345795
|
+
const refId = refs?.[variant] ?? null;
|
|
345796
|
+
return {
|
|
345797
|
+
section: projection.address,
|
|
345798
|
+
sectionIndex: projection.range.sectionIndex,
|
|
345799
|
+
kind: headerFooterKind,
|
|
345800
|
+
variant,
|
|
345801
|
+
refId,
|
|
345802
|
+
isExplicit: refId !== null
|
|
345803
|
+
};
|
|
345804
|
+
}
|
|
345805
|
+
function headerFootersResolveAdapter2(editor, input2) {
|
|
345806
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
345807
|
+
const sections = resolveSectionProjections2(editor);
|
|
345808
|
+
const projection = sections.find((s2) => s2.sectionId === section.sectionId);
|
|
345809
|
+
if (!projection) {
|
|
345810
|
+
throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", "Section target was not found.", { target: section });
|
|
345811
|
+
}
|
|
345812
|
+
const sectPr = readTargetSectPr2(editor, projection);
|
|
345813
|
+
if (sectPr) {
|
|
345814
|
+
const refs = readSectPrHeaderFooterRefs2(sectPr, headerFooterKind);
|
|
345815
|
+
if (refs?.[variant]) {
|
|
345816
|
+
return { status: "explicit", refId: refs[variant], section: projection.address };
|
|
345817
|
+
}
|
|
345818
|
+
}
|
|
345819
|
+
const resolved = resolveEffectiveRef2(editor, sections, projection.range.sectionIndex, headerFooterKind, variant);
|
|
345820
|
+
if (resolved) {
|
|
345821
|
+
return {
|
|
345822
|
+
status: "inherited",
|
|
345823
|
+
refId: resolved.refId,
|
|
345824
|
+
resolvedFromSection: resolved.resolvedFromSection,
|
|
345825
|
+
resolvedVariant: resolved.resolvedVariant
|
|
345826
|
+
};
|
|
345827
|
+
}
|
|
345828
|
+
return { status: "none" };
|
|
345829
|
+
}
|
|
345830
|
+
function headerFootersRefsSetAdapter2(editor, input2, options) {
|
|
345831
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
345832
|
+
const sectionTarget = { target: section };
|
|
345833
|
+
return sectionMutationBySectPr3(editor, sectionTarget, options, "headerFooters.refs.set", (sectPr, _projection, _sections, dryRun) => {
|
|
345834
|
+
const converter = getConverter6(editor) ?? null;
|
|
345835
|
+
return setHeaderFooterRefMutation2(sectPr, headerFooterKind, variant, input2.refId, converter, "headerFooters.refs.set", dryRun);
|
|
345836
|
+
});
|
|
345837
|
+
}
|
|
345838
|
+
function headerFootersRefsClearAdapter2(editor, input2, options) {
|
|
345839
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
345840
|
+
const sectionTarget = { target: section };
|
|
345841
|
+
return sectionMutationBySectPr3(editor, sectionTarget, options, "headerFooters.refs.clear", (sectPr, _projection, _sections, dryRun) => {
|
|
345842
|
+
const converter = getConverter6(editor) ?? null;
|
|
345843
|
+
clearHeaderFooterRefMutation2(sectPr, headerFooterKind, variant, converter, dryRun);
|
|
345844
|
+
});
|
|
345845
|
+
}
|
|
345846
|
+
function headerFootersRefsSetLinkedToPreviousAdapter2(editor, input2, options) {
|
|
345847
|
+
const { section, headerFooterKind, variant } = input2.target;
|
|
345848
|
+
const sectionTarget = { target: section };
|
|
345849
|
+
return sectionMutationBySectPr3(editor, sectionTarget, options, "headerFooters.refs.setLinkedToPrevious", (sectPr, projection, sections, dryRun) => {
|
|
345850
|
+
return setLinkedToPreviousMutation2(sectPr, projection, sections, headerFooterKind, variant, input2.linked, editor, dryRun, "headerFooters.refs.setLinkedToPrevious");
|
|
345851
|
+
});
|
|
345852
|
+
}
|
|
345853
|
+
function kindFromRelationshipType2(type) {
|
|
345854
|
+
if (type === HEADER_RELATIONSHIP_TYPE5)
|
|
345855
|
+
return "header";
|
|
345856
|
+
if (type === FOOTER_RELATIONSHIP_TYPE5)
|
|
345857
|
+
return "footer";
|
|
345858
|
+
return null;
|
|
345859
|
+
}
|
|
345860
|
+
function normalizeTarget2(target) {
|
|
345861
|
+
let normalized = target.replace(/^\.\//, "");
|
|
345862
|
+
if (normalized.startsWith("../"))
|
|
345863
|
+
normalized = normalized.slice(3);
|
|
345864
|
+
if (normalized.startsWith("/"))
|
|
345865
|
+
normalized = normalized.slice(1);
|
|
345866
|
+
if (!normalized.startsWith("word/"))
|
|
345867
|
+
normalized = `word/${normalized}`;
|
|
345868
|
+
return normalized;
|
|
345869
|
+
}
|
|
345870
|
+
function readRelationshipElements2(converter) {
|
|
345871
|
+
const relsPart = converter.convertedXml?.[DOCUMENT_RELS_PATH3];
|
|
345872
|
+
if (!relsPart?.elements)
|
|
345873
|
+
return [];
|
|
345874
|
+
const root4 = relsPart.elements.find((e) => e.name === "Relationships");
|
|
345875
|
+
if (!root4?.elements)
|
|
345876
|
+
return [];
|
|
345877
|
+
return root4.elements.filter((e) => e.name === "Relationship");
|
|
345878
|
+
}
|
|
345879
|
+
function extractPartIndex2(kind, partPath) {
|
|
345880
|
+
const pattern = kind === "header" ? HEADER_FILE_PATTERN3 : FOOTER_FILE_PATTERN3;
|
|
345881
|
+
const match2 = partPath.match(pattern);
|
|
345882
|
+
if (!match2)
|
|
345883
|
+
return null;
|
|
345884
|
+
const num = Number(match2[1]);
|
|
345885
|
+
return Number.isFinite(num) ? num : null;
|
|
345886
|
+
}
|
|
345887
|
+
function headerFootersPartsListAdapter2(editor, query2) {
|
|
345888
|
+
const converter = requireConverter2(editor, "headerFooters.parts.list");
|
|
345889
|
+
validatePaginationInput2(query2?.offset, query2?.limit);
|
|
345890
|
+
const relationships = readRelationshipElements2(converter);
|
|
345891
|
+
const sections = resolveSectionProjections2(editor);
|
|
345892
|
+
const refToSections = new Map;
|
|
345893
|
+
for (const projection of sections) {
|
|
345894
|
+
const sectPr = readTargetSectPr2(editor, projection);
|
|
345895
|
+
if (!sectPr)
|
|
345896
|
+
continue;
|
|
345897
|
+
for (const kind of KIND_ORDER2) {
|
|
345898
|
+
const refs = readSectPrHeaderFooterRefs2(sectPr, kind);
|
|
345899
|
+
if (!refs)
|
|
345900
|
+
continue;
|
|
345901
|
+
for (const variant of VARIANT_ORDER2) {
|
|
345902
|
+
const refId = refs[variant];
|
|
345903
|
+
if (!refId)
|
|
345904
|
+
continue;
|
|
345905
|
+
if (!refToSections.has(refId))
|
|
345906
|
+
refToSections.set(refId, []);
|
|
345907
|
+
if (!refToSections.get(refId).some((a2) => a2.sectionId === projection.sectionId)) {
|
|
345908
|
+
refToSections.get(refId).push(projection.address);
|
|
345909
|
+
}
|
|
345910
|
+
}
|
|
345911
|
+
}
|
|
345912
|
+
}
|
|
345913
|
+
const allEntries = [];
|
|
345914
|
+
for (const rel of relationships) {
|
|
345915
|
+
const type = String(rel.attributes?.Type ?? "");
|
|
345916
|
+
const kind = kindFromRelationshipType2(type);
|
|
345917
|
+
if (!kind)
|
|
345918
|
+
continue;
|
|
345919
|
+
if (query2?.kind && kind !== query2.kind)
|
|
345920
|
+
continue;
|
|
345921
|
+
const refId = String(rel.attributes?.Id ?? "");
|
|
345922
|
+
const target = String(rel.attributes?.Target ?? "");
|
|
345923
|
+
const partPath = normalizeTarget2(target);
|
|
345924
|
+
allEntries.push({
|
|
345925
|
+
refId,
|
|
345926
|
+
kind,
|
|
345927
|
+
partPath,
|
|
345928
|
+
referencedBySections: refToSections.get(refId) ?? []
|
|
345929
|
+
});
|
|
345930
|
+
}
|
|
345931
|
+
allEntries.sort((a2, b2) => {
|
|
345932
|
+
const kindDiff = KIND_ORDER2.indexOf(a2.kind) - KIND_ORDER2.indexOf(b2.kind);
|
|
345933
|
+
if (kindDiff !== 0)
|
|
345934
|
+
return kindDiff;
|
|
345935
|
+
const indexA = extractPartIndex2(a2.kind, a2.partPath);
|
|
345936
|
+
const indexB = extractPartIndex2(b2.kind, b2.partPath);
|
|
345937
|
+
if (indexA !== null && indexB !== null)
|
|
345938
|
+
return indexA - indexB;
|
|
345939
|
+
if (indexA !== null)
|
|
345940
|
+
return -1;
|
|
345941
|
+
if (indexB !== null)
|
|
345942
|
+
return 1;
|
|
345943
|
+
const pathCmp = a2.partPath.localeCompare(b2.partPath);
|
|
345944
|
+
if (pathCmp !== 0)
|
|
345945
|
+
return pathCmp;
|
|
345946
|
+
return a2.refId.localeCompare(b2.refId);
|
|
345947
|
+
});
|
|
345948
|
+
const offset2 = query2?.offset ?? 0;
|
|
345949
|
+
const effectiveLimit = effectiveLimitOf2(query2?.limit, allEntries.length);
|
|
345950
|
+
const { total, items: paged } = paginate2(allEntries, offset2, effectiveLimit);
|
|
345951
|
+
const evaluatedRevision = getRevision2(editor);
|
|
345952
|
+
const items = paged.map((entry) => {
|
|
345953
|
+
const id2 = `part:${entry.refId}`;
|
|
345954
|
+
const handle4 = buildResolvedHandle(id2, "stable", "ext:headerFooterPart");
|
|
345955
|
+
return buildDiscoveryItem(id2, handle4, entry);
|
|
345956
|
+
});
|
|
345957
|
+
return buildDiscoveryResult({
|
|
345958
|
+
evaluatedRevision,
|
|
345959
|
+
total,
|
|
345960
|
+
items,
|
|
345961
|
+
page: { limit: effectiveLimit, offset: offset2, returned: items.length }
|
|
345962
|
+
});
|
|
345963
|
+
}
|
|
345964
|
+
function toPartsMutationFailure2(code10, message) {
|
|
345965
|
+
return { success: false, failure: { code: code10, message } };
|
|
345966
|
+
}
|
|
345967
|
+
function headerFootersPartsCreateAdapter2(editor, input2, options) {
|
|
345968
|
+
rejectTrackedMode2("headerFooters.parts.create", options);
|
|
345969
|
+
checkRevision2(editor, options?.expectedRevision);
|
|
345970
|
+
const converter = requireConverter2(editor, "headerFooters.parts.create");
|
|
345971
|
+
if (input2.sourceRefId) {
|
|
345972
|
+
const relationships = readRelationshipElements2(converter);
|
|
345973
|
+
const sourceRel = relationships.find((rel) => String(rel.attributes?.Id ?? "") === input2.sourceRefId);
|
|
345974
|
+
if (!sourceRel) {
|
|
345975
|
+
return toPartsMutationFailure2("INVALID_TARGET", `sourceRefId '${input2.sourceRefId}' does not reference an existing header/footer relationship`);
|
|
345976
|
+
}
|
|
345977
|
+
const sourceType = String(sourceRel.attributes?.Type ?? "");
|
|
345978
|
+
const sourceKind = kindFromRelationshipType2(sourceType);
|
|
345979
|
+
if (sourceKind !== input2.kind) {
|
|
345980
|
+
return toPartsMutationFailure2("INVALID_TARGET", `sourceRefId '${input2.sourceRefId}' is a ${sourceKind ?? "unknown"}, not a ${input2.kind}`);
|
|
345981
|
+
}
|
|
345982
|
+
}
|
|
345983
|
+
if (options?.dryRun) {
|
|
345984
|
+
return { success: true, refId: "(dry-run)", partPath: `word/${input2.kind}(dry-run).xml` };
|
|
345985
|
+
}
|
|
345986
|
+
try {
|
|
345987
|
+
const result = createHeaderFooterPart2(converter, {
|
|
345988
|
+
kind: input2.kind,
|
|
345989
|
+
variant: "default",
|
|
345990
|
+
sourceRefId: input2.sourceRefId
|
|
345991
|
+
});
|
|
345992
|
+
return { success: true, refId: result.refId, partPath: result.relationshipTarget };
|
|
345993
|
+
} catch (err) {
|
|
345994
|
+
throw new DocumentApiAdapterError3("INTERNAL_ERROR", `headerFooters.parts.create failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
345995
|
+
}
|
|
345996
|
+
}
|
|
345997
|
+
function headerFootersPartsDeleteAdapter2(editor, input2, options) {
|
|
345998
|
+
rejectTrackedMode2("headerFooters.parts.delete", options);
|
|
345999
|
+
checkRevision2(editor, options?.expectedRevision);
|
|
346000
|
+
const converter = requireConverter2(editor, "headerFooters.parts.delete");
|
|
346001
|
+
const refId = input2.target.refId;
|
|
346002
|
+
const relationships = readRelationshipElements2(converter);
|
|
346003
|
+
const targetRel = relationships.find((rel) => String(rel.attributes?.Id ?? "") === refId);
|
|
346004
|
+
if (!targetRel) {
|
|
346005
|
+
throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", `refId '${refId}' not found in document relationships.`);
|
|
346006
|
+
}
|
|
346007
|
+
const relType = String(targetRel.attributes?.Type ?? "");
|
|
346008
|
+
const kind = kindFromRelationshipType2(relType);
|
|
346009
|
+
if (!kind) {
|
|
346010
|
+
throw new DocumentApiAdapterError3("TARGET_NOT_FOUND", `refId '${refId}' is not a header/footer relationship.`);
|
|
346011
|
+
}
|
|
346012
|
+
const sections = resolveSectionProjections2(editor);
|
|
346013
|
+
const referencingSections = [];
|
|
346014
|
+
for (const projection of sections) {
|
|
346015
|
+
const sectPr = readTargetSectPr2(editor, projection);
|
|
346016
|
+
if (!sectPr)
|
|
346017
|
+
continue;
|
|
346018
|
+
const refs = readSectPrHeaderFooterRefs2(sectPr, kind);
|
|
346019
|
+
if (!refs)
|
|
346020
|
+
continue;
|
|
346021
|
+
for (const variant of VARIANT_ORDER2) {
|
|
346022
|
+
if (refs[variant] === refId) {
|
|
346023
|
+
referencingSections.push(projection.address);
|
|
346024
|
+
break;
|
|
346025
|
+
}
|
|
346026
|
+
}
|
|
346027
|
+
}
|
|
346028
|
+
if (referencingSections.length > 0) {
|
|
346029
|
+
const sectionIds = referencingSections.map((s2) => s2.sectionId).join(", ");
|
|
346030
|
+
return toPartsMutationFailure2("INVALID_TARGET", `Cannot delete part '${refId}': still referenced by sections [${sectionIds}].`);
|
|
346031
|
+
}
|
|
346032
|
+
const target = String(targetRel.attributes?.Target ?? "");
|
|
346033
|
+
const partPath = normalizeTarget2(target);
|
|
346034
|
+
if (options?.dryRun) {
|
|
346035
|
+
return { success: true, refId, partPath };
|
|
346036
|
+
}
|
|
346037
|
+
const convertedXml = converter.convertedXml ?? {};
|
|
346038
|
+
const relsPart = convertedXml[DOCUMENT_RELS_PATH3];
|
|
346039
|
+
if (relsPart?.elements) {
|
|
346040
|
+
const root4 = relsPart.elements.find((e) => e.name === "Relationships");
|
|
346041
|
+
if (root4?.elements) {
|
|
346042
|
+
root4.elements = root4.elements.filter((e) => !(e.name === "Relationship" && String(e.attributes?.Id ?? "") === refId));
|
|
346043
|
+
}
|
|
346044
|
+
}
|
|
346045
|
+
delete convertedXml[partPath];
|
|
346046
|
+
const partFileName = partPath.split("/").pop();
|
|
346047
|
+
if (partFileName) {
|
|
346048
|
+
delete convertedXml[`word/_rels/${partFileName}.rels`];
|
|
346049
|
+
}
|
|
346050
|
+
const collection = kind === "header" ? converter.headers : converter.footers;
|
|
346051
|
+
if (collection && typeof collection === "object") {
|
|
346052
|
+
delete collection[refId];
|
|
346053
|
+
}
|
|
346054
|
+
const variantIds = kind === "header" ? converter.headerIds : converter.footerIds;
|
|
346055
|
+
if (variantIds && Array.isArray(variantIds.ids)) {
|
|
346056
|
+
const idx = variantIds.ids.indexOf(refId);
|
|
346057
|
+
if (idx !== -1)
|
|
346058
|
+
variantIds.ids.splice(idx, 1);
|
|
346059
|
+
}
|
|
346060
|
+
if (variantIds) {
|
|
346061
|
+
const namedKeys = ["default", "first", "even", "odd"];
|
|
346062
|
+
for (const key3 of namedKeys) {
|
|
346063
|
+
if (variantIds[key3] === refId) {
|
|
346064
|
+
variantIds[key3] = null;
|
|
346065
|
+
}
|
|
346066
|
+
}
|
|
346067
|
+
}
|
|
346068
|
+
converter.headerFooterModified = true;
|
|
346069
|
+
converter.documentModified = true;
|
|
346070
|
+
return { success: true, refId, partPath };
|
|
346071
|
+
}
|
|
346072
|
+
var VARIANT_ORDER2, KIND_ORDER2, HEADER_RELATIONSHIP_TYPE5 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE5 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH3 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN3, FOOTER_FILE_PATTERN3;
|
|
346073
|
+
var init_header_footers_adapter = __esm(() => {
|
|
346074
|
+
init_src();
|
|
346075
|
+
init_errors3();
|
|
346076
|
+
init_revision_tracker();
|
|
346077
|
+
init_sections_resolver();
|
|
346078
|
+
init_section_projection_access();
|
|
346079
|
+
init_sections_xml();
|
|
346080
|
+
init_adapter_utils();
|
|
346081
|
+
init_section_mutation_wrapper();
|
|
346082
|
+
init_header_footer_refs_mutation();
|
|
346083
|
+
init_header_footer_parts();
|
|
346084
|
+
init_mutation_helpers();
|
|
346085
|
+
VARIANT_ORDER2 = ["default", "first", "even"];
|
|
346086
|
+
KIND_ORDER2 = ["header", "footer"];
|
|
346087
|
+
HEADER_FILE_PATTERN3 = /header(\d+)\.xml$/;
|
|
346088
|
+
FOOTER_FILE_PATTERN3 = /footer(\d+)\.xml$/;
|
|
346089
|
+
});
|
|
346090
|
+
|
|
343846
346091
|
// ../../packages/super-editor/src/document-api-adapters/helpers/bookmark-resolver.ts
|
|
343847
346092
|
function findAllBookmarks2(doc4) {
|
|
343848
346093
|
const results = [];
|
|
@@ -347031,6 +349276,21 @@ function assembleDocumentApiAdapters2(editor) {
|
|
|
347031
349276
|
patch: (input2, options) => hyperlinksPatchWrapper2(editor, input2, options),
|
|
347032
349277
|
remove: (input2, options) => hyperlinksRemoveWrapper2(editor, input2, options)
|
|
347033
349278
|
},
|
|
349279
|
+
headerFooters: {
|
|
349280
|
+
list: (query2) => headerFootersListAdapter2(editor, query2),
|
|
349281
|
+
get: (input2) => headerFootersGetAdapter2(editor, input2),
|
|
349282
|
+
resolve: (input2) => headerFootersResolveAdapter2(editor, input2),
|
|
349283
|
+
refs: {
|
|
349284
|
+
set: (input2, options) => headerFootersRefsSetAdapter2(editor, input2, options),
|
|
349285
|
+
clear: (input2, options) => headerFootersRefsClearAdapter2(editor, input2, options),
|
|
349286
|
+
setLinkedToPrevious: (input2, options) => headerFootersRefsSetLinkedToPreviousAdapter2(editor, input2, options)
|
|
349287
|
+
},
|
|
349288
|
+
parts: {
|
|
349289
|
+
list: (query2) => headerFootersPartsListAdapter2(editor, query2),
|
|
349290
|
+
create: (input2, options) => headerFootersPartsCreateAdapter2(editor, input2, options),
|
|
349291
|
+
delete: (input2, options) => headerFootersPartsDeleteAdapter2(editor, input2, options)
|
|
349292
|
+
}
|
|
349293
|
+
},
|
|
347034
349294
|
contentControls: ccAdapter,
|
|
347035
349295
|
bookmarks: {
|
|
347036
349296
|
list: (query2) => bookmarksListWrapper2(editor, query2),
|
|
@@ -347163,6 +349423,7 @@ var init_assemble_adapters = __esm(() => {
|
|
|
347163
349423
|
init_images_wrappers();
|
|
347164
349424
|
init_hyperlinks_wrappers();
|
|
347165
349425
|
init_content_controls_wrappers();
|
|
349426
|
+
init_header_footers_adapter();
|
|
347166
349427
|
init_bookmark_wrappers();
|
|
347167
349428
|
init_footnote_wrappers();
|
|
347168
349429
|
init_crossref_wrappers();
|