weapp-tailwindcss 3.4.0-alpha.0 → 3.4.0-alpha.2

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.
Files changed (124) hide show
  1. package/dist/babel/index.d.ts +16 -0
  2. package/dist/bundlers/gulp/index.d.ts +8 -0
  3. package/dist/bundlers/vite/index.d.ts +3 -0
  4. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +8 -0
  5. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +8 -0
  6. package/dist/bundlers/webpack/index.d.ts +1 -0
  7. package/dist/{weapp-tw-runtime-loader.d.ts → bundlers/webpack/loaders/weapp-tw-runtime-loader.d.ts} +2 -4
  8. package/dist/cache/index.d.ts +32 -0
  9. package/dist/cli.d.ts +1 -2
  10. package/dist/cli.js +51 -1760
  11. package/dist/cli.mjs +45 -34
  12. package/dist/constants-CFM1J-h1.js +42 -0
  13. package/dist/constants-Dy2Dd3Fz.mjs +36 -0
  14. package/dist/constants.d.ts +7 -0
  15. package/dist/core.d.ts +2 -16
  16. package/dist/core.js +60 -1775
  17. package/dist/core.mjs +60 -46
  18. package/dist/css-macro/constants.d.ts +14 -0
  19. package/dist/css-macro/index.d.ts +4 -7
  20. package/dist/css-macro/index.js +30 -140
  21. package/dist/css-macro/index.mjs +28 -35
  22. package/dist/css-macro/postcss.d.ts +3 -5
  23. package/dist/css-macro/postcss.js +46 -99
  24. package/dist/css-macro/postcss.mjs +45 -54
  25. package/dist/debug/index.d.ts +2 -0
  26. package/dist/defaults-DW-EahCC.js +145 -0
  27. package/dist/defaults-w3rlKQwe.mjs +139 -0
  28. package/dist/defaults.d.ts +2 -16
  29. package/dist/defaults.js +7 -208
  30. package/dist/defaults.mjs +4 -9
  31. package/dist/defu-Cdz2PomB.js +60 -0
  32. package/dist/defu-n46TJT6t.mjs +57 -0
  33. package/dist/env.d.ts +2 -0
  34. package/dist/escape.d.ts +4 -0
  35. package/dist/extractors/split.d.ts +3 -0
  36. package/dist/gulp.d.ts +1 -26
  37. package/dist/gulp.js +38 -1898
  38. package/dist/gulp.mjs +30 -15
  39. package/dist/index-B2TNoaOv.mjs +134 -0
  40. package/dist/index-B5NiRecR.js +130 -0
  41. package/dist/index-BEIjgKpF.mjs +11 -0
  42. package/dist/index-BPzIdybK.mjs +513 -0
  43. package/dist/index-DeW_zXzo.mjs +124 -0
  44. package/dist/index-DmzxhHCX.js +136 -0
  45. package/dist/index-DwZHOkK3.js +526 -0
  46. package/dist/index-HC-Qkn0i.js +17 -0
  47. package/dist/index.d.ts +4 -17
  48. package/dist/index.js +43 -2291
  49. package/dist/index.mjs +33 -23
  50. package/dist/js/handlers.d.ts +13 -0
  51. package/dist/js/index.d.ts +7 -0
  52. package/dist/mangle/index.d.ts +8 -0
  53. package/dist/options-7EjuAISl.mjs +869 -0
  54. package/dist/options-C-rvBixk.js +901 -0
  55. package/dist/options.d.ts +2 -0
  56. package/dist/postcss/cssVars.d.ts +5 -0
  57. package/dist/postcss/index.d.ts +3 -0
  58. package/dist/postcss/mp.d.ts +8 -0
  59. package/dist/postcss/plugins/ctx.d.ts +6 -0
  60. package/dist/postcss/plugins/index.d.ts +7 -0
  61. package/dist/postcss/plugins/post.d.ts +5 -0
  62. package/dist/postcss/plugins/pre.d.ts +5 -0
  63. package/dist/postcss/preflight.d.ts +3 -0
  64. package/dist/postcss/selectorParser.d.ts +6 -0
  65. package/dist/postcss/shared.d.ts +3 -0
  66. package/dist/postcss/symbols.d.ts +1 -0
  67. package/dist/postcss.d.ts +1 -23
  68. package/dist/postcss.js +22 -598
  69. package/dist/postcss.mjs +8 -17
  70. package/dist/reg.d.ts +1 -0
  71. package/dist/replace.d.ts +3 -19
  72. package/dist/replace.js +42 -93
  73. package/dist/replace.mjs +26 -30
  74. package/dist/shared-DbJl6i6a.mjs +25 -0
  75. package/dist/shared-hzYeE1wX.js +28 -0
  76. package/dist/tailwindcss/patcher.d.ts +3 -0
  77. package/dist/types.d.ts +165 -0
  78. package/dist/utils.d.ts +18 -0
  79. package/dist/v5-BD9-sqra.mjs +174 -0
  80. package/dist/v5-Ch6783yy.js +181 -0
  81. package/dist/vite.d.ts +1 -22
  82. package/dist/vite.js +36 -1947
  83. package/dist/vite.mjs +28 -15
  84. package/dist/weapp-tw-runtime-loader.js +14 -41
  85. package/dist/weapp-tw-runtime-loader.mjs +8 -12
  86. package/dist/webpack.d.ts +1 -26
  87. package/dist/webpack.js +37 -1994
  88. package/dist/webpack.mjs +29 -15
  89. package/dist/webpack4.d.ts +1 -27
  90. package/dist/webpack4.js +190 -1979
  91. package/dist/webpack4.mjs +188 -211
  92. package/dist/wxml/Tokenizer.d.ts +31 -0
  93. package/dist/wxml/index.d.ts +2 -0
  94. package/dist/wxml/shared.d.ts +2 -0
  95. package/dist/wxml/utils.d.ts +13 -0
  96. package/package.json +3 -3
  97. package/dist/chunk-257YPDSI.mjs +0 -173
  98. package/dist/chunk-75EWCRQW.mjs +0 -13
  99. package/dist/chunk-AB467PG7.mjs +0 -43
  100. package/dist/chunk-E7XGHGC7.mjs +0 -62
  101. package/dist/chunk-GUE4UCRJ.mjs +0 -126
  102. package/dist/chunk-IOYI6MSW.mjs +0 -533
  103. package/dist/chunk-LDWI65M5.mjs +0 -152
  104. package/dist/chunk-NVFWRLOI.mjs +0 -27
  105. package/dist/chunk-ORMKM6ZA.mjs +0 -30
  106. package/dist/chunk-PC4B5JJB.mjs +0 -953
  107. package/dist/chunk-SRLZU2YE.mjs +0 -95
  108. package/dist/chunk-VECXHWWG.mjs +0 -31
  109. package/dist/chunk-VN37QGSM.mjs +0 -216
  110. package/dist/cli.d.mts +0 -2
  111. package/dist/core.d.mts +0 -22
  112. package/dist/css-macro/index.d.mts +0 -18
  113. package/dist/css-macro/postcss.d.mts +0 -7
  114. package/dist/defaults.d.mts +0 -16
  115. package/dist/gulp.d.mts +0 -26
  116. package/dist/index.d.mts +0 -17
  117. package/dist/postcss.d.mts +0 -23
  118. package/dist/replace.d.mts +0 -19
  119. package/dist/types-DSNuiOhH.d.mts +0 -519
  120. package/dist/types-DSNuiOhH.d.ts +0 -519
  121. package/dist/vite.d.mts +0 -22
  122. package/dist/weapp-tw-runtime-loader.d.mts +0 -7
  123. package/dist/webpack.d.mts +0 -26
  124. package/dist/webpack4.d.mts +0 -27
@@ -1,43 +0,0 @@
1
- // src/css-macro/constants.ts
2
- var queryKey = "weapp-tw-platform";
3
- function createMediaQuery(value) {
4
- return `@media (${queryKey}:"${value}"){&}`;
5
- }
6
- function createNegativeMediaQuery(value) {
7
- return `@media not screen and (${queryKey}:"${value}"){&}`;
8
- }
9
- function normalComment(text) {
10
- if (typeof text === "string") {
11
- return text.replaceAll(new RegExp("(?<!\\\\)_", "g"), " ");
12
- }
13
- return text;
14
- }
15
- function ifdef(text) {
16
- return {
17
- start: `#ifdef ${normalComment(text)}`,
18
- end: `#endif`
19
- };
20
- }
21
- function ifndef(text) {
22
- return {
23
- start: `#ifndef ${normalComment(text)}`,
24
- end: `#endif`
25
- };
26
- }
27
- function matchCustomPropertyFromValue(str, cb) {
28
- let arr;
29
- let index = 0;
30
- const regex = new RegExp(`\\(\\s*${queryKey}\\s*:\\s*"([^)]*)"\\)`, "g");
31
- while ((arr = regex.exec(str)) !== null) {
32
- cb(arr, index);
33
- index++;
34
- }
35
- }
36
-
37
- export {
38
- createMediaQuery,
39
- createNegativeMediaQuery,
40
- ifdef,
41
- ifndef,
42
- matchCustomPropertyFromValue
43
- };
@@ -1,62 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __spreadValues = (a, b) => {
11
- for (var prop in b || (b = {}))
12
- if (__hasOwnProp.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- if (__getOwnPropSymbols)
15
- for (var prop of __getOwnPropSymbols(b)) {
16
- if (__propIsEnum.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- }
19
- return a;
20
- };
21
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
- var __export = (target, all) => {
23
- for (var name in all)
24
- __defProp(target, name, { get: all[name], enumerable: true });
25
- };
26
- var __copyProps = (to, from, except, desc) => {
27
- if (from && typeof from === "object" || typeof from === "function") {
28
- for (let key of __getOwnPropNames(from))
29
- if (!__hasOwnProp.call(to, key) && key !== except)
30
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
31
- }
32
- return to;
33
- };
34
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
35
- var __async = (__this, __arguments, generator) => {
36
- return new Promise((resolve, reject) => {
37
- var fulfilled = (value) => {
38
- try {
39
- step(generator.next(value));
40
- } catch (e) {
41
- reject(e);
42
- }
43
- };
44
- var rejected = (value) => {
45
- try {
46
- step(generator.throw(value));
47
- } catch (e) {
48
- reject(e);
49
- }
50
- };
51
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
52
- step((generator = generator.apply(__this, __arguments)).next());
53
- });
54
- };
55
-
56
- export {
57
- __spreadValues,
58
- __spreadProps,
59
- __export,
60
- __reExport,
61
- __async
62
- };
@@ -1,126 +0,0 @@
1
- // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
2
- function isPlainObject(value) {
3
- if (value === null || typeof value !== "object") {
4
- return false;
5
- }
6
- const prototype = Object.getPrototypeOf(value);
7
- if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
8
- return false;
9
- }
10
- if (Symbol.iterator in value) {
11
- return false;
12
- }
13
- if (Symbol.toStringTag in value) {
14
- return Object.prototype.toString.call(value) === "[object Module]";
15
- }
16
- return true;
17
- }
18
- function _defu(baseObject, defaults, namespace = ".", merger) {
19
- if (!isPlainObject(defaults)) {
20
- return _defu(baseObject, {}, namespace, merger);
21
- }
22
- const object = Object.assign({}, defaults);
23
- for (const key in baseObject) {
24
- if (key === "__proto__" || key === "constructor") {
25
- continue;
26
- }
27
- const value = baseObject[key];
28
- if (value === null || value === void 0) {
29
- continue;
30
- }
31
- if (merger && merger(object, key, value, namespace)) {
32
- continue;
33
- }
34
- if (Array.isArray(value) && Array.isArray(object[key])) {
35
- object[key] = [...value, ...object[key]];
36
- } else if (isPlainObject(value) && isPlainObject(object[key])) {
37
- object[key] = _defu(
38
- value,
39
- object[key],
40
- (namespace ? `${namespace}.` : "") + key.toString(),
41
- merger
42
- );
43
- } else {
44
- object[key] = value;
45
- }
46
- }
47
- return object;
48
- }
49
- function createDefu(merger) {
50
- return (...arguments_) => (
51
- // eslint-disable-next-line unicorn/no-array-reduce
52
- arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
53
- );
54
- }
55
- var defu = createDefu();
56
- var defuFn = createDefu((object, key, currentValue) => {
57
- if (object[key] !== void 0 && typeof currentValue === "function") {
58
- object[key] = currentValue(object[key]);
59
- return true;
60
- }
61
- });
62
- var defuArrayFn = createDefu((object, key, currentValue) => {
63
- if (Array.isArray(object[key]) && typeof currentValue === "function") {
64
- object[key] = currentValue(object[key]);
65
- return true;
66
- }
67
- });
68
-
69
- // src/utils.ts
70
- function isMap(value) {
71
- return Object.prototype.toString.call(value) === "[object Map]";
72
- }
73
- function noop() {
74
- }
75
- function groupBy(arr, cb) {
76
- if (!Array.isArray(arr)) {
77
- throw new TypeError("expected an array for first argument");
78
- }
79
- if (typeof cb !== "function") {
80
- throw new TypeError("expected a function for second argument");
81
- }
82
- const result = {};
83
- for (const item of arr) {
84
- const bucketCategory = cb(item);
85
- const bucket = result[bucketCategory];
86
- if (Array.isArray(bucket)) {
87
- result[bucketCategory].push(item);
88
- } else {
89
- result[bucketCategory] = [item];
90
- }
91
- }
92
- return result;
93
- }
94
- function getGroupedEntries(entries, options) {
95
- const { cssMatcher, htmlMatcher, jsMatcher, wxsMatcher } = options;
96
- const groupedEntries = groupBy(entries, ([file]) => {
97
- if (cssMatcher(file)) {
98
- return "css";
99
- } else if (htmlMatcher(file)) {
100
- return "html";
101
- } else if (jsMatcher(file) || wxsMatcher(file)) {
102
- return "js";
103
- } else {
104
- return "other";
105
- }
106
- });
107
- return groupedEntries;
108
- }
109
- function removeExt(file) {
110
- return file.replace(/\.[^./]+$/, "");
111
- }
112
- var defuOverrideArray = createDefu((obj, key, value) => {
113
- if (Array.isArray(obj[key]) && Array.isArray(value)) {
114
- obj[key] = value;
115
- return true;
116
- }
117
- });
118
-
119
- export {
120
- defu,
121
- isMap,
122
- noop,
123
- getGroupedEntries,
124
- removeExt,
125
- defuOverrideArray
126
- };