@superdoc-dev/cli 0.12.0-next.9 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1090 -52
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1489,7 +1489,7 @@ More content with **bold** and *italic*.`
1489
1489
  },
1490
1490
  comment: {
1491
1491
  toolName: "superdoc_comment",
1492
- description: "Manage document comment threads: create, read, update, and delete. " + 'To create a comment, first use superdoc_search to find the target text, then pass action "create" with the comment text and a target: {kind:"text", blockId:"<blockId>", range:{start:<N>, end:<N>}} using the blockId and highlightRange from the search result. ' + 'For threaded replies, pass "parentId" with the parent comment ID. ' + 'Action "list" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). ' + 'Action "get" retrieves a single comment by ID. Action "update" changes status to "resolved" or marks as internal. Action "delete" removes a comment or reply by ID. ' + 'Do NOT pass "ref", "id", or "parentId" when creating a new top-level comment; only "action", "text", and "target" are needed.',
1492
+ description: "Manage document comment threads: create, read, update, and delete. " + 'To create a comment, first use superdoc_search to find the target text, then pass action "create" with the comment text and a target built from items[0].blocks. For a single-block match use {kind:"text", blockId: items[0].blocks[0].blockId, range: items[0].blocks[0].range}. For a cross-block match use {kind:"text", segments: items[0].blocks.map(b => ({blockId: b.blockId, range: b.range}))}. Do NOT use items[0].highlightRange (snippet-relative, not block-relative) or items[0].target (a SelectionTarget, not accepted by comments.create). ' + 'For threaded replies, pass "parentId" with the parent comment ID. ' + 'Action "list" returns all comments with optional pagination (limit, offset) and filtering (includeResolved:true to include resolved). ' + 'Action "get" retrieves a single comment by ID. Action "update" changes status to "resolved" or marks as internal. Action "delete" removes a comment or reply by ID. ' + 'Do NOT pass "ref", "id", or "parentId" when creating a new top-level comment; only "action", "text", and "target" are needed.',
1493
1493
  inputExamples: [
1494
1494
  {
1495
1495
  action: "create",
@@ -43467,7 +43467,213 @@ var init_operation_hints = __esm(() => {
43467
43467
  "images.setZOrder": "set z-order",
43468
43468
  "diff.capture": "captured snapshot",
43469
43469
  "diff.compare": "compared documents",
43470
- "diff.apply": "applied diff"
43470
+ "diff.apply": "applied diff",
43471
+ "authorities.configure": "configured",
43472
+ "authorities.entries.get": "retrieved item",
43473
+ "authorities.entries.insert": "inserted item",
43474
+ "authorities.entries.list": "listed items",
43475
+ "authorities.entries.remove": "removed item",
43476
+ "authorities.entries.update": "updated item",
43477
+ "authorities.get": "retrieved item",
43478
+ "authorities.insert": "inserted item",
43479
+ "authorities.list": "listed items",
43480
+ "authorities.rebuild": "rebuilt",
43481
+ "authorities.remove": "removed item",
43482
+ "bookmarks.get": "retrieved item",
43483
+ "bookmarks.insert": "inserted item",
43484
+ "bookmarks.list": "listed items",
43485
+ "bookmarks.remove": "removed item",
43486
+ "bookmarks.rename": "renamed item",
43487
+ "captions.configure": "configured",
43488
+ "captions.get": "retrieved item",
43489
+ "captions.insert": "inserted item",
43490
+ "captions.list": "listed items",
43491
+ "captions.remove": "removed item",
43492
+ "captions.update": "updated item",
43493
+ "citations.bibliography.configure": "configured",
43494
+ "citations.bibliography.get": "retrieved item",
43495
+ "citations.bibliography.insert": "inserted item",
43496
+ "citations.bibliography.rebuild": "rebuilt",
43497
+ "citations.bibliography.remove": "removed item",
43498
+ "citations.get": "retrieved item",
43499
+ "citations.insert": "inserted item",
43500
+ "citations.list": "listed items",
43501
+ "citations.remove": "removed item",
43502
+ "citations.sources.get": "retrieved item",
43503
+ "citations.sources.insert": "inserted item",
43504
+ "citations.sources.list": "listed items",
43505
+ "citations.sources.remove": "removed item",
43506
+ "citations.sources.update": "updated item",
43507
+ "citations.update": "updated item",
43508
+ "contentControls.appendContent": "appended content",
43509
+ "contentControls.checkbox.getState": "retrieved state",
43510
+ "contentControls.checkbox.setState": "updated state",
43511
+ "contentControls.checkbox.setSymbolPair": "updated symbol pair",
43512
+ "contentControls.checkbox.toggle": "toggled checkbox",
43513
+ "contentControls.choiceList.getItems": "retrieved items",
43514
+ "contentControls.choiceList.setItems": "updated items",
43515
+ "contentControls.choiceList.setSelected": "updated selected",
43516
+ "contentControls.clearBinding": "cleared binding",
43517
+ "contentControls.clearContent": "cleared content",
43518
+ "contentControls.copy": "copied item",
43519
+ "contentControls.date.clearValue": "cleared value",
43520
+ "contentControls.date.setCalendar": "updated calendar",
43521
+ "contentControls.date.setDisplayFormat": "updated display format",
43522
+ "contentControls.date.setDisplayLocale": "updated display locale",
43523
+ "contentControls.date.setStorageFormat": "updated storage format",
43524
+ "contentControls.date.setValue": "updated value",
43525
+ "contentControls.delete": "deleted item",
43526
+ "contentControls.get": "retrieved item",
43527
+ "contentControls.getBinding": "retrieved binding",
43528
+ "contentControls.getContent": "retrieved content",
43529
+ "contentControls.getParent": "retrieved parent",
43530
+ "contentControls.getRawProperties": "retrieved raw properties",
43531
+ "contentControls.group.ungroup": "ungrouped",
43532
+ "contentControls.group.wrap": "wrapped group",
43533
+ "contentControls.insertAfter": "inserted after",
43534
+ "contentControls.insertBefore": "inserted before",
43535
+ "contentControls.list": "listed items",
43536
+ "contentControls.listChildren": "listed children",
43537
+ "contentControls.listInRange": "listed in range",
43538
+ "contentControls.move": "moved item",
43539
+ "contentControls.normalizeTagPayload": "normalized tag payload",
43540
+ "contentControls.normalizeWordCompatibility": "normalized word compatibility",
43541
+ "contentControls.patch": "patched item",
43542
+ "contentControls.patchRawProperties": "patched raw properties",
43543
+ "contentControls.prependContent": "prepended content",
43544
+ "contentControls.repeatingSection.cloneItem": "cloned item",
43545
+ "contentControls.repeatingSection.deleteItem": "deleted item",
43546
+ "contentControls.repeatingSection.insertItemAfter": "inserted item after",
43547
+ "contentControls.repeatingSection.insertItemBefore": "inserted item before",
43548
+ "contentControls.repeatingSection.listItems": "listed items",
43549
+ "contentControls.repeatingSection.setAllowInsertDelete": "updated allow insert delete",
43550
+ "contentControls.replaceContent": "replaced content",
43551
+ "contentControls.selectByTag": "selected by tag",
43552
+ "contentControls.selectByTitle": "selected by title",
43553
+ "contentControls.setBinding": "updated binding",
43554
+ "contentControls.setLockMode": "updated lock mode",
43555
+ "contentControls.setType": "updated type",
43556
+ "contentControls.text.clearValue": "cleared value",
43557
+ "contentControls.text.setMultiline": "updated multiline",
43558
+ "contentControls.text.setValue": "updated value",
43559
+ "contentControls.unwrap": "unwrapped",
43560
+ "contentControls.validateWordCompatibility": "validated word compatibility",
43561
+ "contentControls.wrap": "wrapped",
43562
+ "create.contentControl": "created content control",
43563
+ "create.sectionBreak": "created section break",
43564
+ "crossRefs.get": "retrieved item",
43565
+ "crossRefs.insert": "inserted item",
43566
+ "crossRefs.list": "listed items",
43567
+ "crossRefs.rebuild": "rebuilt",
43568
+ "crossRefs.remove": "removed item",
43569
+ "customXml.parts.create": "created item",
43570
+ "customXml.parts.get": "retrieved item",
43571
+ "customXml.parts.list": "listed items",
43572
+ "customXml.parts.patch": "patched item",
43573
+ "customXml.parts.remove": "removed item",
43574
+ "fields.get": "retrieved item",
43575
+ "fields.insert": "inserted item",
43576
+ "fields.list": "listed items",
43577
+ "fields.rebuild": "rebuilt",
43578
+ "fields.remove": "removed item",
43579
+ "footnotes.configure": "configured",
43580
+ "footnotes.get": "retrieved item",
43581
+ "footnotes.insert": "inserted item",
43582
+ "footnotes.list": "listed items",
43583
+ "footnotes.remove": "removed item",
43584
+ "footnotes.update": "updated item",
43585
+ "format.paragraph.clearDirection": "cleared direction",
43586
+ "format.paragraph.setDirection": "updated direction",
43587
+ "headerFooters.get": "retrieved item",
43588
+ "headerFooters.list": "listed items",
43589
+ "headerFooters.parts.create": "created item",
43590
+ "headerFooters.parts.delete": "deleted item",
43591
+ "headerFooters.parts.list": "listed items",
43592
+ "headerFooters.refs.clear": "cleared ref",
43593
+ "headerFooters.refs.set": "updated ref",
43594
+ "headerFooters.refs.setLinkedToPrevious": "updated linked to previous",
43595
+ "headerFooters.resolve": "resolved",
43596
+ "hyperlinks.get": "retrieved item",
43597
+ "hyperlinks.insert": "inserted item",
43598
+ "hyperlinks.list": "listed items",
43599
+ "hyperlinks.patch": "patched item",
43600
+ "hyperlinks.remove": "removed item",
43601
+ "hyperlinks.wrap": "wrapped",
43602
+ "images.crop": "cropped image",
43603
+ "images.flip": "flipped image",
43604
+ "images.insertCaption": "inserted caption",
43605
+ "images.removeCaption": "removed caption",
43606
+ "images.replaceSource": "replaced source",
43607
+ "images.resetCrop": "reset crop",
43608
+ "images.rotate": "rotated image",
43609
+ "images.scale": "scaled image",
43610
+ "images.setAltText": "updated alt text",
43611
+ "images.setDecorative": "updated decorative",
43612
+ "images.setHyperlink": "updated hyperlink",
43613
+ "images.setLockAspectRatio": "updated lock aspect ratio",
43614
+ "images.setName": "updated name",
43615
+ "images.updateCaption": "updated caption",
43616
+ "index.configure": "configured",
43617
+ "index.entries.get": "retrieved item",
43618
+ "index.entries.insert": "inserted item",
43619
+ "index.entries.list": "listed items",
43620
+ "index.entries.remove": "removed item",
43621
+ "index.entries.update": "updated item",
43622
+ "index.get": "retrieved item",
43623
+ "index.insert": "inserted item",
43624
+ "index.list": "listed items",
43625
+ "index.rebuild": "rebuilt",
43626
+ "index.remove": "removed item",
43627
+ "lists.applyStyle": "applied style",
43628
+ "lists.delete": "deleted item",
43629
+ "lists.getStyle": "retrieved style",
43630
+ "lists.merge": "merged lists",
43631
+ "lists.restartAt": "restarted numbering",
43632
+ "lists.setLevelLayout": "updated level layout",
43633
+ "lists.setLevelNumberStyle": "updated level number style",
43634
+ "lists.setLevelStart": "updated level start",
43635
+ "lists.setLevelText": "updated level text",
43636
+ "lists.setType": "updated type",
43637
+ "lists.split": "split list",
43638
+ "metadata.attach": "attached metadata",
43639
+ "metadata.get": "retrieved item",
43640
+ "metadata.list": "listed items",
43641
+ "metadata.remove": "removed item",
43642
+ "metadata.resolve": "resolved metadata",
43643
+ "metadata.update": "updated item",
43644
+ "permissionRanges.create": "created item",
43645
+ "permissionRanges.get": "retrieved item",
43646
+ "permissionRanges.list": "listed items",
43647
+ "permissionRanges.remove": "removed item",
43648
+ "permissionRanges.updatePrincipal": "updated principal",
43649
+ "protection.clearEditingRestriction": "cleared editing restriction",
43650
+ "protection.get": "retrieved item",
43651
+ "protection.setEditingRestriction": "updated editing restriction",
43652
+ "ranges.resolve": "resolved range",
43653
+ "sections.clearHeaderFooterRef": "cleared header footer ref",
43654
+ "sections.clearPageBorders": "cleared page borders",
43655
+ "sections.get": "retrieved item",
43656
+ "sections.list": "listed items",
43657
+ "sections.setBreakType": "updated break type",
43658
+ "sections.setColumns": "updated columns",
43659
+ "sections.setHeaderFooterMargins": "updated header footer margins",
43660
+ "sections.setHeaderFooterRef": "updated header footer ref",
43661
+ "sections.setLineNumbering": "updated line numbering",
43662
+ "sections.setLinkToPrevious": "updated link to previous",
43663
+ "sections.setOddEvenHeadersFooters": "updated odd even headers footers",
43664
+ "sections.setPageBorders": "updated page borders",
43665
+ "sections.setPageMargins": "updated page margins",
43666
+ "sections.setPageNumbering": "updated page numbering",
43667
+ "sections.setPageSetup": "updated page setup",
43668
+ "sections.setSectionDirection": "updated section direction",
43669
+ "sections.setTitlePage": "updated title page",
43670
+ "sections.setVerticalAlign": "updated vertical align",
43671
+ "selection.current": "retrieved current selection",
43672
+ "tables.applyPreset": "applied table preset",
43673
+ "tables.applyStyle": "applied table style",
43674
+ "tables.setBorders": "updated borders",
43675
+ "tables.setCellText": "updated cell text",
43676
+ "tables.setTableOptions": "updated table options"
43471
43677
  };
43472
43678
  OUTPUT_FORMAT = {
43473
43679
  get: "plain",
@@ -43606,7 +43812,213 @@ var init_operation_hints = __esm(() => {
43606
43812
  "images.setZOrder": "plain",
43607
43813
  "diff.capture": "diffSnapshot",
43608
43814
  "diff.compare": "diffPayload",
43609
- "diff.apply": "diffApplyResult"
43815
+ "diff.apply": "diffApplyResult",
43816
+ "authorities.configure": "plain",
43817
+ "authorities.entries.get": "plain",
43818
+ "authorities.entries.insert": "plain",
43819
+ "authorities.entries.list": "plain",
43820
+ "authorities.entries.remove": "plain",
43821
+ "authorities.entries.update": "plain",
43822
+ "authorities.get": "plain",
43823
+ "authorities.insert": "plain",
43824
+ "authorities.list": "plain",
43825
+ "authorities.rebuild": "plain",
43826
+ "authorities.remove": "plain",
43827
+ "bookmarks.get": "plain",
43828
+ "bookmarks.insert": "plain",
43829
+ "bookmarks.list": "plain",
43830
+ "bookmarks.remove": "plain",
43831
+ "bookmarks.rename": "plain",
43832
+ "captions.configure": "plain",
43833
+ "captions.get": "plain",
43834
+ "captions.insert": "plain",
43835
+ "captions.list": "plain",
43836
+ "captions.remove": "plain",
43837
+ "captions.update": "plain",
43838
+ "citations.bibliography.configure": "plain",
43839
+ "citations.bibliography.get": "plain",
43840
+ "citations.bibliography.insert": "plain",
43841
+ "citations.bibliography.rebuild": "plain",
43842
+ "citations.bibliography.remove": "plain",
43843
+ "citations.get": "plain",
43844
+ "citations.insert": "plain",
43845
+ "citations.list": "plain",
43846
+ "citations.remove": "plain",
43847
+ "citations.sources.get": "plain",
43848
+ "citations.sources.insert": "plain",
43849
+ "citations.sources.list": "plain",
43850
+ "citations.sources.remove": "plain",
43851
+ "citations.sources.update": "plain",
43852
+ "citations.update": "plain",
43853
+ "contentControls.appendContent": "plain",
43854
+ "contentControls.checkbox.getState": "plain",
43855
+ "contentControls.checkbox.setState": "plain",
43856
+ "contentControls.checkbox.setSymbolPair": "plain",
43857
+ "contentControls.checkbox.toggle": "plain",
43858
+ "contentControls.choiceList.getItems": "plain",
43859
+ "contentControls.choiceList.setItems": "plain",
43860
+ "contentControls.choiceList.setSelected": "plain",
43861
+ "contentControls.clearBinding": "plain",
43862
+ "contentControls.clearContent": "plain",
43863
+ "contentControls.copy": "plain",
43864
+ "contentControls.date.clearValue": "plain",
43865
+ "contentControls.date.setCalendar": "plain",
43866
+ "contentControls.date.setDisplayFormat": "plain",
43867
+ "contentControls.date.setDisplayLocale": "plain",
43868
+ "contentControls.date.setStorageFormat": "plain",
43869
+ "contentControls.date.setValue": "plain",
43870
+ "contentControls.delete": "plain",
43871
+ "contentControls.get": "plain",
43872
+ "contentControls.getBinding": "plain",
43873
+ "contentControls.getContent": "plain",
43874
+ "contentControls.getParent": "plain",
43875
+ "contentControls.getRawProperties": "plain",
43876
+ "contentControls.group.ungroup": "plain",
43877
+ "contentControls.group.wrap": "plain",
43878
+ "contentControls.insertAfter": "plain",
43879
+ "contentControls.insertBefore": "plain",
43880
+ "contentControls.list": "plain",
43881
+ "contentControls.listChildren": "plain",
43882
+ "contentControls.listInRange": "plain",
43883
+ "contentControls.move": "plain",
43884
+ "contentControls.normalizeTagPayload": "plain",
43885
+ "contentControls.normalizeWordCompatibility": "plain",
43886
+ "contentControls.patch": "plain",
43887
+ "contentControls.patchRawProperties": "plain",
43888
+ "contentControls.prependContent": "plain",
43889
+ "contentControls.repeatingSection.cloneItem": "plain",
43890
+ "contentControls.repeatingSection.deleteItem": "plain",
43891
+ "contentControls.repeatingSection.insertItemAfter": "plain",
43892
+ "contentControls.repeatingSection.insertItemBefore": "plain",
43893
+ "contentControls.repeatingSection.listItems": "plain",
43894
+ "contentControls.repeatingSection.setAllowInsertDelete": "plain",
43895
+ "contentControls.replaceContent": "plain",
43896
+ "contentControls.selectByTag": "plain",
43897
+ "contentControls.selectByTitle": "plain",
43898
+ "contentControls.setBinding": "plain",
43899
+ "contentControls.setLockMode": "plain",
43900
+ "contentControls.setType": "plain",
43901
+ "contentControls.text.clearValue": "plain",
43902
+ "contentControls.text.setMultiline": "plain",
43903
+ "contentControls.text.setValue": "plain",
43904
+ "contentControls.unwrap": "plain",
43905
+ "contentControls.validateWordCompatibility": "plain",
43906
+ "contentControls.wrap": "plain",
43907
+ "create.contentControl": "plain",
43908
+ "create.sectionBreak": "plain",
43909
+ "crossRefs.get": "plain",
43910
+ "crossRefs.insert": "plain",
43911
+ "crossRefs.list": "plain",
43912
+ "crossRefs.rebuild": "plain",
43913
+ "crossRefs.remove": "plain",
43914
+ "customXml.parts.create": "plain",
43915
+ "customXml.parts.get": "plain",
43916
+ "customXml.parts.list": "plain",
43917
+ "customXml.parts.patch": "plain",
43918
+ "customXml.parts.remove": "plain",
43919
+ "fields.get": "plain",
43920
+ "fields.insert": "plain",
43921
+ "fields.list": "plain",
43922
+ "fields.rebuild": "plain",
43923
+ "fields.remove": "plain",
43924
+ "footnotes.configure": "plain",
43925
+ "footnotes.get": "plain",
43926
+ "footnotes.insert": "plain",
43927
+ "footnotes.list": "plain",
43928
+ "footnotes.remove": "plain",
43929
+ "footnotes.update": "plain",
43930
+ "format.paragraph.clearDirection": "plain",
43931
+ "format.paragraph.setDirection": "plain",
43932
+ "headerFooters.get": "plain",
43933
+ "headerFooters.list": "plain",
43934
+ "headerFooters.parts.create": "plain",
43935
+ "headerFooters.parts.delete": "plain",
43936
+ "headerFooters.parts.list": "plain",
43937
+ "headerFooters.refs.clear": "plain",
43938
+ "headerFooters.refs.set": "plain",
43939
+ "headerFooters.refs.setLinkedToPrevious": "plain",
43940
+ "headerFooters.resolve": "plain",
43941
+ "hyperlinks.get": "plain",
43942
+ "hyperlinks.insert": "plain",
43943
+ "hyperlinks.list": "plain",
43944
+ "hyperlinks.patch": "plain",
43945
+ "hyperlinks.remove": "plain",
43946
+ "hyperlinks.wrap": "plain",
43947
+ "images.crop": "plain",
43948
+ "images.flip": "plain",
43949
+ "images.insertCaption": "plain",
43950
+ "images.removeCaption": "plain",
43951
+ "images.replaceSource": "plain",
43952
+ "images.resetCrop": "plain",
43953
+ "images.rotate": "plain",
43954
+ "images.scale": "plain",
43955
+ "images.setAltText": "plain",
43956
+ "images.setDecorative": "plain",
43957
+ "images.setHyperlink": "plain",
43958
+ "images.setLockAspectRatio": "plain",
43959
+ "images.setName": "plain",
43960
+ "images.updateCaption": "plain",
43961
+ "index.configure": "plain",
43962
+ "index.entries.get": "plain",
43963
+ "index.entries.insert": "plain",
43964
+ "index.entries.list": "plain",
43965
+ "index.entries.remove": "plain",
43966
+ "index.entries.update": "plain",
43967
+ "index.get": "plain",
43968
+ "index.insert": "plain",
43969
+ "index.list": "plain",
43970
+ "index.rebuild": "plain",
43971
+ "index.remove": "plain",
43972
+ "lists.applyStyle": "plain",
43973
+ "lists.delete": "plain",
43974
+ "lists.getStyle": "plain",
43975
+ "lists.merge": "plain",
43976
+ "lists.restartAt": "plain",
43977
+ "lists.setLevelLayout": "plain",
43978
+ "lists.setLevelNumberStyle": "plain",
43979
+ "lists.setLevelStart": "plain",
43980
+ "lists.setLevelText": "plain",
43981
+ "lists.setType": "plain",
43982
+ "lists.split": "plain",
43983
+ "metadata.attach": "plain",
43984
+ "metadata.get": "plain",
43985
+ "metadata.list": "plain",
43986
+ "metadata.remove": "plain",
43987
+ "metadata.resolve": "plain",
43988
+ "metadata.update": "plain",
43989
+ "permissionRanges.create": "plain",
43990
+ "permissionRanges.get": "plain",
43991
+ "permissionRanges.list": "plain",
43992
+ "permissionRanges.remove": "plain",
43993
+ "permissionRanges.updatePrincipal": "plain",
43994
+ "protection.clearEditingRestriction": "plain",
43995
+ "protection.get": "plain",
43996
+ "protection.setEditingRestriction": "plain",
43997
+ "ranges.resolve": "plain",
43998
+ "sections.clearHeaderFooterRef": "plain",
43999
+ "sections.clearPageBorders": "plain",
44000
+ "sections.get": "plain",
44001
+ "sections.list": "plain",
44002
+ "sections.setBreakType": "plain",
44003
+ "sections.setColumns": "plain",
44004
+ "sections.setHeaderFooterMargins": "plain",
44005
+ "sections.setHeaderFooterRef": "plain",
44006
+ "sections.setLineNumbering": "plain",
44007
+ "sections.setLinkToPrevious": "plain",
44008
+ "sections.setOddEvenHeadersFooters": "plain",
44009
+ "sections.setPageBorders": "plain",
44010
+ "sections.setPageMargins": "plain",
44011
+ "sections.setPageNumbering": "plain",
44012
+ "sections.setPageSetup": "plain",
44013
+ "sections.setSectionDirection": "plain",
44014
+ "sections.setTitlePage": "plain",
44015
+ "sections.setVerticalAlign": "plain",
44016
+ "selection.current": "plain",
44017
+ "tables.applyPreset": "plain",
44018
+ "tables.applyStyle": "plain",
44019
+ "tables.setBorders": "plain",
44020
+ "tables.setCellText": "plain",
44021
+ "tables.setTableOptions": "plain"
43610
44022
  };
43611
44023
  RESPONSE_ENVELOPE_KEY = {
43612
44024
  get: "result",
@@ -43754,7 +44166,204 @@ var init_operation_hints = __esm(() => {
43754
44166
  "headerFooters.parts.delete": "result",
43755
44167
  "diff.capture": "snapshot",
43756
44168
  "diff.compare": "diff",
43757
- "diff.apply": "result"
44169
+ "diff.apply": "result",
44170
+ "authorities.configure": "result",
44171
+ "authorities.entries.get": "result",
44172
+ "authorities.entries.insert": "result",
44173
+ "authorities.entries.list": "result",
44174
+ "authorities.entries.remove": "result",
44175
+ "authorities.entries.update": "result",
44176
+ "authorities.get": "result",
44177
+ "authorities.insert": "result",
44178
+ "authorities.list": "result",
44179
+ "authorities.rebuild": "result",
44180
+ "authorities.remove": "result",
44181
+ "bookmarks.get": "result",
44182
+ "bookmarks.insert": "result",
44183
+ "bookmarks.list": "result",
44184
+ "bookmarks.remove": "result",
44185
+ "bookmarks.rename": "result",
44186
+ "captions.configure": "result",
44187
+ "captions.get": "result",
44188
+ "captions.insert": "result",
44189
+ "captions.list": "result",
44190
+ "captions.remove": "result",
44191
+ "captions.update": "result",
44192
+ "citations.bibliography.configure": "result",
44193
+ "citations.bibliography.get": "result",
44194
+ "citations.bibliography.insert": "result",
44195
+ "citations.bibliography.rebuild": "result",
44196
+ "citations.bibliography.remove": "result",
44197
+ "citations.get": "result",
44198
+ "citations.insert": "result",
44199
+ "citations.list": "result",
44200
+ "citations.remove": "result",
44201
+ "citations.sources.get": "result",
44202
+ "citations.sources.insert": "result",
44203
+ "citations.sources.list": "result",
44204
+ "citations.sources.remove": "result",
44205
+ "citations.sources.update": "result",
44206
+ "citations.update": "result",
44207
+ "contentControls.appendContent": "result",
44208
+ "contentControls.checkbox.getState": "result",
44209
+ "contentControls.checkbox.setState": "result",
44210
+ "contentControls.checkbox.setSymbolPair": "result",
44211
+ "contentControls.checkbox.toggle": "result",
44212
+ "contentControls.choiceList.getItems": "result",
44213
+ "contentControls.choiceList.setItems": "result",
44214
+ "contentControls.choiceList.setSelected": "result",
44215
+ "contentControls.clearBinding": "result",
44216
+ "contentControls.clearContent": "result",
44217
+ "contentControls.copy": "result",
44218
+ "contentControls.date.clearValue": "result",
44219
+ "contentControls.date.setCalendar": "result",
44220
+ "contentControls.date.setDisplayFormat": "result",
44221
+ "contentControls.date.setDisplayLocale": "result",
44222
+ "contentControls.date.setStorageFormat": "result",
44223
+ "contentControls.date.setValue": "result",
44224
+ "contentControls.delete": "result",
44225
+ "contentControls.get": "result",
44226
+ "contentControls.getBinding": "result",
44227
+ "contentControls.getContent": "result",
44228
+ "contentControls.getParent": "result",
44229
+ "contentControls.getRawProperties": "result",
44230
+ "contentControls.group.ungroup": "result",
44231
+ "contentControls.group.wrap": "result",
44232
+ "contentControls.insertAfter": "result",
44233
+ "contentControls.insertBefore": "result",
44234
+ "contentControls.list": "result",
44235
+ "contentControls.listChildren": "result",
44236
+ "contentControls.listInRange": "result",
44237
+ "contentControls.move": "result",
44238
+ "contentControls.normalizeTagPayload": "result",
44239
+ "contentControls.normalizeWordCompatibility": "result",
44240
+ "contentControls.patch": "result",
44241
+ "contentControls.patchRawProperties": "result",
44242
+ "contentControls.prependContent": "result",
44243
+ "contentControls.repeatingSection.cloneItem": "result",
44244
+ "contentControls.repeatingSection.deleteItem": "result",
44245
+ "contentControls.repeatingSection.insertItemAfter": "result",
44246
+ "contentControls.repeatingSection.insertItemBefore": "result",
44247
+ "contentControls.repeatingSection.listItems": "result",
44248
+ "contentControls.repeatingSection.setAllowInsertDelete": "result",
44249
+ "contentControls.replaceContent": "result",
44250
+ "contentControls.selectByTag": "result",
44251
+ "contentControls.selectByTitle": "result",
44252
+ "contentControls.setBinding": "result",
44253
+ "contentControls.setLockMode": "result",
44254
+ "contentControls.setType": "result",
44255
+ "contentControls.text.clearValue": "result",
44256
+ "contentControls.text.setMultiline": "result",
44257
+ "contentControls.text.setValue": "result",
44258
+ "contentControls.unwrap": "result",
44259
+ "contentControls.validateWordCompatibility": "result",
44260
+ "contentControls.wrap": "result",
44261
+ "create.contentControl": "result",
44262
+ "create.sectionBreak": "result",
44263
+ "crossRefs.get": "result",
44264
+ "crossRefs.insert": "result",
44265
+ "crossRefs.list": "result",
44266
+ "crossRefs.rebuild": "result",
44267
+ "crossRefs.remove": "result",
44268
+ "customXml.parts.create": "result",
44269
+ "customXml.parts.get": "result",
44270
+ "customXml.parts.list": "result",
44271
+ "customXml.parts.patch": "result",
44272
+ "customXml.parts.remove": "result",
44273
+ "fields.get": "result",
44274
+ "fields.insert": "result",
44275
+ "fields.list": "result",
44276
+ "fields.rebuild": "result",
44277
+ "fields.remove": "result",
44278
+ "footnotes.configure": "result",
44279
+ "footnotes.get": "result",
44280
+ "footnotes.insert": "result",
44281
+ "footnotes.list": "result",
44282
+ "footnotes.remove": "result",
44283
+ "footnotes.update": "result",
44284
+ "format.paragraph.clearDirection": "result",
44285
+ "format.paragraph.setDirection": "result",
44286
+ "hyperlinks.get": "result",
44287
+ "hyperlinks.insert": "result",
44288
+ "hyperlinks.list": "result",
44289
+ "hyperlinks.patch": "result",
44290
+ "hyperlinks.remove": "result",
44291
+ "hyperlinks.wrap": "result",
44292
+ "images.crop": "result",
44293
+ "images.flip": "result",
44294
+ "images.insertCaption": "result",
44295
+ "images.removeCaption": "result",
44296
+ "images.replaceSource": "result",
44297
+ "images.resetCrop": "result",
44298
+ "images.rotate": "result",
44299
+ "images.scale": "result",
44300
+ "images.setAltText": "result",
44301
+ "images.setDecorative": "result",
44302
+ "images.setHyperlink": "result",
44303
+ "images.setLockAspectRatio": "result",
44304
+ "images.setName": "result",
44305
+ "images.updateCaption": "result",
44306
+ "index.configure": "result",
44307
+ "index.entries.get": "result",
44308
+ "index.entries.insert": "result",
44309
+ "index.entries.list": "result",
44310
+ "index.entries.remove": "result",
44311
+ "index.entries.update": "result",
44312
+ "index.get": "result",
44313
+ "index.insert": "result",
44314
+ "index.list": "result",
44315
+ "index.rebuild": "result",
44316
+ "index.remove": "result",
44317
+ "lists.applyStyle": "result",
44318
+ "lists.delete": "result",
44319
+ "lists.getStyle": "result",
44320
+ "lists.merge": "result",
44321
+ "lists.restartAt": "result",
44322
+ "lists.setLevelLayout": "result",
44323
+ "lists.setLevelNumberStyle": "result",
44324
+ "lists.setLevelStart": "result",
44325
+ "lists.setLevelText": "result",
44326
+ "lists.setType": "result",
44327
+ "lists.split": "result",
44328
+ "metadata.attach": "result",
44329
+ "metadata.get": "result",
44330
+ "metadata.list": "result",
44331
+ "metadata.remove": "result",
44332
+ "metadata.resolve": "result",
44333
+ "metadata.update": "result",
44334
+ "permissionRanges.create": "result",
44335
+ "permissionRanges.get": "result",
44336
+ "permissionRanges.list": "result",
44337
+ "permissionRanges.remove": "result",
44338
+ "permissionRanges.updatePrincipal": "result",
44339
+ "protection.clearEditingRestriction": "result",
44340
+ "protection.get": "result",
44341
+ "protection.setEditingRestriction": "result",
44342
+ "ranges.resolve": "result",
44343
+ "sections.clearHeaderFooterRef": "result",
44344
+ "sections.clearPageBorders": "result",
44345
+ "sections.get": "result",
44346
+ "sections.list": "result",
44347
+ "sections.setBreakType": "result",
44348
+ "sections.setColumns": "result",
44349
+ "sections.setHeaderFooterMargins": "result",
44350
+ "sections.setHeaderFooterRef": "result",
44351
+ "sections.setLineNumbering": "result",
44352
+ "sections.setLinkToPrevious": "result",
44353
+ "sections.setOddEvenHeadersFooters": "result",
44354
+ "sections.setPageBorders": "result",
44355
+ "sections.setPageMargins": "result",
44356
+ "sections.setPageNumbering": "result",
44357
+ "sections.setPageSetup": "result",
44358
+ "sections.setSectionDirection": "result",
44359
+ "sections.setTitlePage": "result",
44360
+ "sections.setVerticalAlign": "result",
44361
+ "selection.current": "result",
44362
+ "tables.applyPreset": "result",
44363
+ "tables.applyStyle": "result",
44364
+ "tables.setBorders": "result",
44365
+ "tables.setCellText": "result",
44366
+ "tables.setTableOptions": "result"
43758
44367
  };
43759
44368
  RESPONSE_VALIDATION_KEY = {
43760
44369
  insert: "receipt",
@@ -43900,7 +44509,213 @@ var init_operation_hints = __esm(() => {
43900
44509
  "images.setZOrder": "images",
43901
44510
  "diff.capture": "diff",
43902
44511
  "diff.compare": "diff",
43903
- "diff.apply": "diff"
44512
+ "diff.apply": "diff",
44513
+ "authorities.configure": "general",
44514
+ "authorities.entries.get": "general",
44515
+ "authorities.entries.insert": "general",
44516
+ "authorities.entries.list": "general",
44517
+ "authorities.entries.remove": "general",
44518
+ "authorities.entries.update": "general",
44519
+ "authorities.get": "general",
44520
+ "authorities.insert": "general",
44521
+ "authorities.list": "general",
44522
+ "authorities.rebuild": "general",
44523
+ "authorities.remove": "general",
44524
+ "bookmarks.get": "general",
44525
+ "bookmarks.insert": "general",
44526
+ "bookmarks.list": "general",
44527
+ "bookmarks.remove": "general",
44528
+ "bookmarks.rename": "general",
44529
+ "captions.configure": "general",
44530
+ "captions.get": "general",
44531
+ "captions.insert": "general",
44532
+ "captions.list": "general",
44533
+ "captions.remove": "general",
44534
+ "captions.update": "general",
44535
+ "citations.bibliography.configure": "general",
44536
+ "citations.bibliography.get": "general",
44537
+ "citations.bibliography.insert": "general",
44538
+ "citations.bibliography.rebuild": "general",
44539
+ "citations.bibliography.remove": "general",
44540
+ "citations.get": "general",
44541
+ "citations.insert": "general",
44542
+ "citations.list": "general",
44543
+ "citations.remove": "general",
44544
+ "citations.sources.get": "general",
44545
+ "citations.sources.insert": "general",
44546
+ "citations.sources.list": "general",
44547
+ "citations.sources.remove": "general",
44548
+ "citations.sources.update": "general",
44549
+ "citations.update": "general",
44550
+ "contentControls.appendContent": "general",
44551
+ "contentControls.checkbox.getState": "general",
44552
+ "contentControls.checkbox.setState": "general",
44553
+ "contentControls.checkbox.setSymbolPair": "general",
44554
+ "contentControls.checkbox.toggle": "general",
44555
+ "contentControls.choiceList.getItems": "general",
44556
+ "contentControls.choiceList.setItems": "general",
44557
+ "contentControls.choiceList.setSelected": "general",
44558
+ "contentControls.clearBinding": "general",
44559
+ "contentControls.clearContent": "general",
44560
+ "contentControls.copy": "general",
44561
+ "contentControls.date.clearValue": "general",
44562
+ "contentControls.date.setCalendar": "general",
44563
+ "contentControls.date.setDisplayFormat": "general",
44564
+ "contentControls.date.setDisplayLocale": "general",
44565
+ "contentControls.date.setStorageFormat": "general",
44566
+ "contentControls.date.setValue": "general",
44567
+ "contentControls.delete": "general",
44568
+ "contentControls.get": "general",
44569
+ "contentControls.getBinding": "general",
44570
+ "contentControls.getContent": "general",
44571
+ "contentControls.getParent": "general",
44572
+ "contentControls.getRawProperties": "general",
44573
+ "contentControls.group.ungroup": "general",
44574
+ "contentControls.group.wrap": "general",
44575
+ "contentControls.insertAfter": "general",
44576
+ "contentControls.insertBefore": "general",
44577
+ "contentControls.list": "general",
44578
+ "contentControls.listChildren": "general",
44579
+ "contentControls.listInRange": "general",
44580
+ "contentControls.move": "general",
44581
+ "contentControls.normalizeTagPayload": "general",
44582
+ "contentControls.normalizeWordCompatibility": "general",
44583
+ "contentControls.patch": "general",
44584
+ "contentControls.patchRawProperties": "general",
44585
+ "contentControls.prependContent": "general",
44586
+ "contentControls.repeatingSection.cloneItem": "general",
44587
+ "contentControls.repeatingSection.deleteItem": "general",
44588
+ "contentControls.repeatingSection.insertItemAfter": "general",
44589
+ "contentControls.repeatingSection.insertItemBefore": "general",
44590
+ "contentControls.repeatingSection.listItems": "general",
44591
+ "contentControls.repeatingSection.setAllowInsertDelete": "general",
44592
+ "contentControls.replaceContent": "general",
44593
+ "contentControls.selectByTag": "general",
44594
+ "contentControls.selectByTitle": "general",
44595
+ "contentControls.setBinding": "general",
44596
+ "contentControls.setLockMode": "general",
44597
+ "contentControls.setType": "general",
44598
+ "contentControls.text.clearValue": "general",
44599
+ "contentControls.text.setMultiline": "general",
44600
+ "contentControls.text.setValue": "general",
44601
+ "contentControls.unwrap": "general",
44602
+ "contentControls.validateWordCompatibility": "general",
44603
+ "contentControls.wrap": "general",
44604
+ "create.contentControl": "general",
44605
+ "create.sectionBreak": "general",
44606
+ "crossRefs.get": "general",
44607
+ "crossRefs.insert": "general",
44608
+ "crossRefs.list": "general",
44609
+ "crossRefs.rebuild": "general",
44610
+ "crossRefs.remove": "general",
44611
+ "customXml.parts.create": "general",
44612
+ "customXml.parts.get": "general",
44613
+ "customXml.parts.list": "general",
44614
+ "customXml.parts.patch": "general",
44615
+ "customXml.parts.remove": "general",
44616
+ "fields.get": "general",
44617
+ "fields.insert": "general",
44618
+ "fields.list": "general",
44619
+ "fields.rebuild": "general",
44620
+ "fields.remove": "general",
44621
+ "footnotes.configure": "general",
44622
+ "footnotes.get": "general",
44623
+ "footnotes.insert": "general",
44624
+ "footnotes.list": "general",
44625
+ "footnotes.remove": "general",
44626
+ "footnotes.update": "general",
44627
+ "format.paragraph.clearDirection": "general",
44628
+ "format.paragraph.setDirection": "general",
44629
+ "headerFooters.get": "general",
44630
+ "headerFooters.list": "general",
44631
+ "headerFooters.parts.create": "general",
44632
+ "headerFooters.parts.delete": "general",
44633
+ "headerFooters.parts.list": "general",
44634
+ "headerFooters.refs.clear": "general",
44635
+ "headerFooters.refs.set": "general",
44636
+ "headerFooters.refs.setLinkedToPrevious": "general",
44637
+ "headerFooters.resolve": "general",
44638
+ "hyperlinks.get": "general",
44639
+ "hyperlinks.insert": "general",
44640
+ "hyperlinks.list": "general",
44641
+ "hyperlinks.patch": "general",
44642
+ "hyperlinks.remove": "general",
44643
+ "hyperlinks.wrap": "general",
44644
+ "images.crop": "general",
44645
+ "images.flip": "general",
44646
+ "images.insertCaption": "general",
44647
+ "images.removeCaption": "general",
44648
+ "images.replaceSource": "general",
44649
+ "images.resetCrop": "general",
44650
+ "images.rotate": "general",
44651
+ "images.scale": "general",
44652
+ "images.setAltText": "general",
44653
+ "images.setDecorative": "general",
44654
+ "images.setHyperlink": "general",
44655
+ "images.setLockAspectRatio": "general",
44656
+ "images.setName": "general",
44657
+ "images.updateCaption": "general",
44658
+ "index.configure": "general",
44659
+ "index.entries.get": "general",
44660
+ "index.entries.insert": "general",
44661
+ "index.entries.list": "general",
44662
+ "index.entries.remove": "general",
44663
+ "index.entries.update": "general",
44664
+ "index.get": "general",
44665
+ "index.insert": "general",
44666
+ "index.list": "general",
44667
+ "index.rebuild": "general",
44668
+ "index.remove": "general",
44669
+ "lists.applyStyle": "general",
44670
+ "lists.delete": "general",
44671
+ "lists.getStyle": "general",
44672
+ "lists.merge": "general",
44673
+ "lists.restartAt": "general",
44674
+ "lists.setLevelLayout": "general",
44675
+ "lists.setLevelNumberStyle": "general",
44676
+ "lists.setLevelStart": "general",
44677
+ "lists.setLevelText": "general",
44678
+ "lists.setType": "general",
44679
+ "lists.split": "general",
44680
+ "metadata.attach": "general",
44681
+ "metadata.get": "general",
44682
+ "metadata.list": "general",
44683
+ "metadata.remove": "general",
44684
+ "metadata.resolve": "general",
44685
+ "metadata.update": "general",
44686
+ "permissionRanges.create": "general",
44687
+ "permissionRanges.get": "general",
44688
+ "permissionRanges.list": "general",
44689
+ "permissionRanges.remove": "general",
44690
+ "permissionRanges.updatePrincipal": "general",
44691
+ "protection.clearEditingRestriction": "general",
44692
+ "protection.get": "general",
44693
+ "protection.setEditingRestriction": "general",
44694
+ "ranges.resolve": "general",
44695
+ "sections.clearHeaderFooterRef": "general",
44696
+ "sections.clearPageBorders": "general",
44697
+ "sections.get": "general",
44698
+ "sections.list": "general",
44699
+ "sections.setBreakType": "general",
44700
+ "sections.setColumns": "general",
44701
+ "sections.setHeaderFooterMargins": "general",
44702
+ "sections.setHeaderFooterRef": "general",
44703
+ "sections.setLineNumbering": "general",
44704
+ "sections.setLinkToPrevious": "general",
44705
+ "sections.setOddEvenHeadersFooters": "general",
44706
+ "sections.setPageBorders": "general",
44707
+ "sections.setPageMargins": "general",
44708
+ "sections.setPageNumbering": "general",
44709
+ "sections.setPageSetup": "general",
44710
+ "sections.setSectionDirection": "general",
44711
+ "sections.setTitlePage": "general",
44712
+ "sections.setVerticalAlign": "general",
44713
+ "selection.current": "general",
44714
+ "tables.applyPreset": "general",
44715
+ "tables.applyStyle": "general",
44716
+ "tables.setBorders": "general",
44717
+ "tables.setCellText": "general",
44718
+ "tables.setTableOptions": "general"
43904
44719
  };
43905
44720
  });
43906
44721
 
@@ -66778,7 +67593,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
66778
67593
  emptyOptions2 = {};
66779
67594
  });
66780
67595
 
66781
- // ../../packages/superdoc/dist/chunks/SuperConverter-UqLu6KQU.es.js
67596
+ // ../../packages/superdoc/dist/chunks/SuperConverter-BptSHzcb.es.js
66782
67597
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
66783
67598
  const fieldValue = extension$1.config[field];
66784
67599
  if (typeof fieldValue === "function")
@@ -87296,7 +88111,7 @@ function generateNewListDefinition(numbering, options) {
87296
88111
  }
87297
88112
  if (level != null && start != null && text$2 != null && fmt != null) {
87298
88113
  if (numbering.definitions[numId]) {
87299
- const abstractId = numbering.definitions[numId]?.elements[0]?.attributes["w:val"];
88114
+ const abstractId = numbering.definitions[numId]?.elements?.[0]?.attributes?.["w:val"];
87300
88115
  newAbstractId = abstractId;
87301
88116
  newAbstractDef = { ...numbering.abstracts[abstractId] };
87302
88117
  skipAddingNewAbstract = true;
@@ -120754,7 +121569,7 @@ var isRegExp = (value) => {
120754
121569
  state.kern = kernNode.attributes["w:val"];
120755
121570
  }
120756
121571
  }, SuperConverter;
120757
- var init_SuperConverter_UqLu6KQU_es = __esm(() => {
121572
+ var init_SuperConverter_BptSHzcb_es = __esm(() => {
120758
121573
  init_rolldown_runtime_Bg48TavK_es();
120759
121574
  init_jszip_C49i9kUs_es();
120760
121575
  init_xml_js_CqGKpaft_es();
@@ -158934,7 +159749,7 @@ var init_SuperConverter_UqLu6KQU_es = __esm(() => {
158934
159749
  };
158935
159750
  });
158936
159751
 
158937
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-QcQvy-nD.es.js
159752
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-nX0t772H.es.js
158938
159753
  function parseSizeUnit(val = "0") {
158939
159754
  const length3 = val.toString() || "0";
158940
159755
  const value = Number.parseFloat(length3);
@@ -168128,6 +168943,10 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168128
168943
  if (typeof checker !== "function")
168129
168944
  return false;
168130
168945
  return Boolean(checker(attrs));
168946
+ }, hasFormattingAttrs = (entry) => {
168947
+ return typeof entry.attrs === "object" && entry.attrs !== null;
168948
+ }, getFormattingAttr = (entries2, name, attr) => {
168949
+ return entries2.filter((entry) => entry.name === name && hasFormattingAttrs(entry)).map((entry) => entry.attrs[attr]).filter((value) => value != null);
168131
168950
  }, normalizeFontSizeValue = (value) => {
168132
168951
  if (typeof value === "number")
168133
168952
  return `${value}pt`;
@@ -168156,7 +168975,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168156
168975
  return Boolean(linkedStyle?.definition?.styles && styleKey in linkedStyle.definition.styles);
168157
168976
  }, hasNegatedFormattingMark = (formatting, markName) => {
168158
168977
  const rawActiveMark = formatting.find((mark) => mark.name === markName);
168159
- return rawActiveMark ? isNegatedMark(rawActiveMark.name, rawActiveMark.attrs) : false;
168978
+ if (!rawActiveMark || !hasFormattingAttrs(rawActiveMark))
168979
+ return false;
168980
+ return isNegatedMark(rawActiveMark.name, rawActiveMark.attrs);
168160
168981
  }, isFormatCommandsStorage = (value) => {
168161
168982
  return typeof value === "object" && value !== null && "storedStyle" in value;
168162
168983
  }, hasStoredCopyFormat = (context) => {
@@ -168227,7 +169048,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168227
169048
  disabled: true,
168228
169049
  value: null
168229
169050
  };
168230
- const normalizedValues = formatting.filter((mark) => mark.name === "fontSize").map((mark) => mark.attrs?.fontSize).filter((value$1) => value$1 != null).map((value$1) => normalizeFontSizeValue(value$1));
169051
+ const normalizedValues = getFormattingAttr(formatting, "fontSize", "fontSize").map((value$1) => normalizeFontSizeValue(value$1));
168231
169052
  const uniqueValues = [...new Set(normalizedValues)];
168232
169053
  const hasDirectValue = uniqueValues.length > 0;
168233
169054
  const canUseLinkedStyle = !hasDirectValue && isFormattingActivatedFromLinkedStyle(context, "font-size");
@@ -168249,7 +169070,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168249
169070
  disabled: true,
168250
169071
  value: null
168251
169072
  };
168252
- const normalizedValues = formatting.filter((mark) => mark.name === "fontFamily").map((mark) => mark.attrs?.fontFamily).filter((value$1) => value$1 != null).map((value$1) => normalizeFontFamilyValue(value$1));
169073
+ const normalizedValues = getFormattingAttr(formatting, "fontFamily", "fontFamily").map((value$1) => normalizeFontFamilyValue(value$1));
168253
169074
  const uniqueValues = [...new Set(normalizedValues)];
168254
169075
  const canUseLinkedStyle = !(uniqueValues.length > 0) && isFormattingActivatedFromLinkedStyle(context, "font-family");
168255
169076
  const paragraphProps = canUseLinkedStyle ? getCurrentResolvedParagraphProperties(context) : null;
@@ -168270,7 +169091,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168270
169091
  disabled: true,
168271
169092
  value: null
168272
169093
  };
168273
- const values = formatting.filter((mark) => mark.name === "color").map((mark) => mark.attrs?.color).filter((value$1) => value$1 != null);
169094
+ const values = getFormattingAttr(formatting, "color", "color");
168274
169095
  const markNegated = hasNegatedFormattingMark(formatting, "color");
168275
169096
  const normalizedValues = values.map((value$1) => normalizeColorValue(value$1));
168276
169097
  const uniqueValues = [...new Set(normalizedValues)];
@@ -168289,7 +169110,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168289
169110
  disabled: true,
168290
169111
  value: null
168291
169112
  };
168292
- const values = formatting.filter((mark) => mark.name === "highlight").map((mark) => mark.attrs?.color).filter((value$1) => value$1 != null);
169113
+ const values = getFormattingAttr(formatting, "highlight", "color");
168293
169114
  const markNegated = hasNegatedFormattingMark(formatting, "highlight");
168294
169115
  const normalizedValues = values.map((value$1) => normalizeColorValue(value$1));
168295
169116
  const uniqueValues = [...new Set(normalizedValues)];
@@ -168308,7 +169129,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168308
169129
  disabled: true,
168309
169130
  value: null
168310
169131
  };
168311
- const normalizedValues = formatting.filter((mark) => mark.name === "link").map((mark) => mark.attrs?.href).filter((value$1) => value$1 != null).map((value$1) => normalizeLinkHrefValue(value$1));
169132
+ const normalizedValues = getFormattingAttr(formatting, "link", "href").map((value$1) => normalizeLinkHrefValue(value$1));
168312
169133
  const uniqueValues = [...new Set(normalizedValues)];
168313
169134
  const value = uniqueValues.length === 1 ? uniqueValues[0] : null;
168314
169135
  return {
@@ -168951,8 +169772,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168951
169772
  }
168952
169773
  };
168953
169774
  };
168954
- var init_create_headless_toolbar_QcQvy_nD_es = __esm(() => {
168955
- init_SuperConverter_UqLu6KQU_es();
169775
+ var init_create_headless_toolbar_nX0t772H_es = __esm(() => {
169776
+ init_SuperConverter_BptSHzcb_es();
168956
169777
  init_uuid_qzgm05fK_es();
168957
169778
  init_constants_DrU4EASo_es();
168958
169779
  init_dist_B8HfvhaK_es();
@@ -218157,7 +218978,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
218157
218978
  init_remark_gfm_BhnWr3yf_es();
218158
218979
  });
218159
218980
 
218160
- // ../../packages/superdoc/dist/chunks/src-DXlYP0an.es.js
218981
+ // ../../packages/superdoc/dist/chunks/src-Tq4gtGIV.es.js
218161
218982
  function deleteProps(obj, propOrProps) {
218162
218983
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
218163
218984
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -234376,6 +235197,95 @@ function buildCommentJsonFromText(text5) {
234376
235197
  function isCommentResolved(entry) {
234377
235198
  return Boolean(entry.isDone || entry.resolvedTime);
234378
235199
  }
235200
+ function syncCommentEntitiesFromCollaboration(editor, entries2, options = {}) {
235201
+ const store = getCommentEntityStore(editor);
235202
+ const seen = /* @__PURE__ */ new Set;
235203
+ const upstreamIds = /* @__PURE__ */ new Set;
235204
+ const validEntries = [];
235205
+ for (const raw of entries2) {
235206
+ if (!raw || typeof raw !== "object")
235207
+ continue;
235208
+ if (raw.trackedChange === true)
235209
+ continue;
235210
+ const cid = toNonEmptyString$1(raw.commentId);
235211
+ const iid = toNonEmptyString$1(raw.importedId);
235212
+ if (cid)
235213
+ upstreamIds.add(cid);
235214
+ if (iid)
235215
+ upstreamIds.add(iid);
235216
+ validEntries.push(raw);
235217
+ }
235218
+ let changed = true;
235219
+ while (changed) {
235220
+ changed = false;
235221
+ for (const raw of validEntries) {
235222
+ const parentRef = toNonEmptyString$1(raw.parentCommentId);
235223
+ if (!parentRef)
235224
+ continue;
235225
+ if (upstreamIds.has(parentRef))
235226
+ continue;
235227
+ const cid = toNonEmptyString$1(raw.commentId);
235228
+ const iid = toNonEmptyString$1(raw.importedId);
235229
+ if (cid && upstreamIds.delete(cid))
235230
+ changed = true;
235231
+ if (iid && upstreamIds.delete(iid))
235232
+ changed = true;
235233
+ }
235234
+ }
235235
+ for (const raw of validEntries) {
235236
+ const commentId = toNonEmptyString$1(raw.commentId) ?? toNonEmptyString$1(raw.importedId);
235237
+ if (!commentId)
235238
+ continue;
235239
+ if (!upstreamIds.has(commentId))
235240
+ continue;
235241
+ seen.add(commentId);
235242
+ const patch3 = {};
235243
+ if (typeof raw.importedId === "string")
235244
+ patch3.importedId = raw.importedId;
235245
+ if (typeof raw.parentCommentId === "string")
235246
+ patch3.parentCommentId = raw.parentCommentId;
235247
+ const commentText = typeof raw.commentText === "string" ? raw.commentText : typeof raw.text === "string" ? raw.text : undefined;
235248
+ if (commentText !== undefined)
235249
+ patch3.commentText = commentText;
235250
+ if (raw.commentJSON !== undefined)
235251
+ patch3.commentJSON = raw.commentJSON;
235252
+ if (raw.elements !== undefined)
235253
+ patch3.elements = raw.elements;
235254
+ if (typeof raw.creatorName === "string")
235255
+ patch3.creatorName = raw.creatorName;
235256
+ if (typeof raw.creatorEmail === "string")
235257
+ patch3.creatorEmail = raw.creatorEmail;
235258
+ if (typeof raw.creatorImage === "string")
235259
+ patch3.creatorImage = raw.creatorImage;
235260
+ if (typeof raw.createdTime === "number")
235261
+ patch3.createdTime = raw.createdTime;
235262
+ if (typeof raw.isInternal === "boolean")
235263
+ patch3.isInternal = raw.isInternal;
235264
+ if (typeof raw.isDone === "boolean")
235265
+ patch3.isDone = raw.isDone;
235266
+ if (typeof raw.resolvedTime === "number")
235267
+ patch3.resolvedTime = raw.resolvedTime;
235268
+ if (raw.resolvedTime === null)
235269
+ patch3.resolvedTime = null;
235270
+ if (typeof raw.resolvedByEmail === "string")
235271
+ patch3.resolvedByEmail = raw.resolvedByEmail;
235272
+ if (typeof raw.resolvedByName === "string")
235273
+ patch3.resolvedByName = raw.resolvedByName;
235274
+ upsertCommentEntity(store, commentId, patch3);
235275
+ }
235276
+ if (options.previouslySynced) {
235277
+ for (const priorId of options.previouslySynced)
235278
+ if (!seen.has(priorId))
235279
+ removeCommentEntityTree(store, priorId);
235280
+ }
235281
+ return seen;
235282
+ }
235283
+ function toNonEmptyString$1(value) {
235284
+ if (typeof value !== "string")
235285
+ return;
235286
+ const trimmed = value.trim();
235287
+ return trimmed.length > 0 ? trimmed : undefined;
235288
+ }
234379
235289
  function toCommentInfo(entry, options = {}) {
234380
235290
  const resolvedId = typeof entry.commentId === "string" ? entry.commentId : String(entry.importedId ?? "");
234381
235291
  const status = options.status ?? (isCommentResolved(entry) ? "resolved" : "open");
@@ -234515,6 +235425,15 @@ function listCommentAnchorsSafe(editor) {
234515
235425
  return [];
234516
235426
  }
234517
235427
  }
235428
+ function emitCommentLifecycleUpdate(editor, type, comment2) {
235429
+ const emitter = editor.emit;
235430
+ if (typeof emitter !== "function")
235431
+ return;
235432
+ emitter.call(editor, "commentsUpdate", {
235433
+ type,
235434
+ comment: comment2
235435
+ });
235436
+ }
234518
235437
  function applyTextSelection(editor, from$1, to) {
234519
235438
  const setTextSelection$1 = editor.commands?.setTextSelection;
234520
235439
  if (typeof setTextSelection$1 === "function") {
@@ -235003,17 +235922,20 @@ function resolveCommentHandler(editor, input2, options) {
235003
235922
  message: "Comment is already resolved."
235004
235923
  }
235005
235924
  };
235925
+ let resolvedTimestamp = null;
235006
235926
  if (executeDomainCommand(editor, () => {
235007
235927
  const didResolve = resolveComment({
235008
235928
  commentId: identity.commentId,
235009
235929
  importedId: identity.importedId
235010
235930
  });
235011
- if (didResolve)
235931
+ if (didResolve) {
235932
+ resolvedTimestamp = Date.now();
235012
235933
  upsertCommentEntity(store, identity.commentId, {
235013
235934
  importedId: identity.importedId,
235014
235935
  isDone: true,
235015
- resolvedTime: Date.now()
235936
+ resolvedTime: resolvedTimestamp
235016
235937
  });
235938
+ }
235017
235939
  return Boolean(didResolve);
235018
235940
  }, { expectedRevision: options?.expectedRevision }).steps[0]?.effect !== "changed")
235019
235941
  return {
@@ -235023,6 +235945,12 @@ function resolveCommentHandler(editor, input2, options) {
235023
235945
  message: "Comment resolve produced no change."
235024
235946
  }
235025
235947
  };
235948
+ emitCommentLifecycleUpdate(editor, "resolved", {
235949
+ commentId: identity.commentId,
235950
+ importedId: identity.importedId,
235951
+ isDone: true,
235952
+ resolvedTime: resolvedTimestamp
235953
+ });
235026
235954
  return {
235027
235955
  success: true,
235028
235956
  updated: [toCommentAddress(identity.commentId)]
@@ -235067,6 +235995,12 @@ function reopenCommentHandler(editor, input2, options) {
235067
235995
  message: "Comment reopen produced no change."
235068
235996
  }
235069
235997
  };
235998
+ emitCommentLifecycleUpdate(editor, "update", {
235999
+ commentId: identity.commentId,
236000
+ importedId: identity.importedId,
236001
+ isDone: false,
236002
+ resolvedTime: null
236003
+ });
235070
236004
  return {
235071
236005
  success: true,
235072
236006
  updated: [toCommentAddress(identity.commentId)]
@@ -235101,6 +236035,11 @@ function removeCommentHandler(editor, input2, options) {
235101
236035
  }
235102
236036
  if (!removedIds.size && didRemove)
235103
236037
  removedIds.add(identity.commentId);
236038
+ for (const removedId of removedIds)
236039
+ emitCommentLifecycleUpdate(editor, "deleted", {
236040
+ commentId: removedId,
236041
+ importedId: removedId === identity.commentId ? identity.importedId : undefined
236042
+ });
235104
236043
  return {
235105
236044
  success: true,
235106
236045
  removed: Array.from(removedIds).map((id2) => toCommentAddress(id2))
@@ -244848,15 +245787,16 @@ function getPayloadVersionForCoverage(coverage) {
244848
245787
  return coverage.headerFooters ? PAYLOAD_VERSION_V2 : PAYLOAD_VERSION_V1;
244849
245788
  }
244850
245789
  function createDiffAdapter(editor) {
245790
+ const diffEditor = editor;
244851
245791
  return {
244852
245792
  capture() {
244853
- return wrapServiceCall(() => captureSnapshot(editor));
245793
+ return wrapServiceCall(() => captureSnapshot(diffEditor));
244854
245794
  },
244855
245795
  compare(input2) {
244856
- return wrapServiceCall(() => compareToSnapshot(editor, input2.targetSnapshot));
245796
+ return wrapServiceCall(() => compareToSnapshot(diffEditor, input2.targetSnapshot));
244857
245797
  },
244858
245798
  apply(input2, options) {
244859
- const { result, tr } = wrapServiceCall(() => applyDiffPayload(editor, input2.diff, options));
245799
+ const { result, tr } = wrapServiceCall(() => applyDiffPayload(diffEditor, input2.diff, options));
244860
245800
  if (tr.docChanged || result.appliedOperations > 0)
244861
245801
  editor.dispatch(tr);
244862
245802
  editor.emit("commentsUpdate", { type: "replayCompleted" });
@@ -306546,13 +307486,13 @@ menclose::after {
306546
307486
  return;
306547
307487
  console.log(...args$1);
306548
307488
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
306549
- var init_src_DXlYP0an_es = __esm(() => {
307489
+ var init_src_Tq4gtGIV_es = __esm(() => {
306550
307490
  init_rolldown_runtime_Bg48TavK_es();
306551
- init_SuperConverter_UqLu6KQU_es();
307491
+ init_SuperConverter_BptSHzcb_es();
306552
307492
  init_jszip_C49i9kUs_es();
306553
307493
  init_xml_js_CqGKpaft_es();
306554
307494
  init_uuid_qzgm05fK_es();
306555
- init_create_headless_toolbar_QcQvy_nD_es();
307495
+ init_create_headless_toolbar_nX0t772H_es();
306556
307496
  init_constants_DrU4EASo_es();
306557
307497
  init_dist_B8HfvhaK_es();
306558
307498
  init_unified_Dsuw2be5_es();
@@ -317917,20 +318857,31 @@ ${err.toString()}`);
317917
318857
  tr = tr.removeMark(from$1, to, linkMarkType);
317918
318858
  if (underlineMarkType) {
317919
318859
  const rangesMissingUnderline = [];
318860
+ const negationMarksToRemove = [];
317920
318861
  tr.doc.nodesBetween(from$1, to, (node3, pos) => {
317921
318862
  if (!node3.isText || node3.nodeSize <= 0)
317922
318863
  return;
317923
- if (node3.marks.some((mark2) => mark2.type === underlineMarkType))
318864
+ const existing = node3.marks.find((mark2) => mark2.type === underlineMarkType);
318865
+ if (existing && existing.attrs?.underlineType !== "none")
317924
318866
  return;
317925
318867
  const rangeFrom = Math.max(pos, from$1);
317926
318868
  const rangeTo = Math.min(pos + node3.nodeSize, to);
317927
318869
  if (rangeFrom >= rangeTo)
317928
318870
  return;
318871
+ if (existing && existing.attrs?.underlineType === "none")
318872
+ negationMarksToRemove.push({
318873
+ from: rangeFrom,
318874
+ to: rangeTo,
318875
+ mark: existing
318876
+ });
317929
318877
  rangesMissingUnderline.push({
317930
318878
  from: rangeFrom,
317931
318879
  to: rangeTo
317932
318880
  });
317933
318881
  });
318882
+ negationMarksToRemove.forEach((range) => {
318883
+ tr = tr.removeMark(range.from, range.to, range.mark);
318884
+ });
317934
318885
  rangesMissingUnderline.forEach((range) => {
317935
318886
  tr = tr.addMark(range.from, range.to, underlineMarkType.create({ autoAdded: true }));
317936
318887
  });
@@ -317961,13 +318912,35 @@ ${err.toString()}`);
317961
318912
  const underlineMarkType = editor.schema.marks.underline;
317962
318913
  let { from: from$1, to } = selection;
317963
318914
  if (selection.empty && linkMarkType) {
317964
- const range = getMarkRange(selection.$from, linkMarkType);
317965
- if (range) {
317966
- from$1 = range.from;
317967
- to = range.to;
318915
+ const initialRange = getMarkRange(selection.$from, linkMarkType);
318916
+ if (initialRange) {
318917
+ from$1 = initialRange.from;
318918
+ to = initialRange.to;
318919
+ } else {
318920
+ const doc$12 = state.doc;
318921
+ const docSize = doc$12.content.size;
318922
+ const probePositions = [
318923
+ selection.from - 1,
318924
+ selection.from,
318925
+ selection.from + 1
318926
+ ].filter((pos) => pos >= 0 && pos <= docSize);
318927
+ for (const pos of probePositions) {
318928
+ const range = getMarkRange(doc$12.resolve(pos), linkMarkType);
318929
+ if (range) {
318930
+ from$1 = range.from;
318931
+ to = range.to;
318932
+ break;
318933
+ }
318934
+ }
317968
318935
  }
317969
318936
  }
317970
- return chain().unsetColor().unsetMark("link", { extendEmptyMarkRange: true }).command(({ tr }) => {
318937
+ const commandChain = chain();
318938
+ if (selection.empty && linkMarkType && from$1 !== to)
318939
+ commandChain.command(({ tr }) => {
318940
+ tr.setSelection(TextSelection.create(tr.doc, from$1, to));
318941
+ return true;
318942
+ });
318943
+ return commandChain.unsetColor().unsetMark("link", { extendEmptyMarkRange: true }).command(({ tr }) => {
317971
318944
  if (underlineMarkType)
317972
318945
  tr.doc.nodesBetween(from$1, to, (node3, pos) => {
317973
318946
  if (!node3.isText)
@@ -318019,6 +318992,23 @@ ${err.toString()}`);
318019
318992
  }
318020
318993
  }, node3.marks);
318021
318994
  });
318995
+ if (linkMarkType) {
318996
+ const runNodeMarkRemovals = [];
318997
+ tr.doc.nodesBetween(from$1, to, (node3, pos) => {
318998
+ if (node3.type.name !== "run")
318999
+ return;
319000
+ if (!node3.marks.some((mark2) => mark2.type === linkMarkType))
319001
+ return;
319002
+ runNodeMarkRemovals.push(pos);
319003
+ });
319004
+ runNodeMarkRemovals.reverse().forEach((pos) => {
319005
+ const mappedPos = tr.mapping.map(pos);
319006
+ const runNode = tr.doc.nodeAt(mappedPos);
319007
+ if (!runNode)
319008
+ return;
319009
+ tr.setNodeMarkup(mappedPos, runNode.type, runNode.attrs, runNode.marks.filter((mark2) => mark2.type !== linkMarkType));
319010
+ });
319011
+ }
318022
319012
  return true;
318023
319013
  }).run();
318024
319014
  },
@@ -328441,6 +329431,7 @@ function print() { __p += __j.call(arguments, '') }
328441
329431
  role = "editor";
328442
329432
  superdoc;
328443
329433
  toolbarContainer = null;
329434
+ toolbar = null;
328444
329435
  constructor(config2) {
328445
329436
  super();
328446
329437
  this.config = {
@@ -330703,7 +331694,7 @@ function print() { __p += __j.call(arguments, '') }
330703
331694
  if (!this.#telemetry || this.#documentOpenTracked)
330704
331695
  return;
330705
331696
  try {
330706
- const documentCreatedAt = this.converter?.getDocumentCreatedTimestamp?.() || null;
331697
+ const documentCreatedAt = this.converter?.getDocumentCreatedTimestamp?.() ?? null;
330707
331698
  this.#telemetry.trackDocumentOpen(documentId, documentCreatedAt);
330708
331699
  this.#documentOpenTracked = true;
330709
331700
  } catch {}
@@ -344274,11 +345265,11 @@ function print() { __p += __j.call(arguments, '') }
344274
345265
  ];
344275
345266
  });
344276
345267
 
344277
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-BuJIur0F.es.js
345268
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-DgOJ39d-.es.js
344278
345269
  var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
344279
- var init_create_super_doc_ui_BuJIur0F_es = __esm(() => {
344280
- init_SuperConverter_UqLu6KQU_es();
344281
- init_create_headless_toolbar_QcQvy_nD_es();
345270
+ var init_create_super_doc_ui_DgOJ39d_es = __esm(() => {
345271
+ init_SuperConverter_BptSHzcb_es();
345272
+ init_create_headless_toolbar_nX0t772H_es();
344282
345273
  MOD_ALIASES = new Set([
344283
345274
  "Mod",
344284
345275
  "Meta",
@@ -344320,16 +345311,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
344320
345311
 
344321
345312
  // ../../packages/superdoc/dist/super-editor.es.js
344322
345313
  var init_super_editor_es = __esm(() => {
344323
- init_src_DXlYP0an_es();
344324
- init_SuperConverter_UqLu6KQU_es();
345314
+ init_src_Tq4gtGIV_es();
345315
+ init_SuperConverter_BptSHzcb_es();
344325
345316
  init_jszip_C49i9kUs_es();
344326
345317
  init_xml_js_CqGKpaft_es();
344327
- init_create_headless_toolbar_QcQvy_nD_es();
345318
+ init_create_headless_toolbar_nX0t772H_es();
344328
345319
  init_constants_DrU4EASo_es();
344329
345320
  init_dist_B8HfvhaK_es();
344330
345321
  init_unified_Dsuw2be5_es();
344331
345322
  init_DocxZipper_CZMPWpOp_es();
344332
- init_create_super_doc_ui_BuJIur0F_es();
345323
+ init_create_super_doc_ui_DgOJ39d_es();
344333
345324
  init_ui_C5PAS9hY_es();
344334
345325
  init_eventemitter3_BnGqBE_Q_es();
344335
345326
  init_errors_CNaD6vcg_es();
@@ -392469,6 +393460,33 @@ function buildHeadlessCommentBridge(ydoc, user) {
392469
393460
  }
392470
393461
  }, { user: userOrigin });
392471
393462
  }
393463
+ let attachedEditor = null;
393464
+ let yArrayObserver = null;
393465
+ let previousSyncedIds = new Set;
393466
+ function syncYArrayToStore() {
393467
+ if (!attachedEditor)
393468
+ return;
393469
+ const entries3 = yArray.toJSON();
393470
+ previousSyncedIds = syncCommentEntitiesFromCollaboration(attachedEditor, entries3, {
393471
+ previouslySynced: previousSyncedIds
393472
+ });
393473
+ }
393474
+ function detachYArrayObserver() {
393475
+ if (yArrayObserver) {
393476
+ yArray.unobserve(yArrayObserver);
393477
+ yArrayObserver = null;
393478
+ }
393479
+ }
393480
+ function attachEditor(editor) {
393481
+ detachYArrayObserver();
393482
+ attachedEditor = editor;
393483
+ previousSyncedIds = new Set;
393484
+ syncYArrayToStore();
393485
+ yArrayObserver = () => {
393486
+ syncYArrayToStore();
393487
+ };
393488
+ yArray.observe(yArrayObserver);
393489
+ }
392472
393490
  return {
392473
393491
  editorOptions: {
392474
393492
  isCommentsEnabled: true,
@@ -392476,13 +393494,18 @@ function buildHeadlessCommentBridge(ydoc, user) {
392476
393494
  onCommentsUpdate: handleCommentsUpdate,
392477
393495
  onCommentsLoaded: handleCommentsLoaded
392478
393496
  },
393497
+ attachEditor,
392479
393498
  dispose() {
393499
+ detachYArrayObserver();
393500
+ attachedEditor = null;
393501
+ previousSyncedIds = new Set;
392480
393502
  registry3.clear();
392481
393503
  }
392482
393504
  };
392483
393505
  }
392484
393506
  var init_headless_comment_bridge = __esm(() => {
392485
393507
  init_yjs();
393508
+ init_super_editor_es();
392486
393509
  });
392487
393510
 
392488
393511
  // src/lib/document.ts
@@ -392597,6 +393620,7 @@ async function openDocument(doc3, io, options2 = {}) {
392597
393620
  });
392598
393621
  }
392599
393622
  initPartsRuntime(editor);
393623
+ commentBridge?.attachEditor(editor);
392600
393624
  if (markdownOverride != null) {
392601
393625
  try {
392602
393626
  const { doc: newDoc } = markdownToPmDoc(markdownOverride, editor);
@@ -393199,6 +394223,18 @@ var init_error_mapping = __esm(() => {
393199
394223
  };
393200
394224
  });
393201
394225
 
394226
+ // src/lib/response-envelope.ts
394227
+ function resolveResponseEnvelopeKey(operationId) {
394228
+ if (!Object.prototype.hasOwnProperty.call(RESPONSE_ENVELOPE_KEY, operationId)) {
394229
+ throw new CliError("OPERATION_HINT_MISSING", `Internal error: operation '${operationId}' has no RESPONSE_ENVELOPE_KEY entry. Add one in apps/cli/src/cli/operation-hints.ts.`);
394230
+ }
394231
+ return RESPONSE_ENVELOPE_KEY[operationId];
394232
+ }
394233
+ var init_response_envelope = __esm(() => {
394234
+ init_operation_hints();
394235
+ init_errors();
394236
+ });
394237
+
393202
394238
  // src/lib/pretty-helpers.ts
393203
394239
  function truncate(text5, maxLen) {
393204
394240
  if (maxLen <= 3)
@@ -394286,8 +395322,7 @@ function invokeOperation(editor, operationId, input2) {
394286
395322
  const postHook = POST_INVOKE_HOOKS[operationId];
394287
395323
  return postHook ? postHook(result2, { editor, apiInput: transformedInput }) : result2;
394288
395324
  }
394289
- function buildEnvelopeData(operationId, document2, result2, input2) {
394290
- const envelopeKey = RESPONSE_ENVELOPE_KEY[operationId];
395325
+ function buildEnvelopeData(operationId, envelopeKey, document2, result2, input2) {
394291
395326
  const echoFields = ECHO_INPUT_FIELDS[operationId];
394292
395327
  const extras = {};
394293
395328
  if (echoFields) {
@@ -394310,6 +395345,7 @@ function buildPrettyOutput(operationId, document2, result2) {
394310
395345
  }
394311
395346
  async function executeReadOperation(request) {
394312
395347
  const { operationId, input: input2, context } = request;
395348
+ const envelopeKey = resolveResponseEnvelopeKey(operationId);
394313
395349
  const doc3 = readOptionalString(input2, "doc");
394314
395350
  const commandName = deriveCommandName(operationId);
394315
395351
  if (doc3) {
@@ -394325,7 +395361,7 @@ async function executeReadOperation(request) {
394325
395361
  };
394326
395362
  return {
394327
395363
  command: commandName,
394328
- data: buildEnvelopeData(operationId, document2, result2, input2),
395364
+ data: buildEnvelopeData(operationId, envelopeKey, document2, result2, input2),
394329
395365
  pretty: buildPrettyOutput(operationId, document2, result2)
394330
395366
  };
394331
395367
  } finally {
@@ -394351,7 +395387,7 @@ async function executeReadOperation(request) {
394351
395387
  };
394352
395388
  return {
394353
395389
  command: commandName,
394354
- data: buildEnvelopeData(operationId, document3, result2, input2),
395390
+ data: buildEnvelopeData(operationId, envelopeKey, document3, result2, input2),
394355
395391
  pretty: buildPrettyOutput(operationId, document3, result2)
394356
395392
  };
394357
395393
  }
@@ -394363,7 +395399,7 @@ async function executeReadOperation(request) {
394363
395399
  };
394364
395400
  return {
394365
395401
  command: commandName,
394366
- data: buildEnvelopeData(operationId, document2, result2, input2),
395402
+ data: buildEnvelopeData(operationId, envelopeKey, document2, result2, input2),
394367
395403
  pretty: buildPrettyOutput(operationId, document2, result2)
394368
395404
  };
394369
395405
  } finally {
@@ -394378,6 +395414,7 @@ var init_read_orchestrator = __esm(() => {
394378
395414
  init_context();
394379
395415
  init_document();
394380
395416
  init_error_mapping();
395417
+ init_response_envelope();
394381
395418
  init_output_formatters();
394382
395419
  init_session_collab();
394383
395420
  init_special_handlers();
@@ -394412,8 +395449,7 @@ function invokeOperation2(editor, operationId, input2, options2) {
394412
395449
  const postHook = POST_INVOKE_HOOKS[operationId];
394413
395450
  return postHook ? postHook(result2, { editor, apiInput: transformedInput }) : result2;
394414
395451
  }
394415
- function buildEnvelopeData2(operationId, document2, result2, extras) {
394416
- const envelopeKey = RESPONSE_ENVELOPE_KEY[operationId];
395452
+ function buildEnvelopeData2(envelopeKey, document2, result2, extras) {
394417
395453
  if (envelopeKey === null) {
394418
395454
  const resultObj = typeof result2 === "object" && result2 != null ? result2 : {};
394419
395455
  return { document: document2, ...resultObj, ...extras };
@@ -394430,6 +395466,7 @@ function buildPrettyOutput2(operationId, document2, result2, outputPath) {
394430
395466
  }
394431
395467
  async function executeMutationOperation(request) {
394432
395468
  const { operationId, input: input2, context } = request;
395469
+ const envelopeKey = resolveResponseEnvelopeKey(operationId);
394433
395470
  const doc3 = readOptionalString(input2, "doc");
394434
395471
  const outPath = readOptionalString(input2, "out");
394435
395472
  const dryRun = readBoolean(input2, "dryRun");
@@ -394467,7 +395504,7 @@ async function executeMutationOperation(request) {
394467
395504
  return {
394468
395505
  command: commandName,
394469
395506
  data: {
394470
- ...buildEnvelopeData2(operationId, document2, result2, { changeMode, dryRun: true }),
395507
+ ...buildEnvelopeData2(envelopeKey, document2, result2, { changeMode, dryRun: true }),
394471
395508
  output: outPath ? { path: outPath, skippedWrite: true } : undefined
394472
395509
  },
394473
395510
  pretty: `Revision 0: dry run`
@@ -394476,7 +395513,7 @@ async function executeMutationOperation(request) {
394476
395513
  const output = outPath ? await exportToPath(opened.editor, outPath, force) : undefined;
394477
395514
  return {
394478
395515
  command: commandName,
394479
- data: buildEnvelopeData2(operationId, document2, result2, {
395516
+ data: buildEnvelopeData2(envelopeKey, document2, result2, {
394480
395517
  changeMode,
394481
395518
  dryRun: false,
394482
395519
  output
@@ -394507,7 +395544,7 @@ async function executeMutationOperation(request) {
394507
395544
  return {
394508
395545
  command: commandName,
394509
395546
  data: {
394510
- ...buildEnvelopeData2(operationId, document3, result2, { changeMode, dryRun: true }),
395547
+ ...buildEnvelopeData2(envelopeKey, document3, result2, { changeMode, dryRun: true }),
394511
395548
  context: { dirty: metadata.dirty, revision: metadata.revision },
394512
395549
  output: outPath ? { path: outPath, skippedWrite: true } : undefined
394513
395550
  },
@@ -394547,7 +395584,7 @@ async function executeMutationOperation(request) {
394547
395584
  };
394548
395585
  return {
394549
395586
  command: commandName,
394550
- data: buildEnvelopeData2(operationId, document2, result2, {
395587
+ data: buildEnvelopeData2(envelopeKey, document2, result2, {
394551
395588
  changeMode,
394552
395589
  dryRun: false,
394553
395590
  context: { dirty: updatedMetadata.dirty, revision: updatedMetadata.revision },
@@ -394577,6 +395614,7 @@ var init_mutation_orchestrator = __esm(() => {
394577
395614
  init_error_mapping();
394578
395615
  init_errors();
394579
395616
  init_output_formatters();
395617
+ init_response_envelope();
394580
395618
  init_session_collab();
394581
395619
  init_special_handlers();
394582
395620
  init_input_readers();