@vizejs/vite-plugin-musea 0.690.0 → 0.692.0
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/a11y/index.d.mts +1 -1
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/{index-KyKZJ6OT.d.mts → index-BemK8p6d.d.mts} +3 -1
- package/dist/{index-KyKZJ6OT.d.mts.map → index-BemK8p6d.d.mts.map} +1 -1
- package/dist/{index-CxpR3ksr.d.mts → index-Dh4IXacU.d.mts} +3 -3
- package/dist/{index-CxpR3ksr.d.mts.map → index-Dh4IXacU.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +29 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{options-BD6L2LTb.mjs → options-DLFcpXwQ.mjs} +3 -2
- package/dist/{options-BD6L2LTb.mjs.map → options-DLFcpXwQ.mjs.map} +1 -1
- package/dist/{vrt-CpKpx_dy.d.mts → vrt-JoCQcFDG.d.mts} +2 -2
- package/dist/{vrt-CpKpx_dy.d.mts.map → vrt-JoCQcFDG.d.mts.map} +1 -1
- package/dist/vrt.d.mts +2 -2
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as A11yOptions, t as ArtFileInfo, x as A11yResult } from "./index-
|
|
2
|
-
import { i as MuseaVrtRunner } from "./vrt-
|
|
1
|
+
import { b as A11yOptions, t as ArtFileInfo, x as A11yResult } from "./index-BemK8p6d.mjs";
|
|
2
|
+
import { i as MuseaVrtRunner } from "./vrt-JoCQcFDG.mjs";
|
|
3
3
|
import { LaunchOptions, Page } from "playwright";
|
|
4
4
|
|
|
5
5
|
//#region src/a11y/report.d.ts
|
|
@@ -78,4 +78,4 @@ declare class MuseaA11yRunner {
|
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
80
|
export { generateA11yHtmlReport as a, computeA11ySummary as i, MuseaA11yRunner as n, generateA11yJsonReport as o, resolveAxeSource as r, A11ySummary as t };
|
|
81
|
-
//# sourceMappingURL=index-
|
|
81
|
+
//# sourceMappingURL=index-Dh4IXacU.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-Dh4IXacU.d.mts","names":[],"sources":["../src/a11y/report.ts","../src/a11y/index.ts"],"mappings":";;;;;;;;iBAegB,kBAAA,CAAmB,OAAA,EAAS,UAAA,KAAe,WAAW;;AAAA;AAmBtE;iBAAgB,sBAAA,CAAuB,OAAA,EAAS,UAAA,IAAc,OAAA,EAAS,WAAW;;;;iBAqKlE,sBAAA,CAAuB,OAAqB,EAAZ,UAAU;;;;;;UC3KzC,WAAA;EACf,eAAA;EACA,aAAA;EDIc;ECFd,eAAA;EACA,eAAA;EACA,aAAA;EACA,YAAA;EACA,aAAA;EACA,UAAA;AAAA;;ADHgF;AAqKlF;;;;AAA4D;;;;AC3K5D;iBAuBsB,gBAAA,IAAoB,OAAO;;;;cAyBpC,eAAA;EAAA,QACH,OAAA;EAAA,QACA,aAAA;cAEI,OAAA,GAAS,WAAA,EAAkB,aAAA,GAAe,aAAA;EA7CtD;;;;EA2DM,SAAA,CACJ,QAAA,EAAU,WAAA,IACV,OAAA,UACA,SAAA,GAAY,cAAA,GACX,OAAA,CAAQ,UAAA;EA/CS;;;EAkHd,SAAA,CAAU,IAAA,EAAM,IAAA,EAAM,OAAA,UAAiB,WAAA,WAAsB,OAAA,CAAQ,UAAA;EAlH5B;AAyBjD;;EAsIE,UAAA,CAAW,OAAA,EAAS,UAAA,KAAe,WAAA;EAlId;;;EAyIrB,kBAAA,CAAmB,OAAA,EAAS,UAAA;EAvHjB;;;EA+HX,kBAAA,CAAmB,OAAA,EAAS,UAAA;EA5DuC;;;EAAA,QAmE3D,eAAA;AAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as VrtOptions, C as PaletteApiResponse, D as ComparisonConfig, E as CiConfig, M as MuseaGlobals, N as MuseaToolbarControl, O as DiffStyle, P as MuseaToolbarOption, S as AnalysisApiResponse, T as CaptureConfig, _ as StyleDictionaryOutput, a as MuseaOptions, b as A11yOptions, c as MuseaThemeColors, d as MuseaTokenPreviewKind, f as MuseaTokenPreviewRule, g as StyleDictionaryConfig, h as DesignToken, i as CsfOutput, j as MuseaGlobalValue, k as ViewportConfig, l as MuseaVrtOptions, m as resolveTokenPreview, n as ArtMetadata, o as MuseaPreviewContext, p as ResolvedTokenPreview, r as ArtVariant, s as MuseaTheme, t as ArtFileInfo, u as MuseaTokenPreviewConfig, v as TokenCategory, w as BeforeCaptureContext, x as A11yResult, y as parseTokens } from "./index-
|
|
2
|
-
import { c as VrtResult, i as MuseaVrtRunner, l as VrtSummary, n as generateVrtJsonReport, r as generateVrtReport, t as UnsupportedDiffStyleError } from "./vrt-
|
|
3
|
-
import { n as MuseaA11yRunner, t as A11ySummary } from "./index-
|
|
1
|
+
import { A as VrtOptions, C as PaletteApiResponse, D as ComparisonConfig, E as CiConfig, M as MuseaGlobals, N as MuseaToolbarControl, O as DiffStyle, P as MuseaToolbarOption, S as AnalysisApiResponse, T as CaptureConfig, _ as StyleDictionaryOutput, a as MuseaOptions, b as A11yOptions, c as MuseaThemeColors, d as MuseaTokenPreviewKind, f as MuseaTokenPreviewRule, g as StyleDictionaryConfig, h as DesignToken, i as CsfOutput, j as MuseaGlobalValue, k as ViewportConfig, l as MuseaVrtOptions, m as resolveTokenPreview, n as ArtMetadata, o as MuseaPreviewContext, p as ResolvedTokenPreview, r as ArtVariant, s as MuseaTheme, t as ArtFileInfo, u as MuseaTokenPreviewConfig, v as TokenCategory, w as BeforeCaptureContext, x as A11yResult, y as parseTokens } from "./index-BemK8p6d.mjs";
|
|
2
|
+
import { c as VrtResult, i as MuseaVrtRunner, l as VrtSummary, n as generateVrtJsonReport, r as generateVrtReport, t as UnsupportedDiffStyleError } from "./vrt-JoCQcFDG.mjs";
|
|
3
|
+
import { n as MuseaA11yRunner, t as A11ySummary } from "./index-Dh4IXacU.mjs";
|
|
4
4
|
import { AutogenOptions, AutogenOutput, GeneratedVariant, PropDefinition, generateArtFile, writeArtFile } from "./autogen/index.mjs";
|
|
5
5
|
import { Plugin } from "vite";
|
|
6
6
|
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/plugin/index.ts","../src/tokens/usage.ts","../src/tokens/resolver.ts","../src/tokens/generator.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/plugin/index.ts","../src/tokens/usage.ts","../src/tokens/resolver.ts","../src/tokens/generator.ts"],"mappings":";;;;;;;iBAiDgB,KAAA,CAAM,OAAA,GAAS,YAAA,GAAoB,MAAM;;;AAAA;;;AAAA,iBCTzC,cAAA,CACd,QAAA,EAAU,GAAA;EAAc,IAAA;EAAc,QAAA;IAAY,KAAA;IAAe,QAAA;EAAA;AAAA,IACjE,QAAA,EAAU,MAAA,SAAe,WAAA,IACxB,aAAA;;;;;;UCtBc,eAAA;EACf,IAAA;EACA,WAAA;EACA,QAAA;AAAA;;;;UAMe,eAAA;EACf,OAAA;EACA,QAAA;EACA,WAAA;EACA,OAAA,EAAS,eAAe;AAAA;;;;KAMd,aAAA,GAAgB,MAAM,SAAS,eAAA;;;;iBAqB3B,aAAA,CAAc,UAAA,EAAY,aAAA,KAAkB,MAAA,SAAe,WAAA;;;;iBAO3D,iBAAA,CACd,UAAA,EAAY,aAAA,IACZ,SAAA,EAAW,MAAA,SAAe,WAAA;;;AFrB5B;;;AAAA,iBGVgB,kBAAA,CAAmB,UAA2B,EAAf,aAAa;;;;iBAgI5C,sBAAA,CAAuB,UAA2B,EAAf,aAAa;AHtHP;;;;AAAA,iBG8HnC,sBAAA,CACpB,MAAA,EAAQ,qBAAA,GACP,OAAA,CAAQ,qBAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as resolveTrustedSourcePath, D as loadNative, T as HttpError, _ as assertVueSourcePath, a as scanArtFiles, c as buildThemeConfig, d as createDevSessionToken, f as parseJsonBody, h as assertArtVueSourcePath, i as resolveScanRoots, m as validateDevApiRequest, n as generateStorybookFiles, o as shouldProcess, p as serializeScriptValue, r as matchGlob, t as escapeHtml, u as collectRequestBody, v as decodeUrlComponent, w as resolveUrlPathInside, x as resolveInside, y as isTrustedSourcePath } from "./utils-BQi1club.mjs";
|
|
2
|
-
import { A as buildTokenMap, B as expandSelfTag, C as handleTokensGet, D as generateTokensHtml, E as resolveTokenPreview, F as parseScriptSetupForArt, H as variantComponentNames, I as rewriteRelativeImportStatement, L as loadArtStyle, M as scanTokenUsage, N as parseTokens, O as generateTokensMarkdown, P as generateArtModule, R as parseArtStyleRequest, S as handleTokensDelete, T as handleTokensUsage, V as resolveArtComponent, _ as handleArtAnalysis, a as attachArtReportOwner, b as handleArtPalette, c as rewriteDevGalleryAsset, d as createStaticGalleryPayload, f as joinUrlPath, g as sortedArts, h as staticPreviewId, i as assertArtReportOwnership, j as resolveReferences, k as processStyleDictionary, l as rewriteGalleryBase, m as resolveStaticIdentityRoot, o as resolveArtReportTarget, p as resolveStaticArtIdentity, r as processMuseaArtFile, s as publicBasePathFromViteBase, t as attachMuseaOptions, u as rewriteGalleryTextAssetBase, v as handleArtDocs, w as handleTokensUpdate, x as handleTokensCreate, y as handleArtSource, z as transformPreprocessedArtStyle } from "./options-
|
|
2
|
+
import { A as buildTokenMap, B as expandSelfTag, C as handleTokensGet, D as generateTokensHtml, E as resolveTokenPreview, F as parseScriptSetupForArt, H as variantComponentNames, I as rewriteRelativeImportStatement, L as loadArtStyle, M as scanTokenUsage, N as parseTokens, O as generateTokensMarkdown, P as generateArtModule, R as parseArtStyleRequest, S as handleTokensDelete, T as handleTokensUsage, V as resolveArtComponent, _ as handleArtAnalysis, a as attachArtReportOwner, b as handleArtPalette, c as rewriteDevGalleryAsset, d as createStaticGalleryPayload, f as joinUrlPath, g as sortedArts, h as staticPreviewId, i as assertArtReportOwnership, j as resolveReferences, k as processStyleDictionary, l as rewriteGalleryBase, m as resolveStaticIdentityRoot, o as resolveArtReportTarget, p as resolveStaticArtIdentity, r as processMuseaArtFile, s as publicBasePathFromViteBase, t as attachMuseaOptions, u as rewriteGalleryTextAssetBase, v as handleArtDocs, w as handleTokensUpdate, x as handleTokensCreate, y as handleArtSource, z as transformPreprocessedArtStyle } from "./options-DLFcpXwQ.mjs";
|
|
3
3
|
import { a as generateGalleryGlobalsScript, i as generateDevGlobalsScript, n as generateGalleryScript, r as generateGalleryModule, t as generateGalleryBody } from "./template-D12HYJCn.mjs";
|
|
4
4
|
import { a as UnsupportedDiffStyleError, i as MuseaVrtRunner, n as generateVrtJsonReport, r as generateVrtReport } from "./vrt-CUz4NxKK.mjs";
|
|
5
5
|
import { t as MuseaA11yRunner } from "./a11y-CR7bHK1d.mjs";
|
|
@@ -1401,6 +1401,26 @@ function parseSharedScriptSetup(art) {
|
|
|
1401
1401
|
return parseScriptSetupForArt(art.scriptSetupContent);
|
|
1402
1402
|
}
|
|
1403
1403
|
//#endregion
|
|
1404
|
+
//#region src/plugin/inline-art-query.ts
|
|
1405
|
+
/** Consume only the custom block already registered as this instance's inline Art. */
|
|
1406
|
+
function loadInlineArtCustomBlock(state, id) {
|
|
1407
|
+
if (!state.inlineArt) return null;
|
|
1408
|
+
const queryStart = id.indexOf("?");
|
|
1409
|
+
if (queryStart === -1) return null;
|
|
1410
|
+
const requestPath = id.slice(0, queryStart);
|
|
1411
|
+
const file = requestPath.startsWith("/@fs/") ? requestPath.slice(4) : requestPath;
|
|
1412
|
+
if (!file.endsWith(".vue") || file.endsWith(".art.vue")) return null;
|
|
1413
|
+
const query = new URLSearchParams(id.slice(queryStart + 1));
|
|
1414
|
+
if (query.getAll("vue").length !== 1 || query.get("vue") !== "" || query.getAll("type").length !== 1 || query.get("type") !== "art" || query.getAll("index").length !== 1) return null;
|
|
1415
|
+
const indexText = query.get("index");
|
|
1416
|
+
if (!/^(?:0|[1-9]\d*)$/.test(indexText)) return null;
|
|
1417
|
+
const index = Number(indexText);
|
|
1418
|
+
if (!Number.isSafeInteger(index)) return null;
|
|
1419
|
+
const art = state.artFiles.get(file);
|
|
1420
|
+
if (!art?.isInline || art.path !== file || art.componentPath !== file || art.inlineArtBlockIndex !== index || !isTrustedSourcePath(state.getConfigRoot(), state.getScanRoots(), file)) return null;
|
|
1421
|
+
return "export default {};\n";
|
|
1422
|
+
}
|
|
1423
|
+
//#endregion
|
|
1404
1424
|
//#region src/plugin/virtual.ts
|
|
1405
1425
|
/**
|
|
1406
1426
|
* Virtual module handling for the Musea Vite plugin.
|
|
@@ -1452,6 +1472,8 @@ function createResolveId(state) {
|
|
|
1452
1472
|
}
|
|
1453
1473
|
function createLoad(state) {
|
|
1454
1474
|
return function load(id) {
|
|
1475
|
+
const inlineArtBlock = loadInlineArtCustomBlock(state, id);
|
|
1476
|
+
if (inlineArtBlock !== null) return inlineArtBlock;
|
|
1455
1477
|
const styleRequest = parseArtStyleRequest(id);
|
|
1456
1478
|
if (styleRequest) return loadArtStyle(state.artFiles.get(styleRequest.filePath), styleRequest);
|
|
1457
1479
|
if (id === "\0musea-gallery") return generateGalleryModule(state.basePath);
|
|
@@ -2222,6 +2244,11 @@ function musea(options = {}) {
|
|
|
2222
2244
|
});
|
|
2223
2245
|
},
|
|
2224
2246
|
async transform(code, id) {
|
|
2247
|
+
const inlineArtBlock = loadInlineArtCustomBlock(virtualState, id);
|
|
2248
|
+
if (inlineArtBlock !== null) return {
|
|
2249
|
+
code: inlineArtBlock,
|
|
2250
|
+
map: null
|
|
2251
|
+
};
|
|
2225
2252
|
if (!id.includes("?musea-virtual")) return null;
|
|
2226
2253
|
if (!id.includes("musea-art:") && !id.includes("\0musea:")) return null;
|
|
2227
2254
|
const loaderId = museaVirtualTransformId(id);
|
|
@@ -2241,6 +2268,7 @@ function musea(options = {}) {
|
|
|
2241
2268
|
command: config.command
|
|
2242
2269
|
});
|
|
2243
2270
|
if (info) artFiles.set(filePath, info);
|
|
2271
|
+
else if (artFiles.get(filePath)?.isInline) artFiles.delete(filePath);
|
|
2244
2272
|
}
|
|
2245
2273
|
return [attachMuseaOptions(mainPlugin, options), {
|
|
2246
2274
|
name: "vite-plugin-musea:style-post-transform",
|