@animus-ui/unplugin 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,19 @@
1
+ import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
2
+ import { createUnplugin } from "unplugin";
3
+ //#region src/index.ts
4
+ /**
5
+ * `@animus-ui/unplugin` — the Animus transform host for non-plugin
6
+ * bundlers (openspec: standalone-extraction-cli, D4/D10). Per-bundler
7
+ * entry points live on subpaths (`./rollup`, `./esbuild`, `./rspack`,
8
+ * `./webpack`); this root exports the unplugin instance and the factory.
9
+ *
10
+ * UNSTABLE MODULE SURFACE: the supported consumer surface is the
11
+ * per-bundler subpath entries. The factory and instance exports exist for
12
+ * the repo's own lanes and tests and may change without semver ceremony
13
+ * until the consumer contract ships (standalone-extraction-cli inc 07).
14
+ */
15
+ /** The unplugin instance: `animusUnplugin.rollup(options)`, `.esbuild(…)`,
16
+ * `.webpack(…)`, `.rspack(…)`. */
17
+ const animusUnplugin = createUnplugin(unpluginFactory);
18
+ //#endregion
19
+ export { animusUnplugin, animusUnplugin as default, unpluginFactory };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Host option intake — the transform host is the fourth driver over the
3
+ * shared option core (openspec: standalone-extraction-cli, D2/D9): one
4
+ * schema, `assertKnownOptionKeys` at the boundary, and an explicit
5
+ * emission `mode` that is plumbed — never environment-sniffed (D10).
6
+ *
7
+ * Unlike the Vite/Next plugin drivers, this host HONORS the core `root`
8
+ * key: rollup and esbuild expose no root authority a plugin could derive,
9
+ * so the host's root is the explicit option, defaulting to the process
10
+ * working directory (the CLI's shape, not the plugin drivers').
11
+ */
12
+ import type { AnimusCoreOptions, AnimusMode } from '@animus-ui/extract/pipeline';
13
+ /**
14
+ * Options for the Animus transform host. Exactly the shared driver core —
15
+ * the host declares no driver-specific top-level keys.
16
+ *
17
+ * `mode` selects EMISSION only (minify default, the `__ANIMUS_DEV__`
18
+ * define, engine devMode). When absent, the host's documented default
19
+ * applies: the bundler's own command oracle where one exists (webpack and
20
+ * rspack `compiler.options.mode`, rollup watch mode), else production
21
+ * (esbuild exposes no signal).
22
+ */
23
+ export type AnimusUnpluginOptions = AnimusCoreOptions;
24
+ export interface ResolvedHostOptions {
25
+ /** Absolute root every relative input resolves against. */
26
+ root: string;
27
+ /** The validated core options (mode still unresolved — the adapter's
28
+ * command oracle participates in that resolution). */
29
+ options: AnimusCoreOptions;
30
+ }
31
+ /**
32
+ * Validate raw options and resolve the root authority. Throws
33
+ * `AnimusConfigError` (the shared config-error class) on unknown keys,
34
+ * invalid `mode` values, a retired engine selection, or a missing
35
+ * `system`.
36
+ */
37
+ export declare function resolveHostOptions(raw: AnimusUnpluginOptions | undefined, cwd?: string): ResolvedHostOptions;
38
+ /**
39
+ * Resolve the effective emission mode: the explicit option wins over every
40
+ * bundler signal; otherwise the adapter-supplied command oracle applies;
41
+ * otherwise production (the documented host default — never NODE_ENV).
42
+ */
43
+ export declare function resolveHostMode(explicit: AnimusMode | undefined, oracle: AnimusMode | null): AnimusMode;
44
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACX,MAAM,6BAA6B,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,qBAAqB,GAAG,SAAS,EACtC,GAAG,GAAE,MAAsB,GAC1B,mBAAmB,CAcrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,UAAU,GAAG,SAAS,EAChC,MAAM,EAAE,UAAU,GAAG,IAAI,GACxB,UAAU,CAEZ"}
@@ -0,0 +1,18 @@
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_core = require("./core-B2NB6x1D.cjs");
6
+ //#region src/rollup.ts
7
+ /**
8
+ * Rollup entry: `import animus from '@animus-ui/unplugin/rollup'`.
9
+ * ORDERING: list this plugin BEFORE any TS/JSX transpiler — the engine
10
+ * parses raw TSX (rollup has no enforce ordering).
11
+ */
12
+ /** Named beside default: keeps the CJS emission on the `exports.default`
13
+ * interop shape (attw node16 — a lone default compiles to a bare
14
+ * `module.exports =` that contradicts the declaration). */
15
+ const animusRollup = (0, require("unplugin").createRollupPlugin)(require_core.unpluginFactory);
16
+ //#endregion
17
+ exports.animusRollup = animusRollup;
18
+ exports.default = animusRollup;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Rollup entry: `import animus from '@animus-ui/unplugin/rollup'`.
3
+ * ORDERING: list this plugin BEFORE any TS/JSX transpiler — the engine
4
+ * parses raw TSX (rollup has no enforce ordering).
5
+ */
6
+ export type { AnimusUnpluginOptions } from './options';
7
+ /** Named beside default: keeps the CJS emission on the `exports.default`
8
+ * interop shape (attw node16 — a lone default compiles to a bare
9
+ * `module.exports =` that contradicts the declaration). */
10
+ export declare const animusRollup: (options?: import("@animus-ui/extract/pipeline").AnimusCoreOptions | undefined) => import("unplugin").RollupPlugin<any>[] | import("unplugin").RollupPlugin<any>;
11
+ export default animusRollup;
12
+ //# sourceMappingURL=rollup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD;;4DAE4D;AAC5D,eAAO,MAAM,YAAY,kKAAsC,CAAC;eAEjD,YAAY"}
@@ -0,0 +1,14 @@
1
+ import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
2
+ import { createRollupPlugin } from "unplugin";
3
+ //#region src/rollup.ts
4
+ /**
5
+ * Rollup entry: `import animus from '@animus-ui/unplugin/rollup'`.
6
+ * ORDERING: list this plugin BEFORE any TS/JSX transpiler — the engine
7
+ * parses raw TSX (rollup has no enforce ordering).
8
+ */
9
+ /** Named beside default: keeps the CJS emission on the `exports.default`
10
+ * interop shape (attw node16 — a lone default compiles to a bare
11
+ * `module.exports =` that contradicts the declaration). */
12
+ const animusRollup = createRollupPlugin(unpluginFactory);
13
+ //#endregion
14
+ export { animusRollup, animusRollup as default };
@@ -0,0 +1,17 @@
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_core = require("./core-B2NB6x1D.cjs");
6
+ //#region src/rspack.ts
7
+ /**
8
+ * rspack entry: `import Animus from '@animus-ui/unplugin/rspack'`.
9
+ * Mirrors the webpack wiring (DefinePlugin define, `enforce: 'pre'`
10
+ * loader ordering) over rspack's webpack-compatible surface.
11
+ */
12
+ /** Named beside default: keeps the CJS emission on the `exports.default`
13
+ * interop shape (attw node16). */
14
+ const animusRspack = (0, require("unplugin").createRspackPlugin)(require_core.unpluginFactory);
15
+ //#endregion
16
+ exports.animusRspack = animusRspack;
17
+ exports.default = animusRspack;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * rspack entry: `import Animus from '@animus-ui/unplugin/rspack'`.
3
+ * Mirrors the webpack wiring (DefinePlugin define, `enforce: 'pre'`
4
+ * loader ordering) over rspack's webpack-compatible surface.
5
+ */
6
+ export type { AnimusUnpluginOptions } from './options';
7
+ /** Named beside default: keeps the CJS emission on the `exports.default`
8
+ * interop shape (attw node16). */
9
+ export declare const animusRspack: (options?: import("@animus-ui/extract/pipeline").AnimusCoreOptions | undefined) => RspackPluginInstance;
10
+ export default animusRspack;
11
+ //# sourceMappingURL=rspack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rspack.d.ts","sourceRoot":"","sources":["../src/rspack.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD;mCACmC;AACnC,eAAO,MAAM,YAAY,yGAAsC,CAAC;eAEjD,YAAY"}
@@ -0,0 +1,13 @@
1
+ import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
2
+ import { createRspackPlugin } from "unplugin";
3
+ //#region src/rspack.ts
4
+ /**
5
+ * rspack entry: `import Animus from '@animus-ui/unplugin/rspack'`.
6
+ * Mirrors the webpack wiring (DefinePlugin define, `enforce: 'pre'`
7
+ * loader ordering) over rspack's webpack-compatible surface.
8
+ */
9
+ /** Named beside default: keeps the CJS emission on the `exports.default`
10
+ * interop shape (attw node16). */
11
+ const animusRspack = createRspackPlugin(unpluginFactory);
12
+ //#endregion
13
+ export { animusRspack, animusRspack as default };
@@ -0,0 +1,18 @@
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_core = require("./core-B2NB6x1D.cjs");
6
+ //#region src/webpack.ts
7
+ /**
8
+ * webpack entry: `import Animus from '@animus-ui/unplugin/webpack'`.
9
+ * The dev-signal define is applied via the compiler's own DefinePlugin;
10
+ * the host transform is registered `enforce: 'pre'` so it precedes
11
+ * TS/JSX transpilation loaders.
12
+ */
13
+ /** Named beside default: keeps the CJS emission on the `exports.default`
14
+ * interop shape (attw node16). */
15
+ const animusWebpack = (0, require("unplugin").createWebpackPlugin)(require_core.unpluginFactory);
16
+ //#endregion
17
+ exports.animusWebpack = animusWebpack;
18
+ exports.default = animusWebpack;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * webpack entry: `import Animus from '@animus-ui/unplugin/webpack'`.
3
+ * The dev-signal define is applied via the compiler's own DefinePlugin;
4
+ * the host transform is registered `enforce: 'pre'` so it precedes
5
+ * TS/JSX transpilation loaders.
6
+ */
7
+ export type { AnimusUnpluginOptions } from './options';
8
+ /** Named beside default: keeps the CJS emission on the `exports.default`
9
+ * interop shape (attw node16). */
10
+ export declare const animusWebpack: (options?: import("@animus-ui/extract/pipeline").AnimusCoreOptions | undefined) => import("unplugin").WebpackPluginInstance;
11
+ export default animusWebpack;
12
+ //# sourceMappingURL=webpack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../src/webpack.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD;mCACmC;AACnC,eAAO,MAAM,aAAa,6HAAuC,CAAC;eAEnD,aAAa"}
@@ -0,0 +1,14 @@
1
+ import { t as unpluginFactory } from "./core-C3ZORO6V.mjs";
2
+ import { createWebpackPlugin } from "unplugin";
3
+ //#region src/webpack.ts
4
+ /**
5
+ * webpack entry: `import Animus from '@animus-ui/unplugin/webpack'`.
6
+ * The dev-signal define is applied via the compiler's own DefinePlugin;
7
+ * the host transform is registered `enforce: 'pre'` so it precedes
8
+ * TS/JSX transpilation loaders.
9
+ */
10
+ /** Named beside default: keeps the CJS emission on the `exports.default`
11
+ * interop shape (attw node16). */
12
+ const animusWebpack = createWebpackPlugin(unpluginFactory);
13
+ //#endregion
14
+ export { animusWebpack, animusWebpack as default };
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@animus-ui/unplugin",
3
+ "version": "0.1.11",
4
+ "description": "Animus transform host for non-plugin bundlers — unplugin-based rollup/esbuild/rspack/webpack entry points over the one extraction session",
5
+ "keywords": [
6
+ "animus",
7
+ "css",
8
+ "esbuild",
9
+ "extraction",
10
+ "rollup",
11
+ "rspack",
12
+ "static-css",
13
+ "unplugin",
14
+ "webpack"
15
+ ],
16
+ "homepage": "https://github.com/codecaaron/animus/tree/main/packages/unplugin#readme",
17
+ "license": "MIT",
18
+ "author": "codecaaron <airrobb@gmail.com>",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/codecaaron/animus.git",
22
+ "directory": "packages/unplugin"
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "main": "./dist/index.cjs",
28
+ "types": "./dist/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "default": "./dist/index.cjs"
33
+ },
34
+ "./rollup": {
35
+ "types": "./dist/rollup.d.ts",
36
+ "default": "./dist/rollup.cjs"
37
+ },
38
+ "./esbuild": {
39
+ "types": "./dist/esbuild.d.ts",
40
+ "default": "./dist/esbuild.cjs"
41
+ },
42
+ "./rspack": {
43
+ "types": "./dist/rspack.d.ts",
44
+ "default": "./dist/rspack.cjs"
45
+ },
46
+ "./webpack": {
47
+ "types": "./dist/webpack.d.ts",
48
+ "default": "./dist/webpack.cjs"
49
+ }
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "scripts": {
55
+ "build": "bun run build:ts",
56
+ "build:ts": "tsdown && tsc -p tsconfig.build.json",
57
+ "compile": "tsc --noEmit"
58
+ },
59
+ "dependencies": {
60
+ "@animus-ui/extract": "0.1.11",
61
+ "unplugin": "^2.3.10"
62
+ },
63
+ "engines": {
64
+ "node": ">=22.12.0"
65
+ }
66
+ }