(sharedRoot: Y.XmlText, key: string)
| 68 | } |
| 69 | |
| 70 | export function getStoredPosition(sharedRoot: Y.XmlText, key: string): Y.RelativePosition | null { |
| 71 | const rawPosition = sharedRoot.getAttribute(STORED_POSITION_PREFIX + key) |
| 72 | if (!rawPosition) { |
| 73 | return null |
| 74 | } |
| 75 | |
| 76 | return Y.decodeRelativePosition(rawPosition) |
| 77 | } |
| 78 | |
| 79 | export function getStoredPositions(sharedRoot: Y.XmlText): Record<string, Y.RelativePosition> { |
| 80 | return Object.fromEntries( |
no outgoing calls
no test coverage detected
searching dependent graphs…