unplugin-typegpu 0.11.2 → 0.11.4

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 (70) hide show
  1. package/{babel-C8UzthFd.d.cts → babel-CXwXwwOE.d.ts} +2 -1
  2. package/{babel-B-IcpMR7.cjs → babel-D-TCImIi.cjs} +20 -18
  3. package/{babel-CbManzjz.js → babel-dNT1_5hS.js} +2 -1
  4. package/{babel-CmCnq-43.d.ts → babel-mqeTZT8y.d.cts} +2 -1
  5. package/babel.cjs +2 -2
  6. package/babel.d.cts +2 -2
  7. package/babel.d.ts +2 -2
  8. package/babel.js +2 -2
  9. package/{bun-ovScJ4Es.d.ts → bun-C6usJAus.d.ts} +1 -1
  10. package/bun-DY6XE5xi.js +33 -0
  11. package/{bun-cwXs2EDP.d.cts → bun-Df2nJEmj.d.cts} +1 -1
  12. package/bun-o6QmlVaS.cjs +39 -0
  13. package/bun.cjs +3 -2
  14. package/bun.d.cts +2 -2
  15. package/bun.d.ts +2 -2
  16. package/bun.js +3 -2
  17. package/{common-CElmMmuq.js → common-B8nnr-Iq.js} +2 -7
  18. package/{common-BlvLUwEz.d.ts → common-BLW8Fy4P.d.ts} +2 -2
  19. package/{common-DZ2cLtbe.d.cts → common-BaikgpzR.d.cts} +1 -1
  20. package/{common-B8wsLJUq.cjs → common-DPfAcXic.cjs} +2 -13
  21. package/esbuild.cjs +6 -4
  22. package/esbuild.d.cts +5 -4
  23. package/esbuild.d.ts +5 -4
  24. package/esbuild.js +6 -4
  25. package/factory-B0CnGO9P.cjs +208 -0
  26. package/{bun-CDECNeIU.js → factory-CnVNvO57.js} +109 -48
  27. package/farm.cjs +6 -4
  28. package/farm.d.cts +5 -4
  29. package/farm.d.ts +5 -4
  30. package/farm.js +6 -4
  31. package/index-Dq70sYN7.d.cts +15 -0
  32. package/index-rnHwqPEN.d.ts +15 -0
  33. package/index.cjs +7 -5
  34. package/index.d.cts +5 -4
  35. package/index.d.ts +5 -4
  36. package/index.js +6 -4
  37. package/package.json +3 -3
  38. package/rolldown-browser-BzaTpeZq.cjs +12 -0
  39. package/rolldown-browser-C8OHaYCP.d.ts +40 -0
  40. package/rolldown-browser-D0pxy7TZ.js +7 -0
  41. package/rolldown-browser-XXZriqjg.d.cts +40 -0
  42. package/rolldown-browser.cjs +6 -0
  43. package/rolldown-browser.d.cts +3 -0
  44. package/rolldown-browser.d.ts +3 -0
  45. package/rolldown-browser.js +5 -0
  46. package/rolldown.cjs +6 -4
  47. package/rolldown.d.cts +5 -4
  48. package/rolldown.d.ts +5 -4
  49. package/rolldown.js +6 -4
  50. package/rollup.cjs +6 -4
  51. package/rollup.d.cts +5 -4
  52. package/rollup.d.ts +5 -4
  53. package/rollup.js +6 -4
  54. package/rspack.cjs +6 -4
  55. package/rspack.d.cts +5 -4
  56. package/rspack.d.ts +5 -4
  57. package/rspack.js +6 -4
  58. package/{src-CDZ6lHsg.cjs → src-BljgtpqS.cjs} +3 -13
  59. package/{src-D84rmPxv.js → src-DZP2_1Gn.js} +2 -6
  60. package/vite.cjs +6 -4
  61. package/vite.d.cts +5 -4
  62. package/vite.d.ts +5 -4
  63. package/vite.js +6 -4
  64. package/webpack.cjs +6 -4
  65. package/webpack.d.cts +5 -4
  66. package/webpack.d.ts +5 -4
  67. package/webpack.js +6 -4
  68. package/bun-DU5xZoDJ.cjs +0 -152
  69. package/index-COIv1oYx.d.cts +0 -48
  70. package/index-PPreQbn5.d.ts +0 -48
package/rspack.cjs CHANGED
@@ -1,8 +1,10 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- require('./common-B8wsLJUq.cjs');
3
- require('./babel-B-IcpMR7.cjs');
4
- require('./bun-DU5xZoDJ.cjs');
5
- const require_src = require('./src-CDZ6lHsg.cjs');
2
+ require('./common-DPfAcXic.cjs');
3
+ require('./babel-D-TCImIi.cjs');
4
+ require('./factory-B0CnGO9P.cjs');
5
+ require('./bun-o6QmlVaS.cjs');
6
+ require('./rolldown-browser-BzaTpeZq.cjs');
7
+ const require_src = require('./src-BljgtpqS.cjs');
6
8
 
7
9
  //#region src/rspack.ts
8
10
  var rspack_default = require_src.rspackPlugin;
package/rspack.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import "./common-DZ2cLtbe.cjs";
2
- import "./babel-C8UzthFd.cjs";
3
- import "./bun-cwXs2EDP.cjs";
4
- import { a as rspackPlugin } from "./index-COIv1oYx.cjs";
1
+ import "./common-BaikgpzR.cjs";
2
+ import "./babel-mqeTZT8y.cjs";
3
+ import "./bun-Df2nJEmj.cjs";
4
+ import "./rolldown-browser-XXZriqjg.cjs";
5
+ import { a as rspackPlugin } from "./index-Dq70sYN7.cjs";
5
6
  export = rspackPlugin;
package/rspack.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import "./common-BlvLUwEz.js";
2
- import "./babel-CmCnq-43.js";
3
- import "./bun-ovScJ4Es.js";
4
- import { a as rspackPlugin } from "./index-PPreQbn5.js";
1
+ import "./common-BLW8Fy4P.js";
2
+ import "./babel-CXwXwwOE.js";
3
+ import "./bun-C6usJAus.js";
4
+ import "./rolldown-browser-C8OHaYCP.js";
5
+ import { a as rspackPlugin } from "./index-rnHwqPEN.js";
5
6
  export { rspackPlugin as default };
package/rspack.js CHANGED
@@ -1,7 +1,9 @@
1
- import "./common-CElmMmuq.js";
2
- import "./babel-CbManzjz.js";
3
- import "./bun-CDECNeIU.js";
4
- import { a as rspackPlugin } from "./src-D84rmPxv.js";
1
+ import "./common-B8nnr-Iq.js";
2
+ import "./babel-dNT1_5hS.js";
3
+ import "./factory-CnVNvO57.js";
4
+ import "./bun-DY6XE5xi.js";
5
+ import "./rolldown-browser-D0pxy7TZ.js";
6
+ import { a as rspackPlugin } from "./src-DZP2_1Gn.js";
5
7
 
6
8
  //#region src/rspack.ts
7
9
  var rspack_default = rspackPlugin;
@@ -1,14 +1,10 @@
1
- const require_common = require('./common-B8wsLJUq.cjs');
2
- const require_bun = require('./bun-DU5xZoDJ.cjs');
1
+ const require_common = require('./common-DPfAcXic.cjs');
2
+ const require_factory = require('./factory-B0CnGO9P.cjs');
3
3
  let unplugin = require("unplugin");
4
4
  unplugin = require_common.__toESM(unplugin);
5
5
 
6
- //#region src/rolldown-browser.ts
7
- var rolldown_browser_default = (options) => require_bun.unpluginFactory(options !== null && options !== void 0 ? options : {}, { framework: "rolldown" });
8
-
9
- //#endregion
10
6
  //#region src/index.ts
11
- const typegpu = /* @__PURE__ */ (0, unplugin.createUnplugin)(require_bun.unpluginFactory);
7
+ const typegpu = /* @__PURE__ */ (0, unplugin.createUnplugin)(require_factory.unpluginFactory);
12
8
  var src_default = typegpu;
13
9
  const vitePlugin = typegpu.vite;
14
10
  const rollupPlugin = typegpu.rollup;
@@ -38,12 +34,6 @@ Object.defineProperty(exports, 'rolldownPlugin', {
38
34
  return rolldownPlugin;
39
35
  }
40
36
  });
41
- Object.defineProperty(exports, 'rolldown_browser_default', {
42
- enumerable: true,
43
- get: function () {
44
- return rolldown_browser_default;
45
- }
46
- });
47
37
  Object.defineProperty(exports, 'rollupPlugin', {
48
38
  enumerable: true,
49
39
  get: function () {
@@ -1,10 +1,6 @@
1
- import { n as unpluginFactory } from "./bun-CDECNeIU.js";
1
+ import { t as unpluginFactory } from "./factory-CnVNvO57.js";
2
2
  import { createUnplugin } from "unplugin";
3
3
 
4
- //#region src/rolldown-browser.ts
5
- var rolldown_browser_default = (options) => unpluginFactory(options !== null && options !== void 0 ? options : {}, { framework: "rolldown" });
6
-
7
- //#endregion
8
4
  //#region src/index.ts
9
5
  const typegpu = /* @__PURE__ */ createUnplugin(unpluginFactory);
10
6
  var src_default = typegpu;
@@ -18,4 +14,4 @@ const farmPlugin = typegpu.farm;
18
14
  const unloaderPlugin = typegpu.unloader;
19
15
 
20
16
  //#endregion
21
- export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, src_default as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t, rolldown_browser_default as u };
17
+ export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, src_default as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t };
package/vite.cjs CHANGED
@@ -1,8 +1,10 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- require('./common-B8wsLJUq.cjs');
3
- require('./babel-B-IcpMR7.cjs');
4
- require('./bun-DU5xZoDJ.cjs');
5
- const require_src = require('./src-CDZ6lHsg.cjs');
2
+ require('./common-DPfAcXic.cjs');
3
+ require('./babel-D-TCImIi.cjs');
4
+ require('./factory-B0CnGO9P.cjs');
5
+ require('./bun-o6QmlVaS.cjs');
6
+ require('./rolldown-browser-BzaTpeZq.cjs');
7
+ const require_src = require('./src-BljgtpqS.cjs');
6
8
 
7
9
  //#region src/vite.ts
8
10
  var vite_default = require_src.vitePlugin;
package/vite.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import "./common-DZ2cLtbe.cjs";
2
- import "./babel-C8UzthFd.cjs";
3
- import "./bun-cwXs2EDP.cjs";
4
- import { c as vitePlugin } from "./index-COIv1oYx.cjs";
1
+ import "./common-BaikgpzR.cjs";
2
+ import "./babel-mqeTZT8y.cjs";
3
+ import "./bun-Df2nJEmj.cjs";
4
+ import "./rolldown-browser-XXZriqjg.cjs";
5
+ import { c as vitePlugin } from "./index-Dq70sYN7.cjs";
5
6
  export = vitePlugin;
package/vite.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import "./common-BlvLUwEz.js";
2
- import "./babel-CmCnq-43.js";
3
- import "./bun-ovScJ4Es.js";
4
- import { c as vitePlugin } from "./index-PPreQbn5.js";
1
+ import "./common-BLW8Fy4P.js";
2
+ import "./babel-CXwXwwOE.js";
3
+ import "./bun-C6usJAus.js";
4
+ import "./rolldown-browser-C8OHaYCP.js";
5
+ import { c as vitePlugin } from "./index-rnHwqPEN.js";
5
6
  export { vitePlugin as default };
package/vite.js CHANGED
@@ -1,7 +1,9 @@
1
- import "./common-CElmMmuq.js";
2
- import "./babel-CbManzjz.js";
3
- import "./bun-CDECNeIU.js";
4
- import { c as vitePlugin } from "./src-D84rmPxv.js";
1
+ import "./common-B8nnr-Iq.js";
2
+ import "./babel-dNT1_5hS.js";
3
+ import "./factory-CnVNvO57.js";
4
+ import "./bun-DY6XE5xi.js";
5
+ import "./rolldown-browser-D0pxy7TZ.js";
6
+ import { c as vitePlugin } from "./src-DZP2_1Gn.js";
5
7
 
6
8
  //#region src/vite.ts
7
9
  var vite_default = vitePlugin;
package/webpack.cjs CHANGED
@@ -1,8 +1,10 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- require('./common-B8wsLJUq.cjs');
3
- require('./babel-B-IcpMR7.cjs');
4
- require('./bun-DU5xZoDJ.cjs');
5
- const require_src = require('./src-CDZ6lHsg.cjs');
2
+ require('./common-DPfAcXic.cjs');
3
+ require('./babel-D-TCImIi.cjs');
4
+ require('./factory-B0CnGO9P.cjs');
5
+ require('./bun-o6QmlVaS.cjs');
6
+ require('./rolldown-browser-BzaTpeZq.cjs');
7
+ const require_src = require('./src-BljgtpqS.cjs');
6
8
 
7
9
  //#region src/webpack.ts
8
10
  var webpack_default = require_src.webpackPlugin;
package/webpack.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import "./common-DZ2cLtbe.cjs";
2
- import "./babel-C8UzthFd.cjs";
3
- import "./bun-cwXs2EDP.cjs";
4
- import { l as webpackPlugin } from "./index-COIv1oYx.cjs";
1
+ import "./common-BaikgpzR.cjs";
2
+ import "./babel-mqeTZT8y.cjs";
3
+ import "./bun-Df2nJEmj.cjs";
4
+ import "./rolldown-browser-XXZriqjg.cjs";
5
+ import { l as webpackPlugin } from "./index-Dq70sYN7.cjs";
5
6
  export = webpackPlugin;
package/webpack.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import "./common-BlvLUwEz.js";
2
- import "./babel-CmCnq-43.js";
3
- import "./bun-ovScJ4Es.js";
4
- import { l as webpackPlugin } from "./index-PPreQbn5.js";
1
+ import "./common-BLW8Fy4P.js";
2
+ import "./babel-CXwXwwOE.js";
3
+ import "./bun-C6usJAus.js";
4
+ import "./rolldown-browser-C8OHaYCP.js";
5
+ import { l as webpackPlugin } from "./index-rnHwqPEN.js";
5
6
  export { webpackPlugin as default };
package/webpack.js CHANGED
@@ -1,7 +1,9 @@
1
- import "./common-CElmMmuq.js";
2
- import "./babel-CbManzjz.js";
3
- import "./bun-CDECNeIU.js";
4
- import { l as webpackPlugin } from "./src-D84rmPxv.js";
1
+ import "./common-B8nnr-Iq.js";
2
+ import "./babel-dNT1_5hS.js";
3
+ import "./factory-CnVNvO57.js";
4
+ import "./bun-DY6XE5xi.js";
5
+ import "./rolldown-browser-D0pxy7TZ.js";
6
+ import { l as webpackPlugin } from "./src-DZP2_1Gn.js";
5
7
 
6
8
  //#region src/webpack.ts
7
9
  var webpack_default = webpackPlugin;
package/bun-DU5xZoDJ.cjs DELETED
@@ -1,152 +0,0 @@
1
- const require_common = require('./common-B8wsLJUq.cjs');
2
- let defu = require("defu");
3
- defu = require_common.__toESM(defu);
4
- let tinyest_for_wgsl = require("tinyest-for-wgsl");
5
- tinyest_for_wgsl = require_common.__toESM(tinyest_for_wgsl);
6
- let tinyest = require("tinyest");
7
- tinyest = require_common.__toESM(tinyest);
8
- let magic_string_ast = require("magic-string-ast");
9
- magic_string_ast = require_common.__toESM(magic_string_ast);
10
- let ast_kit = require("ast-kit");
11
- ast_kit = require_common.__toESM(ast_kit);
12
- let __babel_traverse = require("@babel/traverse");
13
- __babel_traverse = require_common.__toESM(__babel_traverse);
14
- let __babel_parser = require("@babel/parser");
15
- __babel_parser = require_common.__toESM(__babel_parser);
16
-
17
- //#region src/core/factory.ts
18
- let traverse = __babel_traverse.default;
19
- if (typeof traverse.default === "function") traverse = traverse.default;
20
- const fnWrapperTemplate = (fnCode, metadata) => `(/*#__PURE__*/($ => (globalThis.__TYPEGPU_META__ ??= new WeakMap()).set($.f = (${fnCode}), ${metadata}) && $.f)({}))`;
21
- function embedJSON(jsValue) {
22
- return JSON.stringify(jsValue).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
23
- }
24
- function assignMetadata(path, name, ast) {
25
- var _path$node$start, _path$node$start2;
26
- const metadata = `{
27
- v: ${tinyest.FORMAT_VERSION},
28
- name: ${name ? `"${name}"` : "undefined"},
29
- ast: ${embedJSON(ast)},
30
- externals: () => ({${ast.externalNames.map((e) => e === "this" ? "\"this\": this" : e).join(", ")}}),
31
- }`;
32
- const visibility = require_common.t.isFunctionDeclaration(path.node) ? require_common.getBlockScope(path) : void 0;
33
- const fnCode = this.magicString.sliceNode(path.node);
34
- let nodeToOverride = path.node;
35
- let code = fnWrapperTemplate(fnCode, metadata);
36
- let insertPos = (_path$node$start = path.node.start) !== null && _path$node$start !== void 0 ? _path$node$start : 0;
37
- if (require_common.t.isFunctionDeclaration(path.node) && path.node.id) code = `const ${path.node.id.name} = ${code};\n\n`;
38
- if (visibility) {
39
- var _visibility$node$body, _visibility$node$body2;
40
- insertPos = (_visibility$node$body = (_visibility$node$body2 = visibility.node.body[0]) === null || _visibility$node$body2 === void 0 ? void 0 : _visibility$node$body2.start) !== null && _visibility$node$body !== void 0 ? _visibility$node$body : insertPos;
41
- if (require_common.t.isExportNamedDeclaration(path.parent)) {
42
- nodeToOverride = path.parent;
43
- code = `export ${code}`;
44
- }
45
- }
46
- if (insertPos < ((_path$node$start2 = path.node.start) !== null && _path$node$start2 !== void 0 ? _path$node$start2 : 0)) {
47
- var _nodeToOverride$leadi, _nodeToOverride$leadi2;
48
- for (const comment of (_nodeToOverride$leadi = (_nodeToOverride$leadi2 = nodeToOverride.leadingComments) === null || _nodeToOverride$leadi2 === void 0 ? void 0 : _nodeToOverride$leadi2.toReversed()) !== null && _nodeToOverride$leadi !== void 0 ? _nodeToOverride$leadi : []) {
49
- var _comment$start, _comment$end;
50
- code = `${this.magicString.slice((_comment$start = comment.start) !== null && _comment$start !== void 0 ? _comment$start : 0, (_comment$end = comment.end) !== null && _comment$end !== void 0 ? _comment$end : 0)}\n${code}`;
51
- this.magicString.removeNode(comment);
52
- }
53
- this.magicString.removeNode(nodeToOverride);
54
- this.magicString.prependLeft(insertPos, code);
55
- } else this.magicString.overwriteNode(nodeToOverride, code);
56
- }
57
- function wrapInAutoName(path, name) {
58
- var _path$node$start3, _path$node$end;
59
- this.magicString.appendLeft((_path$node$start3 = path.node.start) !== null && _path$node$start3 !== void 0 ? _path$node$start3 : 0, "(/*#__PURE__*/(globalThis.__TYPEGPU_AUTONAME__ ?? (a => a))(").prependRight((_path$node$end = path.node.end) !== null && _path$node$end !== void 0 ? _path$node$end : 0, `, "${name}"))`);
60
- }
61
- function replaceWithAssignmentOverload(path, runtimeFn) {
62
- const lhs = this.magicString.sliceNode(path.node.left);
63
- const rhs = this.magicString.sliceNode(path.node.right);
64
- this.magicString.overwriteNode(path.node, `${lhs} = ${runtimeFn}(${lhs}, ${rhs})`);
65
- }
66
- function replaceWithBinaryOverload(path, runtimeFn) {
67
- const lhs = this.magicString.sliceNode(path.node.left);
68
- const rhs = this.magicString.sliceNode(path.node.right);
69
- this.magicString.overwriteNode(path.node, `${runtimeFn}(${lhs}, ${rhs})`);
70
- }
71
- const unpluginFactory = ((rawOptions, _meta) => {
72
- const options = (0, defu.default)(rawOptions, require_common.defaultOptions);
73
- return {
74
- name: "unplugin-typegpu",
75
- enforce: options.enforce,
76
- transform: {
77
- filter: options.earlyPruning ? {
78
- id: options,
79
- code: require_common.earlyPruneRegex
80
- } : { id: options },
81
- handler(code, id) {
82
- let ast;
83
- try {
84
- ast = __babel_parser.parse(code, (0, ast_kit.getBabelParserOptions)((0, ast_kit.getLang)(id), {
85
- sourceType: "module",
86
- allowReturnOutsideFunction: true
87
- }));
88
- } catch (cause) {
89
- console.warn(`[unplugin-typegpu] Failed to parse ${id}. Cause: ${typeof cause === "object" && cause && "message" in cause ? cause.message : cause}`);
90
- return;
91
- }
92
- const magicString = new magic_string_ast.MagicStringAST(code);
93
- const state = {
94
- filename: id,
95
- magicString,
96
- opts: options
97
- };
98
- require_common.initPluginState(state, {
99
- warn: (message) => this.warn(message),
100
- assignMetadata,
101
- wrapInAutoName,
102
- replaceWithAssignmentOverload,
103
- replaceWithBinaryOverload
104
- });
105
- traverse(ast, require_common.functionVisitor, void 0, state);
106
- return (0, magic_string_ast.generateTransform)(magicString, id);
107
- }
108
- }
109
- };
110
- });
111
-
112
- //#endregion
113
- //#region src/bun.ts
114
- var bun_default = (rawOptions) => {
115
- const options = (0, defu.default)(rawOptions, require_common.defaultOptions);
116
- const include = options.include;
117
- if (!(include instanceof RegExp)) throw new Error(`Unsupported 'include' options in Bun plugin. Please provide a single regular expression`);
118
- if (options.exclude) throw new Error(`Unsupported 'exclude' option in Bun plugin`);
119
- const rawPlugin = unpluginFactory(rawOptions, { framework: "bun" });
120
- return {
121
- name: "unplugin-typegpu",
122
- setup(build) {
123
- build.onLoad({ filter: include }, async (args) => {
124
- var _result$code;
125
- const codeIn = await Bun.file(args.path).text();
126
- if (require_common.earlyPruneRegex.every((pattern) => !pattern.test(codeIn))) return {
127
- contents: codeIn,
128
- loader: args.loader
129
- };
130
- const result = rawPlugin.transform.handler.apply({}, [codeIn, args.path]);
131
- return {
132
- contents: (_result$code = result === null || result === void 0 ? void 0 : result.code) !== null && _result$code !== void 0 ? _result$code : codeIn,
133
- loader: args.loader
134
- };
135
- });
136
- }
137
- };
138
- };
139
-
140
- //#endregion
141
- Object.defineProperty(exports, 'bun_default', {
142
- enumerable: true,
143
- get: function () {
144
- return bun_default;
145
- }
146
- });
147
- Object.defineProperty(exports, 'unpluginFactory', {
148
- enumerable: true,
149
- get: function () {
150
- return unpluginFactory;
151
- }
152
- });
@@ -1,48 +0,0 @@
1
- import { t as Options } from "./common-DZ2cLtbe.cjs";
2
- import * as unplugin8 from "unplugin";
3
- import * as magic_string_ast0 from "magic-string-ast";
4
-
5
- //#region src/rolldown-browser.d.ts
6
- declare const _default$1: (options?: Options) => {
7
- name: "unplugin-typegpu";
8
- enforce: "post" | "pre" | undefined;
9
- transform: {
10
- filter: {
11
- id: Omit<Options, "include" | "autoNamingEnabled" | "earlyPruning"> & Omit<{
12
- include: RegExp;
13
- autoNamingEnabled: boolean;
14
- earlyPruning: boolean;
15
- }, "include" | "autoNamingEnabled" | "earlyPruning"> & {
16
- include: string | RegExp | unplugin8.StringOrRegExp[];
17
- autoNamingEnabled: boolean;
18
- earlyPruning: boolean;
19
- };
20
- code: RegExp[];
21
- } | {
22
- id: Omit<Options, "include" | "autoNamingEnabled" | "earlyPruning"> & Omit<{
23
- include: RegExp;
24
- autoNamingEnabled: boolean;
25
- earlyPruning: boolean;
26
- }, "include" | "autoNamingEnabled" | "earlyPruning"> & {
27
- include: string | RegExp | unplugin8.StringOrRegExp[];
28
- autoNamingEnabled: boolean;
29
- earlyPruning: boolean;
30
- };
31
- code?: never;
32
- };
33
- handler(this: unplugin8.UnpluginBuildContext & unplugin8.UnpluginContext, code: string, id: string): magic_string_ast0.CodeTransform | undefined;
34
- };
35
- };
36
- //#endregion
37
- //#region src/index.d.ts
38
- declare const typegpu: unplugin8.UnpluginInstance<Options | undefined, boolean>;
39
- declare const vitePlugin: (options?: Options | undefined) => unplugin8.VitePlugin<any> | unplugin8.VitePlugin<any>[];
40
- declare const rollupPlugin: (options?: Options | undefined) => unplugin8.RollupPlugin<any> | unplugin8.RollupPlugin<any>[];
41
- declare const rolldownPlugin: (options?: Options | undefined) => unplugin8.RolldownPlugin<any> | unplugin8.RolldownPlugin<any>[];
42
- declare const webpackPlugin: (options?: Options | undefined) => unplugin8.WebpackPluginInstance;
43
- declare const rspackPlugin: (options?: Options | undefined) => RspackPluginInstance;
44
- declare const esbuildPlugin: (options?: Options | undefined) => unplugin8.EsbuildPlugin;
45
- declare const farmPlugin: (options?: Options | undefined) => JsPlugin;
46
- declare const unloaderPlugin: (options?: Options | undefined) => any;
47
- //#endregion
48
- export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, typegpu as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t, _default$1 as u };
@@ -1,48 +0,0 @@
1
- import { t as Options } from "./common-BlvLUwEz.js";
2
- import * as magic_string_ast0 from "magic-string-ast";
3
- import * as unplugin8 from "unplugin";
4
-
5
- //#region src/rolldown-browser.d.ts
6
- declare const _default$1: (options?: Options) => {
7
- name: "unplugin-typegpu";
8
- enforce: "post" | "pre" | undefined;
9
- transform: {
10
- filter: {
11
- id: Omit<Options, "include" | "autoNamingEnabled" | "earlyPruning"> & Omit<{
12
- include: RegExp;
13
- autoNamingEnabled: boolean;
14
- earlyPruning: boolean;
15
- }, "include" | "autoNamingEnabled" | "earlyPruning"> & {
16
- include: string | RegExp | unplugin8.StringOrRegExp[];
17
- autoNamingEnabled: boolean;
18
- earlyPruning: boolean;
19
- };
20
- code: RegExp[];
21
- } | {
22
- id: Omit<Options, "include" | "autoNamingEnabled" | "earlyPruning"> & Omit<{
23
- include: RegExp;
24
- autoNamingEnabled: boolean;
25
- earlyPruning: boolean;
26
- }, "include" | "autoNamingEnabled" | "earlyPruning"> & {
27
- include: string | RegExp | unplugin8.StringOrRegExp[];
28
- autoNamingEnabled: boolean;
29
- earlyPruning: boolean;
30
- };
31
- code?: never;
32
- };
33
- handler(this: unplugin8.UnpluginBuildContext & unplugin8.UnpluginContext, code: string, id: string): magic_string_ast0.CodeTransform | undefined;
34
- };
35
- };
36
- //#endregion
37
- //#region src/index.d.ts
38
- declare const typegpu: unplugin8.UnpluginInstance<Options | undefined, boolean>;
39
- declare const vitePlugin: (options?: Options | undefined) => unplugin8.VitePlugin<any> | unplugin8.VitePlugin<any>[];
40
- declare const rollupPlugin: (options?: Options | undefined) => unplugin8.RollupPlugin<any> | unplugin8.RollupPlugin<any>[];
41
- declare const rolldownPlugin: (options?: Options | undefined) => unplugin8.RolldownPlugin<any> | unplugin8.RolldownPlugin<any>[];
42
- declare const webpackPlugin: (options?: Options | undefined) => unplugin8.WebpackPluginInstance;
43
- declare const rspackPlugin: (options?: Options | undefined) => RspackPluginInstance;
44
- declare const esbuildPlugin: (options?: Options | undefined) => unplugin8.EsbuildPlugin;
45
- declare const farmPlugin: (options?: Options | undefined) => JsPlugin;
46
- declare const unloaderPlugin: (options?: Options | undefined) => any;
47
- //#endregion
48
- export { rspackPlugin as a, vitePlugin as c, rollupPlugin as i, webpackPlugin as l, farmPlugin as n, typegpu as o, rolldownPlugin as r, unloaderPlugin as s, esbuildPlugin as t, _default$1 as u };