@kitschpatrol/unplugin-tldraw 1.0.0 → 1.1.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 +1 -1
- package/dist/api.js +1 -1
- package/dist/bun.d.ts +1 -1
- package/dist/esbuild.d.ts +1 -1
- package/dist/farm.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/{options-OhkbiFS8.d.ts → options-CZOXoH7Y.d.ts} +16 -11
- package/dist/rolldown.d.ts +3 -3
- package/dist/rollup.d.ts +1 -1
- package/dist/rspack.d.ts +3 -2
- package/dist/{tldraw-ZdwazU9j.js → tldraw-D1GC-f9x.js} +2 -2
- package/dist/vite.d.ts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/package.json +17 -7
- package/readme.md +1 -1
package/dist/api.d.ts
CHANGED
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-D1GC-f9x.js";
|
|
2
2
|
export { TldrawExport, resolveOptions };
|
package/dist/bun.d.ts
CHANGED
package/dist/esbuild.d.ts
CHANGED
package/dist/farm.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
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-D1GC-f9x.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
|
@@ -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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
27
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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;
|
package/dist/rolldown.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Options } from "./options-
|
|
2
|
-
import * as _$
|
|
1
|
+
import { n as Options } from "./options-CZOXoH7Y.js";
|
|
2
|
+
import * as _$rolldown from "rolldown";
|
|
3
3
|
|
|
4
4
|
//#region src/rolldown.d.ts
|
|
5
5
|
/**
|
|
@@ -18,6 +18,6 @@ import * as _$unplugin from "unplugin";
|
|
|
18
18
|
* plugins: [tldraw()],
|
|
19
19
|
* }
|
|
20
20
|
*/
|
|
21
|
-
declare const _default: (options?: Options | undefined) => _$
|
|
21
|
+
declare const _default: (options?: Options | undefined) => _$rolldown.Plugin<any> | _$rolldown.Plugin<any>[];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { _default as default };
|
package/dist/rollup.d.ts
CHANGED
package/dist/rspack.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { n as Options } from "./options-
|
|
1
|
+
import { n as Options } from "./options-CZOXoH7Y.js";
|
|
2
|
+
import * as _$unplugin from "unplugin";
|
|
2
3
|
|
|
3
4
|
//#region src/rspack.d.ts
|
|
4
5
|
/**
|
|
@@ -17,6 +18,6 @@ import { n as Options } from "./options-OhkbiFS8.js";
|
|
|
17
18
|
* plugins: [tldraw()],
|
|
18
19
|
* }
|
|
19
20
|
*/
|
|
20
|
-
declare const _default: (options?: Options | undefined) => RspackPluginInstance;
|
|
21
|
+
declare const _default: (options?: Options | undefined) => _$unplugin.RspackPluginInstance;
|
|
21
22
|
//#endregion
|
|
22
23
|
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
|
-
*
|
|
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
package/dist/webpack.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/unplugin-tldraw",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
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",
|
|
@@ -79,15 +79,17 @@
|
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@farmfe/core": ">=1.7.11",
|
|
82
|
-
"@kitschpatrol/shared-config": "^7.5.
|
|
83
|
-
"@nuxt/kit": "^
|
|
84
|
-
"@nuxt/schema": "^
|
|
82
|
+
"@kitschpatrol/shared-config": "^7.5.2",
|
|
83
|
+
"@nuxt/kit": "^4.4.2",
|
|
84
|
+
"@nuxt/schema": "^4.4.2",
|
|
85
|
+
"@rspack/core": "^2.0.1",
|
|
85
86
|
"@sxzz/test-utils": "^0.5.18",
|
|
86
87
|
"@vitest/browser-playwright": "^4.1.5",
|
|
87
88
|
"bumpp": "^11.0.1",
|
|
88
89
|
"esbuild": "*",
|
|
89
90
|
"playwright": "^1.59.1",
|
|
90
91
|
"poptab": "^1.1.0",
|
|
92
|
+
"rolldown": "^1.0.0-rc.18",
|
|
91
93
|
"rollup": "^4.60.2",
|
|
92
94
|
"shx": "^0.4.0",
|
|
93
95
|
"tsdown": "^0.21.10",
|
|
@@ -98,10 +100,12 @@
|
|
|
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
|
-
"
|
|
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
|
},
|
package/readme.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<!-- badges -->
|
|
8
8
|
|
|
9
9
|
[](https://npmjs.com/package/@kitschpatrol/unplugin-tldraw)
|
|
10
|
-
[](https://opensource.org/
|
|
10
|
+
[](https://opensource.org/license/mit/)
|
|
11
11
|
[](https://github.com/kitschpatrol/unplugin-tldraw/actions/workflows/ci.yml)
|
|
12
12
|
|
|
13
13
|
<!-- /badges -->
|