react-timelane 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/TimelineAside.d.ts +13 -0
- package/dist/components/TimelineBackground.d.ts +5 -0
- package/dist/components/TimelineBody.d.ts +13 -0
- package/dist/components/TimelineHeader/DaysHeader.d.ts +15 -0
- package/dist/components/TimelineHeader/MonthsHeader.d.ts +15 -0
- package/dist/components/TimelineHeader/TimelineHeader.d.ts +24 -0
- package/dist/components/TimelineHeader/WeeksHeader.d.ts +15 -0
- package/dist/components/TimelineHeader/index.d.ts +5 -0
- package/dist/components/TimelineHeader/renderingUtils.d.ts +4 -0
- package/dist/components/TimelineSelectionLayer.d.ts +6 -0
- package/dist/components/TimelineSettingsContext.d.ts +7 -0
- package/dist/components/TimelineSettingsProvider.d.ts +7 -0
- package/dist/components/TimelineWrapper.d.ts +17 -0
- package/dist/components/core/CoreItem/CoreItemComponent.d.ts +14 -0
- package/dist/components/core/CoreItem/DragResizeComponent.d.ts +20 -0
- package/dist/components/core/CoreSwimlane/AvailableSpaceIndicator.d.ts +21 -0
- package/dist/components/core/CoreSwimlane/CoreSwimlane.d.ts +16 -0
- package/dist/components/core/CoreSwimlane/DropPreview.d.ts +9 -0
- package/dist/components/core/CoreSwimlane/DropTarget.d.ts +11 -0
- package/dist/components/core/CoreSwimlane/OverlapIndicator.d.ts +6 -0
- package/dist/components/core/CoreSwimlane/utils.d.ts +13 -0
- package/dist/components/core/utils.d.ts +15 -0
- package/dist/components/layout/TimelineLayout.d.ts +23 -0
- package/dist/hooks/useScroll.d.ts +10 -0
- package/dist/hooks/useTimelineContext.d.ts +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/react-timelane.css +1 -0
- package/dist/react-timelane.js +4744 -0
- package/dist/types/AvailableSpace.d.ts +6 -0
- package/dist/types/CoreItem.d.ts +12 -0
- package/dist/types/DateBounds.d.ts +4 -0
- package/dist/types/Dimensions.d.ts +4 -0
- package/dist/types/GrabInfo.d.ts +5 -0
- package/dist/types/Grid.d.ts +6 -0
- package/dist/types/OffsetBounds.d.ts +4 -0
- package/dist/types/Pixels.d.ts +4 -0
- package/{src/types/Position.ts → dist/types/Position.d.ts} +2 -2
- package/dist/types/Rectangle.d.ts +6 -0
- package/dist/types/SwimlaneT.d.ts +5 -0
- package/dist/types/TimeRange.d.ts +4 -0
- package/dist/types/TimelineSettings.d.ts +11 -0
- package/dist/types/index.d.ts +15 -0
- package/package.json +1 -1
- package/vite.config.ts +1 -1
- package/.github/workflows/static.yml +0 -55
- package/docs/README.md +0 -54
- package/docs/eslint.config.js +0 -28
- package/docs/index.html +0 -12
- package/docs/package-lock.json +0 -5101
- package/docs/package.json +0 -35
- package/docs/src/App.css +0 -5
- package/docs/src/App.tsx +0 -59
- package/docs/src/assets/react.svg +0 -1
- package/docs/src/components/AllocationComponent.tsx +0 -82
- package/docs/src/components/Timeline.tsx +0 -183
- package/docs/src/constants.ts +0 -42
- package/docs/src/hooks/useLocalStorage.ts +0 -21
- package/docs/src/main.tsx +0 -9
- package/docs/src/models/Allocation.ts +0 -11
- package/docs/src/models/AllocationId.ts +0 -1
- package/docs/src/models/Resource.ts +0 -8
- package/docs/src/models/ResourceId.ts +0 -1
- package/docs/src/vite-env.d.ts +0 -1
- package/docs/tsconfig.json +0 -27
- package/docs/vite.config.ts +0 -8
- package/src/components/Timeline.scss +0 -297
- package/src/components/TimelineAside.tsx +0 -81
- package/src/components/TimelineBackground.tsx +0 -53
- package/src/components/TimelineBody.tsx +0 -54
- package/src/components/TimelineHeader/DaysHeader.tsx +0 -44
- package/src/components/TimelineHeader/MonthsHeader.tsx +0 -62
- package/src/components/TimelineHeader/TimelineHeader.tsx +0 -64
- package/src/components/TimelineHeader/WeeksHeader.tsx +0 -63
- package/src/components/TimelineHeader/index.ts +0 -9
- package/src/components/TimelineHeader/renderingUtils.tsx +0 -57
- package/src/components/TimelineSelectionLayer.tsx +0 -179
- package/src/components/TimelineSettingsContext.tsx +0 -27
- package/src/components/TimelineSettingsProvider.tsx +0 -24
- package/src/components/TimelineWrapper.tsx +0 -51
- package/src/components/core/CoreItem/CoreItemComponent.tsx +0 -69
- package/src/components/core/CoreItem/DragResizeComponent.tsx +0 -180
- package/src/components/core/CoreSwimlane/AvailableSpaceIndicator.tsx +0 -156
- package/src/components/core/CoreSwimlane/CoreSwimlane.tsx +0 -245
- package/src/components/core/CoreSwimlane/DropPreview.tsx +0 -30
- package/src/components/core/CoreSwimlane/DropTarget.tsx +0 -83
- package/src/components/core/CoreSwimlane/OverlapIndicator.tsx +0 -22
- package/src/components/core/CoreSwimlane/utils.ts +0 -375
- package/src/components/core/utils.ts +0 -154
- package/src/components/layout/TimelineLayout.tsx +0 -93
- package/src/components/layout/layout.scss +0 -107
- package/src/global.d.ts +0 -9
- package/src/hooks/useScroll.tsx +0 -71
- package/src/hooks/useTimelineContext.tsx +0 -6
- package/src/index.ts +0 -15
- package/src/types/AvailableSpace.ts +0 -6
- package/src/types/CoreItem.ts +0 -23
- package/src/types/DateBounds.ts +0 -4
- package/src/types/Dimensions.ts +0 -4
- package/src/types/GrabInfo.ts +0 -6
- package/src/types/Grid.ts +0 -6
- package/src/types/OffsetBounds.ts +0 -4
- package/src/types/Pixels.ts +0 -4
- package/src/types/Rectangle.ts +0 -6
- package/src/types/SwimlaneT.ts +0 -6
- package/src/types/TimeRange.ts +0 -4
- package/src/types/TimelineSettings.ts +0 -11
- package/src/types/index.ts +0 -15
- package/tsconfig.json +0 -32
- /package/{src/types/ItemId.ts → dist/types/ItemId.d.ts} +0 -0
- /package/{src/types/SwimlaneId.ts → dist/types/SwimlaneId.d.ts} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ItemId } from './ItemId';
|
|
2
|
+
import { SwimlaneId } from './SwimlaneId';
|
|
3
|
+
export type CoreItem<T = void> = {
|
|
4
|
+
id: ItemId;
|
|
5
|
+
swimlaneId: SwimlaneId;
|
|
6
|
+
start: Date;
|
|
7
|
+
end: Date;
|
|
8
|
+
size: number;
|
|
9
|
+
offset: number;
|
|
10
|
+
payload: T;
|
|
11
|
+
};
|
|
12
|
+
export declare function isCoreItem(a: object): a is CoreItem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { type TimeRange } from './TimeRange';
|
|
2
|
+
export { type Pixels } from './Pixels';
|
|
3
|
+
export { type Rectangle } from './Rectangle';
|
|
4
|
+
export { type Position } from './Position';
|
|
5
|
+
export { type Grid } from './Grid';
|
|
6
|
+
export { type ItemId } from './ItemId';
|
|
7
|
+
export { type AvailableSpace } from './AvailableSpace';
|
|
8
|
+
export { type CoreItem, isCoreItem } from './CoreItem';
|
|
9
|
+
export { type Dimensions } from './Dimensions';
|
|
10
|
+
export { type GrabInfo } from './GrabInfo';
|
|
11
|
+
export { type SwimlaneId } from './SwimlaneId';
|
|
12
|
+
export { type SwimlaneT } from './SwimlaneT';
|
|
13
|
+
export { type DateBounds } from './DateBounds';
|
|
14
|
+
export { type OffsetBounds } from './OffsetBounds';
|
|
15
|
+
export { type TimelineSettings } from './TimelineSettings';
|
package/package.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Simple workflow for deploying static content to GitHub Pages
|
|
2
|
-
name: Deploy static content to Pages
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
# Runs on pushes targeting the default branch
|
|
6
|
-
push:
|
|
7
|
-
branches: ["main"]
|
|
8
|
-
|
|
9
|
-
# Allows you to run this workflow manually from the Actions tab
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
|
|
12
|
-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
pages: write
|
|
16
|
-
id-token: write
|
|
17
|
-
|
|
18
|
-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
19
|
-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
20
|
-
concurrency:
|
|
21
|
-
group: "pages"
|
|
22
|
-
cancel-in-progress: false
|
|
23
|
-
|
|
24
|
-
jobs:
|
|
25
|
-
# Single deploy job since we're just deploying
|
|
26
|
-
deploy:
|
|
27
|
-
environment:
|
|
28
|
-
name: github-pages
|
|
29
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
30
|
-
runs-on: ubuntu-latest
|
|
31
|
-
defaults:
|
|
32
|
-
run:
|
|
33
|
-
working-directory: "./docs"
|
|
34
|
-
steps:
|
|
35
|
-
- name: Checkout
|
|
36
|
-
uses: actions/checkout@v4
|
|
37
|
-
- name: Set up Node
|
|
38
|
-
uses: actions/setup-node@v4
|
|
39
|
-
with:
|
|
40
|
-
node-version: lts/*
|
|
41
|
-
cache: "npm"
|
|
42
|
-
- name: Install dependencies
|
|
43
|
-
run: npm ci
|
|
44
|
-
- name: Build
|
|
45
|
-
run: npm run build
|
|
46
|
-
- name: Setup Pages
|
|
47
|
-
uses: actions/configure-pages@v5
|
|
48
|
-
- name: Upload artifact
|
|
49
|
-
uses: actions/upload-pages-artifact@v3
|
|
50
|
-
with:
|
|
51
|
-
# Upload entire repository
|
|
52
|
-
path: "./dist"
|
|
53
|
-
- name: Deploy to GitHub Pages
|
|
54
|
-
id: deployment
|
|
55
|
-
uses: actions/deploy-pages@v4
|
package/docs/README.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
export default tseslint.config({
|
|
16
|
-
extends: [
|
|
17
|
-
// Remove ...tseslint.configs.recommended and replace with this
|
|
18
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
19
|
-
// Alternatively, use this for stricter rules
|
|
20
|
-
...tseslint.configs.strictTypeChecked,
|
|
21
|
-
// Optionally, add this for stylistic rules
|
|
22
|
-
...tseslint.configs.stylisticTypeChecked,
|
|
23
|
-
],
|
|
24
|
-
languageOptions: {
|
|
25
|
-
// other options...
|
|
26
|
-
parserOptions: {
|
|
27
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
28
|
-
tsconfigRootDir: import.meta.dirname,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
})
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
// eslint.config.js
|
|
38
|
-
import reactX from 'eslint-plugin-react-x'
|
|
39
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
40
|
-
|
|
41
|
-
export default tseslint.config({
|
|
42
|
-
plugins: {
|
|
43
|
-
// Add the react-x and react-dom plugins
|
|
44
|
-
'react-x': reactX,
|
|
45
|
-
'react-dom': reactDom,
|
|
46
|
-
},
|
|
47
|
-
rules: {
|
|
48
|
-
// other rules...
|
|
49
|
-
// Enable its recommended typescript rules
|
|
50
|
-
...reactX.configs['recommended-typescript'].rules,
|
|
51
|
-
...reactDom.configs.recommended.rules,
|
|
52
|
-
},
|
|
53
|
-
})
|
|
54
|
-
```
|
package/docs/eslint.config.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js'
|
|
2
|
-
import globals from 'globals'
|
|
3
|
-
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
-
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
-
import tseslint from 'typescript-eslint'
|
|
6
|
-
|
|
7
|
-
export default tseslint.config(
|
|
8
|
-
{ ignores: ['dist'] },
|
|
9
|
-
{
|
|
10
|
-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
-
files: ['**/*.{ts,tsx}'],
|
|
12
|
-
languageOptions: {
|
|
13
|
-
ecmaVersion: 2020,
|
|
14
|
-
globals: globals.browser,
|
|
15
|
-
},
|
|
16
|
-
plugins: {
|
|
17
|
-
'react-hooks': reactHooks,
|
|
18
|
-
'react-refresh': reactRefresh,
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
...reactHooks.configs.recommended.rules,
|
|
22
|
-
'react-refresh/only-export-components': [
|
|
23
|
-
'warn',
|
|
24
|
-
{ allowConstantExport: true },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
)
|
package/docs/index.html
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>react-timelane demo</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<div id="root"></div>
|
|
10
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|