-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
155 changed files
with
2,658 additions
and
1,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@number-flow/vue': minor | ||
--- | ||
|
||
use lowercase event names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@number-flow/react': patch | ||
--- | ||
|
||
fix animation handler types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'number-flow': patch | ||
'@number-flow/svelte': minor | ||
'@number-flow/react': minor | ||
'@number-flow/vue': minor | ||
--- | ||
|
||
Rename number-flow element to avoid conflicts between wrappers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,53 @@ | ||
'use client' | ||
|
||
import * as React from 'react' | ||
import NumberFlow from '@number-flow/react' | ||
import NumberFlow, { NumberFlowElement } from '@number-flow/react' | ||
import { flushSync } from 'react-dom' | ||
|
||
export default function Page() { | ||
const [value, setValue] = React.useState(123) | ||
const [value, setValue] = React.useState(42) | ||
const ref = React.useRef<NumberFlowElement>(null) | ||
return ( | ||
<> | ||
<div> | ||
Text node | ||
<NumberFlow value={value} /> | ||
Text node{' '} | ||
<NumberFlow | ||
ref={ref} | ||
value={value} | ||
format={{ style: 'currency', currency: 'USD' }} | ||
locales="fr-FR" | ||
trend="increasing" | ||
continuous | ||
onAnimationsStart={() => console.log('start')} | ||
onAnimationsFinish={() => console.log('finish')} | ||
transformTiming={{ easing: 'linear', duration: 500 }} | ||
spinTiming={{ easing: 'linear', duration: 800 }} | ||
opacityTiming={{ easing: 'linear', duration: 500 }} | ||
/> | ||
</div> | ||
<button onClick={() => setValue(234)}>Change</button> | ||
<button | ||
onClick={() => { | ||
flushSync(() => { | ||
setValue(152) | ||
}) | ||
ref.current?.shadowRoot?.getAnimations().forEach((a) => { | ||
a.pause() | ||
a.currentTime = 300 | ||
}) | ||
}} | ||
> | ||
Change and pause | ||
</button> | ||
<br /> | ||
<button | ||
onClick={() => { | ||
ref.current?.shadowRoot?.getAnimations().forEach((a) => { | ||
a.play() | ||
}) | ||
}} | ||
> | ||
Resume | ||
</button> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
const nextConfig = {} | ||
|
||
export default nextConfig; | ||
export default nextConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/** @type {import('postcss-load-config').Config} */ | ||
const config = { | ||
plugins: { | ||
tailwindcss: {}, | ||
}, | ||
}; | ||
plugins: { | ||
tailwindcss: {} | ||
} | ||
} | ||
|
||
export default config; | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../../test-suites/wrapper |
Binary file removed
BIN
-7.68 KB
...18/tests/__screenshots__/render.test.ts/renders-correctly-1-chromium-darwin.png
Binary file not shown.
Binary file removed
BIN
-7.68 KB
...ts/__screenshots__/render.test.ts/renders-correctly-1-chromium-no-js-darwin.png
Binary file not shown.
Binary file removed
BIN
-22.4 KB
...-18/tests/__screenshots__/render.test.ts/renders-correctly-1-firefox-darwin.png
Binary file not shown.
Binary file removed
BIN
-21.7 KB
...t-18/tests/__screenshots__/render.test.ts/renders-correctly-1-webkit-darwin.png
Binary file not shown.
Binary file removed
BIN
-7.82 KB
...18/tests/__screenshots__/update.test.ts/updates-correctly-1-chromium-darwin.png
Binary file not shown.
Binary file removed
BIN
-22.5 KB
...-18/tests/__screenshots__/update.test.ts/updates-correctly-1-firefox-darwin.png
Binary file not shown.
Binary file removed
BIN
-21.8 KB
...t-18/tests/__screenshots__/update.test.ts/updates-correctly-1-webkit-darwin.png
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"incremental": true, | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"paths": { | ||
"@/*": ["./*"] | ||
} | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], | ||
"exclude": ["node_modules"] | ||
"compilerOptions": { | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"incremental": true, | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"paths": { | ||
"@/*": ["./*"] | ||
} | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], | ||
"exclude": ["node_modules"] | ||
} |
Oops, something went wrong.