repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/Shuttle.tsx
<reponame>KevinMarioGerard/react-accessible-shuttle<filename>src/components/Shuttle/Shuttle.tsx import * as React from 'react'; import { ShuttleItem } from './ShuttleItem'; import { ShuttleContainer } from './ShuttleContainer'; import { ShuttleControls } from './ShuttleControls'; import { ShuttleContext } from './Shut...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/globals.ts
<reponame>KevinMarioGerard/react-accessible-shuttle // globals only for Shuttle.Container export const NUMBER_OF_CONTAINERS = 2; export const SHUTTLE_CONTAINERS_ARRAY = ['source', 'target']; /** * Global IDs of the containers. This allows us to quickly reference the containers * in the DOM in the event `getItemProps...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/reducers/moveSelectedReducer.ts
import { ShuttleState } from '../Shuttle'; // eslint-disable-next-line @typescript-eslint/class-name-casing export interface MOVE_SELECTION_REDUCER_ACTION { type?: 'MOVE_SELECTIONS'; from?: 'source' | 'target'; to?: 'source' | 'target'; } export const shuttleSelections = (from: any[], to: any[], selected:...
KevinMarioGerard/react-accessible-shuttle
playground/src/examples/async-loading.tsx
import * as React from 'react'; import * as faker from 'faker'; import { Shuttle, useShuttleState } from '../../../src/index'; const data = new Promise(resolve => { setTimeout(() => { const data = { source: new Array(25).fill(null).map(() => { return { first...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/ShuttleContainer.tsx
import * as React from 'react'; import { classNames } from '../../utils/utils'; import { ShuttleContext } from './ShuttleContext'; import { NUMBER_OF_CONTAINERS, SHUTTLE_CONTAINERS_ARRAY } from './globals'; import { ShuttleState } from './Shuttle'; let id_int = 0; // eslint-disable-line @typescript-eslint/camelcase ...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/__tests__/resources/stateGenerator.ts
<gh_stars>1-10 export const dummyState = ({ source = 5, target = 5, }: { source?: number; target?: number } = {}) => { let i = 0; let j = 0; return { source: new Array(source).fill(null).map(() => i++), target: new Array(target).fill(null).map(() => j++), }; };
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/__tests__/ShuttleItem.test.tsx
import * as React from 'react'; import { render, cleanup } from '@testing-library/react'; import { ShuttleItem } from '../ShuttleItem'; afterEach(cleanup); describe('ShuttleItem tests', () => { it('should render without errors', () => { const spy = jest.spyOn(global.console, 'warn'); expect(() =>...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/ShuttleContext.tsx
<filename>src/components/Shuttle/ShuttleContext.tsx import React from 'react'; import { ShuttleState } from './Shuttle'; interface ShuttleContextType { shuttleState: ShuttleState; setShuttleState: (state: ShuttleState) => void; } // @ts-ignore export const ShuttleContext = React.createContext<ShuttleContextTy...
KevinMarioGerard/react-accessible-shuttle
src/utils/polyfills.ts
<gh_stars>1-10 const __CLIENT__ = !!( typeof window !== 'undefined' && window.document && window.document.createElement ); function matchPolyfill() { if (typeof Element.prototype.matches !== 'function') { // https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill Eleme...
KevinMarioGerard/react-accessible-shuttle
src/index.ts
/* istanbul ignore file */ import { useShuttleState } from './components/Shuttle/hooks/useShuttleState'; import { useShuttleKeyboardControls } from './components/Shuttle/hooks/useShuttleKeyboardControls'; import { Shuttle } from './components/Shuttle/Shuttle'; import { polyfill } from './utils/polyfills'; export { Shu...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/__tests__/hooks/useShuttleKeyboardControls.test.tsx
import * as React from 'react'; import { render, cleanup, getByTestId, fireEvent } from '@testing-library/react'; import TestKbdShuttle from '../resources/TestKbdShuttle'; import { dummyState } from '../resources/stateGenerator'; import { act } from 'react-test-renderer'; import '@testing-library/jest-dom/extend-expe...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/hooks/useAsyncState.ts
import * as React from 'react'; import { isPromise } from '../../../utils/utils'; import { InitialState } from './useShuttleState'; type State = { source: any[]; target: any[]; }; /** * An internal hook to lazily set the state from a Promise * or something that is Promise A+ compliant. We really only * wan...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/__tests__/resources/TestShuttleWithCustomReducer.tsx
<filename>src/components/Shuttle/__tests__/resources/TestShuttleWithCustomReducer.tsx import * as React from 'react'; import { Shuttle, ShuttleState } from '../../Shuttle'; import { useShuttleState } from '../../hooks/useShuttleState'; export default function TestShuttleWithCustomReducer() { const shuttle = useShu...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/reducers/moveAllReducer.ts
<filename>src/components/Shuttle/reducers/moveAllReducer.ts<gh_stars>0 import { ShuttleState } from '../Shuttle'; // eslint-disable-next-line @typescript-eslint/class-name-casing export interface MOVE_SELECTION_REDUCER_ACTION { type?: 'MOVE_ALL'; from?: 'source' | 'target'; to?: 'source' | 'target'; } /**...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/hooks/useShuttleItemClick.ts
<gh_stars>0 import * as React from 'react'; import { ShuttleState, ShuttleReducer } from '../Shuttle'; import { getIndexFromItem, getContainerMetadata, getShuttleItem } from '../../../utils/utils'; import { SHUTTLE_CONTROL_TYPES } from '../reducers/index'; interface Options { setShuttleState: (args: ShuttleReduce...
KevinMarioGerard/react-accessible-shuttle
playground/src/index.tsx
<filename>playground/src/index.tsx import { hot } from 'react-hot-loader/root'; import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Router, Link } from '@reach/router'; import { App as BasicShuttle } from './examples/basic-usage'; import { App as VirtualizedShuttle } from './examples/with...
KevinMarioGerard/react-accessible-shuttle
playground/src/examples/with-rolling-dom.tsx
<reponame>KevinMarioGerard/react-accessible-shuttle import React from 'react'; import AutoSizer from 'react-virtualized-auto-sizer'; import { FixedSizeList as List } from 'react-window'; import * as faker from 'faker'; import { Shuttle, useShuttleState, useShuttleKeyboardControls } from '../../../src/index'; import '...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/reducers/lazyLoadReducer.ts
import { ShuttleState } from '../Shuttle'; import { init, InitArgs } from '../hooks/useShuttleState'; // eslint-disable-next-line @typescript-eslint/class-name-casing export interface LAZY_INITIALIZE_REDUCER_ACTION { type: 'LAZY_LOAD'; data: InitArgs; } export const lazyLoad = (state: ShuttleState, action: LA...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/__tests__/ShuttleContainer.test.tsx
import * as React from 'react'; import { render, cleanup } from '@testing-library/react'; import '@testing-library/jest-dom/extend-expect'; import { ShuttleContainer } from '../ShuttleContainer'; afterEach(cleanup); describe('ShuttleContainer tests', () => { it('should render', () => { expect(() => { ...
KevinMarioGerard/react-accessible-shuttle
src/components/Shuttle/hooks/useShuttleState.ts
<reponame>KevinMarioGerard/react-accessible-shuttle import * as React from 'react'; import { toSet } from '../../../utils/utils'; import { composeReducers, move, moveAll, selectItem, lazyLoad } from '../reducers/index'; import { ShuttleState } from '../Shuttle'; import { useAsyncState } from './useAsyncState'; inter...
Liquid-JS/gulp-sass
index.d.ts
/// <reference types="node"/> import { Options } from 'sass'; interface SassResults { css: string; map: string; stats: { entry: string; start: Date; end: Date; duration: number; includedFiles: string[]; } } interface SassOptions extends Options { success?: ...
plotter/platform2
app/platform/phone-gap-helper.ts
export class PhoneGapHelper { public get baseUrl() { // only set it the first time (<any>window).plotterRootPath = (<any>window).plotterRootPath || window.location.toString().replace('index.html', ''); return (<any>window).plotterRootPath; } public get isPhoneGap() { ...
plotter/platform2
plotterplatformtypings/app/state/state-repository-chooser.d.ts
<gh_stars>1-10 import { Router } from 'aurelia-router'; import { StateDirectory } from '../platform/state/state-directory'; import { StateRepository } from '../platform/state/state-repository'; import { Plotter } from '../platform/plotter'; export declare class StateRepositoryChooser { private stateDirectory; p...
plotter/platform2
plotterplatformtypings/app/app.d.ts
<filename>plotterplatformtypings/app/app.d.ts<gh_stars>1-10 import { Container } from 'aurelia-framework'; import { Router, RouterConfiguration } from 'aurelia-router'; import { PlatformStartup } from './platform/platform-startup'; import { Plotter } from './platform/plotter'; import { StateDirectory } from './platform...
plotter/platform2
plotterplatformtypings/app/main.d.ts
import { Aurelia } from 'aurelia-framework'; export declare function configure(aurelia: Aurelia): void;
plotter/platform2
plotterplatformtypings/views/two/two.d.ts
export declare class Two { }
plotter/platform2
app/platform/state/state-directory.ts
<reponame>plotter/platform2<filename>app/platform/state/state-directory.ts import { HttpClient } from 'aurelia-fetch-client'; import { StateRepository, StateRepositoryJSON } from './state-repository'; import { StateRepositoryFile } from './state-repository-file'; import { ElectronHelper } from '../electron-helper'; im...
plotter/platform2
typings/aurelia/aurelia-dialog.d.ts
<filename>typings/aurelia/aurelia-dialog.d.ts declare module 'aurelia-dialog' { import { customElement, bindable, customAttribute, ViewSlot, CompositionEngine } from 'aurelia-templating'; import { Origin } from 'aurelia-metadata'; import { Container } from 'aurelia-dependency-inj...
plotter/platform2
app/platform/state/state-repository-file.ts
<gh_stars>1-10 import { inject } from 'aurelia-framework'; import { HttpClient } from 'aurelia-fetch-client'; import { StateRepository, StateRepositoryType, StateRepositoryJSON } from './state-repository'; import { PakDirectory } from '../pak/pak-directory'; import { StateSession } from './state-session'; import { Stat...
plotter/platform2
plotterplatformtypings/app/platform/pak/pak-repository-file.d.ts
import { HttpClient } from 'aurelia-fetch-client'; import { PakRepository, PakRepositoryType } from './pak-repository'; import { Pak } from './pak'; import { PakDirectory } from './pak-directory'; import { ElectronHelper } from '../electron-helper'; import { PhoneGapHelper } from '../phone-gap-helper'; export declare c...
plotter/platform2
plotterplatformtypings/app/platform/platform-startup.d.ts
import { HttpClient } from 'aurelia-fetch-client'; import { StateDirectory } from './state/state-directory'; import { Plotter } from './plotter'; import { ElectronHelper } from './electron-helper'; import { PhoneGapHelper } from './phone-gap-helper'; export declare class PlatformStartup { private httpClient; pr...
plotter/platform2
app/platform/pak/view.ts
<reponame>plotter/platform2 import { Pak } from './pak'; export class View { public static fromJSON(json: ViewJSON): View { let view = new View(); view.locked = json.locked; view.uniqueId = json.uniqueId; view.pane = json.pane; view.moduleUrl = json.moduleUrl; return...
plotter/platform2
app/platform/platform-startup.ts
<reponame>plotter/platform2 import { inject } from 'aurelia-framework'; import { HttpClient } from 'aurelia-fetch-client'; import { StateDirectory } from './state/state-directory'; import { Plotter } from './plotter'; import { ElectronHelper } from './electron-helper'; import { PhoneGapHelper } from './phone-gap-helper...
plotter/platform2
app/platform/electron-helper.ts
<gh_stars>1-10 export class ElectronHelper { public get isElectron() { return this.fs && window.location && window.location.toString().startsWith('file:'); }; get fs() { return (<any> window).nodeReq && (<any> window).nodeReq('fs'); } get app() { return (<any> ...
plotter/platform2
app/shell/view-instance-toolbar.ts
import { customElement, bindable } from 'aurelia-framework'; import { ViewInstance } from '../platform/state/view-instance'; @customElement('view-instance-toolbar') export class ViewInstanceToolbar { @bindable() public activeViewInstance: ViewInstance; @bindable() public viewInstances: ViewInstance[]; @bin...
plotter/platform2
app/platform/state/state-repository-service.ts
export class StateRepositoryService {}
plotter/platform2
plotterplatformtypings/app/platform/electron-helper.d.ts
export declare class ElectronHelper { readonly isElectron: boolean; readonly fs: any; readonly app: any; readonly process: any; readonly userDataPath: any; }
plotter/platform2
plotterplatformtypings/app/state/new-session.d.ts
import { StateDirectory } from '../platform/state/state-directory'; import { StateRepository } from '../platform/state/state-repository'; import { PakDirectory } from '../platform/pak/pak-directory'; export declare class NewSession { private stateDirectory; hostId: string; stateRepository: StateRepository; ...
plotter/platform2
app/state/state-repository-chooser.ts
<reponame>plotter/platform2 import { inject } from 'aurelia-framework'; import { Router } from 'aurelia-router'; import { StateDirectory } from '../platform/state/state-directory'; import { StateRepository } from '../platform/state/state-repository'; import { Plotter } from '../platform/plotter'; @inject(StateDirector...
plotter/platform2
app/shell/shell.ts
<gh_stars>1-10 import { inject } from 'aurelia-framework'; import { StateDirectory } from '../platform/state/state-directory'; import { StateSession } from '../platform/state/state-session'; import { ViewInstance, ViewInstanceJSON } from '../platform/state/view-instance'; @inject(StateDirectory) export class Shell { ...
plotter/platform2
views/globe/globe.ts
<reponame>plotter/platform2 export class Globe { activate() { (<any> window).require([ "dojo/ready", "esri/Color", "dojo/_base/array", "esri/arcgis/utils", "esri/config", "esri/graphicsUtils", "esri/symbols/SimpleFillSymbol"...
plotter/platform2
plotterplatformtypings/app/shell/shell.d.ts
<filename>plotterplatformtypings/app/shell/shell.d.ts import { StateDirectory } from '../platform/state/state-directory'; import { StateSession } from '../platform/state/state-session'; import { ViewInstance, ViewInstanceJSON } from '../platform/state/view-instance'; export declare class Shell { private stateDirect...
plotter/platform2
views/three/three.ts
<reponame>plotter/platform2 export class Three {}
plotter/platform2
plotterplatformtypings/app/platform/plotter.d.ts
import { StateDirectory } from './state/state-directory'; import { StateRepository } from './state/state-repository'; import { StateSession } from './state/state-session'; export declare class Plotter { stateDirectoryName: string; private myStateDirectory; stateDirectory: StateDirectory; private myState...
plotter/platform2
plotterplatformtypings/app/platform/state/active-pak.d.ts
import { ViewInstance, ViewInstanceJSON } from './view-instance'; import { StateSession } from './state-session'; import { Pak } from '../pak/pak'; export declare class ActivePak { static fromJSON(json: ActivePakJSON): ActivePak; locked: boolean; uniqueId: string; pakHostId: string; pakId: string; ...
plotter/platform2
plotterplatformtypings/app/platform/state/state-repository.d.ts
import { PakDirectory } from '../pak/pak-directory'; import { StateSession } from './state-session'; import { StateDirectory } from './state-directory'; export interface StateRepository { locked: boolean; uniqueId: string; stateRepositoryType: StateRepositoryType; stateDirectory: StateDirectory; get...
plotter/platform2
plotterplatformtypings/app/platform/state/view-instance.d.ts
import { ActivePak } from './active-pak'; import { View, PaneType } from '../pak/view'; export declare class ViewInstance { static fromJSON(json: ViewInstanceJSON): ViewInstance; uniqueId: string; title: string; viewId: string; paneType: PaneType; viewTemplate: string; viewModel: string; ...
plotter/platform2
app/platform/state/state-repository-github-gist.ts
export class StateRepositoryGitHubGist {}
plotter/platform2
app/platform/plotter.ts
<reponame>plotter/platform2 import { StateDirectory } from './state/state-directory'; import { StateRepository } from './state/state-repository'; import { StateSession } from './state/state-session'; export class Plotter { public stateDirectoryName: string = 'state-directory'; private myStateDirectory: StateD...
plotter/platform2
typings/aurelia/aurelia-polyfills.d.ts
<reponame>plotter/platform2 declare module 'aurelia-polyfills' { import { PLATFORM } from 'aurelia-pal'; }
plotter/platform2
plotterplatformtypings/app/platform/pak/pak-directory.d.ts
import { PakRepository, PakRepositoryJSON } from './pak-repository'; import { StateRepository } from '../state/state-repository'; export declare class PakDirectory { static fromJSON(json: PakDirectoryJSON): PakDirectory; locked: boolean; uniqueId: string; pakRepositories: PakRepository[]; stateRepos...
plotter/platform2
app/state/new-session.ts
<reponame>plotter/platform2 import { inject } from 'aurelia-framework'; import { StateDirectory } from '../platform/state/state-directory'; import { StateRepository } from '../platform/state/state-repository'; import { PakDirectory } from '../platform/pak/pak-directory'; @inject(StateDirectory) export class NewSession...
plotter/platform2
plotterplatformtypings/app/platform/state/state-repository-service.d.ts
export declare class StateRepositoryService { }
plotter/platform2
app/state/state-session-chooser.ts
import { inject } from 'aurelia-framework'; import { Router } from 'aurelia-router'; import { StateDirectory } from '../platform/state/state-directory'; import { StateRepository } from '../platform/state/state-repository'; import { Plotter } from '../platform/plotter'; @inject(StateDirectory, Plotter, Router) export c...
plotter/platform2
plotterplatformtypings/app/platform/state/state-repository-file.d.ts
import { HttpClient } from 'aurelia-fetch-client'; import { StateRepository, StateRepositoryType, StateRepositoryJSON } from './state-repository'; import { PakDirectory } from '../pak/pak-directory'; import { StateSession } from './state-session'; import { StateDirectory } from './state-directory'; import { ElectronHel...
plotter/platform2
app/platform/state/state-session.ts
import { ActivePak, ActivePakJSON } from './active-pak'; import { StateRepository } from './state-repository'; export class StateSession { public static fromJSON(json: StateSessionJSON): StateSession { let stateSession = new StateSession(); // assign properties... stateSession.locked = jso...
plotter/platform2
app/platform/pak/pak.ts
<reponame>plotter/platform2 import { View, ViewJSON } from './view'; import { PakRepository } from './pak-repository'; export class Pak { public static fromJSON(json: PakJSON): Pak { let pak = new Pak(); // assign properties... pak.locked = json.locked; pak.uniqueId = json.uniqueId;...
plotter/platform2
app/platform/state/active-pak.ts
import { ViewInstance, ViewInstanceJSON } from './view-instance'; import { StateSession } from './state-session'; import { Pak } from '../pak/pak'; export class ActivePak { public static fromJSON(json: ActivePakJSON): ActivePak { let activePak = new ActivePak(); activePak.locked = json.locked; ...
plotter/platform2
app/platform/state/view-instance.ts
import { ActivePak } from './active-pak'; import { View, PaneType } from '../pak/view'; export class ViewInstance { public static fromJSON(json: ViewInstanceJSON): ViewInstance { let viewInstance = new ViewInstance(); viewInstance.uniqueId = json.uniqueId; if (!json.title) { vie...
plotter/platform2
plotterplatformtypings/app/platform/pak/pak.d.ts
import { View, ViewJSON } from './view'; import { PakRepository } from './pak-repository'; export declare class Pak { static fromJSON(json: PakJSON): Pak; locked: boolean; uniqueId: string; pakRepository: PakRepository; views: View[]; getView(viewId: string): View; } export interface PakJSON { ...
plotter/platform2
plotterplatformtypings/app/platform/state/state-session.d.ts
<reponame>plotter/platform2 import { ActivePak, ActivePakJSON } from './active-pak'; import { StateRepository } from './state-repository'; export declare class StateSession { static fromJSON(json: StateSessionJSON): StateSession; locked: boolean; uniqueId: string; activePaks: ActivePak[]; stateRepos...
plotter/platform2
plotterplatformtypings/views/three/three.d.ts
<gh_stars>1-10 export declare class Three { }
plotter/platform2
plotterplatformtypings/views/one/one.d.ts
<gh_stars>1-10 import { Shell } from 'app/shell/shell'; import { PaneType } from 'app/platform/pak/view'; export declare class One { private shell; model: any; targetPane: PaneType; targetMessage: string; targetViewModel: string; constructor(shell: Shell); activate(model: any): void; lau...
plotter/platform2
plotterplatformtypings/app/platform/state/state-repository-github-gist.d.ts
<filename>plotterplatformtypings/app/platform/state/state-repository-github-gist.d.ts export declare class StateRepositoryGitHubGist { }
plotter/platform2
plotterplatformtypings/app/shell/view-instance-toolbar.d.ts
<reponame>plotter/platform2 import { ViewInstance } from '../platform/state/view-instance'; export declare class ViewInstanceToolbar { activeViewInstance: ViewInstance; viewInstances: ViewInstance[]; showTitle: boolean; removeItem: (vi: ViewInstance, index: number, viArr: ViewInstance[]) => void; }
plotter/platform2
plotterplatformtypings/app/platform/pak/pak-repository.d.ts
import { Pak } from './pak'; import { PakDirectory } from './pak-directory'; export interface PakRepository { locked: boolean; uniqueId: string; pakDirectory: PakDirectory; pakList: string[]; getPak(pakId: string): Promise<Pak>; getPakList(): Promise<string[]>; } export interface PakRepositoryJS...
plotter/platform2
plotterplatformtypings/app/state/state-session-chooser.d.ts
<filename>plotterplatformtypings/app/state/state-session-chooser.d.ts import { Router } from 'aurelia-router'; import { StateDirectory } from '../platform/state/state-directory'; import { StateRepository } from '../platform/state/state-repository'; import { Plotter } from '../platform/plotter'; export declare class Sta...
plotter/platform2
app/platform/pak/pak-repository-file.ts
<filename>app/platform/pak/pak-repository-file.ts import { inject } from 'aurelia-framework'; import { HttpClient } from 'aurelia-fetch-client'; import { PakRepository, PakRepositoryType } from './pak-repository'; import { Pak } from './pak'; import { PakDirectory } from './pak-directory'; import { ElectronHelper } fro...
plotter/platform2
plotterplatformtypings/app/platform/state/state-directory.d.ts
import { StateRepository, StateRepositoryJSON } from './state-repository'; import { StateSession } from './state-session'; export declare class StateDirectory { static fromJSON(json: StateDirectoryJSON): StateDirectory; locked: boolean; uniqueId: string; stateRepositories: StateRepository[]; getStat...
plotter/platform2
plotterplatformtypings/app/platform/pak/view.d.ts
import { Pak } from './pak'; export declare class View { static fromJSON(json: ViewJSON): View; locked: boolean; uniqueId: string; pane: PaneType; moduleUrl: string; pak: Pak; } export declare type PaneType = 'nav' | 'main' | 'alt'; export interface ViewJSON { locked: boolean; uniqueId: ...
plotter/platform2
plotterplatformtypings/app/platform/phone-gap-helper.d.ts
<reponame>plotter/platform2<filename>plotterplatformtypings/app/platform/phone-gap-helper.d.ts export declare class PhoneGapHelper { readonly baseUrl: any; readonly isPhoneGap: boolean; readFromFile: (fileName: string) => Promise<Object>; errorHandler: (fileName: any, e: any) => string; }
dorawyy/321-MyBubble
backend/notifications/node_modules/firebase-admin/lib/storage.d.ts
<reponame>dorawyy/321-MyBubble<gh_stars>1-10 /*! firebase-admin v9.2.0 */ /*! * Copyright 2020 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
dorawyy/321-MyBubble
backend/notifications/node_modules/firebase-admin/lib/remote-config.d.ts
/*! firebase-admin v9.2.0 */ import * as _admin from './index.d'; export namespace admin.remoteConfig { /** * Colors that are associated with conditions for display purposes. */ type TagColor = 'BLUE' | 'BROWN' | 'CYAN' | 'DEEP_ORANGE' | 'GREEN' | 'INDIGO' | 'LIME' | 'ORANGE' | 'PINK' | 'PURPLE' | 'TEAL';...
Melos-Finance/wyvern-js
src/utils/abi_decoder.ts
<filename>src/utils/abi_decoder.ts /* Sourced from 0x.js */ import { BigNumber } from "@0xproject/utils"; import * as _ from "lodash"; import * as Web3 from "web3"; import * as SolidityCoder from "web3/lib/solidity/coder"; import { AbiType, ContractEventArg, DecodedLogArgs, LogWithDecodedArgs, RawLog, Sol...
Melos-Finance/wyvern-js
lib/utils/decorators.d.ts
import { AsyncMethod, SyncMethod } from "../types"; export declare const decorators: { asyncWyvernProtocolErrorHandler: (target: object, key: string | symbol, descriptor: TypedPropertyDescriptor<AsyncMethod>) => TypedPropertyDescriptor<AsyncMethod>; syncWyvernProtocolErrorHandler: (target: object, key: string |...
Melos-Finance/wyvern-js
lib/utils/constants.d.ts
<filename>lib/utils/constants.d.ts<gh_stars>0 export declare const constants: { NULL_ADDRESS: string; INVALID_JUMP_PATTERN: string; OUT_OF_GAS_PATTERN: string; INVALID_TAKER_FORMAT: string; MAX_DIGITS_IN_UNSIGNED_256_INT: number; DEFAULT_BLOCK_POLLING_INTERVAL: number; DEPLOYED: { ri...
Melos-Finance/wyvern-js
lib/utils/abi_decoder.d.ts
<filename>lib/utils/abi_decoder.d.ts import * as Web3 from "web3"; import { DecodedLogArgs, LogWithDecodedArgs, RawLog } from "../types"; export declare class AbiDecoder { private _savedABIs; private _methodIds; private static _padZeros; constructor(abiArrays: Web3.AbiDefinition[][]); tryToDecodeLog...
Melos-Finance/wyvern-js
lib/abi_gen/wyvern_token.d.ts
/** * This file is auto-generated using abi-gen. Don't edit directly. * Templates can be found at https://github.com/0xProject/0x.js/tree/development/packages/abi-gen-templates. */ import { TxData } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as Web3 from 'web3'; import { BaseCont...
Melos-Finance/wyvern-js
lib/wyvernProtocol.d.ts
import { BigNumber } from "@0xproject/utils"; import { WyvernAtomicizerContract } from "./abi_gen/wyvern_atomicizer"; import { WyvernDAOContract } from "./abi_gen/wyvern_d_a_o"; import { WyvernExchangeContract } from "./abi_gen/wyvern_exchange"; import { WyvernProxyRegistryContract } from "./abi_gen/wyvern_proxy_regist...
Melos-Finance/wyvern-js
src/types.ts
import { TransactionReceipt } from "@0xproject/types"; import { BigNumber } from "@0xproject/utils"; import * as Web3 from "web3"; export interface WyvernProtocolConfig { network: Network; gasPrice?: BigNumber; wyvernExchangeContractAddress?: string; wyvernProxyRegistryContractAddress?: string; wyvernDAOCont...
MartinR2295/pbkdf2-hmac
types/index.d.ts
<reponame>MartinR2295/pbkdf2-hmac export default pbkdf2Hmac; /** * A TypedArray object describes an array-like view of an underlying binary data buffer. */ export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; /** * Th...
mhcorbinapps/cities_app_test
src/App.tsx
<filename>src/App.tsx<gh_stars>0 import * as React from "react"; import * as styles from "./App.module.less"; export const App = (): JSX.Element => { return ( <div className={styles.root}> <h1>Cities App <strong>test</strong></h1> <blockquote> <h3>Specs</h3> Write an application with...
cachemoney/three-particles
remotion.config.ts
import os from 'os'; import {Config, WebpackOverrideFn} from 'remotion'; import { replaceLoadersWithBabel } from "@remotion/babel-loader"; // Config.Rendering.setConcurrency(os.cpus().length); Config.Output.setOverwriteOutput(true); type Bundler = 'webpack' | 'esbuild'; const WEBPACK_OR_ESBUILD = 'esbuild' as Bundle...
cachemoney/three-particles
src/Effects.tsx
<gh_stars>0 import * as THREE from 'three'; import React, { useRef, useMemo, useEffect, useState } from 'react'; import { extend, useThree, useFrame, ReactThreeFiber } from '@react-three/fiber'; // import { mapRange } from 'canvas-sketch-util/math'; import {interpolate, useCurrentFrame, useVideoConfig} from 'remotion';...
cachemoney/three-particles
src/store/index.tsx
import create, { GetState, SetState } from 'zustand' import Random from 'canvas-sketch-util/random'; const randInst = Random.createRandom(1); const useStore = create((set) => ({ random: randInst })); export default useStore;
cachemoney/three-particles
src/Planet.tsx
import React, { useRef, useEffect } from 'react'; import { useFrame, useThree } from '@react-three/fiber'; import { lerp, mapRange } from 'canvas-sketch-util/math'; import {Mesh, ShaderMaterial, Material} from 'three'; import {useCurrentFrame, useVideoConfig, interpolate} from 'remotion'; import useStore from './stor...
cachemoney/three-particles
decs.d.ts
declare module "MeshLine"; declare module "MeshLineMaterial"; declare module "MeshLineRaycast"; declare module "canvas-sketch-util/random"; declare module "canvas-sketch-util/math"; declare module "nice-color-palettes"; // declare module "three-stdlib"; declare module "glslify"; declare module "Glitchpass"; declare mod...
cachemoney/three-particles
src/SilkyMaterial.tsx
import { ShaderMaterial, Color } from 'three'; import { extend, ReactThreeFiber } from '@react-three/fiber'; import fragmentShader from './shader/planet.frag.glsl'; import vertexShader from './shader/planet.vert.glsl'; declare global { namespace JSX { interface IntrinsicElements { silkyMaterial: ReactT...
amorimjuliana/sdk-js
src/facade/evaluatorFacade.ts
<filename>src/facade/evaluatorFacade.ts import Evaluator, {Campaign, EvaluationContext, Page} from '../evaluator'; import {JsonObject, JsonValue} from '../json'; import Tab from '../tab'; import {optionsSchema} from '../schema/evaluationSchemas'; import {formatCause} from '../error'; export type EvaluationOptions = { ...
amorimjuliana/sdk-js
test/validation/unionType.test.ts
import NumberType from '../../src/validation/numberType'; import StringType from '../../src/validation/stringType'; import UnionType from '../../src/validation/unionType'; describe('An union type', () => { test('should provide the allowed types', () => { expect(new UnionType(new StringType(), new NumberTyp...
amorimjuliana/sdk-js
test/queue/capacityRestrictedQueue.test.ts
import CapacityRestrictedQueue from '../../src/queue/capacityRestrictedQueue'; import InMemoryQueue from '../../src/queue/inMemoryQueue'; describe('A capacity-restricted queue', () => { test('should provide all items', () => { const queue = new CapacityRestrictedQueue<string>(new InMemoryQueue(), 3); ...
amorimjuliana/sdk-js
test/token/cachedTokenStore.test.ts
<filename>test/token/cachedTokenStore.test.ts import Token from '../../src/token'; import CachedTokenStore from '../../src/token/cachedTokenStore'; import InMemoryCache from '../../src/cache/inMemoryCache'; describe('A cache token store', () => { const token = Token.issue('7<PASSWORD>-<PASSWORD>', '<PASSWORD>', 14...
amorimjuliana/sdk-js
src/namespacedStorage.ts
<filename>src/namespacedStorage.ts export default class NamespacedStorage implements Storage { private readonly storage: Storage; private readonly namespace: string; public constructor(storage: Storage, namespace: string) { if (namespace === '') { throw new Error('The namespace cannot ...
amorimjuliana/sdk-js
src/uuid.ts
export function uuid4(sortable = false): string { let uuid = ''; if (sortable) { const prefix = Date.now().toString(16).padStart(12, '0').substring(0, 12); uuid = `${prefix.substring(0, 8)}-${prefix.substring(8, 12)}`; } for (let index = uuid.length; index < 36; index++) { swit...
amorimjuliana/sdk-js
src/validation/mixedSchema.ts
<filename>src/validation/mixedSchema.ts import {Schema} from './index'; export default class MixedSchema implements Schema { public validate(): void { // always valid } }
amorimjuliana/sdk-js
test/eventManager.test.ts
import {SynchronousEventManager} from '../src/eventManager'; type TestEventMap = { foo: object, bar: object, }; describe('A synchronous event manager', () => { test('should dispatch events to subscribed listeners', () => { const eventManager = new SynchronousEventManager<TestEventMap>(); ...
amorimjuliana/sdk-js
src/cache/fallbackCache.ts
<gh_stars>0 import Cache from './index'; export default class FallbackCache implements Cache { private readonly caches: Cache[]; public constructor(...caches: Cache[]) { this.caches = caches; } public get(): string|null { for (const cache of this.caches) { const value = ca...
amorimjuliana/sdk-js
src/channel/index.ts
<reponame>amorimjuliana/sdk-js<gh_stars>10-100 export interface Closeable { close(): Promise<void>; } export interface OutputChannel<O> extends Closeable { publish(message: O): Promise<void>; } export type ChannelListener<T> = { (message: T): void, }; export interface InputChannel<I> extends Closeable { ...
amorimjuliana/sdk-js
test/channel/beaconSocketChannel.test.ts
import SandboxChannel from '../../src/channel/sandboxChannel'; import BeaconSocketChannel, {DuplexChannelFactory} from '../../src/channel/beaconSocketChannel'; import {DuplexChannel} from '../../src/channel'; import {Envelope} from '../../src/channel/guaranteedChannel'; import {Beacon, BeaconPayload, TrackingEventConte...
amorimjuliana/sdk-js
src/retry/neverPolicy.ts
<gh_stars>0 import {RetryPolicy} from './index'; export default class NeverPolicy<T> implements RetryPolicy<T> { public getDelay(): number { return Infinity; } public shouldRetry(): boolean { return false; } }