@kitschpatrol/unplugin-tldraw 1.1.3 → 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 +2 -2
- package/dist/api.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/nuxt.d.ts +2 -2
- package/dist/{tldraw-CoiKQQVQ.js → tldraw-GlKM6YdO.js} +3 -5
- package/package.json +157 -158
package/dist/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as Options, r as resolveOptions, t as ImportOverrides } from "./options-D2Q0JXtI.js";
|
|
2
2
|
//#region src/core/tldraw.d.ts
|
|
3
|
-
declare class TldrawExport {
|
|
3
|
+
export declare class TldrawExport {
|
|
4
4
|
/**
|
|
5
5
|
* Pattern matching `.tldr` file imports. The `resolveId` hook filters on
|
|
6
6
|
* this.
|
|
@@ -46,4 +46,4 @@ declare class TldrawExport {
|
|
|
46
46
|
private toRelativeCacheKey;
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
|
-
export {
|
|
49
|
+
export { resolveOptions };
|
package/dist/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as resolveOptions, t as TldrawExport } from "./tldraw-
|
|
1
|
+
import { r as resolveOptions, t as TldrawExport } from "./tldraw-GlKM6YdO.js";
|
|
2
2
|
export { TldrawExport, resolveOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as Options } from "./options-D2Q0JXtI.js";
|
|
2
2
|
import { UnpluginFactory } from "unplugin";
|
|
3
3
|
//#region src/index.d.ts
|
|
4
|
-
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
5
|
-
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>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { unplugin as default
|
|
7
|
+
export { unplugin as default };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as parseImportOverrides, t as TldrawExport } from "./tldraw-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { n as Options } from "./options-D2Q0JXtI.js";
|
|
2
2
|
//#region src/nuxt.d.ts
|
|
3
|
-
type ModuleOptions = Options;
|
|
3
|
+
export type ModuleOptions = Options;
|
|
4
4
|
/**
|
|
5
5
|
* Nuxt module
|
|
6
6
|
*
|
|
@@ -12,4 +12,4 @@ type ModuleOptions = Options;
|
|
|
12
12
|
*/
|
|
13
13
|
declare const _default: import("@nuxt/schema").NuxtModule<Options, Options, false>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export { _default as default };
|
|
@@ -151,11 +151,9 @@ var TldrawExport = class {
|
|
|
151
151
|
const destinationFiles = await fs.readdir(this.options.cacheDirectory);
|
|
152
152
|
const fileNamesToKeep = new Set(Array.from(this.pathsSeen, (filePath) => path.basename(filePath)));
|
|
153
153
|
for (const destinationFile of destinationFiles) {
|
|
154
|
-
if (destinationFile === CACHE_FILE_NAME) continue;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
await fs.rm(path.join(this.options.cacheDirectory, destinationFile));
|
|
158
|
-
}
|
|
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));
|
|
159
157
|
}
|
|
160
158
|
}
|
|
161
159
|
/**
|
package/package.json
CHANGED
|
@@ -1,159 +1,158 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
2
|
+
"name": "@kitschpatrol/unplugin-tldraw",
|
|
3
|
+
"version": "1.1.4",
|
|
4
|
+
"description": "Unplugin for module-style import of local tldraw .tldr files with automatic conversion to SVG or PNG.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"tldraw",
|
|
7
|
+
"tldr",
|
|
8
|
+
"unplugin",
|
|
9
|
+
"vite",
|
|
10
|
+
"webpack",
|
|
11
|
+
"rspack",
|
|
12
|
+
"rollup",
|
|
13
|
+
"rolldown",
|
|
14
|
+
"esbuild",
|
|
15
|
+
"farm",
|
|
16
|
+
"bun",
|
|
17
|
+
"nuxt",
|
|
18
|
+
"diagram",
|
|
19
|
+
"drawing",
|
|
20
|
+
"whiteboard",
|
|
21
|
+
"sketch",
|
|
22
|
+
"import",
|
|
23
|
+
"npm-package"
|
|
24
|
+
],
|
|
25
|
+
"homepage": "https://github.com/kitschpatrol/unplugin-tldraw",
|
|
26
|
+
"bugs": "https://github.com/kitschpatrol/unplugin-tldraw/issues",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/kitschpatrol/unplugin-tldraw.git"
|
|
30
|
+
},
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"author": {
|
|
33
|
+
"name": "Eric Mika",
|
|
34
|
+
"email": "eric@ericmika.com",
|
|
35
|
+
"url": "https://ericmika.com"
|
|
36
|
+
},
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"type": "module",
|
|
39
|
+
"exports": {
|
|
40
|
+
".": "./dist/index.js",
|
|
41
|
+
"./*": "./*",
|
|
42
|
+
"./api": "./dist/api.js",
|
|
43
|
+
"./bun": "./dist/bun.js",
|
|
44
|
+
"./client": {
|
|
45
|
+
"types": "./dist/client.d.ts"
|
|
46
|
+
},
|
|
47
|
+
"./esbuild": "./dist/esbuild.js",
|
|
48
|
+
"./farm": "./dist/farm.js",
|
|
49
|
+
"./nuxt": "./dist/nuxt.js",
|
|
50
|
+
"./rolldown": "./dist/rolldown.js",
|
|
51
|
+
"./rollup": "./dist/rollup.js",
|
|
52
|
+
"./rspack": "./dist/rspack.js",
|
|
53
|
+
"./vite": "./dist/vite.js",
|
|
54
|
+
"./webpack": "./dist/webpack.js"
|
|
55
|
+
},
|
|
56
|
+
"main": "./dist/index.js",
|
|
57
|
+
"module": "./dist/index.js",
|
|
58
|
+
"types": "./dist/index.d.ts",
|
|
59
|
+
"typesVersions": {
|
|
60
|
+
"*": {
|
|
61
|
+
"*": [
|
|
62
|
+
"./dist/*",
|
|
63
|
+
"./*"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"files": [
|
|
68
|
+
"dist"
|
|
69
|
+
],
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@kitschpatrol/tldraw-cli": "^6.1.0",
|
|
72
|
+
"@types/node": "~24.13.3",
|
|
73
|
+
"defu": "^6.1.7",
|
|
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
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@farmfe/core": ">=1.7.11",
|
|
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",
|
|
88
|
+
"esbuild": "*",
|
|
89
|
+
"playwright": "^1.63.0",
|
|
90
|
+
"poptab": "^1.2.1",
|
|
91
|
+
"rolldown": "^1.2.12",
|
|
92
|
+
"rollup": "^4.64.0",
|
|
93
|
+
"shx": "^0.4.0",
|
|
94
|
+
"skills": "^1.7.0",
|
|
95
|
+
"tsdown": "^0.23.0",
|
|
96
|
+
"typescript": "~6.0.3",
|
|
97
|
+
"vite": "^8.3.2",
|
|
98
|
+
"vitest": "^5.0.3",
|
|
99
|
+
"webpack": "^5.111.1"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"@farmfe/core": ">=1",
|
|
103
|
+
"@nuxt/kit": "^3 || ^4",
|
|
104
|
+
"@nuxt/schema": "^3 || ^4",
|
|
105
|
+
"@rspack/core": "^1 || ^2",
|
|
106
|
+
"esbuild": "*",
|
|
107
|
+
"rolldown": ">=1.0.0-rc.1",
|
|
108
|
+
"rollup": "^3 || ^4",
|
|
109
|
+
"vite": ">=3",
|
|
110
|
+
"webpack": "^4 || ^5"
|
|
111
|
+
},
|
|
112
|
+
"peerDependenciesMeta": {
|
|
113
|
+
"@farmfe/core": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"@nuxt/kit": {
|
|
117
|
+
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"@nuxt/schema": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
122
|
+
"@rspack/core": {
|
|
123
|
+
"optional": true
|
|
124
|
+
},
|
|
125
|
+
"esbuild": {
|
|
126
|
+
"optional": true
|
|
127
|
+
},
|
|
128
|
+
"rolldown": {
|
|
129
|
+
"optional": true
|
|
130
|
+
},
|
|
131
|
+
"rollup": {
|
|
132
|
+
"optional": true
|
|
133
|
+
},
|
|
134
|
+
"vite": {
|
|
135
|
+
"optional": true
|
|
136
|
+
},
|
|
137
|
+
"webpack": {
|
|
138
|
+
"optional": true
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"engines": {
|
|
142
|
+
"node": "^24.16.0 || >=26.3.0"
|
|
143
|
+
},
|
|
144
|
+
"publishConfig": {
|
|
145
|
+
"access": "public"
|
|
146
|
+
},
|
|
147
|
+
"scripts": {
|
|
148
|
+
"build": "tsdown",
|
|
149
|
+
"clean-deep": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
|
|
150
|
+
"dev": "tsdown --watch",
|
|
151
|
+
"fix": "ksc fix",
|
|
152
|
+
"lint": "ksc lint",
|
|
153
|
+
"play": "poptab && pnpm -C playground run dev",
|
|
154
|
+
"release": "bumpp --commit 'Release: %s' && pnpm build && pnpm publish --otp $(op item get npm --otp)",
|
|
155
|
+
"test": "vitest run",
|
|
156
|
+
"test:browser": "vitest run --config vitest.browser.config.ts"
|
|
157
|
+
}
|
|
158
|
+
}
|