@portabletext/editor 1.36.5 → 1.37.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 (46) hide show
  1. package/lib/_chunks-cjs/behavior.core.cjs.map +1 -1
  2. package/lib/_chunks-cjs/behavior.markdown.cjs +1 -1
  3. package/lib/_chunks-cjs/editor-provider.cjs +104 -7
  4. package/lib/_chunks-cjs/editor-provider.cjs.map +1 -1
  5. package/lib/_chunks-cjs/util.block-offsets-to-selection.cjs.map +1 -1
  6. package/lib/_chunks-es/behavior.core.js.map +1 -1
  7. package/lib/_chunks-es/behavior.markdown.js +1 -1
  8. package/lib/_chunks-es/editor-provider.js +108 -11
  9. package/lib/_chunks-es/editor-provider.js.map +1 -1
  10. package/lib/_chunks-es/util.block-offsets-to-selection.js.map +1 -1
  11. package/lib/behaviors/index.d.cts +59 -0
  12. package/lib/behaviors/index.d.ts +59 -0
  13. package/lib/index.d.cts +59 -0
  14. package/lib/index.d.ts +59 -0
  15. package/lib/plugins/index.cjs +1 -1
  16. package/lib/plugins/index.d.cts +59 -0
  17. package/lib/plugins/index.d.ts +59 -0
  18. package/lib/plugins/index.js +1 -1
  19. package/lib/selectors/index.cjs +69 -14
  20. package/lib/selectors/index.cjs.map +1 -1
  21. package/lib/selectors/index.d.cts +75 -0
  22. package/lib/selectors/index.d.ts +75 -0
  23. package/lib/selectors/index.js +63 -8
  24. package/lib/selectors/index.js.map +1 -1
  25. package/lib/utils/index.d.cts +59 -0
  26. package/lib/utils/index.d.ts +59 -0
  27. package/package.json +7 -7
  28. package/src/behavior-actions/behavior.action.decorator.add.ts +1 -0
  29. package/src/behavior-actions/behavior.action.delete.text.ts +1 -0
  30. package/src/behavior-actions/behavior.action.delete.ts +1 -3
  31. package/src/behavior-actions/behavior.action.insert-blocks.ts +98 -2
  32. package/src/behavior-actions/behavior.actions.ts +1 -0
  33. package/src/behaviors/behavior.default.ts +1 -0
  34. package/src/behaviors/behavior.types.ts +1 -0
  35. package/src/editor/editor-machine.ts +16 -3
  36. package/src/editor/editor-selector.ts +1 -0
  37. package/src/editor/editor-snapshot.ts +4 -0
  38. package/src/internal-utils/create-test-snapshot.ts +1 -0
  39. package/src/internal-utils/parse-blocks.ts +22 -0
  40. package/src/selectors/index.ts +2 -0
  41. package/src/selectors/selector.get-focus-inline-object.ts +21 -0
  42. package/src/selectors/selector.is-overlapping-selection.test.ts +171 -0
  43. package/src/selectors/selector.is-overlapping-selection.ts +108 -4
  44. package/src/selectors/selector.is-point-after-selection.ts +3 -1
  45. package/src/selectors/selector.is-point-before-selection.ts +3 -1
  46. package/src/selectors/selector.is-selecting-entire-blocks.ts +34 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/selectors/selector.get-active-annotations.ts","../../src/selectors/selector.get-anchor-block.ts","../../src/selectors/selector.get-anchor-text-block.ts","../../src/selectors/selector.get-anchor-child.ts","../../src/selectors/selector.get-anchor-span.ts","../../src/selectors/selector.get-block-offsets.ts","../../src/selectors/selector.get-selection.ts","../../src/selectors/selector.get-value.ts","../../src/selectors/selector.is-point-after-selection.ts","../../src/selectors/selector.is-point-before-selection.ts","../../src/selectors/selector.is-overlapping-selection.ts"],"sourcesContent":["import {isPortableTextTextBlock, type PortableTextObject} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {getSelectedSpans} from './selector.get-selected-spans'\nimport {getSelectedBlocks} from './selectors'\n\n/**\n * @public\n */\nexport const getActiveAnnotations: EditorSelector<Array<PortableTextObject>> = (\n snapshot,\n) => {\n if (!snapshot.context.selection) {\n return []\n }\n\n const selectedBlocks = getSelectedBlocks(snapshot)\n const selectedSpans = getSelectedSpans(snapshot)\n\n if (selectedSpans.length === 0) {\n return []\n }\n\n const selectionMarkDefs = selectedBlocks.flatMap((block) =>\n isPortableTextTextBlock(block.node) ? (block.node.markDefs ?? []) : [],\n )\n\n return selectionMarkDefs.filter((markDef) =>\n selectedSpans.some((span) => span.node.marks?.includes(markDef._key)),\n )\n}\n","import type {KeyedSegment, PortableTextBlock} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {isKeyedSegment} from '../utils'\n\n/**\n * @public\n */\nexport const getAnchorBlock: EditorSelector<\n {node: PortableTextBlock; path: [KeyedSegment]} | undefined\n> = (snapshot) => {\n const key = snapshot.context.selection\n ? isKeyedSegment(snapshot.context.selection.anchor.path[0])\n ? snapshot.context.selection.anchor.path[0]._key\n : undefined\n : undefined\n\n const node = key\n ? snapshot.context.value.find((block) => block._key === key)\n : undefined\n\n return node && key ? {node, path: [{_key: key}]} : undefined\n}\n","import {\n isPortableTextTextBlock,\n type KeyedSegment,\n type PortableTextTextBlock,\n} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {getAnchorBlock} from './selector.get-anchor-block'\n\n/**\n * @public\n */\nexport const getAnchorTextBlock: EditorSelector<\n {node: PortableTextTextBlock; path: [KeyedSegment]} | undefined\n> = (snapshot) => {\n const anchorBlock = getAnchorBlock(snapshot)\n\n return anchorBlock && isPortableTextTextBlock(anchorBlock.node)\n ? {node: anchorBlock.node, path: anchorBlock.path}\n : undefined\n}\n","import type {KeyedSegment} from '@portabletext/patches'\nimport type {PortableTextObject, PortableTextSpan} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {isKeyedSegment} from '../utils'\nimport {getAnchorTextBlock} from './selector.get-anchor-text-block'\n\n/**\n * @public\n */\nexport const getAnchorChild: EditorSelector<\n | {\n node: PortableTextObject | PortableTextSpan\n path: [KeyedSegment, 'children', KeyedSegment]\n }\n | undefined\n> = (snapshot) => {\n const anchorBlock = getAnchorTextBlock(snapshot)\n\n if (!anchorBlock) {\n return undefined\n }\n\n const key = snapshot.context.selection\n ? isKeyedSegment(snapshot.context.selection.anchor.path[2])\n ? snapshot.context.selection.anchor.path[2]._key\n : undefined\n : undefined\n\n const node = key\n ? anchorBlock.node.children.find((span) => span._key === key)\n : undefined\n\n return node && key\n ? {node, path: [...anchorBlock.path, 'children', {_key: key}]}\n : undefined\n}\n","import type {KeyedSegment} from '@portabletext/patches'\nimport {isPortableTextSpan, type PortableTextSpan} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {getAnchorChild} from './selector.get-anchor-child'\n\n/**\n * @public\n */\nexport const getAnchorSpan: EditorSelector<\n | {node: PortableTextSpan; path: [KeyedSegment, 'children', KeyedSegment]}\n | undefined\n> = (snapshot) => {\n const anchorChild = getAnchorChild(snapshot)\n\n return anchorChild && isPortableTextSpan(anchorChild.node)\n ? {node: anchorChild.node, path: anchorChild.path}\n : undefined\n}\n","import type {EditorSelector} from '../editor/editor-selector'\nimport type {BlockOffset} from '../types/block-offset'\nimport * as utils from '../utils'\nimport {getSelectionEndPoint} from './selector.get-selection-end-point'\nimport {getSelectionStartPoint} from './selector.get-selection-start-point'\n\n/**\n * @public\n */\nexport const getBlockOffsets: EditorSelector<\n {start: BlockOffset; end: BlockOffset} | undefined\n> = (snapshot) => {\n if (!snapshot.context.selection) {\n return undefined\n }\n\n const selectionStartPoint = getSelectionStartPoint(snapshot)\n const selectionEndPoint = getSelectionEndPoint(snapshot)\n\n if (!selectionStartPoint || !selectionEndPoint) {\n return undefined\n }\n\n const start = utils.spanSelectionPointToBlockOffset({\n value: snapshot.context.value,\n selectionPoint: selectionStartPoint,\n })\n const end = utils.spanSelectionPointToBlockOffset({\n value: snapshot.context.value,\n selectionPoint: selectionEndPoint,\n })\n\n return start && end ? {start, end} : undefined\n}\n","import type {EditorSelection} from '..'\nimport type {EditorSelector} from '../editor/editor-selector'\n\n/**\n * @public\n */\nexport const getSelection: EditorSelector<EditorSelection> = (snapshot) => {\n return snapshot.context.selection\n}\n","import type {PortableTextBlock} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\n\n/**\n * @public\n */\nexport const getValue: EditorSelector<Array<PortableTextBlock>> = (\n snapshot,\n) => {\n return snapshot.context.value\n}\n","import {isKeySegment, isPortableTextTextBlock} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport type {EditorSelectionPoint} from '../types/editor'\nimport {reverseSelection} from '../utils/util.reverse-selection'\n\n/**\n * @public\n */\nexport function isPointAfterSelection(\n point: EditorSelectionPoint,\n): EditorSelector<boolean> {\n return (snapshot) => {\n if (!snapshot.context.selection) {\n return false\n }\n\n const selection = reverseSelection(snapshot.context.selection)\n\n const pointBlockKey = isKeySegment(point.path[0])\n ? point.path[0]._key\n : undefined\n const pointChildKey = isKeySegment(point.path[2])\n ? point.path[2]._key\n : undefined\n\n const endBlockKey = isKeySegment(selection.focus.path[0])\n ? selection.focus.path[0]._key\n : undefined\n const endChildKey = isKeySegment(selection.focus.path[2])\n ? selection.focus.path[2]._key\n : undefined\n\n if (!pointBlockKey || !endBlockKey) {\n return false\n }\n\n let after = false\n\n for (const block of snapshot.context.value) {\n if (block._key === endBlockKey) {\n if (block._key !== pointBlockKey) {\n after = true\n break\n }\n\n // Both the point and the selection end in this block\n\n if (!isPortableTextTextBlock(block)) {\n break\n }\n\n if (!pointChildKey || !endChildKey) {\n break\n }\n\n for (const child of block.children) {\n if (child._key === endChildKey) {\n if (child._key !== pointChildKey) {\n after = true\n break\n }\n\n // Both the point and the selection end in this child\n\n after = point.offset > selection.focus.offset\n break\n }\n\n if (child._key === pointChildKey) {\n break\n }\n }\n }\n\n if (block._key === pointBlockKey) {\n break\n }\n }\n\n return after\n }\n}\n","import {isKeySegment, isPortableTextTextBlock} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport type {EditorSelectionPoint} from '../types/editor'\nimport {reverseSelection} from '../utils/util.reverse-selection'\n\n/**\n * @public\n */\nexport function isPointBeforeSelection(\n point: EditorSelectionPoint,\n): EditorSelector<boolean> {\n return (snapshot) => {\n if (!snapshot.context.selection) {\n return false\n }\n\n const selection = reverseSelection(snapshot.context.selection)\n\n const pointBlockKey = isKeySegment(point.path[0])\n ? point.path[0]._key\n : undefined\n const pointChildKey = isKeySegment(point.path[2])\n ? point.path[2]._key\n : undefined\n\n const startBlockKey = isKeySegment(selection.anchor.path[0])\n ? selection.anchor.path[0]._key\n : undefined\n const startChildKey = isKeySegment(selection.anchor.path[2])\n ? selection.anchor.path[2]._key\n : undefined\n\n if (!pointBlockKey || !startBlockKey) {\n return false\n }\n\n let before = false\n\n for (const block of snapshot.context.value) {\n if (block._key === pointBlockKey) {\n if (block._key !== startBlockKey) {\n before = true\n break\n }\n\n // Both the point and the selection start in this block\n\n if (!isPortableTextTextBlock(block)) {\n break\n }\n\n if (!pointChildKey || !startChildKey) {\n break\n }\n\n for (const child of block.children) {\n if (child._key === pointChildKey) {\n if (child._key !== startChildKey) {\n before = true\n break\n }\n\n // Both the point and the selection start in this child\n\n before = point.offset < selection.anchor.offset\n break\n }\n\n if (child._key === startChildKey) {\n break\n }\n }\n }\n\n if (block._key === startBlockKey) {\n break\n }\n }\n\n return before\n }\n}\n","import type {EditorSelection} from '../types/editor'\nimport type {EditorSelector} from './../editor/editor-selector'\nimport {getSelectionEndPoint} from './selector.get-selection-end-point'\nimport {getSelectionStartPoint} from './selector.get-selection-start-point'\nimport {isPointAfterSelection} from './selector.is-point-after-selection'\nimport {isPointBeforeSelection} from './selector.is-point-before-selection'\n\n/**\n * @public\n */\nexport function isOverlappingSelection(\n selection: EditorSelection,\n): EditorSelector<boolean> {\n return (snapshot) => {\n if (!selection || !snapshot.context.selection) {\n return false\n }\n\n const selectionStartPoint = getSelectionStartPoint({\n ...snapshot,\n context: {\n ...snapshot.context,\n selection,\n },\n })\n const selectionEndPoint = getSelectionEndPoint({\n ...snapshot,\n context: {\n ...snapshot.context,\n selection,\n },\n })\n\n if (!selectionStartPoint || !selectionEndPoint) {\n return false\n }\n\n if (!isPointAfterSelection(selectionStartPoint)(snapshot)) {\n return false\n }\n\n if (!isPointBeforeSelection(selectionEndPoint)(snapshot)) {\n return false\n }\n\n return true\n }\n}\n"],"names":["getActiveAnnotations","snapshot","context","selection","selectedBlocks","getSelectedBlocks","selectedSpans","getSelectedSpans","length","flatMap","block","isPortableTextTextBlock","node","markDefs","filter","markDef","some","span","marks","includes","_key","getAnchorBlock","key","isKeyedSegment","anchor","path","undefined","value","find","getAnchorTextBlock","anchorBlock","getAnchorChild","children","getAnchorSpan","anchorChild","isPortableTextSpan","getBlockOffsets","selectionStartPoint","getSelectionStartPoint","selectionEndPoint","getSelectionEndPoint","start","utils","selectionPoint","end","getSelection","getValue","isPointAfterSelection","point","reverseSelection","pointBlockKey","isKeySegment","pointChildKey","endBlockKey","focus","endChildKey","after","child","offset","isPointBeforeSelection","startBlockKey","startChildKey","before","isOverlappingSelection"],"mappings":";;;;;;;;AAQO,MAAMA,uBACXC,CACG,aAAA;AACC,MAAA,CAACA,SAASC,QAAQC;AACpB,WAAO,CAAE;AAGX,QAAMC,iBAAiBC,kBAAkBJ,QAAQ,GAC3CK,gBAAgBC,iBAAiBN,QAAQ;AAE/C,SAAIK,cAAcE,WAAW,IACpB,KAGiBJ,eAAeK,QAASC,CAChDC,UAAAA,wBAAwBD,MAAME,IAAI,IAAKF,MAAME,KAAKC,YAAY,CAAM,IAAA,CACtE,CAAA,EAEyBC,OAAQC,CAAAA,YAC/BT,cAAcU,KAAMC,CAAAA,SAASA,KAAKL,KAAKM,OAAOC,SAASJ,QAAQK,IAAI,CAAC,CACtE;AACF,GCtBaC,iBAERpB,CAAa,aAAA;AAChB,QAAMqB,MAAMrB,SAASC,QAAQC,aACzBoB,eAAetB,SAASC,QAAQC,UAAUqB,OAAOC,KAAK,CAAC,CAAC,IACtDxB,SAASC,QAAQC,UAAUqB,OAAOC,KAAK,CAAC,EAAEL,OAE5CM,QAEEd,OAAOU,MACTrB,SAASC,QAAQyB,MAAMC,KAAMlB,CAAAA,UAAUA,MAAMU,SAASE,GAAG,IACzDI;AAEJ,SAAOd,QAAQU,MAAM;AAAA,IAACV;AAAAA,IAAMa,MAAM,CAAC;AAAA,MAACL,MAAME;AAAAA,IAAI,CAAA;AAAA,EAAA,IAAKI;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B,OAAOkC;AACzC;AAAA,UAAA;AAGF,cAAID,MAAMrC,SAASyC;AACjB;AAAA,QAAA;AAAA,MAEJ;AAGF,UAAInD,MAAMU,SAASwC;AACjB;AAAA,IAAA;AAIGE,WAAAA;AAAAA,EACT;AACF;ACvEO,SAASC,uBACd5D,WACyB;AACzB,SAAQF,CAAa,aAAA;AACnB,QAAI,CAACE,aAAa,CAACF,SAASC,QAAQC;AAC3B,aAAA;AAGT,UAAMkC,sBAAsBC,uBAAuB;AAAA,MACjD,GAAGrC;AAAAA,MACHC,SAAS;AAAA,QACP,GAAGD,SAASC;AAAAA,QACZC;AAAAA,MAAAA;AAAAA,IACF,CACD,GACKoC,oBAAoBC,qBAAqB;AAAA,MAC7C,GAAGvC;AAAAA,MACHC,SAAS;AAAA,QACP,GAAGD,SAASC;AAAAA,QACZC;AAAAA,MAAAA;AAAAA,IACF,CACD;AAUD,WARI,EAACkC,CAAAA,uBAAuB,CAACE,qBAIzB,CAACQ,sBAAsBV,mBAAmB,EAAEpC,QAAQ,KAIpD,CAAC0D,uBAAuBpB,iBAAiB,EAAEtC,QAAQ;AAAA,EAKzD;AACF;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/selectors/selector.is-selecting-entire-blocks.ts","../../src/selectors/selector.get-active-annotations.ts","../../src/selectors/selector.get-anchor-block.ts","../../src/selectors/selector.get-anchor-text-block.ts","../../src/selectors/selector.get-anchor-child.ts","../../src/selectors/selector.get-anchor-span.ts","../../src/selectors/selector.get-block-offsets.ts","../../src/selectors/selector.get-focus-inline-object.ts","../../src/selectors/selector.get-selection.ts","../../src/selectors/selector.get-value.ts","../../src/selectors/selector.is-point-after-selection.ts","../../src/selectors/selector.is-point-before-selection.ts","../../src/selectors/selector.is-overlapping-selection.ts"],"sourcesContent":["import type {EditorSelector} from '../editor/editor-selector'\nimport * as utils from '../utils'\nimport {getSelectionEndBlock, getSelectionStartBlock} from './selectors'\n\n/**\n * @public\n */\nexport const isSelectingEntireBlocks: EditorSelector<boolean> = (snapshot) => {\n if (!snapshot.context.selection) {\n return false\n }\n\n const startPoint = snapshot.context.selection.backward\n ? snapshot.context.selection.focus\n : snapshot.context.selection.anchor\n const endPoint = snapshot.context.selection.backward\n ? snapshot.context.selection.anchor\n : snapshot.context.selection.focus\n\n const startBlock = getSelectionStartBlock(snapshot)\n const endBlock = getSelectionEndBlock(snapshot)\n\n if (!startBlock || !endBlock) {\n return false\n }\n\n const startBlockStartPoint = utils.getBlockStartPoint(startBlock)\n const endBlockEndPoint = utils.getBlockEndPoint(endBlock)\n\n return (\n utils.isEqualSelectionPoints(startBlockStartPoint, startPoint) &&\n utils.isEqualSelectionPoints(endBlockEndPoint, endPoint)\n )\n}\n","import {isPortableTextTextBlock, type PortableTextObject} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {getSelectedSpans} from './selector.get-selected-spans'\nimport {getSelectedBlocks} from './selectors'\n\n/**\n * @public\n */\nexport const getActiveAnnotations: EditorSelector<Array<PortableTextObject>> = (\n snapshot,\n) => {\n if (!snapshot.context.selection) {\n return []\n }\n\n const selectedBlocks = getSelectedBlocks(snapshot)\n const selectedSpans = getSelectedSpans(snapshot)\n\n if (selectedSpans.length === 0) {\n return []\n }\n\n const selectionMarkDefs = selectedBlocks.flatMap((block) =>\n isPortableTextTextBlock(block.node) ? (block.node.markDefs ?? []) : [],\n )\n\n return selectionMarkDefs.filter((markDef) =>\n selectedSpans.some((span) => span.node.marks?.includes(markDef._key)),\n )\n}\n","import type {KeyedSegment, PortableTextBlock} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {isKeyedSegment} from '../utils'\n\n/**\n * @public\n */\nexport const getAnchorBlock: EditorSelector<\n {node: PortableTextBlock; path: [KeyedSegment]} | undefined\n> = (snapshot) => {\n const key = snapshot.context.selection\n ? isKeyedSegment(snapshot.context.selection.anchor.path[0])\n ? snapshot.context.selection.anchor.path[0]._key\n : undefined\n : undefined\n\n const node = key\n ? snapshot.context.value.find((block) => block._key === key)\n : undefined\n\n return node && key ? {node, path: [{_key: key}]} : undefined\n}\n","import {\n isPortableTextTextBlock,\n type KeyedSegment,\n type PortableTextTextBlock,\n} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {getAnchorBlock} from './selector.get-anchor-block'\n\n/**\n * @public\n */\nexport const getAnchorTextBlock: EditorSelector<\n {node: PortableTextTextBlock; path: [KeyedSegment]} | undefined\n> = (snapshot) => {\n const anchorBlock = getAnchorBlock(snapshot)\n\n return anchorBlock && isPortableTextTextBlock(anchorBlock.node)\n ? {node: anchorBlock.node, path: anchorBlock.path}\n : undefined\n}\n","import type {KeyedSegment} from '@portabletext/patches'\nimport type {PortableTextObject, PortableTextSpan} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {isKeyedSegment} from '../utils'\nimport {getAnchorTextBlock} from './selector.get-anchor-text-block'\n\n/**\n * @public\n */\nexport const getAnchorChild: EditorSelector<\n | {\n node: PortableTextObject | PortableTextSpan\n path: [KeyedSegment, 'children', KeyedSegment]\n }\n | undefined\n> = (snapshot) => {\n const anchorBlock = getAnchorTextBlock(snapshot)\n\n if (!anchorBlock) {\n return undefined\n }\n\n const key = snapshot.context.selection\n ? isKeyedSegment(snapshot.context.selection.anchor.path[2])\n ? snapshot.context.selection.anchor.path[2]._key\n : undefined\n : undefined\n\n const node = key\n ? anchorBlock.node.children.find((span) => span._key === key)\n : undefined\n\n return node && key\n ? {node, path: [...anchorBlock.path, 'children', {_key: key}]}\n : undefined\n}\n","import type {KeyedSegment} from '@portabletext/patches'\nimport {isPortableTextSpan, type PortableTextSpan} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {getAnchorChild} from './selector.get-anchor-child'\n\n/**\n * @public\n */\nexport const getAnchorSpan: EditorSelector<\n | {node: PortableTextSpan; path: [KeyedSegment, 'children', KeyedSegment]}\n | undefined\n> = (snapshot) => {\n const anchorChild = getAnchorChild(snapshot)\n\n return anchorChild && isPortableTextSpan(anchorChild.node)\n ? {node: anchorChild.node, path: anchorChild.path}\n : undefined\n}\n","import type {EditorSelector} from '../editor/editor-selector'\nimport type {BlockOffset} from '../types/block-offset'\nimport * as utils from '../utils'\nimport {getSelectionEndPoint} from './selector.get-selection-end-point'\nimport {getSelectionStartPoint} from './selector.get-selection-start-point'\n\n/**\n * @public\n */\nexport const getBlockOffsets: EditorSelector<\n {start: BlockOffset; end: BlockOffset} | undefined\n> = (snapshot) => {\n if (!snapshot.context.selection) {\n return undefined\n }\n\n const selectionStartPoint = getSelectionStartPoint(snapshot)\n const selectionEndPoint = getSelectionEndPoint(snapshot)\n\n if (!selectionStartPoint || !selectionEndPoint) {\n return undefined\n }\n\n const start = utils.spanSelectionPointToBlockOffset({\n value: snapshot.context.value,\n selectionPoint: selectionStartPoint,\n })\n const end = utils.spanSelectionPointToBlockOffset({\n value: snapshot.context.value,\n selectionPoint: selectionEndPoint,\n })\n\n return start && end ? {start, end} : undefined\n}\n","import {\n isPortableTextSpan,\n type KeyedSegment,\n type PortableTextObject,\n} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport {getFocusChild} from './selectors'\n\n/**\n * @public\n */\nexport const getFocusInlineObject: EditorSelector<\n | {node: PortableTextObject; path: [KeyedSegment, 'children', KeyedSegment]}\n | undefined\n> = (snapshot) => {\n const focusChild = getFocusChild(snapshot)\n\n return focusChild && !isPortableTextSpan(focusChild.node)\n ? {node: focusChild.node, path: focusChild.path}\n : undefined\n}\n","import type {EditorSelection} from '..'\nimport type {EditorSelector} from '../editor/editor-selector'\n\n/**\n * @public\n */\nexport const getSelection: EditorSelector<EditorSelection> = (snapshot) => {\n return snapshot.context.selection\n}\n","import type {PortableTextBlock} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\n\n/**\n * @public\n */\nexport const getValue: EditorSelector<Array<PortableTextBlock>> = (\n snapshot,\n) => {\n return snapshot.context.value\n}\n","import {isKeySegment, isPortableTextTextBlock} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport type {EditorSelectionPoint} from '../types/editor'\nimport {reverseSelection} from '../utils/util.reverse-selection'\n\n/**\n * @public\n */\nexport function isPointAfterSelection(\n point: EditorSelectionPoint,\n): EditorSelector<boolean> {\n return (snapshot) => {\n if (!snapshot.context.selection) {\n return false\n }\n\n const selection = snapshot.context.selection.backward\n ? reverseSelection(snapshot.context.selection)\n : snapshot.context.selection\n\n const pointBlockKey = isKeySegment(point.path[0])\n ? point.path[0]._key\n : undefined\n const pointChildKey = isKeySegment(point.path[2])\n ? point.path[2]._key\n : undefined\n\n const endBlockKey = isKeySegment(selection.focus.path[0])\n ? selection.focus.path[0]._key\n : undefined\n const endChildKey = isKeySegment(selection.focus.path[2])\n ? selection.focus.path[2]._key\n : undefined\n\n if (!pointBlockKey || !endBlockKey) {\n return false\n }\n\n let after = false\n\n for (const block of snapshot.context.value) {\n if (block._key === endBlockKey) {\n if (block._key !== pointBlockKey) {\n after = true\n break\n }\n\n // Both the point and the selection end in this block\n\n if (!isPortableTextTextBlock(block)) {\n break\n }\n\n if (!pointChildKey || !endChildKey) {\n break\n }\n\n for (const child of block.children) {\n if (child._key === endChildKey) {\n if (child._key !== pointChildKey) {\n after = true\n break\n }\n\n // Both the point and the selection end in this child\n\n after = point.offset > selection.focus.offset\n break\n }\n\n if (child._key === pointChildKey) {\n break\n }\n }\n }\n\n if (block._key === pointBlockKey) {\n break\n }\n }\n\n return after\n }\n}\n","import {isKeySegment, isPortableTextTextBlock} from '@sanity/types'\nimport type {EditorSelector} from '../editor/editor-selector'\nimport type {EditorSelectionPoint} from '../types/editor'\nimport {reverseSelection} from '../utils/util.reverse-selection'\n\n/**\n * @public\n */\nexport function isPointBeforeSelection(\n point: EditorSelectionPoint,\n): EditorSelector<boolean> {\n return (snapshot) => {\n if (!snapshot.context.selection) {\n return false\n }\n\n const selection = snapshot.context.selection.backward\n ? reverseSelection(snapshot.context.selection)\n : snapshot.context.selection\n\n const pointBlockKey = isKeySegment(point.path[0])\n ? point.path[0]._key\n : undefined\n const pointChildKey = isKeySegment(point.path[2])\n ? point.path[2]._key\n : undefined\n\n const startBlockKey = isKeySegment(selection.anchor.path[0])\n ? selection.anchor.path[0]._key\n : undefined\n const startChildKey = isKeySegment(selection.anchor.path[2])\n ? selection.anchor.path[2]._key\n : undefined\n\n if (!pointBlockKey || !startBlockKey) {\n return false\n }\n\n let before = false\n\n for (const block of snapshot.context.value) {\n if (block._key === pointBlockKey) {\n if (block._key !== startBlockKey) {\n before = true\n break\n }\n\n // Both the point and the selection start in this block\n\n if (!isPortableTextTextBlock(block)) {\n break\n }\n\n if (!pointChildKey || !startChildKey) {\n break\n }\n\n for (const child of block.children) {\n if (child._key === pointChildKey) {\n if (child._key !== startChildKey) {\n before = true\n break\n }\n\n // Both the point and the selection start in this child\n\n before = point.offset < selection.anchor.offset\n break\n }\n\n if (child._key === startChildKey) {\n break\n }\n }\n }\n\n if (block._key === startBlockKey) {\n break\n }\n }\n\n return before\n }\n}\n","import type {EditorSelection} from '../types/editor'\nimport {isEqualSelectionPoints} from '../utils'\nimport type {EditorSelector} from './../editor/editor-selector'\nimport {getSelectionEndPoint} from './selector.get-selection-end-point'\nimport {getSelectionStartPoint} from './selector.get-selection-start-point'\nimport {isPointAfterSelection} from './selector.is-point-after-selection'\nimport {isPointBeforeSelection} from './selector.is-point-before-selection'\n\n/**\n * @public\n */\nexport function isOverlappingSelection(\n selection: EditorSelection,\n): EditorSelector<boolean> {\n return (snapshot) => {\n if (!selection || !snapshot.context.selection) {\n return false\n }\n\n const selectionStartPoint = getSelectionStartPoint({\n ...snapshot,\n context: {\n ...snapshot.context,\n selection,\n },\n })\n const selectionEndPoint = getSelectionEndPoint({\n ...snapshot,\n context: {\n ...snapshot.context,\n selection,\n },\n })\n\n const originalSelectionStartPoint = getSelectionStartPoint(snapshot)\n const originalSelectionEndPoint = getSelectionEndPoint(snapshot)\n\n if (\n !selectionStartPoint ||\n !selectionEndPoint ||\n !originalSelectionStartPoint ||\n !originalSelectionEndPoint\n ) {\n return false\n }\n\n const startPointBeforeSelection =\n isPointBeforeSelection(selectionStartPoint)(snapshot)\n const startPointAfterSelection =\n isPointAfterSelection(selectionStartPoint)(snapshot)\n const endPointBeforeSelection =\n isPointBeforeSelection(selectionEndPoint)(snapshot)\n const endPointAfterSelection =\n isPointAfterSelection(selectionEndPoint)(snapshot)\n\n const originalStartPointBeforeStartPoint = isPointBeforeSelection(\n originalSelectionStartPoint,\n )({\n ...snapshot,\n context: {\n ...snapshot.context,\n selection: {\n anchor: selectionStartPoint,\n focus: selectionStartPoint,\n },\n },\n })\n const originalStartPointAfterStartPoint = isPointAfterSelection(\n originalSelectionStartPoint,\n )({\n ...snapshot,\n context: {\n ...snapshot.context,\n selection: {\n anchor: selectionStartPoint,\n focus: selectionStartPoint,\n },\n },\n })\n\n const originalEndPointBeforeEndPoint = isPointBeforeSelection(\n originalSelectionEndPoint,\n )({\n ...snapshot,\n context: {\n ...snapshot.context,\n selection: {\n anchor: selectionEndPoint,\n focus: selectionEndPoint,\n },\n },\n })\n const originalEndPointAfterEndPoint = isPointAfterSelection(\n originalSelectionEndPoint,\n )({\n ...snapshot,\n context: {\n ...snapshot.context,\n selection: {\n anchor: selectionEndPoint,\n focus: selectionEndPoint,\n },\n },\n })\n\n const endPointEqualToOriginalStartPoint = isEqualSelectionPoints(\n selectionEndPoint,\n originalSelectionStartPoint,\n )\n const startPointEqualToOriginalEndPoint = isEqualSelectionPoints(\n selectionStartPoint,\n originalSelectionEndPoint,\n )\n\n if (endPointBeforeSelection && !endPointEqualToOriginalStartPoint) {\n return false\n }\n\n if (startPointAfterSelection && !startPointEqualToOriginalEndPoint) {\n return false\n }\n\n if (\n !originalStartPointBeforeStartPoint &&\n originalStartPointAfterStartPoint &&\n !originalEndPointBeforeEndPoint &&\n originalEndPointAfterEndPoint\n ) {\n return !endPointEqualToOriginalStartPoint\n }\n\n if (\n originalStartPointBeforeStartPoint &&\n !originalStartPointAfterStartPoint &&\n originalEndPointBeforeEndPoint &&\n !originalEndPointAfterEndPoint\n ) {\n return !startPointEqualToOriginalEndPoint\n }\n\n if (\n !startPointAfterSelection ||\n !startPointBeforeSelection ||\n !endPointAfterSelection ||\n !endPointBeforeSelection\n ) {\n return true\n }\n\n return false\n }\n}\n"],"names":["isSelectingEntireBlocks","snapshot","context","selection","startPoint","backward","focus","anchor","endPoint","startBlock","getSelectionStartBlock","endBlock","getSelectionEndBlock","startBlockStartPoint","utils","endBlockEndPoint","getActiveAnnotations","selectedBlocks","getSelectedBlocks","selectedSpans","getSelectedSpans","length","flatMap","block","isPortableTextTextBlock","node","markDefs","filter","markDef","some","span","marks","includes","_key","getAnchorBlock","key","isKeyedSegment","path","undefined","value","find","getAnchorTextBlock","anchorBlock","getAnchorChild","children","getAnchorSpan","anchorChild","isPortableTextSpan","getBlockOffsets","selectionStartPoint","getSelectionStartPoint","selectionEndPoint","getSelectionEndPoint","start","selectionPoint","end","getFocusInlineObject","focusChild","getFocusChild","getSelection","getValue","isPointAfterSelection","point","reverseSelection","pointBlockKey","isKeySegment","pointChildKey","endBlockKey","endChildKey","after","child","offset","isPointBeforeSelection","startBlockKey","startChildKey","before","isOverlappingSelection","originalSelectionStartPoint","originalSelectionEndPoint","startPointBeforeSelection","startPointAfterSelection","endPointBeforeSelection","endPointAfterSelection","originalStartPointBeforeStartPoint","originalStartPointAfterStartPoint","originalEndPointBeforeEndPoint","originalEndPointAfterEndPoint","endPointEqualToOriginalStartPoint","isEqualSelectionPoints","startPointEqualToOriginalEndPoint"],"mappings":";;;;;;;;AAOO,MAAMA,0BAAoDC,CAAa,aAAA;AACxE,MAAA,CAACA,SAASC,QAAQC;AACb,WAAA;AAGT,QAAMC,aAAaH,SAASC,QAAQC,UAAUE,WAC1CJ,SAASC,QAAQC,UAAUG,QAC3BL,SAASC,QAAQC,UAAUI,QACzBC,WAAWP,SAASC,QAAQC,UAAUE,WACxCJ,SAASC,QAAQC,UAAUI,SAC3BN,SAASC,Q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,QAAQ0C;AAAAA,UACR3C,OAAO2C;AAAAA,QAAAA;AAAAA,MACT;AAAA,IAEH,CAAA,GACKmC,oCAAoCvB,sBACxCgB,2BACF,EAAE;AAAA,MACA,GAAG5E;AAAAA,MACHC,SAAS;AAAA,QACP,GAAGD,SAASC;AAAAA,QACZC,WAAW;AAAA,UACTI,QAAQ0C;AAAAA,UACR3C,OAAO2C;AAAAA,QAAAA;AAAAA,MACT;AAAA,IAEH,CAAA,GAEKoC,iCAAiCb,uBACrCM,yBACF,EAAE;AAAA,MACA,GAAG7E;AAAAA,MACHC,SAAS;AAAA,QACP,GAAGD,SAASC;AAAAA,QACZC,WAAW;AAAA,UACTI,QAAQ4C;AAAAA,UACR7C,OAAO6C;AAAAA,QAAAA;AAAAA,MACT;AAAA,IAEH,CAAA,GACKmC,gCAAgCzB,sBACpCiB,yBACF,EAAE;AAAA,MACA,GAAG7E;AAAAA,MACHC,SAAS;AAAA,QACP,GAAGD,SAASC;AAAAA,QACZC,WAAW;AAAA,UACTI,QAAQ4C;AAAAA,UACR7C,OAAO6C;AAAAA,QAAAA;AAAAA,MACT;AAAA,IACF,CACD,GAEKoC,oCAAoCC,uBACxCrC,mBACA0B,2BACF,GACMY,oCAAoCD,uBACxCvC,qBACA6B,yBACF;AAMA,WAJIG,2BAA2B,CAACM,qCAI5BP,4BAA4B,CAACS,oCACxB,KAIP,CAACN,sCACDC,qCACA,CAACC,kCACDC,gCAEO,CAACC,oCAIRJ,sCACA,CAACC,qCACDC,kCACA,CAACC,gCAEM,CAACG,oCAIR,CAACT,4BACD,CAACD,6BACD,CAACG,0BACD,CAACD;AAAAA,EAML;AACF;"}
@@ -352,6 +352,7 @@ declare type EditorContext = {
352
352
  activeDecorators: Array<string>
353
353
  converters: Array<Converter>
354
354
  keyGenerator: () => string
355
+ readOnly: boolean
355
356
  schema: EditorSchema
356
357
  selection: EditorSelection
357
358
  value: Array<PortableTextBlock>
@@ -464,6 +465,7 @@ declare const editorMachine: StateMachine<
464
465
  | {
465
466
  type: 'insert.blocks'
466
467
  blocks: Array<PortableTextBlock>
468
+ placement: 'auto' | 'after' | 'before'
467
469
  }
468
470
  | {
469
471
  type: 'insert.block object'
@@ -898,6 +900,7 @@ declare const editorMachine: StateMachine<
898
900
  | {
899
901
  type: 'insert.blocks'
900
902
  blocks: Array<PortableTextBlock>
903
+ placement: 'auto' | 'after' | 'before'
901
904
  }
902
905
  | {
903
906
  type: 'insert.block object'
@@ -1222,6 +1225,7 @@ declare const editorMachine: StateMachine<
1222
1225
  | {
1223
1226
  type: 'insert.blocks'
1224
1227
  blocks: Array<PortableTextBlock>
1228
+ placement: 'auto' | 'after' | 'before'
1225
1229
  }
1226
1230
  | {
1227
1231
  type: 'insert.block object'
@@ -1579,6 +1583,7 @@ declare const editorMachine: StateMachine<
1579
1583
  | {
1580
1584
  type: 'insert.blocks'
1581
1585
  blocks: Array<PortableTextBlock>
1586
+ placement: 'auto' | 'after' | 'before'
1582
1587
  }
1583
1588
  | {
1584
1589
  type: 'insert.block object'
@@ -1960,6 +1965,7 @@ declare const editorMachine: StateMachine<
1960
1965
  | {
1961
1966
  type: 'insert.blocks'
1962
1967
  blocks: Array<PortableTextBlock>
1968
+ placement: 'auto' | 'after' | 'before'
1963
1969
  }
1964
1970
  | {
1965
1971
  type: 'insert.block object'
@@ -2315,6 +2321,7 @@ declare const editorMachine: StateMachine<
2315
2321
  | {
2316
2322
  type: 'insert.blocks'
2317
2323
  blocks: Array<PortableTextBlock>
2324
+ placement: 'auto' | 'after' | 'before'
2318
2325
  }
2319
2326
  | {
2320
2327
  type: 'insert.block object'
@@ -2607,6 +2614,7 @@ declare const editorMachine: StateMachine<
2607
2614
  | {
2608
2615
  type: 'insert.blocks'
2609
2616
  blocks: Array<PortableTextBlock>
2617
+ placement: 'auto' | 'after' | 'before'
2610
2618
  }
2611
2619
  | {
2612
2620
  type: 'insert.block object'
@@ -2962,6 +2970,7 @@ declare const editorMachine: StateMachine<
2962
2970
  | {
2963
2971
  type: 'insert.blocks'
2964
2972
  blocks: Array<PortableTextBlock>
2973
+ placement: 'auto' | 'after' | 'before'
2965
2974
  }
2966
2975
  | {
2967
2976
  type: 'insert.block object'
@@ -3257,6 +3266,7 @@ declare const editorMachine: StateMachine<
3257
3266
  | {
3258
3267
  type: 'insert.blocks'
3259
3268
  blocks: Array<PortableTextBlock>
3269
+ placement: 'auto' | 'after' | 'before'
3260
3270
  }
3261
3271
  | {
3262
3272
  type: 'insert.block object'
@@ -3612,6 +3622,7 @@ declare const editorMachine: StateMachine<
3612
3622
  | {
3613
3623
  type: 'insert.blocks'
3614
3624
  blocks: Array<PortableTextBlock>
3625
+ placement: 'auto' | 'after' | 'before'
3615
3626
  }
3616
3627
  | {
3617
3628
  type: 'insert.block object'
@@ -3906,6 +3917,7 @@ declare const editorMachine: StateMachine<
3906
3917
  | {
3907
3918
  type: 'insert.blocks'
3908
3919
  blocks: Array<PortableTextBlock>
3920
+ placement: 'auto' | 'after' | 'before'
3909
3921
  }
3910
3922
  | {
3911
3923
  type: 'insert.block object'
@@ -4261,6 +4273,7 @@ declare const editorMachine: StateMachine<
4261
4273
  | {
4262
4274
  type: 'insert.blocks'
4263
4275
  blocks: Array<PortableTextBlock>
4276
+ placement: 'auto' | 'after' | 'before'
4264
4277
  }
4265
4278
  | {
4266
4279
  type: 'insert.block object'
@@ -4554,6 +4567,7 @@ declare const editorMachine: StateMachine<
4554
4567
  | {
4555
4568
  type: 'insert.blocks'
4556
4569
  blocks: Array<PortableTextBlock>
4570
+ placement: 'auto' | 'after' | 'before'
4557
4571
  }
4558
4572
  | {
4559
4573
  type: 'insert.block object'
@@ -4909,6 +4923,7 @@ declare const editorMachine: StateMachine<
4909
4923
  | {
4910
4924
  type: 'insert.blocks'
4911
4925
  blocks: Array<PortableTextBlock>
4926
+ placement: 'auto' | 'after' | 'before'
4912
4927
  }
4913
4928
  | {
4914
4929
  type: 'insert.block object'
@@ -5203,6 +5218,7 @@ declare const editorMachine: StateMachine<
5203
5218
  | {
5204
5219
  type: 'insert.blocks'
5205
5220
  blocks: Array<PortableTextBlock>
5221
+ placement: 'auto' | 'after' | 'before'
5206
5222
  }
5207
5223
  | {
5208
5224
  type: 'insert.block object'
@@ -5576,6 +5592,7 @@ declare const editorMachine: StateMachine<
5576
5592
  | {
5577
5593
  type: 'insert.blocks'
5578
5594
  blocks: Array<PortableTextBlock>
5595
+ placement: 'auto' | 'after' | 'before'
5579
5596
  }
5580
5597
  | {
5581
5598
  type: 'insert.block object'
@@ -5931,6 +5948,7 @@ declare const editorMachine: StateMachine<
5931
5948
  | {
5932
5949
  type: 'insert.blocks'
5933
5950
  blocks: Array<PortableTextBlock>
5951
+ placement: 'auto' | 'after' | 'before'
5934
5952
  }
5935
5953
  | {
5936
5954
  type: 'insert.block object'
@@ -6225,6 +6243,7 @@ declare const editorMachine: StateMachine<
6225
6243
  | {
6226
6244
  type: 'insert.blocks'
6227
6245
  blocks: Array<PortableTextBlock>
6246
+ placement: 'auto' | 'after' | 'before'
6228
6247
  }
6229
6248
  | {
6230
6249
  type: 'insert.block object'
@@ -6580,6 +6599,7 @@ declare const editorMachine: StateMachine<
6580
6599
  | {
6581
6600
  type: 'insert.blocks'
6582
6601
  blocks: Array<PortableTextBlock>
6602
+ placement: 'auto' | 'after' | 'before'
6583
6603
  }
6584
6604
  | {
6585
6605
  type: 'insert.block object'
@@ -6872,6 +6892,7 @@ declare const editorMachine: StateMachine<
6872
6892
  | {
6873
6893
  type: 'insert.blocks'
6874
6894
  blocks: Array<PortableTextBlock>
6895
+ placement: 'auto' | 'after' | 'before'
6875
6896
  }
6876
6897
  | {
6877
6898
  type: 'insert.block object'
@@ -7227,6 +7248,7 @@ declare const editorMachine: StateMachine<
7227
7248
  | {
7228
7249
  type: 'insert.blocks'
7229
7250
  blocks: Array<PortableTextBlock>
7251
+ placement: 'auto' | 'after' | 'before'
7230
7252
  }
7231
7253
  | {
7232
7254
  type: 'insert.block object'
@@ -7520,6 +7542,7 @@ declare const editorMachine: StateMachine<
7520
7542
  | {
7521
7543
  type: 'insert.blocks'
7522
7544
  blocks: Array<PortableTextBlock>
7545
+ placement: 'auto' | 'after' | 'before'
7523
7546
  }
7524
7547
  | {
7525
7548
  type: 'insert.block object'
@@ -7875,6 +7898,7 @@ declare const editorMachine: StateMachine<
7875
7898
  | {
7876
7899
  type: 'insert.blocks'
7877
7900
  blocks: Array<PortableTextBlock>
7901
+ placement: 'auto' | 'after' | 'before'
7878
7902
  }
7879
7903
  | {
7880
7904
  type: 'insert.block object'
@@ -8171,6 +8195,7 @@ declare const editorMachine: StateMachine<
8171
8195
  | {
8172
8196
  type: 'insert.blocks'
8173
8197
  blocks: Array<PortableTextBlock>
8198
+ placement: 'auto' | 'after' | 'before'
8174
8199
  }
8175
8200
  | {
8176
8201
  type: 'insert.block object'
@@ -8526,6 +8551,7 @@ declare const editorMachine: StateMachine<
8526
8551
  | {
8527
8552
  type: 'insert.blocks'
8528
8553
  blocks: Array<PortableTextBlock>
8554
+ placement: 'auto' | 'after' | 'before'
8529
8555
  }
8530
8556
  | {
8531
8557
  type: 'insert.block object'
@@ -8822,6 +8848,7 @@ declare const editorMachine: StateMachine<
8822
8848
  | {
8823
8849
  type: 'insert.blocks'
8824
8850
  blocks: Array<PortableTextBlock>
8851
+ placement: 'auto' | 'after' | 'before'
8825
8852
  }
8826
8853
  | {
8827
8854
  type: 'insert.block object'
@@ -9200,6 +9227,7 @@ declare const editorMachine: StateMachine<
9200
9227
  | {
9201
9228
  type: 'insert.blocks'
9202
9229
  blocks: Array<PortableTextBlock>
9230
+ placement: 'auto' | 'after' | 'before'
9203
9231
  }
9204
9232
  | {
9205
9233
  type: 'insert.block object'
@@ -9575,6 +9603,7 @@ declare const editorMachine: StateMachine<
9575
9603
  | {
9576
9604
  type: 'insert.blocks'
9577
9605
  blocks: Array<PortableTextBlock>
9606
+ placement: 'auto' | 'after' | 'before'
9578
9607
  }
9579
9608
  | {
9580
9609
  type: 'insert.block object'
@@ -10100,6 +10129,7 @@ declare const editorMachine: StateMachine<
10100
10129
  | {
10101
10130
  type: 'insert.blocks'
10102
10131
  blocks: Array<PortableTextBlock>
10132
+ placement: 'auto' | 'after' | 'before'
10103
10133
  }
10104
10134
  | {
10105
10135
  type: 'insert.block object'
@@ -10457,6 +10487,7 @@ declare const editorMachine: StateMachine<
10457
10487
  | {
10458
10488
  type: 'insert.blocks'
10459
10489
  blocks: Array<PortableTextBlock>
10490
+ placement: 'auto' | 'after' | 'before'
10460
10491
  }
10461
10492
  | {
10462
10493
  type: 'insert.block object'
@@ -10756,6 +10787,7 @@ declare const editorMachine: StateMachine<
10756
10787
  | {
10757
10788
  type: 'insert.blocks'
10758
10789
  blocks: Array<PortableTextBlock>
10790
+ placement: 'auto' | 'after' | 'before'
10759
10791
  }
10760
10792
  | {
10761
10793
  type: 'insert.block object'
@@ -11113,6 +11145,7 @@ declare const editorMachine: StateMachine<
11113
11145
  | {
11114
11146
  type: 'insert.blocks'
11115
11147
  blocks: Array<PortableTextBlock>
11148
+ placement: 'auto' | 'after' | 'before'
11116
11149
  }
11117
11150
  | {
11118
11151
  type: 'insert.block object'
@@ -11405,6 +11438,7 @@ declare const editorMachine: StateMachine<
11405
11438
  | {
11406
11439
  type: 'insert.blocks'
11407
11440
  blocks: Array<PortableTextBlock>
11441
+ placement: 'auto' | 'after' | 'before'
11408
11442
  }
11409
11443
  | {
11410
11444
  type: 'insert.block object'
@@ -11762,6 +11796,7 @@ declare const editorMachine: StateMachine<
11762
11796
  | {
11763
11797
  type: 'insert.blocks'
11764
11798
  blocks: Array<PortableTextBlock>
11799
+ placement: 'auto' | 'after' | 'before'
11765
11800
  }
11766
11801
  | {
11767
11802
  type: 'insert.block object'
@@ -12054,6 +12089,7 @@ declare const editorMachine: StateMachine<
12054
12089
  | {
12055
12090
  type: 'insert.blocks'
12056
12091
  blocks: Array<PortableTextBlock>
12092
+ placement: 'auto' | 'after' | 'before'
12057
12093
  }
12058
12094
  | {
12059
12095
  type: 'insert.block object'
@@ -12411,6 +12447,7 @@ declare const editorMachine: StateMachine<
12411
12447
  | {
12412
12448
  type: 'insert.blocks'
12413
12449
  blocks: Array<PortableTextBlock>
12450
+ placement: 'auto' | 'after' | 'before'
12414
12451
  }
12415
12452
  | {
12416
12453
  type: 'insert.block object'
@@ -12716,6 +12753,7 @@ declare const editorMachine: StateMachine<
12716
12753
  | {
12717
12754
  type: 'insert.blocks'
12718
12755
  blocks: Array<PortableTextBlock>
12756
+ placement: 'auto' | 'after' | 'before'
12719
12757
  }
12720
12758
  | {
12721
12759
  type: 'insert.block object'
@@ -13073,6 +13111,7 @@ declare const editorMachine: StateMachine<
13073
13111
  | {
13074
13112
  type: 'insert.blocks'
13075
13113
  blocks: Array<PortableTextBlock>
13114
+ placement: 'auto' | 'after' | 'before'
13076
13115
  }
13077
13116
  | {
13078
13117
  type: 'insert.block object'
@@ -13379,6 +13418,7 @@ declare const editorMachine: StateMachine<
13379
13418
  | {
13380
13419
  type: 'insert.blocks'
13381
13420
  blocks: Array<PortableTextBlock>
13421
+ placement: 'auto' | 'after' | 'before'
13382
13422
  }
13383
13423
  | {
13384
13424
  type: 'insert.block object'
@@ -13736,6 +13776,7 @@ declare const editorMachine: StateMachine<
13736
13776
  | {
13737
13777
  type: 'insert.blocks'
13738
13778
  blocks: Array<PortableTextBlock>
13779
+ placement: 'auto' | 'after' | 'before'
13739
13780
  }
13740
13781
  | {
13741
13782
  type: 'insert.block object'
@@ -14028,6 +14069,7 @@ declare const editorMachine: StateMachine<
14028
14069
  | {
14029
14070
  type: 'insert.blocks'
14030
14071
  blocks: Array<PortableTextBlock>
14072
+ placement: 'auto' | 'after' | 'before'
14031
14073
  }
14032
14074
  | {
14033
14075
  type: 'insert.block object'
@@ -14385,6 +14427,7 @@ declare const editorMachine: StateMachine<
14385
14427
  | {
14386
14428
  type: 'insert.blocks'
14387
14429
  blocks: Array<PortableTextBlock>
14430
+ placement: 'auto' | 'after' | 'before'
14388
14431
  }
14389
14432
  | {
14390
14433
  type: 'insert.block object'
@@ -14680,6 +14723,7 @@ declare const editorMachine: StateMachine<
14680
14723
  | {
14681
14724
  type: 'insert.blocks'
14682
14725
  blocks: Array<PortableTextBlock>
14726
+ placement: 'auto' | 'after' | 'before'
14683
14727
  }
14684
14728
  | {
14685
14729
  type: 'insert.block object'
@@ -15037,6 +15081,7 @@ declare const editorMachine: StateMachine<
15037
15081
  | {
15038
15082
  type: 'insert.blocks'
15039
15083
  blocks: Array<PortableTextBlock>
15084
+ placement: 'auto' | 'after' | 'before'
15040
15085
  }
15041
15086
  | {
15042
15087
  type: 'insert.block object'
@@ -15237,6 +15282,7 @@ declare const editorMachine: StateMachine<
15237
15282
  | {
15238
15283
  type: 'insert.blocks'
15239
15284
  blocks: Array<PortableTextBlock>
15285
+ placement: 'auto' | 'after' | 'before'
15240
15286
  }
15241
15287
  | {
15242
15288
  type: 'insert.block object'
@@ -15383,6 +15429,7 @@ declare const editorMachine: StateMachine<
15383
15429
  | {
15384
15430
  type: 'insert.blocks'
15385
15431
  blocks: Array<PortableTextBlock>
15432
+ placement: 'auto' | 'after' | 'before'
15386
15433
  }
15387
15434
  | {
15388
15435
  type: 'insert.block object'
@@ -15740,6 +15787,7 @@ declare const editorMachine: StateMachine<
15740
15787
  | {
15741
15788
  type: 'insert.blocks'
15742
15789
  blocks: Array<PortableTextBlock>
15790
+ placement: 'auto' | 'after' | 'before'
15743
15791
  }
15744
15792
  | {
15745
15793
  type: 'insert.block object'
@@ -16041,6 +16089,7 @@ declare const editorMachine: StateMachine<
16041
16089
  | {
16042
16090
  type: 'insert.blocks'
16043
16091
  blocks: Array<PortableTextBlock>
16092
+ placement: 'auto' | 'after' | 'before'
16044
16093
  }
16045
16094
  | {
16046
16095
  type: 'insert.block object'
@@ -16398,6 +16447,7 @@ declare const editorMachine: StateMachine<
16398
16447
  | {
16399
16448
  type: 'insert.blocks'
16400
16449
  blocks: Array<PortableTextBlock>
16450
+ placement: 'auto' | 'after' | 'before'
16401
16451
  }
16402
16452
  | {
16403
16453
  type: 'insert.block object'
@@ -16700,6 +16750,7 @@ declare const editorMachine: StateMachine<
16700
16750
  | {
16701
16751
  type: 'insert.blocks'
16702
16752
  blocks: Array<PortableTextBlock>
16753
+ placement: 'auto' | 'after' | 'before'
16703
16754
  }
16704
16755
  | {
16705
16756
  type: 'insert.block object'
@@ -17057,6 +17108,7 @@ declare const editorMachine: StateMachine<
17057
17108
  | {
17058
17109
  type: 'insert.blocks'
17059
17110
  blocks: Array<PortableTextBlock>
17111
+ placement: 'auto' | 'after' | 'before'
17060
17112
  }
17061
17113
  | {
17062
17114
  type: 'insert.block object'
@@ -17350,6 +17402,7 @@ declare const editorMachine: StateMachine<
17350
17402
  | {
17351
17403
  type: 'insert.blocks'
17352
17404
  blocks: Array<PortableTextBlock>
17405
+ placement: 'auto' | 'after' | 'before'
17353
17406
  }
17354
17407
  | {
17355
17408
  type: 'insert.block object'
@@ -17707,6 +17760,7 @@ declare const editorMachine: StateMachine<
17707
17760
  | {
17708
17761
  type: 'insert.blocks'
17709
17762
  blocks: Array<PortableTextBlock>
17763
+ placement: 'auto' | 'after' | 'before'
17710
17764
  }
17711
17765
  | {
17712
17766
  type: 'insert.block object'
@@ -18002,6 +18056,7 @@ declare const editorMachine: StateMachine<
18002
18056
  | {
18003
18057
  type: 'insert.blocks'
18004
18058
  blocks: Array<PortableTextBlock>
18059
+ placement: 'auto' | 'after' | 'before'
18005
18060
  }
18006
18061
  | {
18007
18062
  type: 'insert.block object'
@@ -18359,6 +18414,7 @@ declare const editorMachine: StateMachine<
18359
18414
  | {
18360
18415
  type: 'insert.blocks'
18361
18416
  blocks: Array<PortableTextBlock>
18417
+ placement: 'auto' | 'after' | 'before'
18362
18418
  }
18363
18419
  | {
18364
18420
  type: 'insert.block object'
@@ -18660,6 +18716,7 @@ declare const editorMachine: StateMachine<
18660
18716
  | {
18661
18717
  type: 'insert.blocks'
18662
18718
  blocks: Array<PortableTextBlock>
18719
+ placement: 'auto' | 'after' | 'before'
18663
18720
  }
18664
18721
  | {
18665
18722
  type: 'insert.block object'
@@ -19017,6 +19074,7 @@ declare const editorMachine: StateMachine<
19017
19074
  | {
19018
19075
  type: 'insert.blocks'
19019
19076
  blocks: Array<PortableTextBlock>
19077
+ placement: 'auto' | 'after' | 'before'
19020
19078
  }
19021
19079
  | {
19022
19080
  type: 'insert.block object'
@@ -19747,6 +19805,7 @@ declare type SyntheticBehaviorEvent =
19747
19805
  | {
19748
19806
  type: 'insert.blocks'
19749
19807
  blocks: Array<PortableTextBlock>
19808
+ placement: 'auto' | 'after' | 'before'
19750
19809
  }
19751
19810
  | {
19752
19811
  type: 'insert.block object'