@coderline/alphatab-vite 1.8.1 → 1.8.3

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.
Files changed (47) hide show
  1. package/dist/AlphaTabVitePluginOptions.cjs +34 -37
  2. package/dist/AlphaTabVitePluginOptions.mjs +34 -35
  3. package/dist/alphaTab.vite.cjs +37 -44
  4. package/dist/alphaTab.vite.mjs +36 -36
  5. package/dist/alphaTabVitePlugin.cjs +50 -54
  6. package/dist/alphaTabVitePlugin.mjs +49 -50
  7. package/dist/bridge/asset.cjs +50 -80
  8. package/dist/bridge/asset.mjs +47 -57
  9. package/dist/bridge/build.cjs +152 -214
  10. package/dist/bridge/build.mjs +149 -191
  11. package/dist/bridge/bundler.cjs +54 -0
  12. package/dist/bridge/bundler.mjs +52 -0
  13. package/dist/bridge/config.cjs +34 -37
  14. package/dist/bridge/config.mjs +34 -35
  15. package/dist/bridge/constants.cjs +73 -80
  16. package/dist/bridge/constants.mjs +72 -76
  17. package/dist/bridge/fsUtils.cjs +46 -55
  18. package/dist/bridge/fsUtils.mjs +43 -51
  19. package/dist/bridge/index.cjs +58 -68
  20. package/dist/bridge/index.mjs +42 -42
  21. package/dist/bridge/optimizer.cjs +112 -155
  22. package/dist/bridge/optimizer.mjs +108 -132
  23. package/dist/bridge/plugins.cjs +39 -45
  24. package/dist/bridge/plugins.mjs +38 -41
  25. package/dist/bridge/resolve.cjs +54 -66
  26. package/dist/bridge/resolve.mjs +53 -62
  27. package/dist/bridge/typeUtils.cjs +34 -37
  28. package/dist/bridge/typeUtils.mjs +34 -35
  29. package/dist/bridge/utils.cjs +87 -121
  30. package/dist/bridge/utils.mjs +84 -117
  31. package/dist/bridge/worker.cjs +179 -183
  32. package/dist/bridge/worker.mjs +175 -160
  33. package/dist/chunk.cjs +63 -0
  34. package/dist/copyAssetsPlugin.cjs +102 -163
  35. package/dist/copyAssetsPlugin.mjs +35 -141
  36. package/dist/copyAssetsPlugin2.mjs +108 -0
  37. package/dist/detectionGlobalPlugin.cjs +65 -68
  38. package/dist/detectionGlobalPlugin.mjs +62 -64
  39. package/dist/dist.cjs +6595 -0
  40. package/dist/dist.mjs +6589 -0
  41. package/dist/importMetaPlugin.cjs +147 -192
  42. package/dist/importMetaPlugin.mjs +143 -188
  43. package/dist/prompt-DewH0PjV.cjs +885 -0
  44. package/dist/prompt-DewH0PjV.mjs +882 -0
  45. package/dist/workerPlugin.cjs +145 -219
  46. package/dist/workerPlugin.mjs +141 -196
  47. package/package.json +17 -17
@@ -1,148 +1,124 @@
1
1
  /*!
2
- * alphaTab Vite Plugin v1.8.1 (, build 30)
3
- *
4
- * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
- *
6
- * This Source Code Form is subject to the terms of the Mozilla Public
7
- * License, v. 2.0. If a copy of the MPL was not distributed with this
8
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
- *
10
- * This library uses code from Vite (https://github.com/vitejs/vite/), licensed under:
11
- *
12
- * MIT License
13
- * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
14
- *
15
- * Permission is hereby granted, free of charge, to any person obtaining a copy
16
- * of this software and associated documentation files (the "Software"), to deal
17
- * in the Software without restriction, including without limitation the rights
18
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
- * copies of the Software, and to permit persons to whom the Software is
20
- * furnished to do so, subject to the following conditions:
21
- *
22
- * The above copyright notice and this permission notice shall be included in all
23
- * copies or substantial portions of the Software.
24
- *
25
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
32
- *
33
- * @preserve
34
- * @license
35
- */
36
-
37
- import fs from 'node:fs';
38
- import * as path from 'node:path';
39
- import { normalizePath } from 'vite';
40
- import { METADATA_FILENAME } from './constants.mjs';
41
- import { tryFsResolve } from './resolve.mjs';
42
- import { cleanUrl } from './utils.mjs';
43
-
44
- // index.ts for more details on contents and license of this file
45
- // https://github.com/Danielku15/vite/blob/88b7def341f12d07d7d4f83cbe3dc73cc8c6b7be/packages/vite/src/node/optimizer/index.ts#L1356
2
+ * alphaTab Vite Plugin v1.8.3 (, build 32)
3
+ *
4
+ * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
+ *
6
+ * This Source Code Form is subject to the terms of the Mozilla Public
7
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ *
10
+ * This library uses code from Vite (https://github.com/vitejs/vite/), licensed under:
11
+ *
12
+ * MIT License
13
+ * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
14
+ *
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ * of this software and associated documentation files (the "Software"), to deal
17
+ * in the Software without restriction, including without limitation the rights
18
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ * copies of the Software, and to permit persons to whom the Software is
20
+ * furnished to do so, subject to the following conditions:
21
+ *
22
+ * The above copyright notice and this permission notice shall be included in all
23
+ * copies or substantial portions of the Software.
24
+ *
25
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ * SOFTWARE.
32
+ *
33
+ * @preserve
34
+ * @license
35
+ */
36
+ import { cleanUrl } from "./utils.mjs";
37
+ import { METADATA_FILENAME } from "./constants.mjs";
38
+ import { tryFsResolve } from "./resolve.mjs";
39
+ import fs from "node:fs";
40
+ import * as path$1 from "node:path";
41
+ import { normalizePath } from "vite";
42
+ //#region src/bridge/optimizer.ts
46
43
  /**
47
- * @internal
48
- */
44
+ * @internal
45
+ */
49
46
  function tryOptimizedDepResolve(config, ssr, url, depId, preserveSymlinks) {
50
- const optimizer = getDepsOptimizer(config, ssr);
51
- if (optimizer?.isOptimizedDepFile(depId)) {
52
- const depFile = cleanUrl(depId);
53
- const info = optimizedDepInfoFromFile(optimizer.metadata, depFile);
54
- const depSrc = info?.src;
55
- if (depSrc) {
56
- const resolvedFile = path.resolve(path.dirname(depSrc), url);
57
- return tryFsResolve(resolvedFile, preserveSymlinks);
58
- }
59
- }
60
- return undefined;
47
+ const optimizer = getDepsOptimizer(config, ssr);
48
+ if (optimizer?.isOptimizedDepFile(depId)) {
49
+ const depFile = cleanUrl(depId);
50
+ const depSrc = optimizedDepInfoFromFile(optimizer.metadata, depFile)?.src;
51
+ if (depSrc) return tryFsResolve(path$1.resolve(path$1.dirname(depSrc), url), preserveSymlinks);
52
+ }
61
53
  }
62
- // https://github.com/Danielku15/vite/blob/88b7def341f12d07d7d4f83cbe3dc73cc8c6b7be/packages/vite/src/node/optimizer/optimizer.ts#L32-L40
63
- const depsOptimizerMap = new WeakMap();
64
- const devSsrDepsOptimizerMap = new WeakMap();
54
+ var depsOptimizerMap = /* @__PURE__ */ new WeakMap();
55
+ var devSsrDepsOptimizerMap = /* @__PURE__ */ new WeakMap();
65
56
  function getDepsOptimizer(config, ssr) {
66
- const map = ssr ? devSsrDepsOptimizerMap : depsOptimizerMap;
67
- let optimizer = map.get(config);
68
- if (!optimizer) {
69
- optimizer = createDepsOptimizer(config);
70
- map.set(config, optimizer);
71
- }
72
- return optimizer;
57
+ const map = ssr ? devSsrDepsOptimizerMap : depsOptimizerMap;
58
+ let optimizer = map.get(config);
59
+ if (!optimizer) {
60
+ optimizer = createDepsOptimizer(config);
61
+ map.set(config, optimizer);
62
+ }
63
+ return optimizer;
73
64
  }
74
- // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/optimizer/optimizer.ts#L79
75
65
  function createDepsOptimizer(config) {
76
- const depsCacheDirPrefix = normalizePath(path.resolve(config.cacheDir, 'deps'));
77
- const metadata = parseDepsOptimizerMetadata(fs.readFileSync(path.join(depsCacheDirPrefix, METADATA_FILENAME), 'utf8'), depsCacheDirPrefix);
78
- const notImplemented = () => {
79
- throw new Error('not implemented');
80
- };
81
- const depsOptimizer = {
82
- async init() { },
83
- metadata,
84
- registerMissingImport: notImplemented,
85
- run: notImplemented,
86
- // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/optimizer/index.ts#L916
87
- isOptimizedDepFile: id => id.startsWith(depsCacheDirPrefix),
88
- isOptimizedDepUrl: notImplemented,
89
- getOptimizedDepId: notImplemented,
90
- close: notImplemented,
91
- options: {}
92
- };
93
- return depsOptimizer;
66
+ const depsCacheDirPrefix = normalizePath(path$1.resolve(config.cacheDir, "deps"));
67
+ const metadata = parseDepsOptimizerMetadata(fs.readFileSync(path$1.join(depsCacheDirPrefix, METADATA_FILENAME), "utf8"), depsCacheDirPrefix);
68
+ const notImplemented = () => {
69
+ throw new Error("not implemented");
70
+ };
71
+ return {
72
+ async init() {},
73
+ metadata,
74
+ registerMissingImport: notImplemented,
75
+ run: notImplemented,
76
+ isOptimizedDepFile: (id) => id.startsWith(depsCacheDirPrefix),
77
+ isOptimizedDepUrl: notImplemented,
78
+ getOptimizedDepId: notImplemented,
79
+ close: notImplemented,
80
+ options: {}
81
+ };
94
82
  }
95
- // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/optimizer/index.ts#L944
96
83
  function parseDepsOptimizerMetadata(jsonMetadata, depsCacheDir) {
97
- const { hash, lockfileHash, configHash, browserHash, optimized, chunks } = JSON.parse(jsonMetadata, (key, value) => {
98
- if (key === 'file' || key === 'src') {
99
- return normalizePath(path.resolve(depsCacheDir, value));
100
- }
101
- return value;
102
- });
103
- if (!chunks || Object.values(optimized).some(depInfo => !depInfo.fileHash)) {
104
- // outdated _metadata.json version, ignore
105
- return;
106
- }
107
- const metadata = {
108
- hash,
109
- lockfileHash,
110
- configHash,
111
- browserHash,
112
- optimized: {},
113
- discovered: {},
114
- chunks: {},
115
- depInfoList: []
116
- };
117
- for (const id of Object.keys(optimized)) {
118
- addOptimizedDepInfo(metadata, 'optimized', {
119
- ...optimized[id],
120
- id,
121
- browserHash
122
- });
123
- }
124
- for (const id of Object.keys(chunks)) {
125
- addOptimizedDepInfo(metadata, 'chunks', {
126
- ...chunks[id],
127
- id,
128
- browserHash,
129
- needsInterop: false
130
- });
131
- }
132
- return metadata;
84
+ const { hash, lockfileHash, configHash, browserHash, optimized, chunks } = JSON.parse(jsonMetadata, (key, value) => {
85
+ if (key === "file" || key === "src") return normalizePath(path$1.resolve(depsCacheDir, value));
86
+ return value;
87
+ });
88
+ if (!chunks || Object.values(optimized).some((depInfo) => !depInfo.fileHash)) return;
89
+ const metadata = {
90
+ hash,
91
+ lockfileHash,
92
+ configHash,
93
+ browserHash,
94
+ optimized: {},
95
+ discovered: {},
96
+ chunks: {},
97
+ depInfoList: []
98
+ };
99
+ for (const id of Object.keys(optimized)) addOptimizedDepInfo(metadata, "optimized", {
100
+ ...optimized[id],
101
+ id,
102
+ browserHash
103
+ });
104
+ for (const id of Object.keys(chunks)) addOptimizedDepInfo(metadata, "chunks", {
105
+ ...chunks[id],
106
+ id,
107
+ browserHash,
108
+ needsInterop: false
109
+ });
110
+ return metadata;
133
111
  }
134
- // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/optimizer/index.ts#L322
135
112
  function addOptimizedDepInfo(metadata, type, depInfo) {
136
- metadata[type][depInfo.id] = depInfo;
137
- metadata.depInfoList.push(depInfo);
138
- return depInfo;
113
+ metadata[type][depInfo.id] = depInfo;
114
+ metadata.depInfoList.push(depInfo);
115
+ return depInfo;
139
116
  }
140
- // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/optimizer/index.ts#L1248
141
117
  /**
142
- * @internal
143
- */
118
+ * @internal
119
+ */
144
120
  function optimizedDepInfoFromFile(metadata, file) {
145
- return metadata.depInfoList.find(depInfo => depInfo.file === file);
121
+ return metadata.depInfoList.find((depInfo) => depInfo.file === file);
146
122
  }
147
-
123
+ //#endregion
148
124
  export { optimizedDepInfoFromFile, tryOptimizedDepResolve };
@@ -1,51 +1,45 @@
1
1
  /*!
2
- * alphaTab Vite Plugin v1.8.1 (, build 30)
3
- *
4
- * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
- *
6
- * This Source Code Form is subject to the terms of the Mozilla Public
7
- * License, v. 2.0. If a copy of the MPL was not distributed with this
8
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
- *
10
- * This library uses code from Vite (https://github.com/vitejs/vite/), licensed under:
11
- *
12
- * MIT License
13
- * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
14
- *
15
- * Permission is hereby granted, free of charge, to any person obtaining a copy
16
- * of this software and associated documentation files (the "Software"), to deal
17
- * in the Software without restriction, including without limitation the rights
18
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
- * copies of the Software, and to permit persons to whom the Software is
20
- * furnished to do so, subject to the following conditions:
21
- *
22
- * The above copyright notice and this permission notice shall be included in all
23
- * copies or substantial portions of the Software.
24
- *
25
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
32
- *
33
- * @preserve
34
- * @license
35
- */
36
-
37
- 'use strict';
38
-
39
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
40
-
41
- // index.ts for more details on contents and license of this file
42
- // https://github.com/vitejs/vite/blob/v6.1.1/packages/vite/src/node/plugins/index.ts#L161
2
+ * alphaTab Vite Plugin v1.8.3 (, build 32)
3
+ *
4
+ * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
+ *
6
+ * This Source Code Form is subject to the terms of the Mozilla Public
7
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ *
10
+ * This library uses code from Vite (https://github.com/vitejs/vite/), licensed under:
11
+ *
12
+ * MIT License
13
+ * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
14
+ *
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ * of this software and associated documentation files (the "Software"), to deal
17
+ * in the Software without restriction, including without limitation the rights
18
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ * copies of the Software, and to permit persons to whom the Software is
20
+ * furnished to do so, subject to the following conditions:
21
+ *
22
+ * The above copyright notice and this permission notice shall be included in all
23
+ * copies or substantial portions of the Software.
24
+ *
25
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ * SOFTWARE.
32
+ *
33
+ * @preserve
34
+ * @license
35
+ */
36
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
37
+ //#region src/bridge/plugins.ts
43
38
  /**
44
- * @internal
39
+ * @internal
45
40
  */
46
- // biome-ignore lint/complexity/noBannedTypes: Function type needed here
47
41
  function getHookHandler(hook) {
48
- return (typeof hook === 'object' ? hook.handler : hook);
42
+ return typeof hook === "object" ? hook.handler : hook;
49
43
  }
50
-
44
+ //#endregion
51
45
  exports.getHookHandler = getHookHandler;
@@ -1,47 +1,44 @@
1
1
  /*!
2
- * alphaTab Vite Plugin v1.8.1 (, build 30)
3
- *
4
- * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
- *
6
- * This Source Code Form is subject to the terms of the Mozilla Public
7
- * License, v. 2.0. If a copy of the MPL was not distributed with this
8
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
- *
10
- * This library uses code from Vite (https://github.com/vitejs/vite/), licensed under:
11
- *
12
- * MIT License
13
- * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
14
- *
15
- * Permission is hereby granted, free of charge, to any person obtaining a copy
16
- * of this software and associated documentation files (the "Software"), to deal
17
- * in the Software without restriction, including without limitation the rights
18
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
- * copies of the Software, and to permit persons to whom the Software is
20
- * furnished to do so, subject to the following conditions:
21
- *
22
- * The above copyright notice and this permission notice shall be included in all
23
- * copies or substantial portions of the Software.
24
- *
25
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
32
- *
33
- * @preserve
34
- * @license
35
- */
36
-
37
- // index.ts for more details on contents and license of this file
38
- // https://github.com/vitejs/vite/blob/v6.1.1/packages/vite/src/node/plugins/index.ts#L161
2
+ * alphaTab Vite Plugin v1.8.3 (, build 32)
3
+ *
4
+ * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
+ *
6
+ * This Source Code Form is subject to the terms of the Mozilla Public
7
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ *
10
+ * This library uses code from Vite (https://github.com/vitejs/vite/), licensed under:
11
+ *
12
+ * MIT License
13
+ * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
14
+ *
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ * of this software and associated documentation files (the "Software"), to deal
17
+ * in the Software without restriction, including without limitation the rights
18
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ * copies of the Software, and to permit persons to whom the Software is
20
+ * furnished to do so, subject to the following conditions:
21
+ *
22
+ * The above copyright notice and this permission notice shall be included in all
23
+ * copies or substantial portions of the Software.
24
+ *
25
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ * SOFTWARE.
32
+ *
33
+ * @preserve
34
+ * @license
35
+ */
36
+ //#region src/bridge/plugins.ts
39
37
  /**
40
- * @internal
38
+ * @internal
41
39
  */
42
- // biome-ignore lint/complexity/noBannedTypes: Function type needed here
43
40
  function getHookHandler(hook) {
44
- return (typeof hook === 'object' ? hook.handler : hook);
41
+ return typeof hook === "object" ? hook.handler : hook;
45
42
  }
46
-
43
+ //#endregion
47
44
  export { getHookHandler };
@@ -1,75 +1,63 @@
1
1
  /*!
2
- * alphaTab Vite Plugin v1.8.1 (, build 30)
3
- *
4
- * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
- *
6
- * This Source Code Form is subject to the terms of the Mozilla Public
7
- * License, v. 2.0. If a copy of the MPL was not distributed with this
8
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
- *
10
- * This library uses code from Vite (https://github.com/vitejs/vite/), licensed under:
11
- *
12
- * MIT License
13
- * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
14
- *
15
- * Permission is hereby granted, free of charge, to any person obtaining a copy
16
- * of this software and associated documentation files (the "Software"), to deal
17
- * in the Software without restriction, including without limitation the rights
18
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
- * copies of the Software, and to permit persons to whom the Software is
20
- * furnished to do so, subject to the following conditions:
21
- *
22
- * The above copyright notice and this permission notice shall be included in all
23
- * copies or substantial portions of the Software.
24
- *
25
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
32
- *
33
- * @preserve
34
- * @license
35
- */
36
-
37
- 'use strict';
38
-
39
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
40
-
41
- const vite = require('vite');
42
- const bridge_fsUtils = require('./fsUtils.cjs');
43
- const bridge_utils = require('./utils.cjs');
44
-
45
- // index.ts for more details on contents and license of this file
46
- // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/plugins/resolve.ts#L534
2
+ * alphaTab Vite Plugin v1.8.3 (, build 32)
3
+ *
4
+ * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
+ *
6
+ * This Source Code Form is subject to the terms of the Mozilla Public
7
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ *
10
+ * This library uses code from Vite (https://github.com/vitejs/vite/), licensed under:
11
+ *
12
+ * MIT License
13
+ * Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
14
+ *
15
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ * of this software and associated documentation files (the "Software"), to deal
17
+ * in the Software without restriction, including without limitation the rights
18
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ * copies of the Software, and to permit persons to whom the Software is
20
+ * furnished to do so, subject to the following conditions:
21
+ *
22
+ * The above copyright notice and this permission notice shall be included in all
23
+ * copies or substantial portions of the Software.
24
+ *
25
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ * SOFTWARE.
32
+ *
33
+ * @preserve
34
+ * @license
35
+ */
36
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
37
+ const require_bridge_utils = require("./utils.cjs");
38
+ const require_bridge_fsUtils = require("./fsUtils.cjs");
39
+ let vite = require("vite");
40
+ //#region src/bridge/resolve.ts
47
41
  function splitFileAndPostfix(path) {
48
- const file = bridge_utils.cleanUrl(path);
49
- return { file, postfix: path.slice(file.length) };
42
+ const file = require_bridge_utils.cleanUrl(path);
43
+ return {
44
+ file,
45
+ postfix: path.slice(file.length)
46
+ };
50
47
  }
51
- // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/plugins/resolve.ts#L566-L574
52
48
  /**
53
- * @internal
54
- */
49
+ * @internal
50
+ */
55
51
  function tryFsResolve(fsPath, preserveSymlinks) {
56
- const { file, postfix } = splitFileAndPostfix(fsPath);
57
- const res = tryCleanFsResolve(file, preserveSymlinks);
58
- if (res) {
59
- return res + postfix;
60
- }
61
- return;
52
+ const { file, postfix } = splitFileAndPostfix(fsPath);
53
+ const res = tryCleanFsResolve(file, preserveSymlinks);
54
+ if (res) return res + postfix;
62
55
  }
63
- // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/plugins/resolve.ts#L580
64
56
  function tryCleanFsResolve(file, preserveSymlinks) {
65
- if (file.includes('node_modules')) {
66
- return bridge_fsUtils.tryResolveRealFile(file, preserveSymlinks);
67
- }
68
- const normalizedResolved = bridge_fsUtils.tryResolveRealFile(vite.normalizePath(file));
69
- if (!normalizedResolved) {
70
- return bridge_fsUtils.tryResolveRealFile(file, preserveSymlinks);
71
- }
72
- return normalizedResolved;
57
+ if (file.includes("node_modules")) return require_bridge_fsUtils.tryResolveRealFile(file, preserveSymlinks);
58
+ const normalizedResolved = require_bridge_fsUtils.tryResolveRealFile((0, vite.normalizePath)(file));
59
+ if (!normalizedResolved) return require_bridge_fsUtils.tryResolveRealFile(file, preserveSymlinks);
60
+ return normalizedResolved;
73
61
  }
74
-
62
+ //#endregion
75
63
  exports.tryFsResolve = tryFsResolve;