@rocket.chat/css-in-js 0.6.3-dev.46 → 0.6.3-dev.462
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 +1 -1
- package/README.md +54 -94
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -968
- package/dist/index.js.map +1 -1
- package/dist/index.module.js +2 -0
- package/dist/index.module.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/names.d.ts +3 -0
- package/dist/sheet.d.ts +8 -0
- package/dist/tags.d.ts +30 -0
- package/dist/transpile.d.ts +11 -0
- package/package.json +41 -32
- package/CHANGELOG.md +0 -86
- package/dist/index.mjs +0 -960
- package/dist/index.mjs.map +0 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,131 +1,91 @@
|
|
|
1
|
-
|
|
1
|
+
<!--header-->
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://rocket.chat" title="Rocket.Chat">
|
|
5
|
+
<img src="https://github.com/RocketChat/Rocket.Chat.Artwork/raw/master/Logos/2020/png/logo-horizontal-red.png" alt="Rocket.Chat" />
|
|
6
|
+
</a>
|
|
7
|
+
</p>
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
# `@rocket.chat/css-in-js`
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
> Toolset to transpile and use CSS on runtime
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
yarn add @rocket.chat/css-in-js
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Run tests
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
yarn test
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## API Reference
|
|
25
|
-
|
|
26
|
-
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
27
|
-
|
|
28
|
-
#### Table of Contents
|
|
29
|
-
|
|
30
|
-
- [css](#css)
|
|
31
|
-
- [Parameters](#parameters)
|
|
32
|
-
- [keyframes](#keyframes)
|
|
33
|
-
- [Parameters](#parameters-1)
|
|
34
|
-
- [attachRules](#attachrules)
|
|
35
|
-
- [Parameters](#parameters-2)
|
|
36
|
-
- [referenceRules](#referencerules)
|
|
37
|
-
- [Parameters](#parameters-3)
|
|
38
|
-
- [transpile](#transpile)
|
|
39
|
-
- [Parameters](#parameters-4)
|
|
40
|
-
- [createSelector](#createselector)
|
|
41
|
-
- [Parameters](#parameters-5)
|
|
42
|
-
|
|
43
|
-
### css
|
|
44
|
-
|
|
45
|
-
Template string tag to declare CSS content chunks.
|
|
46
|
-
|
|
47
|
-
#### Parameters
|
|
48
|
-
|
|
49
|
-
- `slices` **TemplateStringsArray**
|
|
50
|
-
- `values` **...[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
|
|
13
|
+
---
|
|
51
14
|
|
|
52
|
-
|
|
15
|
+
[](https://www.npmjs.com/package/@rocket.chat/icons/v/latest) [](https://www.npmjs.com/package/@rocket.chat/icons/v/next)  
|
|
53
16
|
|
|
54
|
-
|
|
17
|
+
   
|
|
55
18
|
|
|
56
|
-
|
|
19
|
+
<!--/header-->
|
|
57
20
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- `slices` **TemplateStringsArray**
|
|
61
|
-
- `values` **...[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
|
|
62
|
-
|
|
63
|
-
Returns **any** a callback to render the CSS at-rule content
|
|
64
|
-
|
|
65
|
-
### attachRules
|
|
66
|
-
|
|
67
|
-
Imediately attaches CSS rules into the style sheet.
|
|
21
|
+
## Install
|
|
68
22
|
|
|
69
|
-
|
|
23
|
+
<!--install-->
|
|
70
24
|
|
|
71
|
-
|
|
25
|
+
Add `@rocket.chat/css-in-js` as a dependency:
|
|
72
26
|
|
|
73
|
-
|
|
27
|
+
```sh
|
|
28
|
+
npm i @rocket.chat/css-in-js
|
|
74
29
|
|
|
75
|
-
|
|
30
|
+
# or, if you are using yarn:
|
|
76
31
|
|
|
77
|
-
|
|
32
|
+
yarn add @rocket.chat/css-in-js
|
|
33
|
+
```
|
|
78
34
|
|
|
79
|
-
|
|
80
|
-
is incremented; when the unreference callback returned by this function is called, the reference
|
|
81
|
-
counter is decremented. If the counter reaches zero references, the rules are detached from
|
|
82
|
-
style sheet.
|
|
35
|
+
<!--/install-->
|
|
83
36
|
|
|
84
|
-
|
|
37
|
+
## Contributing
|
|
85
38
|
|
|
86
|
-
|
|
39
|
+
<!--contributing(msg)-->
|
|
87
40
|
|
|
88
|
-
|
|
41
|
+
Contributions, issues, and feature requests are welcome!<br />
|
|
42
|
+
Feel free to check the [issues](https://github.com/RocketChat/Rocket.Chat.Fuselage/issues).
|
|
89
43
|
|
|
90
|
-
|
|
44
|
+
<!--/contributing(msg)-->
|
|
91
45
|
|
|
92
|
-
|
|
46
|
+
### Building
|
|
93
47
|
|
|
94
|
-
|
|
48
|
+
As this package dependends on others in this monorepo, before anything run the following at the root directory:
|
|
95
49
|
|
|
96
|
-
|
|
97
|
-
- `content` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
50
|
+
<!--yarn(build)-->
|
|
98
51
|
|
|
99
|
-
|
|
52
|
+
```sh
|
|
53
|
+
yarn build
|
|
54
|
+
```
|
|
100
55
|
|
|
101
|
-
|
|
56
|
+
<!--/yarn(build)-->
|
|
102
57
|
|
|
103
|
-
|
|
58
|
+
### Linting
|
|
104
59
|
|
|
105
|
-
|
|
60
|
+
To ensure the source is matching our coding style, we perform [linting](<https://en.wikipedia.org/wiki/Lint_(software)>).
|
|
61
|
+
Before commiting, check if your code fits our style by running:
|
|
106
62
|
|
|
107
|
-
|
|
63
|
+
<!--yarn(lint)-->
|
|
108
64
|
|
|
109
|
-
|
|
110
|
-
|
|
65
|
+
```sh
|
|
66
|
+
yarn lint
|
|
67
|
+
```
|
|
111
68
|
|
|
112
|
-
|
|
69
|
+
<!--/yarn(lint)-->
|
|
113
70
|
|
|
114
|
-
|
|
71
|
+
Some linter warnings and errors can be automatically fixed:
|
|
115
72
|
|
|
116
|
-
-
|
|
117
|
-
- Github: [@RocketChat](https://github.com/RocketChat)
|
|
73
|
+
<!--yarn(lint-and-fix)-->
|
|
118
74
|
|
|
119
|
-
|
|
75
|
+
```sh
|
|
76
|
+
yarn lint-and-fix
|
|
77
|
+
```
|
|
120
78
|
|
|
121
|
-
|
|
79
|
+
<!--/yarn(lint-and-fix)-->
|
|
122
80
|
|
|
123
|
-
|
|
81
|
+
### Running tests
|
|
124
82
|
|
|
125
|
-
|
|
83
|
+
Whenever possible, add tests to describe exactly what your code do. You can run them by yourself:
|
|
126
84
|
|
|
127
|
-
|
|
85
|
+
<!--yarn(test)-->
|
|
128
86
|
|
|
129
|
-
|
|
87
|
+
```sh
|
|
88
|
+
yarn test
|
|
89
|
+
```
|
|
130
90
|
|
|
131
|
-
|
|
91
|
+
<!--/yarn(test)-->
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createAnimationName, createClassName, escapeName } from './names';
|
|
2
|
+
export { css, keyframes, cssFn, keyframesFn } from './tags';
|
|
3
|
+
export { cssSupports } from '@rocket.chat/css-supports';
|
|
4
|
+
export { attachRules } from './sheet';
|
|
5
|
+
export { transpile } from './transpile';
|