@cyberpunk-vue/constants 0.1.0
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/dist/index.cjs +1 -0
- package/dist/index.mjs +7 -0
- package/package.json +46 -0
- package/src/index.ts +17 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cyberpunk Vue Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=Symbol("cp-defaults"),t=Symbol("cp-theme"),S="Cp",e="cp";exports.COMPONENT_PREFIX=S;exports.CSS_NAMESPACE=e;exports.DEFAULTS_KEY=E;exports.THEME_KEY=t;
|
package/dist/index.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cyberpunk-vue/constants",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Cyberpunk Vue shared constants and type definitions",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./*": "./*"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"author": "Juxest",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/user/cyberpunk-vue.git",
|
|
27
|
+
"directory": "packages/constants"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/user/cyberpunk-vue#readme",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/user/cyberpunk-vue/issues"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"vue",
|
|
35
|
+
"vue3",
|
|
36
|
+
"constants",
|
|
37
|
+
"types",
|
|
38
|
+
"cyberpunk"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "vite build"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InjectionKey, Ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
/** 主题类型 */
|
|
4
|
+
export type ThemeType = 'dark' | 'light'
|
|
5
|
+
|
|
6
|
+
/** 全局默认配置注入 Key */
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- 动态组件配置需要 any 类型
|
|
8
|
+
export const DEFAULTS_KEY: InjectionKey<Record<string, any>> = Symbol('cp-defaults')
|
|
9
|
+
|
|
10
|
+
/** 主题注入 Key */
|
|
11
|
+
export const THEME_KEY: InjectionKey<Ref<ThemeType>> = Symbol('cp-theme')
|
|
12
|
+
|
|
13
|
+
/** 组件前缀 */
|
|
14
|
+
export const COMPONENT_PREFIX = 'Cp'
|
|
15
|
+
|
|
16
|
+
/** CSS 命名空间 */
|
|
17
|
+
export const CSS_NAMESPACE = 'cp'
|