@slimr/css 2.1.10 → 2.1.12
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 +29 -15
- package/cjs/createClass.d.ts +21 -93
- package/cjs/createClass.js +88 -132
- package/cjs/createClass.js.map +1 -1
- package/cjs/createClass.ts +92 -211
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -0
- package/cjs/index.js.map +1 -1
- package/cjs/index.ts +1 -0
- package/cjs/shorthandProps.d.ts +75 -0
- package/cjs/shorthandProps.js +51 -0
- package/cjs/shorthandProps.js.map +1 -0
- package/cjs/shorthandProps.ts +118 -0
- package/esm/createClass.d.ts +21 -93
- package/esm/createClass.js +85 -128
- package/esm/createClass.js.map +1 -1
- package/esm/createClass.ts +92 -211
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/index.ts +1 -0
- package/esm/shorthandProps.d.ts +75 -0
- package/esm/shorthandProps.js +47 -0
- package/esm/shorthandProps.js.map +1 -0
- package/esm/shorthandProps.ts +118 -0
- package/package.json +4 -1
- package/src/createClass.ts +92 -211
- package/src/index.ts +1 -0
- package/src/shorthandProps.ts +118 -0
- package/tsconfig.json +4 -1
package/esm/createClass.d.ts
CHANGED
|
@@ -1,95 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const breakPoints: string[];
|
|
3
|
-
type allowableAny = any;
|
|
4
|
-
/** Joins class names and filters out blanks */
|
|
5
|
-
export declare function classJoin(...classes: allowableAny[]): string;
|
|
6
|
-
export interface ShorthandProps {
|
|
7
|
-
/** shorthand for css:align-items */
|
|
8
|
-
ai?: string;
|
|
9
|
-
/** shorthand for css:border */
|
|
10
|
-
b?: string | number;
|
|
11
|
-
/** shorthand for css:border-radius */
|
|
12
|
-
br?: string | number;
|
|
13
|
-
/** shorthand for css:background */
|
|
14
|
-
bg?: string;
|
|
15
|
-
/** shorthand for css:color */
|
|
16
|
-
c?: string;
|
|
17
|
-
/** shorthand for css:display */
|
|
18
|
-
d?: string;
|
|
19
|
-
/** shorthand for css:flex */
|
|
20
|
-
f?: string;
|
|
21
|
-
/** shorthand for css:flex-direction */
|
|
22
|
-
fd?: string;
|
|
23
|
-
/** shorthand for css:height */
|
|
24
|
-
h?: number | string;
|
|
25
|
-
/** shorthand for css:inset */
|
|
26
|
-
i?: number | string;
|
|
27
|
-
/** shorthand for css:justify-content */
|
|
28
|
-
jc?: string;
|
|
29
|
-
/** shorthand for css:margin */
|
|
30
|
-
m?: number | string;
|
|
31
|
-
/** shorthand for css:margin-left */
|
|
32
|
-
ml?: number | string;
|
|
33
|
-
/** shorthand for css:margin-right */
|
|
34
|
-
mr?: number | string;
|
|
35
|
-
/** shorthand for css:margin-top */
|
|
36
|
-
mt?: number | string;
|
|
37
|
-
/** shorthand for css:margin-bottom */
|
|
38
|
-
mb?: number | string;
|
|
39
|
-
/** shorthand for css:margin-top & margin-bottom */
|
|
40
|
-
my?: number | string;
|
|
41
|
-
/** shorthand for css:margin-left & margin-right */
|
|
42
|
-
mx?: number | string;
|
|
43
|
-
/** shorthand for css:max-width */
|
|
44
|
-
maxW?: number | string;
|
|
45
|
-
/** shorthand for css:min-width */
|
|
46
|
-
minW?: number | string;
|
|
47
|
-
/** shorthand for css:padding */
|
|
48
|
-
p?: number | string;
|
|
49
|
-
/** shorthand for css:padding-left */
|
|
50
|
-
pl?: number | string;
|
|
51
|
-
/** shorthand for css:padding-right */
|
|
52
|
-
pr?: number | string;
|
|
53
|
-
/** shorthand for css:padding-top */
|
|
54
|
-
pt?: number | string;
|
|
55
|
-
/** shorthand for css:padding-bottom */
|
|
56
|
-
pb?: number | string;
|
|
57
|
-
/** shorthand for css:padding-top & padding-bottom */
|
|
58
|
-
py?: number | string;
|
|
59
|
-
/** shorthand for css:padding-left & padding-right */
|
|
60
|
-
px?: number | string;
|
|
61
|
-
/** shorthand for css:position */
|
|
62
|
-
pos?: number | string;
|
|
63
|
-
/** shorthand for css:text-align */
|
|
64
|
-
ta?: string;
|
|
65
|
-
/** shorthand for css:width */
|
|
66
|
-
w?: number | string;
|
|
67
|
-
/** shorthand for css:z-index */
|
|
68
|
-
z?: number | string;
|
|
69
|
-
}
|
|
70
|
-
export declare const shorthandPropsMap: Record<keyof Omit<ShorthandProps, 'mx' | 'my' | 'px' | 'py'>, string>;
|
|
71
|
-
export declare const shorthandProps: string[];
|
|
72
|
-
/**
|
|
73
|
-
* Assemble a string from a template string array and a list of placeholders.
|
|
74
|
-
*
|
|
75
|
-
* - If the first argument is a string, it is returned as is.
|
|
76
|
-
*
|
|
77
|
-
* i.e.
|
|
78
|
-
* myFoo(...props: TemplateStringProps) => {
|
|
79
|
-
* const inputStr = t2s(...props);
|
|
80
|
-
* }
|
|
81
|
-
* myFoo`hello ${name}` => 'hello world'
|
|
82
|
-
* myFoo(`hello ${name}`) => 'hello world'
|
|
83
|
-
*/
|
|
84
|
-
export declare function t2s(...tsp: TemplateStringProps): string;
|
|
85
|
-
export type TemplateStringProps = [
|
|
86
|
-
strings: TemplateStringsArray | string,
|
|
87
|
-
...placeHolders: string[]
|
|
88
|
-
];
|
|
1
|
+
import { T2SProps } from '@slimr/util';
|
|
89
2
|
/**
|
|
90
|
-
* Injects css to the page
|
|
3
|
+
* Injects css to the page head
|
|
91
4
|
*
|
|
92
|
-
* -
|
|
5
|
+
* - Lazy: Will not be added until the component mounts, if called from within a component
|
|
6
|
+
* - Batches dom changes for better performance
|
|
7
|
+
* - Has local cache to recall prior adds, to reduce duplicates and dom changes
|
|
93
8
|
*
|
|
94
9
|
* @param css - css to be injected
|
|
95
10
|
* @returns void
|
|
@@ -99,17 +14,30 @@ export declare namespace addCss {
|
|
|
99
14
|
var que: Set<string>;
|
|
100
15
|
var count: number;
|
|
101
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Joins class names and omits falsey props
|
|
19
|
+
*
|
|
20
|
+
* @param classes - class names to be joined
|
|
21
|
+
* @returns a string of joined class names
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* classJoin('a', 'b', 'c') // 'a b c'
|
|
26
|
+
* classJoin('a', 0, 'b', null, 'c') // 'a b c'
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function classJoin(...classes: (string | 0 | null | undefined)[]): string;
|
|
102
30
|
/**
|
|
103
31
|
* Injects css and creates unique class names
|
|
104
32
|
*
|
|
105
33
|
* - Skips if already added
|
|
106
34
|
*
|
|
107
|
-
* @param
|
|
35
|
+
* @param cssString - string or template string, to be injected
|
|
108
36
|
* @returns a unique class name
|
|
109
37
|
*/
|
|
110
|
-
export declare function createClass(...p:
|
|
38
|
+
export declare function createClass(...p: T2SProps): string;
|
|
111
39
|
export declare namespace createClass {
|
|
40
|
+
var breakPoints: string[];
|
|
112
41
|
var count: number;
|
|
113
42
|
var history: Map<string, string>;
|
|
114
43
|
}
|
|
115
|
-
export {};
|
package/esm/createClass.js
CHANGED
|
@@ -1,9 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
1
|
+
import { t2s } from '@slimr/util';
|
|
2
|
+
import { expandShorthands } from './shorthandProps.js';
|
|
3
|
+
/**
|
|
4
|
+
* Injects css to the page head
|
|
5
|
+
*
|
|
6
|
+
* - Lazy: Will not be added until the component mounts, if called from within a component
|
|
7
|
+
* - Batches dom changes for better performance
|
|
8
|
+
* - Has local cache to recall prior adds, to reduce duplicates and dom changes
|
|
9
|
+
*
|
|
10
|
+
* @param css - css to be injected
|
|
11
|
+
* @returns void
|
|
12
|
+
*/
|
|
13
|
+
export function addCss(css) {
|
|
14
|
+
addCss.que.add(css);
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
const css = [...addCss.que].join('\n');
|
|
17
|
+
if (css) {
|
|
18
|
+
addCss.que.clear();
|
|
19
|
+
const s = document.createElement('style');
|
|
20
|
+
s.id = `u${addCss.count++}`;
|
|
21
|
+
s.innerHTML = css;
|
|
22
|
+
document.head.appendChild(s);
|
|
23
|
+
}
|
|
24
|
+
}, 0);
|
|
25
|
+
}
|
|
26
|
+
addCss.que = new Set();
|
|
27
|
+
addCss.count = 0;
|
|
28
|
+
/**
|
|
29
|
+
* Joins class names and omits falsey props
|
|
30
|
+
*
|
|
31
|
+
* @param classes - class names to be joined
|
|
32
|
+
* @returns a string of joined class names
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* classJoin('a', 'b', 'c') // 'a b c'
|
|
37
|
+
* classJoin('a', 0, 'b', null, 'c') // 'a b c'
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
4
40
|
export function classJoin(...classes) {
|
|
5
41
|
return classes.filter(c => c && typeof c === 'string').join(' ');
|
|
6
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Injects css and creates unique class names
|
|
45
|
+
*
|
|
46
|
+
* - Skips if already added
|
|
47
|
+
*
|
|
48
|
+
* @param cssString - string or template string, to be injected
|
|
49
|
+
* @returns a unique class name
|
|
50
|
+
*/
|
|
51
|
+
export function createClass(...p) {
|
|
52
|
+
let css = t2s(...p);
|
|
53
|
+
if (!css)
|
|
54
|
+
return '';
|
|
55
|
+
let className = createClass.history.get(css);
|
|
56
|
+
if (!className) {
|
|
57
|
+
className = 's' + createClass.count++;
|
|
58
|
+
createClass.history.set(css, className);
|
|
59
|
+
css = deleteComments(css);
|
|
60
|
+
css = expandShorthands(css);
|
|
61
|
+
css = expandArrayValues(css);
|
|
62
|
+
const qs = findQueries(css);
|
|
63
|
+
for (const q of qs.reverse()) {
|
|
64
|
+
css = css.slice(0, q.start) + css.slice(q.end);
|
|
65
|
+
}
|
|
66
|
+
css = `.${className}{\n${css}\n}\n`;
|
|
67
|
+
css += qs
|
|
68
|
+
.map(q => {
|
|
69
|
+
if (q.query.startsWith('&')) {
|
|
70
|
+
return `.${className}${q.query.slice(1)}{\n${q.innerBody}\n}`;
|
|
71
|
+
}
|
|
72
|
+
if (q.query.startsWith('@keyframes')) {
|
|
73
|
+
return q.outerBody;
|
|
74
|
+
}
|
|
75
|
+
return `${q.query}{\n.${className}{${q.innerBody}\n}\n}`;
|
|
76
|
+
})
|
|
77
|
+
.join('\n');
|
|
78
|
+
css = trimByLine(css) + '\n\n';
|
|
79
|
+
addCss(css);
|
|
80
|
+
}
|
|
81
|
+
return className;
|
|
82
|
+
}
|
|
83
|
+
/** Breakpoints like chakra */
|
|
84
|
+
createClass.breakPoints = ['30em', '48em', '62em', '80em', '96em'];
|
|
85
|
+
createClass.count = 0;
|
|
86
|
+
createClass.history = new Map();
|
|
7
87
|
/** delete css comments **/
|
|
8
88
|
function deleteComments(css) {
|
|
9
89
|
return css.replace(/{\/\*[\s\S]*?(?=\*\/})\*\/}/gm, '');
|
|
@@ -31,7 +111,7 @@ function expandArrayValues(css) {
|
|
|
31
111
|
if (i === 0) {
|
|
32
112
|
return `${prop}: ${val};`;
|
|
33
113
|
}
|
|
34
|
-
return `@media (min-width: ${breakPoints[i - 1]}) { ${prop}: ${val}; }`;
|
|
114
|
+
return `@media (min-width: ${createClass.breakPoints[i - 1]}) { ${prop}: ${val}; }`;
|
|
35
115
|
})
|
|
36
116
|
.join('\n');
|
|
37
117
|
}
|
|
@@ -39,48 +119,6 @@ function expandArrayValues(css) {
|
|
|
39
119
|
})
|
|
40
120
|
.join('\n');
|
|
41
121
|
}
|
|
42
|
-
export const shorthandPropsMap = {
|
|
43
|
-
ai: 'align-items',
|
|
44
|
-
b: 'border',
|
|
45
|
-
br: 'border-radius',
|
|
46
|
-
bg: 'background',
|
|
47
|
-
c: 'color',
|
|
48
|
-
d: 'display',
|
|
49
|
-
f: 'flex',
|
|
50
|
-
fd: 'flex-direction',
|
|
51
|
-
i: 'inset',
|
|
52
|
-
h: 'height',
|
|
53
|
-
jc: 'justify-content',
|
|
54
|
-
m: 'margin',
|
|
55
|
-
ml: 'margin-left',
|
|
56
|
-
mr: 'margin-right',
|
|
57
|
-
mt: 'margin-top',
|
|
58
|
-
mb: 'margin-bottom',
|
|
59
|
-
maxW: 'max-width',
|
|
60
|
-
minW: 'min-width',
|
|
61
|
-
p: 'padding',
|
|
62
|
-
pl: 'padding-left',
|
|
63
|
-
pr: 'padding-right',
|
|
64
|
-
pt: 'padding-top',
|
|
65
|
-
pb: 'padding-bottom',
|
|
66
|
-
pos: 'position',
|
|
67
|
-
ta: 'text-align',
|
|
68
|
-
w: 'width',
|
|
69
|
-
z: 'z-index',
|
|
70
|
-
};
|
|
71
|
-
export const shorthandProps = [...Object.keys(shorthandPropsMap), 'mx', 'my', 'px', 'py'];
|
|
72
|
-
/** Expand short-hand css props to full */
|
|
73
|
-
function expandProps(css) {
|
|
74
|
-
css = '\n' + css; // inject a newline to make the regex easier
|
|
75
|
-
// Handle 'mx', 'my', 'px', 'py'
|
|
76
|
-
css = css
|
|
77
|
-
.replace(/([mp])x:([^;]*)/g, '$1l:$2;\n$1r:$2')
|
|
78
|
-
.replace(/([mp])y:([^;]*);/g, '$1t:$2;\n$1b:$2');
|
|
79
|
-
Object.entries(shorthandPropsMap).forEach(([k, v]) => {
|
|
80
|
-
css = css.replace(new RegExp(`([ \n\t;])${k}:`, 'g'), `$1${v}:`);
|
|
81
|
-
});
|
|
82
|
-
return css.trim();
|
|
83
|
-
}
|
|
84
122
|
/** Find @keyframes, @media, @container queries in css **/
|
|
85
123
|
function findQueries(css) {
|
|
86
124
|
const queries = [];
|
|
@@ -116,92 +154,11 @@ function findQueries(css) {
|
|
|
116
154
|
return queries;
|
|
117
155
|
}
|
|
118
156
|
/** Trims whitespace for every line */
|
|
119
|
-
function
|
|
157
|
+
function trimByLine(css) {
|
|
120
158
|
return css
|
|
121
159
|
.split('\n')
|
|
122
160
|
.map(l => l.trim())
|
|
123
161
|
.filter(l => l)
|
|
124
162
|
.join('\n');
|
|
125
163
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Assemble a string from a template string array and a list of placeholders.
|
|
128
|
-
*
|
|
129
|
-
* - If the first argument is a string, it is returned as is.
|
|
130
|
-
*
|
|
131
|
-
* i.e.
|
|
132
|
-
* myFoo(...props: TemplateStringProps) => {
|
|
133
|
-
* const inputStr = t2s(...props);
|
|
134
|
-
* }
|
|
135
|
-
* myFoo`hello ${name}` => 'hello world'
|
|
136
|
-
* myFoo(`hello ${name}`) => 'hello world'
|
|
137
|
-
*/
|
|
138
|
-
export function t2s(...tsp) {
|
|
139
|
-
const [s, ...p] = tsp;
|
|
140
|
-
return typeof s === 'string' ? s : s.map((s, i) => s + (p?.[i] ?? '')).join('');
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Injects css to the page
|
|
144
|
-
*
|
|
145
|
-
* - Batches adds for performance
|
|
146
|
-
*
|
|
147
|
-
* @param css - css to be injected
|
|
148
|
-
* @returns void
|
|
149
|
-
*/
|
|
150
|
-
export function addCss(css) {
|
|
151
|
-
addCss.que.add(css);
|
|
152
|
-
setTimeout(() => {
|
|
153
|
-
const css = [...addCss.que].join('\n');
|
|
154
|
-
if (css) {
|
|
155
|
-
addCss.que.clear();
|
|
156
|
-
const s = document.createElement('style');
|
|
157
|
-
s.id = `u${addCss.count++}`;
|
|
158
|
-
s.innerHTML = css;
|
|
159
|
-
document.head.appendChild(s);
|
|
160
|
-
}
|
|
161
|
-
}, 0);
|
|
162
|
-
}
|
|
163
|
-
addCss.que = new Set();
|
|
164
|
-
addCss.count = 0;
|
|
165
|
-
/**
|
|
166
|
-
* Injects css and creates unique class names
|
|
167
|
-
*
|
|
168
|
-
* - Skips if already added
|
|
169
|
-
*
|
|
170
|
-
* @param css - string or template string, to be injected
|
|
171
|
-
* @returns a unique class name
|
|
172
|
-
*/
|
|
173
|
-
export function createClass(...p) {
|
|
174
|
-
let css = t2s(...p);
|
|
175
|
-
if (!css)
|
|
176
|
-
return '';
|
|
177
|
-
let className = createClass.history.get(css);
|
|
178
|
-
if (!className) {
|
|
179
|
-
className = 's' + createClass.count++;
|
|
180
|
-
createClass.history.set(css, className);
|
|
181
|
-
css = deleteComments(css);
|
|
182
|
-
css = expandProps(css);
|
|
183
|
-
css = expandArrayValues(css);
|
|
184
|
-
const qs = findQueries(css);
|
|
185
|
-
for (const q of qs.reverse()) {
|
|
186
|
-
css = css.slice(0, q.start) + css.slice(q.end);
|
|
187
|
-
}
|
|
188
|
-
css = `.${className}{\n${css}\n}\n`;
|
|
189
|
-
css += qs
|
|
190
|
-
.map(q => {
|
|
191
|
-
if (q.query.startsWith('&')) {
|
|
192
|
-
return `.${className}${q.query.slice(1)}{\n${q.innerBody}\n}`;
|
|
193
|
-
}
|
|
194
|
-
if (q.query.startsWith('@keyframes')) {
|
|
195
|
-
return q.outerBody;
|
|
196
|
-
}
|
|
197
|
-
return `${q.query}{\n.${className}{${q.innerBody}\n}\n}`;
|
|
198
|
-
})
|
|
199
|
-
.join('\n');
|
|
200
|
-
css = trim(css) + '\n\n';
|
|
201
|
-
addCss(css);
|
|
202
|
-
}
|
|
203
|
-
return className;
|
|
204
|
-
}
|
|
205
|
-
createClass.count = 0;
|
|
206
|
-
createClass.history = new Map();
|
|
207
164
|
//# sourceMappingURL=createClass.js.map
|
package/esm/createClass.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createClass.js","sourceRoot":"","sources":["../src/createClass.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"createClass.js","sourceRoot":"","sources":["../src/createClass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,GAAG,EAAC,MAAM,aAAa,CAAA;AAEzC,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAA;AAEpD;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACnB,UAAU,CAAC,GAAG,EAAE;QACd,MAAM,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACtC,I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