Skip to content

Commit 1f9577c

Browse files
authored
feat(svg): animation alternative (#317)
BREAKING CHANGE: The `keyTimes`, `gradientTransform`, and `animateBegin` options have been removed.
1 parent c3a0e7c commit 1f9577c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+12810
-65535
lines changed

.codesandbox/tasks.json

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
// These tasks will run in order when initializing your CodeSandbox project.
3+
"setupTasks": [
4+
{
5+
"name": "Install Dependencies",
6+
"command": "pnpm install"
7+
}
8+
],
9+
10+
// These tasks can be run from CodeSandbox. Running one will open a log in the app.
11+
"tasks": {
12+
"dev": {
13+
"name": "dev",
14+
"command": "pnpm run dev",
15+
"runAtStart": true
16+
},
17+
"build": {
18+
"name": "build",
19+
"command": "pnpm run build",
20+
"runAtStart": false
21+
},
22+
"build:docs": {
23+
"name": "build:docs",
24+
"command": "pnpm run build:docs",
25+
"runAtStart": false
26+
},
27+
"test": {
28+
"name": "test",
29+
"command": "pnpm run test",
30+
"runAtStart": false
31+
},
32+
"test:unit": {
33+
"name": "test:unit",
34+
"command": "pnpm run test:unit",
35+
"runAtStart": false
36+
},
37+
"test:unit:web": {
38+
"name": "test:unit:web",
39+
"command": "pnpm run test:unit:web",
40+
"runAtStart": false
41+
},
42+
"test:unit:native": {
43+
"name": "test:unit:native",
44+
"command": "pnpm run test:unit:native",
45+
"runAtStart": false
46+
},
47+
"test:watch": {
48+
"name": "test:watch",
49+
"command": "pnpm run test:watch",
50+
"runAtStart": false
51+
},
52+
"test:tsc": {
53+
"name": "test:tsc",
54+
"command": "pnpm run test:tsc",
55+
"runAtStart": false
56+
},
57+
"test:tsc:watch": {
58+
"name": "test:tsc:watch",
59+
"command": "pnpm run test:tsc:watch",
60+
"runAtStart": false
61+
},
62+
"commit": {
63+
"name": "commit",
64+
"command": "pnpm run commit",
65+
"runAtStart": false
66+
},
67+
"format": {
68+
"name": "format",
69+
"command": "pnpm run format",
70+
"runAtStart": false
71+
},
72+
"release": {
73+
"name": "release",
74+
"command": "pnpm run release",
75+
"runAtStart": false
76+
}
77+
}
78+
}

.devcontainer/devcontainer.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye"
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12+
// "forwardPorts": [],
13+
14+
// Use 'postCreateCommand' to run commands after the container is created.
15+
// "postCreateCommand": "yarn install",
16+
17+
// Configure tool-specific properties.
18+
// "customizations": {},
19+
20+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21+
// "remoteUser": "root"
22+
}

.eslintrc.json

-12
This file was deleted.

.github/dependabot.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

.github/workflows/ci.yml

+11-26
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,27 @@ on:
99
jobs:
1010
check:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
node-version: ['10', '12', '14']
15-
name: '[v${{ matrix.node-version }}] lint and test'
12+
name: Lint, typecheck and test
1613

1714
steps:
1815
- name: Checkout code
19-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
2017

21-
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v2-beta
18+
- uses: pnpm/action-setup@v3
2319
with:
24-
node-version: ${{ matrix.node-version }}
20+
version: 8
2521

26-
- name: Cache node_modules
27-
id: cache-node_modules
28-
uses: actions/cache@v2
22+
- name: Use Node.js 20
23+
uses: actions/setup-node@v3
2924
with:
30-
path: node_modules
31-
key: ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
32-
restore-keys: |
33-
${{ runner.os }}-node-${{matrix.node-version}}-
34-
${{ runner.os }}-node-
35-
${{ runner.os }}-
25+
node-version: 20
26+
cache: 'pnpm'
3627

3728
- name: Install dependencies
38-
if: steps.cache-node_modules.outputs.cache-hit != 'true'
39-
run: npm ci --force
40-
41-
- name: Lint
42-
run: npm run lint
29+
run: pnpm i
4330

4431
- name: Run tests
45-
run: npm run test
32+
run: pnpm run test
4633

4734
- name: Build
48-
env:
49-
BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE }}
50-
run: npm run build
35+
run: pnpm run build

.github/workflows/release.yml

+21-75
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,23 @@ jobs:
1212

1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1616

17-
- name: Use Node.js
18-
uses: actions/setup-node@v2-beta
17+
- uses: pnpm/action-setup@v3
18+
with:
19+
version: 8
1920

20-
- name: Cache node_modules
21-
id: cache-node_modules
22-
uses: actions/cache@v2
21+
- name: Use Node.js 20
22+
uses: actions/setup-node@v3
2323
with:
24-
path: node_modules
25-
key: ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
26-
restore-keys: |
27-
${{ runner.os }}-node-${{matrix.node-version}}-
28-
${{ runner.os }}-node-
29-
${{ runner.os }}-
24+
node-version: 20
25+
cache: 'pnpm'
3026

3127
- name: Install dependencies
32-
if: steps.cache-node_modules.outputs.cache-hit != 'true'
33-
run: npm ci --force
34-
35-
- name: Lint
36-
run: npm run lint
28+
run: pnpm i
3729

3830
- name: Run tests
39-
run: npm run test
31+
run: pnpm run test
4032

4133
build-and-release:
4234
runs-on: ubuntu-latest
@@ -45,72 +37,26 @@ jobs:
4537

4638
steps:
4739
- name: Checkout code
48-
uses: actions/checkout@v2
40+
uses: actions/checkout@v3
4941

50-
- name: Use Node.js
51-
uses: actions/setup-node@v2-beta
42+
- uses: pnpm/action-setup@v3
43+
with:
44+
version: 8
5245

53-
- name: Cache node_modules
54-
id: cache-node_modules
55-
uses: actions/cache@v2
46+
- name: Use Node.js 20
47+
uses: actions/setup-node@v3
5648
with:
57-
path: node_modules
58-
key: ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
59-
restore-keys: |
60-
${{ runner.os }}-node-${{matrix.node-version}}-
61-
${{ runner.os }}-node-
62-
${{ runner.os }}-
49+
node-version: 20
50+
cache: 'pnpm'
6351

6452
- name: Install dependencies
65-
if: steps.cache-node_modules.outputs.cache-hit != 'true'
66-
run: npm ci --force
53+
run: pnpm i
6754

6855
- name: Build
69-
env:
70-
BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE }}
71-
run: npm run build
56+
run: pnpm run build
7257

7358
- name: Release
7459
env:
7560
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7661
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77-
run: npm run release
78-
79-
docs:
80-
runs-on: ubuntu-latest
81-
needs: prepare
82-
name: Documentation
83-
84-
steps:
85-
- name: Checkout code
86-
uses: actions/checkout@v2
87-
88-
- name: Use Node.js
89-
uses: actions/setup-node@v2-beta
90-
91-
- name: Cache node_modules
92-
id: cache-node_modules
93-
uses: actions/cache@v2
94-
with:
95-
path: node_modules
96-
key: ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
97-
restore-keys: |
98-
${{ runner.os }}-node-${{matrix.node-version}}-
99-
${{ runner.os }}-node-
100-
${{ runner.os }}-
101-
102-
- name: Install dependencies
103-
if: steps.cache-node_modules.outputs.cache-hit != 'true'
104-
run: npm ci --force
105-
106-
- name: Build storybook
107-
run: npm run build:docs
108-
109-
- name: Deploy
110-
uses: JamesIves/github-pages-deploy-action@3.6.2
111-
with:
112-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113-
BRANCH: docs
114-
FOLDER: docs-build
115-
CLEAN: true
116-
TARGET_FOLDER: docs
62+
run: pnpm run release

.prettierrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require("@significa/prettier-config");
1+
module.exports = require("@significa/prettier-config");

.storybook/addons.js

-2
This file was deleted.

.storybook/config.js

-13
This file was deleted.

.storybook/main.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { StorybookConfig } from "@storybook/react-vite";
2+
const config: StorybookConfig = {
3+
stories: ["../docs/**/*.mdx", "../docs/**/*.stories.@(js|jsx|ts|tsx)"],
4+
addons: [
5+
6+
],
7+
framework: {
8+
name: "@storybook/react-vite",
9+
options: {},
10+
},
11+
};
12+
export default config;

.storybook/preview-head.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<script>
2+
window.global = window;
3+
</script>

.storybook/preview.tsx

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from "react";
2+
3+
import type { Preview } from "@storybook/react";
4+
5+
const preview: Preview = {
6+
parameters: {
7+
8+
},
9+
decorators: [
10+
(Story) => (
11+
<div>
12+
<Story />
13+
</div>
14+
),
15+
],
16+
};
17+
18+
export default preview;

.storybook/webpack.config.js

-23
This file was deleted.

0 commit comments

Comments
 (0)