# description
Source-package configuration for `lpm add`. Lives at the tarball root; declares the configurable surface, file copy rules, and dependency injection logic that `lpm add` interprets when delivering the package's source into a consumer project.

# properties.$schema.description
Optional pointer to this schema for editor autocomplete. Recommended value: https://lpm.dev/schemas/lpm.config.json

# properties.ecosystem.description
Target ecosystem for the source files. Drives default install directory detection (e.g., Swift uses `Sources/<target>/` or `Packages/LPMComponents/Sources/<target>/`).

# properties.importAlias.description
Author's import alias prefix used in the source files (e.g., `@/components`). `lpm add` rewrites occurrences in the copied source to match the consumer project's tsconfig.json paths or the explicit `--alias` flag.

# properties.configSchema.description
Map of configurable field name → field specification. Each entry drives an interactive prompt during `lpm add` (or a `--yes` default) and feeds the inline-config map used by `files[].condition` and `dependencies` lookups.

# properties.defaultConfig.description
Map of configurable field name → default value, overriding any `default` declared in the matching `configSchema` entry. Useful for sharing common defaults across packages without duplicating the field spec.

# properties.files.description
Ordered list of file copy rules. Each rule names a source pattern, an optional destination, and an inclusion mode. Rules with `include: when` are gated by a `condition` map keyed against the resolved inline-config values.

# properties.dependencies.description
Conditional dependency injection map. Outer keys match `configSchema` field names; inner keys match the user's selected value(s) for that field; values are arrays of dependency entries that get added to the consumer's `package.json`. Each entry is either a bare name (`"react"`) or a name@range spec (`"react@^18"`, `"lodash@4.17.21"`, `"react@latest"`, `"lodash@*"`). Save-spec policy mirrors `lpm install <pkg>`: bare names and dist-tags (`@latest`, `@beta`, etc.) resolve against the registry — bare and stable-resolved dist-tags write `^resolvedLatest` (or whatever `~/.lpm/config.toml > save-prefix|save-exact` says), prerelease-resolved dist-tags pin exact for safety; explicit ranges (`^18`, `~1.2`), exact versions (`1.2.3`), and explicit wildcards (`*`) are preserved verbatim. Names from any registry are accepted — npm-published, `.npmrc`-declared private registries, and `@lpm.dev/*` packages all flow through the same path; resolution dispatches per-package via the route table the same way the resolver walker does. The package manager `lpm add` was invoked with (`--pm` selects between `lpm`, `npm`, `pnpm`, `yarn`, `bun`, or `auto` for project-state detection; default `lpm`) runs the install. Auth or access errors for bare and dist-tag entries surface at resolve time, before `package.json` is mutated; explicit-version entries (ranges, exacts, wildcards) skip pre-resolution and can fail later during the install step instead. Declaring this field opts out of the legacy `package.json#dependencies` + `peerDependencies` fallback even when no conditional branch matches the consumer's config.

# $defs.configValue.description
A leaf value for a configurable field. Native JSON booleans, numbers, and strings are all accepted; the runtime stringifies them when populating the inline-config map.

# $defs.configSchemaField.properties.type.description
Field input type. `string` prompts for a free-form value, `boolean` for a confirm, `select` for a single-choice or multi-select list.

# $defs.configSchemaField.properties.label.description
Human-readable prompt label. Defaults to the field name when omitted.

# $defs.configSchemaField.properties.default.description
Initial value for the prompt. Overridden by `defaultConfig.<fieldName>` at the package level.

# $defs.configSchemaField.properties.required.description
When `true`, the field is filled with its default value under `--yes` if the user didn't supply it inline.

# $defs.configSchemaField.properties.multiSelect.description
Only meaningful when `type` is `select`. When `true`, the prompt accepts multiple values; the resolved inline-config value is comma-joined.

# $defs.configSchemaField.properties.options.description
List of selectable options. Only meaningful when `type` is `select`. Plain strings are accepted as a shorthand for `{value, label}` pairs where both equal the string.

# $defs.configSchemaField.properties.options.items.oneOf[].properties.value.description
Stored inline-config value when this option is selected.

# $defs.configSchemaField.properties.options.items.oneOf[].properties.label.description
Human-readable label shown in the prompt. Defaults to `value` when omitted.

# $defs.fileRule.properties.src.description
Source path or glob (relative to the tarball root). Trailing `/**` and `/*` are supported.

# $defs.fileRule.properties.dest.description
Destination path (relative to the consumer project's resolved install dir). Trailing `/` treats the value as a directory and preserves the source filename. Omit to keep the source-relative path.

# $defs.fileRule.properties.include.description
When to include this rule. `always` (or omitted): copy unconditionally. `when`: copy only if every entry in `condition` matches the inline-config value (all-by-default if a key wasn't supplied). `never`: skip.

# $defs.fileRule.properties.condition.description
Required when `include` is `when`. Map of inline-config field name → expected value. Native booleans/numbers are accepted alongside strings; comma-separated multi-select values match if any element equals the expected value.