diff --git a/packages/runtime/package.json b/packages/runtime/package.json index e5dd82e..60e92fb 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -46,5 +46,8 @@ }, "peerDependencies": { "vue": "^3.4.0" + }, + "engines": { + "node": ">=22" } } diff --git a/packages/runtime/src/host/yoga.ts b/packages/runtime/src/host/yoga.ts index 80ad6dc..490d9c9 100644 --- a/packages/runtime/src/host/yoga.ts +++ b/packages/runtime/src/host/yoga.ts @@ -9,6 +9,7 @@ import type { TuiText, TuiTransform, } from "./nodes.ts"; +import { flattenLeaves, measureTextNatural, wrapText } from "./text-measure.ts"; type YogaCarrier = TuiRoot | TuiBox | TuiText | TuiStatic | TuiTransform; @@ -314,8 +315,6 @@ export function applyYogaProp(node: YogaCarrier, key: string, value: unknown): v // --- text measure binding ------------------------------------------------ -import { flattenLeaves, measureTextNatural, wrapText } from "./text-measure.ts"; - export function bindTextMeasure(text: TuiText): void { text.yoga.setMeasureFunc((availableWidth) => { const raw = flattenLeaves(text);