Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: next !!! #53

Open
wants to merge 70 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
30b4033
feat: add building issue with `requestIdleCallback`
ryuever Oct 22, 2023
2ab7805
feat: update
ryuever Oct 22, 2023
ccb0032
feat: upgrade prefix-interval-tree
ryuever Sep 9, 2024
1614e84
add container
ryuever Sep 9, 2024
0631b99
feat: update
ryuever Sep 9, 2024
f05227d
feat: update
ryuever Sep 15, 2024
d21bf69
feat: update
ryuever Sep 15, 2024
6db0f27
feat: update
ryuever Sep 15, 2024
b81044d
feat: update
ryuever Sep 16, 2024
1194072
feat: update
ryuever Sep 16, 2024
22b2b2e
feat: update
ryuever Sep 16, 2024
58677ef
feat: update
ryuever Sep 16, 2024
8a0c0ba
feat: update
ryuever Sep 16, 2024
a7ff7c9
feat: update
ryuever Sep 16, 2024
7f8e86f
feat: update
ryuever Sep 16, 2024
3c00b3b
feat: update
ryuever Sep 16, 2024
9f74e31
feat: update
ryuever Sep 16, 2024
98e503b
feat: update
ryuever Sep 16, 2024
d306c20
feat: update
ryuever Sep 16, 2024
16919be
feat: update
ryuever Sep 16, 2024
8401c61
feat: update
ryuever Sep 16, 2024
48b3858
feat: upate
ryuever Sep 16, 2024
1cd90e2
feat: update
ryuever Sep 16, 2024
735b4bf
feat: update
ryuever Sep 16, 2024
6fd4a69
feat: update
ryuever Sep 17, 2024
baecb87
feat: update
ryuever Sep 17, 2024
374238e
feat: remove deprecated
ryuever Sep 17, 2024
2bb2922
feat: update
ryuever Sep 17, 2024
012a86d
feat: update
ryuever Sep 17, 2024
b7328f6
feat: update
ryuever Sep 17, 2024
ba51808
feat: update
ryuever Sep 17, 2024
dd1f5cb
feat: update
ryuever Sep 17, 2024
a4420cc
feat: update
ryuever Sep 18, 2024
98bc2eb
feat: test case
ryuever Sep 18, 2024
c0f0435
feat: test case
ryuever Sep 18, 2024
a38f43d
feat: add @infinite-list/react
ryuever Sep 27, 2024
711feb7
feat: add stories
ryuever Sep 27, 2024
0a79663
feat: refactor data-model
ryuever Sep 27, 2024
8ce77a0
feat: update
ryuever Sep 28, 2024
d82429e
feat: update
ryuever Sep 28, 2024
f931685
feat: update
ryuever Sep 28, 2024
8144cf7
fix: lint
ryuever Sep 28, 2024
381f79e
fix: lint
ryuever Sep 28, 2024
701afb5
feat: update
ryuever Sep 28, 2024
40a8bac
feat: update
ryuever Sep 28, 2024
90214ca
feat: update
ryuever Sep 28, 2024
aa482f2
feat: update
ryuever Sep 28, 2024
0eb5626
feat: update
ryuever Sep 28, 2024
eeeabfe
feat: update
ryuever Sep 28, 2024
a8d2eb3
feat: update
ryuever Sep 28, 2024
6d59b84
feat: update
ryuever Sep 28, 2024
0702b9c
feat: update
ryuever Sep 28, 2024
72c0ced
feat: update
ryuever Sep 28, 2024
5a7aa67
feat: read to split state
ryuever Sep 28, 2024
35dd94e
feat: first version on split Recycle
ryuever Sep 28, 2024
d0e7b77
feat: update
ryuever Oct 1, 2024
ee7d1e8
feat: update
ryuever Oct 1, 2024
5867404
feat: use RecycleStateImpl
ryuever Oct 1, 2024
1078341
feat: test case works
ryuever Oct 1, 2024
fbc61da
feat: update
ryuever Oct 1, 2024
da5f09c
feat: update
ryuever Oct 1, 2024
4452f6a
feat: add List
ryuever Oct 1, 2024
a38587c
feat: React List
ryuever Oct 1, 2024
0dfa6db
feat: List
ryuever Oct 1, 2024
7d39f61
feat: add ScrollTracker
ryuever Oct 2, 2024
40ab338
feat: update
ryuever Oct 2, 2024
d309e98
feat: add onEndReached handler
ryuever Oct 2, 2024
b877d53
feat: update
ryuever Oct 2, 2024
2000166
feat: udpate
ryuever Oct 2, 2024
4bd1d8b
feat: update
ryuever Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .eslintrc.cjs

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ build
.expo/*
dist.zip
.eslintcache



.nx/cache
.nx/workspace-data

storybook-static
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://zenn.dev/haxibami/scraps/083718c1beec04
strict-peer-dependencies=false

registry=https://registry.npmjs.org
# registry=https://registry.npmjs.org
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
/.nx/workspace-data
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
28 changes: 28 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# path to a directory with all packages
storage: ../tmp/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmmirror.com/
maxage: 60m

packages:
'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

# log settings
logs:
type: stdout
format: pretty
level: warn

publish:
allow_offline: true # set offline to true to allow publish offline
33 changes: 33 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const nx = require('@nx/eslint-plugin');

module.exports = [
...nx.configs['flat/base'],
...nx.configs['flat/typescript'],
...nx.configs['flat/javascript'],
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?js$'],
depConstraints: [
{
sourceTag: '*',
onlyDependOnLibsWithTags: ['*'],
},
],
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
},
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
];
52 changes: 52 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"defaultBase": "main",
"nxCloudId": "66eec5ed3409e368c034ffad",
"plugins": [
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
},
{
"plugin": "@nx/vite/plugin",
"options": {
"buildTargetName": "build",
"testTargetName": "vite:test",
"serveTargetName": "serve",
"previewTargetName": "preview",
"serveStaticTargetName": "serve-static",
"typecheckTargetName": "vite:typecheck"
}
},
{
"plugin": "@nx/storybook/plugin",
"options": {
"serveStorybookTargetName": "storybook",
"buildStorybookTargetName": "build-storybook",
"testStorybookTargetName": "test-storybook",
"staticStorybookTargetName": "static-storybook"
}
}
],
"generators": {
"@nx/react": {
"library": {
"unitTestRunner": "vitest"
}
}
},
"targetDefaults": {
"@nx/js:tsc": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["default", "^default"]
}
},
"release": {
"version": {
"preVersionCommand": "pnpm dlx nx run-many -t build"
}
}
}
95 changes: 53 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,6 @@
"publish": "pnpm publish -r --access public"
},
"private": true,
"bump": {
"changelog": {
"enable": true,
"skipUnstable": true
},
"publish": true,
"allowed_branches": [
{
"disallowTypes": [
"premajor",
"preminor",
"prepatch",
"prerelease"
]
},
{
"name": "main",
"disallowTypes": [
"premajor",
"preminor",
"prepatch",
"prerelease"
]
}
],
"mode": "monorepo",
"packages": [
"packages/*"
],
"before": [
"git pull --rebase",
"pnpm i",
"npm run build"
]
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --cache --fix",
Expand All @@ -67,21 +32,67 @@
"author": "youchao liu",
"license": "ISC",
"devDependencies": {
"@innei/bump-version": "1.5.9",
"@innei/eslint-config-ts": "0.9.7",
"@types/node": "^16",
"@babel/core": "^7.14.5",
"@babel/preset-react": "^7.14.5",
"@eslint/js": "^9.8.0",
"@nx/eslint": "19.8.0",
"@nx/eslint-plugin": "19.8.0",
"@nx/js": "19.8.0",
"@nx/react": "19.8.0",
"@nx/storybook": "19.8.0",
"@nx/vite": "19.8.0",
"@nx/web": "19.8.0",
"@storybook/addon-essentials": "^8.2.8",
"@storybook/addon-interactions": "^8.2.8",
"@storybook/core-server": "^8.2.8",
"@storybook/jest": "^0.2.3",
"@storybook/react": "^8.2.8",
"@storybook/react-vite": "^8.2.8",
"@storybook/test-runner": "^0.13.0",
"@storybook/testing-library": "^0.2.2",
"@swc-node/register": "~1.9.1",
"@swc/core": "~1.5.7",
"@swc/helpers": "~0.5.11",
"@testing-library/react": "15.0.6",
"@types/node": "18.16.9",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"@types/react-native": "^0.73.0",
"@vitejs/plugin-react": "^4.2.0",
"@vitest/coverage-v8": "^1.0.4",
"@vitest/ui": "^1.3.1",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "^8.0.1",
"jsdom": "~22.1.0",
"lint-staged": "^13.0.3",
"nx": "19.8.0",
"prettier": "^2.8.4",
"rimraf": "^3.0.2",
"storybook": "^8.2.8",
"ts-node": "10.9.1",
"tsup": "^6.6.3",
"typescript": "4.8.3",
"vite": "4.1.4",
"typescript": "~5.5.2",
"typescript-eslint": "^8.0.0",
"verdaccio": "^5.0.4",
"vite": "^5.0.0",
"vite-plugin-dts": "~3.8.1",
"vite-tsconfig-paths": "4.0.5",
"vitest": "0.29.2"
"vitest": "^1.3.1"
},
"bugs": {
"url": "https://github.com/red-armor/infinite-list/issues"
},
"homepage": "https://github.com/red-armor/infinite-list#readme"
"homepage": "https://github.com/red-armor/infinite-list#readme",
"dependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
},
"nx": {
"includedScripts": []
}
}
16 changes: 7 additions & 9 deletions packages/data-model/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# @infinite-list/data-model
# data-model

## Installation
This library was generated with [Nx](https://nx.dev).

```bash
$ npm i @infinite-list/data-model
```
## Building

## How to use
Run `nx build data-model` to build the library.

```typescript
import { ListDimensions } from '@infinite-list/data-model'
```
## Running unit tests

Run `nx test data-model` to execute the unit tests via [Vitest](https://vitest.dev/).
6 changes: 6 additions & 0 deletions packages/data-model/docs/itemMeta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ItemMeta


```ts

```
23 changes: 23 additions & 0 deletions packages/data-model/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
{
// ====== temp ignore, which will case package.json check error ==
// files: ['**/*.json'],
// rules: {
// '@nx/dependency-checks': [
// 'error',
// {
// ignoredFiles: [
// '{projectRoot}/eslint.config.{js,cjs,mjs}',
// '{projectRoot}/vite.config.{js,ts,mjs,mts}',
// ],
// },
// ],
// },
// languageOptions: {
// parser: require('jsonc-eslint-parser'),
// },
},
];
Loading
Loading