refactor(web): extract document drag listeners
This commit is contained in:
@@ -236,6 +236,17 @@ export const rules = [
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineDocumentDrag.ts",
|
||||
maxLines: 50,
|
||||
required: [
|
||||
{
|
||||
pattern: /\bexport function attachDocumentMouseDrag\b/,
|
||||
message: "timeline document drag helpers must keep document mouse listener wiring centralized",
|
||||
},
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineAllocationDragState.ts",
|
||||
maxLines: 80,
|
||||
@@ -293,6 +304,10 @@ export const rules = [
|
||||
pattern: /from "\.\/timelineAllocationActions\.js"/,
|
||||
message: "timeline drag must keep allocation click and mutation plan derivation delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineDocumentDrag\.js"/,
|
||||
message: "timeline drag must keep document mouse listener lifecycle delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineAllocationMultiDrag\.js"/,
|
||||
message: "timeline drag must keep allocation multi-drag rules delegated to the extracted helper module",
|
||||
@@ -323,6 +338,10 @@ export const rules = [
|
||||
pattern: /\bfunction (?:buildAllocationBlockClickInfo|buildAllocationMutationPlan)\b/,
|
||||
message: "timeline drag must not re-inline extracted allocation action helper implementations",
|
||||
},
|
||||
{
|
||||
pattern: /\bfunction attachDocumentMouseDrag\b/,
|
||||
message: "timeline drag must not re-inline extracted document listener helper implementations",
|
||||
},
|
||||
{
|
||||
pattern: /\bfunction (?:isAllocationMultiSelected|startAllocationMultiDrag|updateAllocationMultiDrag|finalizeAllocationMultiDrag)\b/,
|
||||
message: "timeline drag must not re-inline extracted allocation multi-drag helper implementations",
|
||||
|
||||
Reference in New Issue
Block a user