This commit is contained in:
Rahim
2025-09-23 00:57:47 +10:00
parent 3065115cf9
commit 68666d0901
28 changed files with 4713 additions and 7180 deletions
+1
View File
@@ -35,6 +35,7 @@
"rollup": "^4.0.0",
"rollup-plugin-string": "^3.0.0",
"tslib": "^2.6.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
+1 -1
View File
@@ -16,7 +16,7 @@ export const SVG_ICONS = {
volumeOff: volumeOffSvg,
fullscreenEnter: fullscreenEnterSvg,
fullscreenExit: fullscreenExitSvg,
} as const;
};
// Legacy interface for backward compatibility
export interface IconDefinition {
+4 -3
View File
@@ -32,11 +32,12 @@
"nanostores": "^1.0.1"
},
"devDependencies": {
"rollup": "^4.0.0",
"@rollup/plugin-typescript": "^11.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-typescript": "^11.0.0",
"rollup": "^4.0.0",
"tslib": "^2.6.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
+2 -1
View File
@@ -29,9 +29,10 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/playback-engine": "*"
"@vjs-10/playback-engine": "workspace:*"
},
"devDependencies": {
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
@@ -33,6 +33,7 @@
"hls.js": "^1.6.7"
},
"devDependencies": {
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
+2 -1
View File
@@ -30,7 +30,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/icons": "*"
"@vjs-10/icons": "workspace:*"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.0",
@@ -38,6 +38,7 @@
"@rollup/plugin-typescript": "^11.0.0",
"rollup": "^4.0.0",
"tslib": "^2.6.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
@@ -31,9 +31,10 @@
"license": "Apache-2.0",
"dependencies": {
"@open-wc/context-protocol": "^0.0.9",
"@vjs-10/media-store": "*"
"@vjs-10/media-store": "workspace:*"
},
"devDependencies": {
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
+3 -2
View File
@@ -29,10 +29,11 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/media-store": "*",
"@vjs-10/html-media-elements": "*"
"@vjs-10/html-media-elements": "workspace:*",
"@vjs-10/media-store": "workspace:*"
},
"devDependencies": {
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
+9 -6
View File
@@ -30,16 +30,19 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/html-icons": "*",
"@vjs-10/html-media-elements": "*",
"@vjs-10/html-media-store": "*"
"@open-wc/context-protocol": "^0.0.9",
"@vjs-10/html-icons": "workspace:*",
"@vjs-10/html-media-elements": "workspace:*",
"@vjs-10/html-media-store": "workspace:*",
"@vjs-10/media-store": "workspace:*"
},
"devDependencies": {
"rollup": "^4.0.0",
"@rollup/plugin-typescript": "^11.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-typescript": "^11.0.0",
"rollup": "^4.0.0",
"tslib": "^2.6.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
@@ -28,14 +28,14 @@
"mobile"
],
"license": "Apache-2.0",
"dependencies": {},
"peerDependencies": {
"react": ">=16.8.0"
},
"devDependencies": {
"typescript": "^5.9.2",
"@types/react": "^18.0.0",
"react": "^18.0.0"
"react": "^18.0.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
"access": "public"
@@ -28,14 +28,14 @@
"mobile"
],
"license": "Apache-2.0",
"dependencies": {},
"peerDependencies": {
"react": ">=16.8.0"
},
"devDependencies": {
"typescript": "^5.9.2",
"@types/react": "^18.0.0",
"react": "^18.0.0"
"react": "^18.0.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
"access": "public"
@@ -29,16 +29,17 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/react-native-icons": "*",
"@vjs-10/react-native-media-elements": "*"
"@vjs-10/react-native-icons": "workspace:*",
"@vjs-10/react-native-media-elements": "workspace:*"
},
"peerDependencies": {
"react": ">=16.8.0"
},
"devDependencies": {
"typescript": "^5.9.2",
"@types/react": "^18.0.0",
"react": "^18.0.0"
"react": "^18.0.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
"access": "public"
+5 -5
View File
@@ -71,26 +71,26 @@ interface IconProps extends SVGAttributes<SVGElement> {
### Adding New Icons
1. **Add SVG file** to `packages/core/icons/assets/filename.svg`
2. **Regenerate components**: Run `npm run generate` in this package
2. **Regenerate components**: Run `pnpm generate` in this package
3. **New component** will be available as `FilenameIcon`
### Modifying Existing Icons
1. **Edit SVG file** in `packages/core/icons/assets/`
2. **Regenerate components**: Run `npm run generate` in this package
2. **Regenerate components**: Run `pnpm generate` in this package
3. **Component updates automatically**
### Build Process
```bash
# Generate React components from SVG files
npm run generate
pnpm generate
# Build the package (includes generation step)
npm run build
pnpm build
# Clean generated files and dist
npm run clean
pnpm clean
```
## 📦 Package Scripts
+12 -11
View File
@@ -16,7 +16,8 @@
"dist"
],
"scripts": {
"generate": "svgr --config-file svgr.config.js --out-dir src/generated-icons ../../core/icons/assets",
"generate": "svgr --config-file svgr.config.js --out-dir src/generated-icons ../../core/icons/assets && pnpm format:icons",
"format:icons": "prettier src/generated-icons --write --log-level warn --cache",
"build": "npm run generate && rollup -c && tsc --project tsconfig.build.json",
"test": "echo \"No tests yet\"",
"clean": "rm -rf dist src/generated-icons"
@@ -30,24 +31,24 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/icons": "*"
"@vjs-10/icons": "workspace:*"
},
"peerDependencies": {
"react": ">=16.8.0"
},
"devDependencies": {
"rollup": "^4.0.0",
"@rollup/plugin-typescript": "^11.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-commonjs": "^25.0.0",
"tslib": "^2.6.0",
"typescript": "^5.9.2",
"@types/react": "^18.0.0",
"react": "^18.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-typescript": "^11.0.0",
"@svgr/babel-plugin-add-jsx-attribute": "^8.0.0",
"@svgr/cli": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
"@svgr/plugin-prettier": "^8.1.0",
"@svgr/babel-plugin-add-jsx-attribute": "^8.0.0"
"@types/react": "^18.0.0",
"react": "^18.0.0",
"rollup": "^4.0.0",
"tslib": "^2.6.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
"access": "public"
+3 -3
View File
@@ -1,7 +1,7 @@
const path = require('path');
module.exports = {
plugins: ['@svgr/plugin-jsx', '@svgr/plugin-prettier'],
plugins: ['@svgr/plugin-jsx'],
typescript: true,
jsxRuntime: 'automatic',
icon: false, // Don't set height/width attributes.
@@ -28,7 +28,7 @@ module.exports = {
*
* To modify this icon:
* 1. Edit the corresponding SVG file in packages/core/icons/assets/
* 2. Run \`npm run generate\` in this package to regenerate components
* 2. Run \`pnpm generate\` in this package to regenerate components
*
* @generated
*/
@@ -62,7 +62,7 @@ ${variables.exports};
*
* To modify icons or add new ones:
* 1. Add/edit SVG files in packages/core/icons/assets/
* 2. Run \`npm run generate\` in this package to regenerate components
* 2. Run \`pnpm generate\` in this package to regenerate components
*
* @generated
*/
@@ -29,16 +29,17 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/media": "*",
"@vjs-10/playback-engine": "*"
"@vjs-10/media": "workspace:*",
"@vjs-10/playback-engine": "workspace:*"
},
"peerDependencies": {
"react": ">=16.8.0"
},
"devDependencies": {
"typescript": "^5.9.2",
"@types/react": "^18.0.0",
"react": "^18.0.0"
"react": "^18.0.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
"access": "public"
@@ -30,15 +30,16 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/media-store": "*"
"@vjs-10/media-store": "workspace:*"
},
"peerDependencies": {
"react": ">=16.8.0"
},
"devDependencies": {
"typescript": "^5.9.2",
"@types/react": "^18.0.0",
"react": "^18.0.0"
"react": "^18.0.0",
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
"access": "public"
+12 -10
View File
@@ -30,24 +30,26 @@
],
"license": "Apache-2.0",
"dependencies": {
"@vjs-10/media": "*",
"@vjs-10/react-icons": "*",
"@vjs-10/react-media-elements": "*",
"@vjs-10/react-media-store": "*"
"@vjs-10/media": "workspace:*",
"@vjs-10/media-store": "workspace:*",
"@vjs-10/react-icons": "workspace:*",
"@vjs-10/react-media-elements": "workspace:*",
"@vjs-10/react-media-store": "workspace:*"
},
"peerDependencies": {
"react": ">=16.8.0"
},
"devDependencies": {
"rollup": "^4.0.0",
"@rollup/plugin-typescript": "^11.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-typescript": "^11.0.0",
"@types/react": "^18.0.0",
"react": "^18.0.0",
"rollup": "^4.0.0",
"rollup-plugin-postcss": "^4.0.0",
"tslib": "^2.6.0",
"typescript": "^5.9.2",
"@types/react": "^18.0.0",
"react": "^18.0.0"
"tsup": "^8.5.0",
"typescript": "^5.9.2"
},
"publishConfig": {
"access": "public"