@portabletext/editor 1.39.0 → 1.40.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 (109) hide show
  1. package/lib/_chunks-cjs/behavior.core.cjs +16 -5
  2. package/lib/_chunks-cjs/behavior.core.cjs.map +1 -1
  3. package/lib/_chunks-cjs/editor-provider.cjs +158 -153
  4. package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
  5. package/lib/_chunks-cjs/selector.get-text-before.cjs +0 -1
  6. package/lib/_chunks-cjs/selector.get-text-before.cjs.map +1 -1
  7. package/lib/_chunks-cjs/selector.is-at-the-start-of-block.cjs +0 -3
  8. package/lib/_chunks-cjs/selector.is-at-the-start-of-block.cjs.map +1 -1
  9. package/lib/_chunks-cjs/selector.is-overlapping-selection.cjs +0 -4
  10. package/lib/_chunks-cjs/selector.is-overlapping-selection.cjs.map +1 -1
  11. package/lib/_chunks-cjs/{parse-blocks.cjs → util.selection-point-to-block-offset.cjs} +74 -4
  12. package/lib/_chunks-cjs/util.selection-point-to-block-offset.cjs.map +1 -0
  13. package/lib/_chunks-cjs/util.slice-blocks.cjs +2 -2
  14. package/lib/_chunks-cjs/util.slice-blocks.cjs.map +1 -1
  15. package/lib/_chunks-cjs/util.split-text-block.cjs +68 -0
  16. package/lib/_chunks-cjs/util.split-text-block.cjs.map +1 -0
  17. package/lib/_chunks-es/behavior.core.js +17 -6
  18. package/lib/_chunks-es/behavior.core.js.map +1 -1
  19. package/lib/_chunks-es/editor-provider.js +155 -150
  20. package/lib/_chunks-es/editor-provider.js.map +1 -1
  21. package/lib/_chunks-es/selector.get-text-before.js +1 -2
  22. package/lib/_chunks-es/selector.get-text-before.js.map +1 -1
  23. package/lib/_chunks-es/selector.is-at-the-start-of-block.js +1 -4
  24. package/lib/_chunks-es/selector.is-at-the-start-of-block.js.map +1 -1
  25. package/lib/_chunks-es/selector.is-overlapping-selection.js +1 -5
  26. package/lib/_chunks-es/selector.is-overlapping-selection.js.map +1 -1
  27. package/lib/_chunks-es/{parse-blocks.js → util.selection-point-to-block-offset.js} +76 -5
  28. package/lib/_chunks-es/util.selection-point-to-block-offset.js.map +1 -0
  29. package/lib/_chunks-es/util.slice-blocks.js +2 -2
  30. package/lib/_chunks-es/util.slice-blocks.js.map +1 -1
  31. package/lib/_chunks-es/util.split-text-block.js +70 -0
  32. package/lib/_chunks-es/util.split-text-block.js.map +1 -0
  33. package/lib/behaviors/index.d.cts +1516 -911
  34. package/lib/behaviors/index.d.ts +1516 -911
  35. package/lib/index.cjs +197 -200
  36. package/lib/index.cjs.map +1 -1
  37. package/lib/index.d.cts +1247 -717
  38. package/lib/index.d.ts +1247 -717
  39. package/lib/index.js +204 -207
  40. package/lib/index.js.map +1 -1
  41. package/lib/plugins/index.cjs +11 -12
  42. package/lib/plugins/index.cjs.map +1 -1
  43. package/lib/plugins/index.d.cts +1238 -721
  44. package/lib/plugins/index.d.ts +1238 -721
  45. package/lib/plugins/index.js +3 -4
  46. package/lib/plugins/index.js.map +1 -1
  47. package/lib/selectors/index.d.cts +1237 -710
  48. package/lib/selectors/index.d.ts +1237 -710
  49. package/lib/utils/index.cjs +15 -87
  50. package/lib/utils/index.cjs.map +1 -1
  51. package/lib/utils/index.d.cts +1290 -713
  52. package/lib/utils/index.d.ts +1290 -713
  53. package/lib/utils/index.js +13 -86
  54. package/lib/utils/index.js.map +1 -1
  55. package/package.json +10 -10
  56. package/src/behavior-actions/behavior.action.decorator.add.ts +13 -2
  57. package/src/behaviors/behavior.core.block-objects.ts +32 -2
  58. package/src/behaviors/behavior.default.ts +59 -16
  59. package/src/behaviors/behavior.types.ts +67 -30
  60. package/src/editor/Editable.tsx +122 -68
  61. package/src/editor/PortableTextEditor.tsx +8 -8
  62. package/src/editor/__tests__/self-solving.test.tsx +1 -1
  63. package/src/editor/components/Element.tsx +1 -3
  64. package/src/editor/create-editor.ts +13 -5
  65. package/src/editor/editor-machine.ts +13 -3
  66. package/src/editor/editor-provider.tsx +11 -7
  67. package/src/editor/editor-selector.ts +4 -3
  68. package/src/editor/editor-snapshot.ts +2 -2
  69. package/src/editor/plugins/create-with-event-listeners.ts +18 -3
  70. package/src/editor/plugins/createWithPortableTextMarkModel.ts +1 -2
  71. package/src/internal-utils/block-keys.ts +9 -0
  72. package/src/internal-utils/collapse-selection.ts +36 -0
  73. package/src/internal-utils/compound-client-rect.ts +28 -0
  74. package/src/internal-utils/drag-selection.test.ts +507 -0
  75. package/src/internal-utils/drag-selection.ts +66 -0
  76. package/src/internal-utils/editor-selection.test.ts +40 -0
  77. package/src/internal-utils/editor-selection.ts +60 -0
  78. package/src/internal-utils/event-position.ts +55 -80
  79. package/src/internal-utils/inline-object-selection.ts +115 -0
  80. package/src/internal-utils/selection-block-keys.ts +20 -0
  81. package/src/internal-utils/selection-elements.ts +61 -0
  82. package/src/internal-utils/selection-focus-text.ts +38 -0
  83. package/src/internal-utils/selection-text.test.ts +23 -0
  84. package/src/internal-utils/selection-text.ts +90 -0
  85. package/src/internal-utils/split-string.ts +12 -0
  86. package/src/internal-utils/string-overlap.test.ts +14 -0
  87. package/src/internal-utils/string-overlap.ts +28 -0
  88. package/src/internal-utils/string-utils.ts +7 -0
  89. package/src/internal-utils/terse-pt.test.ts +60 -0
  90. package/src/internal-utils/terse-pt.ts +36 -0
  91. package/src/internal-utils/text-block-key.test.ts +30 -0
  92. package/src/internal-utils/text-block-key.ts +30 -0
  93. package/src/internal-utils/text-marks.test.ts +33 -0
  94. package/src/internal-utils/text-marks.ts +26 -0
  95. package/src/internal-utils/text-selection.test.ts +175 -0
  96. package/src/internal-utils/text-selection.ts +122 -0
  97. package/src/internal-utils/value-annotations.ts +31 -0
  98. package/src/internal-utils/values.ts +16 -5
  99. package/src/utils/index.ts +5 -0
  100. package/src/utils/util.block-offset-to-block-selection-point.ts +28 -0
  101. package/src/utils/util.block-offset-to-selection-point.ts +33 -0
  102. package/src/utils/util.block-offsets-to-selection.ts +3 -3
  103. package/src/utils/util.is-equal-selections.ts +20 -0
  104. package/src/utils/util.is-selection-collapsed.ts +15 -0
  105. package/src/utils/util.reverse-selection.ts +9 -5
  106. package/src/utils/util.selection-point-to-block-offset.ts +31 -0
  107. package/lib/_chunks-cjs/parse-blocks.cjs.map +0 -1
  108. package/lib/_chunks-es/parse-blocks.js.map +0 -1
  109. package/src/editor/components/use-draggable.ts +0 -123
@@ -1,88 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var util_sliceBlocks = require("../_chunks-cjs/util.slice-blocks.cjs"), parseBlocks = require("../_chunks-cjs/parse-blocks.cjs"), types = require("@sanity/types");
4
- function childSelectionPointToBlockOffset({
5
- value,
6
- selectionPoint
7
- }) {
8
- let offset = 0;
9
- const blockKey = util_sliceBlocks.isKeyedSegment(selectionPoint.path[0]) ? selectionPoint.path[0]._key : void 0, childKey = util_sliceBlocks.isKeyedSegment(selectionPoint.path[2]) ? selectionPoint.path[2]._key : void 0;
10
- if (!(!blockKey || !childKey)) {
11
- for (const block of value)
12
- if (block._key === blockKey && types.isPortableTextTextBlock(block))
13
- for (const child of block.children) {
14
- if (child._key === childKey)
15
- return {
16
- path: [{
17
- _key: block._key
18
- }],
19
- offset: offset + selectionPoint.offset
20
- };
21
- types.isPortableTextSpan(child) && (offset += child.text.length);
22
- }
23
- }
3
+ var util_sliceBlocks = require("../_chunks-cjs/util.slice-blocks.cjs"), util_selectionPointToBlockOffset = require("../_chunks-cjs/util.selection-point-to-block-offset.cjs"), util_splitTextBlock = require("../_chunks-cjs/util.split-text-block.cjs");
4
+ function isEqualSelections(a, b) {
5
+ return !a && !b ? !0 : !a || !b ? !1 : util_sliceBlocks.isEqualSelectionPoints(a.anchor, b.anchor) && util_sliceBlocks.isEqualSelectionPoints(a.focus, b.focus);
24
6
  }
25
- function isTextBlock(context, block) {
26
- return block._type === context.schema.block.name;
27
- }
28
- function mergeTextBlocks({
29
- context,
30
- targetBlock,
31
- incomingBlock
32
- }) {
33
- const parsedIncomingBlock = parseBlocks.parseBlock({
34
- context,
35
- block: incomingBlock,
36
- options: {
37
- refreshKeys: !0
38
- }
39
- });
40
- return !parsedIncomingBlock || !isTextBlock(context, parsedIncomingBlock) ? targetBlock : {
41
- ...targetBlock,
42
- children: [...targetBlock.children, ...parsedIncomingBlock.children],
43
- markDefs: [...targetBlock.markDefs ?? [], ...parsedIncomingBlock.markDefs ?? []]
44
- };
45
- }
46
- function splitTextBlock({
47
- context,
48
- block,
49
- point
50
- }) {
51
- const firstChild = block.children.at(0), lastChild = block.children.at(block.children.length - 1);
52
- if (!firstChild || !lastChild)
53
- return;
54
- const before = util_sliceBlocks.sliceBlocks({
55
- blocks: [block],
56
- selection: {
57
- anchor: {
58
- path: [{
59
- _key: block._key
60
- }, "children", {
61
- _key: firstChild._key
62
- }],
63
- offset: 0
64
- },
65
- focus: point
66
- }
67
- }).at(0), after = util_sliceBlocks.sliceBlocks({
68
- blocks: [block],
69
- selection: {
70
- anchor: point,
71
- focus: {
72
- path: [{
73
- _key: block._key
74
- }, "children", {
75
- _key: lastChild._key
76
- }],
77
- offset: util_sliceBlocks.isSpan(context, lastChild) ? lastChild.text.length : 0
78
- }
79
- }
80
- }).at(0);
81
- if (!(!before || !after) && !(!isTextBlock(context, before) || !isTextBlock(context, after)))
82
- return {
83
- before,
84
- after
85
- };
7
+ function isSelectionCollapsed(selection) {
8
+ return selection ? selection.anchor.path.join() === selection.focus.path.join() && selection.anchor.offset === selection.focus.offset : !1;
86
9
  }
87
10
  exports.blockOffsetToSpanSelectionPoint = util_sliceBlocks.blockOffsetToSpanSelectionPoint;
88
11
  exports.getBlockEndPoint = util_sliceBlocks.getBlockEndPoint;
@@ -95,9 +18,14 @@ exports.isSpan = util_sliceBlocks.isSpan;
95
18
  exports.reverseSelection = util_sliceBlocks.reverseSelection;
96
19
  exports.sliceBlocks = util_sliceBlocks.sliceBlocks;
97
20
  exports.spanSelectionPointToBlockOffset = util_sliceBlocks.spanSelectionPointToBlockOffset;
98
- exports.blockOffsetsToSelection = parseBlocks.blockOffsetsToSelection;
99
- exports.childSelectionPointToBlockOffset = childSelectionPointToBlockOffset;
100
- exports.isTextBlock = isTextBlock;
101
- exports.mergeTextBlocks = mergeTextBlocks;
102
- exports.splitTextBlock = splitTextBlock;
21
+ exports.blockOffsetToBlockSelectionPoint = util_selectionPointToBlockOffset.blockOffsetToBlockSelectionPoint;
22
+ exports.blockOffsetToSelectionPoint = util_selectionPointToBlockOffset.blockOffsetToSelectionPoint;
23
+ exports.blockOffsetsToSelection = util_selectionPointToBlockOffset.blockOffsetsToSelection;
24
+ exports.childSelectionPointToBlockOffset = util_selectionPointToBlockOffset.childSelectionPointToBlockOffset;
25
+ exports.selectionPointToBlockOffset = util_selectionPointToBlockOffset.selectionPointToBlockOffset;
26
+ exports.isTextBlock = util_splitTextBlock.isTextBlock;
27
+ exports.mergeTextBlocks = util_splitTextBlock.mergeTextBlocks;
28
+ exports.splitTextBlock = util_splitTextBlock.splitTextBlock;
29
+ exports.isEqualSelections = isEqualSelections;
30
+ exports.isSelectionCollapsed = isSelectionCollapsed;
103
31
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/utils/util.child-selection-point-to-block-offset.ts","../../src/utils/util.is-text-block.ts","../../src/utils/util.merge-text-blocks.ts","../../src/utils/util.split-text-block.ts"],"sourcesContent":["import {\n isPortableTextSpan,\n isPortableTextTextBlock,\n type PortableTextBlock,\n} from '@sanity/types'\nimport type {BlockOffset} from '../types/block-offset'\nimport type {EditorSelectionPoint} from '../types/editor'\nimport {isKeyedSegment} from './util.is-keyed-segment'\n\n/**\n * @public\n */\nexport function childSelectionPointToBlockOffset({\n value,\n selectionPoint,\n}: {\n value: Array<PortableTextBlock>\n selectionPoint: EditorSelectionPoint\n}): BlockOffset | undefined {\n let offset = 0\n\n const blockKey = isKeyedSegment(selectionPoint.path[0])\n ? selectionPoint.path[0]._key\n : undefined\n const childKey = isKeyedSegment(selectionPoint.path[2])\n ? selectionPoint.path[2]._key\n : undefined\n\n if (!blockKey || !childKey) {\n return undefined\n }\n\n for (const block of value) {\n if (block._key !== blockKey) {\n continue\n }\n\n if (!isPortableTextTextBlock(block)) {\n continue\n }\n\n for (const child of block.children) {\n if (child._key === childKey) {\n return {\n path: [{_key: block._key}],\n offset: offset + selectionPoint.offset,\n }\n }\n\n if (isPortableTextSpan(child)) {\n offset += child.text.length\n }\n }\n }\n}\n","import type {PortableTextBlock, PortableTextTextBlock} from '@sanity/types'\nimport type {EditorContext} from '..'\n\n/**\n * @public\n */\nexport function isTextBlock(\n context: Pick<EditorContext, 'schema'>,\n block: PortableTextBlock,\n): block is PortableTextTextBlock {\n return block._type === context.schema.block.name\n}\n","import type {PortableTextTextBlock} from '@sanity/types'\nimport type {EditorContext} from '..'\nimport {parseBlock} from '../internal-utils/parse-blocks'\nimport {isTextBlock} from './util.is-text-block'\n\n/**\n * @beta\n */\nexport function mergeTextBlocks({\n context,\n targetBlock,\n incomingBlock,\n}: {\n context: Pick<EditorContext, 'keyGenerator' | 'schema'>\n targetBlock: PortableTextTextBlock\n incomingBlock: PortableTextTextBlock\n}) {\n const parsedIncomingBlock = parseBlock({\n context,\n block: incomingBlock,\n options: {refreshKeys: true},\n })\n\n if (!parsedIncomingBlock || !isTextBlock(context, parsedIncomingBlock)) {\n return targetBlock\n }\n\n return {\n ...targetBlock,\n children: [...targetBlock.children, ...parsedIncomingBlock.children],\n markDefs: [\n ...(targetBlock.markDefs ?? []),\n ...(parsedIncomingBlock.markDefs ?? []),\n ],\n }\n}\n","import type {PortableTextTextBlock} from '@sanity/types'\nimport type {EditorSelectionPoint} from '..'\nimport type {EditorContext} from '../editor/editor-snapshot'\nimport {isSpan} from './util.is-span'\nimport {isTextBlock} from './util.is-text-block'\nimport {sliceBlocks} from './util.slice-blocks'\n\n/**\n * @beta\n */\nexport function splitTextBlock({\n context,\n block,\n point,\n}: {\n context: Pick<EditorContext, 'schema'>\n block: PortableTextTextBlock\n point: EditorSelectionPoint\n}): {before: PortableTextTextBlock; after: PortableTextTextBlock} | undefined {\n const firstChild = block.children.at(0)\n const lastChild = block.children.at(block.children.length - 1)\n\n if (!firstChild || !lastChild) {\n return undefined\n }\n\n const before = sliceBlocks({\n blocks: [block],\n selection: {\n anchor: {\n path: [{_key: block._key}, 'children', {_key: firstChild._key}],\n offset: 0,\n },\n focus: point,\n },\n }).at(0)\n const after = sliceBlocks({\n blocks: [block],\n selection: {\n anchor: point,\n focus: {\n path: [{_key: block._key}, 'children', {_key: lastChild._key}],\n offset: isSpan(context, lastChild) ? lastChild.text.length : 0,\n },\n },\n }).at(0)\n\n if (!before || !after) {\n return undefined\n }\n\n if (!isTextBlock(context, before) || !isTextBlock(context, after)) {\n return undefined\n }\n\n return {before, after}\n}\n"],"names":["childSelectionPointToBlockOffset","value","selectionPoint","offset","blockKey","isKeyedSegment","path","_key","undefined","childKey","block","isPortableTextTextBlock","child","children","isPortableTextSpan","text","length","isTextBlock","context","_type","schema","name","mergeTextBlocks","targetBlock","incomingBlock","parsedIncomingBlock","parseBlock","options","refreshKeys","markDefs","splitTextBlock","point","firstChild","at","lastChild","before","sliceBlocks","blocks","selection","anchor","focus","after","isSpan"],"mappings":"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"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/utils/util.is-equal-selections.ts","../../src/utils/util.is-selection-collapsed.ts"],"sourcesContent":["import type {EditorSelection} from '../types/editor'\nimport {isEqualSelectionPoints} from './util.is-equal-selection-points'\n\n/**\n * @public\n */\nexport function isEqualSelections(a: EditorSelection, b: EditorSelection) {\n if (!a && !b) {\n return true\n }\n\n if (!a || !b) {\n return false\n }\n\n return (\n isEqualSelectionPoints(a.anchor, b.anchor) &&\n isEqualSelectionPoints(a.focus, b.focus)\n )\n}\n","import type {EditorSelection} from '../types/editor'\n\n/**\n * @public\n */\nexport function isSelectionCollapsed(selection: EditorSelection) {\n if (!selection) {\n return false\n }\n\n return (\n selection.anchor.path.join() === selection.focus.path.join() &&\n selection.anchor.offset === selection.focus.offset\n )\n}\n"],"names":["isEqualSelections","a","b","isEqualSelectionPoints","anchor","focus","isSelectionCollapsed","selection","path","join","offset"],"mappings":";;;AAMgBA,SAAAA,kBAAkBC,GAAoBC,GAAoB;AACpE,SAAA,CAACD,KAAK,CAACC,IACF,KAGL,CAACD,KAAK,CAACC,IACF,KAIPC,iBAAAA,uBAAuBF,EAAEG,QAAQF,EAAEE,MAAM,KACzCD,wCAAuBF,EAAEI,OAAOH,EAAEG,KAAK;AAE3C;ACdO,SAASC,qBAAqBC,WAA4B;AAC/D,SAAKA,YAKHA,UAAUH,OAAOI,KAAKC,KAAAA,MAAWF,UAAUF,MAAMG,KAAKC,KAAAA,KACtDF,UAAUH,OAAOM,WAAWH,UAAUF,MAAMK,SALrC;AAOX;;;;;;;;;;;;;;;;;;;;;;"}