@coderline/alphatab-vite 1.7.0 → 1.7.1

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 +38 -0
  2. package/dist/AlphaTabVitePluginOptions.d.ts +30 -0
  3. package/dist/AlphaTabVitePluginOptions.mjs +36 -0
  4. package/dist/alphaTab.vite.cjs +45 -0
  5. package/dist/alphaTab.vite.d.ts +1 -33
  6. package/dist/alphaTab.vite.mjs +2 -2328
  7. package/dist/alphaTabVitePlugin.cjs +57 -0
  8. package/dist/alphaTabVitePlugin.d.ts +5 -0
  9. package/dist/alphaTabVitePlugin.mjs +53 -0
  10. package/dist/bridge/asset.cjs +87 -0
  11. package/dist/bridge/asset.mjs +63 -0
  12. package/dist/bridge/build.cjs +242 -0
  13. package/dist/bridge/build.mjs +217 -0
  14. package/dist/bridge/config.cjs +38 -0
  15. package/dist/bridge/config.mjs +36 -0
  16. package/dist/bridge/constants.cjs +88 -0
  17. package/dist/bridge/constants.mjs +82 -0
  18. package/dist/bridge/fsUtils.cjs +60 -0
  19. package/dist/bridge/fsUtils.mjs +56 -0
  20. package/dist/bridge/index.cjs +69 -0
  21. package/dist/bridge/index.mjs +43 -0
  22. package/dist/bridge/optimizer.cjs +172 -0
  23. package/dist/bridge/optimizer.mjs +148 -0
  24. package/dist/bridge/plugins.cjs +51 -0
  25. package/dist/bridge/plugins.mjs +47 -0
  26. package/dist/bridge/resolve.cjs +75 -0
  27. package/dist/bridge/resolve.mjs +71 -0
  28. package/dist/bridge/typeUtils.cjs +38 -0
  29. package/dist/bridge/typeUtils.d.ts +3 -0
  30. package/dist/bridge/typeUtils.mjs +36 -0
  31. package/dist/bridge/utils.cjs +164 -0
  32. package/dist/bridge/utils.mjs +151 -0
  33. package/dist/bridge/worker.cjs +207 -0
  34. package/dist/bridge/worker.d.ts +10 -0
  35. package/dist/bridge/worker.mjs +180 -0
  36. package/dist/copyAssetsPlugin.cjs +168 -0
  37. package/dist/copyAssetsPlugin.d.ts +5 -0
  38. package/dist/copyAssetsPlugin.mjs +143 -0
  39. package/dist/importMetaPlugin.cjs +201 -0
  40. package/dist/importMetaPlugin.d.ts +5 -0
  41. package/dist/importMetaPlugin.mjs +197 -0
  42. package/dist/workerPlugin.cjs +224 -0
  43. package/dist/workerPlugin.d.ts +5 -0
  44. package/dist/workerPlugin.mjs +201 -0
  45. package/package.json +32 -19
  46. package/dist/alphaTab.vite.js +0 -2388
  47. package/dist/alphaTab.vite.min.mjs +0 -36
@@ -0,0 +1,217 @@
1
+ /*!
2
+ * alphaTab Vite Plugin v1.7.1 (, build 24)
3
+ *
4
+ * Copyright © 2025, 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 * as path from 'node:path';
38
+ import { ROLLUP_HOOKS } from './constants.mjs';
39
+ import { getHookHandler } from './plugins.mjs';
40
+ import { joinUrlSegments, partialEncodeURIPath } from './utils.mjs';
41
+
42
+ // index.ts for more details on contents and license of this file
43
+ const needsEscapeRegEx = /[\n\r'\\\u2028\u2029]/;
44
+ const quoteNewlineRegEx = /([\n\r'\u2028\u2029])/g;
45
+ const backSlashRegEx = /\\/g;
46
+ function escapeId(id) {
47
+ if (!needsEscapeRegEx.test(id)) {
48
+ return id;
49
+ }
50
+ return id.replace(backSlashRegEx, '\\\\').replace(quoteNewlineRegEx, '\\$1');
51
+ }
52
+ const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
53
+ const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(partialEncodeURIPath(relativePath))}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
54
+ const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
55
+ const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
56
+ const relativeUrlMechanisms = {
57
+ amd: relativePath => {
58
+ if (relativePath[0] !== '.') {
59
+ relativePath = `./${relativePath}`;
60
+ }
61
+ return getResolveUrl(`require.toUrl('${escapeId(relativePath)}'), document.baseURI`);
62
+ },
63
+ cjs: relativePath => `(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath)})`,
64
+ es: relativePath => getResolveUrl(`'${escapeId(partialEncodeURIPath(relativePath))}', import.meta.url`),
65
+ iife: relativePath => getRelativeUrlFromDocument(relativePath),
66
+ // NOTE: make sure rollup generate `module` params
67
+ system: relativePath => getResolveUrl(`'${escapeId(partialEncodeURIPath(relativePath))}', module.meta.url`),
68
+ umd: relativePath => `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(relativePath)} : ${getRelativeUrlFromDocument(relativePath, true)})`
69
+ };
70
+ const customRelativeUrlMechanisms = {
71
+ ...relativeUrlMechanisms,
72
+ 'worker-iife': relativePath => getResolveUrl(`'${escapeId(partialEncodeURIPath(relativePath))}', self.location.href`)
73
+ };
74
+ /**
75
+ * @internal
76
+ */
77
+ function createToImportMetaURLBasedRelativeRuntime(format, isWorker) {
78
+ const formatLong = isWorker && format === 'iife' ? 'worker-iife' : format;
79
+ const toRelativePath = customRelativeUrlMechanisms[formatLong];
80
+ return (filename, importer) => ({
81
+ runtime: toRelativePath(path.posix.relative(path.dirname(importer), filename))
82
+ });
83
+ }
84
+ /**
85
+ * @internal
86
+ */
87
+ function toOutputFilePathInJS(filename, type, hostId, hostType, config, toRelative) {
88
+ const { renderBuiltUrl } = config.experimental;
89
+ let relative = config.base === '' || config.base === './';
90
+ if (renderBuiltUrl) {
91
+ const result = renderBuiltUrl(filename, {
92
+ hostId,
93
+ hostType,
94
+ type,
95
+ ssr: !!config.build.ssr
96
+ });
97
+ if (typeof result === 'object') {
98
+ if (result.runtime) {
99
+ return { runtime: result.runtime };
100
+ }
101
+ if (typeof result.relative === 'boolean') {
102
+ relative = result.relative;
103
+ }
104
+ }
105
+ else if (result) {
106
+ return result;
107
+ }
108
+ }
109
+ if (relative && !config.build.ssr) {
110
+ return toRelative(filename, hostId);
111
+ }
112
+ return joinUrlSegments(config.base, filename);
113
+ }
114
+ // https://github.com/vitejs/vite/blob/v6.1.1/packages/vite/src/node/build.ts#L1131
115
+ /**
116
+ * @internal
117
+ */
118
+ function injectEnvironmentToHooks(environment, plugin) {
119
+ const { resolveId, load, transform } = plugin;
120
+ const clone = { ...plugin };
121
+ for (const hook of Object.keys(clone)) {
122
+ switch (hook) {
123
+ case 'resolveId':
124
+ clone[hook] = wrapEnvironmentResolveId(environment, resolveId);
125
+ break;
126
+ case 'load':
127
+ clone[hook] = wrapEnvironmentLoad(environment, load);
128
+ break;
129
+ case 'transform':
130
+ clone[hook] = wrapEnvironmentTransform(environment, transform);
131
+ break;
132
+ default:
133
+ if (ROLLUP_HOOKS.includes(hook)) {
134
+ clone[hook] = wrapEnvironmentHook(environment, clone[hook]);
135
+ }
136
+ break;
137
+ }
138
+ }
139
+ return clone;
140
+ }
141
+ function wrapEnvironmentResolveId(environment, hook) {
142
+ if (!hook) {
143
+ return;
144
+ }
145
+ const fn = getHookHandler(hook);
146
+ const handler = function (id, importer, options) {
147
+ return fn.call(injectEnvironmentInContext(this, environment), id, importer, injectSsrFlag(options, environment));
148
+ };
149
+ if ('handler' in hook) {
150
+ return {
151
+ ...hook,
152
+ handler
153
+ };
154
+ }
155
+ return handler;
156
+ }
157
+ function wrapEnvironmentLoad(environment, hook) {
158
+ if (!hook) {
159
+ return;
160
+ }
161
+ const fn = getHookHandler(hook);
162
+ const handler = function (id, ...args) {
163
+ return fn.call(injectEnvironmentInContext(this, environment), id, injectSsrFlag(args[0], environment));
164
+ };
165
+ if ('handler' in hook) {
166
+ return {
167
+ ...hook,
168
+ handler
169
+ };
170
+ }
171
+ return handler;
172
+ }
173
+ function wrapEnvironmentTransform(environment, hook) {
174
+ if (!hook) {
175
+ return;
176
+ }
177
+ const fn = getHookHandler(hook);
178
+ const handler = function (code, importer, ...args) {
179
+ return fn.call(injectEnvironmentInContext(this, environment), code, importer, injectSsrFlag(args[0], environment));
180
+ };
181
+ if ('handler' in hook) {
182
+ return {
183
+ ...hook,
184
+ handler
185
+ };
186
+ }
187
+ return handler;
188
+ }
189
+ function wrapEnvironmentHook(environment, hook) {
190
+ if (!hook) {
191
+ return;
192
+ }
193
+ const fn = getHookHandler(hook);
194
+ if (typeof fn !== 'function') {
195
+ return hook;
196
+ }
197
+ const handler = function (...args) {
198
+ return fn.call(injectEnvironmentInContext(this, environment), ...args);
199
+ };
200
+ if ('handler' in hook) {
201
+ return {
202
+ ...hook,
203
+ handler
204
+ };
205
+ }
206
+ return handler;
207
+ }
208
+ function injectEnvironmentInContext(context, environment) {
209
+ context.environment ??= environment;
210
+ return context;
211
+ }
212
+ function injectSsrFlag(options, environment) {
213
+ const ssr = environment ? environment.config.consumer === 'server' : true;
214
+ return { ...(options ?? {}), ssr };
215
+ }
216
+
217
+ export { createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, toOutputFilePathInJS };
@@ -0,0 +1,38 @@
1
+ /*!
2
+ * alphaTab Vite Plugin v1.7.1 (, build 24)
3
+ *
4
+ * Copyright © 2025, 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
+
@@ -0,0 +1,36 @@
1
+ /*!
2
+ * alphaTab Vite Plugin v1.7.1 (, build 24)
3
+ *
4
+ * Copyright © 2025, 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
+
@@ -0,0 +1,88 @@
1
+ /*!
2
+ * alphaTab Vite Plugin v1.7.1 (, build 24)
3
+ *
4
+ * Copyright © 2025, 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/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/constants.ts#L143
43
+ /**
44
+ * @internal
45
+ */
46
+ const METADATA_FILENAME = '_metadata.json';
47
+ // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/constants.ts#L63#
48
+ /**
49
+ * @internal
50
+ */
51
+ const ENV_PUBLIC_PATH = '/@vite/env';
52
+ // https://github.com/vitejs/vite/blob/v6.1.1/packages/vite/src/node/constants.ts#L10C1-L38C32
53
+ /**
54
+ * @internal
55
+ */
56
+ const ROLLUP_HOOKS = [
57
+ 'options',
58
+ 'buildStart',
59
+ 'buildEnd',
60
+ 'renderStart',
61
+ 'renderError',
62
+ 'renderChunk',
63
+ 'writeBundle',
64
+ 'generateBundle',
65
+ 'banner',
66
+ 'footer',
67
+ 'augmentChunkHash',
68
+ 'outputOptions',
69
+ 'renderDynamicImport',
70
+ 'resolveFileUrl',
71
+ 'resolveImportMeta',
72
+ 'intro',
73
+ 'outro',
74
+ 'closeBundle',
75
+ 'closeWatcher',
76
+ 'load',
77
+ 'moduleParsed',
78
+ 'watchChange',
79
+ 'resolveDynamicImport',
80
+ 'resolveId',
81
+ 'shouldTransformCachedModule',
82
+ 'transform',
83
+ 'onLog'
84
+ ];
85
+
86
+ exports.ENV_PUBLIC_PATH = ENV_PUBLIC_PATH;
87
+ exports.METADATA_FILENAME = METADATA_FILENAME;
88
+ exports.ROLLUP_HOOKS = ROLLUP_HOOKS;
@@ -0,0 +1,82 @@
1
+ /*!
2
+ * alphaTab Vite Plugin v1.7.1 (, build 24)
3
+ *
4
+ * Copyright © 2025, 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/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/constants.ts#L143
39
+ /**
40
+ * @internal
41
+ */
42
+ const METADATA_FILENAME = '_metadata.json';
43
+ // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/constants.ts#L63#
44
+ /**
45
+ * @internal
46
+ */
47
+ const ENV_PUBLIC_PATH = '/@vite/env';
48
+ // https://github.com/vitejs/vite/blob/v6.1.1/packages/vite/src/node/constants.ts#L10C1-L38C32
49
+ /**
50
+ * @internal
51
+ */
52
+ const ROLLUP_HOOKS = [
53
+ 'options',
54
+ 'buildStart',
55
+ 'buildEnd',
56
+ 'renderStart',
57
+ 'renderError',
58
+ 'renderChunk',
59
+ 'writeBundle',
60
+ 'generateBundle',
61
+ 'banner',
62
+ 'footer',
63
+ 'augmentChunkHash',
64
+ 'outputOptions',
65
+ 'renderDynamicImport',
66
+ 'resolveFileUrl',
67
+ 'resolveImportMeta',
68
+ 'intro',
69
+ 'outro',
70
+ 'closeBundle',
71
+ 'closeWatcher',
72
+ 'load',
73
+ 'moduleParsed',
74
+ 'watchChange',
75
+ 'resolveDynamicImport',
76
+ 'resolveId',
77
+ 'shouldTransformCachedModule',
78
+ 'transform',
79
+ 'onLog'
80
+ ];
81
+
82
+ export { ENV_PUBLIC_PATH, METADATA_FILENAME, ROLLUP_HOOKS };
@@ -0,0 +1,60 @@
1
+ /*!
2
+ * alphaTab Vite Plugin v1.7.1 (, build 24)
3
+ *
4
+ * Copyright © 2025, 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 fs = require('node:fs');
42
+ const bridge_utils = require('./utils.cjs');
43
+
44
+ // index.ts for more details on contents and license of this file
45
+ // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/fsUtils.ts#L388
46
+ /**
47
+ * @internal
48
+ */
49
+ function tryResolveRealFile(file, preserveSymlinks) {
50
+ const fileStat = bridge_utils.tryStatSync(file);
51
+ if (fileStat?.isFile()) {
52
+ return file;
53
+ }
54
+ if (fileStat?.isSymbolicLink()) {
55
+ return preserveSymlinks ? file : fs.realpathSync(file);
56
+ }
57
+ return undefined;
58
+ }
59
+
60
+ exports.tryResolveRealFile = tryResolveRealFile;
@@ -0,0 +1,56 @@
1
+ /*!
2
+ * alphaTab Vite Plugin v1.7.1 (, build 24)
3
+ *
4
+ * Copyright © 2025, 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 { tryStatSync } from './utils.mjs';
39
+
40
+ // index.ts for more details on contents and license of this file
41
+ // https://github.com/vitejs/vite/blob/b7ddfae5f852c2948fab03e94751ce56f5f31ce0/packages/vite/src/node/fsUtils.ts#L388
42
+ /**
43
+ * @internal
44
+ */
45
+ function tryResolveRealFile(file, preserveSymlinks) {
46
+ const fileStat = tryStatSync(file);
47
+ if (fileStat?.isFile()) {
48
+ return file;
49
+ }
50
+ if (fileStat?.isSymbolicLink()) {
51
+ return preserveSymlinks ? file : fs.realpathSync(file);
52
+ }
53
+ return undefined;
54
+ }
55
+
56
+ export { tryResolveRealFile };
@@ -0,0 +1,69 @@
1
+ /*!
2
+ * alphaTab Vite Plugin v1.7.1 (, build 24)
3
+ *
4
+ * Copyright © 2025, 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 bridge_asset = require('./asset.cjs');
42
+ const bridge_build = require('./build.cjs');
43
+ const bridge_constants = require('./constants.cjs');
44
+ const bridge_optimizer = require('./optimizer.cjs');
45
+ const bridge_resolve = require('./resolve.cjs');
46
+ const bridge_utils = require('./utils.cjs');
47
+ const bridge_worker = require('./worker.cjs');
48
+
49
+
50
+
51
+ exports.fileToUrl = bridge_asset.fileToUrl;
52
+ exports.createToImportMetaURLBasedRelativeRuntime = bridge_build.createToImportMetaURLBasedRelativeRuntime;
53
+ exports.toOutputFilePathInJS = bridge_build.toOutputFilePathInJS;
54
+ exports.ENV_PUBLIC_PATH = bridge_constants.ENV_PUBLIC_PATH;
55
+ exports.tryOptimizedDepResolve = bridge_optimizer.tryOptimizedDepResolve;
56
+ exports.tryFsResolve = bridge_resolve.tryFsResolve;
57
+ exports.cleanUrl = bridge_utils.cleanUrl;
58
+ exports.encodeURIPath = bridge_utils.encodeURIPath;
59
+ exports.evalValue = bridge_utils.evalValue;
60
+ exports.injectQuery = bridge_utils.injectQuery;
61
+ Object.defineProperty(exports, "AlphaTabWorkerTypes", {
62
+ enumerable: true,
63
+ get: () => bridge_worker.AlphaTabWorkerTypes
64
+ });
65
+ exports.WORKER_ASSET_ID = bridge_worker.WORKER_ASSET_ID;
66
+ exports.WORKER_FILE_ID = bridge_worker.WORKER_FILE_ID;
67
+ exports.isSameContent = bridge_worker.isSameContent;
68
+ exports.workerCache = bridge_worker.workerCache;
69
+ exports.workerFileToUrl = bridge_worker.workerFileToUrl;