(sharedRoot: Y.XmlText)
| 77 | } |
| 78 | |
| 79 | export function getStoredPositions(sharedRoot: Y.XmlText): Record<string, Y.RelativePosition> { |
| 80 | return Object.fromEntries( |
| 81 | Object.entries(sharedRoot.getAttributes()) |
| 82 | .filter(([key]) => key.startsWith(STORED_POSITION_PREFIX)) |
| 83 | .map(([key, position]) => [ |
| 84 | key.slice(STORED_POSITION_PREFIX.length), |
| 85 | Y.createRelativePositionFromJSON(position), |
| 86 | ]), |
| 87 | ) |
| 88 | } |
| 89 | |
| 90 | function getStoredPositionsAbsolute(sharedRoot: Y.XmlText) { |
| 91 | assertDocumentAttachment(sharedRoot) |
no outgoing calls
no test coverage detected
searching dependent graphs…