weapp-tailwindcss 2.6.2 → 2.7.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.
@@ -1,62 +0,0 @@
1
- 'use strict';
2
-
3
- var dic = require('./dic-05980807.js');
4
-
5
- const MAX_ASCII_CHAR_CODE = 127;
6
- function isAsciiNumber(code) {
7
- return code >= 48 && code <= 57;
8
- }
9
- function escape(selectors, options = {
10
- map: dic.SimpleMappingChars2String
11
- }) {
12
- const { map = dic.SimpleMappingChars2String } = options;
13
- const sb = [...selectors];
14
- for (let i = 0; i < sb.length; i++) {
15
- const char = sb[i];
16
- const code = char.codePointAt(0);
17
- const isCodeExisted = code !== undefined;
18
- const hit = map[char];
19
- if (isCodeExisted) {
20
- if (code > MAX_ASCII_CHAR_CODE) {
21
- sb[i] = 'u' + Number(code).toString(16);
22
- }
23
- else if (hit) {
24
- sb[i] = hit;
25
- }
26
- else if (i === 0) {
27
- if (isAsciiNumber(code)) {
28
- sb[i] = '_' + char;
29
- }
30
- else if (char === '-') {
31
- const nextChar = sb[i + 1];
32
- if (nextChar) {
33
- const nextCharCode = nextChar.codePointAt(0);
34
- if (nextCharCode && isAsciiNumber(nextCharCode)) {
35
- sb[i] = '_' + char;
36
- }
37
- }
38
- else if (nextChar === undefined) {
39
- sb[i] = '_' + char;
40
- }
41
- }
42
- }
43
- }
44
- }
45
- const res = sb.join('');
46
- return res;
47
- }
48
-
49
- function internalCssSelectorReplacer(selectors, options = {
50
- escapeMap: dic.SimpleMappingChars2String
51
- }) {
52
- const { mangleContext, escapeMap } = options;
53
- if (mangleContext) {
54
- selectors = mangleContext.cssHandler(selectors);
55
- }
56
- return escape(selectors, {
57
- map: escapeMap
58
- });
59
- }
60
-
61
- exports.escape = escape;
62
- exports.internalCssSelectorReplacer = internalCssSelectorReplacer;
@@ -1,59 +0,0 @@
1
- import { S as SimpleMappingChars2String } from './dic-3790a3a4.mjs';
2
-
3
- const MAX_ASCII_CHAR_CODE = 127;
4
- function isAsciiNumber(code) {
5
- return code >= 48 && code <= 57;
6
- }
7
- function escape(selectors, options = {
8
- map: SimpleMappingChars2String
9
- }) {
10
- const { map = SimpleMappingChars2String } = options;
11
- const sb = [...selectors];
12
- for (let i = 0; i < sb.length; i++) {
13
- const char = sb[i];
14
- const code = char.codePointAt(0);
15
- const isCodeExisted = code !== undefined;
16
- const hit = map[char];
17
- if (isCodeExisted) {
18
- if (code > MAX_ASCII_CHAR_CODE) {
19
- sb[i] = 'u' + Number(code).toString(16);
20
- }
21
- else if (hit) {
22
- sb[i] = hit;
23
- }
24
- else if (i === 0) {
25
- if (isAsciiNumber(code)) {
26
- sb[i] = '_' + char;
27
- }
28
- else if (char === '-') {
29
- const nextChar = sb[i + 1];
30
- if (nextChar) {
31
- const nextCharCode = nextChar.codePointAt(0);
32
- if (nextCharCode && isAsciiNumber(nextCharCode)) {
33
- sb[i] = '_' + char;
34
- }
35
- }
36
- else if (nextChar === undefined) {
37
- sb[i] = '_' + char;
38
- }
39
- }
40
- }
41
- }
42
- }
43
- const res = sb.join('');
44
- return res;
45
- }
46
-
47
- function internalCssSelectorReplacer(selectors, options = {
48
- escapeMap: SimpleMappingChars2String
49
- }) {
50
- const { mangleContext, escapeMap } = options;
51
- if (mangleContext) {
52
- selectors = mangleContext.cssHandler(selectors);
53
- }
54
- return escape(selectors, {
55
- map: escapeMap
56
- });
57
- }
58
-
59
- export { escape as e, internalCssSelectorReplacer as i };