Files
Native-Router-Vue/package.json
Claude caf2ad692a Restore native scrolling and reliable recognition; add feel tests
The previous round regressed the demo against main: dropped frames while
a finger drags, and swipes ignored when they start imperfectly.

Frame drops: hosts used touch-action: manipulation plus a blocking
touchmove listener, so Chrome waited for JavaScript on every touch move
(~30% of frames over 20ms in a drag, p95 28ms). Hosts again use per-axis
touch-action like main (pan-y for horizontal gestures, and so on), and
attach no touch listener.

Flaky recognition: an irreversible decision after 6px dropped swipes
with a wobbly or backward start. Recognition again measures from the
pointer-down point until the pointer lifts, as on main.

Scrolling beside gestures, natively:
- .from.scrollEdge() uses direction-specific touch-action while its
  scroller is at the edge (pan-x pan-down for drag-down at the top), the
  pull-to-refresh pattern from the Pointer Events spec. A passive scroll
  listener keeps it current; no touch handling blocks the browser.
- Where directional values are unsupported (Safari), scroll-edge
  gestures alone fall back to claiming touches at the browser's first
  cancelable touchmove.
- Hosts publish touch-action as --nvo-touch-action and the stylesheet
  applies it to descendants, so nested scroll containers keep it and
  horizontal swipes over lists are not cancelled. Ignored subtrees get
  touch-action: auto back.
- Bindings gain listeners and ref (spread on the host); the components
  use them.

Feel tests (npm run test:feel): Chromium with emulated touch checks
recognition on ten human-like traces, frame pacing budgets while
dragging (p95 <= 20ms, <= 5% over 20ms) for a swipe and a scroll-edge
dismiss, and the behaviour checks. Against the previous code they fail
on exactly the reported regressions; now 23/23 pass. On the demo, all
traces match main and drag frame pacing matches or beats it.

Commit thresholds are unchanged (0.25 distance, 0.2 flick).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Faarh2Ts6StJPcz2mRiHiR
2026-11-03 05:56:26 +00:00

88 lines
3.2 KiB
JSON

{
"name": "@native-vue-router/core-v2",
"private": true,
"version": "0.1.0-experimental.0",
"description": "Routeless, component-owned scene transitions and gesture recognition for Vue 3.",
"type": "module",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://git.harvmaster.com/Harvmaster/Native-Router-Vue.git"
},
"files": [
"packages/core-v2/dist",
"packages/core-v2/API.md",
"packages/core-v2/README.md",
"skills/build-with-native-vue-router-v2"
],
"main": "./packages/core-v2/dist/index.js",
"types": "./packages/core-v2/dist/index.d.ts",
"exports": {
".": {
"types": "./packages/core-v2/dist/index.d.ts",
"import": "./packages/core-v2/dist/index.js"
},
"./style.css": "./packages/core-v2/dist/style.css",
"./package.json": "./package.json"
},
"sideEffects": [
"./packages/core-v2/dist/style.css"
],
"peerDependencies": {
"vue": "^3.5.0"
},
"workspaces": [
"packages/*",
"apps/*"
],
"scripts": {
"dev": "vite --host",
"build": "npm run build:packages && vue-tsc -b && vite build",
"build:packages": "npm run build --workspace @native-vue-router/core --workspace @native-vue-router/core-v2 --workspace @native-vue-router/preset-native --workspace @native-vue-router/capacitor --workspace @native-vue-router/electron --if-present",
"build:v2-demo": "npm run build --workspace @native-vue-router/origins-demo",
"dev:v2": "npm run dev --workspace @native-vue-router/origins-demo",
"serve:v2": "npm run build:v2-demo && npm run preview --workspace @native-vue-router/origins-demo",
"test": "vitest run",
"test:watch": "vitest",
"test:e2e": "playwright test",
"preview": "vite preview",
"electron": "npm run build && electron apps/electron/main.mjs",
"cap:sync": "npm run build && npm --prefix apps/capacitor exec cap sync",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
"prepare": "npm run build --workspace packages/core-v2",
"test:feel": "NODE_ENV=development vite build --mode development --config packages/core-v2/verify/browser/app/vite.config.mjs && node packages/core-v2/verify/browser/run.mjs"
},
"devDependencies": {
"@capacitor/app": "^8.0.0",
"@capacitor/android": "^8.0.0",
"@capacitor/cli": "^8.0.0",
"@capacitor/core": "^8.0.0",
"@capacitor/haptics": "^8.0.0",
"@capacitor/ios": "^8.0.0",
"@capacitor/splash-screen": "^8.0.0",
"@capacitor/status-bar": "^8.0.0",
"@lucide/vue": "^1.24.0",
"@native-vue-router/capacitor": "0.1.0",
"@native-vue-router/core": "0.1.0",
"@native-vue-router/electron": "0.1.0",
"@native-vue-router/preset-native": "0.1.0",
"@playwright/test": "^1.55.0",
"@tailwindcss/vite": "^4.3.2",
"@types/node": "^24.13.3",
"@vitejs/plugin-vue": "^6.0.7",
"@vue/tsconfig": "^0.9.1",
"electron": "^43.1.1",
"happy-dom": "^20.10.6",
"prettier": "^3.9.6",
"tailwindcss": "^4.3.2",
"tw-animate-css": "^1.4.0",
"typescript": "~6.0.2",
"vite": "^8.1.1",
"vite-plugin-pwa": "^1.1.0",
"vitest": "^3.2.4",
"vue": "^3.5.39",
"vue-router": "^5.0.6",
"vue-tsc": "^3.3.5"
}
}