@superdoc/sdk 2.20.0-next.1 → 2.20.0-next.11

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.
@@ -3,6 +3,6 @@
3
3
  // AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
4
4
  // Source of truth: package.json. Regenerated on every SDK build so the
5
5
  // SDK retains its own version identity when bundled into another package.
6
- const SDK_VERSION = '2.20.0-next.1';
6
+ const SDK_VERSION = '2.20.0-next.11';
7
7
 
8
8
  exports.SDK_VERSION = SDK_VERSION;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.20.0-next.1";
1
+ export declare const SDK_VERSION = "2.20.0-next.11";
@@ -1,4 +1,4 @@
1
1
  // AUTO-GENERATED by scripts/embed-version.mjs — DO NOT EDIT.
2
2
  // Source of truth: package.json. Regenerated on every SDK build so the
3
3
  // SDK retains its own version identity when bundled into another package.
4
- export const SDK_VERSION = '2.20.0-next.1';
4
+ export const SDK_VERSION = '2.20.0-next.11';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc/sdk",
3
- "version": "2.20.0-next.1",
3
+ "version": "2.20.0-next.11",
4
4
  "description": "Node SDK for SuperDoc, wrapping the SuperDoc CLI to read and edit .docx files from JavaScript and TypeScript.",
5
5
  "private": false,
6
6
  "license": "AGPL-3.0",
@@ -38,11 +38,11 @@
38
38
  "typescript": "^5.9.2"
39
39
  },
40
40
  "optionalDependencies": {
41
- "@superdoc/sdk-darwin-arm64": "2.20.0-next.1",
42
- "@superdoc/sdk-darwin-x64": "2.20.0-next.1",
43
- "@superdoc/sdk-linux-x64": "2.20.0-next.1",
44
- "@superdoc/sdk-linux-arm64": "2.20.0-next.1",
45
- "@superdoc/sdk-windows-x64": "2.20.0-next.1"
41
+ "@superdoc/sdk-darwin-arm64": "2.20.0-next.11",
42
+ "@superdoc/sdk-darwin-x64": "2.20.0-next.11",
43
+ "@superdoc/sdk-linux-x64": "2.20.0-next.11",
44
+ "@superdoc/sdk-linux-arm64": "2.20.0-next.11",
45
+ "@superdoc/sdk-windows-x64": "2.20.0-next.11"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
@@ -8242,6 +8242,247 @@
8242
8242
  "args"
8243
8243
  ]
8244
8244
  },
8245
+ {
8246
+ "type": "object",
8247
+ "properties": {
8248
+ "id": {
8249
+ "type": "string"
8250
+ },
8251
+ "op": {
8252
+ "const": "structural.replace",
8253
+ "type": "string"
8254
+ },
8255
+ "where": {
8256
+ "oneOf": [
8257
+ {
8258
+ "type": "object",
8259
+ "properties": {
8260
+ "by": {
8261
+ "const": "select",
8262
+ "type": "string"
8263
+ },
8264
+ "select": {
8265
+ "oneOf": [
8266
+ {
8267
+ "type": "object",
8268
+ "properties": {
8269
+ "type": {
8270
+ "const": "text",
8271
+ "description": "Must be 'text' for text pattern search.",
8272
+ "type": "string"
8273
+ },
8274
+ "pattern": {
8275
+ "type": "string",
8276
+ "description": "Text to match. In regex mode, patterns are validated for syntax, maximum length, and safety before execution."
8277
+ },
8278
+ "mode": {
8279
+ "enum": [
8280
+ "contains",
8281
+ "regex"
8282
+ ],
8283
+ "description": "Match mode: 'contains' (literal substring, recommended for literal text) or 'regex' (validated regular expression)."
8284
+ },
8285
+ "caseSensitive": {
8286
+ "type": "boolean",
8287
+ "description": "Case-sensitive matching. Default: false."
8288
+ },
8289
+ "wholeWord": {
8290
+ "type": "boolean",
8291
+ "description": "Require word-boundary matches. Default: false."
8292
+ },
8293
+ "includeDeletedText": {
8294
+ "type": "boolean",
8295
+ "description": "When true, includes text from pending tracked deletions. Default: false."
8296
+ }
8297
+ },
8298
+ "additionalProperties": false,
8299
+ "required": [
8300
+ "type",
8301
+ "pattern"
8302
+ ]
8303
+ },
8304
+ {
8305
+ "type": "object",
8306
+ "properties": {
8307
+ "type": {
8308
+ "const": "node",
8309
+ "description": "Must be 'node' for node type search.",
8310
+ "type": "string"
8311
+ },
8312
+ "nodeType": {
8313
+ "enum": [
8314
+ "paragraph",
8315
+ "heading",
8316
+ "listItem",
8317
+ "table",
8318
+ "tableRow",
8319
+ "tableCell",
8320
+ "tableOfContents",
8321
+ "image",
8322
+ "sdt",
8323
+ "run",
8324
+ "bookmark",
8325
+ "comment",
8326
+ "hyperlink",
8327
+ "footnoteRef",
8328
+ "endnoteRef",
8329
+ "crossRef",
8330
+ "indexEntry",
8331
+ "citation",
8332
+ "authorityEntry",
8333
+ "sequenceField",
8334
+ "tab",
8335
+ "lineBreak"
8336
+ ],
8337
+ "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
8338
+ },
8339
+ "kind": {
8340
+ "enum": [
8341
+ "block",
8342
+ "inline"
8343
+ ],
8344
+ "description": "Filter: 'block' or 'inline'."
8345
+ }
8346
+ },
8347
+ "additionalProperties": false,
8348
+ "required": [
8349
+ "type"
8350
+ ]
8351
+ }
8352
+ ]
8353
+ },
8354
+ "within": {
8355
+ "$ref": "#/$defs/BlockNodeAddress"
8356
+ },
8357
+ "require": {
8358
+ "enum": [
8359
+ "first",
8360
+ "exactlyOne",
8361
+ "all"
8362
+ ]
8363
+ }
8364
+ },
8365
+ "additionalProperties": false,
8366
+ "required": [
8367
+ "by",
8368
+ "select",
8369
+ "require"
8370
+ ]
8371
+ },
8372
+ {
8373
+ "type": "object",
8374
+ "properties": {
8375
+ "by": {
8376
+ "const": "ref",
8377
+ "type": "string"
8378
+ },
8379
+ "ref": {
8380
+ "type": "string"
8381
+ },
8382
+ "within": {
8383
+ "$ref": "#/$defs/BlockNodeAddress"
8384
+ }
8385
+ },
8386
+ "additionalProperties": false,
8387
+ "required": [
8388
+ "by",
8389
+ "ref"
8390
+ ]
8391
+ },
8392
+ {
8393
+ "type": "object",
8394
+ "properties": {
8395
+ "by": {
8396
+ "const": "target",
8397
+ "type": "string"
8398
+ },
8399
+ "target": {
8400
+ "$ref": "#/$defs/SelectionTarget"
8401
+ }
8402
+ },
8403
+ "additionalProperties": false,
8404
+ "required": [
8405
+ "by",
8406
+ "target"
8407
+ ]
8408
+ },
8409
+ {
8410
+ "type": "object",
8411
+ "properties": {
8412
+ "by": {
8413
+ "const": "block",
8414
+ "type": "string"
8415
+ },
8416
+ "nodeType": {
8417
+ "enum": [
8418
+ "paragraph",
8419
+ "heading",
8420
+ "listItem",
8421
+ "table",
8422
+ "tableRow",
8423
+ "tableCell",
8424
+ "tableOfContents",
8425
+ "image",
8426
+ "sdt"
8427
+ ]
8428
+ },
8429
+ "nodeId": {
8430
+ "type": "string"
8431
+ }
8432
+ },
8433
+ "additionalProperties": false,
8434
+ "required": [
8435
+ "by",
8436
+ "nodeType",
8437
+ "nodeId"
8438
+ ]
8439
+ }
8440
+ ]
8441
+ },
8442
+ "args": {
8443
+ "type": "object",
8444
+ "properties": {
8445
+ "content": {
8446
+ "oneOf": [
8447
+ {
8448
+ "type": "object"
8449
+ },
8450
+ {
8451
+ "type": "array",
8452
+ "items": {
8453
+ "type": "object"
8454
+ }
8455
+ }
8456
+ ]
8457
+ },
8458
+ "nestingPolicy": {
8459
+ "type": "object",
8460
+ "properties": {
8461
+ "tables": {
8462
+ "enum": [
8463
+ "forbid",
8464
+ "allow"
8465
+ ]
8466
+ }
8467
+ },
8468
+ "additionalProperties": false,
8469
+ "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
8470
+ }
8471
+ },
8472
+ "additionalProperties": false,
8473
+ "required": [
8474
+ "content"
8475
+ ]
8476
+ }
8477
+ },
8478
+ "additionalProperties": false,
8479
+ "required": [
8480
+ "id",
8481
+ "op",
8482
+ "where",
8483
+ "args"
8484
+ ]
8485
+ },
8245
8486
  {
8246
8487
  "type": "object",
8247
8488
  "properties": {
@@ -8382,7 +8623,7 @@
8382
8623
  }
8383
8624
  ]
8384
8625
  },
8385
- "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
8626
+ "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, structural.replace, or assert) and a 'where' targeting clause. Check runtime capabilities for operation-specific content and targeting restrictions."
8386
8627
  },
8387
8628
  "detail": {
8388
8629
  "type": "object",
@@ -43,5 +43,5 @@
43
43
  "mutates": true
44
44
  }
45
45
  ],
46
- "contractHash": "39b9ad81b5595c5423c7886df202d1da3572fff74f92b97df580cf01d1cf3852"
46
+ "contractHash": "4f5951af40758476458733aaf3df7df46713d1c2c7fb935857c3196666bf9f95"
47
47
  }
@@ -7820,6 +7820,247 @@
7820
7820
  "args"
7821
7821
  ]
7822
7822
  },
7823
+ {
7824
+ "type": "object",
7825
+ "properties": {
7826
+ "id": {
7827
+ "type": "string"
7828
+ },
7829
+ "op": {
7830
+ "const": "structural.replace",
7831
+ "type": "string"
7832
+ },
7833
+ "where": {
7834
+ "oneOf": [
7835
+ {
7836
+ "type": "object",
7837
+ "properties": {
7838
+ "by": {
7839
+ "const": "select",
7840
+ "type": "string"
7841
+ },
7842
+ "select": {
7843
+ "oneOf": [
7844
+ {
7845
+ "type": "object",
7846
+ "properties": {
7847
+ "type": {
7848
+ "const": "text",
7849
+ "description": "Must be 'text' for text pattern search.",
7850
+ "type": "string"
7851
+ },
7852
+ "pattern": {
7853
+ "type": "string",
7854
+ "description": "Text to match. In regex mode, patterns are validated for syntax, maximum length, and safety before execution."
7855
+ },
7856
+ "mode": {
7857
+ "enum": [
7858
+ "contains",
7859
+ "regex"
7860
+ ],
7861
+ "description": "Match mode: 'contains' (literal substring, recommended for literal text) or 'regex' (validated regular expression)."
7862
+ },
7863
+ "caseSensitive": {
7864
+ "type": "boolean",
7865
+ "description": "Case-sensitive matching. Default: false."
7866
+ },
7867
+ "wholeWord": {
7868
+ "type": "boolean",
7869
+ "description": "Require word-boundary matches. Default: false."
7870
+ },
7871
+ "includeDeletedText": {
7872
+ "type": "boolean",
7873
+ "description": "When true, includes text from pending tracked deletions. Default: false."
7874
+ }
7875
+ },
7876
+ "additionalProperties": false,
7877
+ "required": [
7878
+ "type",
7879
+ "pattern"
7880
+ ]
7881
+ },
7882
+ {
7883
+ "type": "object",
7884
+ "properties": {
7885
+ "type": {
7886
+ "const": "node",
7887
+ "description": "Must be 'node' for node type search.",
7888
+ "type": "string"
7889
+ },
7890
+ "nodeType": {
7891
+ "enum": [
7892
+ "paragraph",
7893
+ "heading",
7894
+ "listItem",
7895
+ "table",
7896
+ "tableRow",
7897
+ "tableCell",
7898
+ "tableOfContents",
7899
+ "image",
7900
+ "sdt",
7901
+ "run",
7902
+ "bookmark",
7903
+ "comment",
7904
+ "hyperlink",
7905
+ "footnoteRef",
7906
+ "endnoteRef",
7907
+ "crossRef",
7908
+ "indexEntry",
7909
+ "citation",
7910
+ "authorityEntry",
7911
+ "sequenceField",
7912
+ "tab",
7913
+ "lineBreak"
7914
+ ],
7915
+ "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
7916
+ },
7917
+ "kind": {
7918
+ "enum": [
7919
+ "block",
7920
+ "inline"
7921
+ ],
7922
+ "description": "Filter: 'block' or 'inline'."
7923
+ }
7924
+ },
7925
+ "additionalProperties": false,
7926
+ "required": [
7927
+ "type"
7928
+ ]
7929
+ }
7930
+ ]
7931
+ },
7932
+ "within": {
7933
+ "$ref": "#/$defs/BlockNodeAddress"
7934
+ },
7935
+ "require": {
7936
+ "enum": [
7937
+ "first",
7938
+ "exactlyOne",
7939
+ "all"
7940
+ ]
7941
+ }
7942
+ },
7943
+ "additionalProperties": false,
7944
+ "required": [
7945
+ "by",
7946
+ "select",
7947
+ "require"
7948
+ ]
7949
+ },
7950
+ {
7951
+ "type": "object",
7952
+ "properties": {
7953
+ "by": {
7954
+ "const": "ref",
7955
+ "type": "string"
7956
+ },
7957
+ "ref": {
7958
+ "type": "string"
7959
+ },
7960
+ "within": {
7961
+ "$ref": "#/$defs/BlockNodeAddress"
7962
+ }
7963
+ },
7964
+ "additionalProperties": false,
7965
+ "required": [
7966
+ "by",
7967
+ "ref"
7968
+ ]
7969
+ },
7970
+ {
7971
+ "type": "object",
7972
+ "properties": {
7973
+ "by": {
7974
+ "const": "target",
7975
+ "type": "string"
7976
+ },
7977
+ "target": {
7978
+ "$ref": "#/$defs/SelectionTarget"
7979
+ }
7980
+ },
7981
+ "additionalProperties": false,
7982
+ "required": [
7983
+ "by",
7984
+ "target"
7985
+ ]
7986
+ },
7987
+ {
7988
+ "type": "object",
7989
+ "properties": {
7990
+ "by": {
7991
+ "const": "block",
7992
+ "type": "string"
7993
+ },
7994
+ "nodeType": {
7995
+ "enum": [
7996
+ "paragraph",
7997
+ "heading",
7998
+ "listItem",
7999
+ "table",
8000
+ "tableRow",
8001
+ "tableCell",
8002
+ "tableOfContents",
8003
+ "image",
8004
+ "sdt"
8005
+ ]
8006
+ },
8007
+ "nodeId": {
8008
+ "type": "string"
8009
+ }
8010
+ },
8011
+ "additionalProperties": false,
8012
+ "required": [
8013
+ "by",
8014
+ "nodeType",
8015
+ "nodeId"
8016
+ ]
8017
+ }
8018
+ ]
8019
+ },
8020
+ "args": {
8021
+ "type": "object",
8022
+ "properties": {
8023
+ "content": {
8024
+ "oneOf": [
8025
+ {
8026
+ "type": "object"
8027
+ },
8028
+ {
8029
+ "type": "array",
8030
+ "items": {
8031
+ "type": "object"
8032
+ }
8033
+ }
8034
+ ]
8035
+ },
8036
+ "nestingPolicy": {
8037
+ "type": "object",
8038
+ "properties": {
8039
+ "tables": {
8040
+ "enum": [
8041
+ "forbid",
8042
+ "allow"
8043
+ ]
8044
+ }
8045
+ },
8046
+ "additionalProperties": false,
8047
+ "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
8048
+ }
8049
+ },
8050
+ "additionalProperties": false,
8051
+ "required": [
8052
+ "content"
8053
+ ]
8054
+ }
8055
+ },
8056
+ "additionalProperties": false,
8057
+ "required": [
8058
+ "id",
8059
+ "op",
8060
+ "where",
8061
+ "args"
8062
+ ]
8063
+ },
7823
8064
  {
7824
8065
  "type": "object",
7825
8066
  "properties": {
@@ -7960,7 +8201,7 @@
7960
8201
  }
7961
8202
  ]
7962
8203
  },
7963
- "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
8204
+ "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, structural.replace, or assert) and a 'where' targeting clause. Check runtime capabilities for operation-specific content and targeting restrictions."
7964
8205
  },
7965
8206
  "detail": {
7966
8207
  "type": "object",