Skip to content

Commit 0ec5ef5

Browse files
committed
Squashed commit of the following:
commit be86f3e Author: Youssef Henna <[email protected]> Date: Sun Jun 11 12:48:31 2023 +0300 Indeterminte override min and max values commit 2120226 Author: Youssef Henna <[email protected]> Date: Sun Jun 11 12:41:50 2023 +0300 added comment to reanimated import commit 5d59586 Author: Youssef Henna <[email protected]> Date: Sun Jun 11 12:34:24 2023 +0300 Remove duplicated comment commit a679578 Author: Youssef Henna <[email protected]> Date: Sun Jun 11 12:15:27 2023 +0300 Update reanimated import commit 265e44c Author: Youssef Henna <[email protected]> Date: Sun Jun 11 11:59:33 2023 +0300 updates commit 7636b35 Author: Youssef Henna <[email protected]> Date: Sun Jun 11 11:41:51 2023 +0300 Update imports commit 55ee080 Author: Youssef Henna <[email protected]> Date: Sun Jun 11 11:40:31 2023 +0300 Revert "Updated babel configs" This reverts commit 42b84d9. commit 2c416b4 Author: Youssef Henna <[email protected]> Date: Sun Jun 11 11:40:27 2023 +0300 Revert "yarn.lock" This reverts commit 7200f6d. commit 7200f6d Author: Youssef Henna <[email protected]> Date: Sun Jun 11 11:26:19 2023 +0300 yarn.lock commit 42b84d9 Author: Youssef Henna <[email protected]> Date: Sun Jun 11 11:20:03 2023 +0300 Updated babel configs commit 2a0fc8e Author: Youssef Henna <[email protected]> Date: Sun Jun 11 10:59:14 2023 +0300 Transparent fill color commit a251ab8 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 21:56:44 2023 +0300 Change location of reanimated fix commit ee02f6f Author: Youssef Henna <[email protected]> Date: Thu Jun 8 21:24:46 2023 +0300 Default transparent fill to circular progress commit a648c53 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 21:18:16 2023 +0300 Add workaround for global.__reanimatedWorkletInit not defined issue commit e5e2efc Author: Youssef Henna <[email protected]> Date: Thu Jun 8 21:08:06 2023 +0300 Add reanimated import to 'ui' commit 8c585c2 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 20:53:44 2023 +0300 Add reanimated to 'ui' commit 680a381 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 20:47:23 2023 +0300 Revert "Update 'ui' babel config" This reverts commit ca2bb78. commit 3f9571a Author: Youssef Henna <[email protected]> Date: Thu Jun 8 20:46:33 2023 +0300 Start with animation + trasnparent fill circle commit ca2bb78 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 20:38:50 2023 +0300 Update 'ui' babel config commit 711a147 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 20:21:36 2023 +0300 Remove ignore tests in babel config commit a5dbd5b Author: Youssef Henna <[email protected]> Date: Thu Jun 8 20:00:27 2023 +0300 Revert "Add logs" This reverts commit 4a3458d. commit c8cf8f4 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 20:00:10 2023 +0300 Use babel to compile packages commit b0f5252 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 19:27:16 2023 +0300 Revert "Use componet directly" This reverts commit f005975. commit f005975 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 19:02:29 2023 +0300 Use componet directly commit d3bc204 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 18:21:51 2023 +0300 Revert "Reanimated as peer depenendy to ui" This reverts commit 1bc9bca. commit 8cd308f Author: Youssef Henna <[email protected]> Date: Thu Jun 8 18:21:32 2023 +0300 Revert "Reanimated as peer depenendy" This reverts commit a27b4e8. commit 6acb9c3 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 15:13:52 2023 +0300 Revert "mock __reanimatedWorkletInit" This reverts commit 61225f3. commit 61225f3 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 15:04:17 2023 +0300 mock __reanimatedWorkletInit commit 1bc9bca Author: Youssef Henna <[email protected]> Date: Thu Jun 8 14:49:43 2023 +0300 Reanimated as peer depenendy to ui commit a27b4e8 Author: Youssef Henna <[email protected]> Date: Thu Jun 8 14:31:47 2023 +0300 Reanimated as peer depenendy commit 4a3458d Author: Youssef Henna <[email protected]> Date: Thu Jun 8 14:27:54 2023 +0300 Add logs
1 parent 8ed987f commit 0ec5ef5

File tree

19 files changed

+455
-272
lines changed

19 files changed

+455
-272
lines changed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
"packages/*"
3636
],
3737
"devDependencies": {
38+
"@babel/cli": "^7.21.5",
39+
"@babel/core": "^7.22.1",
40+
"@babel/preset-env": "^7.22.4",
41+
"@babel/preset-typescript": "^7.21.5",
3842
"@react-native-community/eslint-config": "^3.2.0",
3943
"@testing-library/jest-native": "^5.4.2",
4044
"@testing-library/react-native": "^12.1.2",
@@ -47,8 +51,8 @@
4751
"expo-yarn-workspaces": "^2.0.0",
4852
"husky": ">=6",
4953
"jest": "^29.5.0",
50-
"jest-expo": "^48.0.2",
5154
"jest-environment-jsdom": "^29.5.0",
55+
"jest-expo": "^48.0.2",
5256
"json-server": "^0.16.3",
5357
"lerna": "^5.6.2",
5458
"lint-staged": ">=13",

packages/core/babel.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
22
presets: ["module:metro-react-native-babel-preset"],
3-
plugins: ["react-native-reanimated/plugin"],
3+
plugins: [
4+
"@babel/plugin-proposal-export-namespace-from",
5+
"react-native-reanimated/plugin",
6+
],
47
};

packages/core/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
"name": "@draftbit/core",
33
"version": "47.5.1",
44
"description": "Core (non-native) Components",
5-
"main": "lib/src/index.js",
6-
"types": "lib/src/index.d.ts",
7-
"react-native": "src/index.tsx",
5+
"main": "lib/commonjs/index.js",
6+
"types": "lib/typescript/src/index.d.ts",
87
"files": [
98
"src",
109
"lib",
@@ -15,7 +14,8 @@
1514
"scripts": {
1615
"clean": "rimraf lib",
1716
"clean:modules": "rimraf node_modules",
18-
"build": "yarn clean && yarn tsc",
17+
"build:commonjs": "../../node_modules/.bin/babel src --out-dir lib/commonjs --extensions .tsx,.ts,.js,.jsx",
18+
"build": "yarn clean && yarn build:commonjs && yarn tsc",
1919
"test": "jest",
2020
"test:coverage": "jest --coverage"
2121
},
@@ -71,6 +71,8 @@
7171
"react-youtube": "^10.1.0"
7272
},
7373
"devDependencies": {
74+
"@babel/plugin-proposal-class-properties": "^7.18.6",
75+
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
7476
"@types/color": "^3.0.1",
7577
"@types/dateformat": "^3.0.1",
7678
"@types/lodash.isnumber": "^3.0.6",

packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const CircularProgress: React.FC<
8080
}, [startPosition]);
8181

8282
const currentFillPercentage = value / (maximumValue + minimumValue);
83-
const currentAngle = useSharedValue(startAngle + currentFillPercentage * 360);
83+
const currentAngle = useSharedValue(startAngle);
8484

8585
const progressPathAnimatedProps = useAnimatedProps<PathProps>(() => {
8686
const isBelowMinAngle = currentAngle.value <= startAngle;
@@ -144,6 +144,7 @@ export const CircularProgress: React.FC<
144144
strokeLinecap={trackLineCap}
145145
strokeDasharray={trackCustomDashArray || trackDashArray}
146146
strokeDashoffset={trackDashOffset}
147+
fill={"rgba(0,0,0,0)"} //Prevents default black fill
147148
/>
148149
)}
149150
<AnimatedPath
@@ -153,6 +154,7 @@ export const CircularProgress: React.FC<
153154
strokeLinecap={lineCap}
154155
strokeDasharray={customDashArray || dashArray}
155156
strokeDashoffset={dashOffset}
157+
fill={"rgba(0,0,0,0)"}
156158
onPress={() => {}} //Addresses reanimated issue with SVG (https://github.com/software-mansion/react-native-reanimated/issues/3321#issuecomment-1256983430)
157159
/>
158160
</Svg>

packages/core/src/components/Progress/IndeterminateProgress.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const IndeterminateProgress: React.FC<IndeterminateProgressProps> = ({
6666
dashGap={pathWidth / 2}
6767
dashWidth={pathWidth / 2}
6868
animationDuration={animationDuration}
69+
minimumValue={0}
70+
maximumValue={100}
6971
value={100}
7072
/>
7173
);

packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ export const LinearProgress: React.FC<ValueProgressProps> = ({
5858
const trackProgressLineWidth = svgContainerWidth - thicknessOffset;
5959

6060
const currentFillPercentage = value / (maximumValue + minimumValue);
61-
const currentProgressLineWidth = useSharedValue(
62-
currentFillPercentage * progressLineWidth
63-
);
61+
const currentProgressLineWidth = useSharedValue(0);
6462

6563
const progressLineAnimatedProps = useAnimatedProps<LineProps>(() => {
6664
const isBelowMinWidth = currentProgressLineWidth.value <= thicknessOffset;

packages/core/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"extends": "../../tsconfig.json",
33
"references": [{ "path": "../types" }],
44
"compilerOptions": {
5-
"outDir": "./lib/"
5+
"outDir": "./lib/typescript"
66
}
77
}

packages/maps/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ["module:metro-react-native-babel-preset"],
3+
};

packages/maps/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
"name": "@draftbit/maps",
33
"version": "47.5.1",
44
"description": "Map Components",
5-
"main": "lib/src/index.js",
6-
"types": "lib/src/index.d.ts",
7-
"react-native": "src/index.tsx",
5+
"main": "lib/commonjs/index.js",
6+
"types": "lib/typescript/src/index.d.ts",
87
"files": [
98
"src",
109
"lib",
@@ -15,7 +14,8 @@
1514
"scripts": {
1615
"clean": "rimraf lib",
1716
"clean:modules": "rimraf node_modules",
18-
"build": "yarn clean && yarn tsc",
17+
"build:commonjs": "../../node_modules/.bin/babel src --out-dir lib/commonjs --extensions .tsx,.ts,.js,.jsx",
18+
"build": "yarn clean && yarn build:commonjs && yarn tsc",
1919
"test": "jest",
2020
"test:coverage": "jest --coverage"
2121
},

packages/maps/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "./lib/"
4+
"outDir": "./lib/typescript"
55
}
66
}

0 commit comments

Comments
 (0)