feat: add custom widget flow workbench

This commit is contained in:
ajnart committed 2026-09-12 22:51:46 +02:00
1 parent c32a5317ca
commit a6bdbbb4ea
259 files changed
+23875 -1293

No files matched your search

@@ -0,0 +1,28 @@
import { isInterpreterCallback } from "./interpreter-foundation";
const targetProps = new Set([
"ref",
"onClick",
"onMouseEnter",
"onMouseLeave",
"onMouseDown",
"onMouseUp",
"onPointerEnter",
"onPointerLeave",
"onPointerDown",
"onPointerUp",
"onFocus",
"onBlur",
"onKeyDown",
"onKeyUp",
]);
/** The emitter removes authored functions and refs before creating elements. These can only be injected later
* by trusted target primitives (Popover, Menu, Tooltip) cloning their child. Never restore input change handlers. */
export function trustedTargetProps(props: Readonly<Record<string, unknown>>) {
return Object.fromEntries(
Object.entries(props).filter(
([name, value]) => targetProps.has(name) && typeof value === "function" && !isInterpreterCallback(value),
),
);
}