(part: ToolPart)
| 1298 | } |
| 1299 | |
| 1300 | export function toolInlineInfo(part: ToolPart): ToolInline { |
| 1301 | const ctx = frame(part) |
| 1302 | const draw = rule(ctx.name)?.run |
| 1303 | try { |
| 1304 | if (draw) { |
| 1305 | return draw(props(ctx)) |
| 1306 | } |
| 1307 | } catch { |
| 1308 | return fallbackInline(ctx) |
| 1309 | } |
| 1310 | |
| 1311 | return fallbackInline(ctx) |
| 1312 | } |
| 1313 | |
| 1314 | export function toolScroll(phase: ToolPhase, ctx: ToolFrame): string { |
| 1315 | const draw = rule(ctx.name)?.scroll?.[phase] |