@vizejs/fresco 0.381.0 → 0.385.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{renderer-DWG0G3g8.d.mts → accessibility-Ca6moS43.d.mts} +7 -3
- package/dist/accessibility-Ca6moS43.d.mts.map +1 -0
- package/dist/{app-D_Ke7C8w.mjs → app-BFoESJ4g.mjs} +2 -2
- package/dist/{app-D_Ke7C8w.mjs.map → app-BFoESJ4g.mjs.map} +1 -1
- package/dist/{app-DJImCkSW.d.mts → app-DsHJno1z.d.mts} +2 -2
- package/dist/{app-DJImCkSW.d.mts.map → app-DsHJno1z.d.mts.map} +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{components-3-vKPu1z.mjs → components-DlVmYitp.mjs} +2 -2
- package/dist/{components-3-vKPu1z.mjs.map → components-DlVmYitp.mjs.map} +1 -1
- package/dist/composables/index.mjs +3 -3
- package/dist/{composables-Da3c5pxz.mjs → composables-B8W4GFdO.mjs} +3 -3
- package/dist/{composables-Da3c5pxz.mjs.map → composables-B8W4GFdO.mjs.map} +1 -1
- package/dist/{index-CovzQRe4.d.mts → index-CLt0Muo_.d.mts} +16 -20
- package/dist/index-CLt0Muo_.d.mts.map +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +4 -4
- package/dist/testing/index.d.mts +20 -2
- package/dist/testing/index.d.mts.map +1 -1
- package/dist/testing/index.mjs +113 -3
- package/dist/testing/index.mjs.map +1 -1
- package/dist/{useInput-BpH-JIU3.mjs → useInput-DLlmSFXF.mjs} +2 -2
- package/dist/{useInput-BpH-JIU3.mjs.map → useInput-DLlmSFXF.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/index-CovzQRe4.d.mts.map +0 -1
- package/dist/renderer-DWG0G3g8.d.mts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as useIsScreenReaderEnabled, n as useKeyPress, r as usePaste, t as useInput } from "../useInput-
|
|
3
|
-
import { i as useIme, n as useAnimation, r as useWindowSize, t as useBoxMetrics } from "../composables-
|
|
1
|
+
import { A as useApp, D as useFocusManager, E as useFocus, S as useStdout, _ as useCursor, b as useStderr, x as useStdin } from "../app-BFoESJ4g.mjs";
|
|
2
|
+
import { i as useIsScreenReaderEnabled, n as useKeyPress, r as usePaste, t as useInput } from "../useInput-DLlmSFXF.mjs";
|
|
3
|
+
import { i as useIme, n as useAnimation, r as useWindowSize, t as useBoxMetrics } from "../composables-B8W4GFdO.mjs";
|
|
4
4
|
export { useAnimation, useApp, useBoxMetrics, useCursor, useFocus, useFocusManager, useIme, useInput, useIsScreenReaderEnabled, useKeyPress, usePaste, useStderr, useStdin, useStdout, useWindowSize };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./useInput-
|
|
1
|
+
import { A as useApp, f as getLastRenderLayout, m as updateLastRenderLayouts } from "./app-BFoESJ4g.mjs";
|
|
2
|
+
import "./useInput-DLlmSFXF.mjs";
|
|
3
3
|
import { computed, onMounted, onUnmounted, reactive, ref, watch } from "@vue/runtime-core";
|
|
4
4
|
//#region src/composables/useIme.ts
|
|
5
5
|
/**
|
|
@@ -316,4 +316,4 @@ function useBoxMetrics(ref) {
|
|
|
316
316
|
//#endregion
|
|
317
317
|
export { useIme as i, useAnimation as n, useWindowSize as r, useBoxMetrics as t };
|
|
318
318
|
|
|
319
|
-
//# sourceMappingURL=composables-
|
|
319
|
+
//# sourceMappingURL=composables-B8W4GFdO.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composables-Da3c5pxz.mjs","names":[],"sources":["../src/composables/useIme.ts","../src/composables/useWindowSize.ts","../src/composables/useAnimation.ts","../src/composables/useBoxMetrics.ts"],"sourcesContent":["/**\n * useIme - IME (Input Method Editor) composable\n */\n\nimport { ref, computed, type Ref } from \"@vue/runtime-core\";\n\nexport interface UseImeOptions {\n /** Initial IME mode */\n mode?: ImeMode;\n /** Called when IME mode changes */\n onModeChange?: (mode: ImeMode) => void;\n /** Called when composition updates */\n onCompositionUpdate?: (text: string, cursor: number) => void;\n /** Called when text is committed */\n onCommit?: (text: string) => void;\n}\n\nexport type ImeMode =\n | \"direct\"\n | \"hiragana\"\n | \"katakana\"\n | \"half-katakana\"\n | \"full-alpha\"\n | \"pinyin\"\n | \"hangul\";\n\nexport interface ImeManager {\n /** Whether IME is active */\n isActive: Ref<boolean>;\n /** Current input mode */\n mode: Ref<ImeMode>;\n /** Whether currently composing */\n isComposing: Ref<boolean>;\n /** Preedit text */\n preedit: Ref<string>;\n /** Cursor position in preedit */\n preeditCursor: Ref<number>;\n /** Candidate list */\n candidates: Ref<string[]>;\n /** Selected candidate index */\n selectedCandidate: Ref<number>;\n /** Mode display name */\n modeDisplay: Ref<string>;\n /** Enable IME */\n enable: () => void;\n /** Disable IME */\n disable: () => void;\n /** Set input mode */\n setMode: (mode: ImeMode) => void;\n /** Handle key event for IME */\n handleKey: (key: string, modifiers: { ctrl: boolean; alt: boolean }) => boolean;\n /** Commit current composition */\n commit: () => void;\n /** Cancel current composition */\n cancel: () => void;\n /** Select next candidate */\n nextCandidate: () => void;\n /** Select previous candidate */\n prevCandidate: () => void;\n /** Select candidate by number (1-9) */\n selectCandidate: (num: number) => void;\n}\n\nconst MODE_DISPLAY: Record<ImeMode, string> = {\n direct: \"A\",\n hiragana: \"あ\",\n katakana: \"ア\",\n \"half-katakana\": \"ア\",\n \"full-alpha\": \"A\",\n pinyin: \"拼\",\n hangul: \"한\",\n};\n\nexport function useIme(options: UseImeOptions = {}): ImeManager {\n const { mode: initialMode = \"direct\", onModeChange, onCompositionUpdate, onCommit } = options;\n\n const isActive = ref(false);\n const mode = ref<ImeMode>(initialMode);\n const isComposing = ref(false);\n const preedit = ref(\"\");\n const preeditCursor = ref(0);\n const candidates = ref<string[]>([]);\n const selectedCandidate = ref(0);\n\n const modeDisplay = computed(() => MODE_DISPLAY[mode.value] ?? \"A\");\n\n const enable = () => {\n isActive.value = true;\n };\n\n const disable = () => {\n isActive.value = false;\n cancel();\n };\n\n const setMode = (newMode: ImeMode) => {\n if (mode.value !== newMode) {\n cancel();\n mode.value = newMode;\n onModeChange?.(newMode);\n }\n };\n\n const handleKey = (key: string, modifiers: { ctrl: boolean; alt: boolean }): boolean => {\n if (!isActive.value || mode.value === \"direct\") {\n return false;\n }\n\n // IME mode toggle (usually Ctrl+Space or similar)\n // If we're here, mode is not 'direct' (filtered above), so toggle to 'direct'\n if (modifiers.ctrl && key === \" \") {\n setMode(\"direct\");\n return true;\n }\n\n // Handle composition\n if (isComposing.value) {\n switch (key) {\n case \"enter\":\n commit();\n return true;\n case \"escape\":\n cancel();\n return true;\n case \"backspace\":\n if (preedit.value.length > 0) {\n preedit.value = preedit.value.slice(0, -1);\n preeditCursor.value = Math.min(preeditCursor.value, preedit.value.length);\n onCompositionUpdate?.(preedit.value, preeditCursor.value);\n return true;\n }\n break;\n case \"space\":\n // Convert / select candidate\n if (candidates.value.length > 0) {\n nextCandidate();\n return true;\n }\n break;\n }\n\n // Number for candidate selection\n if (/^[1-9]$/.test(key)) {\n selectCandidate(parseInt(key, 10));\n return true;\n }\n }\n\n // Start/continue composition for printable characters\n if (key.length === 1 && !modifiers.ctrl && !modifiers.alt) {\n if (!isComposing.value) {\n isComposing.value = true;\n }\n preedit.value += key;\n preeditCursor.value = preedit.value.length;\n onCompositionUpdate?.(preedit.value, preeditCursor.value);\n return true;\n }\n\n return false;\n };\n\n const commit = () => {\n if (preedit.value) {\n const text = candidates.value[selectedCandidate.value] ?? preedit.value;\n onCommit?.(text);\n }\n preedit.value = \"\";\n preeditCursor.value = 0;\n candidates.value = [];\n selectedCandidate.value = 0;\n isComposing.value = false;\n };\n\n const cancel = () => {\n preedit.value = \"\";\n preeditCursor.value = 0;\n candidates.value = [];\n selectedCandidate.value = 0;\n isComposing.value = false;\n };\n\n const nextCandidate = () => {\n if (candidates.value.length > 0) {\n selectedCandidate.value = (selectedCandidate.value + 1) % candidates.value.length;\n }\n };\n\n const prevCandidate = () => {\n if (candidates.value.length > 0) {\n selectedCandidate.value =\n (selectedCandidate.value - 1 + candidates.value.length) % candidates.value.length;\n }\n };\n\n const selectCandidate = (num: number) => {\n if (num >= 1 && num <= candidates.value.length) {\n selectedCandidate.value = num - 1;\n commit();\n }\n };\n\n return {\n isActive,\n mode,\n isComposing,\n preedit,\n preeditCursor,\n candidates,\n selectedCandidate,\n modeDisplay,\n enable,\n disable,\n setMode,\n handleKey,\n commit,\n cancel,\n nextCandidate,\n prevCandidate,\n selectCandidate,\n };\n}\n","/**\n * useWindowSize - terminal dimensions.\n */\n\nimport { reactive } from \"@vue/runtime-core\";\nimport { useApp } from \"./useApp.js\";\n\nexport interface WindowSize {\n columns: number;\n rows: number;\n}\n\nexport function useWindowSize() {\n const { width, height } = useApp();\n\n return reactive({\n get columns() {\n return width.value;\n },\n get rows() {\n return height.value;\n },\n }) as WindowSize;\n}\n","/**\n * useAnimation - Ink-compatible shared animation state.\n */\n\nimport { computed, onMounted, onUnmounted, reactive, watch } from \"@vue/runtime-core\";\n\nexport interface UseAnimationOptions {\n /** Time between ticks in milliseconds */\n interval?: number;\n /** Whether the animation is running */\n isActive?: boolean;\n}\n\nexport interface AnimationResult {\n frame: number;\n time: number;\n delta: number;\n reset: () => void;\n}\n\nconst defaultAnimationInterval = 100;\nconst maximumTimerInterval = 2_147_483_647;\n\ntype AnimationCallback = (currentTime: number) => void;\n\ninterface AnimationSubscriber {\n callback: AnimationCallback;\n interval: number;\n startTime: number;\n nextDueTime: number;\n}\n\nconst animationSubscribers = new Map<AnimationCallback, AnimationSubscriber>();\nlet animationTimer: ReturnType<typeof setTimeout> | null = null;\n\nfunction currentTime(): number {\n return performance.now();\n}\n\nfunction normalizeAnimationInterval(interval: number): number {\n if (!Number.isFinite(interval)) {\n return defaultAnimationInterval;\n }\n\n return Math.min(maximumTimerInterval, Math.max(1, interval));\n}\n\nfunction clearAnimationTimer() {\n if (!animationTimer) return;\n clearTimeout(animationTimer);\n animationTimer = null;\n}\n\nfunction scheduleAnimationTick() {\n clearAnimationTimer();\n if (animationSubscribers.size === 0) return;\n\n let nextDueTime = Number.POSITIVE_INFINITY;\n for (const subscriber of animationSubscribers.values()) {\n nextDueTime = Math.min(nextDueTime, subscriber.nextDueTime);\n }\n\n animationTimer = setTimeout(\n () => {\n animationTimer = null;\n const now = currentTime();\n\n for (const subscriber of animationSubscribers.values()) {\n if (now < subscriber.nextDueTime) continue;\n\n subscriber.callback(now);\n\n const elapsedTime = now - subscriber.startTime;\n const elapsedFrames = Math.floor(elapsedTime / subscriber.interval) + 1;\n subscriber.nextDueTime = subscriber.startTime + elapsedFrames * subscriber.interval;\n }\n\n scheduleAnimationTick();\n },\n Math.max(0, nextDueTime - currentTime()),\n );\n}\n\nfunction subscribeToAnimation(callback: AnimationCallback, interval: number) {\n const startTime = currentTime();\n animationSubscribers.set(callback, {\n callback,\n interval,\n startTime,\n nextDueTime: startTime + interval,\n });\n scheduleAnimationTick();\n\n return {\n startTime,\n unsubscribe() {\n animationSubscribers.delete(callback);\n scheduleAnimationTick();\n },\n };\n}\n\nexport function useAnimation(options: UseAnimationOptions = {}): AnimationResult {\n const safeInterval = computed(() =>\n normalizeAnimationInterval(options.interval ?? defaultAnimationInterval),\n );\n const active = computed(() => options.isActive ?? true);\n let unsubscribe: (() => void) | null = null;\n let startedAt = currentTime();\n let previousTick = startedAt;\n\n const state = reactive<AnimationResult>({\n frame: 0,\n time: 0,\n delta: 0,\n reset: () => {\n if (active.value) {\n start();\n } else {\n resetState(currentTime());\n }\n },\n });\n\n const resetState = (now: number) => {\n startedAt = now;\n previousTick = now;\n state.frame = 0;\n state.time = 0;\n state.delta = 0;\n };\n\n const tick = (now: number) => {\n const elapsed = now - startedAt;\n state.frame = Math.floor(elapsed / safeInterval.value);\n state.time = elapsed;\n state.delta = now - previousTick;\n previousTick = now;\n };\n\n const stop = () => {\n unsubscribe?.();\n unsubscribe = null;\n };\n\n const start = () => {\n stop();\n resetState(currentTime());\n const subscription = subscribeToAnimation(tick, safeInterval.value);\n startedAt = subscription.startTime;\n previousTick = subscription.startTime;\n unsubscribe = () => subscription.unsubscribe();\n };\n\n onMounted(() => {\n if (active.value) {\n start();\n }\n });\n\n watch([active, safeInterval], ([isActive]) => {\n if (isActive) {\n start();\n } else {\n stop();\n }\n });\n\n onUnmounted(stop);\n\n return state;\n}\n","/**\n * useBoxMetrics - best-effort layout metrics for a rendered Fresco node.\n */\n\nimport { onMounted, onUnmounted, reactive, type Ref } from \"@vue/runtime-core\";\nimport { getLastRenderLayout, updateLastRenderLayouts, type DOMElement } from \"../layoutMetrics.js\";\n\nexport interface BoxMetrics {\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface UseBoxMetricsResult extends BoxMetrics {\n hasMeasured: boolean;\n}\n\nexport type MetricTarget = DOMElement;\n\nasync function loadNative() {\n return import(\"@vizejs/fresco-native\");\n}\n\nfunction targetId(target: MetricTarget | null | undefined): number | undefined {\n return target?.id ?? target?.$el?.id;\n}\n\nexport function useBoxMetrics(ref: Ref<MetricTarget | null>): UseBoxMetricsResult {\n const metrics = reactive<UseBoxMetricsResult>({\n width: 0,\n height: 0,\n left: 0,\n top: 0,\n hasMeasured: false,\n });\n\n let timer: ReturnType<typeof setInterval> | null = null;\n\n const refresh = () => {\n const id = targetId(ref.value);\n if (id === undefined) {\n metrics.width = 0;\n metrics.height = 0;\n metrics.left = 0;\n metrics.top = 0;\n metrics.hasMeasured = false;\n return;\n }\n\n void loadNative()\n .then((native) => {\n const layouts = \"getLastRenderLayouts\" in native ? native.getLastRenderLayouts() : [];\n updateLastRenderLayouts(layouts);\n const layout = layouts.find((item: { id: number }) => item.id === id);\n if (!layout) return;\n\n metrics.width = layout.width;\n metrics.height = layout.height;\n metrics.left = layout.x;\n metrics.top = layout.y;\n metrics.hasMeasured = true;\n })\n .catch(() => {});\n };\n\n onMounted(() => {\n const layout = getLastRenderLayout(ref.value);\n if (layout) {\n metrics.width = layout.width;\n metrics.height = layout.height;\n metrics.left = layout.x;\n metrics.top = layout.y;\n metrics.hasMeasured = true;\n }\n\n refresh();\n timer = setInterval(refresh, 100);\n });\n\n onUnmounted(() => {\n if (timer) clearInterval(timer);\n });\n\n return metrics;\n}\n"],"mappings":";;;;;;;AA+DA,MAAM,eAAwC;CAC5C,QAAQ;CACR,UAAU;CACV,UAAU;CACV,iBAAiB;CACjB,cAAc;CACd,QAAQ;CACR,QAAQ;AACV;AAEA,SAAgB,OAAO,UAAyB,CAAC,GAAe;CAC9D,MAAM,EAAE,MAAM,cAAc,UAAU,cAAc,qBAAqB,aAAa;CAEtF,MAAM,WAAW,IAAI,KAAK;CAC1B,MAAM,OAAO,IAAa,WAAW;CACrC,MAAM,cAAc,IAAI,KAAK;CAC7B,MAAM,UAAU,IAAI,EAAE;CACtB,MAAM,gBAAgB,IAAI,CAAC;CAC3B,MAAM,aAAa,IAAc,CAAC,CAAC;CACnC,MAAM,oBAAoB,IAAI,CAAC;CAE/B,MAAM,cAAc,eAAe,aAAa,KAAK,UAAU,GAAG;CAElE,MAAM,eAAe;EACnB,SAAS,QAAQ;CACnB;CAEA,MAAM,gBAAgB;EACpB,SAAS,QAAQ;EACjB,OAAO;CACT;CAEA,MAAM,WAAW,YAAqB;EACpC,IAAI,KAAK,UAAU,SAAS;GAC1B,OAAO;GACP,KAAK,QAAQ;GACb,eAAe,OAAO;EACxB;CACF;CAEA,MAAM,aAAa,KAAa,cAAwD;EACtF,IAAI,CAAC,SAAS,SAAS,KAAK,UAAU,UACpC,OAAO;EAKT,IAAI,UAAU,QAAQ,QAAQ,KAAK;GACjC,QAAQ,QAAQ;GAChB,OAAO;EACT;EAGA,IAAI,YAAY,OAAO;GACrB,QAAQ,KAAR;IACE,KAAK;KACH,OAAO;KACP,OAAO;IACT,KAAK;KACH,OAAO;KACP,OAAO;IACT,KAAK;KACH,IAAI,QAAQ,MAAM,SAAS,GAAG;MAC5B,Q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}
|
|
1
|
+
{"version":3,"file":"composables-B8W4GFdO.mjs","names":[],"sources":["../src/composables/useIme.ts","../src/composables/useWindowSize.ts","../src/composables/useAnimation.ts","../src/composables/useBoxMetrics.ts"],"sourcesContent":["/**\n * useIme - IME (Input Method Editor) composable\n */\n\nimport { ref, computed, type Ref } from \"@vue/runtime-core\";\n\nexport interface UseImeOptions {\n /** Initial IME mode */\n mode?: ImeMode;\n /** Called when IME mode changes */\n onModeChange?: (mode: ImeMode) => void;\n /** Called when composition updates */\n onCompositionUpdate?: (text: string, cursor: number) => void;\n /** Called when text is committed */\n onCommit?: (text: string) => void;\n}\n\nexport type ImeMode =\n | \"direct\"\n | \"hiragana\"\n | \"katakana\"\n | \"half-katakana\"\n | \"full-alpha\"\n | \"pinyin\"\n | \"hangul\";\n\nexport interface ImeManager {\n /** Whether IME is active */\n isActive: Ref<boolean>;\n /** Current input mode */\n mode: Ref<ImeMode>;\n /** Whether currently composing */\n isComposing: Ref<boolean>;\n /** Preedit text */\n preedit: Ref<string>;\n /** Cursor position in preedit */\n preeditCursor: Ref<number>;\n /** Candidate list */\n candidates: Ref<string[]>;\n /** Selected candidate index */\n selectedCandidate: Ref<number>;\n /** Mode display name */\n modeDisplay: Ref<string>;\n /** Enable IME */\n enable: () => void;\n /** Disable IME */\n disable: () => void;\n /** Set input mode */\n setMode: (mode: ImeMode) => void;\n /** Handle key event for IME */\n handleKey: (key: string, modifiers: { ctrl: boolean; alt: boolean }) => boolean;\n /** Commit current composition */\n commit: () => void;\n /** Cancel current composition */\n cancel: () => void;\n /** Select next candidate */\n nextCandidate: () => void;\n /** Select previous candidate */\n prevCandidate: () => void;\n /** Select candidate by number (1-9) */\n selectCandidate: (num: number) => void;\n}\n\nconst MODE_DISPLAY: Record<ImeMode, string> = {\n direct: \"A\",\n hiragana: \"あ\",\n katakana: \"ア\",\n \"half-katakana\": \"ア\",\n \"full-alpha\": \"A\",\n pinyin: \"拼\",\n hangul: \"한\",\n};\n\nexport function useIme(options: UseImeOptions = {}): ImeManager {\n const { mode: initialMode = \"direct\", onModeChange, onCompositionUpdate, onCommit } = options;\n\n const isActive = ref(false);\n const mode = ref<ImeMode>(initialMode);\n const isComposing = ref(false);\n const preedit = ref(\"\");\n const preeditCursor = ref(0);\n const candidates = ref<string[]>([]);\n const selectedCandidate = ref(0);\n\n const modeDisplay = computed(() => MODE_DISPLAY[mode.value] ?? \"A\");\n\n const enable = () => {\n isActive.value = true;\n };\n\n const disable = () => {\n isActive.value = false;\n cancel();\n };\n\n const setMode = (newMode: ImeMode) => {\n if (mode.value !== newMode) {\n cancel();\n mode.value = newMode;\n onModeChange?.(newMode);\n }\n };\n\n const handleKey = (key: string, modifiers: { ctrl: boolean; alt: boolean }): boolean => {\n if (!isActive.value || mode.value === \"direct\") {\n return false;\n }\n\n // IME mode toggle (usually Ctrl+Space or similar)\n // If we're here, mode is not 'direct' (filtered above), so toggle to 'direct'\n if (modifiers.ctrl && key === \" \") {\n setMode(\"direct\");\n return true;\n }\n\n // Handle composition\n if (isComposing.value) {\n switch (key) {\n case \"enter\":\n commit();\n return true;\n case \"escape\":\n cancel();\n return true;\n case \"backspace\":\n if (preedit.value.length > 0) {\n preedit.value = preedit.value.slice(0, -1);\n preeditCursor.value = Math.min(preeditCursor.value, preedit.value.length);\n onCompositionUpdate?.(preedit.value, preeditCursor.value);\n return true;\n }\n break;\n case \"space\":\n // Convert / select candidate\n if (candidates.value.length > 0) {\n nextCandidate();\n return true;\n }\n break;\n }\n\n // Number for candidate selection\n if (/^[1-9]$/.test(key)) {\n selectCandidate(parseInt(key, 10));\n return true;\n }\n }\n\n // Start/continue composition for printable characters\n if (key.length === 1 && !modifiers.ctrl && !modifiers.alt) {\n if (!isComposing.value) {\n isComposing.value = true;\n }\n preedit.value += key;\n preeditCursor.value = preedit.value.length;\n onCompositionUpdate?.(preedit.value, preeditCursor.value);\n return true;\n }\n\n return false;\n };\n\n const commit = () => {\n if (preedit.value) {\n const text = candidates.value[selectedCandidate.value] ?? preedit.value;\n onCommit?.(text);\n }\n preedit.value = \"\";\n preeditCursor.value = 0;\n candidates.value = [];\n selectedCandidate.value = 0;\n isComposing.value = false;\n };\n\n const cancel = () => {\n preedit.value = \"\";\n preeditCursor.value = 0;\n candidates.value = [];\n selectedCandidate.value = 0;\n isComposing.value = false;\n };\n\n const nextCandidate = () => {\n if (candidates.value.length > 0) {\n selectedCandidate.value = (selectedCandidate.value + 1) % candidates.value.length;\n }\n };\n\n const prevCandidate = () => {\n if (candidates.value.length > 0) {\n selectedCandidate.value =\n (selectedCandidate.value - 1 + candidates.value.length) % candidates.value.length;\n }\n };\n\n const selectCandidate = (num: number) => {\n if (num >= 1 && num <= candidates.value.length) {\n selectedCandidate.value = num - 1;\n commit();\n }\n };\n\n return {\n isActive,\n mode,\n isComposing,\n preedit,\n preeditCursor,\n candidates,\n selectedCandidate,\n modeDisplay,\n enable,\n disable,\n setMode,\n handleKey,\n commit,\n cancel,\n nextCandidate,\n prevCandidate,\n selectCandidate,\n };\n}\n","/**\n * useWindowSize - terminal dimensions.\n */\n\nimport { reactive } from \"@vue/runtime-core\";\nimport { useApp } from \"./useApp.js\";\n\nexport interface WindowSize {\n columns: number;\n rows: number;\n}\n\nexport function useWindowSize() {\n const { width, height } = useApp();\n\n return reactive({\n get columns() {\n return width.value;\n },\n get rows() {\n return height.value;\n },\n }) as WindowSize;\n}\n","/**\n * useAnimation - Ink-compatible shared animation state.\n */\n\nimport { computed, onMounted, onUnmounted, reactive, watch } from \"@vue/runtime-core\";\n\nexport interface UseAnimationOptions {\n /** Time between ticks in milliseconds */\n interval?: number;\n /** Whether the animation is running */\n isActive?: boolean;\n}\n\nexport interface AnimationResult {\n frame: number;\n time: number;\n delta: number;\n reset: () => void;\n}\n\nconst defaultAnimationInterval = 100;\nconst maximumTimerInterval = 2_147_483_647;\n\ntype AnimationCallback = (currentTime: number) => void;\n\ninterface AnimationSubscriber {\n callback: AnimationCallback;\n interval: number;\n startTime: number;\n nextDueTime: number;\n}\n\nconst animationSubscribers = new Map<AnimationCallback, AnimationSubscriber>();\nlet animationTimer: ReturnType<typeof setTimeout> | null = null;\n\nfunction currentTime(): number {\n return performance.now();\n}\n\nfunction normalizeAnimationInterval(interval: number): number {\n if (!Number.isFinite(interval)) {\n return defaultAnimationInterval;\n }\n\n return Math.min(maximumTimerInterval, Math.max(1, interval));\n}\n\nfunction clearAnimationTimer() {\n if (!animationTimer) return;\n clearTimeout(animationTimer);\n animationTimer = null;\n}\n\nfunction scheduleAnimationTick() {\n clearAnimationTimer();\n if (animationSubscribers.size === 0) return;\n\n let nextDueTime = Number.POSITIVE_INFINITY;\n for (const subscriber of animationSubscribers.values()) {\n nextDueTime = Math.min(nextDueTime, subscriber.nextDueTime);\n }\n\n animationTimer = setTimeout(\n () => {\n animationTimer = null;\n const now = currentTime();\n\n for (const subscriber of animationSubscribers.values()) {\n if (now < subscriber.nextDueTime) continue;\n\n subscriber.callback(now);\n\n const elapsedTime = now - subscriber.startTime;\n const elapsedFrames = Math.floor(elapsedTime / subscriber.interval) + 1;\n subscriber.nextDueTime = subscriber.startTime + elapsedFrames * subscriber.interval;\n }\n\n scheduleAnimationTick();\n },\n Math.max(0, nextDueTime - currentTime()),\n );\n}\n\nfunction subscribeToAnimation(callback: AnimationCallback, interval: number) {\n const startTime = currentTime();\n animationSubscribers.set(callback, {\n callback,\n interval,\n startTime,\n nextDueTime: startTime + interval,\n });\n scheduleAnimationTick();\n\n return {\n startTime,\n unsubscribe() {\n animationSubscribers.delete(callback);\n scheduleAnimationTick();\n },\n };\n}\n\nexport function useAnimation(options: UseAnimationOptions = {}): AnimationResult {\n const safeInterval = computed(() =>\n normalizeAnimationInterval(options.interval ?? defaultAnimationInterval),\n );\n const active = computed(() => options.isActive ?? true);\n let unsubscribe: (() => void) | null = null;\n let startedAt = currentTime();\n let previousTick = startedAt;\n\n const state = reactive<AnimationResult>({\n frame: 0,\n time: 0,\n delta: 0,\n reset: () => {\n if (active.value) {\n start();\n } else {\n resetState(currentTime());\n }\n },\n });\n\n const resetState = (now: number) => {\n startedAt = now;\n previousTick = now;\n state.frame = 0;\n state.time = 0;\n state.delta = 0;\n };\n\n const tick = (now: number) => {\n const elapsed = now - startedAt;\n state.frame = Math.floor(elapsed / safeInterval.value);\n state.time = elapsed;\n state.delta = now - previousTick;\n previousTick = now;\n };\n\n const stop = () => {\n unsubscribe?.();\n unsubscribe = null;\n };\n\n const start = () => {\n stop();\n resetState(currentTime());\n const subscription = subscribeToAnimation(tick, safeInterval.value);\n startedAt = subscription.startTime;\n previousTick = subscription.startTime;\n unsubscribe = () => subscription.unsubscribe();\n };\n\n onMounted(() => {\n if (active.value) {\n start();\n }\n });\n\n watch([active, safeInterval], ([isActive]) => {\n if (isActive) {\n start();\n } else {\n stop();\n }\n });\n\n onUnmounted(stop);\n\n return state;\n}\n","/**\n * useBoxMetrics - best-effort layout metrics for a rendered Fresco node.\n */\n\nimport { onMounted, onUnmounted, reactive, type Ref } from \"@vue/runtime-core\";\nimport { getLastRenderLayout, updateLastRenderLayouts, type DOMElement } from \"../layoutMetrics.js\";\n\nexport interface BoxMetrics {\n width: number;\n height: number;\n left: number;\n top: number;\n}\n\nexport interface UseBoxMetricsResult extends BoxMetrics {\n hasMeasured: boolean;\n}\n\nexport type MetricTarget = DOMElement;\n\nasync function loadNative() {\n return import(\"@vizejs/fresco-native\");\n}\n\nfunction targetId(target: MetricTarget | null | undefined): number | undefined {\n return target?.id ?? target?.$el?.id;\n}\n\nexport function useBoxMetrics(ref: Ref<MetricTarget | null>): UseBoxMetricsResult {\n const metrics = reactive<UseBoxMetricsResult>({\n width: 0,\n height: 0,\n left: 0,\n top: 0,\n hasMeasured: false,\n });\n\n let timer: ReturnType<typeof setInterval> | null = null;\n\n const refresh = () => {\n const id = targetId(ref.value);\n if (id === undefined) {\n metrics.width = 0;\n metrics.height = 0;\n metrics.left = 0;\n metrics.top = 0;\n metrics.hasMeasured = false;\n return;\n }\n\n void loadNative()\n .then((native) => {\n const layouts = \"getLastRenderLayouts\" in native ? native.getLastRenderLayouts() : [];\n updateLastRenderLayouts(layouts);\n const layout = layouts.find((item: { id: number }) => item.id === id);\n if (!layout) return;\n\n metrics.width = layout.width;\n metrics.height = layout.height;\n metrics.left = layout.x;\n metrics.top = layout.y;\n metrics.hasMeasured = true;\n })\n .catch(() => {});\n };\n\n onMounted(() => {\n const layout = getLastRenderLayout(ref.value);\n if (layout) {\n metrics.width = layout.width;\n metrics.height = layout.height;\n metrics.left = layout.x;\n metrics.top = layout.y;\n metrics.hasMeasured = true;\n }\n\n refresh();\n timer = setInterval(refresh, 100);\n });\n\n onUnmounted(() => {\n if (timer) clearInterval(timer);\n });\n\n return metrics;\n}\n"],"mappings":";;;;;;;AA+DA,MAAM,eAAwC;CAC5C,QAAQ;CACR,UAAU;CACV,UAAU;CACV,iBAAiB;CACjB,cAAc;CACd,QAAQ;CACR,QAAQ;AACV;AAEA,SAAgB,OAAO,UAAyB,CAAC,GAAe;CAC9D,MAAM,EAAE,MAAM,cAAc,UAAU,cAAc,qBAAqB,aAAa;CAEtF,MAAM,WAAW,IAAI,KAAK;CAC1B,MAAM,OAAO,IAAa,WAAW;CACrC,MAAM,cAAc,IAAI,KAAK;CAC7B,MAAM,UAAU,IAAI,EAAE;CACtB,MAAM,gBAAgB,IAAI,CAAC;CAC3B,MAAM,aAAa,IAAc,CAAC,CAAC;CACnC,MAAM,oBAAoB,IAAI,CAAC;CAE/B,MAAM,cAAc,eAAe,aAAa,KAAK,UAAU,GAAG;CAElE,MAAM,eAAe;EACnB,SAAS,QAAQ;CACnB;CAEA,MAAM,gBAAgB;EACpB,SAAS,QAAQ;EACjB,OAAO;CACT;CAEA,MAAM,WAAW,YAAqB;EACpC,IAAI,KAAK,UAAU,SAAS;GAC1B,OAAO;GACP,KAAK,QAAQ;GACb,eAAe,OAAO;EACxB;CACF;CAEA,MAAM,aAAa,KAAa,cAAwD;EACtF,IAAI,CAAC,SAAS,SAAS,KAAK,UAAU,UACpC,OAAO;EAK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,OAAO;GACvB,QAAQ,SAAS,OAAO;GACxB,QAAQ,OAAO,OAAO;GACtB,QAAQ,MAAM,OAAO;GACrB,QAAQ,cAAc;EACxB;EAEA,QAAQ;EACR,QAAQ,YAAY,SAAS,GAAG;CAClC,CAAC;CAED,kBAAkB;EAChB,IAAI,OAAO,cAAc,KAAK;CAChC,CAAC;CAED,OAAO;AACT"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PropType,
|
|
1
|
+
import { A as FrescoStyle, d as FrescoAppearance, f as FrescoBorderStyle, h as FrescoDimension, m as FrescoCanonicalStyle, n as AriaState, t as AriaRole } from "./accessibility-Ca6moS43.mjs";
|
|
2
|
+
import { PropType, VNode } from "@vue/runtime-core";
|
|
3
3
|
|
|
4
|
-
//#region src/accessibility.d.ts
|
|
5
|
-
type AriaRole = "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
|
|
6
|
-
type AriaState = Partial<Record<"busy" | "checked" | "disabled" | "expanded" | "multiline" | "multiselectable" | "readonly" | "required" | "selected", boolean>>;
|
|
7
|
-
//#endregion
|
|
8
4
|
//#region src/components/Box.d.ts
|
|
9
5
|
type BorderStyleName = FrescoBorderStyle | "round" | "bold";
|
|
10
6
|
interface BoxProps extends FrescoCanonicalStyle {
|
|
@@ -533,13 +529,13 @@ declare const Text: import("@vue/runtime-core").DefineComponent<import("@vue/run
|
|
|
533
529
|
hidden: boolean;
|
|
534
530
|
bold: boolean;
|
|
535
531
|
ariaHidden: boolean;
|
|
532
|
+
blink: boolean;
|
|
536
533
|
dim: boolean;
|
|
537
534
|
dimColor: boolean;
|
|
538
535
|
italic: boolean;
|
|
539
536
|
underline: boolean;
|
|
540
537
|
strikethrough: boolean;
|
|
541
538
|
inverse: boolean;
|
|
542
|
-
blink: boolean;
|
|
543
539
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
544
540
|
//#endregion
|
|
545
541
|
//#region src/components/Newline.d.ts
|
|
@@ -711,9 +707,9 @@ declare const Code: import("@vue/runtime-core").DefineComponent<import("@vue/run
|
|
|
711
707
|
border: "none" | "single" | "double" | "rounded" | undefined;
|
|
712
708
|
fg: string;
|
|
713
709
|
lineNumbers: boolean;
|
|
714
|
-
lineNumberFg: string;
|
|
715
710
|
startLine: number;
|
|
716
711
|
highlightLines: number[];
|
|
712
|
+
lineNumberFg: string;
|
|
717
713
|
highlightBg: string;
|
|
718
714
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
719
715
|
//#endregion
|
|
@@ -878,8 +874,8 @@ declare const TextInput: import("@vue/runtime-core").DefineComponent<import("@vu
|
|
|
878
874
|
onCompositionupdate?: ((...args: any[]) => any) | undefined;
|
|
879
875
|
onCompositionend?: ((...args: any[]) => any) | undefined;
|
|
880
876
|
}>, {
|
|
881
|
-
modelValue: string;
|
|
882
877
|
placeholder: string;
|
|
878
|
+
modelValue: string;
|
|
883
879
|
focused: boolean;
|
|
884
880
|
focus: boolean;
|
|
885
881
|
mask: boolean;
|
|
@@ -1006,12 +1002,12 @@ declare const TextArea: import("@vue/runtime-core").DefineComponent<import("@vue
|
|
|
1006
1002
|
}>, {
|
|
1007
1003
|
border: "none" | "single" | "double" | "rounded" | undefined;
|
|
1008
1004
|
disabled: boolean;
|
|
1005
|
+
lineNumbers: boolean;
|
|
1006
|
+
lineNumberFg: string;
|
|
1009
1007
|
modelValue: string;
|
|
1010
|
-
focused: boolean;
|
|
1011
1008
|
rows: number;
|
|
1012
|
-
|
|
1009
|
+
focused: boolean;
|
|
1013
1010
|
placeholderFg: string;
|
|
1014
|
-
lineNumberFg: string;
|
|
1015
1011
|
cursorLine: number;
|
|
1016
1012
|
cursorColumn: number;
|
|
1017
1013
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1105,8 +1101,8 @@ declare const Select: import("@vue/runtime-core").DefineComponent<import("@vue/r
|
|
|
1105
1101
|
};
|
|
1106
1102
|
selectedBg: StringConstructor;
|
|
1107
1103
|
}>> & Readonly<{
|
|
1108
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
1109
1104
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
1105
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
1110
1106
|
}>, {
|
|
1111
1107
|
placeholder: string;
|
|
1112
1108
|
focused: boolean;
|
|
@@ -1284,8 +1280,8 @@ declare const RadioGroup: import("@vue/runtime-core").DefineComponent<import("@v
|
|
|
1284
1280
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1285
1281
|
}>, {
|
|
1286
1282
|
selected: string;
|
|
1287
|
-
selectedFg: string;
|
|
1288
1283
|
direction: "horizontal" | "vertical";
|
|
1284
|
+
selectedFg: string;
|
|
1289
1285
|
unselected: string;
|
|
1290
1286
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
1291
1287
|
//#endregion
|
|
@@ -1340,7 +1336,7 @@ declare const Confirm: import("@vue/runtime-core").DefineComponent<import("@vue/
|
|
|
1340
1336
|
};
|
|
1341
1337
|
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
1342
1338
|
[key: string]: any;
|
|
1343
|
-
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("
|
|
1339
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("cancel" | "select" | "confirm")[], "cancel" | "select" | "confirm", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
1344
1340
|
message: {
|
|
1345
1341
|
type: StringConstructor;
|
|
1346
1342
|
required: true;
|
|
@@ -1370,8 +1366,8 @@ declare const Confirm: import("@vue/runtime-core").DefineComponent<import("@vue/
|
|
|
1370
1366
|
default: string;
|
|
1371
1367
|
};
|
|
1372
1368
|
}>> & Readonly<{
|
|
1373
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
1374
1369
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
1370
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
1375
1371
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
1376
1372
|
}>, {
|
|
1377
1373
|
selectedFg: string;
|
|
@@ -1461,9 +1457,9 @@ declare const Form: import("@vue/runtime-core").DefineComponent<import("@vue/run
|
|
|
1461
1457
|
};
|
|
1462
1458
|
}>> & Readonly<{}>, {
|
|
1463
1459
|
gap: number;
|
|
1460
|
+
labelPosition: "top" | "left";
|
|
1464
1461
|
fields: FormField[];
|
|
1465
1462
|
labelWidth: number;
|
|
1466
|
-
labelPosition: "top" | "left";
|
|
1467
1463
|
requiredIndicator: string;
|
|
1468
1464
|
hintFg: string;
|
|
1469
1465
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1640,8 +1636,8 @@ declare const ProgressBar: import("@vue/runtime-core").DefineComponent<import("@
|
|
|
1640
1636
|
};
|
|
1641
1637
|
}>> & Readonly<{}>, {
|
|
1642
1638
|
width: number;
|
|
1643
|
-
labelPosition: "right" | "left" | "inside";
|
|
1644
1639
|
showLabel: boolean;
|
|
1640
|
+
labelPosition: "right" | "left" | "inside";
|
|
1645
1641
|
filledChar: string;
|
|
1646
1642
|
emptyChar: string;
|
|
1647
1643
|
leftBorder: string;
|
|
@@ -2016,8 +2012,8 @@ declare const List: import("@vue/runtime-core").DefineComponent<import("@vue/run
|
|
|
2016
2012
|
};
|
|
2017
2013
|
selectedBg: StringConstructor;
|
|
2018
2014
|
}>> & Readonly<{
|
|
2019
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
2020
2015
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
2016
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
2021
2017
|
}>, {
|
|
2022
2018
|
focused: boolean;
|
|
2023
2019
|
indicator: string;
|
|
@@ -2968,4 +2964,4 @@ declare const Avatar: import("@vue/runtime-core").DefineComponent<import("@vue/r
|
|
|
2968
2964
|
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
2969
2965
|
//#endregion
|
|
2970
2966
|
export { FormProps as $, TableColumn as A, HStack as At, TimerProps as B, Menu as C, NewlineProps as Ct, TreeNode as D, CardProps as Dt, Tree as E, Card as Et, Tooltip as F, DividerProps as Ft, AlertProps as G, BadgeProps as H, TooltipPosition as I, Spacer as It, ProgressBarProps as J, AlertType as K, TooltipProps as L, Box as Lt, List as M, StackProps as Mt, ListItem as N, VStack as Nt, TreeProps as O, Grid as Ot, ListProps as P, Divider as Pt, FormField as Q, Timer as R, BoxProps as Rt, TabsProps as S, Newline as St, MenuProps as T, TextProps as Tt, BadgeVariant as U, Badge as V, Alert as W, SpinnerProps as X, Spinner as Y, Form as Z, Breadcrumb as _, CodeProps as _t, KeyHintProps as a, Checkbox as at, Tab as b, Static as bt, StatusBar as c, SelectOption as ct, Modal as d, TextAreaProps as dt, Confirm as et, ModalProps as f, TextInput as ft, StepperProps as g, Code as gt, Stepper as h, LinkProps as ht, KeyHint as i, RadioOption as it, TableProps as j, Stack as jt, Table as k, GridProps as kt, StatusBarItem as l, SelectProps as lt, StepStatus as m, Link as mt, AvatarProps as n, RadioGroup as nt, Header as o, CheckboxProps as ot, Step as p, TextInputProps as pt, ProgressBar as q, KeyBinding as r, RadioGroupProps as rt, HeaderProps as s, Select as st, Avatar as t, ConfirmProps as tt, StatusBarProps as u, TextArea as ut, BreadcrumbItem as v, Transform as vt, MenuItem as w, Text as wt, Tabs as x, StaticProps as xt, BreadcrumbProps as y, TransformProps as yt, TimerMode as z };
|
|
2971
|
-
//# sourceMappingURL=index-
|
|
2967
|
+
//# sourceMappingURL=index-CLt0Muo_.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CLt0Muo_.d.mts","names":[],"sources":["../src/components/Box.ts","../src/components/Spacer.ts","../src/components/Divider.ts","../src/components/Stack.ts","../src/components/Grid.ts","../src/components/Card.ts","../src/components/Text.ts","../src/components/Newline.ts","../src/components/Static.ts","../src/components/Transform.ts","../src/components/Code.ts","../src/components/Link.ts","../src/components/TextInput.ts","../src/components/TextArea.ts","../src/components/Select.ts","../src/components/Checkbox.ts","../src/components/RadioGroup.ts","../src/components/Confirm.ts","../src/components/Form.ts","../src/components/Spinner.ts","../src/components/ProgressBar.ts","../src/components/Alert.ts","../src/components/Badge.ts","../src/components/Timer.ts","../src/components/Tooltip.ts","../src/components/List.ts","../src/components/Table.ts","../src/components/Tree.ts","../src/components/Menu.ts","../src/components/Tabs.ts","../src/components/Breadcrumb.ts","../src/components/Stepper.ts","../src/components/Modal.ts","../src/components/StatusBar.ts","../src/components/Header.ts","../src/components/KeyHint.ts","../src/components/Avatar.ts"],"mappings":";;;;KAeY,eAAA,GAAkB,iBAAiB;AAAA,UAE9B,QAAA,SAAiB,oBAAA;EAAjB;EAEf,QAAA;;EAEA,QAAA;EAQc;EANd,OAAA;EAyCe;EAvCf,OAAA;EARoD;EAUpD,MAAA,GAAS,eAAA;EAVuB;EAYhC,WAAA,GAAc,eAAA;EACd,SAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,WAAA;EACA,cAAA;EACA,gBAAA;EACA,iBAAA;EACA,eAAA;EACA,cAAA;EACA,iBAAA;EACA,mBAAA;EACA,oBAAA;EACA,kBAAA;EACA,qBAAA;EACA,wBAAA;EACA,0BAAA;EACA,2BAAA;EACA,yBAAA;EANA;EAQA,EAAA;EANA;EAQA,KAAA;EANA;EAQA,EAAA;EANA;EAQA,eAAA;EAJA;EAMA,YAAA;EAFA;EAIA,aAA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GpD,UAAA;ElCHgC;EkCKhC,YAAA;AAAA;AAAA,cAGW,MAAA,8BAAM,eAAA,6BAAA,gBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UCnBF,UAAA;EACf,IAAA;EACA,WAAW;AAAA;AAAA,UAGI,YAAA;EnCMA;EmCJf,QAAA,EAAU,UAAU;;EAEpB,SAAA;EnCcc;EmCZd,KAAA;EnC+Ce;EmC7Cf,KAAA;EnCFoD;EmCIpD,MAAA;EnCJgC;EmCMhC,SAAA;AAAA;AAAA,cAGW,OAAA,8BAAO,eAAA,6BAAA,gBAAA;;UAIC,QAAA,CAAS,UAAA;;;;UAIR,QAAA;;;;;;;;;;;;;;;;;;;;;;;UAJD,QAAA,CAAS,UAAA;;;;UAIR,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;UC5BL,WAAA;EpCSU;EoCPzB,IAAA;EpCO6C;EoCL7C,QAAA;EpCOe;EoCLf,IAAA;;EAEA,EAAA;EpCec;EoCbd,EAAA;EpCgDe;EoC9Cf,MAAA;EpCDoD;EoCGpD,MAAA;AAAA;AAAA,cAiBW,MAAA,8BAAM,eAAA,6BAAA,gBAAA;;;;UAMG,QAAA;;;;;;;;;;;;;;;;UAgBA,QAAA,CAAS,WAAA;EAAA;AAAA;;;;;;UAhBT,QAAA;;;;;;;;;;;;;;;;UAgBA,QAAA,CAAS,WAAA;EAAA;AAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { $ as FormProps, A as TableColumn, At as HStack, B as TimerProps, C as Menu, Ct as NewlineProps, D as TreeNode, Dt as CardProps, E as Tree, Et as Card, F as Tooltip, Ft as DividerProps, G as AlertProps, H as BadgeProps, I as TooltipPosition, It as Spacer, J as ProgressBarProps, K as AlertType, L as TooltipProps, Lt as Box, M as List, Mt as StackProps, N as ListItem, Nt as VStack, O as TreeProps, Ot as Grid, P as ListProps, Pt as Divider, Q as FormField, R as Timer, Rt as BoxProps, S as TabsProps, St as Newline, T as MenuProps, Tt as TextProps, U as BadgeVariant, V as Badge, W as Alert, X as SpinnerProps, Y as Spinner, Z as Form, _ as Breadcrumb, _t as CodeProps, a as KeyHintProps, at as Checkbox, b as Tab, bt as Static, c as StatusBar, ct as SelectOption, d as Modal, dt as TextAreaProps, et as Confirm, f as ModalProps, ft as TextInput, g as StepperProps, gt as Code, h as Stepper, ht as LinkProps, i as KeyHint, it as RadioOption, j as TableProps, jt as Stack, k as Table, kt as GridProps, l as StatusBarItem, lt as SelectProps, m as StepStatus, mt as Link, n as AvatarProps, nt as RadioGroup, o as Header, ot as CheckboxProps, p as Step, pt as TextInputProps, q as ProgressBar, r as KeyBinding, rt as RadioGroupProps, s as HeaderProps, st as Select, t as Avatar, tt as ConfirmProps, u as StatusBarProps, ut as TextArea, v as BreadcrumbItem, vt as Transform, w as MenuItem, wt as Text, x as Tabs, xt as StaticProps, y as BreadcrumbProps, yt as TransformProps, z as TimerMode } from "./index-
|
|
1
|
+
import { A as FrescoStyle, C as FrescoOverflow, D as FrescoRenderStyle, E as FrescoRenderNodeKind, F as KeyEventType, I as MouseEvent, L as PasteEvent, M as FrescoTextWrapMode, N as InputEvent, O as FrescoRootRenderNode, P as KeyEvent, R as ResizeEvent, S as FrescoModifiers, T as FrescoRenderNode, _ as FrescoFlexDirection, a as createRenderer, b as FrescoInputRenderNode, c as FrescoAlignContent, d as FrescoAppearance, f as FrescoBorderStyle, g as FrescoDisplay, h as FrescoDimension, j as FrescoTextRenderNode, k as FrescoSnakeStyleAliases, l as FrescoAlignItems, m as FrescoCanonicalStyle, o as CompositionEvent, p as FrescoBoxRenderNode, s as FocusEvent, u as FrescoAlignSelf, v as FrescoFlexWrap, w as FrescoPosition, x as FrescoJustifyContent, y as FrescoInputEvent } from "./accessibility-Ca6moS43.mjs";
|
|
2
|
+
import { $ as FormProps, A as TableColumn, At as HStack, B as TimerProps, C as Menu, Ct as NewlineProps, D as TreeNode, Dt as CardProps, E as Tree, Et as Card, F as Tooltip, Ft as DividerProps, G as AlertProps, H as BadgeProps, I as TooltipPosition, It as Spacer, J as ProgressBarProps, K as AlertType, L as TooltipProps, Lt as Box, M as List, Mt as StackProps, N as ListItem, Nt as VStack, O as TreeProps, Ot as Grid, P as ListProps, Pt as Divider, Q as FormField, R as Timer, Rt as BoxProps, S as TabsProps, St as Newline, T as MenuProps, Tt as TextProps, U as BadgeVariant, V as Badge, W as Alert, X as SpinnerProps, Y as Spinner, Z as Form, _ as Breadcrumb, _t as CodeProps, a as KeyHintProps, at as Checkbox, b as Tab, bt as Static, c as StatusBar, ct as SelectOption, d as Modal, dt as TextAreaProps, et as Confirm, f as ModalProps, ft as TextInput, g as StepperProps, gt as Code, h as Stepper, ht as LinkProps, i as KeyHint, it as RadioOption, j as TableProps, jt as Stack, k as Table, kt as GridProps, l as StatusBarItem, lt as SelectProps, m as StepStatus, mt as Link, n as AvatarProps, nt as RadioGroup, o as Header, ot as CheckboxProps, p as Step, pt as TextInputProps, q as ProgressBar, r as KeyBinding, rt as RadioGroupProps, s as HeaderProps, st as Select, t as Avatar, tt as ConfirmProps, u as StatusBarProps, ut as TextArea, v as BreadcrumbItem, vt as Transform, w as MenuItem, wt as Text, x as Tabs, xt as StaticProps, y as BreadcrumbProps, yt as TransformProps, z as TimerMode } from "./index-CLt0Muo_.mjs";
|
|
3
3
|
import { A as useInput, C as UsePasteOptions, D as KeyHandler, E as Key, O as UseInputOptions, S as useIme, T as InputHandler, _ as useStderr, a as DOMElement, b as ImeManager, c as UseAnimationOptions, d as useCursor, f as WindowSize, g as UseStdoutReturn, h as UseStdinReturn, i as useBoxMetrics, j as useKeyPress, k as UseInputReturn, l as useAnimation, m as UseStderrReturn, n as BoxMetrics, o as measureElement, p as useWindowSize, r as UseBoxMetricsResult, s as AnimationResult, t as useIsScreenReaderEnabled, u as CursorPosition, v as useStdin, w as usePaste, x as UseImeOptions, y as useStdout } from "./index-DqGcW9sz.mjs";
|
|
4
4
|
import { a as useFocus, i as UseFocusOptions, n as useApp, o as useFocusManager, r as FocusManager, t as UseAppReturn } from "./useApp-CNjer3hJ.mjs";
|
|
5
|
-
import { _ as KittyFlagName, a as RenderMetrics, b as kittyModifiers, c as createApp, d as lastKeyEvent, f as lastMouseEvent, g as renderToString, h as render, i as RenderInstance, l as lastCompositionEvent, m as lastResizeEvent, n as AppOptions, o as RenderOptions, p as lastPasteEvent, r as Instance, s as RenderToStringOptions, t as App, u as lastFocusEvent, v as KittyKeyboardOptions, x as resolveKittyFlags, y as kittyFlags } from "./app-
|
|
5
|
+
import { _ as KittyFlagName, a as RenderMetrics, b as kittyModifiers, c as createApp, d as lastKeyEvent, f as lastMouseEvent, g as renderToString, h as render, i as RenderInstance, l as lastCompositionEvent, m as lastResizeEvent, n as AppOptions, o as RenderOptions, p as lastPasteEvent, r as Instance, s as RenderToStringOptions, t as App, u as lastFocusEvent, v as KittyKeyboardOptions, x as resolveKittyFlags, y as kittyFlags } from "./app-DsHJno1z.mjs";
|
|
6
6
|
import { FlexStyleNapi, ImeStateNapi, InputEventNapi, LayoutResultNapi, ModifiersNapi, RenderNodeNapi, StyleNapi, TerminalInfoNapi, TerminalOptionsNapi } from "@vizejs/fresco-native";
|
|
7
7
|
export { Alert, type AlertProps, type AlertType, type AnimationResult, type App, type AppOptions, Avatar, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, Box, type BoxMetrics, type BoxProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Card, type CardProps, Checkbox, type CheckboxProps, Code, type CodeProps, type CompositionEvent, Confirm, type ConfirmProps, type CursorPosition, type DOMElement, Divider, type DividerProps, type FlexStyleNapi, type FocusEvent, type FocusManager, Form, type FormField, type FormProps, type FrescoAlignContent, type FrescoAlignItems, type FrescoAlignSelf, type FrescoAppearance, type FrescoBorderStyle, type FrescoBoxRenderNode, type FrescoCanonicalStyle, type FrescoDimension, type FrescoDisplay, type FrescoFlexDirection, type FrescoFlexWrap, type FrescoInputEvent, type FrescoInputRenderNode, type FrescoJustifyContent, type FrescoModifiers, type FrescoOverflow, type FrescoPosition, type FrescoRenderNode, type FrescoRenderNodeKind, type FrescoRenderStyle, type FrescoRootRenderNode, type FrescoSnakeStyleAliases, type FrescoStyle, type FrescoTextRenderNode, type FrescoTextWrapMode, Grid, type GridProps, HStack, Header, type HeaderProps, type ImeManager, type ImeStateNapi, type InputEvent, type InputEventNapi, type InputHandler, type Instance, type Key, type KeyBinding, type KeyEvent, type KeyEventType, type KeyHandler, KeyHint, type KeyHintProps, type KittyFlagName, type KittyKeyboardOptions, type LayoutResultNapi, Link, type LinkProps, List, type ListItem, type ListProps, Menu, type MenuItem, type MenuProps, Modal, type ModalProps, type ModifiersNapi, type MouseEvent, Newline, type NewlineProps, type PasteEvent, ProgressBar, type ProgressBarProps, RadioGroup, type RadioGroupProps, type RadioOption, type RenderInstance, type RenderMetrics, type RenderNodeNapi, type RenderOptions, type RenderToStringOptions, type ResizeEvent, Select, type SelectOption, type SelectProps, Spacer, Spinner, type SpinnerProps, Stack, type StackProps, Static, type StaticProps, StatusBar, type StatusBarItem, type StatusBarProps, type Step, type StepStatus, Stepper, type StepperProps, type StyleNapi, type Tab, Table, type TableColumn, type TableProps, Tabs, type TabsProps, type TerminalInfoNapi, type TerminalOptionsNapi, Text, TextArea, type TextAreaProps, TextInput, type TextInputProps, type TextProps, Timer, type TimerMode, type TimerProps, Tooltip, type TooltipPosition, type TooltipProps, Transform, type TransformProps, Tree, type TreeNode, type TreeProps, type UseAnimationOptions, type UseAppReturn, type UseBoxMetricsResult, type UseFocusOptions, type UseImeOptions, type UseInputOptions, type UseInputReturn, type UsePasteOptions, type UseStderrReturn, type UseStdinReturn, type UseStdoutReturn, VStack, type WindowSize, createApp, createRenderer, kittyFlags, kittyModifiers, lastCompositionEvent, lastFocusEvent, lastKeyEvent, lastMouseEvent, lastPasteEvent, lastResizeEvent, measureElement, render, renderToString, resolveKittyFlags, useAnimation, useApp, useBoxMetrics, useCursor, useFocus, useFocusManager, useIme, useInput, useIsScreenReaderEnabled, useKeyPress, usePaste, useStderr, useStdin, useStdout, useWindowSize };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as useIsScreenReaderEnabled, n as useKeyPress, r as usePaste, t as useInput } from "./useInput-
|
|
3
|
-
import { A as Newline, C as Select, D as Code, E as Link, F as Stack, I as VStack, L as Divider, M as Card, N as Grid, O as Transform, P as HStack, R as Spacer, S as Checkbox, T as TextInput, _ as ProgressBar, a as Modal, b as Confirm, c as Tabs, d as Table, f as List, g as Alert, h as Badge, i as StatusBar, j as Text, k as Static, l as Menu, m as Timer, n as KeyHint, o as Stepper, p as Tooltip, r as Header, s as Breadcrumb, t as Avatar, u as Tree, v as Spinner, w as TextArea, x as RadioGroup, y as Form, z as Box } from "./components-
|
|
4
|
-
import { i as useIme, n as useAnimation, r as useWindowSize, t as useBoxMetrics } from "./composables-
|
|
1
|
+
import { A as useApp, D as useFocusManager, E as useFocus, S as useStdout, _ as useCursor, a as lastMouseEvent, b as useStderr, c as render, i as lastKeyEvent, l as renderToString, n as lastCompositionEvent, o as lastPasteEvent, p as measureElement, r as lastFocusEvent, s as lastResizeEvent, t as createApp, u as createRenderer, x as useStdin } from "./app-BFoESJ4g.mjs";
|
|
2
|
+
import { i as useIsScreenReaderEnabled, n as useKeyPress, r as usePaste, t as useInput } from "./useInput-DLlmSFXF.mjs";
|
|
3
|
+
import { A as Newline, C as Select, D as Code, E as Link, F as Stack, I as VStack, L as Divider, M as Card, N as Grid, O as Transform, P as HStack, R as Spacer, S as Checkbox, T as TextInput, _ as ProgressBar, a as Modal, b as Confirm, c as Tabs, d as Table, f as List, g as Alert, h as Badge, i as StatusBar, j as Text, k as Static, l as Menu, m as Timer, n as KeyHint, o as Stepper, p as Tooltip, r as Header, s as Breadcrumb, t as Avatar, u as Tree, v as Spinner, w as TextArea, x as RadioGroup, y as Form, z as Box } from "./components-DlVmYitp.mjs";
|
|
4
|
+
import { i as useIme, n as useAnimation, r as useWindowSize, t as useBoxMetrics } from "./composables-B8W4GFdO.mjs";
|
|
5
5
|
//#region src/kittyKeyboard.ts
|
|
6
6
|
/**
|
|
7
7
|
* Kitty keyboard protocol constants compatible with Ink.
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as MouseEvent, P as KeyEvent, T as FrescoRenderNode, i as FrescoNode, n as AriaState, r as FrescoElement, t as AriaRole } from "../accessibility-Ca6moS43.mjs";
|
|
2
2
|
import { r as FocusManager, t as UseAppReturn } from "../useApp-CNjer3hJ.mjs";
|
|
3
3
|
import { App, Component, Ref, VNodeChild } from "@vue/runtime-core";
|
|
4
4
|
|
|
@@ -69,6 +69,22 @@ declare function firstChild(mounted: MountedFresco): FrescoNode;
|
|
|
69
69
|
/** Convenience wrapper that renders `component` with `h` and mounts it. */
|
|
70
70
|
declare function mountComponent(component: Component, props?: Record<string, unknown>, slot?: () => VNodeChild, options?: MountFrescoOptions): MountedFresco;
|
|
71
71
|
//#endregion
|
|
72
|
+
//#region src/testing/queries.d.ts
|
|
73
|
+
type FrescoTextMatcher = string | RegExp;
|
|
74
|
+
interface FrescoRoleQueryOptions {
|
|
75
|
+
readonly name?: FrescoTextMatcher;
|
|
76
|
+
readonly description?: FrescoTextMatcher;
|
|
77
|
+
readonly state?: AriaState;
|
|
78
|
+
}
|
|
79
|
+
declare function queryAllByRole(root: FrescoNode, role: AriaRole, options?: FrescoRoleQueryOptions): FrescoNode[];
|
|
80
|
+
declare function getByRole(root: FrescoNode, role: AriaRole, options?: FrescoRoleQueryOptions): FrescoNode;
|
|
81
|
+
declare function queryAllByText(root: FrescoNode, text: FrescoTextMatcher): FrescoNode[];
|
|
82
|
+
declare function getByText(root: FrescoNode, text: FrescoTextMatcher): FrescoNode;
|
|
83
|
+
declare function queryAllByDescription(root: FrescoNode, description: FrescoTextMatcher): FrescoNode[];
|
|
84
|
+
declare function getByDescription(root: FrescoNode, description: FrescoTextMatcher): FrescoNode;
|
|
85
|
+
declare function queryAllByTestId(root: FrescoNode, testId: string): FrescoNode[];
|
|
86
|
+
declare function getByTestId(root: FrescoNode, testId: string): FrescoNode;
|
|
87
|
+
//#endregion
|
|
72
88
|
//#region src/testing/index.d.ts
|
|
73
89
|
type RenderTuiOptions = MountFrescoOptions;
|
|
74
90
|
type RenderTuiRoot = Component | (() => VNodeChild);
|
|
@@ -80,6 +96,8 @@ interface FrescoFrameSnapshot {
|
|
|
80
96
|
output: string;
|
|
81
97
|
/** Serializable renderer tree for structural assertions. */
|
|
82
98
|
tree: FrescoNodeSnapshot;
|
|
99
|
+
/** Stable native protocol payload for assertions before crossing into Rust. */
|
|
100
|
+
protocolNodes: readonly FrescoRenderNode[];
|
|
83
101
|
}
|
|
84
102
|
/** Input driver that injects events through Fresco's public event refs. */
|
|
85
103
|
interface FrescoInputDriver {
|
|
@@ -120,5 +138,5 @@ interface RenderTuiResult extends MountedFresco {
|
|
|
120
138
|
/** Mount a Fresco app for tests with frame snapshots and input injection. */
|
|
121
139
|
declare function renderTui(root: RenderTuiRoot, options?: RenderTuiOptions): RenderTuiResult;
|
|
122
140
|
//#endregion
|
|
123
|
-
export { FrescoFrameSnapshot, FrescoInputDriver, type FrescoNodeSnapshot, KeyInput, type MountFrescoOptions, type MountedFresco, MouseInput, RenderTuiOptions, RenderTuiResult, RenderTuiRoot, dispatchKey, findNodes, firstChild, mountComponent, mountFresco, renderTui, toTreeSnapshot, typeChars };
|
|
141
|
+
export { FrescoFrameSnapshot, FrescoInputDriver, type FrescoNodeSnapshot, type FrescoRenderNode, type FrescoRoleQueryOptions, type FrescoTextMatcher, KeyInput, type MountFrescoOptions, type MountedFresco, MouseInput, RenderTuiOptions, RenderTuiResult, RenderTuiRoot, dispatchKey, findNodes, firstChild, getByDescription, getByRole, getByTestId, getByText, mountComponent, mountFresco, queryAllByDescription, queryAllByRole, queryAllByTestId, queryAllByText, renderTui, toTreeSnapshot, typeChars };
|
|
124
142
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/testing/mount.ts","../../src/testing/index.ts"],"mappings":";;;;;;UA+BiB,kBAAA;EAcH;EAZZ,KAAA;EAcY;EAZZ,MAAA;EAgBqB;EAdrB,YAAA;AAAA;;UAIe,aAAA;EAIf;EAFA,IAAA,EAAM,aAAA;EAEM;EAAZ,GAAA,EAAK,GAAA,CAAO,aAAA;EAEA;EAAZ,UAAA,EAAY,YAAA;EAEE;EAAd,YAAA,EAAc,YAAA;EAEO;EAArB,mBAAA,EAAqB,GAAA;EAEd;EAAP,OAAA;AAAA;;;;;;;iBASc,WAAA,CACd,IAAA,EAAM,SAAA,UAAmB,UAAA,GACzB,OAAA,GAAS,kBAAA,GACR,aAAA;;;;;;;;iBA2Da,WAAA,CAAY,KAAA,EAAO,OAAA,CAAQ,IAAA,CAAK,QAAA,aAAqB,OAAA;AA3DrD;AAAA,iBA4EM,SAAA,CAAU,IAAA,WAAe,OAAO;;;;;;;;UAarC,kBAAA;EACf,IAAA,EAAM,UAAA;EACN,IAAA;EACA,KAAA,GAAQ,MAAA;EACR,QAAA,GAAW,kBAAA;AAAA;;AAlC+D;AAiB5E;;iBA8BgB,cAAA,CAAe,IAAA,EAAM,UAAA,GAAa,kBAAkB;;iBAYpD,SAAA,CACd,IAAA,EAAM,UAAA,EACN,SAAA,GAAY,SAAA,EAAW,UAAA,eACtB,UAAA;AAhCH;AAAA,iBA2CgB,UAAA,CAAW,OAAA,EAAS,aAAA,GAAgB,UAAU;;iBAO9C,cAAA,CACd,SAAA,EAAW,SAAA,EACX,KAAA,GAAO,MAAA,mBACP,IAAA,SAAa,UAAA,EACb,OAAA,GAAS,kBAAA,GACR,aAAA;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/testing/mount.ts","../../src/testing/queries.ts","../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B;EEmCP,KAAA,CAAM,OAAA,YAAmB,OAAA,CAAQ,mBAAA;EF1BR;EE4BzB,gBAAA,CAAiB,IAAA,WAAe,MAAA,YAAkB,OAAA,CAAQ,mBAAA;EF3BpD;EE6BN,iBAAA,CAAkB,IAAA,UAAc,MAAA,WAAiB,OAAA,CAAQ,mBAAA;EF5BhD;EE8BT,cAAA,CAAe,IAAA,UAAc,MAAA,YAAkB,OAAA,CAAQ,mBAAA;AAAA;;UAIxC,eAAA,SAAwB,aAAA;EFnCd;EAAA,SEqChB,MAAA;EFpCA;EAAA,SEsCA,cAAA,WAAyB,mBAAA;EFrCjC;EAAA,SEuCQ,KAAA,EAAO,iBAAA;EFvCF;EEyCd,YAAA,IAAgB,mBAAA;EFkBS;EEhBzB,SAAA;EFgB8C;EEd9C,aAAA,IAAiB,mBAAA;AAAA;;iBAuIH,SAAA,CAAU,IAAA,EAAM,aAAA,EAAe,OAAA,GAAS,gBAAA,GAAwB,eAAA"}
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as APP_KEY, T as createFocusManager, a as lastMouseEvent, d as treeToRenderNodes, g as createCursorContext, h as CURSOR_KEY, i as lastKeyEvent, j as SCREEN_READER_KEY, k as createAppContext, n as lastCompositionEvent, o as lastPasteEvent, r as lastFocusEvent, s as lastResizeEvent, u as createRenderer$1, v as STREAMS_KEY, w as FOCUS_KEY, y as createStreamsContext } from "../app-BFoESJ4g.mjs";
|
|
2
2
|
import { h, nextTick, ref } from "@vue/runtime-core";
|
|
3
3
|
//#region src/testing/mount.ts
|
|
4
4
|
/**
|
|
@@ -127,6 +127,99 @@ function mountComponent(component, props = {}, slot, options = {}) {
|
|
|
127
127
|
return mountFresco(() => h(component, props, slot), options);
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
|
+
//#region src/testing/queries.ts
|
|
131
|
+
function stringValue(value) {
|
|
132
|
+
if (typeof value === "string" || typeof value === "number") return String(value);
|
|
133
|
+
}
|
|
134
|
+
function ownText(node) {
|
|
135
|
+
if (node.text !== void 0) return node.text;
|
|
136
|
+
const propText = node.props.text ?? node.props.content;
|
|
137
|
+
if (typeof propText === "string" || typeof propText === "number") return String(propText);
|
|
138
|
+
if (node.type === "input") {
|
|
139
|
+
const value = node.props.value;
|
|
140
|
+
const placeholder = node.props.placeholder;
|
|
141
|
+
if (typeof value === "string" || typeof value === "number") return String(value);
|
|
142
|
+
if (typeof placeholder === "string" || typeof placeholder === "number") return String(placeholder);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function accessibleName(node) {
|
|
146
|
+
const ariaLabel = stringValue(node.props["aria-label"]);
|
|
147
|
+
if (ariaLabel !== void 0) return ariaLabel;
|
|
148
|
+
const text = ownText(node);
|
|
149
|
+
if (text !== void 0) return text;
|
|
150
|
+
return node.children.map((child) => accessibleName(child)).filter(Boolean).join(" ");
|
|
151
|
+
}
|
|
152
|
+
function accessibleDescription(node) {
|
|
153
|
+
return stringValue(node.props["aria-description"] ?? node.props.ariaDescription ?? node.props.description);
|
|
154
|
+
}
|
|
155
|
+
function matchesText(text, matcher) {
|
|
156
|
+
if (typeof matcher === "string") return text === matcher;
|
|
157
|
+
matcher.lastIndex = 0;
|
|
158
|
+
return matcher.test(text);
|
|
159
|
+
}
|
|
160
|
+
function roleOf(node) {
|
|
161
|
+
return stringValue(node.props["aria-role"]);
|
|
162
|
+
}
|
|
163
|
+
function testIdOf(node) {
|
|
164
|
+
return stringValue(node.props["test-id"] ?? node.props["data-testid"]);
|
|
165
|
+
}
|
|
166
|
+
function stateOf(node) {
|
|
167
|
+
const state = node.props["aria-state"];
|
|
168
|
+
return state && typeof state === "object" ? state : {};
|
|
169
|
+
}
|
|
170
|
+
function matchesState(node, expected) {
|
|
171
|
+
if (expected === void 0) return true;
|
|
172
|
+
const actual = stateOf(node);
|
|
173
|
+
return Object.entries(expected).every(([key, value]) => actual[key] === value);
|
|
174
|
+
}
|
|
175
|
+
function describeRole(role, options) {
|
|
176
|
+
const parts = [`role ${JSON.stringify(role)}`];
|
|
177
|
+
if (options.name !== void 0) parts.push(`name ${String(options.name)}`);
|
|
178
|
+
if (options.description !== void 0) parts.push(`description ${String(options.description)}`);
|
|
179
|
+
if (options.state !== void 0) parts.push(`state ${JSON.stringify(options.state)}`);
|
|
180
|
+
return parts.join(", ");
|
|
181
|
+
}
|
|
182
|
+
function uniqueNode(nodes, description) {
|
|
183
|
+
if (nodes.length === 0) throw new Error(`Unable to find Fresco node with ${description}`);
|
|
184
|
+
if (nodes.length > 1) throw new Error(`Found ${nodes.length} Fresco nodes with ${description}`);
|
|
185
|
+
return nodes[0];
|
|
186
|
+
}
|
|
187
|
+
function queryAllByRole(root, role, options = {}) {
|
|
188
|
+
return findNodes(root, (node) => {
|
|
189
|
+
if (roleOf(node) !== role) return false;
|
|
190
|
+
if (options.name !== void 0 && !matchesText(accessibleName(node), options.name)) return false;
|
|
191
|
+
if (options.description !== void 0 && !matchesText(accessibleDescription(node) ?? "", options.description)) return false;
|
|
192
|
+
return matchesState(node, options.state);
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function getByRole(root, role, options = {}) {
|
|
196
|
+
return uniqueNode(queryAllByRole(root, role, options), describeRole(role, options));
|
|
197
|
+
}
|
|
198
|
+
function queryAllByText(root, text) {
|
|
199
|
+
return findNodes(root, (node) => {
|
|
200
|
+
const value = ownText(node);
|
|
201
|
+
return value !== void 0 && matchesText(value, text);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function getByText(root, text) {
|
|
205
|
+
return uniqueNode(queryAllByText(root, text), `text ${String(text)}`);
|
|
206
|
+
}
|
|
207
|
+
function queryAllByDescription(root, description) {
|
|
208
|
+
return findNodes(root, (node) => {
|
|
209
|
+
const value = accessibleDescription(node);
|
|
210
|
+
return value !== void 0 && matchesText(value, description);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
function getByDescription(root, description) {
|
|
214
|
+
return uniqueNode(queryAllByDescription(root, description), `description ${String(description)}`);
|
|
215
|
+
}
|
|
216
|
+
function queryAllByTestId(root, testId) {
|
|
217
|
+
return findNodes(root, (node) => testIdOf(node) === testId);
|
|
218
|
+
}
|
|
219
|
+
function getByTestId(root, testId) {
|
|
220
|
+
return uniqueNode(queryAllByTestId(root, testId), `test id ${JSON.stringify(testId)}`);
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
130
223
|
//#region src/testing/index.ts
|
|
131
224
|
/**
|
|
132
225
|
* Test utilities for Fresco component and app behavior.
|
|
@@ -191,6 +284,22 @@ function latestSnapshot(snapshots) {
|
|
|
191
284
|
if (!snapshot) throw new Error("expected renderTui to record an initial frame");
|
|
192
285
|
return snapshot;
|
|
193
286
|
}
|
|
287
|
+
function protocolSnapshot(root) {
|
|
288
|
+
const nodes = treeToRenderNodes(root);
|
|
289
|
+
const ids = new Map(nodes.map((node, index) => [node.id, index - 1]));
|
|
290
|
+
return nodes.map((node) => {
|
|
291
|
+
const id = ids.get(node.id) ?? node.id;
|
|
292
|
+
const children = node.children?.map((child) => ids.get(child) ?? child);
|
|
293
|
+
return children === void 0 ? {
|
|
294
|
+
...node,
|
|
295
|
+
id
|
|
296
|
+
} : {
|
|
297
|
+
...node,
|
|
298
|
+
id,
|
|
299
|
+
children
|
|
300
|
+
};
|
|
301
|
+
});
|
|
302
|
+
}
|
|
194
303
|
async function dispatchPaste(text) {
|
|
195
304
|
lastPasteEvent.value = {
|
|
196
305
|
type: "paste",
|
|
@@ -241,7 +350,8 @@ function renderTui(root, options = {}) {
|
|
|
241
350
|
staticOutput = appendOutput(staticOutput, captureStaticOutput(mounted.root, renderedStaticItems));
|
|
242
351
|
const snapshot = {
|
|
243
352
|
output: renderFrame(mounted.root, staticOutput),
|
|
244
|
-
tree: toTreeSnapshot(mounted.root)
|
|
353
|
+
tree: toTreeSnapshot(mounted.root),
|
|
354
|
+
protocolNodes: protocolSnapshot(mounted.root)
|
|
245
355
|
};
|
|
246
356
|
frames.push(snapshot.output);
|
|
247
357
|
frameSnapshots.push(snapshot);
|
|
@@ -277,6 +387,6 @@ function renderTui(root, options = {}) {
|
|
|
277
387
|
};
|
|
278
388
|
}
|
|
279
389
|
//#endregion
|
|
280
|
-
export { dispatchKey, findNodes, firstChild, mountComponent, mountFresco, renderTui, toTreeSnapshot, typeChars };
|
|
390
|
+
export { dispatchKey, findNodes, firstChild, getByDescription, getByRole, getByTestId, getByText, mountComponent, mountFresco, queryAllByDescription, queryAllByRole, queryAllByTestId, queryAllByText, renderTui, toTreeSnapshot, typeChars };
|
|
281
391
|
|
|
282
392
|
//# sourceMappingURL=index.mjs.map
|