@do11y/docs 0.0.1 → 0.0.3

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/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const ui: string;
2
+ export declare const root: string;
3
+ export declare const docs: string;
4
+ export declare const plugins: string;
package/dist/files.js CHANGED
@@ -3,6 +3,6 @@ import { createRequire } from 'node:module';
3
3
  import { searchForWorkspaceRoot } from 'vite';
4
4
  const require = createRequire(import.meta.url);
5
5
  export const ui = join(dirname(require.resolve('@do11y/ui/package.json')));
6
- export const root = join(searchForWorkspaceRoot(process.cwd()), 'example');
6
+ export const root = searchForWorkspaceRoot(process.cwd());
7
7
  export const docs = join(root, 'docs');
8
8
  export const plugins = join(docs, 'site', 'plugins.ts');
@@ -0,0 +1,2 @@
1
+ import type { Plugin } from 'vite';
2
+ export declare const html: (folder: string, key: "index" | "sandbox") => Omit<Plugin, "name">;
@@ -0,0 +1,3 @@
1
+ import type { PluginOptions } from './plugin-options.js';
2
+ import type { Site } from './plugins/site/site.js';
3
+ export type { Site, PluginOptions };
@@ -0,0 +1,6 @@
1
+ import type { MarkdownPluginOptions } from './plugins/markdown/markdown.js';
2
+ export type PluginOptions = MarkdownPluginOptions;
3
+ /**
4
+ * Access plugin options (`docs/site/plugins.ts`).
5
+ */
6
+ export declare const pluginOptions: PluginOptions;
@@ -0,0 +1,36 @@
1
+ import { type MarkdownSfcBlocks } from '@mdit-vue/plugin-sfc';
2
+ import type { PluginOptions, MarkdownItEnv as Env } from 'markdown-it-vue-meta';
3
+ import type { PluginSimple } from 'markdown-it';
4
+ import type { Plugin } from 'vite';
5
+ import type MarkdownIt from 'markdown-it';
6
+ export interface MarkdownPluginOptions {
7
+ /**
8
+ * Additional markdown-it setup.
9
+ */
10
+ setup?: PluginSimple;
11
+ /**
12
+ * The highlight option for `markdown-it`.
13
+ */
14
+ highlight?: (md: MarkdownIt, code: string, lang: string, attrs: string) => string;
15
+ /**
16
+ * The renderer option for `markdown-it-vue-meta`.
17
+ */
18
+ metaRenderer?: PluginOptions['renderer'];
19
+ }
20
+ export interface MarkdownItEnv extends Env {
21
+ /**
22
+ * Blocks extracted by `@mdit-vue/plugin-sfc`.
23
+ */
24
+ sfcBlocks?: MarkdownSfcBlocks;
25
+ /**
26
+ * Blocks extracted by `@mdit-vue/plugin-frontmatter`.
27
+ */
28
+ frontmatter?: Record<string, unknown>;
29
+ }
30
+ /**
31
+ * Processes blocks with the lang set to `md` into HTML,
32
+ * and turns `.md` files into single file vue components
33
+ * - using `markdown-it`.
34
+ */
35
+ declare const _default: (options?: MarkdownPluginOptions) => Plugin;
36
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { Plugin } from 'vite';
2
+ export declare const plugins: () => Plugin[];
@@ -0,0 +1,7 @@
1
+ import type { Plugin } from 'vite';
2
+ /**
3
+ * Adds the ability to import routes (`*.md` files)
4
+ * through `do11y:routes`.
5
+ */
6
+ declare const _default: () => Plugin;
7
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import type { Plugin } from 'vite';
2
+ /**
3
+ * Creates a seprate sandbox app, and
4
+ * adds the ability to declare sandbox components
5
+ * which you can access through `do11y:sandbox`.
6
+ */
7
+ declare const _default: () => Plugin;
8
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type { Plugin } from 'vite';
2
+ import type { App, Component } from 'vue';
3
+ import type { Router } from 'vue-router';
4
+ export type Site = {
5
+ /**
6
+ * The main component for the site.
7
+ */
8
+ Site: () => Promise<Component>;
9
+ /**
10
+ * Additional setup for the app.
11
+ */
12
+ setup?(app: App, router: Router): void | Promise<void>;
13
+ };
14
+ /**
15
+ * Add ability to access the site options (`docs/site/index.ts`)
16
+ * through `do11y:site`.
17
+ */
18
+ declare const _default: () => Plugin;
19
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { Plugin } from 'vite';
2
+ /**
3
+ * The main application.
4
+ */
5
+ declare const _default: () => Plugin;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export declare const getUserViteConfig: (command: "dev" | "build" | "preview") => Promise<import("vite").UserConfig>;
2
+ export declare const getViteConfig: (command: "dev" | "build" | "preview") => Promise<Record<string, any>>;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@do11y/docs",
3
- "version": "0.0.1",
3
+ "description": "A very bare-bones tool to help document Vue components.",
4
+ "version": "0.0.3",
4
5
  "type": "module",
5
6
  "repository": {
6
7
  "type": "git",
@@ -15,7 +16,10 @@
15
16
  "do11y": "./bin/bin.js"
16
17
  },
17
18
  "exports": {
18
- ".": "./dist/index.js",
19
+ ".": {
20
+ "import": "./dist/index.js",
21
+ "types": "./dist/index.d.ts"
22
+ },
19
23
  "./types": "./routes.d.ts"
20
24
  },
21
25
  "peerDependencies": {