@dou-ui/nuxt 0.0.0-stage → 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +17 -2
- package/dist/module.js +1463 -0
- package/dist/types/module.d.ts +69 -0
- package/package.json +54 -4
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { GlobalConfig, UseColorModeOptions } from 'dou-ui';
|
|
2
|
+
export interface ModuleOptions {
|
|
3
|
+
/**
|
|
4
|
+
* How styles are loaded.
|
|
5
|
+
*
|
|
6
|
+
* - `'full'`: the whole stylesheet, once, in every page.
|
|
7
|
+
* - `'on-demand'`: each component brings the style entry it needs.
|
|
8
|
+
* - `false`: nothing; load the styles yourself.
|
|
9
|
+
*
|
|
10
|
+
* @default 'full'
|
|
11
|
+
*/
|
|
12
|
+
css?: 'full' | 'on-demand' | false;
|
|
13
|
+
/**
|
|
14
|
+
* Register every component of `dou-ui` (`<DouButton>`, …) for templates,
|
|
15
|
+
* and those of the installed packages built on it (`<DouChart>`,
|
|
16
|
+
* `<DouEditor>`, …). Only the ones a page uses end up in its bundle.
|
|
17
|
+
*
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
components?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Register `v-loading` and `v-infinite-scroll`.
|
|
23
|
+
*
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
directives?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Import `toast`, `dialog`, `useDialog`, `useColorMode`, `useCountdown`,
|
|
29
|
+
* `useSortable`, `vLoading` and `vInfiniteScroll` automatically.
|
|
30
|
+
*
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
imports?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Register the icons of `@dou-ui/icons` (`<SearchIcon />`, …) for
|
|
36
|
+
* templates.
|
|
37
|
+
*
|
|
38
|
+
* @default true when `@dou-ui/icons` is installed
|
|
39
|
+
*/
|
|
40
|
+
icons?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Paint the server-rendered page in the color mode the visitor picked,
|
|
43
|
+
* with a small script in `<head>`. Pass the options of `useColorMode()`
|
|
44
|
+
* to change where the choice is kept, or `false` to leave color mode
|
|
45
|
+
* to the app.
|
|
46
|
+
*
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
colorMode?: boolean | Omit<UseColorModeOptions, 'target' | 'disableTransition'>;
|
|
50
|
+
/** Names to leave alone, e.g. ones the app defines itself. */
|
|
51
|
+
exclude?: string[];
|
|
52
|
+
}
|
|
53
|
+
declare module '@nuxt/schema' {
|
|
54
|
+
interface NuxtConfig {
|
|
55
|
+
douUI?: ModuleOptions;
|
|
56
|
+
}
|
|
57
|
+
interface NuxtOptions {
|
|
58
|
+
douUI?: ModuleOptions;
|
|
59
|
+
}
|
|
60
|
+
interface AppConfigInput {
|
|
61
|
+
/** App-wide defaults for DouUI components: size, locale and `z-index`. */
|
|
62
|
+
douUI?: GlobalConfig;
|
|
63
|
+
}
|
|
64
|
+
interface AppConfig {
|
|
65
|
+
douUI?: GlobalConfig;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
declare const _default: import("@nuxt/schema").NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
69
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dou-ui/nuxt",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-alpha.1",
|
|
4
|
+
"description": "DouUI 的 Nuxt 模块:组件、指令与函数自动导入,样式与配色模式开箱即用,支持服务端渲染",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vue",
|
|
7
|
+
"nuxt",
|
|
8
|
+
"nuxt-module",
|
|
9
|
+
"dou-ui"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "daidr <daidr@daidr.me>",
|
|
13
|
+
"homepage": "https://github.com/daidr/dou-ui#readme",
|
|
14
|
+
"bugs": "https://github.com/daidr/dou-ui/issues",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/daidr/dou-ui.git",
|
|
18
|
+
"directory": "packages/nuxt"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"main": "./dist/module.js",
|
|
23
|
+
"types": "./dist/types/module.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/types/module.d.ts",
|
|
27
|
+
"import": "./dist/module.js"
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "bun scripts/build.ts",
|
|
36
|
+
"play": "nuxt dev playground",
|
|
37
|
+
"play:build": "nuxt build playground && nuxt preview playground"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"dou-ui": "0.1.0-alpha.1",
|
|
41
|
+
"nuxt": "^4.0.0"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@dou-ui/resolver": "0.1.0-alpha.1",
|
|
45
|
+
"@nuxt/kit": "^4.0.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@dou-ui/icons": "0.1.0-alpha.1",
|
|
49
|
+
"@nuxt/schema": "^4.6.3",
|
|
50
|
+
"dou-ui": "0.1.0-alpha.1",
|
|
51
|
+
"nuxt": "^4.6.3"
|
|
52
|
+
},
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
}
|
|
56
|
+
}
|