function __cfHardenFn(fn: Function) { Object.freeze(fn); const prototype = fn.prototype; if (prototype && typeof prototype === "object") { Object.freeze(prototype); } return fn; } import { __cfHelpers } from "commonfabric"; import { computed, pattern, UI } from "commonfabric"; const define = undefined; const runtimeDeps = undefined; const __cfAmdHooks = undefined; const __cfLift_1 = __cfHelpers.lift<{ count: number; }, __cfHelpers.JSXElement>(({ count }) => { const format = (value: number) => `Count: ${value}`; return {format(count)}; }, { type: "object", properties: { count: { type: "number" } }, required: ["count"] } as const satisfies __cfHelpers.JSONSchema, { anyOf: [{ $ref: "https://commonfabric.org/schemas/vnode.json" }, { $ref: "#/$defs/UIRenderable" }, { type: "object", properties: {} }], $defs: { UIRenderable: { type: "object", properties: { $UI: { $ref: "https://commonfabric.org/schemas/vnode.json" } }, required: ["$UI"] } } } as const satisfies __cfHelpers.JSONSchema); // FIXTURE: computed-jsx-local-function // Verifies: computed() with a locally-defined function inside the callback is closure-extracted // computed(() => { const format = ...; return {format(count)} }) → lift(({ count }) => { ... })({ count }) // The pattern param `count` is captured with asOpaque: true in the schema. export default pattern((__cf_pattern_input) => { const count = __cf_pattern_input.key("count"); return { [UI]: (