| 337 | // ── Selection API ──────────────────────────────────────────────────────────── |
| 338 | |
| 339 | selection(): SelectionProxy { |
| 340 | const ids = [...this.currentSelection]; |
| 341 | return { |
| 342 | ids, |
| 343 | setStyle: (styles) => this.dispatch({ type: "setStyle", target: ids, styles }), |
| 344 | setText: (value) => this.dispatch({ type: "setText", target: ids, value }), |
| 345 | setAttribute: (name, value) => |
| 346 | this.dispatch({ type: "setAttribute", target: ids, name, value }), |
| 347 | setTiming: (timing) => this.dispatch({ type: "setTiming", target: ids, ...timing }), |
| 348 | removeElement: () => this.dispatch({ type: "removeElement", target: ids }), |
| 349 | }; |
| 350 | } |
| 351 | |
| 352 | element(id: HfId): ElementHandle { |
| 353 | return { |