@kitschpatrol/unplugin-tldraw 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +50 -0
- package/dist/api.js +2 -0
- package/dist/bun.d.ts +12 -0
- package/dist/bun.js +5 -0
- package/dist/client.d.ts +17 -0
- package/dist/esbuild.d.ts +21 -0
- package/dist/esbuild.js +20 -0
- package/dist/farm.d.ts +23 -0
- package/dist/farm.js +22 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +34 -0
- package/dist/nuxt.d.ts +17 -0
- package/dist/nuxt.js +30 -0
- package/dist/options-OhkbiFS8.d.ts +61 -0
- package/dist/rolldown.d.ts +23 -0
- package/dist/rolldown.js +22 -0
- package/dist/rollup.d.ts +23 -0
- package/dist/rollup.js +22 -0
- package/dist/rspack.d.ts +22 -0
- package/dist/rspack.js +22 -0
- package/dist/tldraw-ZdwazU9j.js +309 -0
- package/dist/vite.d.ts +23 -0
- package/dist/vite.js +22 -0
- package/dist/webpack.d.ts +23 -0
- package/dist/webpack.js +22 -0
- package/license.txt +21 -0
- package/package.json +148 -0
- package/readme.md +436 -0
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { n as Options, r as resolveOptions, t as ImportOverrides } from "./options-OhkbiFS8.js";
|
|
2
|
+
|
|
3
|
+
//#region src/core/tldraw.d.ts
|
|
4
|
+
declare class TldrawExport {
|
|
5
|
+
/**
|
|
6
|
+
* Pattern matching `.tldr` file imports. The `resolveId` hook filters on
|
|
7
|
+
* this.
|
|
8
|
+
*/
|
|
9
|
+
get identifierPattern(): RegExp;
|
|
10
|
+
private readonly convertLimit;
|
|
11
|
+
private readonly options;
|
|
12
|
+
private readonly pathsSeen;
|
|
13
|
+
private readonly pendingRequests;
|
|
14
|
+
private persistentCacheDirty;
|
|
15
|
+
private readonly resolvedCache;
|
|
16
|
+
private get cacheFilePath();
|
|
17
|
+
constructor(options?: Options);
|
|
18
|
+
/**
|
|
19
|
+
* Converts a `.tldr` file to an image and returns the absolute path of the
|
|
20
|
+
* cached image. Uses caching, request deduplication, and concurrency
|
|
21
|
+
* limiting.
|
|
22
|
+
*
|
|
23
|
+
* @param tldrPath - Absolute or relative path to the `.tldr` file.
|
|
24
|
+
* @param overrides - Per-import option overrides (from query params).
|
|
25
|
+
*/
|
|
26
|
+
convert(tldrPath: string, overrides?: ImportOverrides): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Initialize the cache directory and load persistent cache from disk.
|
|
29
|
+
*/
|
|
30
|
+
initialize(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Delete cached files that were not used during this build.
|
|
33
|
+
*/
|
|
34
|
+
pruneCache(): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Persist the in-memory cache to disk.
|
|
37
|
+
*/
|
|
38
|
+
savePersistentCache(): Promise<void>;
|
|
39
|
+
private doConvert;
|
|
40
|
+
private fromRelativeCacheKey;
|
|
41
|
+
/**
|
|
42
|
+
* Checks if a cached result still matches the source file's content hash.
|
|
43
|
+
*/
|
|
44
|
+
private isFileHashCurrent;
|
|
45
|
+
private loadPersistentCache;
|
|
46
|
+
private relativePath;
|
|
47
|
+
private toRelativeCacheKey;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { TldrawExport, resolveOptions };
|
package/dist/api.js
ADDED
package/dist/bun.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { n as Options } from "./options-OhkbiFS8.js";
|
|
2
|
+
import * as _$unplugin from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/bun.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This entry file is for Bun plugin.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
declare const _default: _$unplugin.UnpluginFactory<Options | undefined, boolean>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { _default as default };
|
package/dist/bun.js
ADDED
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare module '*.tldr' {
|
|
2
|
+
const content: string
|
|
3
|
+
export default content
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// Workarounds for https://github.com/microsoft/TypeScript/issues/38638
|
|
7
|
+
// Required when using query params on .tldr imports (e.g. `import x from './sketch.tldr?format=png&tldr'`)
|
|
8
|
+
|
|
9
|
+
declare module '*&tldr' {
|
|
10
|
+
const content: string
|
|
11
|
+
export default content
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*&tldraw' {
|
|
15
|
+
const content: string
|
|
16
|
+
export default content
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { n as Options } from "./options-OhkbiFS8.js";
|
|
2
|
+
import * as _$esbuild from "esbuild";
|
|
3
|
+
|
|
4
|
+
//#region src/esbuild.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This entry file is for esbuild plugin.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Esbuild plugin
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { build } from 'esbuild'
|
|
15
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/esbuild'
|
|
16
|
+
*
|
|
17
|
+
* build({ plugins: [tldraw()] })
|
|
18
|
+
*/
|
|
19
|
+
declare const _default: (options?: Options | undefined) => _$esbuild.Plugin;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { _default as default };
|
package/dist/esbuild.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { unpluginFactory } from "./index.js";
|
|
2
|
+
import { createEsbuildPlugin } from "unplugin";
|
|
3
|
+
//#region src/esbuild.ts
|
|
4
|
+
/**
|
|
5
|
+
* This entry file is for esbuild plugin.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Esbuild plugin
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { build } from 'esbuild'
|
|
14
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/esbuild'
|
|
15
|
+
*
|
|
16
|
+
* build({ plugins: [tldraw()] })
|
|
17
|
+
*/
|
|
18
|
+
var esbuild_default = createEsbuildPlugin(unpluginFactory);
|
|
19
|
+
//#endregion
|
|
20
|
+
export { esbuild_default as default };
|
package/dist/farm.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { n as Options } from "./options-OhkbiFS8.js";
|
|
2
|
+
import * as _$_farmfe_core0 from "@farmfe/core";
|
|
3
|
+
|
|
4
|
+
//#region src/farm.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This entry file is for Farm plugin.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Farm plugin
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // farm.config.js
|
|
15
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/farm'
|
|
16
|
+
*
|
|
17
|
+
* export default {
|
|
18
|
+
* plugins: [tldraw()],
|
|
19
|
+
* }
|
|
20
|
+
*/
|
|
21
|
+
declare const _default: (options?: Options | undefined) => _$_farmfe_core0.JsPlugin;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { _default as default };
|
package/dist/farm.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { unpluginFactory } from "./index.js";
|
|
2
|
+
import { createFarmPlugin } from "unplugin";
|
|
3
|
+
//#region src/farm.ts
|
|
4
|
+
/**
|
|
5
|
+
* This entry file is for Farm plugin.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Farm plugin
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // farm.config.js
|
|
14
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/farm'
|
|
15
|
+
*
|
|
16
|
+
* export default {
|
|
17
|
+
* plugins: [tldraw()],
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
var farm_default = createFarmPlugin(unpluginFactory);
|
|
21
|
+
//#endregion
|
|
22
|
+
export { farm_default as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { n as Options } from "./options-OhkbiFS8.js";
|
|
2
|
+
import * as _$unplugin from "unplugin";
|
|
3
|
+
import { UnpluginFactory } from "unplugin";
|
|
4
|
+
|
|
5
|
+
//#region src/index.d.ts
|
|
6
|
+
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
7
|
+
declare const unplugin: _$unplugin.UnpluginInstance<Options | undefined, boolean>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as parseImportOverrides, t as TldrawExport } from "./tldraw-ZdwazU9j.js";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { createUnplugin } from "unplugin";
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
const unpluginFactory = (options) => {
|
|
6
|
+
const tldrawExport = new TldrawExport(options);
|
|
7
|
+
return {
|
|
8
|
+
async buildEnd() {
|
|
9
|
+
await tldrawExport.savePersistentCache();
|
|
10
|
+
},
|
|
11
|
+
async buildStart() {
|
|
12
|
+
await tldrawExport.initialize();
|
|
13
|
+
},
|
|
14
|
+
enforce: "pre",
|
|
15
|
+
name: "unplugin-tldraw",
|
|
16
|
+
resolveId: {
|
|
17
|
+
filter: { id: tldrawExport.identifierPattern },
|
|
18
|
+
async handler(id, importer) {
|
|
19
|
+
const queryIndex = id.indexOf("?");
|
|
20
|
+
const cleanId = queryIndex === -1 ? id : id.slice(0, queryIndex);
|
|
21
|
+
const queryString = queryIndex === -1 ? "" : id.slice(queryIndex + 1);
|
|
22
|
+
const resolvedPath = importer && (cleanId.startsWith("./") || cleanId.startsWith("../")) ? path.resolve(path.dirname(importer), cleanId) : cleanId;
|
|
23
|
+
const overrides = queryString ? parseImportOverrides(queryString) : void 0;
|
|
24
|
+
return tldrawExport.convert(resolvedPath, overrides);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
async writeBundle() {
|
|
28
|
+
await tldrawExport.pruneCache();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const unplugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
|
|
33
|
+
//#endregion
|
|
34
|
+
export { unplugin as default, unplugin, unpluginFactory };
|
package/dist/nuxt.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { n as Options } from "./options-OhkbiFS8.js";
|
|
2
|
+
import * as _$_nuxt_schema0 from "@nuxt/schema";
|
|
3
|
+
|
|
4
|
+
//#region src/nuxt.d.ts
|
|
5
|
+
type ModuleOptions = Options;
|
|
6
|
+
/**
|
|
7
|
+
* Nuxt module
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // nuxt.config.ts
|
|
11
|
+
* export default defineNuxtConfig({
|
|
12
|
+
* modules: ['@kitschpatrol/unplugin-tldraw/nuxt'],
|
|
13
|
+
* })
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: _$_nuxt_schema0.NuxtModule<Options, Options, false>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ModuleOptions, _default as default };
|
package/dist/nuxt.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import vite_default from "./vite.js";
|
|
2
|
+
import webpack_default from "./webpack.js";
|
|
3
|
+
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
4
|
+
//#region src/nuxt.ts
|
|
5
|
+
/**
|
|
6
|
+
* This entry file is for Nuxt module.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Nuxt module
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // nuxt.config.ts
|
|
15
|
+
* export default defineNuxtConfig({
|
|
16
|
+
* modules: ['@kitschpatrol/unplugin-tldraw/nuxt'],
|
|
17
|
+
* })
|
|
18
|
+
*/
|
|
19
|
+
var nuxt_default = defineNuxtModule({
|
|
20
|
+
meta: {
|
|
21
|
+
configKey: "tldraw",
|
|
22
|
+
name: "@kitschpatrol/unplugin-tldraw"
|
|
23
|
+
},
|
|
24
|
+
setup(options) {
|
|
25
|
+
addVitePlugin(() => vite_default(options));
|
|
26
|
+
addWebpackPlugin(() => webpack_default(options));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
export { nuxt_default as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { TldrawToImageOptions } from "@kitschpatrol/tldraw-cli";
|
|
2
|
+
|
|
3
|
+
//#region src/core/options.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Image conversion options for `.tldr` exports.
|
|
6
|
+
* Subset of `@kitschpatrol/tldraw-cli` options relevant to image output.
|
|
7
|
+
*/
|
|
8
|
+
type TldrawImageOptions = Pick<TldrawToImageOptions, 'dark' | 'format' | 'padding' | 'scale' | 'stripStyle' | 'transparent'>;
|
|
9
|
+
/**
|
|
10
|
+
* Per-import overrides parsed from query params on `.tldr` import paths.
|
|
11
|
+
* Extends TldrawImageOptions with frame/page selection.
|
|
12
|
+
*/
|
|
13
|
+
type ImportOverrides = TldrawImageOptions & {
|
|
14
|
+
/** Export a specific frame by name or ID. */frame?: string; /** Export a specific page by name, ID, or index. */
|
|
15
|
+
page?: string;
|
|
16
|
+
};
|
|
17
|
+
type Options = {
|
|
18
|
+
/**
|
|
19
|
+
* Directory to store converted images.
|
|
20
|
+
* Resolved relative to Vite's `cacheDir` at runtime if not absolute.
|
|
21
|
+
* @default './node_modules/.cache/tldraw'
|
|
22
|
+
*/
|
|
23
|
+
cacheDirectory?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Enable caching of generated image files.
|
|
26
|
+
* Cache keys include a hash of the `.tldr` file content and image options,
|
|
27
|
+
* so cached files are automatically invalidated when the source changes.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
cacheEnabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Default image conversion options for all `.tldr` imports.
|
|
33
|
+
*/
|
|
34
|
+
defaultImageOptions?: TldrawImageOptions;
|
|
35
|
+
/**
|
|
36
|
+
* Maximum number of concurrent `.tldr` conversions.
|
|
37
|
+
* Lower values reduce system load (each conversion spawns a headless browser).
|
|
38
|
+
* @default 2
|
|
39
|
+
*/
|
|
40
|
+
maxConcurrentConversions?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Delete all files in `cacheDirectory` that are not in the converted
|
|
43
|
+
* image set at the end of a full build.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
pruneCacheOnBuild?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Log conversion details and performance information to the console.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
verbose?: boolean;
|
|
52
|
+
};
|
|
53
|
+
type ResolvedOptions = Required<Options> & {
|
|
54
|
+
defaultImageOptions: Required<TldrawImageOptions>;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Resolve and normalize user options.
|
|
58
|
+
*/
|
|
59
|
+
declare function resolveOptions(options?: Options): ResolvedOptions;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Options as n, resolveOptions as r, ImportOverrides as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { n as Options } from "./options-OhkbiFS8.js";
|
|
2
|
+
import * as _$unplugin from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/rolldown.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This entry file is for Rolldown plugin.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Rolldown plugin
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // rolldown.config.js
|
|
15
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/rolldown'
|
|
16
|
+
*
|
|
17
|
+
* export default {
|
|
18
|
+
* plugins: [tldraw()],
|
|
19
|
+
* }
|
|
20
|
+
*/
|
|
21
|
+
declare const _default: (options?: Options | undefined) => _$unplugin.RolldownPlugin<any> | _$unplugin.RolldownPlugin<any>[];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { _default as default };
|
package/dist/rolldown.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { unpluginFactory } from "./index.js";
|
|
2
|
+
import { createRolldownPlugin } from "unplugin";
|
|
3
|
+
//#region src/rolldown.ts
|
|
4
|
+
/**
|
|
5
|
+
* This entry file is for Rolldown plugin.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Rolldown plugin
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // rolldown.config.js
|
|
14
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/rolldown'
|
|
15
|
+
*
|
|
16
|
+
* export default {
|
|
17
|
+
* plugins: [tldraw()],
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
var rolldown_default = createRolldownPlugin(unpluginFactory);
|
|
21
|
+
//#endregion
|
|
22
|
+
export { rolldown_default as default };
|
package/dist/rollup.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { n as Options } from "./options-OhkbiFS8.js";
|
|
2
|
+
import * as _$rollup from "rollup";
|
|
3
|
+
|
|
4
|
+
//#region src/rollup.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This entry file is for Rollup plugin.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Rollup plugin
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // rollup.config.js
|
|
15
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/rollup'
|
|
16
|
+
*
|
|
17
|
+
* export default {
|
|
18
|
+
* plugins: [tldraw()],
|
|
19
|
+
* }
|
|
20
|
+
*/
|
|
21
|
+
declare const _default: (options?: Options | undefined) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
|
|
22
|
+
//#endregion
|
|
23
|
+
export { _default as default };
|
package/dist/rollup.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { unpluginFactory } from "./index.js";
|
|
2
|
+
import { createRollupPlugin } from "unplugin";
|
|
3
|
+
//#region src/rollup.ts
|
|
4
|
+
/**
|
|
5
|
+
* This entry file is for Rollup plugin.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Rollup plugin
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // rollup.config.js
|
|
14
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/rollup'
|
|
15
|
+
*
|
|
16
|
+
* export default {
|
|
17
|
+
* plugins: [tldraw()],
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
var rollup_default = createRollupPlugin(unpluginFactory);
|
|
21
|
+
//#endregion
|
|
22
|
+
export { rollup_default as default };
|
package/dist/rspack.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { n as Options } from "./options-OhkbiFS8.js";
|
|
2
|
+
|
|
3
|
+
//#region src/rspack.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* This entry file is for Rspack plugin.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Rspack plugin
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // rspack.config.js
|
|
14
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/rspack'
|
|
15
|
+
*
|
|
16
|
+
* export default {
|
|
17
|
+
* plugins: [tldraw()],
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
declare const _default: (options?: Options | undefined) => RspackPluginInstance;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { _default as default };
|
package/dist/rspack.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { unpluginFactory } from "./index.js";
|
|
2
|
+
import { createRspackPlugin } from "unplugin";
|
|
3
|
+
//#region src/rspack.ts
|
|
4
|
+
/**
|
|
5
|
+
* This entry file is for Rspack plugin.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Rspack plugin
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // rspack.config.js
|
|
14
|
+
* import tldraw from '@kitschpatrol/unplugin-tldraw/rspack'
|
|
15
|
+
*
|
|
16
|
+
* export default {
|
|
17
|
+
* plugins: [tldraw()],
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
var rspack_default = createRspackPlugin(unpluginFactory);
|
|
21
|
+
//#endregion
|
|
22
|
+
export { rspack_default as default };
|