Skip to content

fuxt - update our toolset #157

Open
lux-v wants to merge 10 commits into
masterfrom
update-tools
Open

fuxt - update our toolset #157
lux-v wants to merge 10 commits into
masterfrom
update-tools

Conversation

@lux-v
Copy link
Copy Markdown
Contributor

@lux-v lux-v commented May 15, 2026

Directives

v-intersection-observer

v-in-view


Components

cursor-follow

Custom cursor that follows the mouse and shows contextual content (text or image) when hovering elements with data-cursor-text or data-cursor-image attributes. GSAP-powered smooth movement via quickTo. Preloads images, uses MutationObserver to detect new triggers added to the DOM.

split-text

Wrapper around GSAP SplitText. Splits text into chars, words, or lines and wraps each in its own element with a custom class. Adds CSS custom properties (--word, --line, --char) for CSS-driven stagger animations. autoSplit: true re-splits on resize. No built-in animation — pair with v-intersection-observer and CSS transitions.


Composables

useCursorFollow

Reactive state store for the cursor-follow component. Exposes show(text, image) and hide() methods used by the cursor trigger system.

useDragScrollMomentum

Drag-to-scroll with momentum physics for horizontal containers. Handles both mouse and touch, calculates velocity on release, applies friction easing until the element settles. We use this one with out components.

useSplitText

Core logic behind the split-text component. Creates and manages a GSAP SplitText instance on a template ref. Handles autoSplit re-splits and cleanup on unmount.


Utils

initSwipeEvents

Touch and mouse swipe detection. Dispatches swipe-left, swipe-right, swipe-up, swipe-down custom events on an element. We use this one with out components.

smoothScrollToElement

Custom eased scroll-to-element (easeInOutCubic). Respects scroll-margin-top, clamps to page bounds, respects prefers-reduced-motion, and scales duration by distance (520–1400ms).


Store updates

isScrollLockeduseSiteStore

New boolean flag in the site store. When true, overflow: hidden is applied to <body> via app.vue — used for locking scroll when a menu or modal is open.


Type updates

  • wp-image.d.ts — added focalPoint field
  • wp-menu.d.ts — minor update to menu item type

wp-image

  • Added focal point support — uses focalPoint from the API response to set object-position on the <img> tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant