@vizejs/vite-plugin-musea 0.0.1-alpha.112 → 0.0.1-alpha.114
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/gallery/assets/{cssMode-DBTfE7c_.js → cssMode-DJrswAQe.js} +1 -1
- package/dist/gallery/assets/{editor.api-DOELtZec.js → editor.api-D4DY7O8u.js} +1 -1
- package/dist/gallery/assets/{editor.main-BWk0dmtj.js → editor.main-yco_NKg8.js} +2 -2
- package/dist/gallery/assets/{freemarker2-DaSd0g6o.js → freemarker2-fGDILtD9.js} +1 -1
- package/dist/gallery/assets/{handlebars-B-cbMVnP.js → handlebars-B-nHriZ1.js} +1 -1
- package/dist/gallery/assets/{html-BbDsaPQg.js → html-DEQfX7Js.js} +1 -1
- package/dist/gallery/assets/{htmlMode-C2OjYqY0.js → htmlMode-uhEi5PvM.js} +1 -1
- package/dist/gallery/assets/{index-DotH6Szk.js → index-DDVac8M2.js} +17 -17
- package/dist/gallery/assets/index-j7lhd4uP.css +1 -0
- package/dist/gallery/assets/{javascript-CogJNBNZ.js → javascript-Ckntz9-M.js} +1 -1
- package/dist/gallery/assets/{jsonMode-ssar7rkB.js → jsonMode-CJxVgkT4.js} +1 -1
- package/dist/gallery/assets/{liquid-D9uJH3tm.js → liquid-RFSWEd_Y.js} +1 -1
- package/dist/gallery/assets/{mdx-D1ruboYf.js → mdx-D-ehWzfF.js} +1 -1
- package/dist/gallery/assets/{monaco.contribution-w8cYIjzF.js → monaco.contribution-MjikDBtO.js} +2 -2
- package/dist/gallery/assets/{python-Bk5JPOE3.js → python--CNwEUdb.js} +1 -1
- package/dist/gallery/assets/{razor-BbS20zwD.js → razor-DHqz5qi3.js} +1 -1
- package/dist/gallery/assets/{tsMode-DWuHbc8i.js → tsMode-dK4G_KWy.js} +1 -1
- package/dist/gallery/assets/{typescript-FIdb5Wzk.js → typescript-DP1TQDUw.js} +1 -1
- package/dist/gallery/assets/{xml-BDyGXNxX.js → xml-9XPvNCaL.js} +1 -1
- package/dist/gallery/assets/{yaml-D3AYCCFt.js → yaml-CNOAXiSl.js} +1 -1
- package/dist/gallery/index.html +2 -2
- package/dist/index.js +32 -20
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/gallery/assets/index-BIf-7q-k.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D4DY7O8u.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<`,`>`]],autoClosingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],surroundingPairs:[{open:`<`,close:`>`},{open:`'`,close:`'`},{open:`"`,close:`"`}],onEnterRules:[{beforeText:RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:s.languages.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:s.languages.IndentAction.Indent}}]},l={defaultToken:``,tokenPostfix:`.xml`,ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,``],{include:`@whitespace`},[/(<)(@qualifiedName)/,[{token:`delimiter`},{token:`tag`,next:`@tag`}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:`delimiter`},{token:`tag`},``,{token:`delimiter`}]],[/(<\?)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/(<\!)(@qualifiedName)/,[{token:`delimiter`},{token:`metatag`,next:`@tag`}]],[/<\!\[CDATA\[/,{token:`delimiter.cdata`,next:`@cdata`}],[/&\w+;/,`string.escape`]],cdata:[[/[^\]]+/,``],[/\]\]>/,{token:`delimiter.cdata`,next:`@pop`}],[/\]/,``]],tag:[[/[ \t\r\n]+/,``],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,[`attribute.name`,``,`attribute.value`]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,[`attribute.name`,``,`attribute.value`]],[/@qualifiedName/,`attribute.name`],[/\?>/,{token:`delimiter`,next:`@pop`}],[/(\/)(>)/,[{token:`tag`},{token:`delimiter`,next:`@pop`}]],[/>/,{token:`delimiter`,next:`@pop`}]],whitespace:[[/[ \t\r\n]+/,``],[/<!--/,{token:`comment`,next:`@comment`}]],comment:[[/[^<\-]+/,`comment.content`],[/-->/,{token:`comment`,next:`@pop`}],[/<!--/,`comment.content.invalid`],[/[<\-]/,`comment.content`]]}};export{c as conf,l as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-
|
|
1
|
+
import{m as e}from"./editor.api-D4DY7O8u.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c={comments:{lineComment:`#`},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:s.languages.IndentAction.Indent}}]},l={tokenPostfix:`.yaml`,brackets:[{token:`delimiter.bracket`,open:`{`,close:`}`},{token:`delimiter.square`,open:`[`,close:`]`}],keywords:[`true`,`True`,`TRUE`,`false`,`False`,`FALSE`,`null`,`Null`,`Null`,`~`],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:`@whitespace`},{include:`@comment`},[/%[^ ]+.*$/,`meta.directive`],[/---/,`operators.directivesEnd`],[/\.{3}/,`operators.documentEnd`],[/[-?:](?= )/,`operators`],{include:`@anchor`},{include:`@tagHandle`},{include:`@flowCollections`},{include:`@blockStyle`},[/@numberInteger(?![ \t]*\S+)/,`number`],[/@numberFloat(?![ \t]*\S+)/,`number.float`],[/@numberOctal(?![ \t]*\S+)/,`number.octal`],[/@numberHex(?![ \t]*\S+)/,`number.hex`],[/@numberInfinity(?![ \t]*\S+)/,`number.infinity`],[/@numberNaN(?![ \t]*\S+)/,`number.nan`],[/@numberDate(?![ \t]*\S+)/,`number.date`],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,[`type`,`white`,`operators`,`white`]],{include:`@flowScalars`},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],object:[{include:`@whitespace`},{include:`@comment`},[/\}/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],[/:(?= )/,`operators`],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,`type`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\},]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],array:[{include:`@whitespace`},{include:`@comment`},[/\]/,`@brackets`,`@pop`],[/,/,`delimiter.comma`],{include:`@flowCollections`},{include:`@flowScalars`},{include:`@tagHandle`},{include:`@anchor`},{include:`@flowNumber`},[/[^\],]+/,{cases:{"@keywords":`keyword`,"@default":`string`}}]],multiString:[[/^( +).+$/,`string`,`@multiStringContinued.$1`]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":`string`,"@default":{token:`@rematch`,next:`@popall`}}}]],whitespace:[[/[ \t\r\n]+/,`white`]],comment:[[/#.*$/,`comment`]],flowCollections:[[/\[/,`@brackets`,`@array`],[/\{/,`@brackets`,`@object`]],flowScalars:[[/"([^"\\]|\\.)*$/,`string.invalid`],[/'([^'\\]|\\.)*$/,`string.invalid`],[/'[^']*'/,`string`],[/"/,`string`,`@doubleQuotedString`]],doubleQuotedString:[[/[^\\"]+/,`string`],[/@escapes/,`string.escape`],[/\\./,`string.escape.invalid`],[/"/,`string`,`@pop`]],blockStyle:[[/[>|][0-9]*[+-]?$/,`operators`,`@multiString`]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,`number`],[/@numberFloat(?=[ \t]*[,\]\}])/,`number.float`],[/@numberOctal(?=[ \t]*[,\]\}])/,`number.octal`],[/@numberHex(?=[ \t]*[,\]\}])/,`number.hex`],[/@numberInfinity(?=[ \t]*[,\]\}])/,`number.infinity`],[/@numberNaN(?=[ \t]*[,\]\}])/,`number.nan`],[/@numberDate(?=[ \t]*[,\]\}])/,`number.date`]],tagHandle:[[/\![^ ]*/,`tag`]],anchor:[[/[&*][^ ]+/,`namespace`]]}};export{c as conf,l as language};
|
package/dist/gallery/index.html
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
10
|
-
<script type="module" crossorigin src="/__musea__/assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/__musea__/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/__musea__/assets/index-DDVac8M2.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/__musea__/assets/index-j7lhd4uP.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="app"></div>
|
package/dist/index.js
CHANGED
|
@@ -673,7 +673,7 @@ function musea(options = {}) {
|
|
|
673
673
|
server = devServer;
|
|
674
674
|
devServer.middlewares.use(basePath, async (req, res, next) => {
|
|
675
675
|
const url = req.url || "/";
|
|
676
|
-
if (url === "/" || url === "/index.html" || url.startsWith("/tokens") || url.startsWith("/component/")) {
|
|
676
|
+
if (url === "/" || url === "/index.html" || url.startsWith("/tokens") || url.startsWith("/component/") || url.startsWith("/tests")) {
|
|
677
677
|
const galleryDistDir = path.resolve(path.dirname(new URL(import.meta.url).pathname), "gallery");
|
|
678
678
|
const indexHtmlPath = path.join(galleryDistDir, "index.html");
|
|
679
679
|
try {
|
|
@@ -717,6 +717,19 @@ function musea(options = {}) {
|
|
|
717
717
|
}
|
|
718
718
|
next();
|
|
719
719
|
});
|
|
720
|
+
devServer.middlewares.use(`${basePath}/vendor/axe-core.min.js`, async (_req, res, _next) => {
|
|
721
|
+
try {
|
|
722
|
+
const require = createRequire(import.meta.url);
|
|
723
|
+
const axeCorePath = require.resolve("axe-core/axe.min.js");
|
|
724
|
+
const content = await fs.promises.readFile(axeCorePath, "utf-8");
|
|
725
|
+
res.setHeader("Content-Type", "application/javascript");
|
|
726
|
+
res.setHeader("Cache-Control", "public, max-age=86400");
|
|
727
|
+
res.end(content);
|
|
728
|
+
} catch {
|
|
729
|
+
res.statusCode = 404;
|
|
730
|
+
res.end("axe-core not installed");
|
|
731
|
+
}
|
|
732
|
+
});
|
|
720
733
|
devServer.middlewares.use(`${basePath}/preview-module`, async (req, res, _next) => {
|
|
721
734
|
const url = new URL(req.url || "", `http://localhost`);
|
|
722
735
|
const artPath = url.searchParams.get("art");
|
|
@@ -2505,11 +2518,11 @@ function __museaInitAddons(container, variantName) {
|
|
|
2505
2518
|
// Run axe-core a11y test
|
|
2506
2519
|
(async () => {
|
|
2507
2520
|
try {
|
|
2508
|
-
// Dynamically load axe-core from
|
|
2521
|
+
// Dynamically load axe-core from local vendor route if not already loaded
|
|
2509
2522
|
if (!window.axe) {
|
|
2510
2523
|
const script = document.createElement('script');
|
|
2511
|
-
|
|
2512
|
-
script.
|
|
2524
|
+
const _basePath = location.pathname.replace(/\\/preview$/, '');
|
|
2525
|
+
script.src = _basePath + '/vendor/axe-core.min.js';
|
|
2513
2526
|
await new Promise((resolve, reject) => {
|
|
2514
2527
|
script.onload = resolve;
|
|
2515
2528
|
script.onerror = reject;
|
|
@@ -2618,22 +2631,21 @@ async function mount() {
|
|
|
2618
2631
|
__museaInitAddons(container, '${escapedVariantName}');
|
|
2619
2632
|
|
|
2620
2633
|
// Override set-props to remount with raw component + props
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
}
|
|
2634
|
+
const TargetComponent = RawComponent || VariantComponent;
|
|
2635
|
+
window.__museaSetProps = (props) => {
|
|
2636
|
+
for (const key of Object.keys(propsOverride)) {
|
|
2637
|
+
delete propsOverride[key];
|
|
2638
|
+
}
|
|
2639
|
+
Object.assign(propsOverride, props);
|
|
2640
|
+
remountWithProps(TargetComponent);
|
|
2641
|
+
};
|
|
2642
|
+
window.__museaSetSlots = (slots) => {
|
|
2643
|
+
for (const key of Object.keys(slotsOverride)) {
|
|
2644
|
+
delete slotsOverride[key];
|
|
2645
|
+
}
|
|
2646
|
+
Object.assign(slotsOverride, slots);
|
|
2647
|
+
remountWithProps(TargetComponent);
|
|
2648
|
+
};
|
|
2637
2649
|
} catch (error) {
|
|
2638
2650
|
console.error('[musea-preview] Failed to mount:', error);
|
|
2639
2651
|
container.innerHTML = \`
|