@do11y/ui 0.0.0 → 0.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 ADDED
@@ -0,0 +1,3 @@
1
+ # @do11y/ui
2
+
3
+ A very bare-bones UI for [`@do11y/docs`](https://www.npmjs.com/package/@do11y/docs).
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@do11y/ui",
3
- "version": "0.0.0",
3
+ "description": "The UI for @do11y/docs - a very bare-bones tool to help document Vue components.",
4
+ "version": "0.0.2",
4
5
  "type": "module",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "https://github.com/sq11y/do11y"
8
9
  },
10
+ "files": [
11
+ "dist"
12
+ ],
9
13
  "peerDependencies": {
10
14
  "@vitejs/plugin-vue": "^6.0.2",
11
15
  "vue": "3.5.25"
package/env.d.ts DELETED
@@ -1,29 +0,0 @@
1
- /// <reference types="vite/client" />
2
-
3
- declare module 'do11y:routes' {
4
- import type { RouteRecordRaw } from 'vue-router';
5
- const routes: RouteRecordRaw[];
6
- export default routes;
7
- }
8
-
9
- declare module 'do11y:site' {
10
- import type { Router } from 'vue-router';
11
-
12
- const site: {
13
- Site: () => Promise<Component>;
14
- setup?(app: App, router?: Router): void | Promise<void>;
15
- };
16
-
17
- export default site;
18
- }
19
-
20
- declare module 'do11y:sandbox' {
21
- import type { Component } from 'vue';
22
-
23
- const sandboxes: {
24
- url: string;
25
- component: () => Promise<Component>;
26
- }[];
27
-
28
- export default sandboxes;
29
- }
@@ -1 +0,0 @@
1
- import './bundled/docs.js';
@@ -1 +0,0 @@
1
- import './bundled/sandbox.js';
package/src/docs/Docs.vue DELETED
@@ -1,14 +0,0 @@
1
- <template>
2
- <slot />
3
- </template>
4
-
5
- <script lang="ts" setup>
6
- import { computed, provide } from 'vue';
7
- import { useRoute } from 'vue-router';
8
-
9
- const route = useRoute();
10
-
11
- const frontmatter = computed(() => route?.meta ?? {});
12
-
13
- provide('frontmatter', frontmatter);
14
- </script>
package/src/docs/index.ts DELETED
@@ -1,18 +0,0 @@
1
- import { createApp, h } from 'vue';
2
- import { router } from './router';
3
-
4
- import site from 'do11y:site';
5
-
6
- import _ from './Docs.vue';
7
-
8
- (async () => {
9
- const component = (await (site as any).Site()).default;
10
-
11
- const app = createApp(h(_, undefined, () => h(component)));
12
-
13
- app.use(router);
14
-
15
- await site.setup?.(app, router);
16
-
17
- app.mount('#app');
18
- })();
@@ -1,11 +0,0 @@
1
- import routes from 'do11y:routes';
2
-
3
- import { createRouter, createWebHashHistory } from 'vue-router';
4
-
5
- export const router = createRouter({
6
- /**
7
- * @TODO
8
- */
9
- history: createWebHashHistory(import.meta.env.BASE_URL),
10
- routes,
11
- });
@@ -1,3 +0,0 @@
1
- <template>
2
- <slot />
3
- </template>
@@ -1,23 +0,0 @@
1
- import { createApp, h } from 'vue';
2
- import { parseQuery } from 'vue-router';
3
-
4
- import sandbox from 'do11y:sandbox';
5
- import site from 'do11y:site';
6
-
7
- import _ from './Sandbox.vue';
8
-
9
- const query = parseQuery(window.location.search);
10
-
11
- const { component } = sandbox.find(({ url }: any) => url === query.id) ?? {};
12
-
13
- if (component) {
14
- (async () => {
15
- const resolvedComponent = await component();
16
-
17
- const app = createApp(h(_, undefined, () => h(resolvedComponent)));
18
-
19
- await site.setup?.(app);
20
-
21
- app.mount('#app');
22
- })();
23
- }
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "@vue/tsconfig/tsconfig.dom.json",
3
- "include": ["env.d.ts", "src/**/*"],
4
-
5
- "compilerOptions": {
6
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo"
7
- }
8
- }
package/vite.config.ts DELETED
@@ -1,36 +0,0 @@
1
- import { defineConfig } from 'vite';
2
-
3
- import vue from '@vitejs/plugin-vue';
4
-
5
- export default defineConfig({
6
- plugins: [
7
- vue(),
8
- {
9
- name: 'ok',
10
-
11
- writeBundle() {},
12
- },
13
- ],
14
-
15
- build: {
16
- outDir: 'dist/bundled',
17
-
18
- rollupOptions: {
19
- input: {
20
- docs: './src/docs/index.ts',
21
- sandbox: './src/sandbox/index.ts',
22
- },
23
-
24
- output: {
25
- entryFileNames: () => '[name].js',
26
- chunkFileNames: '[name].js',
27
- assetFileNames: () => '[name].[ext]',
28
- },
29
-
30
- treeshake: false,
31
- preserveEntrySignatures: 'strict',
32
-
33
- external: ['vue', 'do11y:sandbox', 'do11y:site', 'do11y:routes'],
34
- },
35
- },
36
- });