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

React v3 #243

Open
wants to merge 114 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
32fbf8a
feat: mocha setup
jerzy-mankowski Nov 25, 2024
a42d2d3
feat: eslint setup
jerzy-mankowski Nov 25, 2024
fcc68bc
chore: removed old tests
jerzy-mankowski Nov 25, 2024
bbdef3f
chore: initial AdvancedImage + types
jerzy-mankowski Nov 25, 2024
3ce032c
feat: parseRemoveBackgroundOption + tests
jerzy-mankowski Nov 25, 2024
9d6c086
fix: parseRemoveBackgroundOption refinement
jerzy-mankowski Nov 25, 2024
6b827fb
fix: parseQuality + tests
jerzy-mankowski Nov 25, 2024
d0d1ff4
fix: parseFormat + tests
jerzy-mankowski Nov 26, 2024
c4aeeaf
fix: adjusted image/video types
jerzy-mankowski Nov 26, 2024
2b51671
chore: prettier adjustment
jerzy-mankowski Nov 27, 2024
2bf1ca6
fix: parseQuality.ts type refinement
jerzy-mankowski Nov 27, 2024
eddfb26
fix: parseRemoveBackground.ts refinement
jerzy-mankowski Nov 27, 2024
850ac5b
feat: added parseHeight
jerzy-mankowski Nov 27, 2024
93cdd75
feat: added parseWidth
jerzy-mankowski Nov 27, 2024
b0b0385
feat: work in progress on types.ts
jerzy-mankowski Nov 27, 2024
f776e67
feat: basic serve setup with rollup
jerzy-mankowski Nov 27, 2024
468ecf3
chore: removed renamed file
jerzy-mankowski Nov 27, 2024
ed3c716
feat: parseFormat refinement
jerzy-mankowski Nov 27, 2024
a929556
feat: basic support for parseBackground
jerzy-mankowski Nov 27, 2024
7242f85
feat: added typecheck script
jerzy-mankowski Nov 27, 2024
cf64b2e
fix: parseBackground type adjustment
jerzy-mankowski Nov 27, 2024
66e78e1
feat: parseQuality simplification
jerzy-mankowski Nov 27, 2024
27b6e76
chore: empty parseResize + test
jerzy-mankowski Nov 27, 2024
c5b4f85
chore: moved analytics file
jerzy-mankowski Nov 27, 2024
2653952
chore: typecheck adjustments
jerzy-mankowski Nov 27, 2024
3b46e90
chore: demo adjustments
jerzy-mankowski Nov 27, 2024
936b1a5
chore: moved files to new directory
jerzy-mankowski Nov 27, 2024
d31bed2
feat: added parseCloudinaryUrlToParts.ts
jerzy-mankowski Nov 27, 2024
674d516
feat: added parsePropsToTransformationsString
jerzy-mankowski Nov 27, 2024
44dbfab
feat: types refinement
jerzy-mankowski Nov 27, 2024
46e88f6
feat: connected all the transformations
jerzy-mankowski Nov 27, 2024
9d68734
feat: basic demo setup
jerzy-mankowski Nov 27, 2024
0829134
fix: types simplification; moved backgroundRemoval to effects
jerzy-mankowski Nov 28, 2024
e6c7dbb
fix: types refinement
jerzy-mankowski Nov 28, 2024
60a0dc7
fix: code reorganization
jerzy-mankowski Nov 28, 2024
fe7347d
feat: added support for rotate
jerzy-mankowski Nov 28, 2024
6bc757f
fix: type refinements; finished types for resize
jerzy-mankowski Nov 28, 2024
7af5b4a
fix: added missing comments + cleanup
jerzy-mankowski Nov 28, 2024
940cfd0
fix: aspectRatio refinement; resize refinements; first parseResize co…
jerzy-mankowski Nov 29, 2024
8c54391
chore: prettier update
jerzy-mankowski Nov 29, 2024
2eca138
fix: parseResize formatting
jerzy-mankowski Nov 29, 2024
139e66e
fix: gravity types refinement
jerzy-mankowski Nov 29, 2024
3ad70c8
feat: added parseIgnoreAspectRatio
jerzy-mankowski Nov 29, 2024
f58a686
fix: better fillPadding type
jerzy-mankowski Nov 29, 2024
2ff9e77
fix: added more parseResize code
jerzy-mankowski Nov 29, 2024
373b505
feat: added parseZoom
jerzy-mankowski Nov 29, 2024
db0bb06
feat: initial gravity support
jerzy-mankowski Nov 29, 2024
1543382
fix: demo adjustments
jerzy-mankowski Dec 2, 2024
1531cc1
fix: type names adjustment
jerzy-mankowski Dec 2, 2024
22dbc20
feat: added fade effect support
jerzy-mankowski Dec 2, 2024
52d5eb2
feat: added gamma, grayscale and light effect support
jerzy-mankowski Dec 2, 2024
c976a3b
feat: added support for negate, noise and pixelate effects
jerzy-mankowski Dec 2, 2024
faa1341
fix: fixed type issues for gravity
jerzy-mankowski Dec 2, 2024
b74047b
chore: better type validation for effects
jerzy-mankowski Dec 2, 2024
730f381
feat: added support for blur and blur_faces effects
jerzy-mankowski Dec 2, 2024
ab3141b
feat: added support for auto brightness effect
jerzy-mankowski Dec 2, 2024
59730c3
feat: added support for auto color and contrast effect
jerzy-mankowski Dec 2, 2024
1993a84
feat: added support for rounded corners
jerzy-mankowski Dec 2, 2024
76a169f
feat: added support for opacity
jerzy-mankowski Dec 2, 2024
7ff9be8
chore: removed babel-eslint; downgraded eslint to 7.32
jerzy-mankowski Dec 3, 2024
179f025
chore: tsconfig adjustments
jerzy-mankowski Dec 3, 2024
86f743c
fix: eslint no longer skips files on src
jerzy-mankowski Dec 3, 2024
5cd4098
chore: bumped version to 2.0.0
jerzy-mankowski Dec 3, 2024
487f7db
feat: added basic video support
jerzy-mankowski Dec 3, 2024
300ded8
feat: merged props parsers into parsePropsToTransformationString
jerzy-mankowski Dec 4, 2024
a54e3b0
feat: added support for angle in videos
jerzy-mankowski Dec 4, 2024
87353a4
feat: added support for rounded corners in videos
jerzy-mankowski Dec 4, 2024
75f086e
fix: brought back support for removeBackground
jerzy-mankowski Dec 4, 2024
0ead7e9
fix: better types for removeBackground
jerzy-mankowski Dec 4, 2024
a73343e
fix: local types for components
jerzy-mankowski Dec 4, 2024
7c77800
fix: moved UnionToIntersection type
jerzy-mankowski Dec 4, 2024
d0c3a54
feat: added support for duration
jerzy-mankowski Dec 4, 2024
85692d1
feat: added support for duration and startOffset
jerzy-mankowski Dec 4, 2024
0e97bf5
feat: added support for videoCodec
jerzy-mankowski Dec 5, 2024
2ca98ed
refactor: reworked removeBackground and height/width; better typing s…
jerzy-mankowski Dec 5, 2024
e3df06a
chore: removed AdvancedVideo file
jerzy-mankowski Dec 5, 2024
aba3a90
chore: removed isImageAssetUrl file
jerzy-mankowski Dec 5, 2024
7a57004
chore: cleanup
jerzy-mankowski Dec 5, 2024
8fa01c6
chore: better IDE types support
jerzy-mankowski Dec 5, 2024
a801295
chore: eslint config fixes
jerzy-mankowski Dec 5, 2024
71733c5
chore: gitignore cleanup
jerzy-mankowski Dec 5, 2024
958b8af
fix: better CloudinaryVideo typing
jerzy-mankowski Dec 5, 2024
8257dab
chore: demo with videos
jerzy-mankowski Dec 5, 2024
d6c062b
fix: removed unnecessary character from VideoCodec transformation
jerzy-mankowski Dec 5, 2024
f8df485
chore: added watch to rollup serve
jerzy-mankowski Dec 9, 2024
6864bdb
feat: added support for g_liquid
jerzy-mankowski Dec 9, 2024
cc85000
fix: renamed resize:thumb-> thumbnail
jerzy-mankowski Dec 9, 2024
be1e486
chore: updated version to alpha
jerzy-mankowski Dec 9, 2024
a176a3d
feat: added g_object parsing
jerzy-mankowski Dec 9, 2024
e771115
feat: changed field name focus -> priority
jerzy-mankowski Dec 9, 2024
2bf9c71
fix: removed type support for thumbnail in videos
jerzy-mankowski Dec 9, 2024
db745de
chore: removed useless test
jerzy-mankowski Dec 9, 2024
3b8b9b6
chore: better typing for parseRemoveBackground
jerzy-mankowski Dec 9, 2024
10bbb79
chore: mistype in comment
jerzy-mankowski Dec 9, 2024
be59296
fix: fixed incorrect % parsing in parseDuration
jerzy-mankowski Dec 9, 2024
b236129
fix: typecheck failing in parseRemoveBackground
jerzy-mankowski Dec 9, 2024
769dba1
fix: aligned npm versions to 16; forcing lerna to use `npm ci`; fix f…
jerzy-mankowski Dec 9, 2024
655204f
chore: added fixme comment
jerzy-mankowski Dec 10, 2024
58369b7
fix: exporting prop types
jerzy-mankowski Dec 10, 2024
e810587
chore: node version bump
jerzy-mankowski Dec 12, 2024
0e79841
feat: basic storybook setup
jerzy-mankowski Dec 12, 2024
5edf3bc
fix: fixed naming inconsistency
jerzy-mankowski Dec 12, 2024
4cee4e5
feat: added video story
jerzy-mankowski Dec 12, 2024
1bbd938
fix: simplified image story;
jerzy-mankowski Dec 12, 2024
0a2e07a
feat: migrated rollup to esbuild
jerzy-mankowski Dec 16, 2024
62539be
fix: eslint config and version adjustments
jerzy-mankowski Dec 16, 2024
05cfa3b
feat: added build step nad upped node version to PR workflow
jerzy-mankowski Dec 16, 2024
5da750b
chore: pr workflow ordering change
jerzy-mankowski Dec 16, 2024
fd64e44
chore: added typecheck and lint scripts to root
jerzy-mankowski Dec 16, 2024
9340396
chore: removed top node version limitation
jerzy-mankowski Dec 16, 2024
4771324
chore: removed continue on error from pr action
jerzy-mankowski Dec 17, 2024
690b29c
feat: added support for imgProps and videoProps
jerzy-mankowski Jan 8, 2025
66b26e8
chore: tsconfig paths placed in compilerOptions
jerzy-mankowski Jan 20, 2025
b456a36
chore: react - main file adjustment
jerzy-mankowski Jan 20, 2025
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
11 changes: 7 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ jobs:
- name: Installing dependencies
run: npm ci

- name: Running tests
run: npm run test
- name: Running typecheck
run: npm run typecheck

- name: Running lint
run: npm run lint

- name: Running typecheck
run: npm run typecheck
- name: Running tests
run: npm run test

- name: Running build
run: npm run build
1 change: 1 addition & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"packages": [
"packages/**/!(dist|playground)*"
],
"npmClient": "npm",
"version": "independent"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"name": "frontend-frameworks-monorepo",
"version": "1.0.0",
"engines": {
"node": ">=14.0.0 <19"
"node": ">=16.0.0"
},
"scripts": {
"postinstall": "husky install",
"install": "lerna bootstrap --ci --hoist @cloudinary/url-gen",
"build": "lerna run build",
"quickstart": "lerna bootstrap && lerna run build",
"test": "lerna run test",
"lint": "lerna run lint",
"typecheck": "lerna run typecheck",
"lint": "lerna run lint",
"build:docs": "node ./scripts/buildDocs.js",
"start:docs": "live-server --open=public/docs",
"update:urlgen": "npm install @cloudinary/url-gen@latest --prefix packages/html && npm install @cloudinary/url-gen@latest --prefix packages/react && npm install @cloudinary/url-gen@latest --prefix packages/vue && npm install @cloudinary/url-gen@latest --prefix packages/angular && npm install @cloudinary/url-gen@latest --prefix packages/angular/projects/cloudinary-library"
Expand Down
1 change: 1 addition & 0 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"repository": "https://github.com/cloudinary/frontend-frameworks",
"sideEffects": false,
"scripts": {
"postinstall": "npm run prepare-version",
"ng": "ng",
"start": "ng serve",
"build": "npm run prepare-version && npm run build --prefix ../html && ng build cloudinary-library --prod",
Expand Down
3 changes: 2 additions & 1 deletion packages/react/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ build/
dist/
node_modules/
.snapshots/
*.min.js
*.min.js
.eslintrc.js
34 changes: 0 additions & 34 deletions packages/react/.eslintrc

This file was deleted.

34 changes: 34 additions & 0 deletions packages/react/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['standard', 'standard-react', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:storybook/recommended'],
env: {
node: true
},
plugins: ['react', '@typescript-eslint'],
parserOptions: {
ecmaVersion: 2020,
ecmaFeatures: {
legacyDecorators: true,
jsx: true
},
project: './tsconfig.json',
},
settings: {
react: {
version: '16'
}
},
rules: {
'space-before-function-paren': 0,
'react/prop-types': 0,
'react/jsx-handler-names': 0,
'react/jsx-fragments': 0,
'react/no-unused-prop-types': 0,
'import/export': 0,
'no-unused-vars': 'off',
semi: 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/switch-exhaustiveness-check': 'error'
}
};
3 changes: 2 additions & 1 deletion packages/react/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
node_modules
.idea
dist
#example/src
playground/node_modules
coverage
src/react-app-env.d.ts
*.tgz

*storybook.log
17 changes: 17 additions & 0 deletions packages/react/.mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
process.env.TS_NODE_COMPILER_OPTIONS = JSON.stringify({
allowJs: true,
module: 'commonjs',
});

process.env.TS_NODE_PREFER_TS_EXTS = 'true';

process.env.NODE_ENV = 'test';
process.env.TZ = 'UTC';

module.exports = {
recursive: true,
parallel: true,
jobs: 3,
timeout: 20000,
require: ['tsconfig-paths/register', 'ts-node/register/transpile-only', 'jsdom-global/register'],
};
8 changes: 8 additions & 0 deletions packages/react/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extensions": ["ts", "tsx"],
"spec": ["**/*.test.*"],
"node-option": [
"experimental-specifier-resolution=node",
"loader=ts-node/esm"
]
}
8 changes: 5 additions & 3 deletions packages/react/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"semi": false,
"jsxSingleQuote": false,
"semi": true,
"tabWidth": 2,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"printWidth": 120,
"arrowParens": "always",
"trailingComma": "none"
"trailingComma": "none",
"proseWrap": "always"
}
21 changes: 21 additions & 0 deletions packages/react/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { StorybookConfig } from '@storybook/react-webpack5';

// const { build } = require("@storybook/core-server");
// const options = {};
// build(options).then(() => console.log("done"));

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-webpack5-compiler-swc',
// '@storybook/addon-onboarding',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/react-webpack5',
options: {}
}
};
export default config;
14 changes: 14 additions & 0 deletions packages/react/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
53 changes: 0 additions & 53 deletions packages/react/__tests__/AdvancedImage.test.tsx

This file was deleted.

Loading
Loading