unplugin-docubook 1.0.0 → 1.0.2
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/README.md +142 -2
- package/dist/astro.cjs +152 -0
- package/dist/astro.cjs.map +1 -0
- package/dist/astro.js +125 -12
- package/dist/astro.js.map +1 -1
- package/dist/bun.cjs +140 -0
- package/dist/bun.cjs.map +1 -0
- package/dist/bun.js +115 -5
- package/dist/bun.js.map +1 -1
- package/dist/components/index.cjs +829 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.js +720 -512
- package/dist/components/index.js.map +1 -1
- package/dist/esbuild.cjs +140 -0
- package/dist/esbuild.cjs.map +1 -0
- package/dist/esbuild.js +115 -5
- package/dist/esbuild.js.map +1 -1
- package/dist/farm.cjs +140 -0
- package/dist/farm.cjs.map +1 -0
- package/dist/farm.js +115 -5
- package/dist/farm.js.map +1 -1
- package/dist/index.cjs +143 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +116 -2
- package/dist/index.js.map +1 -0
- package/dist/next.cjs +140 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.js +119 -0
- package/dist/next.js.map +1 -0
- package/dist/nuxt.cjs +160 -0
- package/dist/nuxt.cjs.map +1 -0
- package/dist/nuxt.js +134 -16
- package/dist/nuxt.js.map +1 -1
- package/dist/rolldown.cjs +140 -0
- package/dist/rolldown.cjs.map +1 -0
- package/dist/rolldown.js +115 -5
- package/dist/rolldown.js.map +1 -1
- package/dist/rollup.cjs +140 -0
- package/dist/rollup.cjs.map +1 -0
- package/dist/rollup.js +115 -5
- package/dist/rollup.js.map +1 -1
- package/dist/rspack.cjs +140 -0
- package/dist/rspack.cjs.map +1 -0
- package/dist/rspack.js +115 -5
- package/dist/rspack.js.map +1 -1
- package/dist/types.cjs +19 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -0
- package/dist/vite.cjs +140 -0
- package/dist/vite.cjs.map +1 -0
- package/dist/vite.js +115 -5
- package/dist/vite.js.map +1 -1
- package/dist/webpack.cjs +140 -0
- package/dist/webpack.cjs.map +1 -0
- package/dist/webpack.js +115 -5
- package/dist/webpack.js.map +1 -1
- package/package.json +92 -33
- package/dist/adapters/next-DNQX7_ln.d.ts +0 -24
- package/dist/adapters/next-DNQX7_ln.d.ts.map +0 -1
- package/dist/adapters/next.js +0 -38
- package/dist/adapters/next.js.map +0 -1
- package/dist/adapters/react-C9Vk6aTD.d.ts +0 -24
- package/dist/adapters/react-C9Vk6aTD.d.ts.map +0 -1
- package/dist/adapters/react.js +0 -39
- package/dist/adapters/react.js.map +0 -1
- package/dist/adapters/svelte-C-dhzdmU.d.ts +0 -19
- package/dist/adapters/svelte-C-dhzdmU.d.ts.map +0 -1
- package/dist/adapters/svelte.js +0 -43
- package/dist/adapters/svelte.js.map +0 -1
- package/dist/adapters/vue-BWv1EZit.d.ts +0 -22
- package/dist/adapters/vue-BWv1EZit.d.ts.map +0 -1
- package/dist/adapters/vue.js +0 -41
- package/dist/adapters/vue.js.map +0 -1
- package/dist/astro-BcckVQ-2.d.ts +0 -19
- package/dist/astro-BcckVQ-2.d.ts.map +0 -1
- package/dist/bun-DYPhytPs.d.ts +0 -7
- package/dist/bun-DYPhytPs.d.ts.map +0 -1
- package/dist/components/index-LWFtIGRd.d.ts +0 -265
- package/dist/components/index-LWFtIGRd.d.ts.map +0 -1
- package/dist/context-BKx0jIwX.js +0 -49
- package/dist/context-BKx0jIwX.js.map +0 -1
- package/dist/esbuild-BD42nX0_.d.ts +0 -8
- package/dist/esbuild-BD42nX0_.d.ts.map +0 -1
- package/dist/farm-C3XYk4nf.d.ts +0 -7
- package/dist/farm-C3XYk4nf.d.ts.map +0 -1
- package/dist/framework/index-98dEoo0g.d.ts +0 -11
- package/dist/framework/index-98dEoo0g.d.ts.map +0 -1
- package/dist/framework/index.js +0 -29
- package/dist/framework/index.js.map +0 -1
- package/dist/index-2f48-Fxc.d.ts +0 -10
- package/dist/index-2f48-Fxc.d.ts.map +0 -1
- package/dist/nuxt-BidHgMAG.d.ts +0 -5
- package/dist/nuxt-BidHgMAG.d.ts.map +0 -1
- package/dist/rolldown-CrcgSKP1.d.ts +0 -8
- package/dist/rolldown-CrcgSKP1.d.ts.map +0 -1
- package/dist/rollup-DDEc1C_K.d.ts +0 -8
- package/dist/rollup-DDEc1C_K.d.ts.map +0 -1
- package/dist/rspack-QbbymFlY.d.ts +0 -7
- package/dist/rspack-QbbymFlY.d.ts.map +0 -1
- package/dist/src-KZV_M01u.js +0 -165
- package/dist/src-KZV_M01u.js.map +0 -1
- package/dist/types-BQhWL5Qs.d.ts +0 -34
- package/dist/types-BQhWL5Qs.d.ts.map +0 -1
- package/dist/types-uxY1cMXO.d.ts +0 -28
- package/dist/types-uxY1cMXO.d.ts.map +0 -1
- package/dist/vite-9CqZQPO-.d.ts +0 -8
- package/dist/vite-9CqZQPO-.d.ts.map +0 -1
- package/dist/webpack-CBuuXltg.d.ts +0 -7
- package/dist/webpack-CBuuXltg.d.ts.map +0 -1
package/dist/adapters/svelte.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { get, writable } from "svelte/store";
|
|
2
|
-
|
|
3
|
-
//#region src/adapters/svelte.tsx
|
|
4
|
-
function createDefaultLink(props) {
|
|
5
|
-
return {
|
|
6
|
-
type: "a",
|
|
7
|
-
href: props.href
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function createDefaultImage(props) {
|
|
11
|
-
return {
|
|
12
|
-
type: "img",
|
|
13
|
-
src: props.src,
|
|
14
|
-
alt: props.alt
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
const defaultConfig = {
|
|
18
|
-
Link: createDefaultLink,
|
|
19
|
-
Image: createDefaultImage
|
|
20
|
-
};
|
|
21
|
-
const docuBookStore = writable(defaultConfig);
|
|
22
|
-
function setDocuBook(config) {
|
|
23
|
-
docuBookStore.set({
|
|
24
|
-
...defaultConfig,
|
|
25
|
-
...config
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function getDocuBook() {
|
|
29
|
-
return get(docuBookStore);
|
|
30
|
-
}
|
|
31
|
-
function useDocuBook() {
|
|
32
|
-
return docuBookStore;
|
|
33
|
-
}
|
|
34
|
-
function useLink() {
|
|
35
|
-
return get(docuBookStore).Link;
|
|
36
|
-
}
|
|
37
|
-
function useImage() {
|
|
38
|
-
return get(docuBookStore).Image;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
export { getDocuBook, setDocuBook, useDocuBook, useImage, useLink };
|
|
43
|
-
//# sourceMappingURL=svelte.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"svelte.js","names":[],"sources":["../../src/adapters/svelte.tsx"],"sourcesContent":["import { writable, get, type Readable } from 'svelte/store'\nimport type { FrameworkLinkProps, FrameworkImageProps } from '../framework/types'\nimport type { SvelteComponent } from 'svelte'\n\nexport interface SvelteFrameworkConfig {\n Link: new (props: FrameworkLinkProps) => SvelteComponent\n Image: new (props: FrameworkImageProps) => SvelteComponent\n}\n\nfunction createDefaultLink(props: FrameworkLinkProps) {\n return { type: 'a', href: props.href }\n}\n\nfunction createDefaultImage(props: FrameworkImageProps) {\n return { type: 'img', src: props.src, alt: props.alt }\n}\n\nconst defaultConfig: SvelteFrameworkConfig = {\n Link: createDefaultLink as never,\n Image: createDefaultImage as never,\n}\n\nconst docuBookStore = writable<SvelteFrameworkConfig>(defaultConfig)\n\nexport function setDocuBook(config: Partial<SvelteFrameworkConfig>) {\n docuBookStore.set({ ...defaultConfig, ...config })\n}\n\nexport function getDocuBook(): SvelteFrameworkConfig {\n return get(docuBookStore)\n}\n\nexport function useDocuBook(): Readable<SvelteFrameworkConfig> {\n return docuBookStore\n}\n\nexport function useLink(): SvelteFrameworkConfig['Link'] {\n return get(docuBookStore).Link\n}\n\nexport function useImage(): SvelteFrameworkConfig['Image'] {\n return get(docuBookStore).Image\n}\n"],"mappings":";;;AASA,SAAS,kBAAkB,OAA2B;AACpD,QAAO;EAAE,MAAM;EAAK,MAAM,MAAM;EAAM;;AAGxC,SAAS,mBAAmB,OAA4B;AACtD,QAAO;EAAE,MAAM;EAAO,KAAK,MAAM;EAAK,KAAK,MAAM;EAAK;;AAGxD,MAAM,gBAAuC;CAC3C,MAAM;CACN,OAAO;CACR;AAED,MAAM,gBAAgB,SAAgC,cAAc;AAEpE,SAAgB,YAAY,QAAwC;AAClE,eAAc,IAAI;EAAE,GAAG;EAAe,GAAG;EAAQ,CAAC;;AAGpD,SAAgB,cAAqC;AACnD,QAAO,IAAI,cAAc;;AAG3B,SAAgB,cAA+C;AAC7D,QAAO;;AAGT,SAAgB,UAAyC;AACvD,QAAO,IAAI,cAAc,CAAC;;AAG5B,SAAgB,WAA2C;AACzD,QAAO,IAAI,cAAc,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { a as FrameworkLinkProps, i as FrameworkImageProps } from "../types-BQhWL5Qs.js";
|
|
2
|
-
import { App, InjectionKey, VNode } from "vue";
|
|
3
|
-
|
|
4
|
-
//#region src/adapters/vue.d.ts
|
|
5
|
-
interface VueFrameworkConfig {
|
|
6
|
-
Link: (props: FrameworkLinkProps) => VNode;
|
|
7
|
-
Image: (props: FrameworkImageProps) => VNode;
|
|
8
|
-
}
|
|
9
|
-
declare const DocuBookKey: InjectionKey<VueFrameworkConfig>;
|
|
10
|
-
declare function useDocuBook(): VueFrameworkConfig;
|
|
11
|
-
declare function useLink(): (props: FrameworkLinkProps) => VNode;
|
|
12
|
-
declare function useImage(): (props: FrameworkImageProps) => VNode;
|
|
13
|
-
interface VueAdapterOptions {
|
|
14
|
-
Link?: VueFrameworkConfig['Link'];
|
|
15
|
-
Image?: VueFrameworkConfig['Image'];
|
|
16
|
-
}
|
|
17
|
-
declare function VueAdapter(options?: VueAdapterOptions): {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
export { DocuBookKey, VueAdapter, VueAdapter as default, VueAdapterOptions, VueFrameworkConfig, useDocuBook, useImage, useLink };
|
|
22
|
-
//# sourceMappingURL=vue-BWv1EZit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vue-BWv1EZit.d.ts","names":[],"sources":["../../src/adapters/vue.tsx"],"sourcesContent":[],"mappings":";;;;UAGiB,kBAAA;gBACD,uBAAuB;EADtB,KAAA,EAAA,CAAA,KAAA,EAEA,mBAFkB,EAAA,GAEM,KAFN;;AACnB,cAIH,WAJG,EAIU,YAJV,CAIuB,kBAJvB,CAAA;AAAuB,iBAmBvB,WAAA,CAAA,CAnBuB,EAmBR,kBAnBQ;AACtB,iBAsBD,OAAA,CAAA,CAtBC,EAAA,CAAA,KAAA,EADD,kBACC,EAAA,GADsB,KACtB;AAAwB,iBA2BzB,QAAA,CAAA,CA3ByB,EAAA,CAAA,KAAA,EAAxB,mBAAwB,EAAA,GAAA,KAAA;AAAK,UAgC7B,iBAAA,CAhC6B;EAGjC,IAAA,CAAA,EA8BJ,kBA9BsE,CAAA,MAAA,CAAA;EAAA,KAAA,CAAA,EA+BrE,kBA/BqE,CAAA,OAAA,CAAA;;AAArD,iBAkCV,UAAA,CAlCU,OAAA,CAAA,EAkCU,iBAlCV,CAAA,EAAA;EAAY,OAAA,CAAA,GAAA,EAoCrB,GApCqB,CAAA,EAAA,IAAA;AAetC,CAAA"}
|
package/dist/adapters/vue.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { h, inject } from "vue";
|
|
2
|
-
|
|
3
|
-
//#region src/adapters/vue.tsx
|
|
4
|
-
const DocuBookKey = Symbol("docubook");
|
|
5
|
-
function createDefaultLink(props) {
|
|
6
|
-
return h("a", { href: props.href }, props.children);
|
|
7
|
-
}
|
|
8
|
-
function createDefaultImage(props) {
|
|
9
|
-
return h("img", {
|
|
10
|
-
src: props.src,
|
|
11
|
-
alt: props.alt
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
const defaultConfig = {
|
|
15
|
-
Link: createDefaultLink,
|
|
16
|
-
Image: createDefaultImage
|
|
17
|
-
};
|
|
18
|
-
function useDocuBook() {
|
|
19
|
-
return inject(DocuBookKey, defaultConfig);
|
|
20
|
-
}
|
|
21
|
-
function useLink() {
|
|
22
|
-
const { Link } = useDocuBook();
|
|
23
|
-
return Link;
|
|
24
|
-
}
|
|
25
|
-
function useImage() {
|
|
26
|
-
const { Image } = useDocuBook();
|
|
27
|
-
return Image;
|
|
28
|
-
}
|
|
29
|
-
function VueAdapter(options = {}) {
|
|
30
|
-
return { install(app) {
|
|
31
|
-
const config = {
|
|
32
|
-
Link: options.Link ?? createDefaultLink,
|
|
33
|
-
Image: options.Image ?? createDefaultImage
|
|
34
|
-
};
|
|
35
|
-
app.provide(DocuBookKey, config);
|
|
36
|
-
} };
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
//#endregion
|
|
40
|
-
export { DocuBookKey, VueAdapter, VueAdapter as default, useDocuBook, useImage, useLink };
|
|
41
|
-
//# sourceMappingURL=vue.js.map
|
package/dist/adapters/vue.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vue.js","names":[],"sources":["../../src/adapters/vue.tsx"],"sourcesContent":["import { inject, type InjectionKey, type App, h, type VNode } from 'vue'\nimport type { FrameworkLinkProps, FrameworkImageProps } from '../framework/types'\n\nexport interface VueFrameworkConfig {\n Link: (props: FrameworkLinkProps) => VNode\n Image: (props: FrameworkImageProps) => VNode\n}\n\nexport const DocuBookKey: InjectionKey<VueFrameworkConfig> = Symbol('docubook')\n\nfunction createDefaultLink(props: FrameworkLinkProps): VNode {\n return h('a', { href: props.href }, props.children)\n}\n\nfunction createDefaultImage(props: FrameworkImageProps): VNode {\n return h('img', { src: props.src, alt: props.alt })\n}\n\nconst defaultConfig: VueFrameworkConfig = {\n Link: createDefaultLink,\n Image: createDefaultImage,\n}\n\nexport function useDocuBook(): VueFrameworkConfig {\n return inject(DocuBookKey, defaultConfig)\n}\n\nexport function useLink() {\n const { Link } = useDocuBook()\n return Link\n}\n\nexport function useImage() {\n const { Image } = useDocuBook()\n return Image\n}\n\nexport interface VueAdapterOptions {\n Link?: VueFrameworkConfig['Link']\n Image?: VueFrameworkConfig['Image']\n}\n\nexport function VueAdapter(options: VueAdapterOptions = {}) {\n return {\n install(app: App) {\n const config: VueFrameworkConfig = {\n Link: options.Link ?? createDefaultLink,\n Image: options.Image ?? createDefaultImage,\n }\n app.provide(DocuBookKey, config)\n },\n }\n}\n\nexport default VueAdapter\n"],"mappings":";;;AAQA,MAAa,cAAgD,OAAO,WAAW;AAE/E,SAAS,kBAAkB,OAAkC;AAC3D,QAAO,EAAE,KAAK,EAAE,MAAM,MAAM,MAAM,EAAE,MAAM,SAAS;;AAGrD,SAAS,mBAAmB,OAAmC;AAC7D,QAAO,EAAE,OAAO;EAAE,KAAK,MAAM;EAAK,KAAK,MAAM;EAAK,CAAC;;AAGrD,MAAM,gBAAoC;CACxC,MAAM;CACN,OAAO;CACR;AAED,SAAgB,cAAkC;AAChD,QAAO,OAAO,aAAa,cAAc;;AAG3C,SAAgB,UAAU;CACxB,MAAM,EAAE,SAAS,aAAa;AAC9B,QAAO;;AAGT,SAAgB,WAAW;CACzB,MAAM,EAAE,UAAU,aAAa;AAC/B,QAAO;;AAQT,SAAgB,WAAW,UAA6B,EAAE,EAAE;AAC1D,QAAO,EACL,QAAQ,KAAU;EAChB,MAAM,SAA6B;GACjC,MAAM,QAAQ,QAAQ;GACtB,OAAO,QAAQ,SAAS;GACzB;AACD,MAAI,QAAQ,aAAa,OAAO;IAEnC"}
|
package/dist/astro-BcckVQ-2.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Options } from "./types-uxY1cMXO.js";
|
|
2
|
-
|
|
3
|
-
//#region src/astro.d.ts
|
|
4
|
-
interface AstroConfig {
|
|
5
|
-
config: {
|
|
6
|
-
vite: {
|
|
7
|
-
plugins: unknown[];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
declare function export_default(options: Options): {
|
|
12
|
-
name: string;
|
|
13
|
-
hooks: {
|
|
14
|
-
'astro:config:setup': (astro: AstroConfig) => Promise<void>;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { export_default as default };
|
|
19
|
-
//# sourceMappingURL=astro-BcckVQ-2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"astro-BcckVQ-2.d.ts","names":[],"sources":["../src/astro.ts"],"sourcesContent":[],"mappings":";;;UAGU,WAAA;;IAAA,IAAA,EAAA;MAAW,OAAA,EAAA,OAAA,EAAA;IAAA,CAAA;;;AAYsC,iBAZtC,cAAA,CAYsC,OAAA,EAJzB,OAIyB,CAAA,EAAA;EAAA,IAAA,EAAA,MAAA;;kCAAX,gBAAW"}
|
package/dist/bun-DYPhytPs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bun-DYPhytPs.d.ts","names":[],"sources":["../src/bun.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import React$1, { ComponentProps, ReactNode } from "react";
|
|
2
|
-
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
|
-
import * as Icons from "lucide-react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/react/context.d.ts
|
|
6
|
-
interface DocuBookLinkProps {
|
|
7
|
-
href: string;
|
|
8
|
-
children?: React$1.ReactNode;
|
|
9
|
-
className?: string;
|
|
10
|
-
target?: string;
|
|
11
|
-
rel?: string;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
interface DocuBookImageProps {
|
|
15
|
-
src: string;
|
|
16
|
-
alt: string;
|
|
17
|
-
width?: number | string;
|
|
18
|
-
height?: number | string;
|
|
19
|
-
className?: string;
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
}
|
|
22
|
-
interface DocuBookConfig {
|
|
23
|
-
/**
|
|
24
|
-
* Framework-specific Link component.
|
|
25
|
-
* Default: renders a native `<a>` tag.
|
|
26
|
-
*/
|
|
27
|
-
Link: React$1.ComponentType<DocuBookLinkProps>;
|
|
28
|
-
/**
|
|
29
|
-
* Framework-specific Image component.
|
|
30
|
-
* Default: renders a native `<img>` tag.
|
|
31
|
-
*/
|
|
32
|
-
Image: React$1.ComponentType<DocuBookImageProps>;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Provider to inject framework-specific primitives (Link, Image)
|
|
36
|
-
* into all DocuBook components.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* // With Next.js adapter
|
|
40
|
-
* import { NextAdapter } from 'unplugin-docubook/adapters/next'
|
|
41
|
-
*
|
|
42
|
-
* <NextAdapter>
|
|
43
|
-
* <MDXContent />
|
|
44
|
-
* </NextAdapter>
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* // Custom adapter
|
|
48
|
-
* import { DocuBookProvider } from 'unplugin-docubook/components'
|
|
49
|
-
*
|
|
50
|
-
* <DocuBookProvider value={{ Link: MyLink, Image: MyImage }}>
|
|
51
|
-
* <MDXContent />
|
|
52
|
-
* </DocuBookProvider>
|
|
53
|
-
*/
|
|
54
|
-
declare const DocuBookProvider: React$1.Provider<DocuBookConfig>;
|
|
55
|
-
/**
|
|
56
|
-
* Hook to access the current DocuBook framework primitives.
|
|
57
|
-
*/
|
|
58
|
-
declare function useDocuBook(): DocuBookConfig;
|
|
59
|
-
//# sourceMappingURL=context.d.ts.map
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region src/components/react/Note.d.ts
|
|
62
|
-
interface NoteProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
63
|
-
title?: string;
|
|
64
|
-
type?: 'note' | 'danger' | 'warning' | 'success';
|
|
65
|
-
}
|
|
66
|
-
declare function Note({
|
|
67
|
-
className,
|
|
68
|
-
title,
|
|
69
|
-
type,
|
|
70
|
-
children,
|
|
71
|
-
...props
|
|
72
|
-
}: NoteProps): react_jsx_runtime7.JSX.Element;
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/components/react/Card.d.ts
|
|
75
|
-
type IconName = keyof typeof Icons;
|
|
76
|
-
interface CardProps {
|
|
77
|
-
title: string;
|
|
78
|
-
icon?: IconName;
|
|
79
|
-
href?: string;
|
|
80
|
-
horizontal?: boolean;
|
|
81
|
-
children: ReactNode;
|
|
82
|
-
className?: string;
|
|
83
|
-
}
|
|
84
|
-
declare const Card: React$1.FC<CardProps>;
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region src/components/react/CardGroup.d.ts
|
|
87
|
-
interface CardGroupProps {
|
|
88
|
-
children: React$1.ReactNode;
|
|
89
|
-
cols?: number;
|
|
90
|
-
className?: string;
|
|
91
|
-
}
|
|
92
|
-
declare function CardGroup({
|
|
93
|
-
children,
|
|
94
|
-
cols,
|
|
95
|
-
className
|
|
96
|
-
}: CardGroupProps): react_jsx_runtime7.JSX.Element;
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region src/components/react/Accordion.d.ts
|
|
99
|
-
type AccordionProps = {
|
|
100
|
-
title: string;
|
|
101
|
-
children?: ReactNode;
|
|
102
|
-
defaultOpen?: boolean;
|
|
103
|
-
icon?: keyof typeof Icons;
|
|
104
|
-
};
|
|
105
|
-
declare const Accordion: React.FC<AccordionProps>;
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region src/components/react/AccordionGroup.d.ts
|
|
108
|
-
interface AccordionGroupProps {
|
|
109
|
-
children: ReactNode;
|
|
110
|
-
className?: string;
|
|
111
|
-
}
|
|
112
|
-
declare const AccordionGroup: React$1.FC<AccordionGroupProps>;
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region src/components/react/Stepper.d.ts
|
|
115
|
-
declare function Stepper({
|
|
116
|
-
children
|
|
117
|
-
}: {
|
|
118
|
-
children: React$1.ReactNode;
|
|
119
|
-
}): react_jsx_runtime7.JSX.Element;
|
|
120
|
-
declare function StepperItem({
|
|
121
|
-
children,
|
|
122
|
-
title
|
|
123
|
-
}: {
|
|
124
|
-
children: React$1.ReactNode;
|
|
125
|
-
title?: string;
|
|
126
|
-
}): react_jsx_runtime7.JSX.Element;
|
|
127
|
-
//# sourceMappingURL=Stepper.d.ts.map
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region src/components/react/FileTree.d.ts
|
|
130
|
-
interface FileTreeProps {
|
|
131
|
-
name: string;
|
|
132
|
-
children?: React$1.ReactNode;
|
|
133
|
-
}
|
|
134
|
-
declare function Files({
|
|
135
|
-
children
|
|
136
|
-
}: {
|
|
137
|
-
children: React$1.ReactNode;
|
|
138
|
-
}): react_jsx_runtime7.JSX.Element;
|
|
139
|
-
declare function Folder({
|
|
140
|
-
name,
|
|
141
|
-
children
|
|
142
|
-
}: FileTreeProps): react_jsx_runtime7.JSX.Element;
|
|
143
|
-
declare function File({
|
|
144
|
-
name
|
|
145
|
-
}: FileTreeProps): react_jsx_runtime7.JSX.Element;
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region src/components/react/Kbd.d.ts
|
|
148
|
-
interface KbdProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
149
|
-
show?: string;
|
|
150
|
-
type?: 'window' | 'mac';
|
|
151
|
-
children?: React$1.ReactNode;
|
|
152
|
-
}
|
|
153
|
-
declare function Kbd({
|
|
154
|
-
show: keyProp,
|
|
155
|
-
type,
|
|
156
|
-
children,
|
|
157
|
-
...props
|
|
158
|
-
}: KbdProps): react_jsx_runtime7.JSX.Element;
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region src/components/react/Tooltip.d.ts
|
|
161
|
-
interface TooltipProps {
|
|
162
|
-
text: string;
|
|
163
|
-
tip: string;
|
|
164
|
-
}
|
|
165
|
-
declare function Tooltip({
|
|
166
|
-
text,
|
|
167
|
-
tip
|
|
168
|
-
}: TooltipProps): react_jsx_runtime7.JSX.Element;
|
|
169
|
-
//#endregion
|
|
170
|
-
//#region src/components/react/Youtube.d.ts
|
|
171
|
-
interface YoutubeProps {
|
|
172
|
-
videoId: string;
|
|
173
|
-
className?: string;
|
|
174
|
-
}
|
|
175
|
-
declare function Youtube({
|
|
176
|
-
videoId,
|
|
177
|
-
className
|
|
178
|
-
}: YoutubeProps): react_jsx_runtime7.JSX.Element;
|
|
179
|
-
//#endregion
|
|
180
|
-
//#region src/components/react/Button.d.ts
|
|
181
|
-
type ButtonProps = {
|
|
182
|
-
icon?: keyof typeof Icons;
|
|
183
|
-
text?: string;
|
|
184
|
-
href: string;
|
|
185
|
-
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
186
|
-
size?: "sm" | "md" | "lg";
|
|
187
|
-
variation?: "primary" | "accent" | "outline";
|
|
188
|
-
};
|
|
189
|
-
declare const Button: React$1.FC<ButtonProps>;
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region src/components/react/Link.d.ts
|
|
192
|
-
interface DocuLinkProps extends React$1.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
193
|
-
href: string;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Framework-agnostic Link component.
|
|
197
|
-
* Named `DocuLink` to avoid collision with native HTML `<link>` in MDX.
|
|
198
|
-
*/
|
|
199
|
-
declare function DocuLink({
|
|
200
|
-
href,
|
|
201
|
-
...props
|
|
202
|
-
}: DocuLinkProps): react_jsx_runtime7.JSX.Element | null;
|
|
203
|
-
//#endregion
|
|
204
|
-
//#region src/components/react/Image.d.ts
|
|
205
|
-
interface DocuImageProps {
|
|
206
|
-
src: string;
|
|
207
|
-
alt?: string;
|
|
208
|
-
width?: number | string;
|
|
209
|
-
height?: number | string;
|
|
210
|
-
className?: string;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Framework-agnostic Image component with lightbox.
|
|
214
|
-
* Uses useDocuBook().Image for the rendering primitive.
|
|
215
|
-
*/
|
|
216
|
-
declare function DocuImage({
|
|
217
|
-
src,
|
|
218
|
-
alt,
|
|
219
|
-
width,
|
|
220
|
-
height,
|
|
221
|
-
className,
|
|
222
|
-
...props
|
|
223
|
-
}: DocuImageProps): react_jsx_runtime7.JSX.Element | null;
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region src/components/react/Release.d.ts
|
|
226
|
-
interface ReleaseProps {
|
|
227
|
-
version: string;
|
|
228
|
-
title: string;
|
|
229
|
-
date?: string;
|
|
230
|
-
children: React$1.ReactNode;
|
|
231
|
-
}
|
|
232
|
-
declare function Release({
|
|
233
|
-
version,
|
|
234
|
-
title,
|
|
235
|
-
date,
|
|
236
|
-
children
|
|
237
|
-
}: ReleaseProps): react_jsx_runtime7.JSX.Element;
|
|
238
|
-
interface ChangesProps {
|
|
239
|
-
type: 'added' | 'fixed' | 'improved' | 'deprecated' | 'removed';
|
|
240
|
-
children: React$1.ReactNode;
|
|
241
|
-
}
|
|
242
|
-
declare function Changes({
|
|
243
|
-
type,
|
|
244
|
-
children
|
|
245
|
-
}: ChangesProps): react_jsx_runtime7.JSX.Element;
|
|
246
|
-
//#endregion
|
|
247
|
-
//#region src/components/react/Pre.d.ts
|
|
248
|
-
type PreProps = ComponentProps<'pre'> & {
|
|
249
|
-
raw?: string;
|
|
250
|
-
'data-title'?: string;
|
|
251
|
-
};
|
|
252
|
-
declare function Pre({
|
|
253
|
-
children,
|
|
254
|
-
raw,
|
|
255
|
-
...rest
|
|
256
|
-
}: PreProps): react_jsx_runtime7.JSX.Element;
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region src/components/react/Copy.d.ts
|
|
259
|
-
type CopyProps = {
|
|
260
|
-
content: string;
|
|
261
|
-
};
|
|
262
|
-
declare const Copy: React$1.FC<CopyProps>;
|
|
263
|
-
//#endregion
|
|
264
|
-
export { Accordion, AccordionGroup, Button, Card, CardGroup, Changes, Copy, type DocuBookConfig, type DocuBookImageProps, type DocuBookLinkProps, DocuBookProvider, DocuImage, DocuLink, File, Files, Folder, Kbd, Note, Pre, Release, Stepper, StepperItem, Tooltip, Youtube, useDocuBook };
|
|
265
|
-
//# sourceMappingURL=index-LWFtIGRd.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-LWFtIGRd.d.ts","names":[],"sources":["../../src/components/react/context.tsx","../../src/components/react/Note.tsx","../../src/components/react/Card.tsx","../../src/components/react/CardGroup.tsx","../../src/components/react/Accordion.tsx","../../src/components/react/AccordionGroup.tsx","../../src/components/react/Stepper.tsx","../../src/components/react/FileTree.tsx","../../src/components/react/Kbd.tsx","../../src/components/react/Tooltip.tsx","../../src/components/react/Youtube.tsx","../../src/components/react/Button.tsx","../../src/components/react/Link.tsx","../../src/components/react/Image.tsx","../../src/components/react/Release.tsx","../../src/components/react/Pre.tsx","../../src/components/react/Copy.tsx"],"sourcesContent":[],"mappings":"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"}
|
package/dist/context-BKx0jIwX.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React, { createContext, useContext } from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/components/react/context.tsx
|
|
5
|
-
const DefaultLink = ({ href, children, ...props }) => /* @__PURE__ */ jsx("a", {
|
|
6
|
-
href,
|
|
7
|
-
...props,
|
|
8
|
-
children
|
|
9
|
-
});
|
|
10
|
-
const DefaultImage = ({ src, alt, ...props }) => /* @__PURE__ */ jsx("img", {
|
|
11
|
-
src,
|
|
12
|
-
alt,
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
const DocuBookContext = createContext({
|
|
16
|
-
Link: DefaultLink,
|
|
17
|
-
Image: DefaultImage
|
|
18
|
-
});
|
|
19
|
-
/**
|
|
20
|
-
* Provider to inject framework-specific primitives (Link, Image)
|
|
21
|
-
* into all DocuBook components.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* // With Next.js adapter
|
|
25
|
-
* import { NextAdapter } from 'unplugin-docubook/adapters/next'
|
|
26
|
-
*
|
|
27
|
-
* <NextAdapter>
|
|
28
|
-
* <MDXContent />
|
|
29
|
-
* </NextAdapter>
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* // Custom adapter
|
|
33
|
-
* import { DocuBookProvider } from 'unplugin-docubook/components'
|
|
34
|
-
*
|
|
35
|
-
* <DocuBookProvider value={{ Link: MyLink, Image: MyImage }}>
|
|
36
|
-
* <MDXContent />
|
|
37
|
-
* </DocuBookProvider>
|
|
38
|
-
*/
|
|
39
|
-
const DocuBookProvider = DocuBookContext.Provider;
|
|
40
|
-
/**
|
|
41
|
-
* Hook to access the current DocuBook framework primitives.
|
|
42
|
-
*/
|
|
43
|
-
function useDocuBook() {
|
|
44
|
-
return useContext(DocuBookContext);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
//#endregion
|
|
48
|
-
export { useDocuBook as n, DocuBookProvider as t };
|
|
49
|
-
//# sourceMappingURL=context-BKx0jIwX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-BKx0jIwX.js","names":[],"sources":["../src/components/react/context.tsx"],"sourcesContent":["'use client'\n\nimport React, { createContext, useContext } from 'react'\n\n// ──────────────────────────────────────────────\n// Framework-agnostic primitive interfaces\n// ──────────────────────────────────────────────\n\nexport interface DocuBookLinkProps {\n href: string\n children?: React.ReactNode\n className?: string\n target?: string\n rel?: string\n [key: string]: unknown\n}\n\nexport interface DocuBookImageProps {\n src: string\n alt: string\n width?: number | string\n height?: number | string\n className?: string\n [key: string]: unknown\n}\n\nexport interface DocuBookConfig {\n /**\n * Framework-specific Link component.\n * Default: renders a native `<a>` tag.\n */\n Link: React.ComponentType<DocuBookLinkProps>\n\n /**\n * Framework-specific Image component.\n * Default: renders a native `<img>` tag.\n */\n Image: React.ComponentType<DocuBookImageProps>\n}\n\n// ──────────────────────────────────────────────\n// Defaults — pure HTML, works everywhere\n// ──────────────────────────────────────────────\n\nconst DefaultLink: React.FC<DocuBookLinkProps> = ({\n href,\n children,\n ...props\n}) => (\n <a href={href} {...props}>\n {children}\n </a>\n)\n\nconst DefaultImage: React.FC<DocuBookImageProps> = ({\n src,\n alt,\n ...props\n}) => <img src={src} alt={alt} {...props} />\n\nconst defaults: DocuBookConfig = {\n Link: DefaultLink,\n Image: DefaultImage,\n}\n\n// ──────────────────────────────────────────────\n// Context + hooks\n// ──────────────────────────────────────────────\n\nconst DocuBookContext = createContext<DocuBookConfig>(defaults)\n\n/**\n * Provider to inject framework-specific primitives (Link, Image)\n * into all DocuBook components.\n *\n * @example\n * // With Next.js adapter\n * import { NextAdapter } from 'unplugin-docubook/adapters/next'\n *\n * <NextAdapter>\n * <MDXContent />\n * </NextAdapter>\n *\n * @example\n * // Custom adapter\n * import { DocuBookProvider } from 'unplugin-docubook/components'\n *\n * <DocuBookProvider value={{ Link: MyLink, Image: MyImage }}>\n * <MDXContent />\n * </DocuBookProvider>\n */\nexport const DocuBookProvider = DocuBookContext.Provider\n\n/**\n * Hook to access the current DocuBook framework primitives.\n */\nexport function useDocuBook(): DocuBookConfig {\n return useContext(DocuBookContext)\n}\n"],"mappings":";;;;AA4CA,MAAM,eAA4C,EAC9C,MACA,UACA,GAAG,YAEH,oBAAC,KAAD;CAAS;CAAM,GAAI;CACd;CACD;AAGR,MAAM,gBAA8C,EAChD,KACA,KACA,GAAG,YACD,oBAAC,OAAD;CAAU;CAAU;CAAK,GAAI;CAAS;AAW5C,MAAM,kBAAkB,cATS;CAC7B,MAAM;CACN,OAAO;CACV,CAM8D;;;;;;;;;;;;;;;;;;;;;AAsB/D,MAAa,mBAAmB,gBAAgB;;;;AAKhD,SAAgB,cAA8B;AAC1C,QAAO,WAAW,gBAAgB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Options } from "./types-uxY1cMXO.js";
|
|
2
|
-
import * as esbuild0 from "esbuild";
|
|
3
|
-
|
|
4
|
-
//#region src/esbuild.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => esbuild0.Plugin;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { _default as default };
|
|
8
|
-
//# sourceMappingURL=esbuild-BD42nX0_.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild-BD42nX0_.d.ts","names":[],"sources":["../src/esbuild.ts"],"sourcesContent":[],"mappings":""}
|
package/dist/farm-C3XYk4nf.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"farm-C3XYk4nf.d.ts","names":[],"sources":["../src/farm.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { a as FrameworkLinkProps, i as FrameworkImageProps, n as FrameworkAdapter, r as FrameworkConfig, t as Framework } from "../types-BQhWL5Qs.js";
|
|
2
|
-
|
|
3
|
-
//#region src/framework/detect.d.ts
|
|
4
|
-
sideEffect();
|
|
5
|
-
declare function detectFramework(): Framework;
|
|
6
|
-
declare function isServerSideRendering(framework: Framework): boolean;
|
|
7
|
-
declare function requiresClientDirective(framework: Framework): boolean;
|
|
8
|
-
//# sourceMappingURL=detect.d.ts.map
|
|
9
|
-
//#endregion
|
|
10
|
-
export { Framework, FrameworkAdapter, FrameworkConfig, FrameworkImageProps, FrameworkLinkProps, detectFramework, isServerSideRendering, requiresClientDirective };
|
|
11
|
-
//# sourceMappingURL=index-98dEoo0g.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-98dEoo0g.d.ts","names":[],"sources":["../../src/framework/detect.ts"],"sourcesContent":[],"mappings":";;;AAQ+B,UAAA,CAAA,CAAA;iBAIf,eAAA,CAAA,GAAmB;iBAoBnB,qBAAA,YAAiC;iBAIjC,uBAAA,YAAmC"}
|
package/dist/framework/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region src/framework/detect.ts
|
|
2
|
-
function detectFramework() {
|
|
3
|
-
if (typeof window !== "undefined") {
|
|
4
|
-
if (window.__NEXT_DATA__) return "next";
|
|
5
|
-
}
|
|
6
|
-
if (typeof import.meta !== "undefined") {
|
|
7
|
-
if (import.meta.env?.NUXT) return "nuxt";
|
|
8
|
-
if (import.meta.env?.ASTRO) return "astro";
|
|
9
|
-
}
|
|
10
|
-
if (typeof process !== "undefined") {
|
|
11
|
-
if (process.env?.NEXT_RUNTIME === "edge") return "next";
|
|
12
|
-
if (process.env?.NEXT_PUBLIC_VERCEL_ENV) return "next";
|
|
13
|
-
}
|
|
14
|
-
return "react";
|
|
15
|
-
}
|
|
16
|
-
function isServerSideRendering(framework) {
|
|
17
|
-
return [
|
|
18
|
-
"next",
|
|
19
|
-
"astro",
|
|
20
|
-
"nuxt"
|
|
21
|
-
].includes(framework);
|
|
22
|
-
}
|
|
23
|
-
function requiresClientDirective(framework) {
|
|
24
|
-
return ["next", "astro"].includes(framework);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
export { detectFramework, isServerSideRendering, requiresClientDirective };
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/framework/detect.ts"],"sourcesContent":["import type { Framework } from './types'\n\ndeclare global {\n interface ImportMetaEnv {\n readonly NUXT?: boolean\n readonly ASTRO?: boolean\n }\n interface ImportMeta {\n readonly env: ImportMetaEnv\n }\n}\n\nexport function detectFramework(): Framework {\n if (typeof window !== 'undefined') {\n if ((window as unknown as { __NEXT_DATA__?: unknown }).__NEXT_DATA__) {\n return 'next'\n }\n }\n\n if (typeof import.meta !== 'undefined') {\n if (import.meta.env?.NUXT) return 'nuxt'\n if (import.meta.env?.ASTRO) return 'astro'\n }\n\n if (typeof process !== 'undefined') {\n if (process.env?.NEXT_RUNTIME === 'edge') return 'next'\n if (process.env?.NEXT_PUBLIC_VERCEL_ENV) return 'next'\n }\n\n return 'react'\n}\n\nexport function isServerSideRendering(framework: Framework): boolean {\n return ['next', 'astro', 'nuxt'].includes(framework)\n}\n\nexport function requiresClientDirective(framework: Framework): boolean {\n return ['next', 'astro'].includes(framework)\n}\n"],"mappings":";AAYA,SAAgB,kBAA6B;AAC3C,KAAI,OAAO,WAAW,aACpB;MAAK,OAAkD,cACrD,QAAO;;AAIX,KAAI,OAAO,OAAO,SAAS,aAAa;AACtC,MAAI,OAAO,KAAK,KAAK,KAAM,QAAO;AAClC,MAAI,OAAO,KAAK,KAAK,MAAO,QAAO;;AAGrC,KAAI,OAAO,YAAY,aAAa;AAClC,MAAI,QAAQ,KAAK,iBAAiB,OAAQ,QAAO;AACjD,MAAI,QAAQ,KAAK,uBAAwB,QAAO;;AAGlD,QAAO;;AAGT,SAAgB,sBAAsB,WAA+B;AACnE,QAAO;EAAC;EAAQ;EAAS;EAAO,CAAC,SAAS,UAAU;;AAGtD,SAAgB,wBAAwB,WAA+B;AACrE,QAAO,CAAC,QAAQ,QAAQ,CAAC,SAAS,UAAU"}
|
package/dist/index-2f48-Fxc.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Options } from "./types-uxY1cMXO.js";
|
|
2
|
-
import * as unplugin0 from "unplugin";
|
|
3
|
-
import { UnpluginFactory } from "unplugin";
|
|
4
|
-
|
|
5
|
-
//#region src/index.d.ts
|
|
6
|
-
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
7
|
-
declare const unplugin: unplugin0.UnpluginInstance<Options | undefined, boolean>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { unplugin as default, unplugin, unpluginFactory };
|
|
10
|
-
//# sourceMappingURL=index-2f48-Fxc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-2f48-Fxc.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;cAKa,iBAAiB,gBAAgB;cAiBjC,UAAQ,SAAA,CAAA,iBAAA"}
|
package/dist/nuxt-BidHgMAG.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nuxt-BidHgMAG.d.ts","names":[],"sources":["../src/nuxt.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Options } from "./types-uxY1cMXO.js";
|
|
2
|
-
import * as rolldown0 from "rolldown";
|
|
3
|
-
|
|
4
|
-
//#region src/rolldown.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => rolldown0.Plugin<any> | rolldown0.Plugin<any>[];
|
|
6
|
-
//#endregion
|
|
7
|
-
export { _default as default };
|
|
8
|
-
//# sourceMappingURL=rolldown-CrcgSKP1.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolldown-CrcgSKP1.d.ts","names":[],"sources":["../src/rolldown.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Options } from "./types-uxY1cMXO.js";
|
|
2
|
-
import * as rollup0 from "rollup";
|
|
3
|
-
|
|
4
|
-
//#region src/rollup.d.ts
|
|
5
|
-
declare const _default: (options?: Options | undefined) => rollup0.Plugin<any> | rollup0.Plugin<any>[];
|
|
6
|
-
//#endregion
|
|
7
|
-
export { _default as default };
|
|
8
|
-
//# sourceMappingURL=rollup-DDEc1C_K.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-DDEc1C_K.d.ts","names":[],"sources":["../src/rollup.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rspack-QbbymFlY.d.ts","names":[],"sources":["../src/rspack.ts"],"sourcesContent":[],"mappings":""}
|