@5even7/dlc-ui 0.2.14 → 0.2.16
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/CHANGELOG.md +120 -116
- package/LICENSE +21 -21
- package/README.md +313 -313
- package/dist/capsule.cjs +32 -32
- package/dist/capsule.mjs +1070 -1070
- package/dist/color.cjs +33 -33
- package/dist/color.mjs +1019 -1019
- package/dist/emo.cjs +19008 -7492
- package/dist/emo.mjs +439 -436
- package/dist/index.cjs +19061 -7545
- package/dist/index.mjs +3748 -3745
- package/dist/index.umd.js +33624 -45215
- package/dist/index.umd.min.js +1 -1
- package/dist/progress.cjs +42 -42
- package/dist/progress.mjs +2154 -2154
- package/dist/vue2.cjs +19074 -7558
- package/dist/vue2.mjs +4184 -4181
- package/dist/vue3.cjs +19074 -7558
- package/dist/vue3.mjs +4184 -4181
- package/package.json +135 -135
- package/styles/base.css +32 -32
- package/styles/color.css +18 -18
- package/styles/emo.css +33 -32
- package/styles/progress.css +96 -96
- package/types/capsule.d.ts +15 -15
- package/types/color.d.ts +15 -15
- package/types/emo.d.ts +11 -11
- package/types/index.d.ts +393 -393
- package/types/progress.d.ts +16 -16
- package/types/vue2.d.ts +10 -10
- package/types/vue3.d.ts +144 -144
package/package.json
CHANGED
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@5even7/dlc-ui",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"access": "public",
|
|
6
|
-
"registry": "https://registry.npmjs.org"
|
|
7
|
-
},
|
|
8
|
-
"description": "DLC 星云胶囊、流体进度、动态背景与 Lottie 表情组件库,支持 H5 / Vue2 / Vue3。",
|
|
9
|
-
"type": "module",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://gitee.com/K_a1/cosmic-capsules.git"
|
|
13
|
-
},
|
|
14
|
-
"main": "./dist/index.cjs",
|
|
15
|
-
"module": "./dist/index.mjs",
|
|
16
|
-
"types": "./types/index.d.ts",
|
|
17
|
-
"unpkg": "./dist/index.umd.min.js",
|
|
18
|
-
"jsdelivr": "./dist/index.umd.min.js",
|
|
19
|
-
"exports": {
|
|
20
|
-
".": {
|
|
21
|
-
"types": "./types/index.d.ts",
|
|
22
|
-
"import": "./dist/index.mjs",
|
|
23
|
-
"require": "./dist/index.cjs",
|
|
24
|
-
"default": "./dist/index.mjs"
|
|
25
|
-
},
|
|
26
|
-
"./capsule": {
|
|
27
|
-
"types": "./types/capsule.d.ts",
|
|
28
|
-
"import": "./dist/capsule.mjs",
|
|
29
|
-
"require": "./dist/capsule.cjs",
|
|
30
|
-
"default": "./dist/capsule.mjs"
|
|
31
|
-
},
|
|
32
|
-
"./progress": {
|
|
33
|
-
"types": "./types/progress.d.ts",
|
|
34
|
-
"import": "./dist/progress.mjs",
|
|
35
|
-
"require": "./dist/progress.cjs",
|
|
36
|
-
"default": "./dist/progress.mjs"
|
|
37
|
-
},
|
|
38
|
-
"./color": {
|
|
39
|
-
"types": "./types/color.d.ts",
|
|
40
|
-
"import": "./dist/color.mjs",
|
|
41
|
-
"require": "./dist/color.cjs",
|
|
42
|
-
"default": "./dist/color.mjs"
|
|
43
|
-
},
|
|
44
|
-
"./emo": {
|
|
45
|
-
"types": "./types/emo.d.ts",
|
|
46
|
-
"import": "./dist/emo.mjs",
|
|
47
|
-
"require": "./dist/emo.cjs",
|
|
48
|
-
"default": "./dist/emo.mjs"
|
|
49
|
-
},
|
|
50
|
-
"./vue3": {
|
|
51
|
-
"types": "./types/vue3.d.ts",
|
|
52
|
-
"import": "./dist/vue3.mjs",
|
|
53
|
-
"require": "./dist/vue3.cjs",
|
|
54
|
-
"default": "./dist/vue3.mjs"
|
|
55
|
-
},
|
|
56
|
-
"./vue2": {
|
|
57
|
-
"types": "./types/vue2.d.ts",
|
|
58
|
-
"import": "./dist/vue2.mjs",
|
|
59
|
-
"require": "./dist/vue2.cjs",
|
|
60
|
-
"default": "./dist/vue2.mjs"
|
|
61
|
-
},
|
|
62
|
-
"./style.css": "./styles/theme.css",
|
|
63
|
-
"./capsule/style.css": "./styles/capsule.css",
|
|
64
|
-
"./progress/style.css": "./styles/progress.css",
|
|
65
|
-
"./color/style.css": "./styles/color.css",
|
|
66
|
-
"./emo/style.css": "./styles/emo.css",
|
|
67
|
-
"./package.json": "./package.json"
|
|
68
|
-
},
|
|
69
|
-
"files": [
|
|
70
|
-
"dist",
|
|
71
|
-
"styles",
|
|
72
|
-
"types",
|
|
73
|
-
"README.md",
|
|
74
|
-
"LICENSE",
|
|
75
|
-
"CHANGELOG.md"
|
|
76
|
-
],
|
|
77
|
-
"peerDependencies": {
|
|
78
|
-
"vue": ">=2.7.0"
|
|
79
|
-
},
|
|
80
|
-
"peerDependenciesMeta": {
|
|
81
|
-
"vue": {
|
|
82
|
-
"optional": true
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"sideEffects": [
|
|
86
|
-
"./styles/*.css"
|
|
87
|
-
],
|
|
88
|
-
"scripts": {
|
|
89
|
-
"build": "node scripts/generate-emo-assets.mjs && rollup -c && node scripts/copy-css.mjs",
|
|
90
|
-
"test": "node --test",
|
|
91
|
-
"serve": "node scripts/serve.mjs",
|
|
92
|
-
"demo:h5": "node scripts/serve.mjs",
|
|
93
|
-
"demo:vue3": "npm --prefix examples/vue3 run dev",
|
|
94
|
-
"demo:vue2": "npm --prefix examples/vue2 run dev",
|
|
95
|
-
"prepublishOnly": "npm run build && npm test"
|
|
96
|
-
},
|
|
97
|
-
"keywords": [
|
|
98
|
-
"capsule",
|
|
99
|
-
"progress",
|
|
100
|
-
"webgl",
|
|
101
|
-
"canvas",
|
|
102
|
-
"nebula",
|
|
103
|
-
"background",
|
|
104
|
-
"color",
|
|
105
|
-
"vue",
|
|
106
|
-
"vue2",
|
|
107
|
-
"vue3",
|
|
108
|
-
"h5",
|
|
109
|
-
"component",
|
|
110
|
-
"lottie",
|
|
111
|
-
"emotion",
|
|
112
|
-
"emoji"
|
|
113
|
-
],
|
|
114
|
-
"license": "MIT",
|
|
115
|
-
"engines": {
|
|
116
|
-
"node": ">=18"
|
|
117
|
-
},
|
|
118
|
-
"devDependencies": {
|
|
119
|
-
"@babel/core": "^7.26.0",
|
|
120
|
-
"@babel/preset-env": "^7.26.0",
|
|
121
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
122
|
-
"@rollup/plugin-commonjs": "^28.0.1",
|
|
123
|
-
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
124
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
125
|
-
"intersection-observer": "^0.12.2",
|
|
126
|
-
"jsdom": "^24.1.0",
|
|
127
|
-
"pepjs": "^0.5.3",
|
|
128
|
-
"resize-observer-polyfill": "^1.5.1",
|
|
129
|
-
"rollup": "^4.24.0",
|
|
130
|
-
"vue": "^3.4.0"
|
|
131
|
-
},
|
|
132
|
-
"dependencies": {
|
|
133
|
-
"lottie-web": "^5.13.0"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@5even7/dlc-ui",
|
|
3
|
+
"version": "0.2.16",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public",
|
|
6
|
+
"registry": "https://registry.npmjs.org"
|
|
7
|
+
},
|
|
8
|
+
"description": "DLC 星云胶囊、流体进度、动态背景与 Lottie 表情组件库,支持 H5 / Vue2 / Vue3。",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://gitee.com/K_a1/cosmic-capsules.git"
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/index.cjs",
|
|
15
|
+
"module": "./dist/index.mjs",
|
|
16
|
+
"types": "./types/index.d.ts",
|
|
17
|
+
"unpkg": "./dist/index.umd.min.js",
|
|
18
|
+
"jsdelivr": "./dist/index.umd.min.js",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./types/index.d.ts",
|
|
22
|
+
"import": "./dist/index.mjs",
|
|
23
|
+
"require": "./dist/index.cjs",
|
|
24
|
+
"default": "./dist/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"./capsule": {
|
|
27
|
+
"types": "./types/capsule.d.ts",
|
|
28
|
+
"import": "./dist/capsule.mjs",
|
|
29
|
+
"require": "./dist/capsule.cjs",
|
|
30
|
+
"default": "./dist/capsule.mjs"
|
|
31
|
+
},
|
|
32
|
+
"./progress": {
|
|
33
|
+
"types": "./types/progress.d.ts",
|
|
34
|
+
"import": "./dist/progress.mjs",
|
|
35
|
+
"require": "./dist/progress.cjs",
|
|
36
|
+
"default": "./dist/progress.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./color": {
|
|
39
|
+
"types": "./types/color.d.ts",
|
|
40
|
+
"import": "./dist/color.mjs",
|
|
41
|
+
"require": "./dist/color.cjs",
|
|
42
|
+
"default": "./dist/color.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./emo": {
|
|
45
|
+
"types": "./types/emo.d.ts",
|
|
46
|
+
"import": "./dist/emo.mjs",
|
|
47
|
+
"require": "./dist/emo.cjs",
|
|
48
|
+
"default": "./dist/emo.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./vue3": {
|
|
51
|
+
"types": "./types/vue3.d.ts",
|
|
52
|
+
"import": "./dist/vue3.mjs",
|
|
53
|
+
"require": "./dist/vue3.cjs",
|
|
54
|
+
"default": "./dist/vue3.mjs"
|
|
55
|
+
},
|
|
56
|
+
"./vue2": {
|
|
57
|
+
"types": "./types/vue2.d.ts",
|
|
58
|
+
"import": "./dist/vue2.mjs",
|
|
59
|
+
"require": "./dist/vue2.cjs",
|
|
60
|
+
"default": "./dist/vue2.mjs"
|
|
61
|
+
},
|
|
62
|
+
"./style.css": "./styles/theme.css",
|
|
63
|
+
"./capsule/style.css": "./styles/capsule.css",
|
|
64
|
+
"./progress/style.css": "./styles/progress.css",
|
|
65
|
+
"./color/style.css": "./styles/color.css",
|
|
66
|
+
"./emo/style.css": "./styles/emo.css",
|
|
67
|
+
"./package.json": "./package.json"
|
|
68
|
+
},
|
|
69
|
+
"files": [
|
|
70
|
+
"dist",
|
|
71
|
+
"styles",
|
|
72
|
+
"types",
|
|
73
|
+
"README.md",
|
|
74
|
+
"LICENSE",
|
|
75
|
+
"CHANGELOG.md"
|
|
76
|
+
],
|
|
77
|
+
"peerDependencies": {
|
|
78
|
+
"vue": ">=2.7.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependenciesMeta": {
|
|
81
|
+
"vue": {
|
|
82
|
+
"optional": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"sideEffects": [
|
|
86
|
+
"./styles/*.css"
|
|
87
|
+
],
|
|
88
|
+
"scripts": {
|
|
89
|
+
"build": "node scripts/generate-emo-assets.mjs && rollup -c && node scripts/copy-css.mjs",
|
|
90
|
+
"test": "node --test",
|
|
91
|
+
"serve": "node scripts/serve.mjs",
|
|
92
|
+
"demo:h5": "node scripts/serve.mjs",
|
|
93
|
+
"demo:vue3": "npm --prefix examples/vue3 run dev",
|
|
94
|
+
"demo:vue2": "npm --prefix examples/vue2 run dev",
|
|
95
|
+
"prepublishOnly": "npm run build && npm test"
|
|
96
|
+
},
|
|
97
|
+
"keywords": [
|
|
98
|
+
"capsule",
|
|
99
|
+
"progress",
|
|
100
|
+
"webgl",
|
|
101
|
+
"canvas",
|
|
102
|
+
"nebula",
|
|
103
|
+
"background",
|
|
104
|
+
"color",
|
|
105
|
+
"vue",
|
|
106
|
+
"vue2",
|
|
107
|
+
"vue3",
|
|
108
|
+
"h5",
|
|
109
|
+
"component",
|
|
110
|
+
"lottie",
|
|
111
|
+
"emotion",
|
|
112
|
+
"emoji"
|
|
113
|
+
],
|
|
114
|
+
"license": "MIT",
|
|
115
|
+
"engines": {
|
|
116
|
+
"node": ">=18"
|
|
117
|
+
},
|
|
118
|
+
"devDependencies": {
|
|
119
|
+
"@babel/core": "^7.26.0",
|
|
120
|
+
"@babel/preset-env": "^7.26.0",
|
|
121
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
122
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
123
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
124
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
125
|
+
"intersection-observer": "^0.12.2",
|
|
126
|
+
"jsdom": "^24.1.0",
|
|
127
|
+
"pepjs": "^0.5.3",
|
|
128
|
+
"resize-observer-polyfill": "^1.5.1",
|
|
129
|
+
"rollup": "^4.24.0",
|
|
130
|
+
"vue": "^3.4.0"
|
|
131
|
+
},
|
|
132
|
+
"dependencies": {
|
|
133
|
+
"lottie-web": "^5.13.0"
|
|
134
|
+
}
|
|
135
|
+
}
|
package/styles/base.css
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @5even7/dlc-ui — shared base styles.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
.hj-capsule-root {
|
|
6
|
-
--hj-radius: 999px;
|
|
7
|
-
--hj-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
8
|
-
"PingFang SC", "Microsoft YaHei", sans-serif;
|
|
9
|
-
--hj-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
1
|
+
/*
|
|
2
|
+
* @5even7/dlc-ui — shared base styles.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
.hj-capsule-root {
|
|
6
|
+
--hj-radius: 999px;
|
|
7
|
+
--hj-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
|
8
|
+
"PingFang SC", "Microsoft YaHei", sans-serif;
|
|
9
|
+
--hj-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
10
10
|
--hj-bg: #faf8f2;
|
|
11
11
|
--hj-ink: #20231f;
|
|
12
12
|
--hj-muted: #77786f;
|
|
@@ -19,31 +19,31 @@
|
|
|
19
19
|
--hj-copy-left: 30px;
|
|
20
20
|
--hj-value-right: 30px;
|
|
21
21
|
--hj-copy-max-width: 54%;
|
|
22
|
-
|
|
23
|
-
position: relative;
|
|
24
|
-
display: block;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
border-radius: var(--hj-radius);
|
|
28
|
-
background: var(--hj-bg);
|
|
29
|
-
isolation: isolate;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.hj-capsule-root *,
|
|
33
|
-
.hj-capsule-root *::before,
|
|
34
|
-
.hj-capsule-root *::after {
|
|
35
|
-
box-sizing: border-box;
|
|
36
|
-
}
|
|
37
|
-
|
|
22
|
+
|
|
23
|
+
position: relative;
|
|
24
|
+
display: block;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
border-radius: var(--hj-radius);
|
|
28
|
+
background: var(--hj-bg);
|
|
29
|
+
isolation: isolate;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hj-capsule-root *,
|
|
33
|
+
.hj-capsule-root *::before,
|
|
34
|
+
.hj-capsule-root *::after {
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
38
|
.hj-capsule-canvas,
|
|
39
39
|
.hj-progress-canvas {
|
|
40
|
-
position: absolute;
|
|
41
|
-
inset: 0;
|
|
42
|
-
z-index: 1;
|
|
43
|
-
display: block;
|
|
44
|
-
width: 100%;
|
|
45
|
-
height: 100%;
|
|
46
|
-
border-radius: inherit;
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset: 0;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
display: block;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
border-radius: inherit;
|
|
47
47
|
pointer-events: none;
|
|
48
48
|
}
|
|
49
49
|
|
package/styles/color.css
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/* dlc-color: nebula background layer (same renderer as CosmicCapsule). */
|
|
2
|
-
|
|
3
|
-
.dlc-color-layer {
|
|
4
|
-
position: absolute;
|
|
5
|
-
inset: 0;
|
|
6
|
-
z-index: var(--dlc-color-layer-z, -1);
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
border-radius: inherit;
|
|
9
|
-
pointer-events: none;
|
|
10
|
-
background: var(--dlc-color-bg, transparent);
|
|
11
|
-
opacity: var(--dlc-color-opacity, 1);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.dlc-color-canvas {
|
|
15
|
-
display: block;
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
}
|
|
1
|
+
/* dlc-color: nebula background layer (same renderer as CosmicCapsule). */
|
|
2
|
+
|
|
3
|
+
.dlc-color-layer {
|
|
4
|
+
position: absolute;
|
|
5
|
+
inset: 0;
|
|
6
|
+
z-index: var(--dlc-color-layer-z, -1);
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
border-radius: inherit;
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
background: var(--dlc-color-bg, transparent);
|
|
11
|
+
opacity: var(--dlc-color-opacity, 1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.dlc-color-canvas {
|
|
15
|
+
display: block;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
}
|
package/styles/emo.css
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
.dlc-emo-root {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-grid;
|
|
4
|
-
place-items: center;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
flex: 0 0 auto;
|
|
8
|
-
vertical-align: middle;
|
|
9
|
-
background: var(--dlc-emo-background, transparent);
|
|
10
|
-
opacity: var(--dlc-emo-opacity, 1);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.dlc-emo-stage,
|
|
14
|
-
.dlc-emo-stage > svg,
|
|
15
|
-
.dlc-emo-stage > canvas {
|
|
16
|
-
display: block;
|
|
17
|
-
width: 100% !important;
|
|
18
|
-
height: 100% !important;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.dlc-emo-stage {
|
|
22
|
-
position: absolute;
|
|
23
|
-
inset: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.dlc-emo-root[data-fit='cover'] .dlc-emo-stage
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
.dlc-emo-root {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-grid;
|
|
4
|
+
place-items: center;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
flex: 0 0 auto;
|
|
8
|
+
vertical-align: middle;
|
|
9
|
+
background: var(--dlc-emo-background, transparent);
|
|
10
|
+
opacity: var(--dlc-emo-opacity, 1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dlc-emo-stage,
|
|
14
|
+
.dlc-emo-stage > svg,
|
|
15
|
+
.dlc-emo-stage > canvas {
|
|
16
|
+
display: block;
|
|
17
|
+
width: 100% !important;
|
|
18
|
+
height: 100% !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dlc-emo-stage {
|
|
22
|
+
position: absolute;
|
|
23
|
+
inset: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dlc-emo-root[data-fit='cover'] .dlc-emo-stage,
|
|
27
|
+
.dlc-emo-root[data-fit='fill'] .dlc-emo-stage {
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.dlc-emo-root[data-paused='true'] {
|
|
32
|
+
--dlc-emo-play-state: paused;
|
|
33
|
+
}
|
package/styles/progress.css
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
/* ---------- Progress capsule ---------- */
|
|
2
|
-
|
|
3
|
-
.hj-progress-root {
|
|
4
|
-
--hj-bg: #202126;
|
|
5
|
-
border: 1px solid rgba(0, 0, 0, 0.34);
|
|
6
|
-
color: #ffffff;
|
|
7
|
-
box-shadow: var(--hj-shadow);
|
|
8
|
-
cursor: ew-resize;
|
|
9
|
-
touch-action: none;
|
|
10
|
-
user-select: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.hj-progress-root[data-draggable="false"] {
|
|
14
|
-
cursor: default;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.hj-progress-root.is-disabled {
|
|
18
|
-
cursor: default;
|
|
19
|
-
opacity: 0.55;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.hj-progress-root.is-disabled:focus-visible {
|
|
23
|
-
outline: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.hj-progress-root.is-readonly {
|
|
27
|
-
cursor: default;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.hj-progress-root:focus-visible {
|
|
31
|
-
outline: 2px solid rgba(255, 255, 255, 0.8);
|
|
32
|
-
outline-offset: 4px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.hj-progress-canvas {
|
|
36
|
-
transition: filter 180ms ease, opacity 160ms ease;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.hj-progress-overlay {
|
|
40
|
-
z-index: 2;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.hj-progress-root[data-direction="rtl"] > .hj-progress-canvas {
|
|
44
|
-
transform: scaleX(-1);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.hj-progress-root.has-webgl-progress > .hj-progress-canvas:not(.hj-progress-overlay) {
|
|
48
|
-
opacity: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.hj-progress-root.is-dragging .hj-progress-canvas {
|
|
52
|
-
filter: saturate(1.15) brightness(1.08);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* Text slot container: geometry only (same convention as capsule). */
|
|
56
|
-
.hj-progress-text {
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 50%;
|
|
59
|
-
left: var(--hj-text-left, var(--hj-copy-left, 30px));
|
|
60
|
-
z-index: 4;
|
|
61
|
-
width: var(--hj-text-width, var(--hj-copy-max-width, 54%));
|
|
62
|
-
background: var(--hj-text-bg, transparent);
|
|
63
|
-
padding: var(--hj-text-pad, 0);
|
|
64
|
-
border-radius: var(--hj-text-radius, 0);
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
transform: translateY(-50%);
|
|
67
|
-
pointer-events: none;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/* Color slot container: region right of the text area. */
|
|
71
|
-
.hj-progress-visual {
|
|
72
|
-
position: absolute;
|
|
73
|
-
top: 0;
|
|
74
|
-
bottom: 0;
|
|
75
|
-
left: var(--hj-text-width, var(--hj-copy-max-width, 54%));
|
|
76
|
-
right: 0;
|
|
77
|
-
z-index: 3;
|
|
78
|
-
pointer-events: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.hj-progress-value {
|
|
82
|
-
position: absolute;
|
|
83
|
-
top: 50%;
|
|
84
|
-
right: var(--hj-value-right);
|
|
85
|
-
z-index: 5;
|
|
86
|
-
min-width: 24%;
|
|
87
|
-
color: #ffffff;
|
|
88
|
-
font-size: 44px;
|
|
89
|
-
font-weight: 480;
|
|
90
|
-
line-height: 1;
|
|
91
|
-
text-align: right;
|
|
92
|
-
letter-spacing: -0.045em;
|
|
93
|
-
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
|
|
94
|
-
transform: translateY(-50%);
|
|
95
|
-
pointer-events: none;
|
|
96
|
-
}
|
|
1
|
+
/* ---------- Progress capsule ---------- */
|
|
2
|
+
|
|
3
|
+
.hj-progress-root {
|
|
4
|
+
--hj-bg: #202126;
|
|
5
|
+
border: 1px solid rgba(0, 0, 0, 0.34);
|
|
6
|
+
color: #ffffff;
|
|
7
|
+
box-shadow: var(--hj-shadow);
|
|
8
|
+
cursor: ew-resize;
|
|
9
|
+
touch-action: none;
|
|
10
|
+
user-select: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.hj-progress-root[data-draggable="false"] {
|
|
14
|
+
cursor: default;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.hj-progress-root.is-disabled {
|
|
18
|
+
cursor: default;
|
|
19
|
+
opacity: 0.55;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.hj-progress-root.is-disabled:focus-visible {
|
|
23
|
+
outline: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.hj-progress-root.is-readonly {
|
|
27
|
+
cursor: default;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.hj-progress-root:focus-visible {
|
|
31
|
+
outline: 2px solid rgba(255, 255, 255, 0.8);
|
|
32
|
+
outline-offset: 4px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.hj-progress-canvas {
|
|
36
|
+
transition: filter 180ms ease, opacity 160ms ease;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.hj-progress-overlay {
|
|
40
|
+
z-index: 2;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.hj-progress-root[data-direction="rtl"] > .hj-progress-canvas {
|
|
44
|
+
transform: scaleX(-1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.hj-progress-root.has-webgl-progress > .hj-progress-canvas:not(.hj-progress-overlay) {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.hj-progress-root.is-dragging .hj-progress-canvas {
|
|
52
|
+
filter: saturate(1.15) brightness(1.08);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Text slot container: geometry only (same convention as capsule). */
|
|
56
|
+
.hj-progress-text {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 50%;
|
|
59
|
+
left: var(--hj-text-left, var(--hj-copy-left, 30px));
|
|
60
|
+
z-index: 4;
|
|
61
|
+
width: var(--hj-text-width, var(--hj-copy-max-width, 54%));
|
|
62
|
+
background: var(--hj-text-bg, transparent);
|
|
63
|
+
padding: var(--hj-text-pad, 0);
|
|
64
|
+
border-radius: var(--hj-text-radius, 0);
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
transform: translateY(-50%);
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Color slot container: region right of the text area. */
|
|
71
|
+
.hj-progress-visual {
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
left: var(--hj-text-width, var(--hj-copy-max-width, 54%));
|
|
76
|
+
right: 0;
|
|
77
|
+
z-index: 3;
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.hj-progress-value {
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 50%;
|
|
84
|
+
right: var(--hj-value-right);
|
|
85
|
+
z-index: 5;
|
|
86
|
+
min-width: 24%;
|
|
87
|
+
color: #ffffff;
|
|
88
|
+
font-size: 44px;
|
|
89
|
+
font-weight: 480;
|
|
90
|
+
line-height: 1;
|
|
91
|
+
text-align: right;
|
|
92
|
+
letter-spacing: -0.045em;
|
|
93
|
+
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
|
|
94
|
+
transform: translateY(-50%);
|
|
95
|
+
pointer-events: none;
|
|
96
|
+
}
|
package/types/capsule.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export {
|
|
2
|
-
CapsuleOptions,
|
|
3
|
-
CapsuleController,
|
|
4
|
-
CapsulePreset,
|
|
5
|
-
Quality,
|
|
6
|
-
PowerPreference,
|
|
7
|
-
createCapsule,
|
|
8
|
-
parseSize,
|
|
9
|
-
dprCapFor,
|
|
10
|
-
effectiveDprCap,
|
|
11
|
-
QUALITY_TIERS,
|
|
12
|
-
hexToRgb01,
|
|
13
|
-
hexToRgba,
|
|
14
|
-
validateColors
|
|
15
|
-
} from './index.js';
|
|
1
|
+
export {
|
|
2
|
+
CapsuleOptions,
|
|
3
|
+
CapsuleController,
|
|
4
|
+
CapsulePreset,
|
|
5
|
+
Quality,
|
|
6
|
+
PowerPreference,
|
|
7
|
+
createCapsule,
|
|
8
|
+
parseSize,
|
|
9
|
+
dprCapFor,
|
|
10
|
+
effectiveDprCap,
|
|
11
|
+
QUALITY_TIERS,
|
|
12
|
+
hexToRgb01,
|
|
13
|
+
hexToRgba,
|
|
14
|
+
validateColors
|
|
15
|
+
} from './index.js';
|