Skip to content

Commit

Permalink
Do not run prettier on generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
muodov committed Nov 4, 2024
1 parent 055c9f7 commit 6bd83b5
Show file tree
Hide file tree
Showing 10 changed files with 635 additions and 628 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
build/**/*
docs/**/*
injected/src/types
special-pages/types
injected/integration-test/extension/contentScope.js
**/*.json
**/*.md
**/*.html
Expand Down
130 changes: 65 additions & 65 deletions injected/src/types/duckplayer-settings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,113 +9,113 @@
* @module Duckplayer Settings Schema
*/

export type State = 'enabled' | 'disabled'
export type State = "enabled" | "disabled";

/**
* Settings configuration for video player
*/
export interface DuckPlayerSettings {
overlays: Overlays
/**
* List of domains with specific patch settings
*/
domains: Domain[]
overlays: Overlays;
/**
* List of domains with specific patch settings
*/
domains: Domain[];
}
/**
* Specific configurations for different overlay types
*/
export interface Overlays {
youtube: YouTubeOverlay
serpProxy: SERPProxy
youtube: YouTubeOverlay;
serpProxy: SERPProxy;
}
/**
* Configuration specific to YouTube overlays
*/
export interface YouTubeOverlay {
state: State
selectors: Selectors
thumbnailOverlays: ThumbnailOverlays
clickInterception: ClickInterception
videoOverlays: VideoOverlays
state: State;
selectors: Selectors;
thumbnailOverlays: ThumbnailOverlays;
clickInterception: ClickInterception;
videoOverlays: VideoOverlays;
}
/**
* CSS selectors for identifying specific HTML elements on a YouTube page
*/
export interface Selectors {
/**
* CSS selector for YouTube thumbnail links
*/
thumbLink: string
/**
* CSS selectors for regions to exclude from hover/click interactions
*/
excludedRegions: string[]
/**
* CSS selectors for elements that should prevent side effects from hovers
*/
hoverExcluded: string[]
/**
* CSS selectors for elements that should prevent side effects from clicks
*/
clickExcluded: string[]
/**
* CSS selectors to explicitly allow known event targets for hovers/clicks. For example, preview overlays.
*/
allowedEventTargets: string[]
/**
* CSS selector for the video element on YouTube
*/
videoElement: string
/**
* CSS selector for the container of the video element
*/
videoElementContainer: string
/**
* CSS selector for YouTube thumbnail links
*/
thumbLink: string;
/**
* CSS selectors for regions to exclude from hover/click interactions
*/
excludedRegions: string[];
/**
* CSS selectors for elements that should prevent side effects from hovers
*/
hoverExcluded: string[];
/**
* CSS selectors for elements that should prevent side effects from clicks
*/
clickExcluded: string[];
/**
* CSS selectors to explicitly allow known event targets for hovers/clicks. For example, preview overlays.
*/
allowedEventTargets: string[];
/**
* CSS selector for the video element on YouTube
*/
videoElement: string;
/**
* CSS selector for the container of the video element
*/
videoElementContainer: string;
}
/**
* Settings related to the display of thumbnail overlays
*/
export interface ThumbnailOverlays {
state: State
state: State;
}
/**
* Settings for intercepting click events
*/
export interface ClickInterception {
state: State
state: State;
}
/**
* Settings related to the display of video overlays
*/
export interface VideoOverlays {
state: State
state: State;
}
/**
* Configuration for the SERP (Search Engine Results Page) proxy
*/
export interface SERPProxy {
state: State
state: State;
}
export interface Domain {
/**
* Domain name
*/
domain: string
/**
* List of operations to be applied on the settings for a specific domain
*/
patchSettings: PatchSetting[]
/**
* Domain name
*/
domain: string;
/**
* List of operations to be applied on the settings for a specific domain
*/
patchSettings: PatchSetting[];
}
export interface PatchSetting {
/**
* The operation to be performed
*/
op: string
/**
* The path of the setting to be patched
*/
path: string
/**
* The value to replace at the specified path
*/
value: string
/**
* The operation to be performed
*/
op: string;
/**
* The path of the setting to be patched
*/
path: string;
/**
* The value to replace at the specified path
*/
value: string;
}
40 changes: 20 additions & 20 deletions injected/src/types/web-compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@
* Requests, Notifications and Subscriptions from the WebCompat feature
*/
export interface WebCompatMessages {
requests: WebShareRequest
requests: WebShareRequest;
}
/**
* Generated from @see "../messages/web-compat/webShare.request.json"
*/
export interface WebShareRequest {
method: 'webShare'
params: WebShareParams
method: "webShare";
params: WebShareParams;
}
/**
* todo: add description for `webShare` message
*/
export interface WebShareParams {
/**
* todo: add description for 'title' field
*/
title?: string
/**
* todo: add description for 'url' field
*/
url?: string
/**
* todo: add description for 'text' field
*/
text?: string
/**
* todo: add description for 'title' field
*/
title?: string;
/**
* todo: add description for 'url' field
*/
url?: string;
/**
* todo: add description for 'text' field
*/
text?: string;
}

declare module '../features/web-compat.js' {
export interface WebCompat {
request: import('@duckduckgo/messaging/lib/shared-types').MessagingBase<WebCompatMessages>['request']
}
}
declare module "../features/web-compat.js" {
export interface WebCompat {
request: import("@duckduckgo/messaging/lib/shared-types").MessagingBase<WebCompatMessages>['request']
}
}
120 changes: 60 additions & 60 deletions injected/src/types/webcompat-settings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,76 +9,76 @@
* @module Webcompat Settings Schema
*/

export type State = 'enabled' | 'disabled'
export type State = "enabled" | "disabled";
/**
* List of domains with specific patch settings
*/
export type Domains = Domain[]
export type Domains = Domain[];

/**
* Settings configuration for Web Compat
*/
export interface WebCompatSettings {
windowSizing?: State
navigatorCredentials?: State
safariObject?: State
messageHandlers?: {
state: State
handlerStrategies: {
reflect: string[]
polyfill: string[]
undefined: string[]
}
}
modifyLocalStorage?: {
state: State
changes: {
key: string
action: string
}[]
}
notification?: {
state: State
}
permissions?: {
state: State
supportedPermissions: {}
}
mediaSession?: State
presentation?: State
webShare?: State
viewportWidth?:
| State
| {
state: State
forcedDesktopValue?: string
forcedMobileValue?: string
}
screenLock?: State
domains?: Domains
plainTextViewPort?: State
windowSizing?: State;
navigatorCredentials?: State;
safariObject?: State;
messageHandlers?: {
state: State;
handlerStrategies: {
reflect: string[];
polyfill: string[];
undefined: string[];
};
};
modifyLocalStorage?: {
state: State;
changes: {
key: string;
action: string;
}[];
};
notification?: {
state: State;
};
permissions?: {
state: State;
supportedPermissions: {};
};
mediaSession?: State;
presentation?: State;
webShare?: State;
viewportWidth?:
| State
| {
state: State;
forcedDesktopValue?: string;
forcedMobileValue?: string;
};
screenLock?: State;
domains?: Domains;
plainTextViewPort?: State;
}
export interface Domain {
/**
* Domain name
*/
domain: string | string[]
/**
* List of operations to be applied on the settings for a specific domain
*/
patchSettings: PatchSetting[]
/**
* Domain name
*/
domain: string | string[];
/**
* List of operations to be applied on the settings for a specific domain
*/
patchSettings: PatchSetting[];
}
export interface PatchSetting {
/**
* The operation to be performed
*/
op: string
/**
* The path of the setting to be patched
*/
path: string
/**
* The value to replace at the specified path
*/
value: string | unknown[] | {} | number
/**
* The operation to be performed
*/
op: string;
/**
* The path of the setting to be patched
*/
path: string;
/**
* The value to replace at the specified path
*/
value: string | unknown[] | {} | number;
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6bd83b5

Please sign in to comment.