@kekonic/diagrams-unplugin 1.0.0-rc.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/LICENSE +21 -0
- package/README.md +30 -0
- package/client.d.ts +29 -0
- package/dist/esbuild.d.mts +5 -0
- package/dist/esbuild.mjs +7 -0
- package/dist/esbuild.mjs.map +1 -0
- package/dist/index.d.mts +17 -0
- package/dist/index.mjs +55 -0
- package/dist/index.mjs.map +1 -0
- package/dist/rolldown.d.mts +5 -0
- package/dist/rolldown.mjs +7 -0
- package/dist/rolldown.mjs.map +1 -0
- package/dist/rollup.d.mts +5 -0
- package/dist/rollup.mjs +7 -0
- package/dist/rollup.mjs.map +1 -0
- package/dist/rspack.d.mts +5 -0
- package/dist/rspack.mjs +7 -0
- package/dist/rspack.mjs.map +1 -0
- package/dist/vite.d.mts +5 -0
- package/dist/vite.mjs +7 -0
- package/dist/vite.mjs.map +1 -0
- package/dist/webpack.d.mts +5 -0
- package/dist/webpack.mjs +7 -0
- package/dist/webpack.mjs.map +1 -0
- package/package.json +99 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kekonic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# `@kekonic/diagrams-unplugin`
|
|
2
|
+
|
|
3
|
+
Import standalone `.kdiagram` files through Vite, Rollup, Rolldown, Webpack, Rspack, or esbuild.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import kdiagram from "@kekonic/diagrams-unplugin/vite";
|
|
7
|
+
|
|
8
|
+
export default { plugins: [kdiagram()] };
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Imports are explicit so applications choose static output or a live runtime deliberately:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import svg from "./system.kdiagram?svg";
|
|
15
|
+
import url from "./system.kdiagram?url";
|
|
16
|
+
import source from "./system.kdiagram?source";
|
|
17
|
+
import Diagram from "./system.kdiagram?react";
|
|
18
|
+
import DiagramElement from "./system.kdiagram?element";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- `?svg` exports portable SVG markup.
|
|
22
|
+
- `?url` exports a self-contained SVG data URL that works consistently across supported bundlers.
|
|
23
|
+
- `?source` exports the original DSL.
|
|
24
|
+
- `?react` exports a live component backed by `@kekonic/diagrams-ui`.
|
|
25
|
+
- `?element` exports an unregistered `KDiagram` subclass. Register it under an application-owned
|
|
26
|
+
tag with `customElements.define("system-diagram", DiagramElement)`.
|
|
27
|
+
|
|
28
|
+
Add `@kekonic/diagrams-unplugin/client` to `compilerOptions.types` for TypeScript import
|
|
29
|
+
declarations. React and element dependencies are optional unless their corresponding queries are
|
|
30
|
+
used. Bare `.kdiagram` imports intentionally fail with a list of supported queries.
|
package/client.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare module "*.kdiagram?svg" {
|
|
2
|
+
const svg: string;
|
|
3
|
+
export default svg;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
declare module "*.kdiagram?url" {
|
|
7
|
+
const url: string;
|
|
8
|
+
export default url;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module "*.kdiagram?source" {
|
|
12
|
+
const source: string;
|
|
13
|
+
export default source;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module "*.kdiagram?react" {
|
|
17
|
+
import type { ComponentType } from "react";
|
|
18
|
+
import type { KDiagramLiveProps } from "@kekonic/diagrams-ui";
|
|
19
|
+
export const source: string;
|
|
20
|
+
const Diagram: ComponentType<Omit<KDiagramLiveProps, "source">>;
|
|
21
|
+
export default Diagram;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module "*.kdiagram?element" {
|
|
25
|
+
import type { KDiagramElement } from "@kekonic/diagrams-element";
|
|
26
|
+
export const source: string;
|
|
27
|
+
const Diagram: new () => KDiagramElement;
|
|
28
|
+
export default Diagram;
|
|
29
|
+
}
|
package/dist/esbuild.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esbuild.mjs","names":["kdiagram"],"sources":["../src/esbuild.ts"],"sourcesContent":["import kdiagram from \"./index.ts\";\n\nexport default kdiagram.esbuild;\n"],"mappings":";;AAEA,IAAA,kBAAeA,iBAAS"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KDiagramBuildOptions } from "@kekonic/diagrams-build";
|
|
2
|
+
import { UnpluginFactory } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
declare const QUERY_KINDS: readonly ["svg", "url", "source", "react", "element"];
|
|
6
|
+
type KDiagramImportKind = (typeof QUERY_KINDS)[number];
|
|
7
|
+
type KDiagramUnpluginOptions = KDiagramBuildOptions;
|
|
8
|
+
type KDiagramRequest = {
|
|
9
|
+
filename: string;
|
|
10
|
+
kind?: KDiagramImportKind;
|
|
11
|
+
};
|
|
12
|
+
declare function parseKDiagramRequest(id: string, importer?: string): KDiagramRequest | undefined;
|
|
13
|
+
declare const kdiagramUnpluginFactory: UnpluginFactory<KDiagramUnpluginOptions | undefined>;
|
|
14
|
+
declare const kdiagramUnplugin: import("unplugin").UnpluginInstance<KDiagramBuildOptions, boolean>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { KDiagramImportKind, KDiagramRequest, KDiagramUnpluginOptions, kdiagramUnplugin as default, kdiagramUnplugin, kdiagramUnpluginFactory, parseKDiagramRequest };
|
|
17
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, isAbsolute, resolve } from "node:path";
|
|
3
|
+
import { createKDiagramDataUrl, createKDiagramModule, formatKDiagramBuildError, renderKDiagramForBuild } from "@kekonic/diagrams-build";
|
|
4
|
+
import { createUnplugin } from "unplugin";
|
|
5
|
+
//#region src/index.ts
|
|
6
|
+
const RESOLVED_PREFIX = "\0kdiagram:";
|
|
7
|
+
const QUERY_KINDS = [
|
|
8
|
+
"svg",
|
|
9
|
+
"url",
|
|
10
|
+
"source",
|
|
11
|
+
"react",
|
|
12
|
+
"element"
|
|
13
|
+
];
|
|
14
|
+
function parseKDiagramRequest(id, importer) {
|
|
15
|
+
const unresolved = id.startsWith(RESOLVED_PREFIX) ? id.slice(10) : id;
|
|
16
|
+
const queryIndex = unresolved.indexOf("?");
|
|
17
|
+
const pathname = queryIndex === -1 ? unresolved : unresolved.slice(0, queryIndex);
|
|
18
|
+
if (!pathname.endsWith(".kdiagram")) return void 0;
|
|
19
|
+
const filename = isAbsolute(pathname) ? pathname : resolve(importer ? dirname(importer) : process.cwd(), pathname);
|
|
20
|
+
if (queryIndex === -1) return { filename };
|
|
21
|
+
const query = unresolved.slice(queryIndex + 1);
|
|
22
|
+
return {
|
|
23
|
+
filename,
|
|
24
|
+
kind: QUERY_KINDS.find((candidate) => candidate === query)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const kdiagramUnpluginFactory = (options = {}) => ({
|
|
28
|
+
name: "kdiagram",
|
|
29
|
+
enforce: "pre",
|
|
30
|
+
resolveId(id, importer) {
|
|
31
|
+
const request = parseKDiagramRequest(id, importer);
|
|
32
|
+
if (!request) return;
|
|
33
|
+
const suffix = request.kind ? `?${request.kind}` : "";
|
|
34
|
+
return `${RESOLVED_PREFIX}${request.filename}${suffix}`;
|
|
35
|
+
},
|
|
36
|
+
async load(id) {
|
|
37
|
+
if (!id.startsWith(RESOLVED_PREFIX)) return;
|
|
38
|
+
const request = parseKDiagramRequest(id);
|
|
39
|
+
if (!request) return;
|
|
40
|
+
if (!request.kind) return this.error(`KDiagram imports require one of ${QUERY_KINDS.map((kind) => `?${kind}`).join(", ")}: ${request.filename}`);
|
|
41
|
+
this.addWatchFile(request.filename);
|
|
42
|
+
const source = await readFile(request.filename, "utf8");
|
|
43
|
+
if (request.kind === "source" || request.kind === "react" || request.kind === "element") return createKDiagramModule(request.kind, source);
|
|
44
|
+
const result = await renderKDiagramForBuild(source, options);
|
|
45
|
+
if (!result.svg) return this.error(formatKDiagramBuildError(result.diagnostics));
|
|
46
|
+
for (const diagnostic of result.diagnostics) this.warn(`${request.filename}: ${diagnostic.code}: ${diagnostic.message}`);
|
|
47
|
+
if (request.kind === "svg") return createKDiagramModule("svg", source, result.svg);
|
|
48
|
+
return `export default ${JSON.stringify(createKDiagramDataUrl(result.svg))};\n`;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const kdiagramUnplugin = /* #__PURE__ */ createUnplugin(kdiagramUnpluginFactory);
|
|
52
|
+
//#endregion
|
|
53
|
+
export { kdiagramUnplugin as default, kdiagramUnplugin, kdiagramUnpluginFactory, parseKDiagramRequest };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { dirname, isAbsolute, resolve } from \"node:path\";\nimport {\n createKDiagramDataUrl,\n createKDiagramModule,\n formatKDiagramBuildError,\n renderKDiagramForBuild,\n type KDiagramBuildOptions,\n} from \"@kekonic/diagrams-build\";\nimport { createUnplugin, type UnpluginFactory } from \"unplugin\";\n\nconst RESOLVED_PREFIX = \"\\0kdiagram:\";\nconst QUERY_KINDS = [\"svg\", \"url\", \"source\", \"react\", \"element\"] as const;\n\nexport type KDiagramImportKind = (typeof QUERY_KINDS)[number];\n\nexport type KDiagramUnpluginOptions = KDiagramBuildOptions;\n\nexport type KDiagramRequest = {\n filename: string;\n kind?: KDiagramImportKind;\n};\n\nexport function parseKDiagramRequest(id: string, importer?: string): KDiagramRequest | undefined {\n const unresolved = id.startsWith(RESOLVED_PREFIX) ? id.slice(RESOLVED_PREFIX.length) : id;\n const queryIndex = unresolved.indexOf(\"?\");\n const pathname = queryIndex === -1 ? unresolved : unresolved.slice(0, queryIndex);\n if (!pathname.endsWith(\".kdiagram\")) return undefined;\n\n const filename = isAbsolute(pathname)\n ? pathname\n : resolve(importer ? dirname(importer) : process.cwd(), pathname);\n if (queryIndex === -1) return { filename };\n\n const query = unresolved.slice(queryIndex + 1);\n const kind = QUERY_KINDS.find((candidate) => candidate === query);\n return { filename, kind };\n}\n\nexport const kdiagramUnpluginFactory: UnpluginFactory<KDiagramUnpluginOptions | undefined> = (\n options = {},\n) => ({\n name: \"kdiagram\",\n enforce: \"pre\",\n resolveId(id, importer) {\n const request = parseKDiagramRequest(id, importer);\n if (!request) return;\n const suffix = request.kind ? `?${request.kind}` : \"\";\n return `${RESOLVED_PREFIX}${request.filename}${suffix}`;\n },\n async load(id) {\n if (!id.startsWith(RESOLVED_PREFIX)) return;\n const request = parseKDiagramRequest(id);\n if (!request) return;\n if (!request.kind) {\n return this.error(\n `KDiagram imports require one of ${QUERY_KINDS.map((kind) => `?${kind}`).join(\", \")}: ${request.filename}`,\n );\n }\n\n this.addWatchFile(request.filename);\n const source = await readFile(request.filename, \"utf8\");\n if (request.kind === \"source\" || request.kind === \"react\" || request.kind === \"element\") {\n return createKDiagramModule(request.kind, source);\n }\n\n const result = await renderKDiagramForBuild(source, options);\n if (!result.svg) return this.error(formatKDiagramBuildError(result.diagnostics));\n for (const diagnostic of result.diagnostics) {\n this.warn(`${request.filename}: ${diagnostic.code}: ${diagnostic.message}`);\n }\n if (request.kind === \"svg\") return createKDiagramModule(\"svg\", source, result.svg);\n\n return `export default ${JSON.stringify(createKDiagramDataUrl(result.svg))};\\n`;\n },\n});\n\nconst kdiagramUnplugin = /* #__PURE__ */ createUnplugin(kdiagramUnpluginFactory);\n\nexport default kdiagramUnplugin;\nexport { kdiagramUnplugin };\n"],"mappings":";;;;;AAWA,MAAM,kBAAkB;AACxB,MAAM,cAAc;CAAC;CAAO;CAAO;CAAU;CAAS;AAAS;AAW/D,SAAgB,qBAAqB,IAAY,UAAgD;CAC/F,MAAM,aAAa,GAAG,WAAW,eAAe,IAAI,GAAG,MAAM,EAAsB,IAAI;CACvF,MAAM,aAAa,WAAW,QAAQ,GAAG;CACzC,MAAM,WAAW,eAAe,KAAK,aAAa,WAAW,MAAM,GAAG,UAAU;CAChF,IAAI,CAAC,SAAS,SAAS,WAAW,GAAG,OAAO,KAAA;CAE5C,MAAM,WAAW,WAAW,QAAQ,IAChC,WACA,QAAQ,WAAW,QAAQ,QAAQ,IAAI,QAAQ,IAAI,GAAG,QAAQ;CAClE,IAAI,eAAe,IAAI,OAAO,EAAE,SAAS;CAEzC,MAAM,QAAQ,WAAW,MAAM,aAAa,CAAC;CAE7C,OAAO;EAAE;EAAU,MADN,YAAY,MAAM,cAAc,cAAc,KACrC;CAAE;AAC1B;AAEA,MAAa,2BACX,UAAU,CAAC,OACP;CACJ,MAAM;CACN,SAAS;CACT,UAAU,IAAI,UAAU;EACtB,MAAM,UAAU,qBAAqB,IAAI,QAAQ;EACjD,IAAI,CAAC,SAAS;EACd,MAAM,SAAS,QAAQ,OAAO,IAAI,QAAQ,SAAS;EACnD,OAAO,GAAG,kBAAkB,QAAQ,WAAW;CACjD;CACA,MAAM,KAAK,IAAI;EACb,IAAI,CAAC,GAAG,WAAW,eAAe,GAAG;EACrC,MAAM,UAAU,qBAAqB,EAAE;EACvC,IAAI,CAAC,SAAS;EACd,IAAI,CAAC,QAAQ,MACX,OAAO,KAAK,MACV,mCAAmC,YAAY,KAAK,SAAS,IAAI,MAAM,CAAC,CAAC,KAAK,IAAI,EAAE,IAAI,QAAQ,UAClG;EAGF,KAAK,aAAa,QAAQ,QAAQ;EAClC,MAAM,SAAS,MAAM,SAAS,QAAQ,UAAU,MAAM;EACtD,IAAI,QAAQ,SAAS,YAAY,QAAQ,SAAS,WAAW,QAAQ,SAAS,WAC5E,OAAO,qBAAqB,QAAQ,MAAM,MAAM;EAGlD,MAAM,SAAS,MAAM,uBAAuB,QAAQ,OAAO;EAC3D,IAAI,CAAC,OAAO,KAAK,OAAO,KAAK,MAAM,yBAAyB,OAAO,WAAW,CAAC;EAC/E,KAAK,MAAM,cAAc,OAAO,aAC9B,KAAK,KAAK,GAAG,QAAQ,SAAS,IAAI,WAAW,KAAK,IAAI,WAAW,SAAS;EAE5E,IAAI,QAAQ,SAAS,OAAO,OAAO,qBAAqB,OAAO,QAAQ,OAAO,GAAG;EAEjF,OAAO,kBAAkB,KAAK,UAAU,sBAAsB,OAAO,GAAG,CAAC,EAAE;CAC7E;AACF;AAEA,MAAM,mBAAmC,+BAAe,uBAAuB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/rolldown.d.ts
|
|
2
|
+
declare const _default: (options?: import("@kekonic/diagrams-build").KDiagramBuildOptions) => import("unplugin").RolldownPlugin<any> | import("unplugin").RolldownPlugin<any>[];
|
|
3
|
+
//#endregion
|
|
4
|
+
export { _default as default };
|
|
5
|
+
//# sourceMappingURL=rolldown.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolldown.mjs","names":["kdiagram"],"sources":["../src/rolldown.ts"],"sourcesContent":["import kdiagram from \"./index.ts\";\n\nexport default kdiagram.rolldown;\n"],"mappings":";;AAEA,IAAA,mBAAeA,iBAAS"}
|
package/dist/rollup.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollup.mjs","names":["kdiagram"],"sources":["../src/rollup.ts"],"sourcesContent":["import kdiagram from \"./index.ts\";\n\nexport default kdiagram.rollup;\n"],"mappings":";;AAEA,IAAA,iBAAeA,iBAAS"}
|
package/dist/rspack.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rspack.mjs","names":["kdiagram"],"sources":["../src/rspack.ts"],"sourcesContent":["import kdiagram from \"./index.ts\";\n\nexport default kdiagram.rspack;\n"],"mappings":";;AAEA,IAAA,iBAAeA,iBAAS"}
|
package/dist/vite.d.mts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/vite.d.ts
|
|
2
|
+
declare const _default: (options?: import("@kekonic/diagrams-build").KDiagramBuildOptions) => import("unplugin").VitePlugin<any> | import("unplugin").VitePlugin<any>[];
|
|
3
|
+
//#endregion
|
|
4
|
+
export { _default as default };
|
|
5
|
+
//# sourceMappingURL=vite.d.mts.map
|
package/dist/vite.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.mjs","names":["kdiagram"],"sources":["../src/vite.ts"],"sourcesContent":["import kdiagram from \"./index.ts\";\n\nexport default kdiagram.vite;\n"],"mappings":";;AAEA,IAAA,eAAeA,iBAAS"}
|
package/dist/webpack.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpack.mjs","names":["kdiagram"],"sources":["../src/webpack.ts"],"sourcesContent":["import kdiagram from \"./index.ts\";\n\nexport default kdiagram.webpack;\n"],"mappings":";;AAEA,IAAA,kBAAeA,iBAAS"}
|
package/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kekonic/diagrams-unplugin",
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
|
+
"description": "KDiagram file imports for Vite, Rollup, Rolldown, Webpack, Rspack, and esbuild.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"diagram",
|
|
7
|
+
"kdiagram",
|
|
8
|
+
"rollup",
|
|
9
|
+
"unplugin",
|
|
10
|
+
"vite",
|
|
11
|
+
"webpack"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/kekonic/diagrams#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/kekonic/diagrams/issues"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/kekonic/diagrams.git",
|
|
21
|
+
"directory": "packages/diagrams-unplugin"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"client.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.mts",
|
|
31
|
+
"import": "./dist/index.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./vite": {
|
|
34
|
+
"types": "./dist/vite.d.mts",
|
|
35
|
+
"import": "./dist/vite.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./rollup": {
|
|
38
|
+
"types": "./dist/rollup.d.mts",
|
|
39
|
+
"import": "./dist/rollup.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./rolldown": {
|
|
42
|
+
"types": "./dist/rolldown.d.mts",
|
|
43
|
+
"import": "./dist/rolldown.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./webpack": {
|
|
46
|
+
"types": "./dist/webpack.d.mts",
|
|
47
|
+
"import": "./dist/webpack.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./rspack": {
|
|
50
|
+
"types": "./dist/rspack.d.mts",
|
|
51
|
+
"import": "./dist/rspack.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./esbuild": {
|
|
54
|
+
"types": "./dist/esbuild.d.mts",
|
|
55
|
+
"import": "./dist/esbuild.mjs"
|
|
56
|
+
},
|
|
57
|
+
"./client": "./client.d.ts"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"unplugin": "^3.3.0",
|
|
64
|
+
"@kekonic/diagrams": "1.0.0-rc.4",
|
|
65
|
+
"@kekonic/diagrams-build": "1.0.0-rc.4"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@types/react": "^19.2.17",
|
|
69
|
+
"react": "^19.2.8",
|
|
70
|
+
"typescript": "^5",
|
|
71
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.2",
|
|
72
|
+
"vitest": "^4",
|
|
73
|
+
"@kekonic/diagrams-element": "1.0.0-rc.4",
|
|
74
|
+
"@kekonic/diagrams-ui": "1.0.0-rc.4"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"react": ">=18",
|
|
78
|
+
"@kekonic/diagrams-element": "1.0.0-rc.4",
|
|
79
|
+
"@kekonic/diagrams-ui": "1.0.0-rc.4"
|
|
80
|
+
},
|
|
81
|
+
"peerDependenciesMeta": {
|
|
82
|
+
"@kekonic/diagrams-element": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"@kekonic/diagrams-ui": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"react": {
|
|
89
|
+
"optional": true
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"engines": {
|
|
93
|
+
"node": ">=22.18.0"
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"build": "vp pack",
|
|
97
|
+
"test": "vp test"
|
|
98
|
+
}
|
|
99
|
+
}
|