@stll/folio-core 0.75.0 → 0.76.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 (92) hide show
  1. package/dist/ai-edits/headless.d.ts +2 -1
  2. package/dist/ai-edits/headless.js +18 -12
  3. package/dist/ai-edits/pending-suggestions.js +2 -3
  4. package/dist/ai-edits/read.js +9 -3
  5. package/dist/ai-edits/types.d.ts +9 -4
  6. package/dist/canonical/batchCommentReferences.js +2 -1
  7. package/dist/canonical/canonicalBatchReview.js +5 -8
  8. package/dist/canonical/canonicalComments.js +8 -2
  9. package/dist/canonical/canonicalCompilerRefusal.d.ts +2 -4
  10. package/dist/canonical/canonicalCompilerRefusal.js +20 -14
  11. package/dist/canonical/canonicalPublicOperations.js +203 -71
  12. package/dist/canonical/canonicalSession.js +3 -1
  13. package/dist/controller/canonicalClipboard.d.ts +1 -1
  14. package/dist/controller/canonicalClipboard.js +71 -17
  15. package/dist/controller/canonicalContentControlValue.js +7 -7
  16. package/dist/controller/canonicalReview.d.ts +21 -0
  17. package/dist/controller/canonicalReview.js +44 -9
  18. package/dist/controller/canonicalStructure.d.ts +1 -2
  19. package/dist/controller/canonicalStructure.js +51 -24
  20. package/dist/controller/fontReadiness.js +50 -23
  21. package/dist/controller/hiddenEditorManager.js +5 -20
  22. package/dist/docx/bulletMarkers.d.ts +8 -0
  23. package/dist/docx/bulletMarkers.js +9 -1
  24. package/dist/docx/canonicalSessionInput.js +25 -11
  25. package/dist/docx/ensureParaIds.d.ts +31 -0
  26. package/dist/docx/ensureParaIds.js +57 -32
  27. package/dist/docx/ensureUniqueControlIds.d.ts +13 -0
  28. package/dist/docx/ensureUniqueControlIds.js +47 -29
  29. package/dist/docx/ensureUniqueRevisionIds.d.ts +13 -0
  30. package/dist/docx/ensureUniqueRevisionIds.js +52 -29
  31. package/dist/docx/server/templatePlan/apply.js +62 -8
  32. package/dist/docx/server/templatePlan/blocks.d.ts +55 -3
  33. package/dist/docx/server/templatePlan/blocks.js +182 -6
  34. package/dist/docx/server/templatePlan/builders.d.ts +16 -1
  35. package/dist/docx/server/templatePlan/builders.js +31 -3
  36. package/dist/docx/server/templatePlan/effects.d.ts +27 -0
  37. package/dist/docx/server/templatePlan/effects.js +188 -0
  38. package/dist/docx/server/templatePlan/emit.d.ts +2 -1
  39. package/dist/docx/server/templatePlan/emit.js +44 -2
  40. package/dist/docx/server/templatePlan/inspect.js +21 -1
  41. package/dist/docx/server/templatePlan/labels.js +16 -1
  42. package/dist/docx/server/templatePlan/plan.d.ts +12 -3
  43. package/dist/docx/server/templatePlan/plan.js +36 -12
  44. package/dist/docx/server/templatePlan/planShape.js +47 -22
  45. package/dist/docx/server/templatePlan/revisions.d.ts +46 -0
  46. package/dist/docx/server/templatePlan/revisions.js +407 -0
  47. package/dist/docx/server/templatePlan/story.d.ts +15 -1
  48. package/dist/docx/server/templatePlan/story.js +50 -2
  49. package/dist/docx/server/templatePlan/types.d.ts +217 -1
  50. package/dist/docx/server/templatePlan/verify.js +117 -8
  51. package/dist/docx/server/templatePlan/xml.d.ts +3 -0
  52. package/dist/docx/server/templatePlan/xml.js +4 -1
  53. package/dist/internal/revisionResolutionStep.d.ts +2 -31
  54. package/dist/internal/revisionResolutionStep.js +2 -171
  55. package/dist/prosemirror/commands/comments.d.ts +6 -234
  56. package/dist/prosemirror/commands/comments.js +5 -2464
  57. package/dist/prosemirror/commands/index.d.ts +4 -2
  58. package/dist/prosemirror/commands/index.js +4 -2
  59. package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +1 -11
  60. package/dist/prosemirror/commands/tableCellMergeResolution.js +3 -154
  61. package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +6 -8
  62. package/dist/prosemirror/hyperlinkRemoval.d.ts +11 -8
  63. package/dist/prosemirror/hyperlinkRemoval.js +24 -15
  64. package/dist/prosemirror/paraIds.d.ts +1 -14
  65. package/dist/prosemirror/paraIds.js +1 -14
  66. package/dist/prosemirror/paragraphMarkJoin.d.ts +0 -16
  67. package/dist/prosemirror/paragraphMarkJoin.js +3 -46
  68. package/dist/prosemirror/projectionReview.d.ts +49 -0
  69. package/dist/prosemirror/projectionReview.js +292 -0
  70. package/dist/prosemirror/rebaseParagraphRunFormatting.d.ts +1 -13
  71. package/dist/prosemirror/rebaseParagraphRunFormatting.js +1 -16
  72. package/dist/prosemirror/replacedAnnotations.d.ts +2 -5
  73. package/dist/prosemirror/replacedAnnotations.js +1 -10
  74. package/dist/prosemirror/revisionCarriers.d.ts +9 -1
  75. package/dist/prosemirror/revisionCarriers.js +15 -1
  76. package/dist/prosemirror/revisionRangeQueries.d.ts +32 -0
  77. package/dist/prosemirror/revisionRangeQueries.js +76 -0
  78. package/dist/prosemirror/runFormattingMarkNames.d.ts +1 -1
  79. package/dist/prosemirror/runFormattingMarkNames.js +1 -1
  80. package/dist/prosemirror/suggestionQueries.d.ts +114 -0
  81. package/dist/prosemirror/suggestionQueries.js +320 -0
  82. package/dist/prosemirror/tableGridMutation.d.ts +1 -16
  83. package/dist/prosemirror/tableGridMutation.js +1 -78
  84. package/dist/prosemirror/tableRowRevisionOwnership.d.ts +18 -0
  85. package/dist/prosemirror/tableRowRevisionOwnership.js +7 -0
  86. package/dist/prosemirror/utils/extractTrackedChanges.js +14 -4
  87. package/dist/server.d.ts +2 -2
  88. package/dist/types/canonicalCapabilities.d.ts +1 -25
  89. package/dist/types/canonicalCapabilities.js +1 -23
  90. package/package.json +2 -2
  91. package/dist/internal/headlessRevisionResolutionGuard.d.ts +0 -3
  92. package/dist/internal/headlessRevisionResolutionGuard.js +0 -18
@@ -1,12 +1,9 @@
1
1
  // src/types/canonicalCapabilities.ts
2
2
  /** Remaining seams to retire before the canonical session becomes the only authority. */
3
3
  const CANONICAL_GAP = {
4
- commands: "command-descriptors",
5
4
  trackedTableStructure: "tracked-table-structure",
6
5
  storyContentProjection: "story-content-projection",
7
6
  trackedChangeRecords: "tracked-change-records",
8
- publicComments: "publicOps.comments",
9
- publicUnsupportedInline: "publicOps.unsupportedInline",
10
7
  commentReplacementAlignment: "comment-replacement-alignment",
11
8
  publicHeadlessSession: "publicOps.headlessSession"
12
9
  };
@@ -86,18 +83,11 @@ const canonicalRefusalNotice = (ground, translate) => {
86
83
  return translate(CANONICAL_GAP_MESSAGE_KEY);
87
84
  };
88
85
  const CANONICAL_CAPABILITIES = {
89
- [CANONICAL_GAP.commands]: {
90
- remainingCommands: { registry: "extension-commands" },
91
- owner: "controller",
92
- kind: "refusal",
93
- adapters: ["react", "vue"],
94
- summary: "Commands without canonical descriptors retain PM probing and hit the dispatch boundary."
95
- },
96
86
  [CANONICAL_GAP.trackedTableStructure]: {
97
87
  owner: "controller",
98
88
  kind: "refusal",
99
89
  adapters: ["react", "vue"],
100
- summary: "Suggested row, column and table changes refuse content the tracked table records cannot express; a dragged table refuses to move."
90
+ summary: "Suggested table changes refuse markup the tracked table records cannot express: a row insertion or deletion in a table holding captured markup, wrapper stacks or row content controls; a column or cell edit in a table whose rows keep captured markup between their cells; a table inserted or deleted with captured markup, bookmarks, wrapper stacks or property revisions; a column deletion through a cell spanning other columns."
101
91
  },
102
92
  [CANONICAL_GAP.storyContentProjection]: {
103
93
  owner: "controller",
@@ -111,18 +101,6 @@ const CANONICAL_CAPABILITIES = {
111
101
  adapters: ["react", "vue"],
112
102
  summary: "A suggested change whose content the tracked-change records cannot express is refused: comment boundaries in a tracked range, paragraph-mark run properties, a join at a section break, a record inside a field."
113
103
  },
114
- [CANONICAL_GAP.publicComments]: {
115
- owner: "document-operations",
116
- kind: "refusal",
117
- adapters: ["react", "vue"],
118
- summary: "Public comment edits refuse when their anchors or revision structure cannot be represented."
119
- },
120
- [CANONICAL_GAP.publicUnsupportedInline]: {
121
- owner: "document-operations",
122
- kind: "refusal",
123
- adapters: ["react", "vue"],
124
- summary: "Unsupported public payloads refuse with a typed compiler capability gap."
125
- },
126
104
  [CANONICAL_GAP.commentReplacementAlignment]: {
127
105
  owner: "controller",
128
106
  kind: "refusal",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/folio-core",
3
- "version": "0.75.0",
3
+ "version": "0.76.0",
4
4
  "description": "Headless DOCX engine: reads .docx into a typed OOXML model, applies every edit as a validated operation, paginates it, and writes .docx back with untouched parts byte for byte.",
5
5
  "keywords": [
6
6
  "document-model",
@@ -173,7 +173,7 @@
173
173
  "perf": "bun scripts/profile-editor.ts"
174
174
  },
175
175
  "dependencies": {
176
- "@stll/docx-core": "^0.46.0",
176
+ "@stll/docx-core": "^0.47.0",
177
177
  "@stll/template-conditions": "^0.7.0",
178
178
  "@stll/utf8-boundaries": "0.2.0",
179
179
  "better-result": "3.0.1",
@@ -1,3 +0,0 @@
1
- import { Plugin } from "prosemirror-state";
2
- /** Build the private plugin set for synchronous headless review states. */
3
- export declare const pluginsForHeadlessRevisionResolution: (plugins: readonly Plugin[]) => readonly Plugin[];
@@ -1,18 +0,0 @@
1
- // src/internal/headlessRevisionResolutionGuard.ts
2
- const UNSAFE_PLUGIN_KEY_PREFIXES = [
3
- "collab$",
4
- "history$",
5
- "y-sync$",
6
- "y-undo$"
7
- ];
8
- const pluginRuntimeKey = (plugin) => {
9
- const key = Reflect.get(plugin, "key");
10
- return typeof key === "string" ? key : null;
11
- };
12
- const retainsOrTransportsSteps = (plugin) => {
13
- const key = pluginRuntimeKey(plugin);
14
- return key !== null && UNSAFE_PLUGIN_KEY_PREFIXES.some((prefix) => key.startsWith(prefix));
15
- };
16
- /** Build the private plugin set for synchronous headless review states. */
17
- const pluginsForHeadlessRevisionResolution = (plugins) => plugins.filter((plugin) => !retainsOrTransportsSteps(plugin));
18
- export { pluginsForHeadlessRevisionResolution };