bundled_resources.ts

Construction of the bundled CSS resources (style-rule index, variable graph, class→variable index) shared by the Gro generator and the Vite plugin.

The two generators consume these differently — the Gro generator caches one bundle per instance, the Vite plugin loads lazily on first virtual-module access — but build them identically from the same options. This keeps that construction in one place.

Declarations
#

3 declarations

view source

BundledCssResources
#

create_bundled_resources
#

bundled_resources.ts view source

(options: CreateBundledResourcesOptions): Promise<BundledCssResources>

Builds the bundled CSS resources from generator options. The style.css index is always built (even when only theme output is enabled), matching the generators' prior behavior.

options

returns

Promise<BundledCssResources>

CreateBundledResourcesOptions
#

bundled_resources.ts view source

CreateBundledResourcesOptions

base_css

Base CSS source: custom string, callback over the default, or default.

type BaseCssOption

variables

Theme variables source.

type VariablesOption

class_definitions

Merged class definitions, indexed to their referenced variables.

type Record<string, CssClassDefinition | undefined>

deps

Filesystem deps for loading the default style.css.

type CacheDeps

Depends on
#

Imported by
#