style: organize imports and format

This commit is contained in:
uncenter 2025-10-22 12:48:01 -05:00
parent 2b22a61b61
commit 7208c591fc
No known key found for this signature in database
10 changed files with 17 additions and 10 deletions

View File

@ -1,5 +1,6 @@
// See https://github.com/fregante/webext-dynamic-content-scripts/blob/main/how-to-add-github-enterprise-support-to-web-extensions.md.
import 'webext-dynamic-content-scripts';
import addPermissionToggle from 'webext-permission-toggle';
export default defineBackground({

View File

@ -1,12 +1,14 @@
import { defineContentScript } from '#imports';
import { observe } from 'selector-observer';
import type { ReplacementSelectorSet } from '@/sites';
import { type ReplacementSelectorSet, matches, sites } from '@/sites';
import { matches, sites } from '@/sites';
import { flavor } from '@/storage';
import { createStylesElement } from '@/utils';
import { injectStyles, replaceIconInRow } from './lib';
import { observe } from 'selector-observer';
export default defineContentScript({
// Make sure `matches` URLs are updated in wxt.config.ts as well.
matches: matches,

View File

@ -1,13 +1,13 @@
import type { ReplacementSelectorSet } from '@/sites';
import type { IconName } from '@/types';
import { getAssociations } from '@/associations';
import { ATTRIBUTE_PREFIX, CSS_SELECTOR_SELF } from '@/constants';
import { flavor, monochrome, specificFolders } from '@/storage';
import { flavors } from '@catppuccin/palette';
import { ATTRIBUTE_PREFIX, CSS_SELECTOR_SELF } from '@/constants';
import icons from '@/icons.json';
import type { ReplacementSelectorSet } from '@/sites';
export async function injectStyles(stylesEl: Element, siteStyles: string) {
stylesEl.textContent =

View File

@ -1,7 +1,7 @@
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',
sans-serif;
font-family:
system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
width: 600px;
height: max-content;

View File

@ -1,4 +1,5 @@
import type { ReplacementSelectorSet, Site } from '.';
import { ATTRIBUTE_PREFIX } from '../constants';
const mainRepositoryImplementation: ReplacementSelectorSet = {

View File

@ -1,4 +1,5 @@
import type { ReplacementSelectorSet, Site } from '.';
import { ATTRIBUTE_PREFIX, CSS_SELECTOR_SELF } from '../constants';
const mainRepositoryImplementation: ReplacementSelectorSet = {

View File

@ -1,4 +1,5 @@
import type { ReplacementSelectorSet, Site } from '.';
import { ATTRIBUTE_PREFIX } from '../constants';
// For the inner repository file sidepanel. Extra specificity to avoid matching icons on the new commit details page, which uses the same component.

View File

@ -1,4 +1,5 @@
import type { ReplacementSelectorSet, Site } from '.';
import { ATTRIBUTE_PREFIX } from '../constants';
const repositoryMainImplementation: ReplacementSelectorSet = {

View File

@ -1,4 +1,5 @@
import type { ReplacementSelectorSet, Site } from '.';
import { ATTRIBUTE_PREFIX } from '../constants';
const mainRepositoryImplementation: ReplacementSelectorSet = {

View File

@ -1,12 +1,11 @@
import { defineConfig } from 'wxt';
import { matches } from './src/sites';
import { join } from 'node:path';
import { hfs } from '@humanfs/node';
import jiti from 'jiti';
import { matches } from './src/sites';
export default defineConfig({
srcDir: 'src',
entrypointsDir: 'entries',