@do11y/ui 0.0.0 → 0.0.1
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/package.json +4 -1
- package/env.d.ts +0 -29
- package/src/bundle-docs.js +0 -1
- package/src/bundle-sandbox.js +0 -1
- package/src/docs/Docs.vue +0 -14
- package/src/docs/index.ts +0 -18
- package/src/docs/router.ts +0 -11
- package/src/sandbox/Sandbox.vue +0 -3
- package/src/sandbox/index.ts +0 -23
- package/tsconfig.json +0 -8
- package/vite.config.ts +0 -36
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@do11y/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/sq11y/do11y"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
9
12
|
"peerDependencies": {
|
|
10
13
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
11
14
|
"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
|
-
}
|
package/src/bundle-docs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './bundled/docs.js';
|
package/src/bundle-sandbox.js
DELETED
|
@@ -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
|
-
})();
|
package/src/docs/router.ts
DELETED
package/src/sandbox/Sandbox.vue
DELETED
package/src/sandbox/index.ts
DELETED
|
@@ -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
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
|
-
});
|