diff --git a/.firebase/hosting.YnVpbGQ.cache b/.firebase/hosting.YnVpbGQ.cache new file mode 100644 index 00000000..d1fe3b38 --- /dev/null +++ b/.firebase/hosting.YnVpbGQ.cache @@ -0,0 +1,18 @@ +favicon.ico,1591988602000,12c77055696278694a8feb77a9421dd85f8af25a81d812822be112e4be628fcf +github-icon.svg,1591988602000,c0af81355c00e551a44497c9a02d232ece8fcf0c6e7850809b6d0ab94769d50c +ig-icon.svg,1591988602000,135d9239b7e214b58c5dc1e66153d62a7020d145ef0305bba198294a1cb54ae6 +index.html,1591988602000,bc56b924fd91469b71bd4240f43c2f9d64118c284c12aee19b4938ce85f84115 +linkedin-icon.svg,1591988602000,648a9ac3627cf9018dc3aa0b8ef74edcea2f9a5df1957d2196c8c7a7bbf77754 +personal-icon.svg,1591988602000,cf3af5f917bedcbe07dc0c8cb37a9e69c3f954d56bf980057a31e6ad54126449 +robots.txt,1591988602000,2544ca049f223a42bff01f72ad930a5edba75bbb7199d0f8430a02ff5aca16ec +twitter-icon.svg,1591988602000,347e6560fbda375ad29a563ec0ed8a37f77c2cb1894b06f91c30a8e6ed5409e9 +up-icon.svg,1591988602000,a9d3df26b9f5bc7dc081f1cd17bc2e8ce8b7c1150e53ba71e0401be76a458999 +__snowpack__/env.js,1591988602000,1d1dbb381f9b947445d25149d947ba44e5caea73c4c266e433204b076e56cd8c +js/bundle-0d765c9988f643d1b0bb.js.LICENSE.txt,1591988602000,709256af082b4849ab1027d627978fd0eaa3a3713bf0f6d7ca428e06b62caa9f +iso-bold.woff,1591988602000,89ca7fa2e8df3df17d38bccabd0ea289c166f241e1685761fda906ed70289bdf +iso-black.woff,1591988602000,74d87b403fe97d10edc3419da0cc9cd3353357bf7a271a2560dca5cc42519def +iso-regular.woff,1591988602000,d0e3eff9ffcbbd00c9e54f225c0bcf36edfedfdb9f9a05633616a7d4b25d081c +sample-photo.png,1591988602000,7b5f5cf23cf6d11d9d2be32a48d0f586abfada94a04829692581fd18cea8a50b +css/style-0d765c9988f643d1b0bb.css,1591988602000,2720d86c22eaa5830ac2f7bc6bd0222da1aba7b2b073c6d16070bd071e9278de +js/bundle-0d765c9988f643d1b0bb.js,1591988602000,4b82a042696d9df73a5eaa980171c445d6d2888219d51eb0eb6cc7e3e36a5126 +fish.svg,1591988602000,1cef12be60db4901818a0d9626d34248a13d7449d348d51dbcf71cf246f539fd diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/.glitch-assets b/.glitch-assets new file mode 100644 index 00000000..e69de29b diff --git a/.pm2/module_conf.json b/.pm2/module_conf.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/.pm2/module_conf.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.pm2/touch b/.pm2/touch new file mode 100644 index 00000000..6ba42da2 --- /dev/null +++ b/.pm2/touch @@ -0,0 +1 @@ +1603065323401 \ No newline at end of file diff --git a/.snowpack/.snowpack/types/canvas-confetti/index.d.ts b/.snowpack/.snowpack/types/canvas-confetti/index.d.ts new file mode 100644 index 00000000..aba40ef7 --- /dev/null +++ b/.snowpack/.snowpack/types/canvas-confetti/index.d.ts @@ -0,0 +1,141 @@ +// Type definitions for canvas-confetti 1.3 +// Project: https://github.com/catdad/canvas-confetti#readme +// Definitions by: Martin Tracey +// Josh Batley +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * `confetti` takes a single optional object. When `window.Promise` is available, it will return a Promise to let you know when it is done. When promises are not available (like in IE), it will return + * `null`. You can polyfill promises using any of the popular polyfills. You can also provide a custom promise implementation to `confetti` through: + * + * `const MyPromise = require('some-promise-lib'); + * const confetti = require('canvas-confetti'); + * confetti.Promise = MyPromise;` + * + * If you call `confetti` multiple times before it is done, it + * will return the same promise every time. Internally, the same canvas element will be reused, continuing the existing animation with the new confetti added. The promise returned by each call to + * `confetti` will resolve once all animations are done. + * + */ +declare function confetti(options?: confetti.Options): Promise | null; + +declare namespace confetti { + /** + * You can polyfill promises using any of the popular polyfills. You can also provide a promise implementation to `confetti` through this property. + */ + let Promise: any; + + type shape = 'square' | 'circle'; + + interface Options { + /** + * The number of confetti to launch. More is always fun... but be cool, there's a lot of math involved. + * @default 50 + */ + particleCount?: number; + /** + * The angle in which to launch the confetti, in degrees. 90 is straight up. + * @default 90 + */ + angle?: number; + /** + * How far off center the confetti can go, in degrees. 45 means the confetti will launch at the defined angle plus or minus 22.5 degrees. + * @default 45 + */ + spread?: number; + /** + * How fast the confetti will start going, in pixels. + * @default 45 + */ + startVelocity?: number; + /** + * How quickly the confetti will lose speed. Keep this number between 0 and 1, otherwise the confetti will gain speed. Better yet, just never change it. + * @default 0.9 + */ + decay?: number; + /** + * How many times the confetti will move. This is abstract... but play with it if the confetti disappear too quickly for you. + * @default 200 + */ + ticks?: number; + /** + * Where to start firing confetti from. Feel free to launch off-screen if you'd like. + */ + origin?: Origin; + /** + * An array of color strings, in the HEX format... you know, like #bada55. + */ + colors?: string[]; + /** + * The possible values are square and circle. The default is to use both shapes in an even mix. + * @default ['square','circle'] + */ + shapes?: shape[]; + /** + * The confetti should be on top, after all. But if you have a crazy high page, you can set it even higher. + * @default 100 + */ + zIndex?: number; + /** + * Scale factor for each confetti particle. Use decimals to make the confetti smaller. + * @default 1 + */ + scalar?: number; + /** + * How quickly the particles are pulled down. 1 is full gravity, 0.5 is half gravity, etc., but there are no limits. + * @default 1 + */ + gravity?: number; + /** + * Disables confetti entirely for users that prefer reduced motion. The confetti() promise will resolve immediately in this case. + * @default false + */ + disableForReducedMotion?: boolean; + } + + interface Origin { + /** + * The x position on the page, with 0 being the left edge and 1 being the right edge. + * @default 0.5 + */ + x?: number; + /** + * The y position on the page, with 0 being the left edge and 1 being the right edge. + * @default 0.5 + */ + y?: number; + } + + interface GlobalOptions { + /** + * Whether to allow setting the canvas image size, as well as keep it correctly sized if the window changes size + * @default false + */ + resize?: boolean; + /** + * Whether to use an asynchronous web worker to render the confetti animation, whenever possible + * @default false + */ + useWorker?: boolean; + } + + /** + * Stops the animation and clears all confetti, as well as immediately resolves any outstanding promises. + */ + type Reset = () => void; + function reset(): Reset; + + interface CreateTypes { + (options?: Options): () => Promise | null; + reset: Reset; + } + /** + * This method creates an instance of the confetti function that uses a custom canvas. + */ + function create( + canvas: HTMLCanvasElement, + options?: GlobalOptions + ): CreateTypes; +} + +export = confetti; diff --git a/.snowpack/.snowpack/types/canvas-confetti/package.json b/.snowpack/.snowpack/types/canvas-confetti/package.json new file mode 100644 index 00000000..60bc5bb0 --- /dev/null +++ b/.snowpack/.snowpack/types/canvas-confetti/package.json @@ -0,0 +1 @@ +{"types": "index.d.ts"} \ No newline at end of file diff --git a/.snowpack/.snowpack/types/react-dom/experimental.d.ts b/.snowpack/.snowpack/types/react-dom/experimental.d.ts new file mode 100644 index 00000000..0aa652c5 --- /dev/null +++ b/.snowpack/.snowpack/types/react-dom/experimental.d.ts @@ -0,0 +1,87 @@ +/** + * These are types for things that are present in the `experimental` builds of React but not yet + * on a stable build. + * + * Once they are promoted to stable they can just be moved to the main index file. + * + * To load the types declared here in an actual project, there are three ways. The easiest one, + * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, + * is to add `"react-dom/experimental"` to the `"types"` array. + * + * Alternatively, a specific import syntax can to be used from a typescript file. + * This module does not exist in reality, which is why the {} is important: + * + * ```ts + * import {} from 'react-dom/experimental' + * ``` + * + * It is also possible to include it through a triple-slash reference: + * + * ```ts + * /// + * ``` + * + * Either the import or the reference only needs to appear once, anywhere in the project. + */ + +// See https://github.com/facebook/react/blob/master/packages/react-dom/src/client/ReactDOM.js to see how the exports are declared, +// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are +// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`. + +import React = require('react'); +import ReactDOM = require('.'); + +export {}; + +declare module '.' { + // enableSuspenseServerRenderer feature + interface HydrationOptions { + onHydrated?(suspenseInstance: Comment): void; + onDeleted?(suspenseInstance: Comment): void; + } + + // exposeConcurrentModeAPIs features + + interface RootOptions { + hydrate?: boolean; + hydrationOptions?: HydrationOptions; + } + + interface Root { + render(children: React.ReactChild | React.ReactNodeArray, callback?: () => void): void; + unmount(callback?: () => void): void; + } + + /** + * Replaces `ReactDOM.render` when the `.render` method is called and enables Blocking Mode. + * + * Opting into Concurrent Mode introduces semantic changes to how React works. + * This means that you can’t use Concurrent Mode in just a few components. + * Because of this, some apps may not be able to migrate directly to Concurrent Mode. + * Blocking Mode only contains a small subset of Concurrent Mode features and is intended + * as an intermediary migration step for apps that are unable to migrate directly. + * + * @see https://reactjs.org/docs/concurrent-mode-adoption.html#migration-step-blocking-mode + * @see https://reactjs.org/docs/concurrent-mode-reference.html#createblockingroot + */ + function unstable_createBlockingRoot( + container: Element | Document | DocumentFragment | Comment, + options?: RootOptions, + ): Root; + + /** + * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode. + * + * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot + */ + function unstable_createRoot(container: Element | Document | DocumentFragment | Comment, options?: RootOptions): Root; + + function unstable_flushControlled(callback: () => void): void; + + // enableSelectiveHydration feature + + /** + * @see https://github.com/facebook/react/commit/3a2b5f148d450c69aab67f055fc441d294c23518 + */ + function unstable_scheduleHydration(target: Element | Document | DocumentFragment | Comment): void; +} diff --git a/.snowpack/.snowpack/types/react-dom/index.d.ts b/.snowpack/.snowpack/types/react-dom/index.d.ts new file mode 100644 index 00000000..f1550655 --- /dev/null +++ b/.snowpack/.snowpack/types/react-dom/index.d.ts @@ -0,0 +1,98 @@ +// Type definitions for React (react-dom) 17.0 +// Project: https://reactjs.org +// Definitions by: Asana +// AssureSign +// Microsoft +// MartynasZilinskas +// Josh Rutherford +// Jessica Franco +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +// NOTE: Users of the `experimental` builds of React should add a reference +// to 'react-dom/experimental' in their project. See experimental.d.ts's top comment +// for reference and documentation on how exactly to do it. + +export as namespace ReactDOM; + +import { + ReactInstance, Component, ComponentState, + ReactElement, SFCElement, CElement, + DOMAttributes, DOMElement, ReactNode, ReactPortal +} from 'react'; + +export function findDOMNode(instance: ReactInstance | null | undefined): Element | null | Text; +export function unmountComponentAtNode(container: Element | DocumentFragment): boolean; + +export function createPortal(children: ReactNode, container: Element, key?: null | string): ReactPortal; + +export const version: string; +export const render: Renderer; +export const hydrate: Renderer; + +export function unstable_batchedUpdates(callback: (a: A, b: B) => any, a: A, b: B): void; +export function unstable_batchedUpdates(callback: (a: A) => any, a: A): void; +export function unstable_batchedUpdates(callback: () => any): void; + +export function unstable_renderSubtreeIntoContainer( + parentComponent: Component, + element: DOMElement, T>, + container: Element, + callback?: (element: T) => any): T; +export function unstable_renderSubtreeIntoContainer>( + parentComponent: Component, + element: CElement, + container: Element, + callback?: (component: T) => any): T; +export function unstable_renderSubtreeIntoContainer

( + parentComponent: Component, + element: ReactElement

, + container: Element, + callback?: (component?: Component | Element) => any): Component | Element | void; + +export interface Renderer { + // Deprecated(render): The return value is deprecated. + // In future releases the render function's return type will be void. + + ( + element: DOMElement, T>, + container: Element | DocumentFragment | null, + callback?: () => void + ): T; + + ( + element: Array, any>>, + container: Element | DocumentFragment | null, + callback?: () => void + ): Element; + + ( + element: SFCElement | Array>, + container: Element | DocumentFragment | null, + callback?: () => void + ): void; + + >( + element: CElement, + container: Element | DocumentFragment | null, + callback?: () => void + ): T; + + ( + element: Array>>, + container: Element | DocumentFragment | null, + callback?: () => void + ): Component; + +

( + element: ReactElement

, + container: Element | DocumentFragment | null, + callback?: () => void + ): Component | Element | void; + + ( + element: ReactElement[], + container: Element | DocumentFragment | null, + callback?: () => void + ): Component | Element | void; +} diff --git a/.snowpack/.snowpack/types/react-dom/node-stream/index.d.ts b/.snowpack/.snowpack/types/react-dom/node-stream/index.d.ts new file mode 100644 index 00000000..480392aa --- /dev/null +++ b/.snowpack/.snowpack/types/react-dom/node-stream/index.d.ts @@ -0,0 +1,18 @@ +import { ReactElement } from 'react'; + +/** + * Render a ReactElement to its initial HTML. This should only be used on the + * server. + * See https://facebook.github.io/react/docs/react-dom-stream.html#rendertostream + */ +export function renderToStream(element: ReactElement): any; + +/** + * Similar to renderToStream, except this doesn't create extra DOM attributes + * such as data-react-id that React uses internally. + * See https://facebook.github.io/react/docs/react-dom-stream.html#rendertostaticstream + */ +export function renderToStaticStream(element: ReactElement): any; +export const version: string; + +export as namespace ReactDOMNodeStream; diff --git a/.snowpack/.snowpack/types/react-dom/package.json b/.snowpack/.snowpack/types/react-dom/package.json new file mode 100644 index 00000000..60bc5bb0 --- /dev/null +++ b/.snowpack/.snowpack/types/react-dom/package.json @@ -0,0 +1 @@ +{"types": "index.d.ts"} \ No newline at end of file diff --git a/.snowpack/.snowpack/types/react-dom/server/index.d.ts b/.snowpack/.snowpack/types/react-dom/server/index.d.ts new file mode 100644 index 00000000..97747165 --- /dev/null +++ b/.snowpack/.snowpack/types/react-dom/server/index.d.ts @@ -0,0 +1,47 @@ +// forward declarations +declare global { + namespace NodeJS { + // tslint:disable-next-line:no-empty-interface + interface ReadableStream {} + } +} + +import { ReactElement } from 'react'; + +/** + * Render a React element to its initial HTML. This should only be used on the server. + * React will return an HTML string. You can use this method to generate HTML on the server + * and send the markup down on the initial request for faster page loads and to allow search + * engines to crawl your pages for SEO purposes. + * + * If you call `ReactDOM.hydrate()` on a node that already has this server-rendered markup, + * React will preserve it and only attach event handlers, allowing you + * to have a very performant first-load experience. + */ +export function renderToString(element: ReactElement): string; + +/** + * Render a React element to its initial HTML. Returns a Readable stream that outputs + * an HTML string. The HTML output by this stream is exactly equal to what + * `ReactDOMServer.renderToString()` would return. + */ +export function renderToNodeStream(element: ReactElement): NodeJS.ReadableStream; + +/** + * Similar to `renderToString`, except this doesn't create extra DOM attributes + * such as `data-reactid`, that React uses internally. This is useful if you want + * to use React as a simple static page generator, as stripping away the extra + * attributes can save lots of bytes. + */ +export function renderToStaticMarkup(element: ReactElement): string; + +/** + * Similar to `renderToNodeStream`, except this doesn't create extra DOM attributes + * such as `data-reactid`, that React uses internally. The HTML output by this stream + * is exactly equal to what `ReactDOMServer.renderToStaticMarkup()` would return. + */ +export function renderToStaticNodeStream(element: ReactElement): NodeJS.ReadableStream; + +export const version: string; + +export as namespace ReactDOMServer; diff --git a/.snowpack/.snowpack/types/react-dom/test-utils/index.d.ts b/.snowpack/.snowpack/types/react-dom/test-utils/index.d.ts new file mode 100644 index 00000000..781d406d --- /dev/null +++ b/.snowpack/.snowpack/types/react-dom/test-utils/index.d.ts @@ -0,0 +1,307 @@ +import { + AbstractView, Component, ComponentClass, + ReactElement, ReactInstance, ClassType, + DOMElement, SFCElement, CElement, + ReactHTMLElement, DOMAttributes, SFC +} from 'react'; + +import * as ReactTestUtils from "."; + +export {}; + +export interface OptionalEventProperties { + bubbles?: boolean; + cancelable?: boolean; + currentTarget?: EventTarget; + defaultPrevented?: boolean; + eventPhase?: number; + isTrusted?: boolean; + nativeEvent?: Event; + preventDefault?(): void; + stopPropagation?(): void; + target?: EventTarget; + timeStamp?: Date; + type?: string; +} + +export interface SyntheticEventData extends OptionalEventProperties { + altKey?: boolean; + button?: number; + buttons?: number; + clientX?: number; + clientY?: number; + changedTouches?: TouchList; + charCode?: number; + clipboardData?: DataTransfer; + ctrlKey?: boolean; + deltaMode?: number; + deltaX?: number; + deltaY?: number; + deltaZ?: number; + detail?: number; + getModifierState?(key: string): boolean; + key?: string; + keyCode?: number; + locale?: string; + location?: number; + metaKey?: boolean; + pageX?: number; + pageY?: number; + relatedTarget?: EventTarget; + repeat?: boolean; + screenX?: number; + screenY?: number; + shiftKey?: boolean; + targetTouches?: TouchList; + touches?: TouchList; + view?: AbstractView; + which?: number; +} + +export type EventSimulator = (element: Element | Component, eventData?: SyntheticEventData) => void; + +export interface MockedComponentClass { + new (props: any): any; +} + +export interface ShallowRenderer { + /** + * After `shallowRenderer.render()` has been called, returns shallowly rendered output. + */ + getRenderOutput(): E; + /** + * Similar to `ReactDOM.render` but it doesn't require DOM and only renders a single level deep. + */ + render(element: ReactElement, context?: any): void; + unmount(): void; +} + +/** + * Simulate an event dispatch on a DOM node with optional `eventData` event data. + * `Simulate` has a method for every event that React understands. + */ +export namespace Simulate { + const abort: EventSimulator; + const animationEnd: EventSimulator; + const animationIteration: EventSimulator; + const animationStart: EventSimulator; + const blur: EventSimulator; + const canPlay: EventSimulator; + const canPlayThrough: EventSimulator; + const change: EventSimulator; + const click: EventSimulator; + const compositionEnd: EventSimulator; + const compositionStart: EventSimulator; + const compositionUpdate: EventSimulator; + const contextMenu: EventSimulator; + const copy: EventSimulator; + const cut: EventSimulator; + const doubleClick: EventSimulator; + const drag: EventSimulator; + const dragEnd: EventSimulator; + const dragEnter: EventSimulator; + const dragExit: EventSimulator; + const dragLeave: EventSimulator; + const dragOver: EventSimulator; + const dragStart: EventSimulator; + const drop: EventSimulator; + const durationChange: EventSimulator; + const emptied: EventSimulator; + const encrypted: EventSimulator; + const ended: EventSimulator; + const error: EventSimulator; + const focus: EventSimulator; + const input: EventSimulator; + const invalid: EventSimulator; + const keyDown: EventSimulator; + const keyPress: EventSimulator; + const keyUp: EventSimulator; + const load: EventSimulator; + const loadStart: EventSimulator; + const loadedData: EventSimulator; + const loadedMetadata: EventSimulator; + const mouseDown: EventSimulator; + const mouseEnter: EventSimulator; + const mouseLeave: EventSimulator; + const mouseMove: EventSimulator; + const mouseOut: EventSimulator; + const mouseOver: EventSimulator; + const mouseUp: EventSimulator; + const paste: EventSimulator; + const pause: EventSimulator; + const play: EventSimulator; + const playing: EventSimulator; + const progress: EventSimulator; + const rateChange: EventSimulator; + const scroll: EventSimulator; + const seeked: EventSimulator; + const seeking: EventSimulator; + const select: EventSimulator; + const stalled: EventSimulator; + const submit: EventSimulator; + const suspend: EventSimulator; + const timeUpdate: EventSimulator; + const touchCancel: EventSimulator; + const touchEnd: EventSimulator; + const touchMove: EventSimulator; + const touchStart: EventSimulator; + const transitionEnd: EventSimulator; + const volumeChange: EventSimulator; + const waiting: EventSimulator; + const wheel: EventSimulator; +} + +/** + * Render a React element into a detached DOM node in the document. __This function requires a DOM__. + */ +export function renderIntoDocument( + element: DOMElement): T; +export function renderIntoDocument( + element: SFCElement): void; +// If we replace `P` with `any` in this overload, then some tests fail because +// calls to `renderIntoDocument` choose the last overload on the +// subtype-relation pass and get an undesirably broad return type. Using `P` +// allows this overload to match on the subtype-relation pass. +export function renderIntoDocument>( + element: CElement): T; +export function renderIntoDocument

( + element: ReactElement

): Component

| Element | void; + +/** + * Pass a mocked component module to this method to augment it with useful methods that allow it to + * be used as a dummy React component. Instead of rendering as usual, the component will become + * a simple `

` (or other tag if `mockTagName` is provided) containing any provided children. + */ +export function mockComponent( + mocked: MockedComponentClass, mockTagName?: string): typeof ReactTestUtils; + +/** + * Returns `true` if `element` is any React element. + */ +export function isElement(element: any): boolean; + +/** + * Returns `true` if `element` is a React element whose type is of a React `componentClass`. + */ +export function isElementOfType( + element: ReactElement, type: string): element is ReactHTMLElement; +/** + * Returns `true` if `element` is a React element whose type is of a React `componentClass`. + */ +export function isElementOfType

, T extends Element>( + element: ReactElement, type: string): element is DOMElement; +/** + * Returns `true` if `element` is a React element whose type is of a React `componentClass`. + */ +export function isElementOfType

( + element: ReactElement, type: SFC

): element is SFCElement

; +/** + * Returns `true` if `element` is a React element whose type is of a React `componentClass`. + */ +export function isElementOfType, C extends ComponentClass

>( + element: ReactElement, type: ClassType): element is CElement; + +/** + * Returns `true` if `instance` is a DOM component (such as a `

` or ``). + */ +export function isDOMComponent(instance: ReactInstance): instance is Element; +/** + * Returns `true` if `instance` is a user-defined component, such as a class or a function. + */ +export function isCompositeComponent(instance: ReactInstance): instance is Component; +/** + * Returns `true` if `instance` is a component whose type is of a React `componentClass`. + */ +export function isCompositeComponentWithType, C extends ComponentClass>( + instance: ReactInstance, type: ClassType): boolean; + +/** + * Traverse all components in `tree` and accumulate all components where + * `test(component)` is `true`. This is not that useful on its own, but it's used + * as a primitive for other test utils. + */ +export function findAllInRenderedTree( + root: Component, + fn: (i: ReactInstance) => boolean): ReactInstance[]; + +/** + * Finds all DOM elements of components in the rendered tree that are + * DOM components with the class name matching `className`. + */ +export function scryRenderedDOMComponentsWithClass( + root: Component, + className: string): Element[]; +/** + * Like `scryRenderedDOMComponentsWithClass()` but expects there to be one result, + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + */ +export function findRenderedDOMComponentWithClass( + root: Component, + className: string): Element; + +/** + * Finds all DOM elements of components in the rendered tree that are + * DOM components with the tag name matching `tagName`. + */ +export function scryRenderedDOMComponentsWithTag( + root: Component, + tagName: string): Element[]; +/** + * Like `scryRenderedDOMComponentsWithTag()` but expects there to be one result, + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + */ +export function findRenderedDOMComponentWithTag( + root: Component, + tagName: string): Element; + +/** + * Finds all instances of components with type equal to `componentClass`. + */ +export function scryRenderedComponentsWithType, C extends ComponentClass>( + root: Component, + type: ClassType): T[]; + +/** + * Same as `scryRenderedComponentsWithType()` but expects there to be one result + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + */ +export function findRenderedComponentWithType, C extends ComponentClass>( + root: Component, + type: ClassType): T; + +/** + * Call this in your tests to create a shallow renderer. + */ +export function createRenderer(): ShallowRenderer; + +/** + * Wrap any code rendering and triggering updates to your components into `act()` calls. + * + * Ensures that the behavior in your tests matches what happens in the browser + * more closely by executing pending `useEffect`s before returning. This also + * reduces the amount of re-renders done. + * + * @param callback A synchronous, void callback that will execute as a single, complete React commit. + * + * @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks + */ +// NOTES +// - the order of these signatures matters - typescript will check the signatures in source order. +// If the `() => VoidOrUndefinedOnly` signature is first, it'll erroneously match a Promise returning function for users with +// `strictNullChecks: false`. +// - VoidOrUndefinedOnly is there to forbid any non-void return values for users with `strictNullChecks: true` +declare const UNDEFINED_VOID_ONLY: unique symbol; +// tslint:disable-next-line: void-return +type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; +export function act(callback: () => Promise): Promise; +export function act(callback: () => VoidOrUndefinedOnly): void; + +// Intentionally doesn't extend PromiseLike. +// Ideally this should be as hard to accidentally use as possible. +export interface DebugPromiseLike { + // the actual then() in here is 0-ary, but that doesn't count as a PromiseLike. + then(onfulfilled: (value: never) => never, onrejected: (reason: never) => never): never; +} diff --git a/.snowpack/.snowpack/types/react/experimental.d.ts b/.snowpack/.snowpack/types/react/experimental.d.ts new file mode 100644 index 00000000..7fb22dbd --- /dev/null +++ b/.snowpack/.snowpack/types/react/experimental.d.ts @@ -0,0 +1,192 @@ +/** + * These are types for things that are present in the `experimental` builds of React but not yet + * on a stable build. + * + * Once they are promoted to stable they can just be moved to the main index file. + * + * To load the types declared here in an actual project, there are three ways. The easiest one, + * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, + * is to add `"react/experimental"` to the `"types"` array. + * + * Alternatively, a specific import syntax can to be used from a typescript file. + * This module does not exist in reality, which is why the {} is important: + * + * ```ts + * import {} from 'react/experimental' + * ``` + * + * It is also possible to include it through a triple-slash reference: + * + * ```ts + * /// + * ``` + * + * Either the import or the reference only needs to appear once, anywhere in the project. + */ + +// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared, +// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are +// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`. +// +// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js +// is a good place to start looking for details; it generally calls prop validation functions or delegates +// all tasks done as part of the render phase (the concurrent part of the React update cycle). +// +// Suspense-related handling can be found in ReactFiberThrow.js. + +import React = require('.'); + +export {}; + +declare const UNDEFINED_VOID_ONLY: unique symbol; +type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; + +declare module '.' { + export interface SuspenseProps { + /** + * The presence of this prop indicates that the content is computationally expensive to render. + * In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data). + * @see {@link https://github.com/facebook/react/pull/19936} + */ + unstable_expectedLoadTime?: number; + } + + export type SuspenseListRevealOrder = 'forwards' | 'backwards' | 'together'; + export type SuspenseListTailMode = 'collapsed' | 'hidden'; + + export interface SuspenseListCommonProps { + /** + * Note that SuspenseList require more than one child; + * it is a runtime warning to provide only a single child. + * + * It does, however, allow those children to be wrapped inside a single + * level of ``. + */ + children: ReactElement | Iterable; + } + + interface DirectionalSuspenseListProps extends SuspenseListCommonProps { + /** + * Defines the order in which the `SuspenseList` children should be revealed. + */ + revealOrder: 'forwards' | 'backwards'; + /** + * Dictates how unloaded items in a SuspenseList is shown. + * + * - By default, `SuspenseList` will show all fallbacks in the list. + * - `collapsed` shows only the next fallback in the list. + * - `hidden` doesn’t show any unloaded items. + */ + tail?: SuspenseListTailMode; + } + + interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps { + /** + * Defines the order in which the `SuspenseList` children should be revealed. + */ + revealOrder?: Exclude; + /** + * The tail property is invalid when not using the `forwards` or `backwards` reveal orders. + */ + tail?: never; + } + + export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps; + + /** + * `SuspenseList` helps coordinate many components that can suspend by orchestrating the order + * in which these components are revealed to the user. + * + * When multiple components need to fetch data, this data may arrive in an unpredictable order. + * However, if you wrap these items in a `SuspenseList`, React will not show an item in the list + * until previous items have been displayed (this behavior is adjustable). + * + * @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist + * @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist + */ + export const unstable_SuspenseList: ExoticComponent; + + export interface SuspenseConfig { + busyDelayMs?: number; + busyMinDurationMs?: number; + } + + // undocumented, considered for removal + export function unstable_withSuspenseConfig( + scope: () => VoidOrUndefinedOnly, + config: SuspenseConfig | null | undefined, + ): void; + + // must be synchronous + export type TransitionFunction = () => VoidOrUndefinedOnly; + // strange definition to allow vscode to show documentation on the invocation + export interface TransitionStartFunction { + /** + * State updates caused inside the callback are allowed to be deferred. + * + * **If some state update causes a component to suspend, that state update should be wrapped in a transition.** + * + * @param callback A _synchronous_ function which causes state updates that can be deferred. + */ + (callback: TransitionFunction): void; + } + + /** + * Returns a deferred version of the value that may “lag behind” it for at most `timeoutMs`. + * + * This is commonly used to keep the interface responsive when you have something that renders immediately + * based on user input and something that needs to wait for a data fetch. + * + * A good example of this is a text input. + * + * @param value The value that is going to be deferred + * + * @see https://reactjs.org/docs/concurrent-mode-reference.html#usedeferredvalue + */ + export function unstable_useDeferredValue(value: T): T; + + /** + * Allows components to avoid undesirable loading states by waiting for content to load + * before transitioning to the next screen. It also allows components to defer slower, + * data fetching updates until subsequent renders so that more crucial updates can be + * rendered immediately. + * + * The `useTransition` hook returns two values in an array. + * + * The first is a function that takes a callback. We can use it to tell React which state we want to defer. + * The seconda boolean. It’s React’s way of informing us whether we’re waiting for the transition to finish. + * + * **If some state update causes a component to suspend, that state update should be wrapped in a transition.** + * + * @param config An optional object with `timeoutMs` + * + * @see https://reactjs.org/docs/concurrent-mode-reference.html#usetransition + */ + export function unstable_useTransition(config?: SuspenseConfig | null): [TransitionStartFunction, boolean]; + + const opaqueIdentifierBranding: unique symbol; + /** + * WARNING: Don't use this as a `string`. + * + * This is an opaque type that is not supposed to type-check structurally. + * It is only valid if returned from React methods and passed to React e.g. `