@beyondwork/docx-react-component 1.0.41 → 1.0.43

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 (118) hide show
  1. package/package.json +38 -37
  2. package/src/api/awareness-identity-types.ts +35 -0
  3. package/src/api/comment-negotiation-types.ts +130 -0
  4. package/src/api/comment-presentation-types.ts +106 -0
  5. package/src/api/editor-state-types.ts +110 -0
  6. package/src/api/external-custody-types.ts +74 -0
  7. package/src/api/participants-types.ts +18 -0
  8. package/src/api/public-types.ts +541 -5
  9. package/src/api/scope-metadata-resolver-types.ts +88 -0
  10. package/src/core/commands/formatting-commands.ts +1 -1
  11. package/src/core/commands/index.ts +601 -9
  12. package/src/core/search/search-text.ts +15 -2
  13. package/src/index.ts +131 -1
  14. package/src/io/docx-session.ts +672 -2
  15. package/src/io/export/escape-xml-attribute.ts +26 -0
  16. package/src/io/export/external-send.ts +188 -0
  17. package/src/io/export/serialize-comments.ts +13 -16
  18. package/src/io/export/serialize-footnotes.ts +17 -24
  19. package/src/io/export/serialize-headers-footers.ts +17 -24
  20. package/src/io/export/serialize-main-document.ts +59 -62
  21. package/src/io/export/serialize-numbering.ts +20 -27
  22. package/src/io/export/serialize-runtime-revisions.ts +2 -9
  23. package/src/io/export/serialize-tables.ts +8 -15
  24. package/src/io/export/table-properties-xml.ts +25 -32
  25. package/src/io/import/external-reimport.ts +40 -0
  26. package/src/io/load-scheduler.ts +230 -0
  27. package/src/io/normalize/normalize-text.ts +83 -0
  28. package/src/io/ooxml/bw-xml.ts +244 -0
  29. package/src/io/ooxml/canonicalize-payload.ts +301 -0
  30. package/src/io/ooxml/comment-negotiation-payload.ts +288 -0
  31. package/src/io/ooxml/comment-presentation-payload.ts +311 -0
  32. package/src/io/ooxml/external-custody-payload.ts +102 -0
  33. package/src/io/ooxml/participants-payload.ts +97 -0
  34. package/src/io/ooxml/payload-signature.ts +112 -0
  35. package/src/io/ooxml/workflow-payload-validator.ts +367 -0
  36. package/src/io/ooxml/workflow-payload.ts +317 -7
  37. package/src/runtime/awareness-identity.ts +173 -0
  38. package/src/runtime/collab/event-types.ts +27 -0
  39. package/src/runtime/collab-session-bridge.ts +157 -0
  40. package/src/runtime/collab-session-facet.ts +193 -0
  41. package/src/runtime/collab-session.ts +273 -0
  42. package/src/runtime/comment-negotiation-sync.ts +91 -0
  43. package/src/runtime/comment-negotiation.ts +158 -0
  44. package/src/runtime/comment-presentation.ts +223 -0
  45. package/src/runtime/document-runtime.ts +639 -124
  46. package/src/runtime/editor-state-channel.ts +544 -0
  47. package/src/runtime/editor-state-integration.ts +217 -0
  48. package/src/runtime/external-send-runtime.ts +117 -0
  49. package/src/runtime/layout/docx-font-loader.ts +11 -30
  50. package/src/runtime/layout/index.ts +2 -0
  51. package/src/runtime/layout/inert-layout-facet.ts +4 -0
  52. package/src/runtime/layout/layout-engine-instance.ts +139 -14
  53. package/src/runtime/layout/page-graph.ts +79 -7
  54. package/src/runtime/layout/paginated-layout-engine.ts +441 -48
  55. package/src/runtime/layout/public-facet.ts +585 -14
  56. package/src/runtime/layout/table-row-split.ts +316 -0
  57. package/src/runtime/markdown-sanitizer.ts +132 -0
  58. package/src/runtime/participants.ts +134 -0
  59. package/src/runtime/perf-counters.ts +28 -0
  60. package/src/runtime/render/render-frame-types.ts +17 -0
  61. package/src/runtime/render/render-kernel.ts +172 -29
  62. package/src/runtime/resign-payload.ts +120 -0
  63. package/src/runtime/surface-projection.ts +10 -5
  64. package/src/runtime/tamper-gate.ts +157 -0
  65. package/src/runtime/workflow-markup.ts +80 -16
  66. package/src/runtime/workflow-rail-segments.ts +244 -5
  67. package/src/ui/WordReviewEditor.tsx +654 -45
  68. package/src/ui/editor-command-bag.ts +14 -0
  69. package/src/ui/editor-runtime-boundary.ts +111 -11
  70. package/src/ui/editor-shell-view.tsx +21 -0
  71. package/src/ui/editor-surface-controller.tsx +5 -0
  72. package/src/ui/headless/selection-helpers.ts +10 -0
  73. package/src/ui-tailwind/chrome/chrome-preset-model.ts +28 -0
  74. package/src/ui-tailwind/chrome/chrome-preset-toolbar.tsx +62 -2
  75. package/src/ui-tailwind/chrome/collab-audience-chip.tsx +73 -0
  76. package/src/ui-tailwind/chrome/collab-negotiation-action-bar.tsx +244 -0
  77. package/src/ui-tailwind/chrome/collab-presence-strip.tsx +150 -0
  78. package/src/ui-tailwind/chrome/collab-role-chip.tsx +62 -0
  79. package/src/ui-tailwind/chrome/collab-send-to-supplier-button.tsx +68 -0
  80. package/src/ui-tailwind/chrome/collab-send-to-supplier-modal.tsx +149 -0
  81. package/src/ui-tailwind/chrome/collab-tamper-banner.tsx +68 -0
  82. package/src/ui-tailwind/chrome/collab-top-nav-container.tsx +281 -0
  83. package/src/ui-tailwind/chrome/forward-non-drag-click.ts +104 -0
  84. package/src/ui-tailwind/chrome/tw-mode-dock.tsx +1 -0
  85. package/src/ui-tailwind/chrome/tw-selection-tool-host.tsx +7 -1
  86. package/src/ui-tailwind/chrome/tw-table-grip-layer.tsx +1 -38
  87. package/src/ui-tailwind/chrome-overlay/index.ts +6 -0
  88. package/src/ui-tailwind/chrome-overlay/scope-card-role-model.ts +78 -0
  89. package/src/ui-tailwind/chrome-overlay/scope-keyboard-cycle.ts +49 -0
  90. package/src/ui-tailwind/chrome-overlay/tw-chrome-overlay.tsx +106 -0
  91. package/src/ui-tailwind/chrome-overlay/tw-page-stack-overlay-layer.tsx +527 -0
  92. package/src/ui-tailwind/chrome-overlay/tw-scope-card-layer.tsx +120 -22
  93. package/src/ui-tailwind/chrome-overlay/tw-scope-card.tsx +310 -32
  94. package/src/ui-tailwind/chrome-overlay/tw-scope-rail-layer.tsx +93 -14
  95. package/src/ui-tailwind/editor-surface/paste-plain-text.ts +72 -0
  96. package/src/ui-tailwind/editor-surface/pm-command-bridge.ts +118 -8
  97. package/src/ui-tailwind/editor-surface/pm-decorations.ts +35 -1
  98. package/src/ui-tailwind/editor-surface/pm-page-break-decorations.ts +86 -3
  99. package/src/ui-tailwind/editor-surface/pm-schema.ts +167 -17
  100. package/src/ui-tailwind/editor-surface/pm-state-from-snapshot.ts +35 -7
  101. package/src/ui-tailwind/editor-surface/remote-cursor-plugin.ts +20 -3
  102. package/src/ui-tailwind/editor-surface/tw-page-block-view.helpers.ts +265 -0
  103. package/src/ui-tailwind/editor-surface/tw-page-block-view.tsx +10 -256
  104. package/src/ui-tailwind/editor-surface/tw-prosemirror-surface.tsx +9 -0
  105. package/src/ui-tailwind/editor-surface/tw-table-node-view.tsx +66 -0
  106. package/src/ui-tailwind/index.ts +37 -1
  107. package/src/ui-tailwind/page-stack/tw-endnote-area.tsx +57 -0
  108. package/src/ui-tailwind/page-stack/tw-footnote-area.tsx +71 -0
  109. package/src/ui-tailwind/page-stack/tw-page-footer-band.tsx +73 -0
  110. package/src/ui-tailwind/page-stack/tw-page-header-band.tsx +74 -0
  111. package/src/ui-tailwind/page-stack/tw-page-stack-chrome-layer.tsx +477 -0
  112. package/src/ui-tailwind/page-stack/tw-region-block-renderer.tsx +374 -0
  113. package/src/ui-tailwind/review/comment-markdown-renderer.tsx +155 -0
  114. package/src/ui-tailwind/review/tw-comment-sidebar.tsx +77 -16
  115. package/src/ui-tailwind/review/tw-review-rail-footer.tsx +29 -3
  116. package/src/ui-tailwind/status/tw-status-bar.tsx +52 -1
  117. package/src/ui-tailwind/theme/editor-theme.css +25 -0
  118. package/src/ui-tailwind/tw-review-workspace.tsx +455 -118
package/src/index.ts CHANGED
@@ -8,7 +8,114 @@ export {
8
8
  EDITOR_SESSION_STATE_VERSION,
9
9
  } from "./api/session-state.ts";
10
10
  // R2 — issue metadata id for scope-card-overlay P1.
11
- export { ISSUE_METADATA_ID } from "./api/public-types.ts";
11
+ // K1-light review-action metadata id for scope-card-overlay P2.
12
+ export { ISSUE_METADATA_ID, REVIEW_ACTION_METADATA_ID } from "./api/public-types.ts";
13
+ // P17 — metadata persistence error class.
14
+ export { MetadataResolverMissingError } from "./api/public-types.ts";
15
+
16
+ // Collab substrate (P1 – P8f + P14). See docs/plans/collab-master-plan.md
17
+ // for the shipped-slice table. Surfaces are stable for host integration;
18
+ // the chrome preset + markdown renderer land in P9 / P10.
19
+ export { createCollabSession } from "./runtime/collab-session.ts";
20
+ export { createCollabSessionBridge } from "./runtime/collab-session-bridge.ts";
21
+ export { createCollabSessionFacet } from "./runtime/collab-session-facet.ts";
22
+ export { createTamperGate } from "./runtime/tamper-gate.ts";
23
+ export { resignPayload } from "./runtime/resign-payload.ts";
24
+ export {
25
+ setLocalIdentity,
26
+ clearLocalIdentity,
27
+ getPresenceSnapshot,
28
+ getCollabPosture,
29
+ } from "./runtime/awareness-identity.ts";
30
+ export { runtimeSendToExternal } from "./runtime/external-send-runtime.ts";
31
+ export { sendToExternal } from "./io/export/external-send.ts";
32
+ export { maybeRestoreFromExternalCustody } from "./io/import/external-reimport.ts";
33
+ export {
34
+ signWorkflowPayloadXml,
35
+ verifyWorkflowPayloadXml,
36
+ createHmacSigner,
37
+ createHmacVerifier,
38
+ } from "./io/ooxml/payload-signature.ts";
39
+ export type {
40
+ // Collab types
41
+ CollabSession,
42
+ CollabSessionOptions,
43
+ CollabSessionEventOrIntegrity,
44
+ AttachPayloadArgs,
45
+ SendToExternalCallArgs,
46
+ } from "./runtime/collab-session.ts";
47
+ export type {
48
+ CollabSessionBridge,
49
+ CollabSessionEvent,
50
+ CreateCollabSessionBridgeOptions,
51
+ } from "./runtime/collab-session-bridge.ts";
52
+ export type {
53
+ CollabSessionFacet,
54
+ DispatchContext,
55
+ DispatchResult,
56
+ } from "./runtime/collab-session-facet.ts";
57
+ export type {
58
+ TamperGate,
59
+ TamperGateEvent,
60
+ MetadataIntegrity,
61
+ TamperGateArgs,
62
+ AttachArgs as TamperGateAttachArgs,
63
+ GuardResult as TamperGateGuardResult,
64
+ } from "./runtime/tamper-gate.ts";
65
+ export type {
66
+ RuntimeSendToExternalArgs,
67
+ RuntimeSendToExternalResult,
68
+ } from "./runtime/external-send-runtime.ts";
69
+ export type {
70
+ CommentNegotiationAction,
71
+ CommentNegotiationEntry,
72
+ CommentNegotiationSnapshot,
73
+ CommentNegotiationState,
74
+ CommentNegotiationActionType,
75
+ NegotiationHistoryRow,
76
+ NegotiationVote,
77
+ NegotiationCounterProposal,
78
+ NegotiationBlockReason,
79
+ NegotiationRole,
80
+ CollabBlockReason,
81
+ } from "./api/comment-negotiation-types.ts";
82
+ export type {
83
+ CommentPresentation,
84
+ CommentPresentationAction,
85
+ CommentPresentationSnapshot,
86
+ CommentPresentationReply,
87
+ CommentBody,
88
+ CommentAttachment,
89
+ CommentAudience,
90
+ CommentLabel,
91
+ CommentMention,
92
+ CommentReaction,
93
+ } from "./api/comment-presentation-types.ts";
94
+ export type {
95
+ Participant,
96
+ ParticipantRoster,
97
+ ParticipantRole,
98
+ AuthorKind,
99
+ } from "./api/participants-types.ts";
100
+ export type {
101
+ AwarenessIdentity,
102
+ AwarenessPeer,
103
+ CollabPosture,
104
+ PresenceSnapshot,
105
+ TransportStatus,
106
+ } from "./api/awareness-identity-types.ts";
107
+ export type {
108
+ ExternalCustody,
109
+ ExternalCustodyResolver,
110
+ ExternalCustodyArchivePayload,
111
+ ExternalCustodyRestoredContent,
112
+ } from "./api/external-custody-types.ts";
113
+ export type {
114
+ PayloadSignature,
115
+ PayloadSigner,
116
+ PayloadVerifier,
117
+ SignatureAlgorithm,
118
+ } from "./io/ooxml/payload-signature.ts";
12
119
  export type {
13
120
  LoadRequest,
14
121
  LoadSourcePolicy,
@@ -113,6 +220,11 @@ export type {
113
220
  IssueMetadataValue,
114
221
  ScopeIssueAction,
115
222
  ScopeCardModel,
223
+ // R3 — suggestion groups (scope-card-overlay P2)
224
+ SuggestionGroup,
225
+ // K1-light — review-action audit trail (scope-card-overlay P2)
226
+ ReviewActionKind,
227
+ ReviewActionMetadataValue,
116
228
  WorkflowBlockedCommandReason,
117
229
  WorkflowScopeSnapshot,
118
230
  InteractionGuardSnapshot,
@@ -150,4 +262,22 @@ export type {
150
262
  RuntimeContextAnalyticsUnavailableField,
151
263
  RuntimeContextAnalyticsProvenance,
152
264
  RuntimeContextAnalyticsSnapshot,
265
+ // P17 — metadata persistence types (schema 1.1)
266
+ MetadataPersistenceMode,
267
+ ScopeMetadataPersistence,
268
+ ScopeMetadataResolver,
269
+ ScopeMetadataStorageRef,
270
+ // Schema 1.2 — editor-state persistence types
271
+ EditorStateNamespace,
272
+ EditorStateLocation,
273
+ EditorStateResolveErrorMode,
274
+ EditorStatePolicyEntry,
275
+ EditorStatePolicy,
276
+ EditorStateStorageRef,
277
+ EditorStateBlob,
278
+ EditorStateResolver,
279
+ EditorStatePersister,
280
+ EditorStatePolicyMigration,
281
+ EditorStatePartLoadFailure,
282
+ EditorStatePartPersistFailure,
153
283
  } from "./api/public-types.ts";