Skip to content

Commit

Permalink
chore: drop description
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jul 18, 2024
1 parent 380897e commit 3e17988
Show file tree
Hide file tree
Showing 65 changed files with 118 additions and 189 deletions.
2 changes: 1 addition & 1 deletion apps/demo/src/app/pages/midi/demo/response.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/audio/src/tokens/audio-context.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {InjectionToken} from '@angular/core';

export const WA_AUDIO_CONTEXT = new InjectionToken<BaseAudioContext>(
'[WA_AUDIO_CONTEXT]: Web Audio API context',
'[WA_AUDIO_CONTEXT]',
{
providedIn: 'root',
factory: () => new AudioContext(),
Expand Down
9 changes: 3 additions & 6 deletions libs/audio/src/tokens/audio-node.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import type {ExistingProvider, Type} from '@angular/core';
import {InjectionToken} from '@angular/core';

export const WA_AUDIO_NODE = new InjectionToken<AudioNode | null>(
'[WA_AUDIO_NODE]: Web Audio API audio node',
{
factory: () => null,
},
);
export const WA_AUDIO_NODE = new InjectionToken<AudioNode | null>('[WA_AUDIO_NODE]', {
factory: () => null,
});

export function asAudioNode(useExisting: Type<AudioNode>): ExistingProvider {
return {
Expand Down
2 changes: 1 addition & 1 deletion libs/audio/src/tokens/audio-worklet-processors-ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {WA_AUDIO_WORKLET_PROCESSORS} from './audio-worklet-processors';
import {WA_AUDIO_WORKLET_SUPPORT} from './audio-worklet-support';

export const WA_AUDIO_WORKLET_PROCESSORS_READY = new InjectionToken<Promise<boolean>>(
'[WA_AUDIO_WORKLET_PROCESSORS_READY]: Web Audio API worklet processors resolution promise',
'[WA_AUDIO_WORKLET_PROCESSORS_READY]',
{
providedIn: 'root',
factory: async () => {
Expand Down
2 changes: 1 addition & 1 deletion libs/audio/src/tokens/audio-worklet-processors.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {InjectionToken} from '@angular/core';

export const WA_AUDIO_WORKLET_PROCESSORS = new InjectionToken<readonly string[]>(
'[WA_AUDIO_WORKLET_PROCESSORS]: Web Audio API worklet processors paths',
'[WA_AUDIO_WORKLET_PROCESSORS]',
{
providedIn: 'root',
factory: () => [],
Expand Down
2 changes: 1 addition & 1 deletion libs/audio/src/tokens/audio-worklet-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {inject, InjectionToken} from '@angular/core';
import {WA_AUDIO_CONTEXT} from './audio-context';

export const WA_AUDIO_WORKLET_SUPPORT = new InjectionToken<boolean>(
'[WA_AUDIO_WORKLET_SUPPORT]: AudioWorklet browser support',
'[WA_AUDIO_WORKLET_SUPPORT]',
{
factory: () => !!inject(WA_AUDIO_CONTEXT).audioWorklet,
},
Expand Down
2 changes: 1 addition & 1 deletion libs/audio/src/tokens/constructor-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {WA_AUDIO_CONTEXT} from './audio-context';
* This is mostly for internal use only
*/
export const WA_CONSTRUCTOR_SUPPORT = new InjectionToken<boolean>(
'[WA_CONSTRUCTOR_SUPPORT]: Tests if constructor mode of node creation is supported or a fallback to factory method is needed',
'[WA_CONSTRUCTOR_SUPPORT]',
{
providedIn: 'root',
factory: () => {
Expand Down
2 changes: 1 addition & 1 deletion libs/audio/src/tokens/feedback-coefficients.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {InjectionToken} from '@angular/core';

export const WA_FEEDBACK_COEFFICIENTS = new InjectionToken<number[]>(
'[WA_FEEDBACK_COEFFICIENTS]: A sequence of feedback coefficients for IIRFilterNode',
'[WA_FEEDBACK_COEFFICIENTS]',
);

/**
Expand Down
2 changes: 1 addition & 1 deletion libs/audio/src/tokens/feedforward-coefficients.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {InjectionToken} from '@angular/core';

export const WA_FEEDFORWARD_COEFFICIENTS = new InjectionToken<number[]>(
'[WA_FEEDFORWARD_COEFFICIENTS]: A sequence of feedforward coefficients for IIRFilterNode',
'[WA_FEEDFORWARD_COEFFICIENTS]',
);

/**
Expand Down
4 changes: 1 addition & 3 deletions libs/audio/src/tokens/media-stream.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import {InjectionToken} from '@angular/core';

export const WA_MEDIA_STREAM = new InjectionToken<MediaStream>(
'[WA_MEDIA_STREAM]: MediaStream for MediaStreamAudioSourceNode',
);
export const WA_MEDIA_STREAM = new InjectionToken<MediaStream>('[WA_MEDIA_STREAM]');

/**
* @deprecated: drop in v5.0, use {@link WA_MEDIA_STREAM}
Expand Down
2 changes: 1 addition & 1 deletion libs/audio/src/tokens/support.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {InjectionToken} from '@angular/core';

export const WA_WEB_AUDIO_SUPPORT = new InjectionToken<boolean>(
'[WA_WEB_AUDIO_SUPPORT]: Web Audio API support',
'[WA_WEB_AUDIO_SUPPORT]',
{
providedIn: 'root',
factory: () => !!AudioContext,
Expand Down
2 changes: 1 addition & 1 deletion libs/canvas/src/tokens/canvas-2d-context.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {InjectionToken} from '@angular/core';

export const WA_CANVAS_2D_CONTEXT = new InjectionToken<CanvasRenderingContext2D>(
'[WA_CANVAS_2D_CONTEXT]: Canvas 2D rendering context',
'[WA_CANVAS_2D_CONTEXT]',
);

/**
Expand Down
4 changes: 1 addition & 3 deletions libs/canvas/src/tokens/canvas-method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import {InjectionToken} from '@angular/core';

import type {CanvasMethod} from '../interfaces/canvas-method';

export const WA_CANVAS_METHOD = new InjectionToken<CanvasMethod>(
'[WA_CANVAS_METHOD]: A directive that draws on canvas',
);
export const WA_CANVAS_METHOD = new InjectionToken<CanvasMethod>('[WA_CANVAS_METHOD]');

export function asCanvasMethod(useExisting: Type<CanvasMethod>): ExistingProvider {
return {
Expand Down
2 changes: 1 addition & 1 deletion libs/canvas/src/tokens/canvas-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {InjectionToken} from '@angular/core';
import type {CanvasMethod} from '../interfaces/canvas-method';

export const WA_CANVAS_PROPERTIES = new InjectionToken<CanvasMethod[]>(
'[WA_CANVAS_PROPERTIES]: A directive performing processing before and after drawing to canvas',
'[WA_CANVAS_PROPERTIES]',
{
factory: () => [],
},
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/tokens/animation-frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Observable, share} from 'rxjs';
import {WINDOW} from './window';

export const WA_ANIMATION_FRAME = new InjectionToken<Observable<DOMHighResTimeStamp>>(
'[WA_ANIMATION_FRAME]: Shared Observable based on `window.requestAnimationFrame`',
'[WA_ANIMATION_FRAME]',
{
factory: () => {
const {requestAnimationFrame, cancelAnimationFrame} = inject(WINDOW);
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/caches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_CACHES = new InjectionToken<CacheStorage>(
'[WA_CACHES]: An abstraction over window.caches object',
{
factory: () => inject(WINDOW).caches,
},
);
export const WA_CACHES = new InjectionToken<CacheStorage>('[WA_CACHES]', {
factory: () => inject(WINDOW).caches,
});

/**
* @deprecated: drop in v5.0, use {@link WA_CACHES}
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_CRYPTO = new InjectionToken<Crypto>(
'[WA_CRYPTO]: An abstraction over window.crypto object',
{
factory: () => inject(WINDOW).crypto,
},
);
export const WA_CRYPTO = new InjectionToken<Crypto>('[WA_CRYPTO]', {
factory: () => inject(WINDOW).crypto,
});

/**
* @deprecated: drop in v5.0, use {@link WA_CRYPTO}
Expand Down
21 changes: 9 additions & 12 deletions libs/common/src/tokens/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,15 @@ declare global {
}
}

export const WA_CSS = new InjectionToken<typeof CSS>(
'[WA_CSS]: An abstraction over window.CSS object',
{
factory: () =>
inject(WINDOW).CSS ??
({
escape: (v) => v,
// eslint-disable-next-line no-restricted-syntax
supports: () => false,
} satisfies typeof CSS),
},
);
export const WA_CSS = new InjectionToken<typeof CSS>('[WA_CSS]', {
factory: () =>
inject(WINDOW).CSS ??
({
escape: (v) => v,
// eslint-disable-next-line no-restricted-syntax
supports: () => false,
} satisfies typeof CSS),
});

/**
* @deprecated: drop in v5.0, use {@link WA_CSS}
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_HISTORY = new InjectionToken<History>(
'[WA_HISTORY]: An abstraction over window.history object',
{
factory: () => inject(WINDOW).history,
},
);
export const WA_HISTORY = new InjectionToken<History>('[WA_HISTORY]', {
factory: () => inject(WINDOW).history,
});

/**
* @deprecated: drop in v5.0, use {@link WA_HISTORY}
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/local-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_LOCAL_STORAGE = new InjectionToken<Storage>(
'[WA_LOCAL_STORAGE]: An abstraction over window.localStorage object',
{
factory: () => inject(WINDOW).localStorage,
},
);
export const WA_LOCAL_STORAGE = new InjectionToken<Storage>('[WA_LOCAL_STORAGE]', {
factory: () => inject(WINDOW).localStorage,
});

/**
* @deprecated: drop in v5.0, use {@link WA_LOCAL_STORAGE}
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_LOCATION = new InjectionToken<Location>(
'[WA_LOCATION]: An abstraction over window.location object',
{
factory: () => inject(WINDOW).location,
},
);
export const WA_LOCATION = new InjectionToken<Location>('[WA_LOCATION]', {
factory: () => inject(WINDOW).location,
});

/**
* @deprecated: drop in v5.0, use {@link WA_LOCATION}
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/media-devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {NAVIGATOR} from './navigator';

export const WA_MEDIA_DEVICES = new InjectionToken<MediaDevices>(
'[WA_MEDIA_DEVICES]: An abstraction over window.navigator.mediaDevices object',
{
factory: () => inject(NAVIGATOR).mediaDevices,
},
);
export const WA_MEDIA_DEVICES = new InjectionToken<MediaDevices>('[WA_MEDIA_DEVICES]', {
factory: () => inject(NAVIGATOR).mediaDevices,
});

/**
* @deprecated: drop in v5.0, use {@link WA_MEDIA_DEVICES}
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_NAVIGATOR = new InjectionToken<Navigator>(
'[WA_NAVIGATOR]: An abstraction over window.navigator object',
{
factory: () => inject(WINDOW).navigator,
},
);
export const WA_NAVIGATOR = new InjectionToken<Navigator>('[WA_NAVIGATOR]', {
factory: () => inject(WINDOW).navigator,
});

/**
* @deprecated: drop in v5.0, use {@link WA_NAVIGATOR}
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/tokens/network-information.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {WA_NAVIGATOR} from './navigator';
export const WA_NETWORK_INFORMATION = new InjectionToken<
// @ts-ignore
(typeof navigator)['connection'] | null
>('[WA_NETWORK_INFORMATION]: An abstraction over window.navigator.connection object', {
>('[WA_NETWORK_INFORMATION]', {
// @ts-ignore
factory: () => inject(WA_NAVIGATOR).connection || null,
});
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/tokens/page-visibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {Observable} from 'rxjs';
import {distinctUntilChanged, fromEvent, map, shareReplay, startWith} from 'rxjs';

export const WA_PAGE_VISIBILITY = new InjectionToken<Observable<boolean>>(
'[WA_PAGE_VISIBILITY]: Shared Observable based on `document visibility changed`',
'[WA_PAGE_VISIBILITY]',
{
factory: () => {
const documentRef = inject(DOCUMENT);
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_PERFORMANCE = new InjectionToken<Performance>(
'[WA_PERFORMANCE]: An abstraction over window.performance object',
{
factory: () => inject(WINDOW).performance,
},
);
export const WA_PERFORMANCE = new InjectionToken<Performance>('[WA_PERFORMANCE]', {
factory: () => inject(WINDOW).performance,
});

/**
* @deprecated: drop in v5.0, use {@link WA_PERFORMANCE}
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_SCREEN = new InjectionToken<Screen>(
'[WA_SCREEN]: An abstraction over window.screen object',
{
factory: () => inject(WINDOW).screen,
},
);
export const WA_SCREEN = new InjectionToken<Screen>('[WA_SCREEN]', {
factory: () => inject(WINDOW).screen,
});

/**
* @deprecated: drop in v5.0, use {@link WA_SCREEN}
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/session-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {WINDOW} from './window';

export const WA_SESSION_STORAGE = new InjectionToken<Storage>(
'[WA_SESSION_STORAGE]: An abstraction over window.sessionStorage object',
{
factory: () => inject(WINDOW).sessionStorage,
},
);
export const WA_SESSION_STORAGE = new InjectionToken<Storage>('[WA_SESSION_STORAGE]', {
factory: () => inject(WINDOW).sessionStorage,
});

/**
* @deprecated: drop in v5.0, use {@link WA_SESSION_STORAGE}
Expand Down
15 changes: 5 additions & 10 deletions libs/common/src/tokens/speech-recognition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ import {WINDOW} from './window';
export const WA_SPEECH_RECOGNITION = new InjectionToken<
// @ts-ignore
(typeof window)['speechRecognition'] | null
>(
'[WA_SPEECH_RECOGNITION]: [SPEECH_RECOGNITION]: An abstraction over SpeechRecognition class',
{
factory: () => {
const windowRef: any = inject(WINDOW);
>('[WA_SPEECH_RECOGNITION]: [SPEECH_RECOGNITION]', {
factory: () => {
const windowRef: any = inject(WINDOW);

return (
windowRef.speechRecognition || windowRef.webkitSpeechRecognition || null
);
},
return windowRef.speechRecognition || windowRef.webkitSpeechRecognition || null;
},
);
});

/**
* @deprecated: drop in v5.0, use {@link WA_SPEECH_RECOGNITION}
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/tokens/speech-synthesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {inject, InjectionToken} from '@angular/core';
import {WINDOW} from './window';

export const WA_SPEECH_SYNTHESIS = new InjectionToken<SpeechSynthesis>(
'[WA_SPEECH_SYNTHESIS]: An abstraction over window.speechSynthesis object',
'[WA_SPEECH_SYNTHESIS]',
{
factory: () => inject(WINDOW).speechSynthesis,
},
Expand Down
9 changes: 3 additions & 6 deletions libs/common/src/tokens/user-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {inject, InjectionToken} from '@angular/core';

import {NAVIGATOR} from './navigator';

export const WA_USER_AGENT = new InjectionToken<string>(
'[WA_USER_AGENT]: An abstraction over window.navigator.userAgent object',
{
factory: () => inject(NAVIGATOR).userAgent,
},
);
export const WA_USER_AGENT = new InjectionToken<string>('[WA_USER_AGENT]', {
factory: () => inject(NAVIGATOR).userAgent,
});

/**
* @deprecated: drop in v5.0, use {@link WA_USER_AGENT}
Expand Down
Loading

0 comments on commit 3e17988

Please sign in to comment.