This file contains hidden or 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
| /* eslint-disable prefer-arrow/prefer-arrow-functions */ | |
| /// <reference no-default-lib="true" /> | |
| /// <reference lib="esnext" /> | |
| /// <reference lib="dom" /> | |
| import type { RuntimeFiber } from '@effect/io/Fiber' | |
| import * as FiberRef from '@effect/io/FiberRef' | |
| import * as Scheduler from '@effect/io/Scheduler' |
This file contains hidden or 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
| { | |
| inputs = { | |
| nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; | |
| flake-utils.url = "github:numtide/flake-utils"; | |
| }; | |
| outputs = { self, nixpkgs, flake-utils }: | |
| flake-utils.lib.eachDefaultSystem (system: | |
| let | |
| pkgs = import nixpkgs { |
This file contains hidden or 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 type { Otel, Scope } from '@overtone/utils/effect' | |
| import { Duration, Effect, Either, pipe, Request, RequestResolver } from '@overtone/utils/effect' | |
| export type MakeArgs<TTag extends string, C, E, A, E2, A2> = { | |
| tag: TTag | |
| fetchResources: (resourceIds: ReadonlyArray<string>) => Effect.Effect<C, E, A[]> | |
| mapResult?: (fetchedResources: A) => Either.Either<E2, A2> | |
| batchTimeoutMs?: number | |
| batchCapacity: number | |
| cache?: { |
This file contains hidden or 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 * as Context from '@effect/data/Context' | |
| import * as Duration from '@effect/data/Duration' | |
| import type * as Either from '@effect/data/Either' | |
| import { pipe } from '@effect/data/Function' | |
| import * as Deferred from '@effect/io/Deferred' | |
| import * as FiberRefs from '@effect/io/FiberRefs' | |
| import * as Queue from '@effect/io/Queue' | |
| import * as Effect from './Effect.js' | |
| import * as Otel from './Otel/index.js' |
This file contains hidden or 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 * as Data from '@effect/data/Data' | |
| import { pipe } from '@effect/data/Function' | |
| import * as Effect from '@effect/io/Effect' | |
| import * as msgpack from 'msgpackr' | |
| import * as Otel from './Otel/index.js' | |
| export const fetchHead = ( | |
| url: string | URL, | |
| headers?: HeadersInit, |
This file contains hidden or 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
| { | |
| inputs = { | |
| nixpkgs.url = "github:NixOS/nixpkgs/master"; | |
| flake-utils.url = "github:numtide/flake-utils"; | |
| }; | |
| outputs = { self, nixpkgs, flake-utils }: | |
| flake-utils.lib.eachDefaultSystem (system: | |
| let | |
| pkgs = nixpkgs.legacyPackages.${system}; |
This file contains hidden or 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 * as Data from '@effect/data/Data' | |
| import { pipe } from '@effect/data/Function' | |
| import * as Effect from '@effect/io/Effect' | |
| import * as msgpack from 'msgpackr' | |
| import * as Otel from './Otel/index.js' | |
| export const fetchHead = ( | |
| url: string | URL, | |
| headers?: HeadersInit, |
This file contains hidden or 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
| /* eslint-disable prefer-arrow/prefer-arrow-functions */ | |
| export * from '@effect/io/Scheduler' | |
| import * as Scheduler from '@effect/io/Scheduler' | |
| // Based on https://github.com/Effect-TS/io/blob/main/src/Scheduler.ts#L63 | |
| export class ReactAwareScheduler implements Scheduler.Scheduler { | |
| private running = false | |
| private tasks = new Array<Scheduler.Task>() |
This file contains hidden or 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
| /* eslint-disable prefer-arrow/prefer-arrow-functions */ | |
| /** | |
| * fork of https://github.com/astoilkov/main-thread-scheduling | |
| * | |
| * node compatibility | |
| * removal of visible priority | |
| * reversal of task order | |
| */ | |
| import * as Effect from '@effect/io/Effect' |
This file contains hidden or 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 from 'react' | |
| const PR = Math.round(window.devicePixelRatio || 1) | |
| const FRAME_BAR_WIDTH = 2 | |
| export type FPSMeterProps = { | |
| width?: number | |
| height?: number | |
| systemFps?: number |