diff --git a/app/(pages)/r3f/(components)/box/index.jsx b/app/(pages)/r3f/(components)/box/index.jsx index 5651392a..b2363daf 100644 --- a/app/(pages)/r3f/(components)/box/index.jsx +++ b/app/(pages)/r3f/(components)/box/index.jsx @@ -1,6 +1,6 @@ 'use client' -import { useRect } from '@darkroom.engineering/hamo' +import { useRect } from 'hamo' import dynamic from 'next/dynamic' import { WebGLTunnel } from '~/libs/webgl/components/tunnel' diff --git a/components/accordion/index.tsx b/components/accordion/index.tsx index 585e1c8f..dfe506f1 100644 --- a/components/accordion/index.tsx +++ b/components/accordion/index.tsx @@ -1,7 +1,7 @@ 'use client' -import { useResizeObserver } from '@darkroom.engineering/hamo' import cn from 'clsx' +import { useResizeObserver } from 'hamo' import { type Dispatch, type HTMLAttributes, diff --git a/components/animated-gradient/index.tsx b/components/animated-gradient/index.tsx index 488ad756..0d76c5f5 100644 --- a/components/animated-gradient/index.tsx +++ b/components/animated-gradient/index.tsx @@ -1,6 +1,6 @@ 'use client' -import { useRect } from '@darkroom.engineering/hamo' +import { useRect } from 'hamo' import dynamic from 'next/dynamic' import type { CSSProperties, ComponentProps } from 'react' import { WebGLTunnel } from '~/libs/webgl/components/tunnel' diff --git a/components/animated-gradient/webgl.tsx b/components/animated-gradient/webgl.tsx index 4a4359f3..cd7408ad 100644 --- a/components/animated-gradient/webgl.tsx +++ b/components/animated-gradient/webgl.tsx @@ -1,9 +1,5 @@ -import { - type ExtendedDOMRect, - useObjectFit, - useWindowSize, -} from '@darkroom.engineering/hamo' import { useFrame, useThree } from '@react-three/fiber' +import { type ExtendedDOMRect, useObjectFit, useWindowSize } from 'hamo' import { useEffect, useMemo, useRef, useState } from 'react' import { CanvasTexture, LinearFilter, type Mesh } from 'three' import { useFlowmap } from '~/libs/webgl/components/flowmap' diff --git a/components/fold/index.tsx b/components/fold/index.tsx index 752faa03..bd4b264b 100644 --- a/components/fold/index.tsx +++ b/components/fold/index.tsx @@ -1,7 +1,7 @@ 'use client' -import { useRect, useWindowSize } from '@darkroom.engineering/hamo' import cn from 'clsx' +import { useRect, useWindowSize } from 'hamo' import { type HTMLAttributes, type ReactNode, diff --git a/components/marquee/index.tsx b/components/marquee/index.tsx index 6997ca8a..1adf5a63 100644 --- a/components/marquee/index.tsx +++ b/components/marquee/index.tsx @@ -1,10 +1,7 @@ 'use client' -import { - useIntersectionObserver, - useResizeObserver, -} from '@darkroom.engineering/hamo' import cn from 'clsx' +import { useIntersectionObserver, useResizeObserver } from 'hamo' import { useLenis } from 'lenis/react' import { type HTMLAttributes, useRef } from 'react' import { useTempus } from 'tempus/react' diff --git a/components/progress-text/index.tsx b/components/progress-text/index.tsx index cc264d1f..2aef70bd 100644 --- a/components/progress-text/index.tsx +++ b/components/progress-text/index.tsx @@ -1,7 +1,7 @@ 'use client' -import { useRect } from '@darkroom.engineering/hamo' import cn from 'clsx' +import { useRect } from 'hamo' import { type CSSProperties, Fragment, type ReactNode, useRef } from 'react' import { type UseScrollTriggerOptions, diff --git a/components/scrollbar/index.tsx b/components/scrollbar/index.tsx index 5d4c30bf..0c678553 100644 --- a/components/scrollbar/index.tsx +++ b/components/scrollbar/index.tsx @@ -1,6 +1,6 @@ 'use client' -import { useRect } from '@darkroom.engineering/hamo' +import { useRect } from 'hamo' import { useLenis } from 'lenis/react' import { useEffect, useRef } from 'react' import { mapRange } from '~/libs/maths' diff --git a/components/split-text/index.tsx b/components/split-text/index.tsx index be37fd1e..51013ada 100644 --- a/components/split-text/index.tsx +++ b/components/split-text/index.tsx @@ -1,9 +1,9 @@ 'use client' -import { useResizeObserver } from '@darkroom.engineering/hamo' import cn from 'clsx' import { gsap } from 'gsap' import { SplitText as GSAPSplitText } from 'gsap/SplitText' +import { useResizeObserver } from 'hamo' import { type Ref, useEffect, diff --git a/hooks/use-device-detection.ts b/hooks/use-device-detection.ts index c6dfef10..203b8166 100644 --- a/hooks/use-device-detection.ts +++ b/hooks/use-device-detection.ts @@ -1,4 +1,4 @@ -import { useMediaQuery } from '@darkroom.engineering/hamo' +import { useMediaQuery } from 'hamo' import { breakpoints } from '~/styles/config.mjs' interface NavigatorWithBattery extends Navigator { diff --git a/hooks/use-scroll-trigger.ts b/hooks/use-scroll-trigger.ts index 803ff200..20de76e8 100644 --- a/hooks/use-scroll-trigger.ts +++ b/hooks/use-scroll-trigger.ts @@ -1,10 +1,6 @@ 'use client' -import { - type Rect, - useLazyState, - useWindowSize, -} from '@darkroom.engineering/hamo' +import { type Rect, useLazyState, useWindowSize } from 'hamo' import { useLenis } from 'lenis/react' import { useCallback, useEffect, useRef } from 'react' import { useTransform } from '~/hooks/use-transform' diff --git a/libs/orchestra/grid/index.tsx b/libs/orchestra/grid/index.tsx index 1ef11195..867e923c 100644 --- a/libs/orchestra/grid/index.tsx +++ b/libs/orchestra/grid/index.tsx @@ -1,5 +1,5 @@ -import { useWindowSize } from '@darkroom.engineering/hamo' import cn from 'clsx' +import { useWindowSize } from 'hamo' import { useMemo } from 'react' import s from './grid.module.css' diff --git a/libs/orchestra/minimap/index.tsx b/libs/orchestra/minimap/index.tsx index 89a52775..03ae6d82 100644 --- a/libs/orchestra/minimap/index.tsx +++ b/libs/orchestra/minimap/index.tsx @@ -1,6 +1,6 @@ 'use client' -import { useWindowSize } from '@darkroom.engineering/hamo' +import { useWindowSize } from 'hamo' import { useCallback, useEffect, useId, useRef, useState } from 'react' import { useTempus } from 'tempus/react' import { create } from 'zustand' diff --git a/libs/webgl/components/image/index.tsx b/libs/webgl/components/image/index.tsx index 9620f3f1..5ec5dad3 100644 --- a/libs/webgl/components/image/index.tsx +++ b/libs/webgl/components/image/index.tsx @@ -1,4 +1,4 @@ -import { useRect } from '@darkroom.engineering/hamo' +import { useRect } from 'hamo' import dynamic from 'next/dynamic' import { useState } from 'react' import { diff --git a/package.json b/package.json index a1b34976..e49c93d5 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "typecheck": "tsc --noEmit --incremental false" }, "dependencies": { - "@darkroom.engineering/hamo": "1.0.0-dev.4", "@hubspot/api-client": "^12.0.1", "@next/third-parties": "^15.1.3", "@react-three/drei": "^9.120.5", @@ -27,6 +26,7 @@ "babel-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110", "clsx": "^2.1.1", "gsap": "^3.12.5", + "hamo": "1.0.0-dev.5", "lenis": "1.1.20-dev.0", "next": "15.1.3", "postprocessing": "^6.36.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index db703536..adaf8e9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,9 @@ importers: gsap: specifier: ^3.12.5 version: 3.12.5 + hamo: + specifier: 1.0.0-dev.5 + version: 1.0.0-dev.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) lenis: specifier: 1.1.20-dev.0 version: 1.1.20-dev.0(react@19.0.0) @@ -3481,6 +3484,12 @@ packages: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} + hamo@1.0.0-dev.5: + resolution: {integrity: sha512-njqFQkXH/8wh9M3Jx2wUC0uptVXn5O+Uf/EvhenW07sDQvpEnQ49mpXjyj/7Lr+9xl0YI4DxZeF0ECOvkD+6ng==} + peerDependencies: + react: '>=17.0.0' + react-dom: '>=17.0.0' + has-ansi@2.0.0: resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} engines: {node: '>=0.10.0'} @@ -9609,6 +9618,13 @@ snapshots: dependencies: duplexer: 0.1.2 + hamo@1.0.0-dev.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + dependencies: + just-debounce-it: 3.2.0 + nanoevents: 9.1.0 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + has-ansi@2.0.0: dependencies: ansi-regex: 2.1.1 diff --git a/styles/_reset.css b/styles/_reset.css index 76eb864f..41b2a4a9 100644 --- a/styles/_reset.css +++ b/styles/_reset.css @@ -17,10 +17,10 @@ svg, video, audio, + dialog, vercel-live-feedback, nextjs-portal, - dialog, - :where(select, option) + #theatrejs-studio-root, :where(select, option) ):not(svg *, symbol *) ) { all: unset;