refactor(web): extract touch event forwarding
This commit is contained in:
@@ -149,6 +149,33 @@ export const rules = [
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineTouchEvents.ts",
|
||||
maxLines: 80,
|
||||
required: [
|
||||
{
|
||||
pattern: /\bexport function forwardTouchStartAsMouseDown\b/,
|
||||
message: "timeline touch event helpers must keep touch-start forwarding centralized",
|
||||
},
|
||||
{
|
||||
pattern: /\bexport function forwardCanvasTouchMove\b/,
|
||||
message: "timeline touch event helpers must keep touch-move forwarding centralized",
|
||||
},
|
||||
{
|
||||
pattern: /\bexport function forwardCanvasTouchEnd\b/,
|
||||
message: "timeline touch event helpers must keep touch-end forwarding centralized",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineTouch\.js"/,
|
||||
message: "timeline touch event helpers must keep touch policy delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineTouchAdapters\.js"/,
|
||||
message: "timeline touch event helpers must keep touch adapter wiring delegated to the extracted helper module",
|
||||
},
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineMultiSelect.ts",
|
||||
maxLines: 90,
|
||||
@@ -404,12 +431,8 @@ export const rules = [
|
||||
message: "timeline drag must keep live preview behavior delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineTouch\.js"/,
|
||||
message: "timeline drag must keep touch fallback and drag disambiguation delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineTouchAdapters\.js"/,
|
||||
message: "timeline drag must keep touch pointer adapter wiring delegated to the extracted helper module",
|
||||
pattern: /from "\.\/timelineTouchEvents\.js"/,
|
||||
message: "timeline drag must keep touch event forwarding delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineMultiSelect\.js"/,
|
||||
@@ -474,12 +497,8 @@ export const rules = [
|
||||
message: "timeline drag must not re-inline live preview helper implementations",
|
||||
},
|
||||
{
|
||||
pattern: /\bfunction toClientX\b/,
|
||||
message: "timeline drag must not re-inline touch coordinate fallback helpers",
|
||||
},
|
||||
{
|
||||
pattern: /as (?:unknown as )?React\.MouseEvent/,
|
||||
message: "timeline drag must not re-inline synthetic touch pointer adapters",
|
||||
pattern: /\b(?:getTouchPoint|resolveTouchDragDecision|createTouchCanvasPointerEvent|createTouchMouseDownEvent)\b/,
|
||||
message: "timeline drag must not re-inline extracted touch event forwarding dependencies",
|
||||
},
|
||||
{
|
||||
pattern: /\bfunction (?:hasAllocationDateChange|shouldTreatAllocationDragAsClick|requiresAllocationFragmentExtraction|buildAllocationMovedSnapshot|reconcileOptimisticEntries)\b/,
|
||||
|
||||
Reference in New Issue
Block a user