This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Parse from 'parse/node' | |
import { afterEach, describe, it } from 'mocha' | |
import chai from 'chai' | |
import chaiAsPromised from 'chai-as-promised' | |
import { resetParse, getAdminUser } from '../../../test/parseHelper' | |
import errors from '../../utils/errors' | |
chai.use(chaiAsPromised) | |
const assert = chai.assert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
LayoutRectangle, | |
LayoutChangeEvent, | |
GestureResponderEvent | |
} from "react-native"; | |
import { createContext, useContext } from "react"; | |
import { observable, action, computed } from "mobx"; | |
import { takeWhile, takeRightWhile, sortBy, intersectionBy } from "lodash"; | |
const isOppositeDirectionOf = (dir1: string, dir2: string) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useState } from "react"; | |
import { Animated, Text, View } from "react-native"; | |
import { reaction } from "mobx"; | |
import { observer } from "mobx-react"; | |
const defaultCheckObservedValue = observed => observed.visible; | |
const defaultCreateAnimationIn = animValue => | |
Animated.timing(animValue, { | |
toValue: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tinycolor from "tinycolor2"; | |
import { useColorScheme } from "react-native-appearance"; | |
const primaryColor = "#171520"; | |
const palette = new Array(10).fill(primaryColor).map((color, index) => | |
tinycolor(color) | |
.brighten(index * 10) | |
.toString() | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { FC, useRef } from "react"; | |
import { StyleSheet, Animated, TouchableWithoutFeedback } from "react-native"; | |
import { Text } from "pg-common"; | |
import { useAnimation, useOnMount, scale, delay } from "pg-utils"; | |
import { animations, metrics, colors } from "pg-design"; | |
import { credits } from "pg-config"; | |
const asyncAnimationStart = (anim: Animated.CompositeAnimation) => | |
new Promise(resolve => anim.start(resolve)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PixelRatio, Dimensions } from "react-native"; | |
const isTabletLike = () => { | |
const pixelDensity = PixelRatio.get(); | |
const adjustedWidth = Dimensions.get("screen").width * pixelDensity; | |
const adjustedHeight = Dimensions.get("screen").height * pixelDensity; | |
return ( | |
(pixelDensity < 2 && (adjustedWidth >= 1000 || adjustedHeight >= 1000)) || | |
(pixelDensity === 2 && (adjustedWidth >= 1920 || adjustedHeight >= 1920)) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["f12"], "command": "reindent", "args": {"single_line": false} }, | |
{ "keys": ["ctrl+space"], "command": "auto_complete" }, | |
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context": | |
[ | |
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, | |
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }, | |
{ "key": "setting.tab_completion", "operator": "equal", "operand": true } | |
] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
import React, { Component } from 'react' | |
import { View } from 'react-native-animatable' | |
import metrics from 'src/config/metrics' | |
type Props = { | |
isVisible: boolean, | |
backgroundColor: string, | |
animationTiming?: boolean | |
} |