Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/renovate/flow-bin-0.x' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobolt committed Nov 7, 2022
2 parents 0a92e0a + c411b7b commit 0e3af57
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 55 deletions.
26 changes: 13 additions & 13 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file modified .yarn/sdks/flow-bin/cli.js
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .yarn/sdks/flow-bin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "flow-bin",
"version": "0.176.3-sdk",
"version": "0.183.0-sdk",
"type": "commonjs"
}
10 changes: 5 additions & 5 deletions .yarn/sdks/integrations.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!

integrations:
- vscode
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!

integrations:
- vscode
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-storybook": "0.6.4",
"execa": "6.1.0",
"flow-bin": "0.176.3",
"flow-bin": "0.183.0",
"flow-typed": "3.8.0",
"glob": "7.2.3",
"http-server": "14.1.1",
Expand Down Expand Up @@ -151,7 +151,7 @@
"slash": "3.0.0",
"source-map-loader": "4.0.0",
"styled-components": "5.3.5",
"styled-components-theme-connector": "0.1.7",
"styled-components-theme-connector": "0.1.8",
"stylelint": "14.11.0",
"stylelint-config-standard-scss": "5.0.0",
"stylelint-config-styled-components": "0.1.1",
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified shared/flow-deps/.yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion shared/flow-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"packageManager": "[email protected]",
"dependencies": {
"raf-schd": "4.0.3",
"styled-components-theme-connector": "0.1.7"
"styled-components-theme-connector": "0.1.8"
}
}
14 changes: 7 additions & 7 deletions shared/flow-deps/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ __metadata:
resolution: "flow-deps@workspace:."
dependencies:
raf-schd: 4.0.3
styled-components-theme-connector: 0.1.7
styled-components-theme-connector: 0.1.8
languageName: unknown
linkType: soft

Expand All @@ -28,15 +28,15 @@ __metadata:
languageName: node
linkType: hard

"styled-components-theme-connector@npm:0.1.7":
version: 0.1.7
resolution: "styled-components-theme-connector@npm:0.1.7"
"styled-components-theme-connector@npm:0.1.8":
version: 0.1.8
resolution: "styled-components-theme-connector@npm:0.1.8"
dependencies:
lodash: 4.17.21
peerDependencies:
react: ^17.0.2
react-dom: ^17.0.2
react: ^17.0.2 || ^18.0.0
react-dom: ^17.0.2 || ^18.0.0
styled-components: ^5.2.5
checksum: d15adec7c6637e2efbb033ae1936cffed16b572695605f2cb93e7204003ee5a256ea39ca6f49d9fccf839af406722eac25821cc7749ccdaa7ef4362eb168bf04
checksum: 828bbf2e3000875515bf231dd1264da5ee53564e43fa5c6e61af2fb6e458251251ff2ebaead5ef1c31000a7174b29b91832430e49a9a03d3b3c9ac12e509cb67
languageName: node
linkType: hard
23 changes: 10 additions & 13 deletions src/PieMenu.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@ export const PieCenter = (connectTheme('pieMenu.center')('div'): React.Component
const inputMoveEvents = ['touchmove', 'mousemove'];
const selectEvents = ['mouseup', 'touchend'];

const bindEvents = (events, listener) => events
// $FlowFixMe[speculation-ambiguous]
const bindEvents = (events: string[], listener: any) => events
.forEach(event => document
// $FlowFixMe[incompatible-call]
.addEventListener(event, listener, { pasive: false, cancelable: true, capture: true }));

const unbindEvents = (events, listener) => events
// $FlowFixMe[speculation-ambiguous]
const unbindEvents = (events: string[], listener: any) => events
.forEach(event => document.removeEventListener(event, listener));

type Metadata = {
Expand All @@ -32,7 +29,7 @@ type Metadata = {

export type Props = {
containerId: string,
slices: { itemId: string, slice: React.Node[] }[],
slices: { itemId: string, slice: React.Element<any> }[],
startOffsetAngle?: number,
polar: boolean,
Center?: React.ComponentType<any>,
Expand Down Expand Up @@ -69,7 +66,7 @@ const PieMenu = ({
return centerArea <= distance && distance <= pieArea;
};

const getItemAt = (x, y) => {
const getItemAt = (x: number, y: number) => {
if (!isInsidePie(x, y)) return null;
const elements = document.elementsFromPoint(x, y);
for (let i = 0; i < elements.length; i += 1) {
Expand All @@ -81,11 +78,11 @@ const PieMenu = ({
};

React.useEffect(() => {
const captureActiveSlice = rafSchedule(e => {
const captureActiveSlice = rafSchedule((e: MouseEvent & TouchEvent) => {
if (!ref.current) return;
const x = (e.pageX !== undefined ? e.pageX : (e: TouchEvent).touches[0].clientX)
const x = (e.pageX !== undefined ? e.pageX : e.touches[0].clientX)
- window.pageXOffset;
const y = (e.pageY !== undefined ? e.pageY : (e: TouchEvent).touches[0].clientY)
const y = (e.pageY !== undefined ? e.pageY : e.touches[0].clientY)
- window.pageYOffset;
if (x > -1 && y > -1) {
const item = getItemAt(x, y);
Expand All @@ -96,10 +93,10 @@ const PieMenu = ({
setActiveSlice(null);
}
});
const selectActiveSlice = e => {
const selectActiveSlice = (e: MouseEvent & TouchEvent) => {
if (!ref.current) return;
const x = e.pageX || (e: TouchEvent).changedTouches[0].clientX;
const y = e.pageY || (e: TouchEvent).changedTouches[0].clientY;
const x = e.pageX || e.changedTouches[0].clientX;
const y = e.pageY || e.changedTouches[0].clientY;
if (x > -1 && y > -1) {
const item = getItemAt(x, y);
if (item && item.childNodes.length) {
Expand Down
2 changes: 1 addition & 1 deletion src/Slice/Slice.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Slice = ({
attrs = {},
}: Props) => {
const { context: { active } } = React.useContext(ThemeContext);
const getCallback = callback => (active ? callback : undefined);
const getCallback = (callback: Callback) => (active ? callback : undefined);
return (
<Component
{...attrs}
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11984,12 +11984,12 @@ __metadata:
languageName: node
linkType: hard

"flow-bin@npm:0.176.3":
version: 0.176.3
resolution: "flow-bin@npm:0.176.3"
"flow-bin@npm:0.183.0":
version: 0.183.0
resolution: "flow-bin@npm:0.183.0"
bin:
flow: cli.js
checksum: 00b9ca55f245d6d73e57459fddd4ef832af7205dbe94e4af00ef21c39a832503cb98221bfd3acf65abe5fb4acb09993ffdef02d4e96433ba14be09dc5b464b9b
checksum: b9e0792ee425b12cbd9900db1bb7391f4e32d0812655f8018b14d1b060a359fe84e140d86a253ba1a80817e0e78fff42ea6b29849ee807b793ba6c04444ff171
languageName: node
linkType: hard

Expand Down Expand Up @@ -18054,7 +18054,7 @@ __metadata:
eslint-plugin-react-hooks: 4.6.0
eslint-plugin-storybook: 0.6.4
execa: 6.1.0
flow-bin: 0.176.3
flow-bin: 0.183.0
flow-typed: 3.8.0
glob: 7.2.3
http-server: 14.1.1
Expand Down Expand Up @@ -18083,7 +18083,7 @@ __metadata:
slash: 3.0.0
source-map-loader: 4.0.0
styled-components: 5.3.5
styled-components-theme-connector: 0.1.7
styled-components-theme-connector: 0.1.8
stylelint: 14.11.0
stylelint-config-standard-scss: 5.0.0
stylelint-config-styled-components: 0.1.1
Expand Down Expand Up @@ -19955,16 +19955,16 @@ __metadata:
languageName: node
linkType: hard

"styled-components-theme-connector@npm:0.1.7":
version: 0.1.7
resolution: "styled-components-theme-connector@npm:0.1.7"
"styled-components-theme-connector@npm:0.1.8":
version: 0.1.8
resolution: "styled-components-theme-connector@npm:0.1.8"
dependencies:
lodash: 4.17.21
peerDependencies:
react: ^17.0.2
react-dom: ^17.0.2
react: ^17.0.2 || ^18.0.0
react-dom: ^17.0.2 || ^18.0.0
styled-components: ^5.2.5
checksum: d15adec7c6637e2efbb033ae1936cffed16b572695605f2cb93e7204003ee5a256ea39ca6f49d9fccf839af406722eac25821cc7749ccdaa7ef4362eb168bf04
checksum: 828bbf2e3000875515bf231dd1264da5ee53564e43fa5c6e61af2fb6e458251251ff2ebaead5ef1c31000a7174b29b91832430e49a9a03d3b3c9ac12e509cb67
languageName: node
linkType: hard

Expand Down

0 comments on commit 0e3af57

Please sign in to comment.