@kitschpatrol/unplugin-tldraw 1.1.2 → 1.1.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.
package/dist/api.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { n as Options, r as resolveOptions, t as ImportOverrides } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options, r as resolveOptions, t as ImportOverrides } from "./options-D2Q0JXtI.js";
3
2
  //#region src/core/tldraw.d.ts
4
- declare class TldrawExport {
3
+ export declare class TldrawExport {
5
4
  /**
6
5
  * Pattern matching `.tldr` file imports. The `resolveId` hook filters on
7
6
  * this.
@@ -47,4 +46,4 @@ declare class TldrawExport {
47
46
  private toRelativeCacheKey;
48
47
  }
49
48
  //#endregion
50
- export { TldrawExport, resolveOptions };
49
+ export { resolveOptions };
package/dist/api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { r as resolveOptions, t as TldrawExport } from "./tldraw--EsjzXjm.js";
1
+ import { r as resolveOptions, t as TldrawExport } from "./tldraw-GlKM6YdO.js";
2
2
  export { TldrawExport, resolveOptions };
package/dist/bun.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/bun.d.ts
4
3
  /**
5
4
  * This entry file is for Bun plugin.
package/dist/esbuild.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/esbuild.d.ts
4
3
  /**
5
4
  * This entry file is for esbuild plugin.
package/dist/farm.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/farm.d.ts
4
3
  /**
5
4
  * This entry file is for Farm plugin.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
2
2
  import { UnpluginFactory } from "unplugin";
3
-
4
3
  //#region src/index.d.ts
5
- declare const unpluginFactory: UnpluginFactory<Options | undefined>;
6
- declare const unplugin: import("unplugin").UnpluginInstance<Options | undefined, boolean>;
4
+ export declare const unpluginFactory: UnpluginFactory<Options | undefined>;
5
+ export declare const unplugin: import("unplugin").UnpluginInstance<Options | undefined, boolean>;
7
6
  //#endregion
8
- export { unplugin as default, unplugin, unpluginFactory };
7
+ export { unplugin as default };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as parseImportOverrides, t as TldrawExport } from "./tldraw--EsjzXjm.js";
1
+ import { n as parseImportOverrides, t as TldrawExport } from "./tldraw-GlKM6YdO.js";
2
2
  import path from "node:path";
3
3
  import { createUnplugin } from "unplugin";
4
4
  //#region src/index.ts
package/dist/nuxt.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/nuxt.d.ts
4
- type ModuleOptions = Options;
3
+ export type ModuleOptions = Options;
5
4
  /**
6
5
  * Nuxt module
7
6
  *
@@ -13,4 +12,4 @@ type ModuleOptions = Options;
13
12
  */
14
13
  declare const _default: import("@nuxt/schema").NuxtModule<Options, Options, false>;
15
14
  //#endregion
16
- export { ModuleOptions, _default as default };
15
+ export { _default as default };
@@ -1,5 +1,4 @@
1
1
  import { TldrawToImageOptions } from "@kitschpatrol/tldraw-cli";
2
-
3
2
  //#region src/core/options.d.ts
4
3
  /**
5
4
  * Image conversion options for `.tldr` exports. Subset of
@@ -11,7 +10,9 @@ type TldrawImageOptions = Pick<TldrawToImageOptions, 'dark' | 'format' | 'paddin
11
10
  * Extends TldrawImageOptions with frame/page selection.
12
11
  */
13
12
  type ImportOverrides = TldrawImageOptions & {
14
- /** Export a specific frame by name or ID. */frame?: string; /** Export a specific page by name, ID, or index. */
13
+ /** Export a specific frame by name or ID. */
14
+ frame?: string;
15
+ /** Export a specific page by name, ID, or index. */
15
16
  page?: string;
16
17
  };
17
18
  type Options = {
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/rolldown.d.ts
4
3
  /**
5
4
  * This entry file is for Rolldown plugin.
package/dist/rollup.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/rollup.d.ts
4
3
  /**
5
4
  * This entry file is for Rollup plugin.
package/dist/rspack.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/rspack.d.ts
4
3
  /**
5
4
  * This entry file is for Rspack plugin.
@@ -63,7 +63,6 @@ function applyOverride(overrides, key, value) {
63
63
  if (!Number.isNaN(numberValue)) overrides[key] = numberValue;
64
64
  break;
65
65
  }
66
- default: break;
67
66
  }
68
67
  }
69
68
  //#endregion
@@ -152,11 +151,9 @@ var TldrawExport = class {
152
151
  const destinationFiles = await fs.readdir(this.options.cacheDirectory);
153
152
  const fileNamesToKeep = new Set(Array.from(this.pathsSeen, (filePath) => path.basename(filePath)));
154
153
  for (const destinationFile of destinationFiles) {
155
- if (destinationFile === CACHE_FILE_NAME) continue;
156
- if (!fileNamesToKeep.has(destinationFile)) {
157
- log.debug(`Cleaning up unused image: ${destinationFile}`);
158
- await fs.rm(path.join(this.options.cacheDirectory, destinationFile));
159
- }
154
+ if (destinationFile === CACHE_FILE_NAME || fileNamesToKeep.has(destinationFile)) continue;
155
+ log.debug(`Cleaning up unused image: ${destinationFile}`);
156
+ await fs.rm(path.join(this.options.cacheDirectory, destinationFile));
160
157
  }
161
158
  }
162
159
  /**
@@ -217,7 +214,8 @@ var TldrawExport = class {
217
214
  }
218
215
  if (this.options.pruneCacheOnBuild) this.pathsSeen.add(cachedFilePath);
219
216
  const elapsed = prettyMilliseconds(performance.now() - startTime);
220
- const fileSize = prettyBytes((await fs.stat(cachedFilePath)).size);
217
+ const stat = await fs.stat(cachedFilePath);
218
+ const fileSize = prettyBytes(stat.size);
221
219
  log.debug(`Converted in ${elapsed} (${fileSize}) → "${cachedFileName}"`);
222
220
  return cachedFilePath;
223
221
  }
package/dist/vite.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/vite.d.ts
4
3
  /**
5
4
  * This entry file is for Vite plugin.
package/dist/webpack.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { n as Options } from "./options-D2_OB7_C.js";
2
-
1
+ import { n as Options } from "./options-D2Q0JXtI.js";
3
2
  //#region src/webpack.d.ts
4
3
  /**
5
4
  * This entry file is for webpack plugin.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/unplugin-tldraw",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
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,35 +68,35 @@
68
68
  "dist"
69
69
  ],
70
70
  "dependencies": {
71
- "@kitschpatrol/tldraw-cli": "^6.0.1",
72
- "@types/node": "~22.19.19",
71
+ "@kitschpatrol/tldraw-cli": "^6.1.0",
72
+ "@types/node": "~24.13.3",
73
73
  "defu": "^6.1.7",
74
- "lognow": "^0.6.2",
75
- "p-limit": "^7.3.0",
76
- "pretty-bytes": "^7.1.0",
77
- "pretty-ms": "^9.3.0",
78
- "unplugin": "^3.3.0"
74
+ "lognow": "^0.8.4",
75
+ "p-limit": "^7.3.3",
76
+ "pretty-bytes": "^7.2.0",
77
+ "pretty-ms": "^9.3.1",
78
+ "unplugin": "^3.4.0"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@farmfe/core": ">=1.7.11",
82
- "@kitschpatrol/shared-config": "^8.0.0",
83
- "@nuxt/kit": "^4.4.8",
84
- "@nuxt/schema": "^4.4.8",
85
- "@rspack/core": "^2.1.1",
86
- "@sxzz/test-utils": "^0.5.18",
87
- "@vitest/browser-playwright": "^4.1.9",
88
- "bumpp": "^11.1.0",
82
+ "@kitschpatrol/shared-config": "^8.12.1",
83
+ "@nuxt/kit": "^4.6.0",
84
+ "@nuxt/schema": "^4.6.0",
85
+ "@rspack/core": "^2.2.8",
86
+ "@vitest/browser-playwright": "^5.0.3",
87
+ "bumpp": "^12.3.0",
89
88
  "esbuild": "*",
90
- "playwright": "^1.61.1",
91
- "poptab": "^1.1.1",
92
- "rolldown": "^1.1.3",
93
- "rollup": "^4.62.2",
89
+ "playwright": "^1.63.0",
90
+ "poptab": "^1.2.1",
91
+ "rolldown": "^1.2.12",
92
+ "rollup": "^4.64.0",
94
93
  "shx": "^0.4.0",
95
- "tsdown": "^0.22.3",
94
+ "skills": "^1.7.0",
95
+ "tsdown": "^0.23.0",
96
96
  "typescript": "~6.0.3",
97
- "vite": "^8.1.3",
98
- "vitest": "^4.1.9",
99
- "webpack": "^5.108.3"
97
+ "vite": "^8.3.2",
98
+ "vitest": "^5.0.3",
99
+ "webpack": "^5.111.1"
100
100
  },
101
101
  "peerDependencies": {
102
102
  "@farmfe/core": ">=1",
@@ -139,25 +139,19 @@
139
139
  }
140
140
  },
141
141
  "engines": {
142
- "node": ">=22.22.2"
143
- },
144
- "devEngines": {
145
- "runtime": {
146
- "name": "node",
147
- "version": ">=24.16.0"
148
- }
142
+ "node": "^24.16.0 || >=26.3.0"
149
143
  },
150
144
  "publishConfig": {
151
145
  "access": "public"
152
146
  },
153
147
  "scripts": {
154
148
  "build": "tsdown",
155
- "clean": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
149
+ "clean-deep": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
156
150
  "dev": "tsdown --watch",
157
151
  "fix": "ksc fix",
158
152
  "lint": "ksc lint",
159
153
  "play": "poptab && pnpm -C playground run dev",
160
- "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 && pnpm publish --otp $(op item get npm --otp)",
161
155
  "test": "vitest run",
162
156
  "test:browser": "vitest run --config vitest.browser.config.ts"
163
157
  }
package/readme.md CHANGED
@@ -6,8 +6,8 @@
6
6
 
7
7
  <!-- badges -->
8
8
 
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/license/mit/)
9
+ [![NPM Package @kitschpatrol/unplugin-tldraw](https://img.shields.io/npm/v/@kitschpatrol/unplugin-tldraw.svg)](https://www.npmjs.com/package/@kitschpatrol/unplugin-tldraw)
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 -->
@@ -210,10 +210,10 @@ Cannot find module './assets/test-sketch.tldr' or its corresponding type declara
210
210
 
211
211
  If you're using VS Code, an [extension](https://github.com/kitschpatrol/vscode-tldraw-preview) is available to provide hover-previews for tldr file paths:
212
212
 
213
- Install the extension from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=kitschpatrol.tldr-preview), or run the following in VS Code's command palette:
213
+ Install the extension from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=kitschpatrol.tldraw-preview), or run the following in VS Code's command palette:
214
214
 
215
215
  ```sh
216
- ext install kitschpatrol.tldr-preview
216
+ ext install kitschpatrol.tldraw-preview
217
217
  ```
218
218
 
219
219
  ## Usage