diff --git a/.github/Image/DarkAstro.svg b/.github/Image/DarkAstro.svg new file mode 100644 index 00000000..316afa57 --- /dev/null +++ b/.github/Image/DarkAstro.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/.github/Image/LightAstro.svg b/.github/Image/LightAstro.svg new file mode 100644 index 00000000..3315635a --- /dev/null +++ b/.github/Image/LightAstro.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4d4096fb..0bd58331 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,5 @@ version: 2 + updates: - package-ecosystem: "github-actions" directory: "/" diff --git a/.github/workflows/dependabot.yml b/.github/workflows/Dependabot.yml similarity index 69% rename from .github/workflows/dependabot.yml rename to .github/workflows/Dependabot.yml index fb496916..819f8a17 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/Dependabot.yml @@ -1,29 +1,44 @@ name: Dependabot concurrency: - group: dependabot-${{ github.workflow }}-${{ github.ref }} + group: Dependabot-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -on: - workflow_dispatch: - pull_request: - permissions: + security-events: write contents: write pull-requests: write +on: + workflow_dispatch: + pull_request: + jobs: - approve-and-merge: + Approve: runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: - uses: dependabot/fetch-metadata@v1.6.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" + - run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + Merge: + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - uses: dependabot/fetch-metadata@v1.6.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} diff --git a/.github/workflows/NPM.yml b/.github/workflows/NPM.yml index 59e489f8..c890b37a 100644 --- a/.github/workflows/NPM.yml +++ b/.github/workflows/NPM.yml @@ -1,11 +1,13 @@ name: NPM concurrency: - group: npm-${{ github.workflow }}-${{ github.ref }} + group: NPM-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: security-events: write + contents: write + pull-requests: write on: workflow_dispatch: @@ -14,17 +16,21 @@ on: workflow_call: jobs: - publish: + Publish: runs-on: ubuntu-latest + permissions: contents: read id-token: write + steps: - - uses: actions/checkout@v3.5.3 - - uses: actions/setup-node@v3.7.0 + - uses: actions/checkout@v4.1.1 + + - uses: actions/setup-node@v4.0.0 with: node-version: "18" registry-url: "https://registry.npmjs.org" + - run: npm install -g npm - name: Publish . diff --git a/.github/workflows/node.yml b/.github/workflows/Node.yml similarity index 83% rename from .github/workflows/node.yml rename to .github/workflows/Node.yml index c44a32e4..bc12d1a7 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/Node.yml @@ -1,11 +1,13 @@ name: Node concurrency: - group: node-${{ github.workflow }}-${{ github.ref }} + group: Node-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: security-events: write + contents: write + pull-requests: write on: workflow_dispatch: @@ -16,7 +18,7 @@ on: workflow_call: jobs: - node: + Pre-Publish: runs-on: ubuntu-latest env: @@ -51,20 +53,19 @@ jobs: strategy: matrix: - node-version: [16, 18, 19] + node-version: [18, 19, 20] steps: - - uses: actions/checkout@v3.5.3 + - uses: actions/checkout@v4.1.1 + - uses: pnpm/action-setup@v2.4.0 with: - version: 8.6.6 + version: 8.6.12 run_install: | - recursive: true args: [ - --child-concurrency=9999, --link-workspace-packages=true, --lockfile-only, - --network-concurrency=9999, --prefer-frozen-lockfile=false, --shamefully-hoist=false, --shared-workspace-lockfile=true, @@ -72,18 +73,19 @@ jobs: --unsafe-perm=true ] - - uses: actions/setup-node@v3.7.0 + - uses: actions/setup-node@v4.0.0 with: node-version: ${{ matrix.node-version }} cache: "pnpm" cache-dependency-path: ./pnpm-lock.yaml + - run: pnpm install working-directory: . - run: pnpm run prepublishOnly working-directory: . - - uses: actions/upload-artifact@v3.1.2 + - uses: actions/upload-artifact@v4.0.0 with: - name: .-node-${{ matrix.node-version }}-Target + name: .-Node-${{ matrix.node-version }}-Target path: ./Target diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 9ef91a07..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: "CodeQL" - -concurrency: - group: codeql-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - security-events: write - -on: - workflow_dispatch: - push: - branches: [main] - pull_request: - branches: [main] - workflow_call: - -jobs: - codeql: - runs-on: ubuntu-latest - - env: - ADBLOCK: true - TELEMETRY_DISABLED: 1 - ASTRO_TELEMETRY_DISABLED: 1 - AUTOMATEDLAB_TELEMETRY_OPTOUT: 1 - AZURE_CORE_COLLECT_TELEMETRY: 0 - CHOOSENIM_NO_ANALYTICS: 1 - DIEZ_DO_NOT_TRACK: 1 - DO_NOT_TRACK: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1 - ET_NO_TELEMETRY: 1 - GATSBY_TELEMETRY_DISABLED: 1 - GATSBY_TELEMETRY_OPT_OUT: 1 - GATSBY_TELEMETRY_OPTOUT: 1 - HASURA_GRAPHQL_ENABLE_TELEMETRY: false - HINT_TELEMETRY: off - HOMEBREW_NO_ANALYTICS: 1 - INFLUXD_REPORTING_DISABLED: true - ITERATIVE_DO_NOT_TRACK: 1 - NEXT_TELEMETRY_DEBUG: 1 - NEXT_TELEMETRY_DISABLED: 1 - NG_CLI_ANALYTICS: false - NUXT_TELEMETRY_DISABLED: 1 - PIN_DO_NOT_TRACK: 1 - POWERSHELL_TELEMETRY_OPTOUT: 1 - SAM_CLI_TELEMETRY: 0 - STNOUPGRADE: 1 - STRIPE_CLI_TELEMETRY_OPTOUT: 1 - - steps: - - uses: actions/checkout@v3.5.3 - - - uses: github/codeql-action/init@v2.21.3 - with: - languages: javascript - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2.21.3 - with: - category: "/language:javascript" diff --git a/.npmignore b/.npmignore index 1244cda2..d0265ba4 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,6 @@ .github/ -.turbo/ Source/ +Documentation/ +CHANGELOG.md +CODE_OF_CONDUCT.md +CONTRIBUTING.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e6f1ad3..9fd18e14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,114 @@ +## 2.2.5 + +- Bug fix + +## 2.2.4 + +- Cleanup +- Colorizes output + +## 2.2.3 + +- Cleanup + +## 2.2.2 + +- Cleanup + +## 2.2.1 + +- Bug fix + +## 2.2.0 + +- Bug fix +- Refactor allowing multiple parsers + +## 2.1.6 + +- Cleanup + +## 2.1.5 + +- Cleanup + +## 2.1.4 + +- Bug fix + +## 2.1.3 + +- Bug fix + +## 2.1.2 + +- Bug fix + +## 2.1.1 + +- Cleanup + +## 2.1.0 + +- Refactor +- Documentation + +## 2.0.15 + +- Cleanup + +## 2.0.14 + +- Cleanup + +## 2.0.13 + +- Cleanup + +## 2.0.12 + +- Cleanup + +## 2.0.11 + +- Cleanup + +## 2.0.10 + +- Cleanup + +## 2.0.9 + +- Cleanup + +## 2.0.8 + +- Cleanup + +## 2.0.7 + +- Cleanup + +## 2.0.6 + +- Cleanup + +## 2.0.5 + +- Cleanup + +## 2.0.4 + +- Cleanup + +## 2.0.2 + +- Cleanup + +## 2.0.1 + +- Restoration + ## 1.1.50 - Cleanup diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index e5da8c1c..b4f1f9be 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -73,9 +73,10 @@ representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at nikola@lightrix.help. All complaints will be reviewed and investigated promptly and fairly. -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. +reported to the community leaders responsible for enforcement at +nikola@nikolahristov.tech. All complaints will be reviewed and investigated +promptly and fairly. All community leaders are obligated to respect the privacy +and security of the reporter of any incident. ## Enforcement Guidelines diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87ce38ce..c7401851 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,9 +61,10 @@ representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at nikola@lightrix.help. All complaints will be reviewed and investigated promptly and fairly. -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. +reported to the community leaders responsible for enforcement at +nikola@nikolahristov.tech. All complaints will be reviewed and investigated +promptly and fairly. All community leaders are obligated to respect the privacy +and security of the reporter of any incident. ## Enforcement Guidelines diff --git a/Documentation/.nojekyll b/Documentation/.nojekyll new file mode 100644 index 00000000..e2ac6616 --- /dev/null +++ b/Documentation/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/Documentation/Function/Function_Directory.directory.html b/Documentation/Function/Function_Directory.directory.html new file mode 100644 index 00000000..808dbd47 --- /dev/null +++ b/Documentation/Function/Function_Directory.directory.html @@ -0,0 +1 @@ +directory | astro-compress - v2.2.5

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Image.Image-2.html b/Documentation/Function/Image.Image-2.html new file mode 100644 index 00000000..d105fdaf --- /dev/null +++ b/Documentation/Function/Image.Image-2.html @@ -0,0 +1,2 @@ +image | astro-compress - v2.2.5

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Defaultsharp-1.html b/Documentation/Function/Integration.Defaultsharp-1.html new file mode 100644 index 00000000..3f801bcb --- /dev/null +++ b/Documentation/Function/Integration.Defaultsharp-1.html @@ -0,0 +1,5 @@ +Defaultsharp | astro-compress - v2.2.5
  • Creates a sharp instance from an image

    +

    Parameters

    • Optional options: SharpOptions

      Object with optional attributes.

      +

    Returns sharp.Sharp

    A sharp instance that can be used to chain operations

    +

    Throws

    Invalid parameters

    +
  • Parameters

    Returns sharp.Sharp

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Defaultsharp.block.html b/Documentation/Function/Integration.Defaultsharp.block.html new file mode 100644 index 00000000..83e87046 --- /dev/null +++ b/Documentation/Function/Integration.Defaultsharp.block.html @@ -0,0 +1,8 @@ +block | astro-compress - v2.2.5
  • Block libvips operations at runtime.

    +

    This is in addition to the VIPS_BLOCK_UNTRUSTED environment variable, +which when set will block all "untrusted" operations.

    +

    Parameters

    • options: {
          operation: string[];
      }
      • operation: string[]

        List of libvips low-level operation names to block.

        +

    Returns void

    Since

    0.32.4

    +

    Example: Block all TIFF input.

    sharp.block({
    operation: ['VipsForeignLoadTiff']
    }); +
    +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Defaultsharp.cache.html b/Documentation/Function/Integration.Defaultsharp.cache.html new file mode 100644 index 00000000..e71658b5 --- /dev/null +++ b/Documentation/Function/Integration.Defaultsharp.cache.html @@ -0,0 +1,6 @@ +cache | astro-compress - v2.2.5
  • Gets or, when options are provided, sets the limits of libvips' operation cache. +Existing entries in the cache will be trimmed after any change in limits. +This method always returns cache statistics, useful for determining how much working memory is required for a particular task.

    +

    Parameters

    • Optional options: boolean | CacheOptions

      Object with the following attributes, or Boolean where true uses default cache settings and false removes all caching (optional, default true)

      +

    Returns CacheResult

    The cache results.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Defaultsharp.concurrency.html b/Documentation/Function/Integration.Defaultsharp.concurrency.html new file mode 100644 index 00000000..36392025 --- /dev/null +++ b/Documentation/Function/Integration.Defaultsharp.concurrency.html @@ -0,0 +1,6 @@ +concurrency | astro-compress - v2.2.5
  • Gets or sets the number of threads libvips' should create to process each image. +The default value is the number of CPU cores. A value of 0 will reset to this default. +The maximum number of images that can be processed in parallel is limited by libuv's UV_THREADPOOL_SIZE environment variable.

    +

    Parameters

    • Optional concurrency: number

      The new concurrency value.

      +

    Returns number

    The current concurrency value.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Defaultsharp.counters.html b/Documentation/Function/Integration.Defaultsharp.counters.html new file mode 100644 index 00000000..ba3698e0 --- /dev/null +++ b/Documentation/Function/Integration.Defaultsharp.counters.html @@ -0,0 +1,3 @@ +counters | astro-compress - v2.2.5
  • Provides access to internal task counters.

    +

    Returns SharpCounters

    Object containing task counters

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Defaultsharp.simd.html b/Documentation/Function/Integration.Defaultsharp.simd.html new file mode 100644 index 00000000..d460f2ba --- /dev/null +++ b/Documentation/Function/Integration.Defaultsharp.simd.html @@ -0,0 +1,5 @@ +simd | astro-compress - v2.2.5
  • Get and set use of SIMD vector unit instructions. Requires libvips to have been compiled with highway support. +Improves the performance of resize, blur and sharpen operations by taking advantage of the SIMD vector unit of the CPU, e.g. Intel SSE and ARM NEON.

    +

    Parameters

    • Optional enable: boolean

      enable or disable use of SIMD vector unit instructions

      +

    Returns boolean

    true if usage of SIMD vector unit instructions is enabled

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Defaultsharp.unblock.html b/Documentation/Function/Integration.Defaultsharp.unblock.html new file mode 100644 index 00000000..812fca9a --- /dev/null +++ b/Documentation/Function/Integration.Defaultsharp.unblock.html @@ -0,0 +1,9 @@ +unblock | astro-compress - v2.2.5
  • Unblock libvips operations at runtime.

    +

    This is useful for defining a list of allowed operations.

    +

    Parameters

    • options: {
          operation: string[];
      }
      • operation: string[]

        List of libvips low-level operation names to unblock.

        +

    Returns void

    Since

    0.32.4

    +

    Example: Block all input except WebP from the filesystem.

    sharp.block({
    operation: ['VipsForeignLoad']
    });
    sharp.unblock({
    operation: ['VipsForeignLoadWebpFile']
    }); +
    +

    Example: Block all input except JPEG and PNG from a Buffer or Stream.

    sharp.block({
    operation: ['VipsForeignLoad']
    });
    sharp.unblock({
    operation: ['VipsForeignLoadJpegBuffer', 'VipsForeignLoadPngBuffer']
    }); +
    +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Integration.html b/Documentation/Function/Integration.Integration.html new file mode 100644 index 00000000..cd1e8c62 --- /dev/null +++ b/Documentation/Function/Integration.Integration.html @@ -0,0 +1 @@ +integration | astro-compress - v2.2.5

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Function/Integration.Merge.html b/Documentation/Function/Integration.Merge.html new file mode 100644 index 00000000..0ae54679 --- /dev/null +++ b/Documentation/Function/Integration.Merge.html @@ -0,0 +1,2 @@ +Merge | astro-compress - v2.2.5
  • Merges multiple objects of type Ts using the provided merge functions and built-in metadata.

    +

    Type Parameters

    • Ts extends readonly unknown[]

    Parameters

    • Rest ...Objects: Ts

    Returns DeepMergeHKT<Ts, Readonly<{
        DeepMergeArraysURI: "DeepMergeLeafURI";
        DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
        DeepMergeOthersURI: "DeepMergeLeafURI";
        DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
        DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
    }>, Readonly<{
        key: PropertyKey;
        parents: readonly Readonly<Record<PropertyKey, unknown>>[];
    }>>

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/CSS.Type-1.html b/Documentation/Interface/CSS.Type-1.html new file mode 100644 index 00000000..cbab49fa --- /dev/null +++ b/Documentation/Interface/CSS.Type-1.html @@ -0,0 +1,50 @@ +Type | astro-compress - v2.2.5

Interface Type

interface Type {
    afterCompress?: AfterCompressFn | AfterCompressFn[];
    beforeCompress?: BeforeCompressFn | BeforeCompressFn[];
    clone?: boolean;
    comments?: boolean;
    debug?: boolean;
    filename?: string;
    forceMediaMerge?: boolean;
    logger?: (() => void);
    restructure?: boolean;
    sourceMap?: boolean;
    usage?: Usage;
}

Hierarchy

  • MinifyOptions
  • CompressOptions
    • Type

Properties

afterCompress?: AfterCompressFn | AfterCompressFn[]

Called right after compress() is run.

+
beforeCompress?: BeforeCompressFn | BeforeCompressFn[]

Called right after parse is run.

+
clone?: boolean

Transform a copy of input AST if true. Useful in case of AST reuse.

+

Default

false
+
+
comments?: boolean

Specify what comments to leave:

+
    +
  • 'exclamation' or true – leave all exclamation comments
  • +
  • 'first-exclamation' – remove every comment except first one
  • +
  • false – remove all comments
  • +
+

Default

AstroCompress false
+
+

Default

csso true
+
+
debug?: boolean

Output debug information to stderr.

+

Default

false
+
+
filename?: string

Filename of input CSS, uses for source map generation.

+

Default

'<unknown>'
+
+
forceMediaMerge?: boolean

Enables merging of

+

Media

rules with the same media query by splitted by other rules. +The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk.

+

Default

AstroCompress true
+
+

Default

csso false
+
+
logger?: (() => void)

Type declaration

    • (): void
    • Function to track every step of transformation.

      +

      Returns void

restructure?: boolean

Disable or enable a structure optimisations.

+

Default

AstroCompress false
+
+

Default

csso true
+
+
sourceMap?: boolean

Generate a source map when true.

+

Default

false
+
+
usage?: Usage

Usage data for advanced optimisations.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/CSS.Type.html b/Documentation/Interface/CSS.Type.html new file mode 100644 index 00000000..eb03a022 --- /dev/null +++ b/Documentation/Interface/CSS.Type.html @@ -0,0 +1,52 @@ +Type | astro-compress - v2.2.5

Interface Type

interface Type {
    analyzeDependencies?: boolean | DependencyOptions;
    cssModules?: boolean | CSSModulesConfig;
    customAtRules?: CustomAtRules;
    drafts?: Drafts;
    errorRecovery?: boolean;
    exclude?: number;
    include?: number;
    inputSourceMap?: string;
    minify?: boolean;
    nonStandard?: NonStandard;
    projectRoot?: string;
    pseudoClasses?: PseudoClasses;
    sourceMap?: boolean;
    targets?: Targets;
    unusedSymbols?: string[];
    visitor?: Visitor<CustomAtRules>;
}

Hierarchy

  • Omit<TransformOptions<CustomAtRules>, "filename" | "code">
    • Type

Properties

analyzeDependencies?: boolean | DependencyOptions

Whether to analyze dependencies (e.g. @import and url()). +When enabled, @import rules are removed, and url() dependencies +are replaced with hashed placeholders that can be replaced with the final +urls later (after bundling). Dependencies are returned as part of the result.

+
cssModules?: boolean | CSSModulesConfig

Whether to compile this file as a CSS module.

+
customAtRules?: CustomAtRules

Defines how to parse custom CSS at-rules. Each at-rule can have a prelude, defined using a CSS +syntax string, and +a block body. The body can be a declaration list, rule list, or style block as defined in the +css spec.

+
drafts?: Drafts

Whether to enable parsing various draft syntax.

+
errorRecovery?: boolean

Whether to ignore invalid rules and declarations rather than erroring. +When enabled, warnings are returned, and the invalid rule or declaration is +omitted from the output code.

+
exclude?: number

Features that should never be compiled, even when unsupported by targets.

+
include?: number

Features that should always be compiled, even when supported by targets.

+
inputSourceMap?: string

An input source map to extend.

+
minify?: boolean

Whether to enable minification

+

Default

AstroCompress true
+
+

Default

lightningcss false
+
+
nonStandard?: NonStandard

Whether to enable various non-standard syntax.

+
projectRoot?: string

An optional project root path, used as the source root in the output source map. +Also used to generate relative paths for sources used in CSS module hashes.

+
pseudoClasses?: PseudoClasses

Replaces user action pseudo classes with class names that can be applied from JavaScript. +This is useful for polyfills, for example.

+
sourceMap?: boolean

Whether to output a source map.

+
targets?: Targets

The browser targets for the generated code.

+
unusedSymbols?: string[]

A list of class names, ids, and custom identifiers (e.g. @keyframes) that are known +to be unused. These will be removed during minification. Note that these are not +selectors but individual names (without any . or # prefixes).

+
visitor?: Visitor<CustomAtRules>

An AST visitor object. This allows custom transforms or analysis to be implemented in JavaScript. +Multiple visitors can be composed into one using the composeVisitors function. +For optimal performance, visitors should be as specific as possible about what types of values +they care about so that JavaScript has to be called as little as possible.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/Directory.Type.html b/Documentation/Interface/Directory.Type.html new file mode 100644 index 00000000..4aff05fb --- /dev/null +++ b/Documentation/Interface/Directory.Type.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5
interface Type ((Path) => Promise<string>)

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/Image.Type-1.html b/Documentation/Interface/Image.Type-1.html new file mode 100644 index 00000000..ad21c407 --- /dev/null +++ b/Documentation/Interface/Image.Type-1.html @@ -0,0 +1,8 @@ +Type | astro-compress - v2.2.5
interface Type {
    avif?: boolean | AvifOptions;
    gif?: boolean | GifOptions;
    heif?: boolean | HeifOptions;
    jpeg?: boolean | JpegOptions;
    png?: boolean | PngOptions;
    tiff?: boolean | TiffOptions;
    webp?: boolean | WebpOptions;
    [key: string]: undefined | boolean | AvifOptions | GifOptions | HeifOptions | JpegOptions | PngOptions | TiffOptions | WebpOptions;
}

Indexable

[key: string]: undefined | boolean | AvifOptions | GifOptions | HeifOptions | JpegOptions | PngOptions | TiffOptions | WebpOptions

Properties

Properties

avif?: boolean | AvifOptions
gif?: boolean | GifOptions
heif?: boolean | HeifOptions
jpeg?: boolean | JpegOptions
png?: boolean | PngOptions
tiff?: boolean | TiffOptions
webp?: boolean | WebpOptions

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/Image.Type-2.html b/Documentation/Interface/Image.Type-2.html new file mode 100644 index 00000000..7b6cf0da --- /dev/null +++ b/Documentation/Interface/Image.Type-2.html @@ -0,0 +1,11 @@ +Type | astro-compress - v2.2.5
interface Type {
    After: number;
    Before: number;
    Buffer: {
        [key: string]: any;
    } & Sharp;
    Input: string;
    Output: string;
}

Hierarchy

  • Omit<File, "Buffer">
    • Type

Properties

Properties

After: number

The size after the action.

+
Before: number

The size before the action.

+
Buffer: {
    [key: string]: any;
} & Sharp

Type declaration

  • [key: string]: any

    biome-ignore lint/suspicious/noExplicitAny:

    +
Input: string

The input file.

+
Output: string

The output file.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/Image.Type.html b/Documentation/Interface/Image.Type.html new file mode 100644 index 00000000..7c7bc701 --- /dev/null +++ b/Documentation/Interface/Image.Type.html @@ -0,0 +1,2 @@ +Type | astro-compress - v2.2.5
interface Type ((Option, On) => Promise<any>)

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/Integration.Type.html b/Documentation/Interface/Integration.Type.html new file mode 100644 index 00000000..64dd217d --- /dev/null +++ b/Documentation/Interface/Integration.Type.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5
interface Type ((Option?) => AstroIntegration)

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/Map.Type.html b/Documentation/Interface/Map.Type.html new file mode 100644 index 00000000..824b1193 --- /dev/null +++ b/Documentation/Interface/Map.Type.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5

Interface Type

interface Type {
    [key: string]: string;
}

Indexable

[key: string]: string

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/Option.Type.html b/Documentation/Interface/Option.Type.html new file mode 100644 index 00000000..bd4df422 --- /dev/null +++ b/Documentation/Interface/Option.Type.html @@ -0,0 +1,33 @@ +Type | astro-compress - v2.2.5
interface Type {
    Action?: boolean | default;
    CSS?: boolean | {
        csso?: Type;
        lightningcss?: Type;
    };
    Cache?: boolean | default;
    Exclude?: boolean | Type | Type[] | Set<Type>;
    Files?: string | boolean | string[];
    HTML?: boolean | {
        html-minifier-terser?: Options;
    };
    Image?: boolean | {
        sharp?: Type;
    };
    JavaScript?: boolean | {
        terser?: MinifyOptions;
    };
    Logger?: boolean | Type;
    Map?: boolean | Type;
    Parser?: Type;
    Path?: boolean | Type | Type[] | Set<Type>;
    SVG?: boolean | {
        svgo?: Config;
    };
}

Hierarchy

  • default
    • Type

Properties

Action?: boolean | default

Action pipe configuration.

+
CSS?: boolean | {
    csso?: Type;
    lightningcss?: Type;
}

csso, lightningcss option properties

+

Type declaration

  • Optional csso?: Type
  • Optional lightningcss?: Type
Cache?: boolean | default

Configuration for the target cache.

+

Default

{ Search: "./", Folder: "./Cache" }
+
+
Exclude?: boolean | Type | Type[] | Set<Type>

Criteria for excluding files.

+
Files?: string | boolean | string[]

File patterns to be matched.

+
HTML?: boolean | {
    html-minifier-terser?: Options;
}

html-minifier-terser option properties

+

Type declaration

  • Optional html-minifier-terser?: Options
Image?: boolean | {
    sharp?: Type;
}

sharp option properties

+

Type declaration

  • Optional sharp?: Type
JavaScript?: boolean | {
    terser?: MinifyOptions;
}

terser option properties

+

Type declaration

  • Optional terser?: MinifyOptions
Logger?: boolean | Type

Debugging level.

+

Default

2
+
+
Map?: boolean | Type

Map to different file paths

+
Parser?: Type

Parsers for different file types

+
Path?: boolean | Type | Type[] | Set<Type>

Configuration for the target path(s).

+

Default

"./Target"
+
+
SVG?: boolean | {
    svgo?: Config;
}

svgo option properties

+

Type declaration

  • Optional svgo?: Config

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Interface/Parser.Type.html b/Documentation/Interface/Parser.Type.html new file mode 100644 index 00000000..8c642e28 --- /dev/null +++ b/Documentation/Interface/Parser.Type.html @@ -0,0 +1,7 @@ +Type | astro-compress - v2.2.5
interface Type {
    CSS?: Type | Type[];
    HTML?: "html-minifier-terser" | "html-minifier-terser"[];
    Image?: "sharp" | "sharp"[];
    JavaScript?: "terser" | "terser"[];
    SVG?: "svgo" | "svgo"[];
    [key: string]: any;
}

Indexable

[key: string]: any

biome-ignore lint/suspicious/noExplicitAny:

+

Properties

Properties

CSS?: Type | Type[]
HTML?: "html-minifier-terser" | "html-minifier-terser"[]
Image?: "sharp" | "sharp"[]
JavaScript?: "terser" | "terser"[]
SVG?: "svgo" | "svgo"[]

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/CSS.html b/Documentation/Module/CSS.html new file mode 100644 index 00000000..65f92de1 --- /dev/null +++ b/Documentation/Module/CSS.html @@ -0,0 +1,5 @@ +CSS | astro-compress - v2.2.5

Index

Interfaces

Variables

CSS +CSS +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Directory.html b/Documentation/Module/Directory.html new file mode 100644 index 00000000..bd71807b --- /dev/null +++ b/Documentation/Module/Directory.html @@ -0,0 +1,2 @@ +Directory | astro-compress - v2.2.5

Module Directory

Index

Interfaces

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/File.html b/Documentation/Module/File.html new file mode 100644 index 00000000..08ad945d --- /dev/null +++ b/Documentation/Module/File.html @@ -0,0 +1,3 @@ +File | astro-compress - v2.2.5

Index

Type Aliases

Variables

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Function_Directory.html b/Documentation/Module/Function_Directory.html new file mode 100644 index 00000000..e0337fdb --- /dev/null +++ b/Documentation/Module/Function_Directory.html @@ -0,0 +1,2 @@ +Function/Directory | astro-compress - v2.2.5

Module Function/Directory

Index

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/HTML.html b/Documentation/Module/HTML.html new file mode 100644 index 00000000..d6ccfd74 --- /dev/null +++ b/Documentation/Module/HTML.html @@ -0,0 +1,3 @@ +HTML | astro-compress - v2.2.5

Index

Type Aliases

Variables

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Image.html b/Documentation/Module/Image.html new file mode 100644 index 00000000..b6727a22 --- /dev/null +++ b/Documentation/Module/Image.html @@ -0,0 +1,8 @@ +Image | astro-compress - v2.2.5

Index

Interfaces

Variables

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Integration.Defaultsharp.html b/Documentation/Module/Integration.Defaultsharp.html new file mode 100644 index 00000000..eb30a011 --- /dev/null +++ b/Documentation/Module/Integration.Defaultsharp.html @@ -0,0 +1,16 @@ +Defaultsharp | astro-compress - v2.2.5

Index

Variables

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Integration.html b/Documentation/Module/Integration.html new file mode 100644 index 00000000..8ad4a6d5 --- /dev/null +++ b/Documentation/Module/Integration.html @@ -0,0 +1,10 @@ +Integration | astro-compress - v2.2.5

Module Integration

Index

Namespaces

Interfaces

Variables

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/JavaScript.html b/Documentation/Module/JavaScript.html new file mode 100644 index 00000000..bc9d6dc8 --- /dev/null +++ b/Documentation/Module/JavaScript.html @@ -0,0 +1,3 @@ +JavaScript | astro-compress - v2.2.5

Module JavaScript

Index

Type Aliases

Variables

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Map.html b/Documentation/Module/Map.html new file mode 100644 index 00000000..541ca42e --- /dev/null +++ b/Documentation/Module/Map.html @@ -0,0 +1,3 @@ +Map | astro-compress - v2.2.5

Index

Interfaces

Variables

map +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Middleware.html b/Documentation/Module/Middleware.html new file mode 100644 index 00000000..670dc771 --- /dev/null +++ b/Documentation/Module/Middleware.html @@ -0,0 +1 @@ +Middleware | astro-compress - v2.2.5

Module Middleware

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Option.html b/Documentation/Module/Option.html new file mode 100644 index 00000000..ae11ffc2 --- /dev/null +++ b/Documentation/Module/Option.html @@ -0,0 +1,3 @@ +Option | astro-compress - v2.2.5

Index

Interfaces

Variables

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/Parser.html b/Documentation/Module/Parser.html new file mode 100644 index 00000000..924aaf10 --- /dev/null +++ b/Documentation/Module/Parser.html @@ -0,0 +1,8 @@ +Parser | astro-compress - v2.2.5

Index

Interfaces

Type Aliases

Variables

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Module/SVG.html b/Documentation/Module/SVG.html new file mode 100644 index 00000000..51f4b76c --- /dev/null +++ b/Documentation/Module/SVG.html @@ -0,0 +1,3 @@ +SVG | astro-compress - v2.2.5

Index

Type Aliases

Variables

SVG +

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/File.Type.html b/Documentation/Type/File.Type.html new file mode 100644 index 00000000..2c6a9713 --- /dev/null +++ b/Documentation/Type/File.Type.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5

Type alias Type

Type: keyof typeof _Map

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/HTML.Type.html b/Documentation/Type/HTML.Type.html new file mode 100644 index 00000000..b0f2b9b0 --- /dev/null +++ b/Documentation/Type/HTML.Type.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5

Type alias Type

Type: Options

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/JavaScript.Type.html b/Documentation/Type/JavaScript.Type.html new file mode 100644 index 00000000..dee476c2 --- /dev/null +++ b/Documentation/Type/JavaScript.Type.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5
Type: MinifyOptions

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/Parser.Type-1.html b/Documentation/Type/Parser.Type-1.html new file mode 100644 index 00000000..6c1b56da --- /dev/null +++ b/Documentation/Type/Parser.Type-1.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5
Type: "svgo"

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/Parser.Type-2.html b/Documentation/Type/Parser.Type-2.html new file mode 100644 index 00000000..092b8ef8 --- /dev/null +++ b/Documentation/Type/Parser.Type-2.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5
Type: "terser"

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/Parser.Type-3.html b/Documentation/Type/Parser.Type-3.html new file mode 100644 index 00000000..a7dc9682 --- /dev/null +++ b/Documentation/Type/Parser.Type-3.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5
Type: "sharp"

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/Parser.Type-4.html b/Documentation/Type/Parser.Type-4.html new file mode 100644 index 00000000..e94b48a0 --- /dev/null +++ b/Documentation/Type/Parser.Type-4.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5
Type: "html-minifier-terser"

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/Parser.Type-5.html b/Documentation/Type/Parser.Type-5.html new file mode 100644 index 00000000..9b5db727 --- /dev/null +++ b/Documentation/Type/Parser.Type-5.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5
Type: "csso" | "lightningcss"

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Type/SVG.Type.html b/Documentation/Type/SVG.Type.html new file mode 100644 index 00000000..39b0c4fa --- /dev/null +++ b/Documentation/Type/SVG.Type.html @@ -0,0 +1 @@ +Type | astro-compress - v2.2.5

Type alias Type

Type: Config

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Variable/CSS.CSS-1.html b/Documentation/Variable/CSS.CSS-1.html new file mode 100644 index 00000000..9c45229a --- /dev/null +++ b/Documentation/Variable/CSS.CSS-1.html @@ -0,0 +1 @@ +CSS | astro-compress - v2.2.5
CSS: {
    comments: false;
    forceMediaMerge: true;
    restructure: false;
}

Type declaration

  • comments: false
  • forceMediaMerge: true
  • restructure: false

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Variable/CSS.CSS.html b/Documentation/Variable/CSS.CSS.html new file mode 100644 index 00000000..f62d04e1 --- /dev/null +++ b/Documentation/Variable/CSS.CSS.html @@ -0,0 +1 @@ +CSS | astro-compress - v2.2.5
CSS: {
    minify: true;
}

Type declaration

  • minify: true

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Variable/File._Map.html b/Documentation/Variable/File._Map.html new file mode 100644 index 00000000..0efe717d --- /dev/null +++ b/Documentation/Variable/File._Map.html @@ -0,0 +1 @@ +_Map | astro-compress - v2.2.5
_Map: {
    apng: string;
    avci: string;
    avcs: string;
    avifs: string;
    heic: string;
    heics: string;
    heifs: string;
    jfif: string;
    jif: string;
    jpe: string;
    jpg: string;
}

Type declaration

  • apng: string
  • avci: string
  • avcs: string
  • avifs: string
  • heic: string
  • heics: string
  • heifs: string
  • jfif: string
  • jif: string
  • jpe: string
  • jpg: string

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Variable/HTML.HTML.html b/Documentation/Variable/HTML.HTML.html new file mode 100644 index 00000000..9fa68fdf --- /dev/null +++ b/Documentation/Variable/HTML.HTML.html @@ -0,0 +1 @@ +HTML | astro-compress - v2.2.5
HTML: {
    caseSensitive: true;
    collapseInlineTagWhitespace: false;
    collapseWhitespace: true;
    continueOnParseError: true;
    html5: true;
    ignoreCustomComments: RegExp[];
    includeAutoGeneratedTags: true;
    keepClosingSlash: true;
    minifyCSS: true;
    minifyJS: true;
    minifyURLs: false;
    noNewlinesBeforeTagClose: true;
    preventAttributesEscaping: false;
    processConditionalComments: false;
    processScripts: string[];
    quoteCharacter: string;
    removeAttributeQuotes: true;
    removeComments: true;
    removeScriptTypeAttributes: true;
    removeStyleLinkTypeAttributes: true;
    removeTagWhitespace: false;
    sortAttributes: true;
    sortClassName: true;
    trimCustomFragments: true;
    useShortDoctype: false;
}

Type declaration

  • caseSensitive: true
  • collapseInlineTagWhitespace: false
  • collapseWhitespace: true
  • continueOnParseError: true
  • html5: true
  • ignoreCustomComments: RegExp[]
  • includeAutoGeneratedTags: true
  • keepClosingSlash: true
  • minifyCSS: true
  • minifyJS: true
  • minifyURLs: false
  • noNewlinesBeforeTagClose: true
  • preventAttributesEscaping: false
  • processConditionalComments: false
  • processScripts: string[]
  • quoteCharacter: string
  • removeAttributeQuotes: true
  • removeComments: true
  • removeScriptTypeAttributes: true
  • removeStyleLinkTypeAttributes: true
  • removeTagWhitespace: false
  • sortAttributes: true
  • sortClassName: true
  • trimCustomFragments: true
  • useShortDoctype: false

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Variable/Image.Image-1.html b/Documentation/Variable/Image.Image-1.html new file mode 100644 index 00000000..eb924ad6 --- /dev/null +++ b/Documentation/Variable/Image.Image-1.html @@ -0,0 +1 @@ +image | astro-compress - v2.2.5
image: {
    apng: string;
    avci: string;
    avcs: string;
    avifs: string;
    heic: string;
    heics: string;
    heifs: string;
    jfif: string;
    jif: string;
    jpe: string;
    jpg: string;
}

Type declaration

  • apng: string
  • avci: string
  • avcs: string
  • avifs: string
  • heic: string
  • heics: string
  • heifs: string
  • jfif: string
  • jif: string
  • jpe: string
  • jpg: string

Generated using TypeDoc

\ No newline at end of file diff --git a/Documentation/Variable/Image.Image.html b/Documentation/Variable/Image.Image.html new file mode 100644 index 00000000..9e1dbd55 --- /dev/null +++ b/Documentation/Variable/Image.Image.html @@ -0,0 +1 @@ +image | astro-compress - v2.2.5
image: {
    avif: {
        chromaSubsampling: string;
        effort: number;
    };
    gif: {
        effort: number;
    };
    jpeg: {
        chromaSubsampling: string;
        mozjpeg: true;
        optimiseScans: true;
        overshootDeringing: true;
        trellisQuantisation: true;
    };
    png: {
        compressionLevel: number;
        palette: true;
    };
    raw: {};
    tiff: {
        compression: string;
    };
    webp: {
        effort: number;
    };
}

Type declaration

  • avif: {
        chromaSubsampling: string;
        effort: number;
    }
    • chromaSubsampling: string
    • effort: number
  • gif: {
        effort: number;
    }
    • effort: number
  • jpeg: {
        chromaSubsampling: string;
        mozjpeg: true;
        optimiseScans: true;
        overshootDeringing: true;
        trellisQuantisation: true;
    }
    • chromaSubsampling: string
    • mozjpeg: true
    • optimiseScans: true
    • overshootDeringing: true
    • trellisQuantisation: true
  • png: {
        compressionLevel: number;
        palette: true;
    }
    • compressionLevel: number
    • palette: true
  • raw: {}
    • tiff: {
          compression: string;
      }
      • compression: string
    • webp: {
          effort: number;
      }
      • effort: number

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Image._Map.html b/Documentation/Variable/Image._Map.html new file mode 100644 index 00000000..b60586c2 --- /dev/null +++ b/Documentation/Variable/Image._Map.html @@ -0,0 +1 @@ +_Map | astro-compress - v2.2.5
    _Map: {
        apng: string;
        avci: string;
        avcs: string;
        avifs: string;
        heic: string;
        heics: string;
        heifs: string;
        jfif: string;
        jif: string;
        jpe: string;
        jpg: string;
    }

    Type declaration

    • apng: string
    • avci: string
    • avcs: string
    • avifs: string
    • heic: string
    • heics: string
    • heifs: string
    • jfif: string
    • jif: string
    • jpe: string
    • jpg: string

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Default.html b/Documentation/Variable/Integration.Default.html new file mode 100644 index 00000000..fe57617c --- /dev/null +++ b/Documentation/Variable/Integration.Default.html @@ -0,0 +1 @@ +Default | astro-compress - v2.2.5
    Default: Omit<DeepMergeRecordsDefaultHKTInternalProps<[{
        Action: {
            Accomplished: ((__namedParameters) => Promise<string>);
            Changed: ((Plan) => Promise<default>);
            Failed: ((__namedParameters) => Promise<string>);
            Fulfilled: ((__namedParameters) => Promise<string | false>);
            Passed: ((On) => Promise<true>);
            Read: ((__namedParameters) => Promise<string>);
            Wrote: ((__namedParameters) => Promise<Type>);
        };
        Cache: {
            Folder: string;
            Search: string;
        };
        Exclude: false;
        Files: string;
        Logger: 2;
        Path: string;
    }, {
        Action: {
            Accomplished: ((__namedParameters) => Promise<string>);
            Changed: ((Plan) => Promise<any>);
            Failed: ((__namedParameters) => Promise<string>);
            Passed: ((__namedParameters) => Promise<boolean>);
        };
        CSS: {
            csso: {
                comments: false;
                forceMediaMerge: true;
                restructure: false;
            };
            lightningcss: {
                minify: true;
            };
        };
        HTML: {
            html-minifier-terser: {
                caseSensitive: true;
                collapseInlineTagWhitespace: false;
                collapseWhitespace: true;
                continueOnParseError: true;
                html5: true;
                ignoreCustomComments: RegExp[];
                includeAutoGeneratedTags: true;
                keepClosingSlash: true;
                minifyCSS: true;
                minifyJS: true;
                minifyURLs: false;
                noNewlinesBeforeTagClose: true;
                preventAttributesEscaping: false;
                processConditionalComments: false;
                processScripts: string[];
                quoteCharacter: string;
                removeAttributeQuotes: true;
                removeComments: true;
                removeScriptTypeAttributes: true;
                removeStyleLinkTypeAttributes: true;
                removeTagWhitespace: false;
                sortAttributes: true;
                sortClassName: true;
                trimCustomFragments: true;
                useShortDoctype: false;
            };
        };
        Image: {
            sharp: {
                avif: {
                    chromaSubsampling: string;
                    effort: number;
                };
                gif: {
                    effort: number;
                };
                jpeg: {
                    chromaSubsampling: string;
                    mozjpeg: true;
                    optimiseScans: true;
                    overshootDeringing: true;
                    trellisQuantisation: true;
                };
                png: {
                    compressionLevel: number;
                    palette: true;
                };
                raw: {};
                tiff: {
                    compression: string;
                };
                webp: {
                    effort: number;
                };
            };
        };
        JavaScript: {
            terser: {
                ecma: 5;
                enclose: false;
                format: {
                    comments: false;
                };
                ie8: false;
                keep_classnames: false;
                keep_fnames: false;
                module: false;
                safari10: false;
                toplevel: false;
            };
        };
        Map: {
            CSS: string;
            HTML: string;
            Image: string;
            JavaScript: string;
            SVG: string;
        };
        Parser: {
            CSS: ("csso" | "lightningcss")[];
            HTML: "html-minifier-terser";
            Image: "sharp";
            JavaScript: "terser";
            SVG: "svgo";
        };
        SVG: {
            svgo: {
                js2svg: {
                    indent: number;
                    pretty: false;
                };
                multipass: true;
                plugins: "preset-default"[];
            };
        };
    }], Readonly<{
        DeepMergeArraysURI: "DeepMergeLeafURI";
        DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
        DeepMergeOthersURI: "DeepMergeLeafURI";
        DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
        DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
    }>, Readonly<{
        key: PropertyKey;
        parents: readonly Readonly<Record<PropertyKey, unknown>>[];
    }>>, "__proto__">

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.bool.html b/Documentation/Variable/Integration.Defaultsharp.bool.html new file mode 100644 index 00000000..c70c9e7a --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.bool.html @@ -0,0 +1 @@ +bool | astro-compress - v2.2.5
    bool: BoolEnum

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.fit.html b/Documentation/Variable/Integration.Defaultsharp.fit.html new file mode 100644 index 00000000..199bf6fe --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.fit.html @@ -0,0 +1 @@ +fit | astro-compress - v2.2.5
    fit: FitEnum

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.format.html b/Documentation/Variable/Integration.Defaultsharp.format.html new file mode 100644 index 00000000..64a7a616 --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.format.html @@ -0,0 +1,2 @@ +format | astro-compress - v2.2.5
    format: FormatEnum

    Object containing nested boolean values representing the available input and output formats/methods.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.gravity.html b/Documentation/Variable/Integration.Defaultsharp.gravity.html new file mode 100644 index 00000000..392ed349 --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.gravity.html @@ -0,0 +1,2 @@ +gravity | astro-compress - v2.2.5
    gravity: GravityEnum

    #endregion

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.interpolators.html b/Documentation/Variable/Integration.Defaultsharp.interpolators.html new file mode 100644 index 00000000..f3c143d3 --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.interpolators.html @@ -0,0 +1,2 @@ +interpolators | astro-compress - v2.2.5
    interpolators: Interpolators

    An Object containing the available interpolators and their proper values

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.kernel.html b/Documentation/Variable/Integration.Defaultsharp.kernel.html new file mode 100644 index 00000000..4e55463a --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.kernel.html @@ -0,0 +1 @@ +kernel | astro-compress - v2.2.5
    kernel: KernelEnum

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.queue.html b/Documentation/Variable/Integration.Defaultsharp.queue.html new file mode 100644 index 00000000..c5d2d2c7 --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.queue.html @@ -0,0 +1,2 @@ +queue | astro-compress - v2.2.5
    queue: NodeJS.EventEmitter

    An EventEmitter that emits a change event when a task is either queued, waiting for libuv to provide a worker thread, complete

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.strategy.html b/Documentation/Variable/Integration.Defaultsharp.strategy.html new file mode 100644 index 00000000..91b0e9c3 --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.strategy.html @@ -0,0 +1 @@ +strategy | astro-compress - v2.2.5
    strategy: StrategyEnum

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Defaultsharp.versions.html b/Documentation/Variable/Integration.Defaultsharp.versions.html new file mode 100644 index 00000000..0b36d6d7 --- /dev/null +++ b/Documentation/Variable/Integration.Defaultsharp.versions.html @@ -0,0 +1,2 @@ +versions | astro-compress - v2.2.5
    versions: {
        avif?: string;
        cairo?: string;
        croco?: string;
        exif?: string;
        expat?: string;
        ffi?: string;
        fontconfig?: string;
        freetype?: string;
        gdkpixbuf?: string;
        gif?: string;
        glib?: string;
        gsf?: string;
        harfbuzz?: string;
        heif?: string;
        jpeg?: string;
        lcms?: string;
        orc?: string;
        pango?: string;
        pixman?: string;
        png?: string;
        sharp?: string;
        svg?: string;
        tiff?: string;
        vips: string;
        webp?: string;
        xml?: string;
        zlib?: string;
    }

    An Object containing the version numbers of sharp, libvips and its dependencies.

    +

    Type declaration

    • Optional avif?: string
    • Optional cairo?: string
    • Optional croco?: string
    • Optional exif?: string
    • Optional expat?: string
    • Optional ffi?: string
    • Optional fontconfig?: string
    • Optional freetype?: string
    • Optional gdkpixbuf?: string
    • Optional gif?: string
    • Optional glib?: string
    • Optional gsf?: string
    • Optional harfbuzz?: string
    • Optional heif?: string
    • Optional jpeg?: string
    • Optional lcms?: string
    • Optional orc?: string
    • Optional pango?: string
    • Optional pixman?: string
    • Optional png?: string
    • Optional sharp?: string
    • Optional svg?: string
    • Optional tiff?: string
    • vips: string
    • Optional webp?: string
    • Optional xml?: string
    • Optional zlib?: string

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.Search.html b/Documentation/Variable/Integration.Search.html new file mode 100644 index 00000000..fefe57a8 --- /dev/null +++ b/Documentation/Variable/Integration.Search.html @@ -0,0 +1 @@ +Search | astro-compress - v2.2.5
    Search: string

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration.System.html b/Documentation/Variable/Integration.System.html new file mode 100644 index 00000000..47876fa3 --- /dev/null +++ b/Documentation/Variable/Integration.System.html @@ -0,0 +1,2 @@ +System | astro-compress - v2.2.5
    System: string

    TODO: Test this for security

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Integration._Action.html b/Documentation/Variable/Integration._Action.html new file mode 100644 index 00000000..a3b28ff5 --- /dev/null +++ b/Documentation/Variable/Integration._Action.html @@ -0,0 +1 @@ +_Action | astro-compress - v2.2.5
    _Action: Action

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/JavaScript.JavaScript.html b/Documentation/Variable/JavaScript.JavaScript.html new file mode 100644 index 00000000..d5afc3bf --- /dev/null +++ b/Documentation/Variable/JavaScript.JavaScript.html @@ -0,0 +1 @@ +javaScript | astro-compress - v2.2.5
    javaScript: {
        ecma: 5;
        enclose: false;
        format: {
            comments: false;
        };
        ie8: false;
        keep_classnames: false;
        keep_fnames: false;
        module: false;
        safari10: false;
        toplevel: false;
    }

    Type declaration

    • ecma: 5
    • enclose: false
    • format: {
          comments: false;
      }
      • comments: false
    • ie8: false
    • keep_classnames: false
    • keep_fnames: false
    • module: false
    • safari10: false
    • toplevel: false

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Map.Map.html b/Documentation/Variable/Map.Map.html new file mode 100644 index 00000000..d44400b2 --- /dev/null +++ b/Documentation/Variable/Map.Map.html @@ -0,0 +1 @@ +map | astro-compress - v2.2.5
    map: {
        CSS: string;
        HTML: string;
        Image: string;
        JavaScript: string;
        SVG: string;
    }

    Type declaration

    • CSS: string
    • HTML: string
    • Image: string
    • JavaScript: string
    • SVG: string

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Option.Option.html b/Documentation/Variable/Option.Option.html new file mode 100644 index 00000000..395bf81a --- /dev/null +++ b/Documentation/Variable/Option.Option.html @@ -0,0 +1 @@ +option | astro-compress - v2.2.5
    option: Omit<DeepMergeRecordsDefaultHKTInternalProps<[{
        Action: {
            Accomplished: ((__namedParameters) => Promise<string>);
            Changed: ((Plan) => Promise<default>);
            Failed: ((__namedParameters) => Promise<string>);
            Fulfilled: ((__namedParameters) => Promise<string | false>);
            Passed: ((On) => Promise<true>);
            Read: ((__namedParameters) => Promise<string>);
            Wrote: ((__namedParameters) => Promise<Type>);
        };
        Cache: {
            Folder: string;
            Search: string;
        };
        Exclude: false;
        Files: string;
        Logger: 2;
        Path: string;
    }, {
        Action: {
            Accomplished: ((__namedParameters) => Promise<string>);
            Changed: ((Plan) => Promise<any>);
            Failed: ((__namedParameters) => Promise<string>);
            Passed: ((__namedParameters) => Promise<boolean>);
        };
        CSS: {
            csso: {
                comments: false;
                forceMediaMerge: true;
                restructure: false;
            };
            lightningcss: {
                minify: true;
            };
        };
        HTML: {
            html-minifier-terser: {
                caseSensitive: true;
                collapseInlineTagWhitespace: false;
                collapseWhitespace: true;
                continueOnParseError: true;
                html5: true;
                ignoreCustomComments: RegExp[];
                includeAutoGeneratedTags: true;
                keepClosingSlash: true;
                minifyCSS: true;
                minifyJS: true;
                minifyURLs: false;
                noNewlinesBeforeTagClose: true;
                preventAttributesEscaping: false;
                processConditionalComments: false;
                processScripts: string[];
                quoteCharacter: string;
                removeAttributeQuotes: true;
                removeComments: true;
                removeScriptTypeAttributes: true;
                removeStyleLinkTypeAttributes: true;
                removeTagWhitespace: false;
                sortAttributes: true;
                sortClassName: true;
                trimCustomFragments: true;
                useShortDoctype: false;
            };
        };
        Image: {
            sharp: {
                avif: {
                    chromaSubsampling: string;
                    effort: number;
                };
                gif: {
                    effort: number;
                };
                jpeg: {
                    chromaSubsampling: string;
                    mozjpeg: true;
                    optimiseScans: true;
                    overshootDeringing: true;
                    trellisQuantisation: true;
                };
                png: {
                    compressionLevel: number;
                    palette: true;
                };
                raw: {};
                tiff: {
                    compression: string;
                };
                webp: {
                    effort: number;
                };
            };
        };
        JavaScript: {
            terser: {
                ecma: 5;
                enclose: false;
                format: {
                    comments: false;
                };
                ie8: false;
                keep_classnames: false;
                keep_fnames: false;
                module: false;
                safari10: false;
                toplevel: false;
            };
        };
        Map: {
            CSS: string;
            HTML: string;
            Image: string;
            JavaScript: string;
            SVG: string;
        };
        Parser: {
            CSS: ("csso" | "lightningcss")[];
            HTML: "html-minifier-terser";
            Image: "sharp";
            JavaScript: "terser";
            SVG: "svgo";
        };
        SVG: {
            svgo: {
                js2svg: {
                    indent: number;
                    pretty: false;
                };
                multipass: true;
                plugins: "preset-default"[];
            };
        };
    }], Readonly<{
        DeepMergeArraysURI: "DeepMergeLeafURI";
        DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
        DeepMergeOthersURI: "DeepMergeLeafURI";
        DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
        DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
    }>, Readonly<{
        key: PropertyKey;
        parents: readonly Readonly<Record<PropertyKey, unknown>>[];
    }>>, "__proto__">

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/Parser.Parser.html b/Documentation/Variable/Parser.Parser.html new file mode 100644 index 00000000..698b3b64 --- /dev/null +++ b/Documentation/Variable/Parser.Parser.html @@ -0,0 +1 @@ +parser | astro-compress - v2.2.5
    parser: {
        CSS: ("csso" | "lightningcss")[];
        HTML: "html-minifier-terser";
        Image: "sharp";
        JavaScript: "terser";
        SVG: "svgo";
    }

    Type declaration

    • CSS: ("csso" | "lightningcss")[]
    • HTML: "html-minifier-terser"
    • Image: "sharp"
    • JavaScript: "terser"
    • SVG: "svgo"

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/Variable/SVG.SVG.html b/Documentation/Variable/SVG.SVG.html new file mode 100644 index 00000000..67af9760 --- /dev/null +++ b/Documentation/Variable/SVG.SVG.html @@ -0,0 +1 @@ +SVG | astro-compress - v2.2.5
    SVG: {
        js2svg: {
            indent: number;
            pretty: false;
        };
        multipass: true;
        plugins: "preset-default"[];
    }

    Type declaration

    • js2svg: {
          indent: number;
          pretty: false;
      }
      • indent: number
      • pretty: false
    • multipass: true
    • plugins: "preset-default"[]

    Generated using TypeDoc

    \ No newline at end of file diff --git a/Documentation/assets/custom.css b/Documentation/assets/custom.css new file mode 100644 index 00000000..e3a44623 --- /dev/null +++ b/Documentation/assets/custom.css @@ -0,0 +1,49 @@ +:root { + --dark-color-background: #000; + --dark-color-background-secondary: #000; + --dark-code-background: #040404; + --color-accent: #2463eb; + --dark-hl-0: #ffdd00; + --dark-hl-1: #ff66ff; + --dark-hl-2: #ff4444; + --dark-hl-3: #44ffff; + --dark-hl-4: #44ff44; +} + +body #tsd-search .field label { + left: 50%; + margin-left: -20px; + z-index: 1; + text-align: center; +} + +body #tsd-search.has-focus .field label { + display: none; +} + +body #tsd-search .field input { + z-index: 2; +} + +body pre, +body .tsd-page-toolbar, +body .tsd-generator { + border: none; +} + +body .tsd-navigation a, +body .tsd-navigation summary > span, +body .tsd-page-navigation a { + padding: 0.5rem; + border-radius: 8px; +} + +body .tsd-description .tsd-signatures .tsd-signature, +body .tsd-signature, +body .tsd-signatures .tsd-signature, +body .tsd-typography td, +body .tsd-typography th, +body code.tsd-tag { + border-radius: 12px; + border-width: 2px; +} diff --git a/Documentation/assets/highlight.css b/Documentation/assets/highlight.css new file mode 100644 index 00000000..146cd454 --- /dev/null +++ b/Documentation/assets/highlight.css @@ -0,0 +1,92 @@ +:root { + --light-hl-0: #795E26; + --dark-hl-0: #DCDCAA; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #A31515; + --dark-hl-2: #CE9178; + --light-hl-3: #0000FF; + --dark-hl-3: #569CD6; + --light-hl-4: #AF00DB; + --dark-hl-4: #C586C0; + --light-hl-5: #001080; + --dark-hl-5: #9CDCFE; + --light-hl-6: #008000; + --dark-hl-6: #6A9955; + --light-hl-7: #267F99; + --dark-hl-7: #4EC9B0; + --light-hl-8: #098658; + --dark-hl-8: #B5CEA8; + --light-hl-9: #000000; + --dark-hl-9: #C8C8C8; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +pre, code { background: var(--code-background); } diff --git a/Documentation/assets/main.js b/Documentation/assets/main.js new file mode 100644 index 00000000..d0aa8d5f --- /dev/null +++ b/Documentation/assets/main.js @@ -0,0 +1,59 @@ +"use strict"; +"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(B,r=>this.onDocumentPointerUp(r))}setActive(n){if(this.active==n)return;this.active=n,document.documentElement.classList.toggle("has-"+this.className,n),this.el.classList.toggle("active",n);let r=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(r),setTimeout(()=>document.documentElement.classList.remove(r),500)}onPointerUp(n){D||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!D&&this.active&&n.target.closest(".col-sidebar")){let r=n.target.closest("a");if(r){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),r.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(n){super(n);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var Z=class extends C{constructor(n){super(n);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let r=Q.getItem(this.key);this.el.open=r?r==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let i=this.summary.querySelector("a");i&&i.addEventListener("click",()=>{location.assign(i.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/Documentation/assets/navigation.js b/Documentation/assets/navigation.js new file mode 100644 index 00000000..f833b4a9 --- /dev/null +++ b/Documentation/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACqWXXW/bIBSG/wvXybrma1ruplbtOi3aJFe9qaKIYBLT2MbDOGs09b9P2I6NAX+ALwM873t8OJDD6z/A8TsHa3DneWACEsgDsAYb6mchvrnzvE8Bj0IwAScS+2A9mwAUkNBnOAbr14p9viS4hp9ijtkBooIXc4rIcvUxGcxOb7voRtQvkBG4L+PWYp/PhnKq5Xz2sZXYe8Iw4pRdtHxVM6OyVquYcyfH8kBCrIUhBh0iEL8K1uD7+euX26Wcwd0GJoYU5ryY60zhQxYjTmh8057L65KdXVJ9XbAyM0j6ZvHVohHu9+fNTy1AMeia5ZwdkuWmc5XlnNcDULL8FMGjXh356KgCLRRcD3ZNdx/tAfysi28p0AI3VmjNkmbmFJjoGbSlDVdMK1/Vr8zPOgtWZOvIoKD0/a/nBlXBPT7ALORpAFnSKSYvbCovzMp7SkNTmto0xXo1bROAQpimYA146k9JOsXvHLMYhkBKx4FwG58D4W42lEXQziknnMyODJ4Jv9i4lYiTHRHnL6Eh5JSlNqYN0Mn6hFmMrQqlIJzM/mQ4M57dNq8ccLJKOYMcH6228Mo4GZ4xSwmNrbbvyjgZ7kOKTqaLrPWEC0C92QZZIYgC453ZZpUDblY0RhljOEamJqPdsMYcbTNxlFI7z4JxMkxJ5NuYifVORllsXSglYmG3HdJaSHZ97U0ZzrCz1PFn72HIUNAjUyzqUrmkHEd9KvmiDpXdN9RsGYwy5aoOHXPL0LuralO0WkiaG8zMTZEklq/p0CCmtsioRNqaJKXR+gHP0EOMJFxrjeop11eCpDDkrfBmiKXaQEnrrSUw5fXQaJ/Lb9K6ZsuXg+D7DlZkbNsFGfW8KjfE90P8FzL90VNPdcUvi/1KjN1zMTwqCaVEXx5o0nIWS54aIlES8huyFDPtG4rhUd9QSti9AfOilkjt/aeVdA+vvv9s+flIfjGSX/bxibKBVQ2UKolhJ5Ua8F4etQLwXh5d7ySBDrmMGrZV2ILWzPOAt/8BuzbpCIoUAAA=" \ No newline at end of file diff --git a/Documentation/assets/search.js b/Documentation/assets/search.js new file mode 100644 index 00000000..8a5cff06 --- /dev/null +++ b/Documentation/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,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"; \ No newline at end of file diff --git a/Documentation/assets/style.css b/Documentation/assets/style.css new file mode 100644 index 00000000..07a385b7 --- /dev/null +++ b/Documentation/assets/style.css @@ -0,0 +1,1394 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: var(--light-color-ts-type-alias); + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a, +h2 > a, +h3 > a, +h4 > a, +h5 > a, +h6 > a { + text-decoration: none; + color: var(--color-text); +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +.tsd-generator { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} + +.tsd-generator > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: "Segoe UI", sans-serif; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h4, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.5rem); +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: inline-flex; + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-nested-navigation > li > a, +.tsd-nested-navigation > li > span { + width: calc(100% - 1.75rem - 0.5rem); +} + +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through !important; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/Documentation/index.html b/Documentation/index.html new file mode 100644 index 00000000..0513c263 --- /dev/null +++ b/Documentation/index.html @@ -0,0 +1,107 @@ +astro-compress - v2.2.5

    astro-compress - v2.2.5

    Astro
    Related


    Stars
    AstroCritters
    🦔 AstroJS GoogleChromeLabs Critters integration.
    Inline your critical CSS with Astro.


    Build
    Dependencies
    Version
    Downloads

    Stars
    AstroRome
    🏛️ AstroJS Rome tools.
    Format, lint and check your Astro website with Rome.


    Build
    Dependencies
    Version
    Downloads
    + +

    🗜️ AstroCompress

    This Astro integration brings compression utilities to +your Astro project.

    +

    CSS / HTML / JavaScript / +Image / SVG

    +
    +

    Note

    +

    AstroCompress will not compress your requests, only your statically +generated build and pre-rendered routes.

    +
    +
    +

    [!IMPORTANT]

    +

    Use AstroCompress last in your integration list for the best optimization.

    +
    +

    Installation

    There are two ways to add integrations to your project. Let's try the most +convenient option first!

    +

    astro add command

    Astro includes a CLI tool for adding first party integrations: astro add. This +command will:

    +
      +
    1. (Optionally) Install all necessary dependencies and peer dependencies
    2. +
    3. (Also optionally) Update your astro.config.* file to apply this integration
    4. +
    +

    To install AstroCompress, run the following from your project directory and +follow the prompts:

    +

    Using NPM:

    +
    npx astro add astro-compress
    +
    +

    Using Yarn:

    +
    yarn astro add astro-compress
    +
    +

    Using PNPM:

    +
    pnpx astro add astro-compress
    +
    +

    Install dependencies manually

    First, install the AstroCompress integration like so:

    +
    npm install -D -E astro-compress
    +
    +

    Then, apply this integration to your astro.config.* file using the +integrations property:

    +

    astro.config.ts

    +
    import Compress from "astro-compress";

    export default { integrations: [Compress()] }; +
    +

    Getting started

    The utility will now automatically compress all your CSS, HTML, SVG, JavaScript +and image files in the Astro outDir folder.

    +

    The following image file types will be compressed via sharp:

    +
      +
    • avci
    • +
    • avcs
    • +
    • avif
    • +
    • avifs
    • +
    • gif
    • +
    • heic
    • +
    • heics
    • +
    • heif
    • +
    • heifs
    • +
    • jfif
    • +
    • jif
    • +
    • jpe
    • +
    • jpeg
    • +
    • jpg
    • +
    • apng
    • +
    • png
    • +
    • raw
    • +
    • tiff
    • +
    • webp
    • +
    +

    SVG compression is supported via svgo.

    +

    Default Compression

    You can override any of the default options from the configurations of:

    + +

    or disable them entirely:

    +

    astro.config.ts

    +
    import Compress from "astro-compress";

    export default {
    integrations: [
    Compress({
    CSS: false,
    HTML: false,
    Image: false,
    JavaScript: false,
    SVG: false,
    }),
    ],
    }; +
    +

    to see the full option map visit: +Source/Interface/Option.ts

    +

    Adding Multiple Paths

    You can add multiple paths to compress by specifying an array as the Path +variable.

    +

    astro.config.ts

    +
    import Compress from "astro-compress";

    export default {
    integrations: [
    Compress({
    Path: ["./Target", "./Build"],
    }),
    ],
    }; +
    +

    Input-Output Mapping

    You can also provide a map of paths for different input output directories.

    +

    astro.config.ts

    +
    import Compress from "astro-compress";

    export default {
    integrations: [
    Compress({
    Path: new Map([["./Source", "./Target"]]),
    }),
    ],
    }; +
    +

    Or an array of the two.

    +

    astro.config.ts

    +
    import Compress from "astro-compress";

    export default {
    integrations: [
    Compress({
    Path: [
    // Compress Target
    "./Target",
    // Compress Target one more time into a different directory
    new Map([["./Target", "./TargetCompress"]]),
    ],
    }),
    ],
    }; +
    +

    File Filtering

    You can filter files to exclude specific ones from compression. A filter can be +an array of regular expressions or a single match. You can also use functions to +match on file names:

    +

    astro.config.ts

    +
    import Compress from "astro-compress";

    export default {
    integrations: [
    Compress({
    Exclude: [
    "File.png",
    (File: string) =>
    File === "./Target/Favicon/Image/safari-pinned-tab.svg",
    ],
    }),
    ],
    }; +
    +

    Controlling Logging

    You can control the logging level by setting the Logger parameter. The default +value is 2, but you can set it to 0 if you don't want to see debug messages:

    +

    astro.config.ts

    +
    import Compress from "astro-compress";

    export default {
    integrations: [
    Compress({
    Logger: 0,
    }),
    ],
    }; +
    +

    Changelog

    See CHANGELOG.md for a history of changes to this integration.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/LICENSE b/LICENSE index 816ebb1f..dc7723e0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Nikola Hristov +Copyright (c) 2023 Nikola R. Hristov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -19,8 +19,8 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -""" This license applies to the `README.md` and parts of the `src` directory of -`astro-compress` originating from the https://github.com/withastro/astro +""" This license applies to the `README.md` and parts of the `Source` directory +of AstroCompress originating from the https://github.com/withastro/astro repository: MIT License diff --git a/README.md b/README.md index e4a86952..d6093e71 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,21 @@ -

    Astro Related









    astro-critters
    🦔 AstroJS GoogleChromeLabs critters integration.
    Inline your critical CSS with Astro.








    astro-rome
    🏛️ AstroJS Rome tools.
    Format, lint and check your Astro website with Rome.
    +

    Astro
    Related


    Stars
    AstroCritters
    🦔 AstroJS GoogleChromeLabs Critters integration.
    Inline your critical CSS with Astro.


    Build
    Dependencies
    Version
    Downloads

    Stars
    AstroRome
    🏛️ AstroJS Rome tools.
    Format, lint and check your Astro website with Rome.


    Build
    Dependencies
    Version
    Downloads
    -# [astro-compress] 🗜️ +# 🗜️ [AstroCompress] This **[Astro integration][astro-integration]** brings compression utilities to your Astro project. -[CSS][csso] [HTML][html-minifier-terser] [JavaScript][terser] [Images][sharp] -[SVG][svgo] +[CSS][csso] / [HTML][html-minifier-terser] / [JavaScript][terser] / +[Image][sharp] / [SVG][svgo] > **Note** > -> `astro-compress` will not compress your requests, only your statically +> `AstroCompress` will not compress your requests, only your statically > generated build and pre-rendered routes. -> **Note** +> [!IMPORTANT] > -> Use `astro-compress` last in your integration list for the best optimizations. +> Use `AstroCompress` last in your integration list for the best optimization. ## Installation @@ -30,7 +30,7 @@ command will: 1. (Optionally) Install all necessary dependencies and peer dependencies 2. (Also optionally) Update your `astro.config.*` file to apply this integration -To install `astro-compress`, run the following from your project directory and +To install `AstroCompress`, run the following from your project directory and follow the prompts: Using NPM: @@ -53,9 +53,9 @@ pnpx astro add astro-compress ### Install dependencies manually -First, install the `astro-compress` integration like so: +First, install the `AstroCompress` integration like so: -``` +```sh npm install -D -E astro-compress ``` @@ -99,7 +99,9 @@ The following image file types will be compressed via [sharp]: SVG compression is supported via [svgo]. -#### You can override any of the default options from the configurations of: +### Default Compression + +You can override any of the default options from the configurations of: - [csso](https://github.com/css/csso#minifysource-options) - [html-minifier-terser](https://github.com/terser/html-minifier-terser#options-quick-reference) @@ -117,34 +119,23 @@ import Compress from "astro-compress"; export default { integrations: [ Compress({ - css: false, - html: false, - img: false, - js: false, - svg: false, + CSS: false, + HTML: false, + Image: false, + JavaScript: false, + SVG: false, }), ], }; ``` -#### If your path is different than the Astro `outDir` be sure to update it accordingly: - -**`astro.config.ts`** +to see the full option map visit: +[Source/Interface/Option.ts](https://github.com/astro-community/AstroCompress/blob/main/Source/Interface/Option.ts) -```ts -import Compress from "astro-compress"; - -export default { - outDir: "./Target", - integrations: [ - Compress({ - path: "./Target", - }), - ], -}; -``` +### Adding Multiple Paths -#### You can add multiple paths to compress by specifying an array as the `path` variable. +You can add multiple paths to compress by specifying an array as the `Path` +variable. **`astro.config.ts`** @@ -154,13 +145,15 @@ import Compress from "astro-compress"; export default { integrations: [ Compress({ - path: ["./Target", "./Build"], + Path: ["./Target", "./Build"], }), ], }; ``` -#### You can also provide a map of paths for different input output directories. +### Input-Output Mapping + +You can also provide a map of paths for different input output directories. **`astro.config.ts`** @@ -170,13 +163,13 @@ import Compress from "astro-compress"; export default { integrations: [ Compress({ - path: new Map([["./input", "./output"]]), + Path: new Map([["./Source", "./Target"]]), }), ], }; ``` -#### Or an array of the two. +Or an array of the two. **`astro.config.ts`** @@ -186,7 +179,7 @@ import Compress from "astro-compress"; export default { integrations: [ Compress({ - path: [ + Path: [ // Compress Target "./Target", // Compress Target one more time into a different directory @@ -197,7 +190,11 @@ export default { }; ``` -#### You can provide a filter to exclude files in your build. A filter can be an array of regexes or a single match. You can use functions, as well to match on file names. +### File Filtering + +You can filter files to exclude specific ones from compression. A filter can be +an array of regular expressions or a single match. You can also use functions to +match on file names: **`astro.config.ts`** @@ -207,17 +204,20 @@ import Compress from "astro-compress"; export default { integrations: [ Compress({ - exclude: [ - "my-awesome.png", - (file: string) => - file === "./Target/Images/favicon/safari-pinned-tab.svg", + Exclude: [ + "File.png", + (File: string) => + File === "./Target/Favicon/Image/safari-pinned-tab.svg", ], }), ], }; ``` -#### Set `logger` to `0` if you do not want to see debug messages. Default is `2`. +### Controlling Logging + +You can control the logging level by setting the `Logger` parameter. The default +value is `2`, but you can set it to `0` if you don't want to see debug messages: **`astro.config.ts`** @@ -227,13 +227,13 @@ import Compress from "astro-compress"; export default { integrations: [ Compress({ - logger: 0, + Logger: 0, }), ], }; ``` -[astro-compress]: https://npmjs.org/astro-compress +[AstroCompress]: https://npmjs.org/astro-compress [csso]: https://npmjs.org/csso [html-minifier-terser]: https://npmjs.org/html-minifier-terser [terser]: https://npmjs.org/terser @@ -244,7 +244,3 @@ export default { ## Changelog See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this integration. - -[![Lightrix logo](https://raw.githubusercontent.com/Lightrix/NPM/main/.github/Image/favicon.png "Built with Lightrix/NPM")](https://github.com/Lightrix/NPM) -Built with [`Lightrix/NPM`](https://github.com/Lightrix/NPM), powered by -[`Lightrix/files-pipe`](https://github.com/Lightrix/files-pipe). diff --git a/Source/Function/Directory.ts b/Source/Function/Directory.ts new file mode 100644 index 00000000..24d97b79 --- /dev/null +++ b/Source/Function/Directory.ts @@ -0,0 +1,23 @@ +/** + * @module Directory + * TODO: Test this for performance, mainly importing the Integration.js System variable + * + */ +export default (async (...[Path]: Parameters) => { + let Clean = (await import("path")).parse(Path).dir; + + Clean = (await import("path")).normalize(Clean); + Clean = Clean.replace(/\\/g, "/"); + Clean = Clean.replace( + (await import("../Function/Integration.js")).System, + "" + ); + + if (!Clean.endsWith("/")) { + Clean += "/"; + } + + return Clean; +}) satisfies Type as Type; + +import type Type from "../Interface/Directory.js"; diff --git a/Source/Function/Image/Writesharp.ts b/Source/Function/Image/Writesharp.ts new file mode 100644 index 00000000..700714f4 --- /dev/null +++ b/Source/Function/Image/Writesharp.ts @@ -0,0 +1,43 @@ +/** + * @module Image + * + */ +export default (async (...[Option, { Buffer, Input }]: Parameters) => { + const File = Input.split(".").pop(); + + if (!File) { + return; + } + + const Type = + typeof _Map[File as File] !== "undefined" + ? _Map[File as File] + : typeof Option[File] !== "undefined" + ? File + : false; + + if ( + Type && + ["avif", "gif", "heif", "jpeg", "png", "raw", "tiff", "webp"].includes( + Type + ) && + typeof Option[Type] !== "undefined" && + Option[Type] !== false + ) { + return ( + Type in Buffer && + (await Buffer[Type]( + Option[Type] !== true + ? Option[Type] + : (await import("../../Variable/Image/sharp.js")).default + ).toBuffer()) + ); + } +}) satisfies Type as Type; + +import type Type from "../../Interface/Image/Writesharp.js"; +import type File from "../../Type/Image/Filesharp.js"; + +export const { default: _Map } = await import( + "../../Variable/Image/Mapsharp.js" +); diff --git a/Source/Function/Integration.ts b/Source/Function/Integration.ts new file mode 100644 index 00000000..ad10b4f9 --- /dev/null +++ b/Source/Function/Integration.ts @@ -0,0 +1,263 @@ +/** + * @module Integration + * + */ + +// TODO: Test this for security +export let System: string; + +export default ((...[_Option = {}]: Parameters) => { + Object.entries(_Option).forEach(([Key, Value]) => + Object.defineProperty(_Option, Key, { + value: + Value === true + ? Default[Key as keyof typeof Default] + : _Option[Key as keyof typeof _Option], + }) + ); + + const { + Path, + Cache, + Logger, + Map: _Map, + Exclude, + Action, + CSS, + HTML, + Image, + JavaScript, + SVG, + Parser, + } = Merge(Default, _Option); + + const Paths = new Set(); + + if (typeof Path !== "undefined") { + if (Array.isArray(Path) || Path instanceof Set) { + Path.forEach((Path) => Paths.add(Path)); + } + } + + if (typeof Parser === "object") { + Object.entries(Parser).forEach(([Key, Value]) => + Object.defineProperty(Parser, Key, { + value: Array.isArray(Value) ? Value : [Value], + }) + ); + } + + return { + name: "astro-compress", + hooks: { + "astro:config:done": async ({ + config: { + outDir: { pathname }, + }, + }) => { + System = (await import("path")) + .parse(pathname) + .dir.replace(/\\/g, "/"); + + if (System.startsWith("/")) { + System = System.substring(1); + } + }, + "astro:build:done": async ({ dir }) => { + console.log( + `\n${(await import("kleur/colors")).bgGreen( + (await import("kleur/colors")).black( + " AstroCompress processing " + ) + )}` + ); + + if (typeof _Map !== "object") { + return; + } + + if (!Paths.size) { + Paths.add(dir); + } + + if (typeof Cache === "object" && Cache.Search === Search) { + Cache.Search = dir; + } + + for (const [File, Setting] of Object.entries({ + CSS, + HTML, + Image, + JavaScript, + SVG, + })) { + if ( + !(Setting && _Map[File]) || + typeof Setting !== "object" + ) { + continue; + } + + _Action = Merge( + Action, + Merge(Action, { + Wrote: async ({ Buffer, Input }) => { + switch (File) { + case "CSS": { + // TODO: Implement lightningcss + // console.log( + // (await import("lightningcss")) + // .transform({ + // code: ( + // await import("buffer") + // ).Buffer.from( + // Buffer.toString() + // ), + // filename: Input, + // // minify: true, + // sourceMap: false, + // }) + // .code.toString() + // ); + + return (await import("csso")).minify( + Buffer.toString(), + // @ts-expect-error + Setting["csso"] + ).css; + } + + case "HTML": { + return await ( + await import("html-minifier-terser") + ).minify( + Buffer.toString(), + // @ts-expect-error + Setting["html-minifier-terser"] + ); + } + + case "JavaScript": { + return ( + ( + await ( + await import("terser") + ).minify( + Buffer.toString(), + // @ts-expect-error + Setting["terser"] + ) + ).code ?? Buffer + ); + } + + case "Image": { + return await ( + await import( + "../Function/Image/Writesharp.js" + ) + ) + // @ts-expect-error + .default(Setting["sharp"], { + Buffer, + Input, + } as Onsharp); + } + + case "SVG": { + const { data: Data } = ( + await import("svgo") + ).optimize( + Buffer.toString(), + // @ts-expect-error + Setting["svgo"] + ); + + return Data ?? Buffer; + } + + default: { + return Buffer; + } + } + }, + Fulfilled: async (Plan) => + Plan.Files > 0 + ? `${(await import("kleur/colors")).green( + `✓ Successfully compressed a total of ${ + Plan.Files + } ${File} ${ + Plan.Files === 1 + ? "file" + : "files" + } for ${await ( + await import( + "files-pipe/Target/Function/Bytes.js" + ) + ).default(Plan.Info.Total)}.` + )}` + : false, + } satisfies Action) + ); + + if (File === "Image") { + _Action = Merge(_Action, { + Read: async ({ Input }) => { + const { format } = + await Defaultsharp(Input).metadata(); + + return Defaultsharp(Input, { + failOn: "none", + sequentialRead: true, + unlimited: true, + animated: + format === "webp" || format === "gif" + ? true + : false, + }); + }, + } satisfies Action); + } + + for (const Path of Paths) { + await ( + await ( + await ( + await new ( + await import("files-pipe") + ).default(Cache, Logger).In(Path) + ).By(_Map[File] ?? "**/*") + ).Not(Exclude) + ).Pipe(_Action); + } + } + }, + // @TODO: Finish this + // "astro:config:setup": ({ addMiddleware }) => { + // addMiddleware(); + // }, + }, + }; +}) satisfies Type as Type; + +import type Onsharp from "../Interface/Image/Onsharp.js"; +import type Type from "../Interface/Integration.js"; + +import type Action from "files-pipe/Target/Interface/Action.js"; +import type Path from "files-pipe/Target/Type/Path.js"; + +export const { default: Default } = await import("../Variable/Option.js"); + +export const { + default: { + Cache: { Search }, + }, +} = await import("files-pipe/Target/Variable/Option.js"); + +export const { default: Merge } = await import( + "typescript-esbuild/Target/Function/Merge.js" +); + +export const { default: Defaultsharp } = await import("sharp"); + +export let _Action: Action; diff --git a/Source/Index.ts b/Source/Index.ts deleted file mode 100644 index e6e86119..00000000 --- a/Source/Index.ts +++ /dev/null @@ -1,164 +0,0 @@ -import type { AstroIntegration } from "astro"; -import { minify as csso } from "csso"; -import { Files } from "files-pipe"; -import Merge from "files-pipe/Target/Library/Merge.js"; -import type { Executions, Path } from "files-pipe/Target/Options/Index.js"; -import defaults from "files-pipe/Target/Options/Index.js"; -import { minify as htmlMinifierTerser } from "html-minifier-terser"; -import sharp from "sharp"; -import type { Output } from "svgo"; -import { optimize as SVG } from "svgo"; -import { minify as TERSER } from "terser"; -import Bytes from "files-pipe/Target/Library/Bytes.js"; -import type { OnSharp } from "./Library/SharpRead.js"; -import SharpRead from "./Library/SharpRead.js"; -import type { Options } from "./options/Index.js"; -import Defaults from "./options/Index.js"; - -export default (Options: Options = {}): AstroIntegration => { - for (const Option in Options) { - if ( - Object.prototype.hasOwnProperty.call(Options, Option) && - Options[Option] === true - ) { - Options[Option] = Defaults[Option]; - } - } - - const _options = Merge(Defaults, Options); - - const paths = new Set(); - - if (typeof _options["path"] !== "undefined") { - if ( - _options["path"] instanceof Array || - _options["path"] instanceof Set - ) { - for (const path of _options["path"]) { - paths.add(path); - } - } - } - - return { - name: "astro-compress", - hooks: { - "astro:build:done": async ({ dir }) => { - if (!paths.size) { - paths.add(dir); - } - - for (const [fileType, setting] of Object.entries(_options)) { - if (!setting) { - continue; - } - - for (const path of paths) { - await ( - await ( - await ( - await new Files(_options["logger"]).in(path) - ).By( - typeof _options["map"] === "object" - ? _options["map"][fileType] - : "" - ) - ).not(_options["Exclude"]) - ).Pipe( - Merge(_options["Pipe"], { - Wrote: async (ongoing) => { - switch (fileType) { - case "css": { - return csso( - ongoing.buffer.toString(), - setting - ).css; - } - - case "html": { - return await htmlMinifierTerser( - ongoing.buffer.toString(), - setting - ); - } - - case "js": { - const { code } = await TERSER( - ongoing.buffer.toString(), - setting - ); - - return code ? code : ongoing.buffer; - } - - case "img": { - return SharpRead( - setting, - ongoing as OnSharp - ); - } - - case "svg": { - const { data } = SVG( - ongoing.buffer.toString(), - setting - ) as Output; - - if (typeof data !== "undefined") { - return data; - } - - return ongoing.buffer; - } - - default: { - return ongoing.buffer; - } - } - }, - read: async (ongoing) => { - switch (fileType) { - case "img": { - const { format } = await sharp( - ongoing.Input - ).metadata(); - - return sharp(ongoing.Input, { - failOn: "none", - sequentialRead: true, - unlimited: true, - animated: - format === "webp" || - format === "gif" - ? true - : false, - }); - } - - default: { - return await defaults["pipe"].read( - ongoing - ); - } - } - }, - Fulfilled: async (plan) => - plan.Files > 0 - ? `Successfully compressed a total of ${ - plan.Files - } ${fileType.toUpperCase()} ${ - plan.Files === 1 - ? "file" - : "files" - } for ${await Bytes( - plan.info.total - )}.` - : false, - } satisfies Executions) - ); - } - } - }, - }, - }; -}; diff --git a/Source/Interface/CSS/csso.ts b/Source/Interface/CSS/csso.ts new file mode 100644 index 00000000..193677c4 --- /dev/null +++ b/Source/Interface/CSS/csso.ts @@ -0,0 +1,35 @@ +/** + * @module CSS + * + */ +export default interface Type extends MinifyOptions, CompressOptions { + /** + * Specify what comments to leave: + * - 'exclamation' or true – leave all exclamation comments + * - 'first-exclamation' – remove every comment except first one + * - false – remove all comments + * + * @default AstroCompress false + * @default csso true + */ + comments?: boolean; + + /** + * Enables merging of @media rules with the same media query by splitted by other rules. + * The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk. + * + * @default AstroCompress true + * @default csso false + */ + forceMediaMerge?: boolean; + + /** + * Disable or enable a structure optimisations. + * + * @default AstroCompress false + * @default csso true + */ + restructure?: boolean; +} + +import type { CompressOptions, MinifyOptions } from "csso"; diff --git a/Source/Interface/CSS/lightningcss.ts b/Source/Interface/CSS/lightningcss.ts new file mode 100644 index 00000000..09eb2de0 --- /dev/null +++ b/Source/Interface/CSS/lightningcss.ts @@ -0,0 +1,16 @@ +/** + * @module CSS + * + */ +export default interface Type + extends Omit, "filename" | "code"> { + /** + * Whether to enable minification + * + * @default AstroCompress true + * @default lightningcss false + */ + minify?: boolean; +} + +import type { TransformOptions, CustomAtRules } from "lightningcss"; diff --git a/Source/Interface/Directory.ts b/Source/Interface/Directory.ts new file mode 100644 index 00000000..5521ca9b --- /dev/null +++ b/Source/Interface/Directory.ts @@ -0,0 +1,9 @@ +/** + * @module Directory + * + */ +export default interface Type { + (Path: string): Promise; +} + +import type { ParsedPath } from "path"; diff --git a/Source/Interface/Image/Onsharp.ts b/Source/Interface/Image/Onsharp.ts new file mode 100644 index 00000000..74991329 --- /dev/null +++ b/Source/Interface/Image/Onsharp.ts @@ -0,0 +1,14 @@ +/** + * @module Image + * + */ +export default interface Type extends Omit { + Buffer: { + // biome-ignore lint/suspicious/noExplicitAny: + [key: string]: any; + } & Sharp; +} + +import type File from "files-pipe/Target/Interface/File.js"; + +import type { Sharp } from "sharp"; diff --git a/Source/Interface/Image/Writesharp.ts b/Source/Interface/Image/Writesharp.ts new file mode 100644 index 00000000..e09991ea --- /dev/null +++ b/Source/Interface/Image/Writesharp.ts @@ -0,0 +1,11 @@ +/** + * @module Image + * + */ +export default interface Type { + // biome-ignore lint/suspicious/noExplicitAny: + (Option: Option, On: On): Promise; +} + +import type On from "./Onsharp.js"; +import type Option from "./sharp.js"; diff --git a/Source/Option/IMG.ts b/Source/Interface/Image/sharp.ts similarity index 54% rename from Source/Option/IMG.ts rename to Source/Interface/Image/sharp.ts index e0780c37..48cb0601 100644 --- a/Source/Option/IMG.ts +++ b/Source/Interface/Image/sharp.ts @@ -1,14 +1,8 @@ -import type { - AvifOptions, - GifOptions, - HeifOptions, - JpegOptions, - PngOptions, - TiffOptions, - WebpOptions, -} from "sharp"; - -export interface IMG { +/** + * @module Image + * + */ +export default interface Type { [key: string]: | undefined | boolean @@ -35,30 +29,12 @@ export interface IMG { webp?: boolean | WebpOptions; } -export default { - avif: { - chromaSubsampling: "4:4:4", - effort: 9.0, - }, - gif: { - effort: 10.0, - }, - jpeg: { - chromaSubsampling: "4:4:4", - mozjpeg: true, - trellisQuantisation: true, - overshootDeringing: true, - optimiseScans: true, - }, - png: { - compressionLevel: 9.0, - palette: true, - }, - raw: {}, - tiff: { - compression: "lzw", - }, - webp: { - effort: 6.0, - }, -} satisfies IMG; +import type { + AvifOptions, + GifOptions, + HeifOptions, + JpegOptions, + PngOptions, + TiffOptions, + WebpOptions, +} from "sharp"; diff --git a/Source/Interface/Integration.ts b/Source/Interface/Integration.ts new file mode 100644 index 00000000..39deb59f --- /dev/null +++ b/Source/Interface/Integration.ts @@ -0,0 +1,11 @@ +/** + * @module Integration + * + */ +export default interface Type { + (Option?: Option): AstroIntegration; +} + +import type { AstroIntegration } from "astro"; + +import type Option from "../Interface/Option.js"; diff --git a/Source/Interface/Map.ts b/Source/Interface/Map.ts new file mode 100644 index 00000000..156257b9 --- /dev/null +++ b/Source/Interface/Map.ts @@ -0,0 +1,7 @@ +/** + * @module Map + * + */ +export default interface Type { + [key: string]: string; +} diff --git a/Source/Interface/Option.ts b/Source/Interface/Option.ts new file mode 100644 index 00000000..bf462496 --- /dev/null +++ b/Source/Interface/Option.ts @@ -0,0 +1,80 @@ +/** + * @module Option + * + */ +export default interface Type extends Option { + /** + * csso, lightningcss option properties + * + */ + CSS?: + | boolean + | { + csso?: csso; + lightningcss?: lightningcss; + }; + + /** + * html-minifier-terser option properties + * + */ + HTML?: + | boolean + | { + "html-minifier-terser"?: html_minifier_terser; + }; + + /** + * sharp option properties + * + */ + Image?: + | boolean + | { + sharp?: sharp; + }; + + /** + * terser option properties + * + */ + JavaScript?: + | boolean + | { + terser?: terser; + }; + + /** + * svgo option properties + * + */ + SVG?: + | boolean + | { + svgo?: svgo; + }; + + /** + * Map to different file paths + * + */ + Map?: boolean | _Map; + + /** + * Parsers for different file types + * + */ + Parser?: Parser; +} + +import type html_minifier_terser from "../Type/HTML/html-minifier-terser.js"; +import type terser from "../Type/JavaScript/terser.js"; +import type svgo from "../Type/SVG/svgo.js"; +import type csso from "./CSS/csso.js"; +import type lightningcss from "./CSS/lightningcss.js"; +import type sharp from "./Image/sharp.js"; + +import type _Map from "./Map.js"; +import type Parser from "./Parser.js"; + +import type Option from "files-pipe/Target/Interface/Option.js"; diff --git a/Source/Interface/Parser.ts b/Source/Interface/Parser.ts new file mode 100644 index 00000000..528b56e9 --- /dev/null +++ b/Source/Interface/Parser.ts @@ -0,0 +1,24 @@ +/** + * @module Parser + * + */ +export default interface Type { + // biome-ignore lint/suspicious/noExplicitAny: + [key: string]: any; + + CSS?: CSS | CSS[]; + + HTML?: HTML | HTML[]; + + Image?: Image | Image[]; + + JavaScript?: JavaScript | JavaScript[]; + + SVG?: SVG | SVG[]; +} + +import type CSS from "../Type/Parser/CSS.js"; +import type HTML from "../Type/Parser/HTML.js"; +import type Image from "../Type/Parser/Image.js"; +import type JavaScript from "../Type/Parser/JavaScript.js"; +import type SVG from "../Type/Parser/SVG.js"; diff --git a/Source/Library/SharpRead.ts b/Source/Library/SharpRead.ts deleted file mode 100644 index c8cfeb94..00000000 --- a/Source/Library/SharpRead.ts +++ /dev/null @@ -1,60 +0,0 @@ -import type { File } from "files-pipe/Target/Options/Index.js"; -import type { Sharp } from "sharp"; -import type { IMG } from "../options/IMG.js"; -import Defaults from "../options/Index.js"; - -export interface BufferSharp extends Sharp { - // rome-ignore lint/suspicious/noExplicitAny: - [key: string]: any; -} - -export interface OnSharp extends Omit { - Buffer: BufferSharp; -} - -export default async (Options: IMG, On: OnSharp) => { - const File = On["Input"].split(".").pop(); - - if (!File) { - return; - } - - const Option: { - [key: string]: string; - } = { - avci: "avif", - avcs: "avif", - avifs: "avif", - heic: "heif", - heics: "heif", - heifs: "heif", - jfif: "jpeg", - jif: "jpeg", - jpe: "jpeg", - apng: "png", - jpg: "jpeg", - }; - - const Type = - typeof Option[File] !== "undefined" - ? Option[File] - : typeof Options[File] !== "undefined" - ? File - : false; - - if ( - Type && - ["avif", "gif", "heif", "jpeg", "png", "raw", "tiff", "webp"].includes( - Type - ) && - typeof Options[Type] !== "undefined" && - Options[Type] !== false - ) { - return ( - Type in On.Buffer && - (await On.Buffer[Type]( - Options[Type] !== true ? Options[Type] : Defaults["img"] - ).toBuffer()) - ); - } -}; diff --git a/Source/Option/CSS.ts b/Source/Option/CSS.ts deleted file mode 100644 index aaa49a96..00000000 --- a/Source/Option/CSS.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { CompressOptions, MinifyOptions } from "csso"; - -export interface CSS extends MinifyOptions, CompressOptions { - // rome-ignore lint/suspicious/noExplicitAny: - [key: string]: any; -} - -export default { - clone: false, - comments: false, - forceMediaMerge: true, - restructure: false, -} satisfies CSS; diff --git a/Source/Option/Index.ts b/Source/Option/Index.ts deleted file mode 100644 index 2ff0583f..00000000 --- a/Source/Option/Index.ts +++ /dev/null @@ -1,63 +0,0 @@ -import Merge from "files-pipe/Target/Library/Merge.js"; -import type { Options as OptionsBase } from "files-pipe/Target/Options/Index.js"; -import defaults from "files-pipe/Target/Options/Index.js"; -import Bytes from "files-pipe/Target/Library/Bytes.js"; -import type { CSS } from "./CSS.js"; -import defaultsCSS from "./CSS.js"; -import type { HTML } from "./HTML.js"; -import defaultsHTML from "./HTML.js"; -import type { IMG } from "./IMG.js"; -import defaultsIMG from "./IMG.js"; -import type { JS } from "./JS.js"; -import defaultsJS from "./JS.js"; -import type { MAP } from "./Map.js"; -import defaultsMAP from "./Map.js"; -import type { SVG } from "./SVG.js"; -import defaultsSVG from "./SVG.js"; - -export interface Options extends OptionsBase { - // rome-ignore lint/suspicious/noExplicitAny: - [key: string]: any; - - css?: boolean | CSS; - - html?: boolean | HTML; - - js?: boolean | JS; - - img?: boolean | IMG; - - svg?: boolean | SVG; - - map?: boolean | MAP; -} - -export default Merge(defaults, { - css: defaultsCSS, - html: defaultsHTML, - js: defaultsJS, - img: defaultsIMG, - svg: defaultsSVG, - map: defaultsMAP, - Pipe: { - Failed: async (ongoing) => - `Error: Cannot compress file ${ongoing.Input}!`, - passed: async (ongoing) => - ongoing.fileSizeBefore > - Buffer.byteLength(ongoing.buffer.toString()), - accomplished: async (ongoing) => - `Compressed ${ongoing.Input} for ${await Bytes( - ongoing.fileSizeBefore - ongoing.fileSizeAfter - )} (${( - ((ongoing.fileSizeBefore - ongoing.fileSizeAfter) / - ongoing.fileSizeBefore) * - 100 - ).toFixed(2)}% reduction) in ${ongoing.outputPath}.`, - changed: async (plan) => { - plan.info.total = - (plan.info.total ? plan.info.total : 0) + - (plan.ongoing.fileSizeBefore - plan.ongoing.fileSizeAfter); - return plan; - }, - }, -} satisfies Options) as Options; diff --git a/Source/Option/Map.ts b/Source/Option/Map.ts deleted file mode 100644 index 120f2e3f..00000000 --- a/Source/Option/Map.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface MAP { - [key: string]: string; -} - -export default { - css: "**/*.css", - html: "**/*.html", - img: "**/*.{avci,avcs,avif,avifs,gif,heic,heics,heif,heifs,jfif,jif,jpe,jpeg,jpg,apng,png,raw,tiff,webp}", - js: "**/*.{js,mjs,cjs,jsm}", - svg: "**/*.svg", -} satisfies MAP; diff --git a/Source/Option/SVG.ts b/Source/Option/SVG.ts deleted file mode 100644 index 31e22e18..00000000 --- a/Source/Option/SVG.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Config } from "svgo"; - -export interface SVG extends Config { - // rome-ignore lint/suspicious/noExplicitAny: - [key: string]: any; -} - -export default { - multipass: true, - js2svg: { - indent: 0, - pretty: false, - }, - plugins: ["preset-default"], -} satisfies SVG; diff --git a/Source/Type/HTML/html-minifier-terser.ts b/Source/Type/HTML/html-minifier-terser.ts new file mode 100644 index 00000000..b6dacb25 --- /dev/null +++ b/Source/Type/HTML/html-minifier-terser.ts @@ -0,0 +1,9 @@ +/** + * @module HTML + * + */ +export type Type = Options; + +export type { Type as default }; + +import type { Options } from "html-minifier-terser"; diff --git a/Source/Type/Image/Filesharp.ts b/Source/Type/Image/Filesharp.ts new file mode 100644 index 00000000..8c5df6bc --- /dev/null +++ b/Source/Type/Image/Filesharp.ts @@ -0,0 +1,11 @@ +/** + * @module File + * + */ +export type Type = keyof typeof _Map; + +export type { Type as default }; + +export const { default: _Map } = await import( + "../../Variable/Image/Mapsharp.js" +); diff --git a/Source/Type/JavaScript/terser.ts b/Source/Type/JavaScript/terser.ts new file mode 100644 index 00000000..5574a09f --- /dev/null +++ b/Source/Type/JavaScript/terser.ts @@ -0,0 +1,9 @@ +/** + * @module JavaScript + * + */ +export type Type = MinifyOptions; + +export type { Type as default }; + +import type { MinifyOptions } from "terser"; diff --git a/Source/Type/Parser/CSS.ts b/Source/Type/Parser/CSS.ts new file mode 100644 index 00000000..03edaf1e --- /dev/null +++ b/Source/Type/Parser/CSS.ts @@ -0,0 +1,7 @@ +/** + * @module Parser + * + */ +export type Type = "csso" | "lightningcss"; + +export type { Type as default }; diff --git a/Source/Type/Parser/HTML.ts b/Source/Type/Parser/HTML.ts new file mode 100644 index 00000000..a16ade60 --- /dev/null +++ b/Source/Type/Parser/HTML.ts @@ -0,0 +1,7 @@ +/** + * @module Parser + * + */ +export type Type = "html-minifier-terser"; + +export type { Type as default }; diff --git a/Source/Type/Parser/Image.ts b/Source/Type/Parser/Image.ts new file mode 100644 index 00000000..0b369b09 --- /dev/null +++ b/Source/Type/Parser/Image.ts @@ -0,0 +1,7 @@ +/** + * @module Parser + * + */ +export type Type = "sharp"; + +export type { Type as default }; diff --git a/Source/Type/Parser/JavaScript.ts b/Source/Type/Parser/JavaScript.ts new file mode 100644 index 00000000..c379abf3 --- /dev/null +++ b/Source/Type/Parser/JavaScript.ts @@ -0,0 +1,7 @@ +/** + * @module Parser + * + */ +export type Type = "terser"; + +export type { Type as default }; diff --git a/Source/Type/Parser/SVG.ts b/Source/Type/Parser/SVG.ts new file mode 100644 index 00000000..518d6ad5 --- /dev/null +++ b/Source/Type/Parser/SVG.ts @@ -0,0 +1,7 @@ +/** + * @module Parser + * + */ +export type Type = "svgo"; + +export type { Type as default }; diff --git a/Source/Type/SVG/svgo.ts b/Source/Type/SVG/svgo.ts new file mode 100644 index 00000000..b14c6d0d --- /dev/null +++ b/Source/Type/SVG/svgo.ts @@ -0,0 +1,9 @@ +/** + * @module SVG + * + */ +export type Type = Config; + +export type { Type as default }; + +import type { Config } from "svgo"; diff --git a/Source/Variable/CSS/csso.ts b/Source/Variable/CSS/csso.ts new file mode 100644 index 00000000..838c0ad6 --- /dev/null +++ b/Source/Variable/CSS/csso.ts @@ -0,0 +1,11 @@ +/** + * @module CSS + * + */ +export default { + comments: false, + forceMediaMerge: true, + restructure: false, +} satisfies Type; + +import type Type from "../../Interface/CSS/csso.js"; diff --git a/Source/Variable/CSS/lightningcss.ts b/Source/Variable/CSS/lightningcss.ts new file mode 100644 index 00000000..67490292 --- /dev/null +++ b/Source/Variable/CSS/lightningcss.ts @@ -0,0 +1,9 @@ +/** + * @module CSS + * + */ +export default { + minify: true, +} satisfies Type; + +import type Type from "../../Interface/CSS/lightningcss.js"; diff --git a/Source/Option/HTML.ts b/Source/Variable/HTML/html-minifier-terser.ts similarity index 90% rename from Source/Option/HTML.ts rename to Source/Variable/HTML/html-minifier-terser.ts index 80ec03db..64d00600 100644 --- a/Source/Option/HTML.ts +++ b/Source/Variable/HTML/html-minifier-terser.ts @@ -1,10 +1,7 @@ -import type { Options } from "html-minifier-terser"; - -export interface HTML extends Options { - // rome-ignore lint/suspicious/noExplicitAny: - [key: string]: any; -} - +/** + * @module HTML + * + */ export default { caseSensitive: true, collapseInlineTagWhitespace: false, @@ -82,4 +79,6 @@ export default { sortClassName: true, trimCustomFragments: true, useShortDoctype: false, -} satisfies HTML; +} satisfies Type; + +import type Type from "../../Type/HTML/html-minifier-terser.js"; diff --git a/Source/Variable/Image/Mapsharp.ts b/Source/Variable/Image/Mapsharp.ts new file mode 100644 index 00000000..9a803481 --- /dev/null +++ b/Source/Variable/Image/Mapsharp.ts @@ -0,0 +1,19 @@ +/** + * @module Image + * + */ +export default { + avci: "avif", + avcs: "avif", + avifs: "avif", + heic: "heif", + heics: "heif", + heifs: "heif", + jfif: "jpeg", + jif: "jpeg", + jpe: "jpeg", + apng: "png", + jpg: "jpeg", +} satisfies Type; + +import type Type from "../../Interface/Map.js"; diff --git a/Source/Variable/Image/sharp.ts b/Source/Variable/Image/sharp.ts new file mode 100644 index 00000000..4c08f758 --- /dev/null +++ b/Source/Variable/Image/sharp.ts @@ -0,0 +1,33 @@ +/** + * @module Image + * + */ +export default { + avif: { + chromaSubsampling: "4:4:4", + effort: 9.0, + }, + gif: { + effort: 10.0, + }, + jpeg: { + chromaSubsampling: "4:4:4", + mozjpeg: true, + trellisQuantisation: true, + overshootDeringing: true, + optimiseScans: true, + }, + png: { + compressionLevel: 9.0, + palette: true, + }, + raw: {}, + tiff: { + compression: "lzw", + }, + webp: { + effort: 6.0, + }, +} satisfies Type; + +import type Type from "../../Interface/Image/sharp.js"; diff --git a/Source/Option/JS.ts b/Source/Variable/JavaScript/terser.ts similarity index 51% rename from Source/Option/JS.ts rename to Source/Variable/JavaScript/terser.ts index 82e30a6e..37c9ecce 100644 --- a/Source/Option/JS.ts +++ b/Source/Variable/JavaScript/terser.ts @@ -1,10 +1,7 @@ -import type { MinifyOptions } from "terser"; - -export interface JS extends MinifyOptions { - // rome-ignore lint/suspicious/noExplicitAny: - [key: string]: any; -} - +/** + * @module JavaScript + * + */ export default { ecma: 5, enclose: false, @@ -17,4 +14,6 @@ export default { format: { comments: false, }, -} satisfies JS; +} satisfies Type; + +import type Type from "../../Type/JavaScript/terser.js"; diff --git a/Source/Variable/Map.ts b/Source/Variable/Map.ts new file mode 100644 index 00000000..dd3e1233 --- /dev/null +++ b/Source/Variable/Map.ts @@ -0,0 +1,13 @@ +/** + * @module Map + * + */ +export default { + CSS: "**/*.css", + HTML: "**/*.html", + Image: "**/*.{apng,avci,avcs,avif,avifs,gif,heic,heics,heif,heifs,jfif,jif,jpe,jpeg,jpg,png,raw,tiff,webp}", + JavaScript: "**/*.{js,mjs,cjs,jsm}", + SVG: "**/*.svg", +} satisfies Type; + +import type Type from "../Interface/Map.js"; diff --git a/Source/Variable/Middleware.ts b/Source/Variable/Middleware.ts new file mode 100644 index 00000000..c748a7f7 --- /dev/null +++ b/Source/Variable/Middleware.ts @@ -0,0 +1,9 @@ +/** + * @module Middleware + * + */ + +// @TODO: Finish this +// export const onRequest = defineMiddleware(); + +// export const { default: defineMiddleware } = await import("astro:middleware"); diff --git a/Source/Variable/Option.ts b/Source/Variable/Option.ts new file mode 100644 index 00000000..d6d2c858 --- /dev/null +++ b/Source/Variable/Option.ts @@ -0,0 +1,64 @@ +/** + * @module Option + * + */ +export default ( + await import("typescript-esbuild/Target/Function/Merge.js") +).default((await import("files-pipe/Target/Variable/Option.js")).default, { + CSS: { + csso: (await import("./CSS/csso.js")).default, + lightningcss: (await import("./CSS/lightningcss.js")).default, + }, + HTML: { + "html-minifier-terser": (await import("./HTML/html-minifier-terser.js")) + .default, + }, + JavaScript: { + terser: (await import("./JavaScript/terser.js")).default, + }, + Image: { + sharp: (await import("./Image/sharp.js")).default, + }, + SVG: { + svgo: (await import("./SVG/svgo.js")).default, + }, + Map: (await import("./Map.js")).default, + Parser: (await import("./Parser.js")).default, + Action: { + Failed: async ({ Input }) => + `${red("Error:")} Cannot compress file ${gray( + await Directory(Input) + )}${red((await import("path")).parse(Input).base)}`, + Passed: async ({ Before, Buffer }) => + Before > _Buffer.byteLength(Buffer.toString()), + Accomplished: async ({ Input, Before, After }) => { + const Saving = Before - After; + + return `${gray( + `(-${await ( + await import("files-pipe/Target/Function/Bytes.js") + ).default(Saving)})` + )} ${(await import("kleur/colors")).green( + `${((Saving / Before) * 100).toFixed(2)}%` + )} reduction in ${gray(await Directory(Input))}${( + await import("kleur/colors") + ).cyan((await import("path")).parse(Input).base)}`; + }, + Changed: async (Plan) => + Object.defineProperty(Plan.Info, "Total", { + value: + (Plan.Info.Total ? Plan.Info.Total : 0) + + (Plan.On.Before - Plan.On.After), + configurable: true, + writable: true, + }) && Plan, + }, +} satisfies Type); + +import type Type from "../Interface/Option.js"; + +const { gray, red } = await import("kleur/colors"); + +const { default: Directory } = await import("../Function/Directory.js"); + +const { Buffer: _Buffer } = await import("buffer"); diff --git a/Source/Variable/Parser.ts b/Source/Variable/Parser.ts new file mode 100644 index 00000000..45d5ac89 --- /dev/null +++ b/Source/Variable/Parser.ts @@ -0,0 +1,13 @@ +/** + * @module Parser + * + */ +export default { + CSS: ["csso", "lightningcss"], + HTML: "html-minifier-terser", + Image: "sharp", + JavaScript: "terser", + SVG: "svgo", +} satisfies Type; + +import type Type from "../Interface/Parser.js"; diff --git a/Source/Variable/SVG/svgo.ts b/Source/Variable/SVG/svgo.ts new file mode 100644 index 00000000..acd44359 --- /dev/null +++ b/Source/Variable/SVG/svgo.ts @@ -0,0 +1,14 @@ +/** + * @module SVG + * + */ +export default { + multipass: true, + js2svg: { + indent: 0, + pretty: false, + }, + plugins: ["preset-default"], +} satisfies Type; + +import type Type from "../../Type/SVG/svgo.js"; diff --git a/Target/Function/Directory.d.ts b/Target/Function/Directory.d.ts new file mode 100644 index 00000000..46900a4f --- /dev/null +++ b/Target/Function/Directory.d.ts @@ -0,0 +1,8 @@ +/** + * @module Directory + * TODO: Test this for performance, mainly importing the Integration.js System variable + * + */ +declare const _default: Type; +export default _default; +import type Type from "../Interface/Directory.js"; diff --git a/Target/Function/Directory.js b/Target/Function/Directory.js new file mode 100644 index 00000000..cd444cc3 --- /dev/null +++ b/Target/Function/Directory.js @@ -0,0 +1 @@ +var r=async(...[a])=>{let e=(await import("path")).parse(a).dir;return e=(await import("path")).normalize(e),e=e.replace(/\\/g,"/"),e=e.replace((await import("../Function/Integration.js")).System,""),e.endsWith("/")||(e+="/"),e};export{r as default}; diff --git a/Target/Function/Image/Writesharp.d.ts b/Target/Function/Image/Writesharp.d.ts new file mode 100644 index 00000000..0769fdad --- /dev/null +++ b/Target/Function/Image/Writesharp.d.ts @@ -0,0 +1,20 @@ +/** + * @module Image + * + */ +declare const _default: Type; +export default _default; +import type Type from "../../Interface/Image/Writesharp.js"; +export declare const _Map: { + avci: string; + avcs: string; + avifs: string; + heic: string; + heics: string; + heifs: string; + jfif: string; + jif: string; + jpe: string; + apng: string; + jpg: string; +}; diff --git a/Target/Function/Image/Writesharp.js b/Target/Function/Image/Writesharp.js new file mode 100644 index 00000000..d049d841 --- /dev/null +++ b/Target/Function/Image/Writesharp.js @@ -0,0 +1 @@ +var r=async(...[a,{Buffer:i,Input:p}])=>{const t=p.split(".").pop();if(!t)return;const e=typeof f[t]<"u"?f[t]:typeof a[t]<"u"?t:!1;if(e&&["avif","gif","heif","jpeg","png","raw","tiff","webp"].includes(e)&&typeof a[e]<"u"&&a[e]!==!1)return e in i&&await i[e](a[e]!==!0?a[e]:(await import("../../Variable/Image/sharp.js")).default).toBuffer()};const{default:f}=await import("../../Variable/Image/Mapsharp.js");export{f as _Map,r as default}; diff --git a/Target/Function/Integration.d.ts b/Target/Function/Integration.d.ts new file mode 100644 index 00000000..e67e083d --- /dev/null +++ b/Target/Function/Integration.d.ts @@ -0,0 +1,139 @@ +/** + * @module Integration + * + */ +export declare let System: string; +declare const _default: Type; +export default _default; +import type Type from "../Interface/Integration.js"; +import type Action from "files-pipe/Target/Interface/Action.js"; +export declare const Default: Omit<{} & { + CSS: { + csso: { + comments: false; + forceMediaMerge: true; + restructure: false; + }; + lightningcss: { + minify: true; + }; + }; + HTML: { + "html-minifier-terser": { + caseSensitive: true; + collapseInlineTagWhitespace: false; + collapseWhitespace: true; + continueOnParseError: true; + html5: true; + ignoreCustomComments: RegExp[]; + includeAutoGeneratedTags: true; + keepClosingSlash: true; + minifyCSS: true; + minifyJS: true; + minifyURLs: false; + noNewlinesBeforeTagClose: true; + preventAttributesEscaping: false; + processConditionalComments: false; + processScripts: string[]; + quoteCharacter: string; + removeAttributeQuotes: true; + removeComments: true; + removeScriptTypeAttributes: true; + removeStyleLinkTypeAttributes: true; + removeTagWhitespace: false; + sortAttributes: true; + sortClassName: true; + trimCustomFragments: true; + useShortDoctype: false; + }; + }; + Image: { + sharp: { + avif: { + chromaSubsampling: string; + effort: number; + }; + gif: { + effort: number; + }; + jpeg: { + chromaSubsampling: string; + mozjpeg: true; + trellisQuantisation: true; + overshootDeringing: true; + optimiseScans: true; + }; + png: { + compressionLevel: number; + palette: true; + }; + raw: {}; + tiff: { + compression: string; + }; + webp: { + effort: number; + }; + }; + }; + JavaScript: { + terser: { + ecma: 5; + enclose: false; + keep_classnames: false; + keep_fnames: false; + ie8: false; + module: false; + safari10: false; + toplevel: false; + format: { + comments: false; + }; + }; + }; + SVG: { + svgo: { + multipass: true; + js2svg: { + indent: number; + pretty: false; + }; + plugins: "preset-default"[]; + }; + }; + Map: { + CSS: string; + HTML: string; + Image: string; + JavaScript: string; + SVG: string; + }; + Parser: { + CSS: ("csso" | "lightningcss")[]; + HTML: "html-minifier-terser"; + Image: "sharp"; + JavaScript: "terser"; + SVG: "svgo"; + }; + Path: string; + Cache: { + Search: string; + Folder: string; + }; + Logger: 2; + Action: Omit<{} & { + Failed: ({ Input }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Passed: ({ Before, Buffer }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Accomplished: ({ Input, Before, After }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Changed: (Plan: import("files-pipe/Target/Interface/Plan.js").default) => Promise; + Read: ({ Input }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Wrote: ({ Buffer }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Fulfilled: ({ Files }: import("files-pipe/Target/Interface/Plan.js").default) => Promise; + }, "__proto__">; + Files: string; + Exclude: false; +}, "__proto__">; +export declare const Search: string; +export declare const Merge: import("typescript-esbuild/Target/Interface/Merge.js").default; +export declare const Defaultsharp: typeof import("sharp"); +export declare let _Action: Action; diff --git a/Target/Function/Integration.js b/Target/Function/Integration.js new file mode 100644 index 00000000..d57286a2 --- /dev/null +++ b/Target/Function/Integration.js @@ -0,0 +1,2 @@ +let p;var P=(...[r={}])=>{Object.entries(r).forEach(([e,a])=>Object.defineProperty(r,e,{value:a===!0?u[e]:r[e]}));const{Path:o,Cache:s,Logger:g,Map:l,Exclude:h,Action:d,CSS:S,HTML:b,Image:j,JavaScript:A,SVG:T,Parser:y}=f(u,r),n=new Set;return typeof o<"u"&&(Array.isArray(o)||o instanceof Set)&&o.forEach(e=>n.add(e)),typeof y=="object"&&Object.entries(y).forEach(([e,a])=>Object.defineProperty(y,e,{value:Array.isArray(a)?a:[a]})),{name:"astro-compress",hooks:{"astro:config:done":async({config:{outDir:{pathname:e}}})=>{p=(await import("path")).parse(e).dir.replace(/\\/g,"/"),p.startsWith("/")&&(p=p.substring(1))},"astro:build:done":async({dir:e})=>{if(console.log(` +${(await import("kleur/colors")).bgGreen((await import("kleur/colors")).black(" AstroCompress processing "))}`),typeof l=="object"){n.size||n.add(e),typeof s=="object"&&s.Search===x&&(s.Search=e);for(const[a,i]of Object.entries({CSS:S,HTML:b,Image:j,JavaScript:A,SVG:T}))if(!(!(i&&l[a])||typeof i!="object")){m=f(d,f(d,{Wrote:async({Buffer:t,Input:c})=>{switch(a){case"CSS":return(await import("csso")).minify(t.toString(),i.csso).css;case"HTML":return await(await import("html-minifier-terser")).minify(t.toString(),i["html-minifier-terser"]);case"JavaScript":return(await(await import("terser")).minify(t.toString(),i.terser)).code??t;case"Image":return await(await import("../Function/Image/Writesharp.js")).default(i.sharp,{Buffer:t,Input:c});case"SVG":{const{data:I}=(await import("svgo")).optimize(t.toString(),i.svgo);return I??t}default:return t}},Fulfilled:async t=>t.Files>0?`${(await import("kleur/colors")).green(`\u2713 Successfully compressed a total of ${t.Files} ${a} ${t.Files===1?"file":"files"} for ${await(await import("files-pipe/Target/Function/Bytes.js")).default(t.Info.Total)}.`)}`:!1})),a==="Image"&&(m=f(m,{Read:async({Input:t})=>{const{format:c}=await w(t).metadata();return w(t,{failOn:"none",sequentialRead:!0,unlimited:!0,animated:c==="webp"||c==="gif"})}}));for(const t of n)await(await(await(await new(await import("files-pipe")).default(s,g).In(t)).By(l[a]??"**/*")).Not(h)).Pipe(m)}}}}}};const{default:u}=await import("../Variable/Option.js"),{default:{Cache:{Search:x}}}=await import("files-pipe/Target/Variable/Option.js"),{default:f}=await import("typescript-esbuild/Target/Function/Merge.js"),{default:w}=await import("sharp");let m;export{u as Default,w as Defaultsharp,f as Merge,x as Search,p as System,m as _Action,P as default}; diff --git a/Target/Interface/CSS/csso.d.ts b/Target/Interface/CSS/csso.d.ts new file mode 100644 index 00000000..50dae9d1 --- /dev/null +++ b/Target/Interface/CSS/csso.d.ts @@ -0,0 +1,32 @@ +/** + * @module CSS + * + */ +export default interface Type extends MinifyOptions, CompressOptions { + /** + * Specify what comments to leave: + * - 'exclamation' or true – leave all exclamation comments + * - 'first-exclamation' – remove every comment except first one + * - false – remove all comments + * + * @default AstroCompress false + * @default csso true + */ + comments?: boolean; + /** + * Enables merging of @media rules with the same media query by splitted by other rules. + * The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk. + * + * @default AstroCompress true + * @default csso false + */ + forceMediaMerge?: boolean; + /** + * Disable or enable a structure optimisations. + * + * @default AstroCompress false + * @default csso true + */ + restructure?: boolean; +} +import type { CompressOptions, MinifyOptions } from "csso"; diff --git a/Target/Interface/CSS/csso.js b/Target/Interface/CSS/csso.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/CSS/lightningcss.d.ts b/Target/Interface/CSS/lightningcss.d.ts new file mode 100644 index 00000000..76a2ccc1 --- /dev/null +++ b/Target/Interface/CSS/lightningcss.d.ts @@ -0,0 +1,14 @@ +/** + * @module CSS + * + */ +export default interface Type extends Omit, "filename" | "code"> { + /** + * Whether to enable minification + * + * @default AstroCompress true + * @default lightningcss false + */ + minify?: boolean; +} +import type { TransformOptions, CustomAtRules } from "lightningcss"; diff --git a/Target/Interface/CSS/lightningcss.js b/Target/Interface/CSS/lightningcss.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/Directory.d.ts b/Target/Interface/Directory.d.ts new file mode 100644 index 00000000..2399444f --- /dev/null +++ b/Target/Interface/Directory.d.ts @@ -0,0 +1,9 @@ +/// +/** + * @module Directory + * + */ +export default interface Type { + (Path: string): Promise; +} +import type { ParsedPath } from "path"; diff --git a/Target/Interface/Directory.js b/Target/Interface/Directory.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/Image/Onsharp.d.ts b/Target/Interface/Image/Onsharp.d.ts new file mode 100644 index 00000000..a07d74b4 --- /dev/null +++ b/Target/Interface/Image/Onsharp.d.ts @@ -0,0 +1,11 @@ +/** + * @module Image + * + */ +export default interface Type extends Omit { + Buffer: { + [key: string]: any; + } & Sharp; +} +import type File from "files-pipe/Target/Interface/File.js"; +import type { Sharp } from "sharp"; diff --git a/Target/Interface/Image/Onsharp.js b/Target/Interface/Image/Onsharp.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/Image/Writesharp.d.ts b/Target/Interface/Image/Writesharp.d.ts new file mode 100644 index 00000000..72840fbc --- /dev/null +++ b/Target/Interface/Image/Writesharp.d.ts @@ -0,0 +1,9 @@ +/** + * @module Image + * + */ +export default interface Type { + (Option: Option, On: On): Promise; +} +import type On from "./Onsharp.js"; +import type Option from "./sharp.js"; diff --git a/Target/Interface/Image/Writesharp.js b/Target/Interface/Image/Writesharp.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/Image/sharp.d.ts b/Target/Interface/Image/sharp.d.ts new file mode 100644 index 00000000..d8ac34e6 --- /dev/null +++ b/Target/Interface/Image/sharp.d.ts @@ -0,0 +1,15 @@ +/** + * @module Image + * + */ +export default interface Type { + [key: string]: undefined | boolean | AvifOptions | GifOptions | HeifOptions | JpegOptions | PngOptions | TiffOptions | WebpOptions; + avif?: boolean | AvifOptions; + gif?: boolean | GifOptions; + heif?: boolean | HeifOptions; + jpeg?: boolean | JpegOptions; + png?: boolean | PngOptions; + tiff?: boolean | TiffOptions; + webp?: boolean | WebpOptions; +} +import type { AvifOptions, GifOptions, HeifOptions, JpegOptions, PngOptions, TiffOptions, WebpOptions } from "sharp"; diff --git a/Target/Interface/Image/sharp.js b/Target/Interface/Image/sharp.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/Integration.d.ts b/Target/Interface/Integration.d.ts new file mode 100644 index 00000000..8939c0f0 --- /dev/null +++ b/Target/Interface/Integration.d.ts @@ -0,0 +1,9 @@ +/** + * @module Integration + * + */ +export default interface Type { + (Option?: Option): AstroIntegration; +} +import type { AstroIntegration } from "astro"; +import type Option from "../Interface/Option.js"; diff --git a/Target/Interface/Integration.js b/Target/Interface/Integration.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/Map.d.ts b/Target/Interface/Map.d.ts new file mode 100644 index 00000000..61b8ff8d --- /dev/null +++ b/Target/Interface/Map.d.ts @@ -0,0 +1,7 @@ +/** + * @module Map + * + */ +export default interface Type { + [key: string]: string; +} diff --git a/Target/Interface/Map.js b/Target/Interface/Map.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/Option.d.ts b/Target/Interface/Option.d.ts new file mode 100644 index 00000000..d47e3ec7 --- /dev/null +++ b/Target/Interface/Option.d.ts @@ -0,0 +1,61 @@ +/** + * @module Option + * + */ +export default interface Type extends Option { + /** + * csso, lightningcss option properties + * + */ + CSS?: boolean | { + csso?: csso; + lightningcss?: lightningcss; + }; + /** + * html-minifier-terser option properties + * + */ + HTML?: boolean | { + "html-minifier-terser"?: html_minifier_terser; + }; + /** + * sharp option properties + * + */ + Image?: boolean | { + sharp?: sharp; + }; + /** + * terser option properties + * + */ + JavaScript?: boolean | { + terser?: terser; + }; + /** + * svgo option properties + * + */ + SVG?: boolean | { + svgo?: svgo; + }; + /** + * Map to different file paths + * + */ + Map?: boolean | _Map; + /** + * Parsers for different file types + * + */ + Parser?: Parser; +} +import type html_minifier_terser from "../Type/HTML/html-minifier-terser.js"; +import type terser from "../Type/JavaScript/terser.js"; +import type svgo from "../Type/SVG/svgo.js"; +import type csso from "./CSS/csso.js"; +import type lightningcss from "./CSS/lightningcss.js"; +import type sharp from "./Image/sharp.js"; +import type _Map from "./Map.js"; +import type Parser from "./Parser.js"; +import type Option from "files-pipe/Target/Interface/Option.js"; diff --git a/Target/Interface/Option.js b/Target/Interface/Option.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Interface/Parser.d.ts b/Target/Interface/Parser.d.ts new file mode 100644 index 00000000..a465b38f --- /dev/null +++ b/Target/Interface/Parser.d.ts @@ -0,0 +1,17 @@ +/** + * @module Parser + * + */ +export default interface Type { + [key: string]: any; + CSS?: CSS | CSS[]; + HTML?: HTML | HTML[]; + Image?: Image | Image[]; + JavaScript?: JavaScript | JavaScript[]; + SVG?: SVG | SVG[]; +} +import type CSS from "../Type/Parser/CSS.js"; +import type HTML from "../Type/Parser/HTML.js"; +import type Image from "../Type/Parser/Image.js"; +import type JavaScript from "../Type/Parser/JavaScript.js"; +import type SVG from "../Type/Parser/SVG.js"; diff --git a/Target/Interface/Parser.js b/Target/Interface/Parser.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Type/HTML/html-minifier-terser.d.ts b/Target/Type/HTML/html-minifier-terser.d.ts new file mode 100644 index 00000000..86bf1dfc --- /dev/null +++ b/Target/Type/HTML/html-minifier-terser.d.ts @@ -0,0 +1,7 @@ +/** + * @module HTML + * + */ +export type Type = Options; +export type { Type as default }; +import type { Options } from "html-minifier-terser"; diff --git a/Target/Type/HTML/html-minifier-terser.js b/Target/Type/HTML/html-minifier-terser.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Type/Image/Filesharp.d.ts b/Target/Type/Image/Filesharp.d.ts new file mode 100644 index 00000000..81bb45e2 --- /dev/null +++ b/Target/Type/Image/Filesharp.d.ts @@ -0,0 +1,19 @@ +/** + * @module File + * + */ +export type Type = keyof typeof _Map; +export type { Type as default }; +export declare const _Map: { + avci: string; + avcs: string; + avifs: string; + heic: string; + heics: string; + heifs: string; + jfif: string; + jif: string; + jpe: string; + apng: string; + jpg: string; +}; diff --git a/Target/Type/Image/Filesharp.js b/Target/Type/Image/Filesharp.js new file mode 100644 index 00000000..b3505d34 --- /dev/null +++ b/Target/Type/Image/Filesharp.js @@ -0,0 +1 @@ +const{default:e}=await import("../../Variable/Image/Mapsharp.js");export{e as _Map}; diff --git a/Target/Type/JavaScript/terser.d.ts b/Target/Type/JavaScript/terser.d.ts new file mode 100644 index 00000000..3615fb6b --- /dev/null +++ b/Target/Type/JavaScript/terser.d.ts @@ -0,0 +1,7 @@ +/** + * @module JavaScript + * + */ +export type Type = MinifyOptions; +export type { Type as default }; +import type { MinifyOptions } from "terser"; diff --git a/Target/Type/JavaScript/terser.js b/Target/Type/JavaScript/terser.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Type/Parser/CSS.d.ts b/Target/Type/Parser/CSS.d.ts new file mode 100644 index 00000000..fe2c732d --- /dev/null +++ b/Target/Type/Parser/CSS.d.ts @@ -0,0 +1,6 @@ +/** + * @module Parser + * + */ +export type Type = "csso" | "lightningcss"; +export type { Type as default }; diff --git a/Target/Type/Parser/CSS.js b/Target/Type/Parser/CSS.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Type/Parser/HTML.d.ts b/Target/Type/Parser/HTML.d.ts new file mode 100644 index 00000000..f2d7711c --- /dev/null +++ b/Target/Type/Parser/HTML.d.ts @@ -0,0 +1,6 @@ +/** + * @module Parser + * + */ +export type Type = "html-minifier-terser"; +export type { Type as default }; diff --git a/Target/Type/Parser/HTML.js b/Target/Type/Parser/HTML.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Type/Parser/Image.d.ts b/Target/Type/Parser/Image.d.ts new file mode 100644 index 00000000..7aea8631 --- /dev/null +++ b/Target/Type/Parser/Image.d.ts @@ -0,0 +1,6 @@ +/** + * @module Parser + * + */ +export type Type = "sharp"; +export type { Type as default }; diff --git a/Target/Type/Parser/Image.js b/Target/Type/Parser/Image.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Type/Parser/JavaScript.d.ts b/Target/Type/Parser/JavaScript.d.ts new file mode 100644 index 00000000..a0e73dba --- /dev/null +++ b/Target/Type/Parser/JavaScript.d.ts @@ -0,0 +1,6 @@ +/** + * @module Parser + * + */ +export type Type = "terser"; +export type { Type as default }; diff --git a/Target/Type/Parser/JavaScript.js b/Target/Type/Parser/JavaScript.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Type/Parser/SVG.d.ts b/Target/Type/Parser/SVG.d.ts new file mode 100644 index 00000000..3848871e --- /dev/null +++ b/Target/Type/Parser/SVG.d.ts @@ -0,0 +1,6 @@ +/** + * @module Parser + * + */ +export type Type = "svgo"; +export type { Type as default }; diff --git a/Target/Type/Parser/SVG.js b/Target/Type/Parser/SVG.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Type/SVG/svgo.d.ts b/Target/Type/SVG/svgo.d.ts new file mode 100644 index 00000000..d76ba6e1 --- /dev/null +++ b/Target/Type/SVG/svgo.d.ts @@ -0,0 +1,7 @@ +/** + * @module SVG + * + */ +export type Type = Config; +export type { Type as default }; +import type { Config } from "svgo"; diff --git a/Target/Type/SVG/svgo.js b/Target/Type/SVG/svgo.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Variable/CSS/csso.d.ts b/Target/Variable/CSS/csso.d.ts new file mode 100644 index 00000000..30b986b6 --- /dev/null +++ b/Target/Variable/CSS/csso.d.ts @@ -0,0 +1,10 @@ +/** + * @module CSS + * + */ +declare const _default: { + comments: false; + forceMediaMerge: true; + restructure: false; +}; +export default _default; diff --git a/Target/Variable/CSS/csso.js b/Target/Variable/CSS/csso.js new file mode 100644 index 00000000..2d79820b --- /dev/null +++ b/Target/Variable/CSS/csso.js @@ -0,0 +1 @@ +var e={comments:!1,forceMediaMerge:!0,restructure:!1};export{e as default}; diff --git a/Target/Variable/CSS/lightningcss.d.ts b/Target/Variable/CSS/lightningcss.d.ts new file mode 100644 index 00000000..65e4d93a --- /dev/null +++ b/Target/Variable/CSS/lightningcss.d.ts @@ -0,0 +1,8 @@ +/** + * @module CSS + * + */ +declare const _default: { + minify: true; +}; +export default _default; diff --git a/Target/Variable/CSS/lightningcss.js b/Target/Variable/CSS/lightningcss.js new file mode 100644 index 00000000..b42394a3 --- /dev/null +++ b/Target/Variable/CSS/lightningcss.js @@ -0,0 +1 @@ +var e={minify:!0};export{e as default}; diff --git a/Target/Variable/HTML/html-minifier-terser.d.ts b/Target/Variable/HTML/html-minifier-terser.d.ts new file mode 100644 index 00000000..6f7b2e59 --- /dev/null +++ b/Target/Variable/HTML/html-minifier-terser.d.ts @@ -0,0 +1,32 @@ +/** + * @module HTML + * + */ +declare const _default: { + caseSensitive: true; + collapseInlineTagWhitespace: false; + collapseWhitespace: true; + continueOnParseError: true; + html5: true; + ignoreCustomComments: RegExp[]; + includeAutoGeneratedTags: true; + keepClosingSlash: true; + minifyCSS: true; + minifyJS: true; + minifyURLs: false; + noNewlinesBeforeTagClose: true; + preventAttributesEscaping: false; + processConditionalComments: false; + processScripts: string[]; + quoteCharacter: string; + removeAttributeQuotes: true; + removeComments: true; + removeScriptTypeAttributes: true; + removeStyleLinkTypeAttributes: true; + removeTagWhitespace: false; + sortAttributes: true; + sortClassName: true; + trimCustomFragments: true; + useShortDoctype: false; +}; +export default _default; diff --git a/Target/Variable/HTML/html-minifier-terser.js b/Target/Variable/HTML/html-minifier-terser.js new file mode 100644 index 00000000..ea9685e2 --- /dev/null +++ b/Target/Variable/HTML/html-minifier-terser.js @@ -0,0 +1 @@ +var t={caseSensitive:!0,collapseInlineTagWhitespace:!1,collapseWhitespace:!0,continueOnParseError:!0,html5:!0,ignoreCustomComments:[/^\s*#/,/^\s*\[/,/^\s*\]/,/^\s*!/,/^\s*\//],includeAutoGeneratedTags:!0,keepClosingSlash:!0,minifyCSS:!0,minifyJS:!0,minifyURLs:!1,noNewlinesBeforeTagClose:!0,preventAttributesEscaping:!1,processConditionalComments:!1,processScripts:["application/ecmascript","application/javascript","application/json","application/ld+json","application/manifest+json","application/schema+json","application/vnd.geo+json","application/x-web-app-manifest+json","application/xhtml+xml","application/xml","image/svg+xml","template-worker","template","text/css","text/ecmascript","text/html","text/javascript","text/markdown","text/ng-template","text/plain","text/template","text/x-dust","text/x-dustjs","text/x-eco-template","text/x-eco","text/x-handlebars-template","text/x-handlebars","text/x-jade-template","text/x-jade","text/x-less","text/x-lodash-template","text/x-lodash","text/x-markdown","text/x-mustache-template","text/x-mustache","text/x-pug-template","text/x-pug","text/x-sass","text/x-scss","text/x-stylus","text/x-template","text/x-underscore-template","text/x-underscore","text/x-yaml","text/xml"],quoteCharacter:'"',removeAttributeQuotes:!0,removeComments:!0,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,removeTagWhitespace:!1,sortAttributes:!0,sortClassName:!0,trimCustomFragments:!0,useShortDoctype:!1};export{t as default}; diff --git a/Target/Variable/Image/Mapsharp.d.ts b/Target/Variable/Image/Mapsharp.d.ts new file mode 100644 index 00000000..38234adb --- /dev/null +++ b/Target/Variable/Image/Mapsharp.d.ts @@ -0,0 +1,18 @@ +/** + * @module Image + * + */ +declare const _default: { + avci: string; + avcs: string; + avifs: string; + heic: string; + heics: string; + heifs: string; + jfif: string; + jif: string; + jpe: string; + apng: string; + jpg: string; +}; +export default _default; diff --git a/Target/Variable/Image/Mapsharp.js b/Target/Variable/Image/Mapsharp.js new file mode 100644 index 00000000..2a4777e5 --- /dev/null +++ b/Target/Variable/Image/Mapsharp.js @@ -0,0 +1 @@ +var e={avci:"avif",avcs:"avif",avifs:"avif",heic:"heif",heics:"heif",heifs:"heif",jfif:"jpeg",jif:"jpeg",jpe:"jpeg",apng:"png",jpg:"jpeg"};export{e as default}; diff --git a/Target/Variable/Image/sharp.d.ts b/Target/Variable/Image/sharp.d.ts new file mode 100644 index 00000000..fb35d580 --- /dev/null +++ b/Target/Variable/Image/sharp.d.ts @@ -0,0 +1,32 @@ +/** + * @module Image + * + */ +declare const _default: { + avif: { + chromaSubsampling: string; + effort: number; + }; + gif: { + effort: number; + }; + jpeg: { + chromaSubsampling: string; + mozjpeg: true; + trellisQuantisation: true; + overshootDeringing: true; + optimiseScans: true; + }; + png: { + compressionLevel: number; + palette: true; + }; + raw: {}; + tiff: { + compression: string; + }; + webp: { + effort: number; + }; +}; +export default _default; diff --git a/Target/Variable/Image/sharp.js b/Target/Variable/Image/sharp.js new file mode 100644 index 00000000..523b602a --- /dev/null +++ b/Target/Variable/Image/sharp.js @@ -0,0 +1 @@ +var e={avif:{chromaSubsampling:"4:4:4",effort:9},gif:{effort:10},jpeg:{chromaSubsampling:"4:4:4",mozjpeg:!0,trellisQuantisation:!0,overshootDeringing:!0,optimiseScans:!0},png:{compressionLevel:9,palette:!0},raw:{},tiff:{compression:"lzw"},webp:{effort:6}};export{e as default}; diff --git a/Target/Variable/JavaScript/terser.d.ts b/Target/Variable/JavaScript/terser.d.ts new file mode 100644 index 00000000..f053777e --- /dev/null +++ b/Target/Variable/JavaScript/terser.d.ts @@ -0,0 +1,18 @@ +/** + * @module JavaScript + * + */ +declare const _default: { + ecma: 5; + enclose: false; + keep_classnames: false; + keep_fnames: false; + ie8: false; + module: false; + safari10: false; + toplevel: false; + format: { + comments: false; + }; +}; +export default _default; diff --git a/Target/Variable/JavaScript/terser.js b/Target/Variable/JavaScript/terser.js new file mode 100644 index 00000000..aaf215a8 --- /dev/null +++ b/Target/Variable/JavaScript/terser.js @@ -0,0 +1 @@ +var e={ecma:5,enclose:!1,keep_classnames:!1,keep_fnames:!1,ie8:!1,module:!1,safari10:!1,toplevel:!1,format:{comments:!1}};export{e as default}; diff --git a/Target/Variable/Map.d.ts b/Target/Variable/Map.d.ts new file mode 100644 index 00000000..eb8f3ecd --- /dev/null +++ b/Target/Variable/Map.d.ts @@ -0,0 +1,12 @@ +/** + * @module Map + * + */ +declare const _default: { + CSS: string; + HTML: string; + Image: string; + JavaScript: string; + SVG: string; +}; +export default _default; diff --git a/Target/Variable/Map.js b/Target/Variable/Map.js new file mode 100644 index 00000000..8b763771 --- /dev/null +++ b/Target/Variable/Map.js @@ -0,0 +1 @@ +var e={CSS:"**/*.css",HTML:"**/*.html",Image:"**/*.{apng,avci,avcs,avif,avifs,gif,heic,heics,heif,heifs,jfif,jif,jpe,jpeg,jpg,png,raw,tiff,webp}",JavaScript:"**/*.{js,mjs,cjs,jsm}",SVG:"**/*.svg"};export{e as default}; diff --git a/Target/Variable/Middleware.d.ts b/Target/Variable/Middleware.d.ts new file mode 100644 index 00000000..ccb0db20 --- /dev/null +++ b/Target/Variable/Middleware.d.ts @@ -0,0 +1,4 @@ +/** + * @module Middleware + * + */ diff --git a/Target/Variable/Middleware.js b/Target/Variable/Middleware.js new file mode 100644 index 00000000..e69de29b diff --git a/Target/Variable/Option.d.ts b/Target/Variable/Option.d.ts new file mode 100644 index 00000000..bc0b6256 --- /dev/null +++ b/Target/Variable/Option.d.ts @@ -0,0 +1,131 @@ +/** + * @module Option + * + */ +declare const _default: Omit<{} & { + CSS: { + csso: { + comments: false; + forceMediaMerge: true; + restructure: false; + }; + lightningcss: { + minify: true; + }; + }; + HTML: { + "html-minifier-terser": { + caseSensitive: true; + collapseInlineTagWhitespace: false; + collapseWhitespace: true; + continueOnParseError: true; + html5: true; + ignoreCustomComments: RegExp[]; + includeAutoGeneratedTags: true; + keepClosingSlash: true; + minifyCSS: true; + minifyJS: true; + minifyURLs: false; + noNewlinesBeforeTagClose: true; + preventAttributesEscaping: false; + processConditionalComments: false; + processScripts: string[]; + quoteCharacter: string; + removeAttributeQuotes: true; + removeComments: true; + removeScriptTypeAttributes: true; + removeStyleLinkTypeAttributes: true; + removeTagWhitespace: false; + sortAttributes: true; + sortClassName: true; + trimCustomFragments: true; + useShortDoctype: false; + }; + }; + Image: { + sharp: { + avif: { + chromaSubsampling: string; + effort: number; + }; + gif: { + effort: number; + }; + jpeg: { + chromaSubsampling: string; + mozjpeg: true; + trellisQuantisation: true; + overshootDeringing: true; + optimiseScans: true; + }; + png: { + compressionLevel: number; + palette: true; + }; + raw: {}; + tiff: { + compression: string; + }; + webp: { + effort: number; + }; + }; + }; + JavaScript: { + terser: { + ecma: 5; + enclose: false; + keep_classnames: false; + keep_fnames: false; + ie8: false; + module: false; + safari10: false; + toplevel: false; + format: { + comments: false; + }; + }; + }; + SVG: { + svgo: { + multipass: true; + js2svg: { + indent: number; + pretty: false; + }; + plugins: "preset-default"[]; + }; + }; + Map: { + CSS: string; + HTML: string; + Image: string; + JavaScript: string; + SVG: string; + }; + Parser: { + CSS: ("csso" | "lightningcss")[]; + HTML: "html-minifier-terser"; + Image: "sharp"; + JavaScript: "terser"; + SVG: "svgo"; + }; + Path: string; + Cache: { + Search: string; + Folder: string; + }; + Logger: 2; + Action: Omit<{} & { + Failed: ({ Input }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Passed: ({ Before, Buffer }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Accomplished: ({ Input, Before, After }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Changed: (Plan: import("files-pipe/Target/Interface/Plan.js").default) => Promise; + Read: ({ Input }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Wrote: ({ Buffer }: import("files-pipe/Target/Interface/File.js").default) => Promise; + Fulfilled: ({ Files }: import("files-pipe/Target/Interface/Plan.js").default) => Promise; + }, "__proto__">; + Files: string; + Exclude: false; +}, "__proto__">; +export default _default; diff --git a/Target/Variable/Option.js b/Target/Variable/Option.js new file mode 100644 index 00000000..d2508709 --- /dev/null +++ b/Target/Variable/Option.js @@ -0,0 +1 @@ +var f=(await import("typescript-esbuild/Target/Function/Merge.js")).default((await import("files-pipe/Target/Variable/Option.js")).default,{CSS:{csso:(await import("./CSS/csso.js")).default,lightningcss:(await import("./CSS/lightningcss.js")).default},HTML:{"html-minifier-terser":(await import("./HTML/html-minifier-terser.js")).default},JavaScript:{terser:(await import("./JavaScript/terser.js")).default},Image:{sharp:(await import("./Image/sharp.js")).default},SVG:{svgo:(await import("./SVG/svgo.js")).default},Map:(await import("./Map.js")).default,Parser:(await import("./Parser.js")).default,Action:{Failed:async({Input:t})=>`${r("Error:")} Cannot compress file ${i(await o(t))}${r((await import("path")).parse(t).base)}`,Passed:async({Before:t,Buffer:a})=>t>s.byteLength(a.toString()),Accomplished:async({Input:t,Before:a,After:p})=>{const e=a-p;return`${i(`(-${await(await import("files-pipe/Target/Function/Bytes.js")).default(e)})`)} ${(await import("kleur/colors")).green(`${(e/a*100).toFixed(2)}%`)} reduction in ${i(await o(t))}${(await import("kleur/colors")).cyan((await import("path")).parse(t).base)}`},Changed:async t=>Object.defineProperty(t.Info,"Total",{value:(t.Info.Total?t.Info.Total:0)+(t.On.Before-t.On.After),configurable:!0,writable:!0})&&t}});const{gray:i,red:r}=await import("kleur/colors"),{default:o}=await import("../Function/Directory.js"),{Buffer:s}=await import("buffer");export{f as default}; diff --git a/Target/Variable/Parser.d.ts b/Target/Variable/Parser.d.ts new file mode 100644 index 00000000..7aded0d0 --- /dev/null +++ b/Target/Variable/Parser.d.ts @@ -0,0 +1,12 @@ +/** + * @module Parser + * + */ +declare const _default: { + CSS: ("csso" | "lightningcss")[]; + HTML: "html-minifier-terser"; + Image: "sharp"; + JavaScript: "terser"; + SVG: "svgo"; +}; +export default _default; diff --git a/Target/Variable/Parser.js b/Target/Variable/Parser.js new file mode 100644 index 00000000..4f94890f --- /dev/null +++ b/Target/Variable/Parser.js @@ -0,0 +1 @@ +var e={CSS:["csso","lightningcss"],HTML:"html-minifier-terser",Image:"sharp",JavaScript:"terser",SVG:"svgo"};export{e as default}; diff --git a/Target/Variable/SVG/svgo.d.ts b/Target/Variable/SVG/svgo.d.ts new file mode 100644 index 00000000..5e8a8872 --- /dev/null +++ b/Target/Variable/SVG/svgo.d.ts @@ -0,0 +1,13 @@ +/** + * @module SVG + * + */ +declare const _default: { + multipass: true; + js2svg: { + indent: number; + pretty: false; + }; + plugins: "preset-default"[]; +}; +export default _default; diff --git a/Target/Variable/SVG/svgo.js b/Target/Variable/SVG/svgo.js new file mode 100644 index 00000000..ae1973b7 --- /dev/null +++ b/Target/Variable/SVG/svgo.js @@ -0,0 +1 @@ +var e={multipass:!0,js2svg:{indent:0,pretty:!1},plugins:["preset-default"]};export{e as default}; diff --git a/package.json b/package.json index ffe8a4c7..64b35f4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "astro-compress", - "version": "1.1.50", + "version": "2.2.5", "private": false, "description": "🗜️ AstroJS compression utilities. Compress HTML, CSS, JavaScript and more!", "keywords": [ @@ -11,39 +11,47 @@ "css", "html", "img", + "image", "javascript", "performance", - "svg" + "svg", + "withastro" ], - "homepage": "https://github.com/astro-community/astro-compress#readme", + "homepage": "https://github.com/astro-community/AstroCompress#readme", "bugs": { - "url": "https://github.com/astro-community/astro-compress/issues" + "url": "https://github.com/astro-community/AstroCompress/issues" }, "repository": { "type": "git", - "url": "git+https://github.com/astro-community/astro-compress.git" + "url": "git+https://github.com/astro-community/AstroCompress.git" + }, + "license": "SEE LICENSE IN LICENSE", + "author": { + "name": "Nikola Hristov", + "email": "nikola@nikolahristov.tech", + "url": "https://nikolahristov.tech" }, - "license": "MIT", "type": "module", - "main": "./Target/Index.js", - "types": "./Target/Index.d.ts", + "main": "./Target/Function/Integration.js", + "types": "./Target/Function/Integration.d.ts", "scripts": { - "prepublishOnly": "lightrix build 'Source/**/*.ts'" + "prepublishOnly": "TypeScriptESBuild 'Source/**/*.ts'" }, "dependencies": { - "@types/csso": "5.0.0", - "@types/html-minifier-terser": "7.0.0", + "@types/csso": "5.0.3", + "@types/html-minifier-terser": "7.0.2", "csso": "5.0.5", - "files-pipe": "2.0.9", + "files-pipe": "2.1.4", "html-minifier-terser": "7.2.0", - "sharp": "0.32.4", - "svgo": "3.0.2", - "terser": "5.19.2" + "kleur": "4.1.5", + "lightningcss": "1.22.1", + "sharp": "0.33.1", + "svgo": "3.1.0", + "terser": "5.26.0", + "typescript-esbuild": "0.3.3" }, "devDependencies": { - "@lightrix/configuration": "0.0.1", - "@lightrix/script": "1.0.7", - "astro": "2.10.7" + "astro": "4.0.6" }, "publishConfig": { "access": "public" diff --git a/tsconfig.json b/tsconfig.json index 7532b44f..ffcd63d9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,8 @@ { "compilerOptions": { + "baseUrl": "./", "outDir": "Target" }, - "extends": "@lightrix/configuration/Base/TypeScript", - "include": ["src"] + "extends": "typescript-esbuild/Target/Notation/TypeScript", + "include": ["Source"] }