Yay! I got a dragging utility thing working properly and without any funky enum state machine hacks (like the last time I attempted it)
Separated into two different solutions:
Super-generic staged updater cycle thing: https://github.com/DriftJS/drift-utils/blob/master/src/lib/sodium/generic/Sodium-StagedUpdate.ts
Specific instantiation of that staged updater, which handles dragging in the toolset I’m developing: https://github.com/DriftJS/drift-utils/blob/master/src/lib/sodium/drag/Sodium-Drag.ts
I don’t have a public demo I can show with it yet, but I hope to do that sometime within the next week... on one foot, it's basically used like:
const cTransform = createDrag (isThisItem) (S.Just(transform))
where createDrag
is a function that was setup with sodiumDragCreator
(in link #2 above) and cTransform
would potentially be looped
to compose it with the item's inherent transform