@plumeria/core 0.9.1 → 0.9.3
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 +36 -26
- package/dist/css.js +135 -0
- package/dist/css.mjs +58 -0
- package/dist/index.d.ts +295 -0
- package/dist/index.js +116 -0
- package/dist/index.mjs +113 -0
- package/dist/processors/css.d.ts +12 -0
- package/dist/processors/css.js +30 -0
- package/dist/processors/css.mjs +3 -0
- package/package.json +13 -14
- package/dist/cjs/css.js +0 -96
- package/dist/cjs/css.js.map +0 -1
- package/dist/cjs/cx.js +0 -23
- package/dist/cjs/cx.js.map +0 -1
- package/dist/cjs/index.js +0 -13
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/processors/css.js +0 -65
- package/dist/cjs/processors/css.js.map +0 -1
- package/dist/cjs/rx.js +0 -8
- package/dist/cjs/rx.js.map +0 -1
- package/dist/esm/css.js +0 -94
- package/dist/esm/css.js.map +0 -1
- package/dist/esm/cx.js +0 -21
- package/dist/esm/cx.js.map +0 -1
- package/dist/esm/index.js +0 -4
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/processors/css.js +0 -60
- package/dist/esm/processors/css.js.map +0 -1
- package/dist/esm/rx.js +0 -6
- package/dist/esm/rx.js.map +0 -1
- package/types/css.d.ts +0 -279
- package/types/cx.d.ts +0 -2
- package/types/index.d.ts +0 -4
- package/types/processors/css.d.ts +0 -10
- package/types/rx.d.ts +0 -9
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @plumeria/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Zero-runtime CSS in JS library in TypeScript.**
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ Import stylesheet in your application's entry point.
|
|
|
25
25
|
Applies the static stylesheet for production environments.
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import '@plumeria/core/stylesheet';
|
|
28
|
+
import '@plumeria/core/stylesheet.css';
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## API
|
|
@@ -97,21 +97,6 @@ css.global({
|
|
|
97
97
|
});
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
### cx
|
|
101
|
-
|
|
102
|
-
Merges strings such as class names and pseudo.
|
|
103
|
-
|
|
104
|
-
```tsx
|
|
105
|
-
const styles = css.create({
|
|
106
|
-
text: {
|
|
107
|
-
[cx(css.pseudo.hover, css.pseudo.after)]: {
|
|
108
|
-
color: 'yellow',
|
|
109
|
-
opacity: 0.9,
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
```
|
|
114
|
-
|
|
115
100
|
### css.keyframes()
|
|
116
101
|
|
|
117
102
|
Define @keyframes and set the return value directly to animationName.
|
|
@@ -134,19 +119,33 @@ const styles = css.create({
|
|
|
134
119
|
});
|
|
135
120
|
```
|
|
136
121
|
|
|
137
|
-
### css.
|
|
122
|
+
### css.defineVars()
|
|
138
123
|
|
|
139
|
-
|
|
124
|
+
Defines custom CSS variables (custom properties) at the `:root` level.
|
|
125
|
+
This API allows you to declare design tokens such as spacing, sizes, or other constants, which can be referenced throughout your styles using the tokens.sm to `var(--sm)` syntax.
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
const tokens = css.defineVars({
|
|
129
|
+
xs: 240,
|
|
130
|
+
sm: 360,
|
|
131
|
+
md: 480,
|
|
132
|
+
lg: 600,
|
|
133
|
+
xl: 768,
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### css.defineTheme()
|
|
138
|
+
|
|
139
|
+
Define data-theme as objects.
|
|
140
140
|
A default compile to :root, and the rest as a string compile to data-theme, You can also use media and container here.
|
|
141
141
|
|
|
142
142
|
```ts
|
|
143
|
-
const
|
|
144
|
-
white: 'white',
|
|
143
|
+
const themes = css.defineTheme({
|
|
145
144
|
text_primary: {
|
|
146
145
|
default: 'rgb(60,60,60)',
|
|
147
146
|
light: 'black',
|
|
148
147
|
dark: 'white',
|
|
149
|
-
[css.media.
|
|
148
|
+
[css.media.maxWidth(700)]: 'gray',
|
|
150
149
|
},
|
|
151
150
|
bg_primary: {
|
|
152
151
|
light: 'white',
|
|
@@ -163,6 +162,17 @@ The first argument takes the color and the second argument takes the same value
|
|
|
163
162
|
```ts
|
|
164
163
|
color: css.color.darken('skyblue', 0.12),
|
|
165
164
|
color: css.color.lighten('navy', 0.6),
|
|
165
|
+
color: css.color.skyblue,
|
|
166
|
+
color: css.color.navy,
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### cx
|
|
170
|
+
|
|
171
|
+
Merges strings such as class names and pseudo.
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
cx(css.pseudo.hover, css.pseudo.after); // ":hover::after"
|
|
175
|
+
cx(styles.text, styles, box); // "text_hash box_hash"
|
|
166
176
|
```
|
|
167
177
|
|
|
168
178
|
## ESLint
|
|
@@ -171,10 +181,10 @@ color: css.color.lighten('navy', 0.6),
|
|
|
171
181
|
|
|
172
182
|
### Rules: recommended
|
|
173
183
|
|
|
174
|
-
\- no-inner-call:(error)
|
|
175
|
-
\- no-unused-keys:(warn)
|
|
176
|
-
\- sort-properties:(warn)
|
|
177
|
-
\- validate-values:(warn)
|
|
184
|
+
\- **no-inner-call:(error)**
|
|
185
|
+
\- **no-unused-keys:(warn)**
|
|
186
|
+
\- **sort-properties:(warn)**
|
|
187
|
+
\- **validate-values:(warn)**
|
|
178
188
|
|
|
179
189
|
It is recommended to use it in conjunction with TypeScript completion, which is one of the big advantages of using plumeria.
|
|
180
190
|
|
package/dist/css.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//#region rolldown:runtime
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
const zss_engine = __toESM(require("zss-engine"));
|
|
26
|
+
|
|
27
|
+
//#region src/processors/css.ts
|
|
28
|
+
let resolvePromise_1;
|
|
29
|
+
let globalPromise_1;
|
|
30
|
+
const sheetQueue_1 = [];
|
|
31
|
+
let isProcessing_1 = false;
|
|
32
|
+
function initPromise_1() {
|
|
33
|
+
globalPromise_1 = new Promise((resolve) => {
|
|
34
|
+
resolvePromise_1 = (value) => {
|
|
35
|
+
sheetQueue_1.push(value);
|
|
36
|
+
resolve(value);
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
async function processQueue_1(filePath) {
|
|
41
|
+
while (sheetQueue_1.length > 0) {
|
|
42
|
+
const styleSheet = sheetQueue_1.shift();
|
|
43
|
+
if (!zss_engine.isDevelopment && styleSheet) (0, zss_engine.build)(styleSheet, filePath);
|
|
44
|
+
}
|
|
45
|
+
isProcessing_1 = false;
|
|
46
|
+
}
|
|
47
|
+
async function buildCreate(filePath) {
|
|
48
|
+
if (typeof globalPromise_1 === "undefined") initPromise_1();
|
|
49
|
+
if (!isProcessing_1 && sheetQueue_1.length > 0) {
|
|
50
|
+
isProcessing_1 = true;
|
|
51
|
+
processQueue_1(filePath);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
let resolvePromise_2;
|
|
55
|
+
let globalPromise_2;
|
|
56
|
+
const sheetQueue_2 = [];
|
|
57
|
+
let isProcessing_2 = false;
|
|
58
|
+
function initPromise_2() {
|
|
59
|
+
globalPromise_2 = new Promise((resolve) => {
|
|
60
|
+
resolvePromise_2 = (value) => {
|
|
61
|
+
sheetQueue_2.push(value);
|
|
62
|
+
resolve(value);
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async function processQueue_2(filePath) {
|
|
67
|
+
while (sheetQueue_2.length > 0) {
|
|
68
|
+
const styleSheet = sheetQueue_2.shift();
|
|
69
|
+
if (!zss_engine.isDevelopment && styleSheet) (0, zss_engine.build)(styleSheet, filePath, "--global");
|
|
70
|
+
}
|
|
71
|
+
isProcessing_2 = false;
|
|
72
|
+
}
|
|
73
|
+
async function buildGlobal(filePath) {
|
|
74
|
+
if (typeof globalPromise_2 === "undefined") initPromise_2();
|
|
75
|
+
if (!isProcessing_2 && sheetQueue_2.length > 0) {
|
|
76
|
+
isProcessing_2 = true;
|
|
77
|
+
processQueue_2(filePath);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
Object.defineProperty(exports, '__toESM', {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () {
|
|
85
|
+
return __toESM;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, 'buildCreate', {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () {
|
|
91
|
+
return buildCreate;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, 'buildGlobal', {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () {
|
|
97
|
+
return buildGlobal;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, 'globalPromise_1', {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () {
|
|
103
|
+
return globalPromise_1;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, 'globalPromise_2', {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () {
|
|
109
|
+
return globalPromise_2;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, 'initPromise_1', {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () {
|
|
115
|
+
return initPromise_1;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(exports, 'initPromise_2', {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () {
|
|
121
|
+
return initPromise_2;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, 'resolvePromise_1', {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () {
|
|
127
|
+
return resolvePromise_1;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(exports, 'resolvePromise_2', {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function () {
|
|
133
|
+
return resolvePromise_2;
|
|
134
|
+
}
|
|
135
|
+
});
|
package/dist/css.mjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { build, isDevelopment } from "zss-engine";
|
|
2
|
+
|
|
3
|
+
//#region src/processors/css.ts
|
|
4
|
+
let resolvePromise_1;
|
|
5
|
+
let globalPromise_1;
|
|
6
|
+
const sheetQueue_1 = [];
|
|
7
|
+
let isProcessing_1 = false;
|
|
8
|
+
function initPromise_1() {
|
|
9
|
+
globalPromise_1 = new Promise((resolve) => {
|
|
10
|
+
resolvePromise_1 = (value) => {
|
|
11
|
+
sheetQueue_1.push(value);
|
|
12
|
+
resolve(value);
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
async function processQueue_1(filePath) {
|
|
17
|
+
while (sheetQueue_1.length > 0) {
|
|
18
|
+
const styleSheet = sheetQueue_1.shift();
|
|
19
|
+
if (!isDevelopment && styleSheet) build(styleSheet, filePath);
|
|
20
|
+
}
|
|
21
|
+
isProcessing_1 = false;
|
|
22
|
+
}
|
|
23
|
+
async function buildCreate(filePath) {
|
|
24
|
+
if (typeof globalPromise_1 === "undefined") initPromise_1();
|
|
25
|
+
if (!isProcessing_1 && sheetQueue_1.length > 0) {
|
|
26
|
+
isProcessing_1 = true;
|
|
27
|
+
processQueue_1(filePath);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
let resolvePromise_2;
|
|
31
|
+
let globalPromise_2;
|
|
32
|
+
const sheetQueue_2 = [];
|
|
33
|
+
let isProcessing_2 = false;
|
|
34
|
+
function initPromise_2() {
|
|
35
|
+
globalPromise_2 = new Promise((resolve) => {
|
|
36
|
+
resolvePromise_2 = (value) => {
|
|
37
|
+
sheetQueue_2.push(value);
|
|
38
|
+
resolve(value);
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async function processQueue_2(filePath) {
|
|
43
|
+
while (sheetQueue_2.length > 0) {
|
|
44
|
+
const styleSheet = sheetQueue_2.shift();
|
|
45
|
+
if (!isDevelopment && styleSheet) build(styleSheet, filePath, "--global");
|
|
46
|
+
}
|
|
47
|
+
isProcessing_2 = false;
|
|
48
|
+
}
|
|
49
|
+
async function buildGlobal(filePath) {
|
|
50
|
+
if (typeof globalPromise_2 === "undefined") initPromise_2();
|
|
51
|
+
if (!isProcessing_2 && sheetQueue_2.length > 0) {
|
|
52
|
+
isProcessing_2 = true;
|
|
53
|
+
processQueue_2(filePath);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
export { buildCreate, buildGlobal, globalPromise_1, globalPromise_2, initPromise_1, initPromise_2, resolvePromise_1, resolvePromise_2 };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { CSSHTML, CSSProperties, CreateKeyframes, CreateStyle, CreateStyleType, CreateTheme, CreateVars, ReturnType } from "zss-engine";
|
|
2
|
+
|
|
3
|
+
//#region src/css.d.ts
|
|
4
|
+
declare class css {
|
|
5
|
+
static create<T extends Record<string, CSSProperties>>(object: CreateStyleType<T>): ReturnType<T>;
|
|
6
|
+
static global(object: CSSHTML): void;
|
|
7
|
+
static defineVars<const T extends CreateVars>(object: T): { [K in keyof T]: `var(--${string})` };
|
|
8
|
+
static defineTheme<const T extends CreateTheme>(object: T): { [K in keyof T]: `var(--${string})` };
|
|
9
|
+
static keyframes(object: CreateKeyframes): string;
|
|
10
|
+
static media: {
|
|
11
|
+
dark: "@media (prefers-color-scheme: dark)";
|
|
12
|
+
light: "@media (prefers-color-scheme: light)";
|
|
13
|
+
range: <S extends string>(range: S) => `@media (${S})`;
|
|
14
|
+
maxWidth: <V extends string | number>(value: V) => `@media (max-width: ${V}px)`;
|
|
15
|
+
maxHeight: <V extends string | number>(value: V) => `@media (max-height: ${V}px)`;
|
|
16
|
+
minWidth: <V extends string | number>(value: V) => `@media (min-width: ${V}px)`;
|
|
17
|
+
minHeight: <V extends string | number>(value: V) => `@media (min-height: ${V}px)`;
|
|
18
|
+
};
|
|
19
|
+
static container: {
|
|
20
|
+
range: <S extends string>(range: S) => `@container (${S})`;
|
|
21
|
+
maxWidth: <V extends string | number>(value: V) => V extends number ? `@container (max-width: ${V}px)` : `@container (max-width: ${V})`;
|
|
22
|
+
maxHeight: <V extends string | number>(value: V) => V extends number ? `@container (max-height: ${V}px)` : `@container (max-height: ${V})`;
|
|
23
|
+
minWidth: <V extends string | number>(value: V) => V extends number ? `@container (min-width: ${V}px)` : `@container (min-width: ${V})`;
|
|
24
|
+
minHeight: <V extends string | number>(value: V) => V extends number ? `@container (min-height: ${V}px)` : `@container (min-height: ${V})`;
|
|
25
|
+
};
|
|
26
|
+
static pseudo: {
|
|
27
|
+
fn: {
|
|
28
|
+
cue: <S extends string>(str: S) => `::cue(${S})`;
|
|
29
|
+
dir: <S extends string>(str: S) => `:dir(${S})`;
|
|
30
|
+
has: <S extends string>(str: S) => `:has(${S})`;
|
|
31
|
+
host: <S extends string>(str: S) => `:host(${S})`;
|
|
32
|
+
hostContext: <S extends string>(str: S) => `:host-context(${S})`;
|
|
33
|
+
is: <S extends string>(str: S) => `:is(${S})`;
|
|
34
|
+
lang: <S extends string>(str: S) => `:lang(${S})`;
|
|
35
|
+
nthChild: <S extends string>(str: S) => `:nth-child(${S})`;
|
|
36
|
+
nthLastChild: <S extends string>(str: S) => `:nth-last-child(${S})`;
|
|
37
|
+
nthLastOfType: <S extends string>(str: S) => `:nth-last-of-type(${S})`;
|
|
38
|
+
nthOfType: <S extends string>(str: S) => `:nth-of-type(${S})`;
|
|
39
|
+
not: <S extends string>(str: S) => `:not(${S})`;
|
|
40
|
+
state: <S extends string>(str: S) => `:state(${S})`;
|
|
41
|
+
where: <S extends string>(str: S) => `:where(${S})`;
|
|
42
|
+
highlight: <S extends string>(str: S) => `::highlight(${S})`;
|
|
43
|
+
part: <S extends string>(str: S) => `::part(${S})`;
|
|
44
|
+
slotted: <S extends string>(str: S) => `::slotted(${S})`;
|
|
45
|
+
viewTransitionImagePair: <S extends string>(str: S) => `::view-transition-image-pair(${S})`;
|
|
46
|
+
viewTransitionGroup: <S extends string>(str: S) => `::view-transition-group(${S})`;
|
|
47
|
+
viewTransitionOld: <S extends string>(str: S) => `::view-transition-old(${S})`;
|
|
48
|
+
viewTransitionNew: <S extends string>(str: S) => `::view-transition-new(${S})`;
|
|
49
|
+
};
|
|
50
|
+
active: ":active";
|
|
51
|
+
anyLink: ":any-link";
|
|
52
|
+
autoFill: ":autofill";
|
|
53
|
+
buffering: ":buffering";
|
|
54
|
+
checked: ":checked";
|
|
55
|
+
default: ":default";
|
|
56
|
+
defined: ":defined";
|
|
57
|
+
disabled: ":disabled";
|
|
58
|
+
empty: ":empty";
|
|
59
|
+
enabled: ":enabled";
|
|
60
|
+
first: ":first";
|
|
61
|
+
firstChild: ":first-child";
|
|
62
|
+
firstOfType: ":first-of-type";
|
|
63
|
+
focus: ":focus";
|
|
64
|
+
focusVisible: ":focus-visible";
|
|
65
|
+
focusWithin: ":focus-within";
|
|
66
|
+
fullscreen: ":fullscreen";
|
|
67
|
+
future: ":future";
|
|
68
|
+
hasSlotted: ":has-slotted";
|
|
69
|
+
host: ":host";
|
|
70
|
+
hover: ":hover";
|
|
71
|
+
inRange: ":in-range";
|
|
72
|
+
indeterminate: ":indeterminate";
|
|
73
|
+
invalid: ":invalid";
|
|
74
|
+
lastChild: ":last-child";
|
|
75
|
+
lastOfType: ":last-of-type";
|
|
76
|
+
left: ":left";
|
|
77
|
+
link: ":link";
|
|
78
|
+
modal: ":modal";
|
|
79
|
+
muted: ":muted";
|
|
80
|
+
onlyChild: ":only-child";
|
|
81
|
+
onlyOfType: ":only-of-type";
|
|
82
|
+
open: ":open";
|
|
83
|
+
optional: ":optional";
|
|
84
|
+
outOfRange: ":out-of-range";
|
|
85
|
+
past: ":past";
|
|
86
|
+
paused: ":paused";
|
|
87
|
+
pictureInPicture: ":picture-in-picture";
|
|
88
|
+
placeholderShown: ":placeholder-shown";
|
|
89
|
+
playing: ":playing";
|
|
90
|
+
popoverOpen: ":popover-open";
|
|
91
|
+
readOnly: ":read-only";
|
|
92
|
+
readWrite: ":read-write";
|
|
93
|
+
required: ":required";
|
|
94
|
+
right: ":right";
|
|
95
|
+
root: ":root";
|
|
96
|
+
scope: ":scope";
|
|
97
|
+
seeking: ":seeking";
|
|
98
|
+
stalled: ":stalled";
|
|
99
|
+
target: ":target";
|
|
100
|
+
userInvalid: ":user-invalid";
|
|
101
|
+
userValid: ":user-valid";
|
|
102
|
+
valid: ":valid";
|
|
103
|
+
visited: ":visited";
|
|
104
|
+
volumeLocked: ":volume-locked";
|
|
105
|
+
after: "::after";
|
|
106
|
+
backdrop: "::backdrop";
|
|
107
|
+
before: "::before";
|
|
108
|
+
cue: "::cue";
|
|
109
|
+
detailsContent: "::details-content";
|
|
110
|
+
firstSelectorButton: "::first-selector-button";
|
|
111
|
+
firstLetter: "::first-letter";
|
|
112
|
+
firstLine: "::first-line";
|
|
113
|
+
grammarError: "::grammar-error";
|
|
114
|
+
marker: "::marker";
|
|
115
|
+
placeholder: "::placeholder";
|
|
116
|
+
selection: "::selection";
|
|
117
|
+
spellingError: "::spellingError";
|
|
118
|
+
targetText: "::target-text";
|
|
119
|
+
viewTransition: "::view-transition";
|
|
120
|
+
};
|
|
121
|
+
static color: {
|
|
122
|
+
lighten: (color: string, amount: string | number) => `color-mix(in srgb, ${string}, white ${number}%)`;
|
|
123
|
+
darken: (color: string, amount: string | number) => `color-mix(in srgb, ${string}, black ${number}%)`;
|
|
124
|
+
primary: "#0070f3";
|
|
125
|
+
secondary: "#ff4081";
|
|
126
|
+
success: "#2e7d32";
|
|
127
|
+
warning: "#ed6c02";
|
|
128
|
+
error: "#d32f2f";
|
|
129
|
+
aliceblue: "aliceblue";
|
|
130
|
+
antiquewhite: "antiquewhite";
|
|
131
|
+
aqua: "aqua";
|
|
132
|
+
aquamarine: "aquamarine";
|
|
133
|
+
azure: "azure";
|
|
134
|
+
beige: "beige";
|
|
135
|
+
bisque: "bisque";
|
|
136
|
+
black: "black";
|
|
137
|
+
blanchedalmond: "blanchedalmond";
|
|
138
|
+
blue: "blue";
|
|
139
|
+
blueviolet: "blueviolet";
|
|
140
|
+
brown: "brown";
|
|
141
|
+
burlywood: "burlywood";
|
|
142
|
+
cadetblue: "cadetblue";
|
|
143
|
+
chartreuse: "chartreuse";
|
|
144
|
+
chocolate: "chocolate";
|
|
145
|
+
coral: "coral";
|
|
146
|
+
cornflowerblue: "cornflowerblue";
|
|
147
|
+
cornsilk: "cornsilk";
|
|
148
|
+
crimson: "crimson";
|
|
149
|
+
cyan: "cyan";
|
|
150
|
+
darkblue: "darkblue";
|
|
151
|
+
darkcyan: "darkcyan";
|
|
152
|
+
darkgoldenrod: "darkgoldenrod";
|
|
153
|
+
darkgray: "darkgray";
|
|
154
|
+
darkgreen: "darkgreen";
|
|
155
|
+
darkgrey: "darkgrey";
|
|
156
|
+
darkkhaki: "darkkhaki";
|
|
157
|
+
darkmagenta: "darkmagenta";
|
|
158
|
+
darkolivegreen: "darkolivegreen";
|
|
159
|
+
darkorange: "darkorange";
|
|
160
|
+
darkorchid: "darkorchid";
|
|
161
|
+
darkred: "darkred";
|
|
162
|
+
darksalmon: "darksalmon";
|
|
163
|
+
darkseagreen: "darkseagreen";
|
|
164
|
+
darkslateblue: "darkslateblue";
|
|
165
|
+
darkslategray: "darkslategray";
|
|
166
|
+
darkslategrey: "darkslategrey";
|
|
167
|
+
darkturquoise: "darkturquoise";
|
|
168
|
+
darkviolet: "darkviolet";
|
|
169
|
+
deeppink: "deeppink";
|
|
170
|
+
deepskyblue: "deepskyblue";
|
|
171
|
+
dimgray: "dimgray";
|
|
172
|
+
dimgrey: "dimgrey";
|
|
173
|
+
dodgerblue: "dodgerblue";
|
|
174
|
+
firebrick: "firebrick";
|
|
175
|
+
floralwhite: "floralwhite";
|
|
176
|
+
forestgreen: "forestgreen";
|
|
177
|
+
fuchsia: "fuchsia";
|
|
178
|
+
gainsboro: "gainsboro";
|
|
179
|
+
ghostwhite: "ghostwhite";
|
|
180
|
+
gold: "gold";
|
|
181
|
+
goldenrod: "goldenrod";
|
|
182
|
+
gray: "gray";
|
|
183
|
+
green: "green";
|
|
184
|
+
greenyellow: "greenyellow";
|
|
185
|
+
grey: "grey";
|
|
186
|
+
honeydew: "honeydew";
|
|
187
|
+
hotpink: "hotpink";
|
|
188
|
+
indianred: "indianred";
|
|
189
|
+
indigo: "indigo";
|
|
190
|
+
ivory: "ivory";
|
|
191
|
+
khaki: "khaki";
|
|
192
|
+
lavender: "lavender";
|
|
193
|
+
lavenderblush: "lavenderblush";
|
|
194
|
+
lawngreen: "lawngreen";
|
|
195
|
+
lemonchiffon: "lemonchiffon";
|
|
196
|
+
lightblue: "lightblue";
|
|
197
|
+
lightcoral: "lightcoral";
|
|
198
|
+
lightcyan: "lightcyan";
|
|
199
|
+
lightgoldenrodyellow: "lightgoldenrodyellow";
|
|
200
|
+
lightgray: "lightgray";
|
|
201
|
+
lightgreen: "lightgreen";
|
|
202
|
+
lightgrey: "lightgrey";
|
|
203
|
+
lightpink: "lightpink";
|
|
204
|
+
lightsalmon: "lightsalmon";
|
|
205
|
+
lightseagreen: "lightseagreen";
|
|
206
|
+
lightskyblue: "lightskyblue";
|
|
207
|
+
lightslategray: "lightslategray";
|
|
208
|
+
lightslategrey: "lightslategrey";
|
|
209
|
+
lightsteelblue: "lightsteelblue";
|
|
210
|
+
lightyellow: "lightyellow";
|
|
211
|
+
lime: "lime";
|
|
212
|
+
limegreen: "limegreen";
|
|
213
|
+
linen: "linen";
|
|
214
|
+
magenta: "magenta";
|
|
215
|
+
maroon: "maroon";
|
|
216
|
+
mediumaquamarine: "mediumaquamarine";
|
|
217
|
+
mediumblue: "mediumblue";
|
|
218
|
+
mediumorchid: "mediumorchid";
|
|
219
|
+
mediumpurple: "mediumpurple";
|
|
220
|
+
mediumseagreen: "mediumseagreen";
|
|
221
|
+
mediumslateblue: "mediumslateblue";
|
|
222
|
+
mediumspringgreen: "mediumspringgreen";
|
|
223
|
+
mediumturquoise: "mediumturquoise";
|
|
224
|
+
mediumvioletred: "mediumvioletred";
|
|
225
|
+
midnightblue: "midnightblue";
|
|
226
|
+
mintcream: "mintcream";
|
|
227
|
+
mistyrose: "mistyrose";
|
|
228
|
+
moccasin: "moccasin";
|
|
229
|
+
navajowhite: "navajowhite";
|
|
230
|
+
navy: "navy";
|
|
231
|
+
oldlace: "oldlace";
|
|
232
|
+
olive: "olive";
|
|
233
|
+
olivedrab: "olivedrab";
|
|
234
|
+
orange: "orange";
|
|
235
|
+
orangered: "orangered";
|
|
236
|
+
orchid: "orchid";
|
|
237
|
+
palegoldenrod: "palegoldenrod";
|
|
238
|
+
palegreen: "palegreen";
|
|
239
|
+
paleturquoise: "paleturquoise";
|
|
240
|
+
palevioletred: "palevioletred";
|
|
241
|
+
papayawhip: "papayawhip";
|
|
242
|
+
peachpuff: "peachpuff";
|
|
243
|
+
peru: "peru";
|
|
244
|
+
pink: "pink";
|
|
245
|
+
plum: "plum";
|
|
246
|
+
powderblue: "powderblue";
|
|
247
|
+
purple: "purple";
|
|
248
|
+
rebeccapurple: "rebeccapurple";
|
|
249
|
+
red: "red";
|
|
250
|
+
rosybrown: "rosybrown";
|
|
251
|
+
royalblue: "royalblue";
|
|
252
|
+
saddlebrown: "saddlebrown";
|
|
253
|
+
salmon: "salmon";
|
|
254
|
+
sandybrown: "sandybrown";
|
|
255
|
+
seagreen: "seagreen";
|
|
256
|
+
seashell: "seashell";
|
|
257
|
+
sienna: "sienna";
|
|
258
|
+
silver: "silver";
|
|
259
|
+
skyblue: "skyblue";
|
|
260
|
+
slateblue: "slateblue";
|
|
261
|
+
slategray: "slategray";
|
|
262
|
+
slategrey: "slategrey";
|
|
263
|
+
snow: "snow";
|
|
264
|
+
springgreen: "springgreen";
|
|
265
|
+
steelblue: "steelblue";
|
|
266
|
+
tan: "tan";
|
|
267
|
+
teal: "teal";
|
|
268
|
+
thistle: "thistle";
|
|
269
|
+
tomato: "tomato";
|
|
270
|
+
transparent: "transparent";
|
|
271
|
+
turquoise: "turquoise";
|
|
272
|
+
violet: "violet";
|
|
273
|
+
wheat: "wheat";
|
|
274
|
+
white: "white";
|
|
275
|
+
whitesmoke: "whitesmoke";
|
|
276
|
+
yellow: "yellow";
|
|
277
|
+
yellowgreen: "yellowgreen";
|
|
278
|
+
};
|
|
279
|
+
} //#endregion
|
|
280
|
+
//#region src/cx.d.ts
|
|
281
|
+
declare const cx: (...strings: Array<string | null | undefined | false>) => string & ":";
|
|
282
|
+
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region src/rx.d.ts
|
|
285
|
+
declare const rx: (className: string, varSet: {
|
|
286
|
+
[key: `--${string}`]: string;
|
|
287
|
+
}) => {
|
|
288
|
+
className: string;
|
|
289
|
+
style: {
|
|
290
|
+
[k: string]: string;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
//#endregion
|
|
295
|
+
export { CSSHTML, CSSProperties, CreateStyle, css, cx, rx };
|