From dcf4e1c7e725f3bc673d0f37645e2bc2932a3395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Roche?= Date: Mon, 22 Apr 2024 14:47:40 +0200 Subject: [PATCH] use @darkroom.engineering suite --- app/(pages)/r3f/(components)/box/index.js | 2 +- components/accordion/index.js | 2 +- components/gsap/index.js | 2 +- components/scrollbar/index.js | 2 +- components/split-text/index.js | 2 +- hooks/use-device-detection.js | 2 +- libs/orchestra/grid/index.js | 2 +- libs/orchestra/stats/index.js | 2 +- libs/react-lenis/index.js | 2 +- libs/webgl/components/background/index.js | 2 +- libs/webgl/components/image/index.js | 2 +- libs/webgl/components/postprocessing/index.js | 2 +- libs/webgl/components/raf/index.js | 2 +- package.json | 12 +- pnpm-lock.yaml | 120 +++++++----------- 15 files changed, 65 insertions(+), 93 deletions(-) diff --git a/app/(pages)/r3f/(components)/box/index.js b/app/(pages)/r3f/(components)/box/index.js index 75280916..3730e9fd 100644 --- a/app/(pages)/r3f/(components)/box/index.js +++ b/app/(pages)/r3f/(components)/box/index.js @@ -1,7 +1,7 @@ 'use client' +import { useFrame } from '@darkroom.engineering/hamo' import { OrbitControls } from '@react-three/drei' -import { useFrame } from '@studio-freight/hamo' import { WebGLTunnel } from 'libs/webgl/components/tunnel' import { useRef } from 'react' diff --git a/components/accordion/index.js b/components/accordion/index.js index c35d255f..d6915433 100644 --- a/components/accordion/index.js +++ b/components/accordion/index.js @@ -1,6 +1,6 @@ 'use client' -import { useResizeObserver } from '@studio-freight/hamo' +import { useResizeObserver } from '@darkroom.engineering/hamo' import cn from 'clsx' import { createContext, diff --git a/components/gsap/index.js b/components/gsap/index.js index b7d8dec6..f1085d69 100644 --- a/components/gsap/index.js +++ b/components/gsap/index.js @@ -1,6 +1,6 @@ 'use client' -import Tempus from '@studio-freight/tempus' +import Tempus from '@darkroom.engineering/tempus' import gsap from 'gsap' import { useLayoutEffect } from 'react' import { ScrollTriggerConfig } from './scroll-trigger' diff --git a/components/scrollbar/index.js b/components/scrollbar/index.js index db28984a..f929bff0 100644 --- a/components/scrollbar/index.js +++ b/components/scrollbar/index.js @@ -1,6 +1,6 @@ 'use client' -import { useRect } from '@studio-freight/hamo' +import { useRect } from '@darkroom.engineering/hamo' import { useLenis } from '@studio-freight/react-lenis' import { mapRange } from 'libs/maths' import { useEffect, useRef } from 'react' diff --git a/components/split-text/index.js b/components/split-text/index.js index e85b01c1..2db77728 100644 --- a/components/split-text/index.js +++ b/components/split-text/index.js @@ -1,6 +1,6 @@ 'use client' -import { useResizeObserver } from '@studio-freight/hamo' +import { useResizeObserver } from '@darkroom.engineering/hamo' import { gsap } from 'gsap' // import { SplitText as GSAPSplitText } from 'gsap/dist/SplitText' import cn from 'clsx' diff --git a/hooks/use-device-detection.js b/hooks/use-device-detection.js index ef1afbf6..ed4ee587 100644 --- a/hooks/use-device-detection.js +++ b/hooks/use-device-detection.js @@ -1,4 +1,4 @@ -import { useMediaQuery } from '@studio-freight/hamo' +import { useMediaQuery } from '@darkroom.engineering/hamo' import variables from 'styles/config.js' export function useDeviceDetection() { diff --git a/libs/orchestra/grid/index.js b/libs/orchestra/grid/index.js index 10764d9b..a59e79d7 100644 --- a/libs/orchestra/grid/index.js +++ b/libs/orchestra/grid/index.js @@ -1,4 +1,4 @@ -import { useWindowSize } from '@studio-freight/hamo' +import { useWindowSize } from '@darkroom.engineering/hamo' import cn from 'clsx' import { useMemo } from 'react' import s from './grid.module.scss' diff --git a/libs/orchestra/stats/index.js b/libs/orchestra/stats/index.js index 6b58e178..1041d302 100644 --- a/libs/orchestra/stats/index.js +++ b/libs/orchestra/stats/index.js @@ -1,4 +1,4 @@ -import { useFrame } from '@studio-freight/hamo' +import { useFrame } from '@darkroom.engineering/hamo' import { useCanvas } from 'libs/webgl/components/canvas' import { useEffect, useMemo } from 'react' import _Stats from 'stats-gl' diff --git a/libs/react-lenis/index.js b/libs/react-lenis/index.js index 9b94a627..c731e2c7 100644 --- a/libs/react-lenis/index.js +++ b/libs/react-lenis/index.js @@ -1,3 +1,3 @@ 'use client' -export { Lenis, useLenis } from '@studio-freight/react-lenis' +export { Lenis, useLenis } from 'lenis/react' diff --git a/libs/webgl/components/background/index.js b/libs/webgl/components/background/index.js index 40ab0543..a3e065d0 100644 --- a/libs/webgl/components/background/index.js +++ b/libs/webgl/components/background/index.js @@ -1,6 +1,6 @@ 'use client' -import { useRect } from '@studio-freight/hamo' +import { useRect } from '@darkroom.engineering/hamo' import { types } from '@theatre/core' import { SheetProvider, useSheet } from 'libs/theatre' import { useTheatre } from 'libs/theatre/hooks/use-theatre' diff --git a/libs/webgl/components/image/index.js b/libs/webgl/components/image/index.js index eee091fe..5c8c1e00 100644 --- a/libs/webgl/components/image/index.js +++ b/libs/webgl/components/image/index.js @@ -1,4 +1,4 @@ -import { useRect } from '@studio-freight/hamo' +import { useRect } from '@darkroom.engineering/hamo' import { Image as NextImage } from 'components/image' import { useDeviceDetection } from 'hooks/use-device-detection' import dynamic from 'next/dynamic' diff --git a/libs/webgl/components/postprocessing/index.js b/libs/webgl/components/postprocessing/index.js index 562c04fb..4d0b167a 100644 --- a/libs/webgl/components/postprocessing/index.js +++ b/libs/webgl/components/postprocessing/index.js @@ -1,5 +1,5 @@ +import { useWindowSize } from '@darkroom.engineering/hamo' import { useFrame, useThree } from '@react-three/fiber' -import { useWindowSize } from '@studio-freight/hamo' import { EffectComposer, RenderPass } from 'postprocessing' import { useEffect, useMemo } from 'react' import { HalfFloatType } from 'three' diff --git a/libs/webgl/components/raf/index.js b/libs/webgl/components/raf/index.js index fd89f2d4..c5353a93 100644 --- a/libs/webgl/components/raf/index.js +++ b/libs/webgl/components/raf/index.js @@ -1,5 +1,5 @@ +import { useFrame } from '@darkroom.engineering/hamo' import { useThree } from '@react-three/fiber' -import { useFrame } from '@studio-freight/hamo' export function RAF({ render = true }) { const { advance } = useThree() diff --git a/package.json b/package.json index 5edf59ed..b091751f 100644 --- a/package.json +++ b/package.json @@ -22,14 +22,13 @@ "@react-three/drei": "^9.97.6", "@react-three/fiber": "^8.15.19", "@storyblok/js": "^3.0.7", - "@studio-freight/hamo": "0.6.32", - "@studio-freight/lenis-test": "0.0.6", - "@studio-freight/react-lenis": "0.0.47", - "@studio-freight/tempus": "^0.0.44", + "@darkroom.engineering/hamo": "^0.6.35", + "@darkroom.engineering/tempus": "^0.0.46", "@theatre/core": "^0.7.0", "@theatre/studio": "^0.7.0", "clsx": "^2.1.0", "gsap": "^3.12.5", + "lenis": "^1.0.44", "next": "14.2.1", "next-sitemap": "^4.2.3", "postprocessing": "^6.35.3", @@ -67,9 +66,8 @@ "react": "18.2.0", "react-dom": "18.2.0", "scheduler": "0.23.0", - "@studio-freight/tempus": "0.0.44", - "@studio-freight/react-lenis": "0.0.47", - "@studio-freight/hamo": "0.6.32" + "@darkroom.engineering/tempus": "0.0.46", + "@darkroom.engineering/hamo": "0.6.35" } }, "lint-staged": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4095c6f7..fcb81fc6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,11 +8,16 @@ overrides: react: 18.2.0 react-dom: 18.2.0 scheduler: 0.23.0 - '@studio-freight/tempus': 0.0.44 - '@studio-freight/react-lenis': 0.0.47 - '@studio-freight/hamo': 0.6.32 + '@darkroom.engineering/tempus': 0.0.46 + '@darkroom.engineering/hamo': 0.6.35 dependencies: + '@darkroom.engineering/hamo': + specifier: 0.6.35 + version: 0.6.35(react-dom@18.2.0)(react@18.2.0) + '@darkroom.engineering/tempus': + specifier: 0.0.46 + version: 0.0.46 '@ducanh2912/next-pwa': specifier: ^10.2.5 version: 10.2.6(next@14.2.1)(webpack@5.91.0) @@ -28,18 +33,6 @@ dependencies: '@storyblok/js': specifier: ^3.0.7 version: 3.0.8 - '@studio-freight/hamo': - specifier: 0.6.32 - version: 0.6.32(react-dom@18.2.0)(react@18.2.0) - '@studio-freight/lenis-test': - specifier: 0.0.6 - version: 0.0.6(react-dom@18.2.0)(react@18.2.0) - '@studio-freight/react-lenis': - specifier: 0.0.47 - version: 0.0.47(react-dom@18.2.0)(react@18.2.0) - '@studio-freight/tempus': - specifier: 0.0.44 - version: 0.0.44 '@theatre/core': specifier: ^0.7.0 version: 0.7.1 @@ -52,6 +45,9 @@ dependencies: gsap: specifier: ^3.12.5 version: 3.12.5 + lenis: + specifier: ^1.0.44 + version: 1.0.44(react-dom@18.2.0)(react@18.2.0) next: specifier: 14.2.1 version: 14.2.1(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0)(sass@1.75.0) @@ -93,7 +89,7 @@ dependencies: version: 0.1.2(react@18.2.0) zustand: specifier: 4.5.2 - version: 4.5.2(@types/react@18.2.79)(react@18.2.0) + version: 4.5.2(react@18.2.0) devDependencies: '@builder.io/partytown': @@ -1377,6 +1373,23 @@ packages: resolution: {integrity: sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==} dev: false + /@darkroom.engineering/hamo@0.6.35(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-KE+tIfly4FLGkbPNeVvuiVbiMHhjcDqSy/gNLujG1vgzCfRhCpfCcHpqoBUCnuuv71F79Ky7CGivgHAmaJzGrA==} + peerDependencies: + react: 18.2.0 + react-dom: 18.2.0 + dependencies: + '@darkroom.engineering/tempus': 0.0.46 + just-debounce-it: 3.2.0 + nanoevents: 9.0.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + + /@darkroom.engineering/tempus@0.0.46: + resolution: {integrity: sha512-s5vav3KMHYezvUCl4ee5epg0oimF6M8C9gAaKxFnFaTvX2q3ywFDryIv6XLd0mRFUt3S1uHDJqKaiEcs2ZVSvw==} + dev: false + /@discoveryjs/json-ext@0.5.7: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} @@ -2298,60 +2311,6 @@ packages: storyblok-js-client: 6.7.2 dev: false - /@studio-freight/hamo@0.6.32(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-sSEOH91R6p2PfsMyN2xeGFWOnPRGp+Yl1Uz6uU2kuPDD6auYIWFOChzFTR7aLS+TBWIi3hodBAZhs176t+6awA==} - peerDependencies: - react: 18.2.0 - react-dom: 18.2.0 - dependencies: - '@studio-freight/tempus': 0.0.44 - just-debounce-it: 3.2.0 - nanoevents: 9.0.0 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - - /@studio-freight/lenis-test@0.0.6(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-RFXHkPTlRMBTaGbGbipKBpPPUYtSVQx7/UVjXxfIprrLwmYtEmr58ykm9NORMPfgh+u29ONAtbVEx4LaYU09pw==} - peerDependencies: - react: 18.2.0 - react-dom: 18.2.0 - dependencies: - '@studio-freight/hamo': 0.6.32(react-dom@18.2.0)(react@18.2.0) - clsx: 2.1.0 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - zustand: 4.5.2(@types/react@18.2.79)(react@18.2.0) - transitivePeerDependencies: - - '@types/react' - - immer - dev: false - - /@studio-freight/lenis@1.0.42: - resolution: {integrity: sha512-HJAGf2DeM+BTvKzHv752z6Z7zy6bA643nZM7W88Ft9tnw2GsJSp6iJ+3cekjyMIWH+cloL2U9X82dKXgdU8kPg==} - dev: false - - /@studio-freight/react-lenis@0.0.47(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-h+IAqiyiNo8mRo/CA3/sHCqX2IV0tTLyzZRWsdRaLPtM2aBaRqK0+ISYWTUmktQfcf3qvp4hsn0Oeyt9uXwLTQ==} - peerDependencies: - react: 18.2.0 - react-dom: 18.2.0 - dependencies: - '@studio-freight/hamo': 0.6.32(react-dom@18.2.0)(react@18.2.0) - '@studio-freight/lenis': 1.0.42 - '@types/react': 18.2.79 - clsx: 2.1.0 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - zustand: 4.5.2(@types/react@18.2.79)(react@18.2.0) - transitivePeerDependencies: - - immer - dev: false - - /@studio-freight/tempus@0.0.44: - resolution: {integrity: sha512-ycSc+IY3PGtj7x1KwIJ1sacceQDA6ODzwlrm/1hODADVGS0l/rE5XH9NfyaHSYVECLBnJTdrU+AJiYtd39INXg==} - dev: false - /@surma/rollup-plugin-off-main-thread@2.2.3: resolution: {integrity: sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==} dependencies: @@ -5036,6 +4995,22 @@ packages: language-subtag-registry: 0.3.22 dev: true + /lenis@1.0.44(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-HlH0r9APjf8eveGrUsLX5JavOFui7wfeaZauf2d8Ovphim9L4M+owlJgjmd4XN0wnl8xoeydKIzIyKOrSFk13g==} + peerDependencies: + react: 18.2.0 + react-dom: 18.2.0 + dependencies: + '@darkroom.engineering/hamo': 0.6.35(react-dom@18.2.0)(react@18.2.0) + clsx: 2.1.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + zustand: 4.5.2(react@18.2.0) + transitivePeerDependencies: + - '@types/react' + - immer + dev: false + /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -6685,7 +6660,7 @@ packages: /tunnel-rat@0.1.2(react@18.2.0): resolution: {integrity: sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ==} dependencies: - zustand: 4.5.2(@types/react@18.2.79)(react@18.2.0) + zustand: 4.5.2(react@18.2.0) transitivePeerDependencies: - '@types/react' - immer @@ -7293,7 +7268,7 @@ packages: react: 18.2.0 dev: false - /zustand@4.5.2(@types/react@18.2.79)(react@18.2.0): + /zustand@4.5.2(react@18.2.0): resolution: {integrity: sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==} engines: {node: '>=12.7.0'} peerDependencies: @@ -7308,7 +7283,6 @@ packages: react: optional: true dependencies: - '@types/react': 18.2.79 react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) dev: false