@animus-ui/unplugin 0.1.31 → 0.1.35
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/README.md +6 -0
- package/dist/{core-B-uObifz.cjs → core-C1XXRi0G.cjs} +22 -2
- package/dist/{core-vnpaY35A.mjs → core-D2U3Ub3T.mjs} +19 -5
- package/dist/core.d.ts +5 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/esbuild.cjs +1 -1
- package/dist/esbuild.mjs +1 -1
- package/dist/index.cjs +11 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.mjs +1 -1
- package/dist/rspack.cjs +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -79,6 +79,12 @@ plugin first to fix it.
|
|
|
79
79
|
written into `outdir`, or beside `outfile`).
|
|
80
80
|
- Supplies the `__ANIMUS_DEV__` dev-signal define through each bundler's
|
|
81
81
|
own mechanism.
|
|
82
|
+
- When a font face declares `preload: true`, emits
|
|
83
|
+
`animus-font-preloads.json` beside `animus.css`: the preloads, as
|
|
84
|
+
`{ href, type }`, with hrefs relative to the stylesheet.
|
|
85
|
+
`renderFontPreloads(preloads, { base, exclude })` returns the `<link>`
|
|
86
|
+
tags for your HTML, where `base` is the URL `animus.css`'s directory is
|
|
87
|
+
served at, and `exclude` lists hrefs the document already preloads.
|
|
82
88
|
|
|
83
89
|
## Options
|
|
84
90
|
|
|
@@ -45,6 +45,9 @@ const PROPS_VIRTUAL_ID = "animus:system-props";
|
|
|
45
45
|
* virtual-module bridge behind it. */
|
|
46
46
|
const WEBPACK_PROPS_REQUEST = "@animus-ui/unplugin/system-props";
|
|
47
47
|
const CSS_ASSET_NAME = "animus.css";
|
|
48
|
+
/** Emitted beside the stylesheet when a face preloads: its hrefs are
|
|
49
|
+
* relative to the stylesheet, for `renderFontPreloads`. */
|
|
50
|
+
const FONT_PRELOADS_ASSET_NAME = "animus-font-preloads.json";
|
|
48
51
|
const TRANSFORM_INCLUDE_RE = new RegExp(`\\.(?:${[..._animus_ui_extract_pipeline.ENGINE_TRANSFORM_EXTENSIONS, "cjs"].join("|")})$`);
|
|
49
52
|
const DEV_DEFINE_RE = /\b__ANIMUS_DEV__\b(?!\s*=[^=])/g;
|
|
50
53
|
function createHostState() {
|
|
@@ -52,6 +55,7 @@ function createHostState() {
|
|
|
52
55
|
pipeline: null,
|
|
53
56
|
mode: null,
|
|
54
57
|
cssText: "",
|
|
58
|
+
fontPreloads: [],
|
|
55
59
|
served: {
|
|
56
60
|
listed: /* @__PURE__ */ new Set(),
|
|
57
61
|
dropped: /* @__PURE__ */ new Map()
|
|
@@ -196,7 +200,7 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
196
200
|
let hostConditions = [];
|
|
197
201
|
/** The bundler's extension order, as its resolved configuration holds
|
|
198
202
|
* it; the built-in policy for a host none is read from (Rolldown). */
|
|
199
|
-
let hostExtensions
|
|
203
|
+
let hostExtensions;
|
|
200
204
|
let hostAssets = (0, _animus_ui_extract_pipeline.builtInAssetClassification)("noHost");
|
|
201
205
|
/** How the bundler expands computed loads (spec §6.3); none where its
|
|
202
206
|
* expansion is not reproduced. */
|
|
@@ -256,7 +260,7 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
256
260
|
session.driverLabel = "animus-unplugin";
|
|
257
261
|
session.rootDir = root;
|
|
258
262
|
session.conditions = hostConditions;
|
|
259
|
-
session.extensionPolicy = hostExtensions;
|
|
263
|
+
if (hostExtensions) session.extensionPolicy = hostExtensions;
|
|
260
264
|
session.assetClassification = hostAssets;
|
|
261
265
|
session.loadExpander = hostLoadExpander;
|
|
262
266
|
session.hostResolve = hostResolver;
|
|
@@ -278,6 +282,7 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
278
282
|
const analyzed = (0, _animus_ui_extract_session.getAnalyzedHashes)(session.key);
|
|
279
283
|
if (!analyzed || analyzed.size === 0) throw new Error(`[animus] discovery found zero source files under ${root} — check the plugin's \`root\` and \`exclude\` options`);
|
|
280
284
|
state.cssText = (0, _animus_ui_extract_session.getSharedCss)(session.key);
|
|
285
|
+
state.fontPreloads = (0, _animus_ui_extract_session.getSharedFontPreloads)(session.key);
|
|
281
286
|
state.served = manifestServedFiles((0, _animus_ui_extract_session.getManifestJson)(session.key));
|
|
282
287
|
state.systemPropsJs = (0, _animus_ui_extract_session.getSharedSystemProps)(session.key);
|
|
283
288
|
state.kitRedirects = new Map(session.externalSourceEntries);
|
|
@@ -323,6 +328,7 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
323
328
|
function emitCssAsset(context) {
|
|
324
329
|
if (!state.cssText) return;
|
|
325
330
|
const assets = (0, _animus_ui_extract_session.collectSessionAssets)(state.sessionDir);
|
|
331
|
+
const preloadManifest = state.fontPreloads.length === 0 ? null : JSON.stringify(state.fontPreloads);
|
|
326
332
|
if (meta.framework === "esbuild") {
|
|
327
333
|
const outDir = esbuildOptions?.outdir ?? (esbuildOptions?.outfile ? (0, node_path.dirname)(esbuildOptions.outfile) : null);
|
|
328
334
|
if (outDir === null) {
|
|
@@ -337,6 +343,9 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
337
343
|
const absOut = (0, node_path.resolve)(base, outDir);
|
|
338
344
|
(0, node_fs.mkdirSync)(absOut, { recursive: true });
|
|
339
345
|
(0, node_fs.writeFileSync)((0, node_path.join)(absOut, CSS_ASSET_NAME), state.cssText);
|
|
346
|
+
const preloadsPath = (0, node_path.join)(absOut, FONT_PRELOADS_ASSET_NAME);
|
|
347
|
+
if (preloadManifest === null) (0, node_fs.rmSync)(preloadsPath, { force: true });
|
|
348
|
+
else (0, node_fs.writeFileSync)(preloadsPath, preloadManifest);
|
|
340
349
|
if (assets.length > 0) {
|
|
341
350
|
(0, node_fs.mkdirSync)((0, node_path.join)(absOut, _animus_ui_extract_session.SESSION_ASSETS_DIR), { recursive: true });
|
|
342
351
|
for (const { name, bytes } of assets) (0, node_fs.writeFileSync)((0, node_path.join)(absOut, _animus_ui_extract_session.SESSION_ASSETS_DIR, name), bytes);
|
|
@@ -348,6 +357,11 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
348
357
|
fileName: CSS_ASSET_NAME,
|
|
349
358
|
source: state.cssText
|
|
350
359
|
});
|
|
360
|
+
if (preloadManifest !== null) context.emitFile({
|
|
361
|
+
type: "asset",
|
|
362
|
+
fileName: FONT_PRELOADS_ASSET_NAME,
|
|
363
|
+
source: preloadManifest
|
|
364
|
+
});
|
|
351
365
|
for (const { name, bytes } of assets) context.emitFile({
|
|
352
366
|
type: "asset",
|
|
353
367
|
fileName: `${_animus_ui_extract_session.SESSION_ASSETS_DIR}/${name}`,
|
|
@@ -650,6 +664,12 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
650
664
|
}
|
|
651
665
|
};
|
|
652
666
|
//#endregion
|
|
667
|
+
Object.defineProperty(exports, "FONT_PRELOADS_ASSET_NAME", {
|
|
668
|
+
enumerable: true,
|
|
669
|
+
get: function() {
|
|
670
|
+
return FONT_PRELOADS_ASSET_NAME;
|
|
671
|
+
}
|
|
672
|
+
});
|
|
653
673
|
Object.defineProperty(exports, "unpluginFactory", {
|
|
654
674
|
enumerable: true,
|
|
655
675
|
get: function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnimusConfigError,
|
|
2
|
-
import { ANIMUS_CSS_MODULE_ID, EnvironmentBuilds, ExtractionSession, SESSION_ASSETS_DIR, TURBOPACK_SYSTEM_PROPS_ID, collectSessionAssets, createBuildId, engineApi, getAnalyzedHashes, getManifestJson, getSessionArtifactDir, getSharedCss, getSharedSystemProps } from "@animus-ui/extract/session";
|
|
1
|
+
import { AnimusConfigError, DiagnosticFailure, ENGINE_TRANSFORM_EXTENSIONS, analysedOutputs, assertKnownOptionKeys, assertSupportedEngine, builtInAssetClassification, droppedExtensionMessage, esbuildAssetClassification, esbuildExtensionPolicy, esbuildOutputTargets, isEngineTransformExtension, isPathWithinRoot, keepsKitSourceEffects, mergeOutputTargets, noOutputTargets, outputExclusions, resolveMode, rollupExtensionPolicy, rollupOutputTargets, servedFiles, viteAssetClassification, viteExtensionPolicy, viteHostExpander, viteOutputTargets, webpackExtensionPolicy, webpackHostExpander, webpackOutputTargets } from "@animus-ui/extract/pipeline";
|
|
2
|
+
import { ANIMUS_CSS_MODULE_ID, EnvironmentBuilds, ExtractionSession, SESSION_ASSETS_DIR, TURBOPACK_SYSTEM_PROPS_ID, collectSessionAssets, createBuildId, engineApi, getAnalyzedHashes, getManifestJson, getSessionArtifactDir, getSharedCss, getSharedFontPreloads, getSharedSystemProps } from "@animus-ui/extract/session";
|
|
3
3
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join, relative, resolve } from "node:path";
|
|
5
5
|
//#region src/options.ts
|
|
@@ -45,6 +45,9 @@ const PROPS_VIRTUAL_ID = "animus:system-props";
|
|
|
45
45
|
* virtual-module bridge behind it. */
|
|
46
46
|
const WEBPACK_PROPS_REQUEST = "@animus-ui/unplugin/system-props";
|
|
47
47
|
const CSS_ASSET_NAME = "animus.css";
|
|
48
|
+
/** Emitted beside the stylesheet when a face preloads: its hrefs are
|
|
49
|
+
* relative to the stylesheet, for `renderFontPreloads`. */
|
|
50
|
+
const FONT_PRELOADS_ASSET_NAME = "animus-font-preloads.json";
|
|
48
51
|
const TRANSFORM_INCLUDE_RE = new RegExp(`\\.(?:${[...ENGINE_TRANSFORM_EXTENSIONS, "cjs"].join("|")})$`);
|
|
49
52
|
const DEV_DEFINE_RE = /\b__ANIMUS_DEV__\b(?!\s*=[^=])/g;
|
|
50
53
|
function createHostState() {
|
|
@@ -52,6 +55,7 @@ function createHostState() {
|
|
|
52
55
|
pipeline: null,
|
|
53
56
|
mode: null,
|
|
54
57
|
cssText: "",
|
|
58
|
+
fontPreloads: [],
|
|
55
59
|
served: {
|
|
56
60
|
listed: /* @__PURE__ */ new Set(),
|
|
57
61
|
dropped: /* @__PURE__ */ new Map()
|
|
@@ -196,7 +200,7 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
196
200
|
let hostConditions = [];
|
|
197
201
|
/** The bundler's extension order, as its resolved configuration holds
|
|
198
202
|
* it; the built-in policy for a host none is read from (Rolldown). */
|
|
199
|
-
let hostExtensions
|
|
203
|
+
let hostExtensions;
|
|
200
204
|
let hostAssets = builtInAssetClassification("noHost");
|
|
201
205
|
/** How the bundler expands computed loads (spec §6.3); none where its
|
|
202
206
|
* expansion is not reproduced. */
|
|
@@ -256,7 +260,7 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
256
260
|
session.driverLabel = "animus-unplugin";
|
|
257
261
|
session.rootDir = root;
|
|
258
262
|
session.conditions = hostConditions;
|
|
259
|
-
session.extensionPolicy = hostExtensions;
|
|
263
|
+
if (hostExtensions) session.extensionPolicy = hostExtensions;
|
|
260
264
|
session.assetClassification = hostAssets;
|
|
261
265
|
session.loadExpander = hostLoadExpander;
|
|
262
266
|
session.hostResolve = hostResolver;
|
|
@@ -278,6 +282,7 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
278
282
|
const analyzed = getAnalyzedHashes(session.key);
|
|
279
283
|
if (!analyzed || analyzed.size === 0) throw new Error(`[animus] discovery found zero source files under ${root} — check the plugin's \`root\` and \`exclude\` options`);
|
|
280
284
|
state.cssText = getSharedCss(session.key);
|
|
285
|
+
state.fontPreloads = getSharedFontPreloads(session.key);
|
|
281
286
|
state.served = manifestServedFiles(getManifestJson(session.key));
|
|
282
287
|
state.systemPropsJs = getSharedSystemProps(session.key);
|
|
283
288
|
state.kitRedirects = new Map(session.externalSourceEntries);
|
|
@@ -323,6 +328,7 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
323
328
|
function emitCssAsset(context) {
|
|
324
329
|
if (!state.cssText) return;
|
|
325
330
|
const assets = collectSessionAssets(state.sessionDir);
|
|
331
|
+
const preloadManifest = state.fontPreloads.length === 0 ? null : JSON.stringify(state.fontPreloads);
|
|
326
332
|
if (meta.framework === "esbuild") {
|
|
327
333
|
const outDir = esbuildOptions?.outdir ?? (esbuildOptions?.outfile ? dirname(esbuildOptions.outfile) : null);
|
|
328
334
|
if (outDir === null) {
|
|
@@ -337,6 +343,9 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
337
343
|
const absOut = resolve(base, outDir);
|
|
338
344
|
mkdirSync(absOut, { recursive: true });
|
|
339
345
|
writeFileSync(join(absOut, CSS_ASSET_NAME), state.cssText);
|
|
346
|
+
const preloadsPath = join(absOut, FONT_PRELOADS_ASSET_NAME);
|
|
347
|
+
if (preloadManifest === null) rmSync(preloadsPath, { force: true });
|
|
348
|
+
else writeFileSync(preloadsPath, preloadManifest);
|
|
340
349
|
if (assets.length > 0) {
|
|
341
350
|
mkdirSync(join(absOut, SESSION_ASSETS_DIR), { recursive: true });
|
|
342
351
|
for (const { name, bytes } of assets) writeFileSync(join(absOut, SESSION_ASSETS_DIR, name), bytes);
|
|
@@ -348,6 +357,11 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
348
357
|
fileName: CSS_ASSET_NAME,
|
|
349
358
|
source: state.cssText
|
|
350
359
|
});
|
|
360
|
+
if (preloadManifest !== null) context.emitFile({
|
|
361
|
+
type: "asset",
|
|
362
|
+
fileName: FONT_PRELOADS_ASSET_NAME,
|
|
363
|
+
source: preloadManifest
|
|
364
|
+
});
|
|
351
365
|
for (const { name, bytes } of assets) context.emitFile({
|
|
352
366
|
type: "asset",
|
|
353
367
|
fileName: `${SESSION_ASSETS_DIR}/${name}`,
|
|
@@ -650,4 +664,4 @@ const unpluginFactory = (rawOptions, meta) => {
|
|
|
650
664
|
}
|
|
651
665
|
};
|
|
652
666
|
//#endregion
|
|
653
|
-
export { unpluginFactory as t };
|
|
667
|
+
export { unpluginFactory as n, FONT_PRELOADS_ASSET_NAME as t };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnimusUnpluginOptions } from './options';
|
|
2
|
-
import type { AnimusMode, ServedFiles } from '@animus-ui/extract/pipeline';
|
|
2
|
+
import type { AnimusMode, FontPreload, ServedFiles } from '@animus-ui/extract/pipeline';
|
|
3
3
|
import type { SessionKey } from '@animus-ui/extract/session';
|
|
4
4
|
import type { UnpluginFactory } from 'unplugin';
|
|
5
5
|
/** Extension-free: esbuild picks loaders by extension. No `\0` prefix:
|
|
@@ -7,10 +7,14 @@ import type { UnpluginFactory } from 'unplugin';
|
|
|
7
7
|
export declare const STYLES_VIRTUAL_ID = "animus:styles";
|
|
8
8
|
export declare const PROPS_VIRTUAL_ID = "animus:system-props";
|
|
9
9
|
export declare const CSS_ASSET_NAME = "animus.css";
|
|
10
|
+
/** Emitted beside the stylesheet when a face preloads: its hrefs are
|
|
11
|
+
* relative to the stylesheet, for `renderFontPreloads`. */
|
|
12
|
+
export declare const FONT_PRELOADS_ASSET_NAME = "animus-font-preloads.json";
|
|
10
13
|
export interface HostState {
|
|
11
14
|
pipeline: Promise<void> | null;
|
|
12
15
|
mode: AnimusMode | null;
|
|
13
16
|
cssText: string;
|
|
17
|
+
fontPreloads: FontPreload[];
|
|
14
18
|
systemPropsJs: string;
|
|
15
19
|
kitRedirects: Map<string, string>;
|
|
16
20
|
/** Specifier → its redirect target's side effects; absent leaves the
|
package/dist/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EACV,UAAU,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD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2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_core = require("./core-
|
|
5
|
+
const require_core = require("./core-C1XXRi0G.cjs");
|
|
6
6
|
//#region src/esbuild.ts
|
|
7
7
|
const animusEsbuild = (0, require("unplugin").createEsbuildPlugin)(require_core.unpluginFactory);
|
|
8
8
|
//#endregion
|
package/dist/esbuild.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2,10 +2,19 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_core = require("./core-
|
|
5
|
+
const require_core = require("./core-C1XXRi0G.cjs");
|
|
6
|
+
let unplugin = require("unplugin");
|
|
7
|
+
let _animus_ui_extract_pipeline = require("@animus-ui/extract/pipeline");
|
|
6
8
|
//#region src/index.ts
|
|
7
|
-
const animusUnplugin = (0,
|
|
9
|
+
const animusUnplugin = (0, unplugin.createUnplugin)(require_core.unpluginFactory);
|
|
8
10
|
//#endregion
|
|
11
|
+
exports.FONT_PRELOADS_ASSET_NAME = require_core.FONT_PRELOADS_ASSET_NAME;
|
|
9
12
|
exports.animusUnplugin = animusUnplugin;
|
|
10
13
|
exports.default = animusUnplugin;
|
|
14
|
+
Object.defineProperty(exports, "renderFontPreloads", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function() {
|
|
17
|
+
return _animus_ui_extract_pipeline.renderFontPreloads;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
11
20
|
exports.unpluginFactory = require_core.unpluginFactory;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { unpluginFactory } from './core';
|
|
2
2
|
export type { AnimusUnpluginOptions } from './options';
|
|
3
|
+
export { renderFontPreloads } from '@animus-ui/extract/pipeline';
|
|
4
|
+
export type { FontPreload } from '@animus-ui/extract/pipeline';
|
|
5
|
+
export { FONT_PRELOADS_ASSET_NAME } from './core';
|
|
3
6
|
export { unpluginFactory };
|
|
4
7
|
export declare const animusUnplugin: import("unplugin").UnpluginInstance<import("./options").AnimusUnpluginOptions | undefined, boolean>;
|
|
5
8
|
export default animusUnplugin;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAO,MAAM,cAAc,qGAAkC,CAAC;eAE/C,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAO,MAAM,cAAc,qGAAkC,CAAC;eAE/C,cAAc"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as unpluginFactory, t as FONT_PRELOADS_ASSET_NAME } from "./core-D2U3Ub3T.mjs";
|
|
2
2
|
import { createUnplugin } from "unplugin";
|
|
3
|
+
import { renderFontPreloads } from "@animus-ui/extract/pipeline";
|
|
3
4
|
//#region src/index.ts
|
|
4
5
|
const animusUnplugin = createUnplugin(unpluginFactory);
|
|
5
6
|
//#endregion
|
|
6
|
-
export { animusUnplugin, animusUnplugin as default, unpluginFactory };
|
|
7
|
+
export { FONT_PRELOADS_ASSET_NAME, animusUnplugin, animusUnplugin as default, renderFontPreloads, unpluginFactory };
|
package/dist/rollup.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_core = require("./core-
|
|
5
|
+
const require_core = require("./core-C1XXRi0G.cjs");
|
|
6
6
|
//#region src/rollup.ts
|
|
7
7
|
const animusRollup = (0, require("unplugin").createRollupPlugin)(require_core.unpluginFactory);
|
|
8
8
|
//#endregion
|
package/dist/rollup.mjs
CHANGED
package/dist/rspack.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_core = require("./core-
|
|
5
|
+
const require_core = require("./core-C1XXRi0G.cjs");
|
|
6
6
|
//#region src/rspack.ts
|
|
7
7
|
const animusRspack = (0, require("unplugin").createRspackPlugin)(require_core.unpluginFactory);
|
|
8
8
|
//#endregion
|
package/dist/rspack.mjs
CHANGED
package/dist/webpack.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_core = require("./core-
|
|
5
|
+
const require_core = require("./core-C1XXRi0G.cjs");
|
|
6
6
|
//#region src/webpack.ts
|
|
7
7
|
const animusWebpack = (0, require("unplugin").createWebpackPlugin)(require_core.unpluginFactory);
|
|
8
8
|
//#endregion
|
package/dist/webpack.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/unplugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
4
4
|
"description": "Animus transform host for non-plugin bundlers — unplugin-based rollup/esbuild/rspack/webpack entry points over the one extraction session",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animus",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"compile": "bun check"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@animus-ui/extract": "0.1.
|
|
60
|
+
"@animus-ui/extract": "0.1.35",
|
|
61
61
|
"unplugin": "^3.3.0"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|