weapp-tailwindcss 4.11.1 → 4.11.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.
@@ -11,7 +11,7 @@ import {
11
11
  isMpx,
12
12
  patchMpxLoaderResolve,
13
13
  setupMpxTailwindcssRedirect
14
- } from "./chunk-ZUV5AZRB.mjs";
14
+ } from "./chunk-JIERVBTX.mjs";
15
15
  import {
16
16
  pushConcurrentTaskFactories,
17
17
  resolveDisabledOptions,
@@ -28,7 +28,7 @@ import {
28
28
  getCompilerContext,
29
29
  pluginName,
30
30
  setupPatchRecorder
31
- } from "./chunk-4O2J5ZM6.mjs";
31
+ } from "./chunk-AB2RGZQO.mjs";
32
32
  import {
33
33
  getRuntimeClassSetSignature,
34
34
  resolveTailwindcssOptions
@@ -26,7 +26,7 @@ import {
26
26
  toCustomAttributesEntities,
27
27
  traverse,
28
28
  vitePluginName
29
- } from "./chunk-4O2J5ZM6.mjs";
29
+ } from "./chunk-AB2RGZQO.mjs";
30
30
  import {
31
31
  findNearestPackageRoot,
32
32
  findTailwindConfig,
@@ -26,7 +26,7 @@ var _chunkOF6MFURRjs = require('./chunk-OF6MFURR.js');
26
26
 
27
27
 
28
28
 
29
- var _chunkSSASUP5Fjs = require('./chunk-SSASUP5F.js');
29
+ var _chunkTT5WHNGSjs = require('./chunk-TT5WHNGS.js');
30
30
 
31
31
 
32
32
 
@@ -90,7 +90,7 @@ function isRuntimeCandidate(candidate, runtimeSet) {
90
90
  if (!runtimeSet || runtimeSet.size === 0) {
91
91
  return false;
92
92
  }
93
- return runtimeSet.has(candidate) || runtimeSet.has(_chunkSSASUP5Fjs.replaceWxml.call(void 0, candidate));
93
+ return runtimeSet.has(candidate) || runtimeSet.has(_chunkTT5WHNGSjs.replaceWxml.call(void 0, candidate));
94
94
  }
95
95
  function shouldEnableComponentLocalStyle(id) {
96
96
  return COMPONENT_RE.test(id);
@@ -110,7 +110,7 @@ var UniAppXComponentLocalStyleCollector = class {
110
110
  const alias = createAlias(this.fileId, utility, this.aliasByUtility.size);
111
111
  this.aliasByUtility.set(utility, alias);
112
112
  this.aliasByLookup.set(utility, alias);
113
- this.aliasByLookup.set(_chunkSSASUP5Fjs.replaceWxml.call(void 0, utility), alias);
113
+ this.aliasByLookup.set(_chunkTT5WHNGSjs.replaceWxml.call(void 0, utility), alias);
114
114
  return alias;
115
115
  }
116
116
  rewriteLiteral(literal, shouldInclude) {
@@ -133,15 +133,15 @@ var UniAppXComponentLocalStyleCollector = class {
133
133
  collectRuntimeClasses(rawSource, options = {}) {
134
134
  const wrapped = options.wrapExpression ? `${EXPRESSION_WRAPPER_PREFIX}${rawSource}${EXPRESSION_WRAPPER_SUFFIX}` : rawSource;
135
135
  try {
136
- const ast = _chunkSSASUP5Fjs.babelParse.call(void 0, wrapped, {
136
+ const ast = _chunkTT5WHNGSjs.babelParse.call(void 0, wrapped, {
137
137
  plugins: ["typescript"],
138
138
  sourceType: options.wrapExpression ? "module" : "unambiguous"
139
139
  });
140
- const analysis = _chunkSSASUP5Fjs.analyzeSource.call(void 0, ast, {}, void 0, false);
140
+ const analysis = _chunkTT5WHNGSjs.analyzeSource.call(void 0, ast, {}, void 0, false);
141
141
  for (const path7 of analysis.targetPaths) {
142
142
  const { literal, allowDoubleQuotes } = extractLiteralValue(path7);
143
143
  const candidates = _extractors.splitCode.call(void 0, literal, allowDoubleQuotes);
144
- const classContext = options.wrapExpression || _chunkSSASUP5Fjs.isClassContextLiteralPath.call(void 0, path7);
144
+ const classContext = options.wrapExpression || _chunkTT5WHNGSjs.isClassContextLiteralPath.call(void 0, path7);
145
145
  for (const candidate of candidates) {
146
146
  if (!candidate || !classContext && !isRuntimeCandidate(candidate, this.runtimeSet)) {
147
147
  continue;
@@ -160,15 +160,15 @@ var UniAppXComponentLocalStyleCollector = class {
160
160
  }
161
161
  const wrapped = options.wrapExpression ? `${EXPRESSION_WRAPPER_PREFIX}${rawSource}${EXPRESSION_WRAPPER_SUFFIX}` : rawSource;
162
162
  try {
163
- const ast = _chunkSSASUP5Fjs.babelParse.call(void 0, wrapped, {
163
+ const ast = _chunkTT5WHNGSjs.babelParse.call(void 0, wrapped, {
164
164
  plugins: ["typescript"],
165
165
  sourceType: options.wrapExpression ? "module" : "unambiguous"
166
166
  });
167
- const analysis = _chunkSSASUP5Fjs.analyzeSource.call(void 0, ast, {}, void 0, false);
167
+ const analysis = _chunkTT5WHNGSjs.analyzeSource.call(void 0, ast, {}, void 0, false);
168
168
  if (analysis.targetPaths.length === 0) {
169
169
  return rawSource;
170
170
  }
171
- const updater = new (0, _chunkSSASUP5Fjs.JsTokenUpdater)();
171
+ const updater = new (0, _chunkTT5WHNGSjs.JsTokenUpdater)();
172
172
  for (const path7 of analysis.targetPaths) {
173
173
  const { literal, allowDoubleQuotes, offset } = extractLiteralValue(path7);
174
174
  const candidates = _extractors.splitCode.call(void 0, literal, allowDoubleQuotes);
@@ -249,7 +249,7 @@ function updateStaticAttribute(ms, prop) {
249
249
  const start = prop.value.loc.start.offset + 1;
250
250
  const end = prop.value.loc.end.offset - 1;
251
251
  if (start < end) {
252
- ms.update(start, end, _chunkSSASUP5Fjs.replaceWxml.call(void 0, prop.value.content));
252
+ ms.update(start, end, _chunkTT5WHNGSjs.replaceWxml.call(void 0, prop.value.content));
253
253
  }
254
254
  }
255
255
  function updateStaticAttributeWithLocalStyle(ms, prop, collector) {
@@ -271,7 +271,7 @@ function updateDirectiveExpression(ms, prop, jsHandler, runtimeSet) {
271
271
  if (start >= end) {
272
272
  return;
273
273
  }
274
- const generated = _chunkSSASUP5Fjs.generateCode.call(void 0, prop.exp.content, {
274
+ const generated = _chunkTT5WHNGSjs.generateCode.call(void 0, prop.exp.content, {
275
275
  jsHandler,
276
276
  runtimeSet,
277
277
  wrapExpression: true
@@ -290,7 +290,7 @@ function updateDirectiveExpressionWithLocalStyle(ms, prop, jsHandler, collector,
290
290
  collector.collectRuntimeClasses(prop.exp.content, {
291
291
  wrapExpression: true
292
292
  });
293
- const generated = _chunkSSASUP5Fjs.generateCode.call(void 0, prop.exp.content, {
293
+ const generated = _chunkTT5WHNGSjs.generateCode.call(void 0, prop.exp.content, {
294
294
  jsHandler,
295
295
  runtimeSet,
296
296
  wrapExpression: true
@@ -320,7 +320,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
320
320
  return;
321
321
  }
322
322
  const { customAttributesEntities, disabledDefaultTemplateHandler = false } = options;
323
- const matchCustomAttribute = _chunkSSASUP5Fjs.createAttributeMatcher.call(void 0, customAttributesEntities);
323
+ const matchCustomAttribute = _chunkTT5WHNGSjs.createAttributeMatcher.call(void 0, customAttributesEntities);
324
324
  const ms = new (0, _magicstring2.default)(code);
325
325
  const { descriptor, errors } = _compilersfc.parse.call(void 0, code);
326
326
  const localStyleCollector = options.enableComponentLocalStyle && shouldEnableComponentLocalStyle(id) ? new UniAppXComponentLocalStyleCollector(id, runtimeSet) : void 0;
@@ -819,14 +819,14 @@ function createHtmlRuntimeAffectingSignature(source) {
819
819
  }
820
820
  function createJsRuntimeAffectingSignature(source) {
821
821
  try {
822
- const ast = _chunkSSASUP5Fjs.babelParse.call(void 0, source, {
822
+ const ast = _chunkTT5WHNGSjs.babelParse.call(void 0, source, {
823
823
  cache: true,
824
824
  cacheKey: "vite-runtime-affecting:unambiguous",
825
825
  plugins: ["jsx", "typescript"],
826
826
  sourceType: "unambiguous"
827
827
  });
828
828
  const parts = [];
829
- _chunkSSASUP5Fjs.traverse.call(void 0, ast, {
829
+ _chunkTT5WHNGSjs.traverse.call(void 0, ast, {
830
830
  noScope: true,
831
831
  StringLiteral(path7) {
832
832
  parts.push(`s:${path7.node.value}`);
@@ -1608,7 +1608,7 @@ var _module = require('module');
1608
1608
 
1609
1609
 
1610
1610
  var _tailwindcsspatch = require('tailwindcss-patch');
1611
- var debug = _chunkSSASUP5Fjs.createDebug.call(void 0, "[vite:runtime-set] ");
1611
+ var debug = _chunkTT5WHNGSjs.createDebug.call(void 0, "[vite:runtime-set] ");
1612
1612
  var require2 = _module.createRequire.call(void 0, _chunkCRDOWYG4js.importMetaUrl);
1613
1613
  var EXTENSION_DOT_PREFIX_RE = /^\./;
1614
1614
  var VALIDATION_FILE_NAME = "runtime-candidates.html";
@@ -2076,7 +2076,7 @@ function createRewriteCssImportsPlugins(options) {
2076
2076
  const resolveAppType = () => _nullishCoalesce(_optionalChain([getAppType, 'optionalCall', _63 => _63()]), () => ( appType));
2077
2077
  return [
2078
2078
  {
2079
- name: `${_chunkSSASUP5Fjs.vitePluginName}:rewrite-css-imports`,
2079
+ name: `${_chunkTT5WHNGSjs.vitePluginName}:rewrite-css-imports`,
2080
2080
  enforce: "pre",
2081
2081
  resolveId: {
2082
2082
  order: "pre",
@@ -2118,7 +2118,7 @@ function createRewriteCssImportsPlugins(options) {
2118
2118
  }
2119
2119
 
2120
2120
  // src/bundlers/vite/index.ts
2121
- var debug2 = _chunkSSASUP5Fjs.createDebug.call(void 0, );
2121
+ var debug2 = _chunkTT5WHNGSjs.createDebug.call(void 0, );
2122
2122
  var weappTailwindcssPackageDir = _chunk7LKMJZD2js.resolvePackageDir.call(void 0, "weapp-tailwindcss");
2123
2123
  var weappTailwindcssDirPosix = slash(weappTailwindcssPackageDir);
2124
2124
  var PACKAGE_JSON_FILE2 = "package.json";
@@ -2151,7 +2151,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2151
2151
  const hasExplicitAppType = typeof options.appType === "string" && options.appType.trim().length > 0;
2152
2152
  const rewriteCssImportsSpecified = Object.hasOwn(options, "rewriteCssImports");
2153
2153
  const hasExplicitTailwindcssBasedir = typeof options.tailwindcssBasedir === "string" && options.tailwindcssBasedir.trim().length > 0;
2154
- const opts = _chunkSSASUP5Fjs.getCompilerContext.call(void 0, options);
2154
+ const opts = _chunkTT5WHNGSjs.getCompilerContext.call(void 0, options);
2155
2155
  const {
2156
2156
  disabled,
2157
2157
  customAttributes,
@@ -2176,8 +2176,8 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2176
2176
  if (disabledOptions.plugin) {
2177
2177
  return rewritePlugins.length ? rewritePlugins : void 0;
2178
2178
  }
2179
- const customAttributesEntities = _chunkSSASUP5Fjs.toCustomAttributesEntities.call(void 0, customAttributes);
2180
- const patchRecorderState = _chunkSSASUP5Fjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
2179
+ const customAttributesEntities = _chunkTT5WHNGSjs.toCustomAttributesEntities.call(void 0, customAttributes);
2180
+ const patchRecorderState = _chunkTT5WHNGSjs.setupPatchRecorder.call(void 0, initialTwPatcher, opts.tailwindcssBasedir, {
2181
2181
  source: "runtime",
2182
2182
  cwd: _nullishCoalesce(opts.tailwindcssBasedir, () => ( _process2.default.cwd()))
2183
2183
  });
@@ -2216,7 +2216,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2216
2216
  async function refreshRuntimeState(force) {
2217
2217
  const invalidation = resolveRuntimeRefreshOptions();
2218
2218
  const shouldRefresh = force || invalidation.changed;
2219
- const refreshed = await _chunkSSASUP5Fjs.refreshTailwindRuntimeState.call(void 0, runtimeState, {
2219
+ const refreshed = await _chunkTT5WHNGSjs.refreshTailwindRuntimeState.call(void 0, runtimeState, {
2220
2220
  force: shouldRefresh,
2221
2221
  clearCache: force || invalidation.changed
2222
2222
  });
@@ -2237,7 +2237,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2237
2237
  }
2238
2238
  if (forceRuntimeRefresh || !runtimeSetPromise) {
2239
2239
  const invalidation = resolveRuntimeRefreshOptions();
2240
- const task2 = _chunkSSASUP5Fjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
2240
+ const task2 = _chunkTT5WHNGSjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
2241
2241
  force: forceRuntimeRefresh || invalidation.changed,
2242
2242
  skipRefresh: forceRuntimeRefresh,
2243
2243
  clearCache: forceRuntimeRefresh || invalidation.changed
@@ -2279,7 +2279,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2279
2279
  if (!forceRuntimeRefresh && !invalidation.changed && !forceCollectBySource && runtimeSet) {
2280
2280
  return runtimeSet;
2281
2281
  }
2282
- const task = _chunkSSASUP5Fjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
2282
+ const task = _chunkTT5WHNGSjs.collectRuntimeClassSet.call(void 0, runtimeState.twPatcher, {
2283
2283
  force: forceRuntimeRefresh || invalidation.changed || forceCollectBySource,
2284
2284
  skipRefresh: forceRuntimeRefresh,
2285
2285
  clearCache: forceRuntimeRefresh || invalidation.changed
@@ -2314,7 +2314,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
2314
2314
  const plugins = [
2315
2315
  ...rewritePlugins,
2316
2316
  {
2317
- name: `${_chunkSSASUP5Fjs.vitePluginName}:post`,
2317
+ name: `${_chunkTT5WHNGSjs.vitePluginName}:post`,
2318
2318
  enforce: "post",
2319
2319
  async configResolved(config) {
2320
2320
  resolvedConfig = config;
@@ -7,7 +7,7 @@ import {
7
7
  getCompilerContext,
8
8
  refreshTailwindRuntimeState,
9
9
  setupPatchRecorder
10
- } from "./chunk-4O2J5ZM6.mjs";
10
+ } from "./chunk-AB2RGZQO.mjs";
11
11
 
12
12
  // src/bundlers/gulp/index.ts
13
13
  import { Buffer } from "buffer";