-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from ator-dev/hierarchy-improve
Improve organisation of the src/ hierarchy
- Loading branch information
Showing
33 changed files
with
126 additions
and
116 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ jobs: | |
run: | | ||
git clone https://user:[email protected]/$GITHUB_REPOSITORY | ||
cd ${{ env.REPO_NAME }} | ||
version=$( cat manifest/firefox.json | jq --raw-output '.version' ) | ||
version=$( cat platform/firefox/manifest.json | jq --raw-output '.version' ) | ||
tag_name=v$version | ||
git config user.name "searchmarkers" | ||
git config user.email "[email protected]" | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,6 @@ | |
{ | ||
"resources": [ | ||
"/icons/*.svg", | ||
"/dist/paint.js", | ||
"/dist/content.mjs", | ||
"/dist/modules/*.mjs" | ||
], | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,6 @@ | |
{ | ||
"resources": [ | ||
"/icons/*.svg", | ||
"/dist/paint.js", | ||
"/dist/content.mjs", | ||
"/dist/modules/*.mjs" | ||
], | ||
|
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* This file is part of Mark My Search. | ||
* Copyright © 2021-present ‘ator-dev’, Mark My Search contributors. | ||
* Licensed under the EUPL-1.2-or-later. | ||
*/ | ||
|
||
import type { MatchTerm } from "/dist/modules/match-term.mjs"; | ||
|
||
type BaseFlow<WithNode extends boolean> = { | ||
text: string | ||
spans: Array<BaseSpan<WithNode>> | ||
} | ||
|
||
type BaseSpan<WithNode extends boolean> = { | ||
term: MatchTerm | ||
start: number | ||
end: number | ||
} & (WithNode extends true | ||
? { node: Text } | ||
: Record<never, never> | ||
) | ||
|
||
export type { BaseFlow, BaseSpan }; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* This file is part of Mark My Search. | ||
* Copyright © 2021-present ‘ator-dev’, Mark My Search contributors. | ||
* Licensed under the EUPL-1.2-or-later. | ||
*/ | ||
|
||
abstract class TermCSS { | ||
static getFlatStyle (this: void, color: string) { | ||
return color; | ||
} | ||
|
||
static getDiagonalStyle (this: void, colorA: string, colorB: string, cycle: number) { | ||
const isAboveStyleLevel = (level: number) => cycle >= level; | ||
return isAboveStyleLevel(1) | ||
? `repeating-linear-gradient(${ | ||
isAboveStyleLevel(3) ? isAboveStyleLevel(4) ? 0 : 90 : isAboveStyleLevel(2) ? 45 : -45 | ||
}deg, ${colorA}, ${colorA} 2px, ${colorB} 2px, ${colorB} 8px)` | ||
: colorA; | ||
} | ||
|
||
static getHorizontalStyle (this: void, colorA: string, colorB: string, cycle: number) { | ||
const isAboveStyleLevel = (level: number) => cycle >= level; | ||
return isAboveStyleLevel(1) | ||
? `linear-gradient(${Array(Math.floor(cycle/2 + 1.5) * 2) | ||
.fill("") | ||
.map((v, i) => ( | ||
(Math.floor(i / 2) % 2 == cycle % 2 ? colorB : colorA) | ||
+ (Math.floor((i + 1) / 2)/(Math.floor((cycle + 1) / 2) + 1) * 100) + "%" | ||
)) | ||
.join(", ") | ||
})` | ||
: colorA; | ||
} | ||
} | ||
|
||
export default TermCSS; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.