Skip to content

Commit 68676fe

Browse files
ci: sync more workspace changes from other projects (#100)
* Cleanup * Update pnpm * Update node
1 parent 32fbd21 commit 68676fe

File tree

34 files changed

+3685
-6277
lines changed

34 files changed

+3685
-6277
lines changed

.github/workflows/autofix.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: autofix.ci # needed to securely identify the workflow
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
autofix:
17+
name: autofix
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v5.0.0
22+
with:
23+
fetch-depth: 0
24+
- name: Setup Tools
25+
uses: tanstack/config/.github/setup@main
26+
- name: Fix formatting
27+
run: pnpm run format
28+
- name: Apply fixes
29+
uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
30+
with:
31+
commit-message: 'ci: apply automated fixes'

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
run: |
3737
pnpm install --no-frozen-lockfile
3838
pnpm build
39-
pnpm test
39+
pnpm test:ci

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.19.6
1+
24.8.0

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
**/.next
2+
**/.nx/cache
3+
**/.svelte-kit
4+
**/build
5+
**/coverage
6+
**/dist
7+
**/docs/**/reference/**
8+
**/codemods/**/__testfixtures__
9+
pnpm-lock.yaml

.prettierrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/concepts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ At the heart of every Ranger is the `Ranger` class. This class will provide ever
2222
- Ticks (labels) generation
2323

2424
After reading about Ranger's concepts, you should:
25+
2526
- [Check Out Some Examples](./examples/react/basic)

docs/framework/react/api/basic.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ menu: API
55
---
66

77
## Examples
8+
89
Want to skip to the implementation? Check out these examples:
910

1011
- [basic](../examples/react/basic)
@@ -18,51 +19,67 @@ The API below described how to use the **basic** features.
1819
```tsx
1920
values: ReadonlyArray<number>
2021
```
22+
2123
**Required** The current value (or values) for the range.
2224

2325
### min
2426

2527
```tsx
2628
min: number
2729
```
30+
2831
**Required** The minimum limit for the range.
2932

3033
### max
3134

3235
```tsx
3336
max: number
3437
```
38+
3539
**Required** The maximum limit for the range.
3640

3741
### stepSize
3842

3943
```ts
4044
stepSize: number
4145
```
46+
4247
**Required** The distance between selectable steps.
4348

4449
### onChange
4550

4651
```ts
4752
onChange: (instance: Ranger<TTrackElement>) => void
4853
```
54+
4955
A function that is called when the handle is released.
5056

5157
## API
5258

5359
### handles
60+
5461
```tsx
55-
handles: ReadonlyArray<{value: number; isActive: boolean; onKeyDownHandler(event): function; onMouseDownHandler(event): function; onTouchStart(event): function}>
62+
handles: ReadonlyArray<{
63+
value: number
64+
isActive: boolean
65+
onKeyDownHandler(event): function
66+
onMouseDownHandler(event): function
67+
onTouchStart(event): function
68+
}>
5669
```
70+
5771
Handles to be rendered. Each `handle` has the following props:
58-
- `value: number` - The current value for the handle.
59-
- `isActive: boolean` - Denotes if the handle is currently being dragged.
60-
- `onKeyDownHandler(event): func`
61-
- `onMouseDownHandler(event): func`
62-
- `onTouchStart(event): func`
72+
73+
- `value: number` - The current value for the handle.
74+
- `isActive: boolean` - Denotes if the handle is currently being dragged.
75+
- `onKeyDownHandler(event): func`
76+
- `onMouseDownHandler(event): func`
77+
- `onTouchStart(event): func`
6378

6479
### activeHandleIndex
80+
6581
```tsx
6682
activeHandleIndex: null | number
6783
```
84+
6885
The zero-based index of the handle that is currently being dragged, or `null` if no handle is being dragged.

docs/framework/react/api/custom-steps.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ menu: API
55
---
66

77
## Examples
8+
89
Want to skip to the implementation? Check out these examples:
910

1011
- [custom-steps](../examples/custom-steps)
@@ -18,22 +19,28 @@ The API below described how to use the **custom-steps** features.
1819
```ts
1920
steps: Array<number>
2021
```
22+
2123
An array of custom steps to use. This will override `stepSize`
2224

2325
### ticks
2426

2527
```ts
2628
ticks: Array<number>
2729
```
30+
2831
An array of custom ticks to use. This will override `tickSize`
2932

3033
## API
3134

3235
### getTicks
36+
3337
```tsx
34-
getTicks: () => ReadonlyArray<{value: number; key: number; percentage: number}>
38+
getTicks: () =>
39+
ReadonlyArray<{ value: number; key: number; percentage: number }>
3540
```
41+
3642
Ticks to be rendered. Each `tick` has the following props:
37-
- `value: number` - The tick number to be displayed
38-
- `key: number` - The key of a tick
39-
- `percentage: number` - Percentage value of where tick should be placed on ranger
43+
44+
- `value: number` - The tick number to be displayed
45+
- `key: number` - The key of a tick
46+
- `percentage: number` - Percentage value of where tick should be placed on ranger

docs/framework/react/api/custom-styles.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ menu: API
55
---
66

77
## Examples
8+
89
Want to skip to the implementation? Check out these examples:
910

1011
- [custom-styles](../examples/custom-styles)
@@ -14,9 +15,12 @@ The API below described how to use the **custom-steps** features.
1415
## API
1516

1617
### getSegments
18+
1719
```tsx
18-
getSegments: () => ReadonlyArray<{left: number; width: number}>
20+
getSegments: () => ReadonlyArray<{ left: number; width: number }>
1921
```
22+
2023
Segments to be rendered. Each `segment` has the following props:
21-
- `left: number` - Percentage value of where segment should start on ranger
22-
- `width: number` - Percentage value of segment width
24+
25+
- `left: number` - Percentage value of where segment should start on ranger
26+
- `width: number` - Percentage value of segment width

docs/framework/react/api/logarithmic-interpolator.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ menu: API
55
---
66

77
## Examples
8+
89
Want to skip to the implementation? Check out these examples:
910

1011
- [logarithmic-interpolator](../examples/logarithmic-interpolator)
@@ -23,6 +24,8 @@ interpolator: {
2324
getValueForClientX: (clientX: number, trackDims: object, min: number, max: number): number;
2425
}
2526
```
27+
2628
The Interpolator to use. Defaults to the bundled linear-scale interpolator
27-
- `getPercentageForValue` - Takes the value & range and returns a percentage [0, 100] where the value sits from left to right.
28-
- `getValueForClientX`- Takes the clientX (offset from the left edge of the ranger) along with the dimensions and range settings and transforms a pixel coordinate back into a value.
29+
30+
- `getPercentageForValue` - Takes the value & range and returns a percentage [0, 100] where the value sits from left to right.
31+
- `getValueForClientX`- Takes the clientX (offset from the left edge of the ranger) along with the dimensions and range settings and transforms a pixel coordinate back into a value.

0 commit comments

Comments
 (0)