@kitschpatrol/unplugin-tldraw 1.0.0 → 1.1.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.
package/dist/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Options, r as resolveOptions, t as ImportOverrides } from "./options-OhkbiFS8.js";
1
+ import { n as Options, r as resolveOptions, t as ImportOverrides } from "./options-D2_OB7_C.js";
2
2
 
3
3
  //#region src/core/tldraw.d.ts
4
4
  declare class TldrawExport {
package/dist/api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { r as resolveOptions, t as TldrawExport } from "./tldraw-ZdwazU9j.js";
1
+ import { r as resolveOptions, t as TldrawExport } from "./tldraw-C8VVllK_.js";
2
2
  export { TldrawExport, resolveOptions };
package/dist/bun.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$unplugin from "unplugin";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
 
4
3
  //#region src/bun.d.ts
5
4
  /**
@@ -7,6 +6,6 @@ import * as _$unplugin from "unplugin";
7
6
  *
8
7
  * @module
9
8
  */
10
- declare const _default: _$unplugin.UnpluginFactory<Options | undefined, boolean>;
9
+ declare const _default: import("unplugin").UnpluginFactory<Options | undefined, boolean>;
11
10
  //#endregion
12
11
  export { _default as default };
package/dist/esbuild.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$esbuild from "esbuild";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
 
4
3
  //#region src/esbuild.d.ts
5
4
  /**
@@ -16,6 +15,6 @@ import * as _$esbuild from "esbuild";
16
15
  *
17
16
  * build({ plugins: [tldraw()] })
18
17
  */
19
- declare const _default: (options?: Options | undefined) => _$esbuild.Plugin;
18
+ declare const _default: (options?: Options | undefined) => import("esbuild").Plugin;
20
19
  //#endregion
21
20
  export { _default as default };
package/dist/farm.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$_farmfe_core0 from "@farmfe/core";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
 
4
3
  //#region src/farm.d.ts
5
4
  /**
@@ -18,6 +17,6 @@ import * as _$_farmfe_core0 from "@farmfe/core";
18
17
  * plugins: [tldraw()],
19
18
  * }
20
19
  */
21
- declare const _default: (options?: Options | undefined) => _$_farmfe_core0.JsPlugin;
20
+ declare const _default: (options?: Options | undefined) => import("@farmfe/core").JsPlugin;
22
21
  //#endregion
23
22
  export { _default as default };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$unplugin from "unplugin";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
  import { UnpluginFactory } from "unplugin";
4
3
 
5
4
  //#region src/index.d.ts
6
5
  declare const unpluginFactory: UnpluginFactory<Options | undefined>;
7
- declare const unplugin: _$unplugin.UnpluginInstance<Options | undefined, boolean>;
6
+ declare const unplugin: import("unplugin").UnpluginInstance<Options | undefined, boolean>;
8
7
  //#endregion
9
8
  export { unplugin as default, unplugin, unpluginFactory };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as parseImportOverrides, t as TldrawExport } from "./tldraw-ZdwazU9j.js";
1
+ import { n as parseImportOverrides, t as TldrawExport } from "./tldraw-C8VVllK_.js";
2
2
  import path from "node:path";
3
3
  import { createUnplugin } from "unplugin";
4
4
  //#region src/index.ts
@@ -29,6 +29,6 @@ const unpluginFactory = (options) => {
29
29
  }
30
30
  };
31
31
  };
32
- const unplugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
32
+ const unplugin = /* #__PURE__ */ createUnplugin(unpluginFactory);
33
33
  //#endregion
34
34
  export { unplugin as default, unplugin, unpluginFactory };
package/dist/nuxt.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$_nuxt_schema0 from "@nuxt/schema";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
 
4
3
  //#region src/nuxt.d.ts
5
4
  type ModuleOptions = Options;
@@ -12,6 +11,6 @@ type ModuleOptions = Options;
12
11
  * modules: ['@kitschpatrol/unplugin-tldraw/nuxt'],
13
12
  * })
14
13
  */
15
- declare const _default: _$_nuxt_schema0.NuxtModule<Options, Options, false>;
14
+ declare const _default: import("@nuxt/schema").NuxtModule<Options, Options, false>;
16
15
  //#endregion
17
16
  export { ModuleOptions, _default as default };
@@ -2,8 +2,8 @@ import { TldrawToImageOptions } from "@kitschpatrol/tldraw-cli";
2
2
 
3
3
  //#region src/core/options.d.ts
4
4
  /**
5
- * Image conversion options for `.tldr` exports.
6
- * Subset of `@kitschpatrol/tldraw-cli` options relevant to image output.
5
+ * Image conversion options for `.tldr` exports. Subset of
6
+ * `@kitschpatrol/tldraw-cli` options relevant to image output.
7
7
  */
8
8
  type TldrawImageOptions = Pick<TldrawToImageOptions, 'dark' | 'format' | 'padding' | 'scale' | 'stripStyle' | 'transparent'>;
9
9
  /**
@@ -16,15 +16,17 @@ type ImportOverrides = TldrawImageOptions & {
16
16
  };
17
17
  type Options = {
18
18
  /**
19
- * Directory to store converted images.
20
- * Resolved relative to Vite's `cacheDir` at runtime if not absolute.
19
+ * Directory to store converted images. Resolved relative to Vite's `cacheDir`
20
+ * at runtime if not absolute.
21
+ *
21
22
  * @default './node_modules/.cache/tldraw'
22
23
  */
23
24
  cacheDirectory?: string;
24
25
  /**
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.
26
+ * Enable caching of generated image files. Cache keys include a hash of the
27
+ * `.tldr` file content and image options, so cached files are automatically
28
+ * invalidated when the source changes.
29
+ *
28
30
  * @default true
29
31
  */
30
32
  cacheEnabled?: boolean;
@@ -33,19 +35,22 @@ type Options = {
33
35
  */
34
36
  defaultImageOptions?: TldrawImageOptions;
35
37
  /**
36
- * Maximum number of concurrent `.tldr` conversions.
37
- * Lower values reduce system load (each conversion spawns a headless browser).
38
+ * Maximum number of concurrent `.tldr` conversions. Lower values reduce
39
+ * system load (each conversion spawns a headless browser).
40
+ *
38
41
  * @default 2
39
42
  */
40
43
  maxConcurrentConversions?: number;
41
44
  /**
42
- * Delete all files in `cacheDirectory` that are not in the converted
43
- * image set at the end of a full build.
45
+ * Delete all files in `cacheDirectory` that are not in the converted image
46
+ * set at the end of a full build.
47
+ *
44
48
  * @default false
45
49
  */
46
50
  pruneCacheOnBuild?: boolean;
47
51
  /**
48
52
  * Log conversion details and performance information to the console.
53
+ *
49
54
  * @default false
50
55
  */
51
56
  verbose?: boolean;
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$unplugin from "unplugin";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
 
4
3
  //#region src/rolldown.d.ts
5
4
  /**
@@ -18,6 +17,6 @@ import * as _$unplugin from "unplugin";
18
17
  * plugins: [tldraw()],
19
18
  * }
20
19
  */
21
- declare const _default: (options?: Options | undefined) => _$unplugin.RolldownPlugin<any> | _$unplugin.RolldownPlugin<any>[];
20
+ declare const _default: (options?: Options | undefined) => import("rolldown").Plugin<any> | import("rolldown").Plugin<any>[];
22
21
  //#endregion
23
22
  export { _default as default };
package/dist/rollup.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$rollup from "rollup";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
 
4
3
  //#region src/rollup.d.ts
5
4
  /**
@@ -18,6 +17,6 @@ import * as _$rollup from "rollup";
18
17
  * plugins: [tldraw()],
19
18
  * }
20
19
  */
21
- declare const _default: (options?: Options | undefined) => _$rollup.Plugin<any> | _$rollup.Plugin<any>[];
20
+ declare const _default: (options?: Options | undefined) => import("rollup").Plugin<any> | import("rollup").Plugin<any>[];
22
21
  //#endregion
23
22
  export { _default as default };
package/dist/rspack.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
2
2
 
3
3
  //#region src/rspack.d.ts
4
4
  /**
@@ -17,6 +17,6 @@ import { n as Options } from "./options-OhkbiFS8.js";
17
17
  * plugins: [tldraw()],
18
18
  * }
19
19
  */
20
- declare const _default: (options?: Options | undefined) => RspackPluginInstance;
20
+ declare const _default: (options?: Options | undefined) => import("unplugin").RspackPluginInstance;
21
21
  //#endregion
22
22
  export { _default as default };
@@ -32,8 +32,8 @@ function resolveOptions(options) {
32
32
  return resolved;
33
33
  }
34
34
  /**
35
- * Parse query params from an import path into per-import overrides.
36
- * Converts string values to appropriate types (booleans, numbers).
35
+ * Parse query params from an import path into per-import overrides. Converts
36
+ * string values to appropriate types (booleans, numbers).
37
37
  */
38
38
  function parseImportOverrides(queryString) {
39
39
  const params = new URLSearchParams(queryString);
package/dist/vite.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$vite from "vite";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
 
4
3
  //#region src/vite.d.ts
5
4
  /**
@@ -18,6 +17,6 @@ import * as _$vite from "vite";
18
17
  * plugins: [tldraw()],
19
18
  * })
20
19
  */
21
- declare const _default: (options?: Options | undefined) => _$vite.Plugin<any> | _$vite.Plugin<any>[];
20
+ declare const _default: (options?: Options | undefined) => import("vite").Plugin<any> | import("vite").Plugin<any>[];
22
21
  //#endregion
23
22
  export { _default as default };
package/dist/webpack.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-OhkbiFS8.js";
2
- import * as _$webpack from "webpack";
1
+ import { n as Options } from "./options-D2_OB7_C.js";
3
2
 
4
3
  //#region src/webpack.d.ts
5
4
  /**
@@ -18,6 +17,6 @@ import * as _$webpack from "webpack";
18
17
  * plugins: [tldraw()],
19
18
  * }
20
19
  */
21
- declare const _default: (options?: Options | undefined) => _$webpack.WebpackPluginInstance;
20
+ declare const _default: (options?: Options | undefined) => import("webpack").WebpackPluginInstance;
22
21
  //#endregion
23
22
  export { _default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/unplugin-tldraw",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Unplugin for module-style import of local tldraw .tldr files with automatic conversion to SVG or PNG.",
5
5
  "keywords": [
6
6
  "tldraw",
@@ -68,10 +68,10 @@
68
68
  "dist"
69
69
  ],
70
70
  "dependencies": {
71
- "@kitschpatrol/tldraw-cli": "^5.0.16",
72
- "@types/node": "~22.18.13",
71
+ "@kitschpatrol/tldraw-cli": "^6.0.0",
72
+ "@types/node": "~22.19.19",
73
73
  "defu": "^6.1.7",
74
- "lognow": "^0.6.1",
74
+ "lognow": "^0.6.2",
75
75
  "p-limit": "^7.3.0",
76
76
  "pretty-bytes": "^7.1.0",
77
77
  "pretty-ms": "^9.3.0",
@@ -79,29 +79,33 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@farmfe/core": ">=1.7.11",
82
- "@kitschpatrol/shared-config": "^7.5.1",
83
- "@nuxt/kit": "^3.21.2",
84
- "@nuxt/schema": "^3.21.2",
82
+ "@kitschpatrol/shared-config": "^7.6.3",
83
+ "@nuxt/kit": "^4.4.6",
84
+ "@nuxt/schema": "^4.4.6",
85
+ "@rspack/core": "^2.0.5",
85
86
  "@sxzz/test-utils": "^0.5.18",
86
- "@vitest/browser-playwright": "^4.1.5",
87
- "bumpp": "^11.0.1",
87
+ "@vitest/browser-playwright": "^4.1.7",
88
+ "bumpp": "^11.1.0",
88
89
  "esbuild": "*",
89
- "playwright": "^1.59.1",
90
- "poptab": "^1.1.0",
91
- "rollup": "^4.60.2",
90
+ "playwright": "^1.60.0",
91
+ "poptab": "^1.1.1",
92
+ "rolldown": "^1.0.3",
93
+ "rollup": "^4.60.4",
92
94
  "shx": "^0.4.0",
93
- "tsdown": "^0.21.10",
95
+ "tsdown": "^0.22.1",
94
96
  "typescript": "~5.9.3",
95
- "vite": "^7.3.2",
96
- "vitest": "^4.1.5",
97
- "webpack": "^5.106.2"
97
+ "vite": "^7.3.3",
98
+ "vitest": "^4.1.7",
99
+ "webpack": "^5.107.2"
98
100
  },
99
101
  "peerDependencies": {
100
102
  "@farmfe/core": ">=1",
101
- "@nuxt/kit": "^3",
102
- "@nuxt/schema": "^3",
103
+ "@nuxt/kit": "^3 || ^4",
104
+ "@nuxt/schema": "^3 || ^4",
105
+ "@rspack/core": "^1 || ^2",
103
106
  "esbuild": "*",
104
- "rollup": "^3",
107
+ "rolldown": ">=1.0.0-rc.1",
108
+ "rollup": "^3 || ^4",
105
109
  "vite": ">=3",
106
110
  "webpack": "^4 || ^5"
107
111
  },
@@ -115,9 +119,15 @@
115
119
  "@nuxt/schema": {
116
120
  "optional": true
117
121
  },
122
+ "@rspack/core": {
123
+ "optional": true
124
+ },
118
125
  "esbuild": {
119
126
  "optional": true
120
127
  },
128
+ "rolldown": {
129
+ "optional": true
130
+ },
121
131
  "rollup": {
122
132
  "optional": true
123
133
  },
@@ -129,7 +139,7 @@
129
139
  }
130
140
  },
131
141
  "engines": {
132
- "node": ">=22.18.0"
142
+ "node": ">=22.22.2"
133
143
  },
134
144
  "publishConfig": {
135
145
  "access": "public"
@@ -141,7 +151,7 @@
141
151
  "fix": "ksc fix",
142
152
  "lint": "ksc lint",
143
153
  "play": "poptab && pnpm -C playground run dev",
144
- "release": "bumpp --commit 'Release: %s' && pnpm build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish",
154
+ "release": "bumpp --commit 'Release: %s' && pnpm build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') pnpm publish",
145
155
  "test": "vitest run",
146
156
  "test:browser": "vitest run --config vitest.browser.config.ts"
147
157
  }
package/readme.md CHANGED
@@ -7,7 +7,7 @@
7
7
  <!-- badges -->
8
8
 
9
9
  [![NPM Package @kitschpatrol/unplugin-tldraw](https://img.shields.io/npm/v/@kitschpatrol/unplugin-tldraw.svg)](https://npmjs.com/package/@kitschpatrol/unplugin-tldraw)
10
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/mit/)
11
11
  [![CI](https://github.com/kitschpatrol/unplugin-tldraw/actions/workflows/ci.yml/badge.svg)](https://github.com/kitschpatrol/unplugin-tldraw/actions/workflows/ci.yml)
12
12
 
13
13
  <!-- /badges -->