weapp-tailwindcss 5.5.1 → 5.5.3
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/dist/bundlers/shared/css-imports.d.ts +1 -0
- package/dist/bundlers/shared/framework-user-css.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/output-import-shell.d.ts +6 -2
- package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +1 -1
- package/dist/bundlers/shared/v4-generation-core.d.ts +1 -0
- package/dist/bundlers/vite/frameworks/taro/index.d.ts +2 -1
- package/dist/bundlers/vite/generate-bundle/bundle-markup-candidates.d.ts +3 -2
- package/dist/bundlers/vite/generate-bundle/css-output-helpers.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/entry-style-graph.d.ts +6 -0
- package/dist/bundlers/vite/generate-bundle/runtime-configured-css.d.ts +1 -0
- package/dist/bundlers/vite/serve-js-transform.d.ts +1 -1
- package/dist/bundlers/vite/shared/create-framework-plugins.d.ts +2 -0
- package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +3 -1
- package/dist/bundlers/webpack/shared/loader-anchors.d.ts +1 -0
- package/dist/compiler/runtime-snapshot.d.ts +4 -1
- package/dist/{compiler-B0YSc0DY.js → compiler-C9X5Afn4.js} +3 -3
- package/dist/{compiler-D2ZJc3uA.cjs → compiler-DMPaUcH6.cjs} +6 -6
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{css-imports-BFMU7Hpd.cjs → css-imports-DXplvodk.cjs} +29 -0
- package/dist/{css-loader-runtime-CSv0lKqV.cjs → css-loader-runtime-DGqsWVua.cjs} +2 -1
- package/dist/{defaults-B5ep0ojb.js → defaults-CKx-4LcW.js} +1 -1
- package/dist/{defaults-BI9j1znS.cjs → defaults-CiGsr8Xq.cjs} +1 -1
- package/dist/defaults.cjs +1 -1
- package/dist/defaults.js +1 -1
- package/dist/{generator-DsrQ9txU.cjs → generator-BoZIiZD5.cjs} +130 -77
- package/dist/{generator-DyXTBPmE.js → generator-C2aWns8n.js} +119 -78
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-DXeQfvVC.js → gulp-COAAztkm.js} +4 -4
- package/dist/{gulp-C9ENAx3f.cjs → gulp-D50z06nw.cjs} +5 -5
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-DNxQm-bN.js → hmr-timing-CTk1uZr9.js} +245 -183
- package/dist/{hmr-timing-Cz4IesEM.cjs → hmr-timing-DK0MJKpl.cjs} +5 -5
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/{pipeline-helpers-CSGnR5gh.cjs → pipeline-helpers-BzjYXNTa.cjs} +4 -4
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +2 -2
- package/dist/presets.js +2 -2
- package/dist/rspack.cjs +6 -3
- package/dist/rspack.js +6 -3
- package/dist/{scoped-generator-kRj_5Axx.js → scoped-generator-C21A7fis.js} +3 -3
- package/dist/{scoped-generator-TVjEaOeP.cjs → scoped-generator-CTkuf9Ae.cjs} +3 -3
- package/dist/{source-candidate-scan-signature-B7cUxqqX.cjs → source-candidate-scan-signature-4mZDDaKT.cjs} +2 -2
- package/dist/{source-candidate-scan-signature-CsP4BQNa.js → source-candidate-scan-signature-BB5DfjO2.js} +2 -2
- package/dist/tailwindcss/v4-engine/css-import.d.ts +14 -0
- package/dist/{tailwindcss-C-jBBQfw.cjs → tailwindcss-Bji4u8In.cjs} +1 -1
- package/dist/{tailwindcss-BK9S7zuq.js → tailwindcss-c4PkOe1F.js} +1 -1
- package/dist/{transform-DUPOPZ54.cjs → transform-Cy0ddBWf.cjs} +14 -14
- package/dist/{transform-CfOzh007.js → transform-DmLonqPE.js} +14 -14
- package/dist/uni-app-x/border-preflight.d.ts +18 -0
- package/dist/uni-app-x/style-asset/source-parser.d.ts +2 -0
- package/dist/uni-app-x/style-reference-path.d.ts +1 -0
- package/dist/uni-app-x/transform.d.ts +2 -0
- package/dist/uni-app-x/vite/plugin-options.d.ts +2 -0
- package/dist/uni-app-x/vite/style-request.d.ts +5 -0
- package/dist/uni-app-x/vite/style-source.d.ts +14 -4
- package/dist/uni-app-x/vite/web-sfc-hmr.d.ts +14 -0
- package/dist/{v4-generation-core-CRNUU_Rr.cjs → v4-generation-core-DQeiq-g1.cjs} +243 -181
- package/dist/vite/web.cjs +1 -1
- package/dist/vite/web.js +1 -1
- package/dist/{vite-BXe-axax.js → vite-CaUxtQx5.js} +340 -88
- package/dist/{vite-D_mAIfTU.cjs → vite-OG66oLpb.cjs} +356 -85
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/{watch-dependencies-DLZDrWdH.cjs → watch-dependencies-GbC14Rlt.cjs} +14 -11
- package/dist/weapp-tw-css-generation-loader.cjs +3 -2
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +11 -10
- package/dist/weapp-tw-runtime-classset-loader.cjs +16 -11
- package/dist/{web-Cv7ualrU.js → web-Bd-9OHFE.js} +7 -6
- package/dist/{web-B2Ea9K4B.cjs → web-CZKIefdl.cjs} +9 -8
- package/dist/{webpack-7Um2GFtx.js → webpack-Cyvq3H7Z.js} +38 -23
- package/dist/{webpack-Ce04-btG.cjs → webpack-DJGgU27Y.cjs} +37 -23
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/package.json +7 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppType } from '../../types/index.js';
|
|
2
|
+
export declare function normalizeResolvedTailwindcssImports(code: string, pkgDir: string | undefined): string;
|
|
2
3
|
export interface ResolveTailwindcssImportOptions {
|
|
3
4
|
join?: ((base: string, subpath: string) => string) | undefined;
|
|
4
5
|
appType?: AppType | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { GenerateCssByGeneratorOptions, GenerateCssByGeneratorResult } from './generator-css.js';
|
|
2
|
+
import type { NormalizedWeappTailwindcssGeneratorOptions } from '../../generator/index.js';
|
|
3
|
+
export declare function restoreFrameworkProcessedUserCss(css: string, generated: GenerateCssByGeneratorResult, source: string, options: GenerateCssByGeneratorOptions, generatorOptions: NormalizedWeappTailwindcssGeneratorOptions): Promise<string>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export declare function normalizeMiniProgramImportShell(css: string
|
|
1
|
+
export declare function normalizeMiniProgramImportShell(css: string, output?: {
|
|
2
|
+
outputFile: string;
|
|
3
|
+
outputFiles: Iterable<string>;
|
|
4
|
+
cssOnly?: boolean;
|
|
5
|
+
}): string;
|
|
2
6
|
export declare function removeSelfMiniProgramOutputImports(css: string, outputFile: string): string;
|
|
3
7
|
export declare function removeMiniProgramOutputImports(css: string): string;
|
|
4
|
-
export declare function normalizeMiniProgramGeneratorCssSource(css: string, outputFile?: string | undefined): string;
|
|
8
|
+
export declare function normalizeMiniProgramGeneratorCssSource(css: string, outputFile?: string | undefined, outputFiles?: Iterable<string>): string;
|
|
@@ -6,7 +6,7 @@ export interface SourceCandidateStore {
|
|
|
6
6
|
syncSource: (id: string, source: string) => Promise<void>;
|
|
7
7
|
sync: (id: string, source: string) => Promise<void>;
|
|
8
8
|
syncCss: (id: string, source: string) => Promise<void>;
|
|
9
|
-
syncModuleSource: (id: string, source: string) => Promise<Set<string>>;
|
|
9
|
+
syncModuleSource: (id: string, source: string, extension?: string) => Promise<Set<string>>;
|
|
10
10
|
merge: (id: string, source: string) => Promise<void>;
|
|
11
11
|
syncFile: (id: string) => Promise<void>;
|
|
12
12
|
syncCurrentSource: (id: string, source: string) => Promise<SourceCandidateChange>;
|
|
@@ -6,6 +6,7 @@ export interface TailwindV4GenerationCoreInput extends GenerateCssByGeneratorOpt
|
|
|
6
6
|
compilationChanges?: CompilationDependencyChange[] | undefined;
|
|
7
7
|
frameworkPostcssOwner?: InternalUserDefinedOptions | undefined;
|
|
8
8
|
cssStage?: CssStage | undefined;
|
|
9
|
+
frameworkProcessedUserCss?: string | undefined;
|
|
9
10
|
outputFile?: string | undefined;
|
|
10
11
|
onCompilerShadowReport?: ((report: CompilerShadowReport) => void) | undefined;
|
|
11
12
|
scope?: SourceScope | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
1
2
|
import type { ViteFrameworkCssPipelineStrategy } from '../../shared/framework-strategy.js';
|
|
2
3
|
import type { InternalUserDefinedOptions, UserDefinedOptions } from '../../../../types/index.js';
|
|
3
4
|
export declare const taroCssPipelineStrategy: ViteFrameworkCssPipelineStrategy;
|
|
4
|
-
export declare function createTaroVitePlugins(options?: UserDefinedOptions | InternalUserDefinedOptions): any[];
|
|
5
|
+
export declare function createTaroVitePlugins(options?: UserDefinedOptions | InternalUserDefinedOptions): (Plugin<any> | import("../../index.js").WeappTailwindcssVitePlugin)[] | undefined;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { BundleSnapshot } from '../bundle-state.js';
|
|
2
2
|
import type { SourceCandidateFilterOptions } from '../source-candidates.js';
|
|
3
3
|
import type { createTransformFilter } from './transform-filter.js';
|
|
4
|
+
import type { RuntimeCompilationBuildState } from '../../../compiler/index.js';
|
|
4
5
|
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan.js';
|
|
5
6
|
interface CollectBundleMarkupCandidatesOptions {
|
|
6
7
|
extractSourceCandidates?: ((file: string, source: string) => Promise<Set<string>>) | undefined;
|
|
7
|
-
previousCandidatesByFile?:
|
|
8
|
+
previousCandidatesByFile?: RuntimeCompilationBuildState['bundleMarkupCandidatesByFile'] | undefined;
|
|
8
9
|
preserveMissingFiles?: boolean | undefined;
|
|
9
10
|
resolveSourceCandidateFile: (file: string) => string | undefined;
|
|
10
11
|
rootDir: string;
|
|
@@ -12,7 +13,7 @@ interface CollectBundleMarkupCandidatesOptions {
|
|
|
12
13
|
transformFilter: ReturnType<typeof createTransformFilter>;
|
|
13
14
|
}
|
|
14
15
|
export interface BundleMarkupCandidateCollection {
|
|
15
|
-
candidatesByFile:
|
|
16
|
+
candidatesByFile: RuntimeCompilationBuildState['bundleMarkupCandidatesByFile'];
|
|
16
17
|
values: Set<string>;
|
|
17
18
|
valuesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>;
|
|
18
19
|
}
|
|
@@ -2,6 +2,7 @@ import type { OutputAsset, OutputChunk } from 'rollup';
|
|
|
2
2
|
import type { ViteFrameworkCssPipelineContext, ViteFrameworkCssPipelineStrategy } from '../shared/framework-strategy.js';
|
|
3
3
|
import type { InternalUserDefinedOptions } from '../../../types/index.js';
|
|
4
4
|
export declare function resolveCssBundleOutputFile(options: {
|
|
5
|
+
assetOutputFile?: string | undefined;
|
|
5
6
|
bundleFiles: string[];
|
|
6
7
|
defaultStyleOutputExtension: string;
|
|
7
8
|
file: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { OutputBundle } from 'rollup';
|
|
2
|
+
export declare function linkEntryChunkStyles(bundle: OutputBundle, options: {
|
|
3
|
+
matchesCss: (file: string) => boolean;
|
|
4
|
+
resolveOutputFile: (sourceFile: string) => string | undefined;
|
|
5
|
+
onUpdate?: ((file: string, oldVal: string, newVal: string) => void) | undefined;
|
|
6
|
+
}): void;
|
|
@@ -21,6 +21,7 @@ export declare function createConfiguredCssSourceRegistry(options: CreateConfigu
|
|
|
21
21
|
resolveMatchedSourceOutputFile: (sourceFile: string) => string | undefined;
|
|
22
22
|
};
|
|
23
23
|
export interface CreateConfiguredCssRootResolversOptions {
|
|
24
|
+
rootImportShellTargets?: ReadonlyMap<string, string> | undefined;
|
|
24
25
|
bundle: OutputBundle;
|
|
25
26
|
bundleFiles: string[];
|
|
26
27
|
cssPipelineContext: ViteFrameworkCssPipelineContext;
|
|
@@ -5,7 +5,7 @@ interface ViteServeJsTransformOptions {
|
|
|
5
5
|
getCommand: () => string | undefined;
|
|
6
6
|
jsHandler: InternalUserDefinedOptions['jsHandler'];
|
|
7
7
|
shouldTransform: () => boolean;
|
|
8
|
-
transformRuntime: () => Promise<Set<string>> | Set<string>;
|
|
8
|
+
transformRuntime: (id: string, source: string) => Promise<Set<string>> | Set<string>;
|
|
9
9
|
}
|
|
10
10
|
export declare function createViteServeJsTransformPlugin(options: ViteServeJsTransformOptions): Plugin;
|
|
11
11
|
export {};
|
|
@@ -22,6 +22,8 @@ export interface ViteFrameworkBranchContext {
|
|
|
22
22
|
sourceCandidatesBeforeExtraPlugin?: (plugin: Plugin) => boolean;
|
|
23
23
|
}
|
|
24
24
|
export interface ViteFrameworkExtraPluginContext {
|
|
25
|
+
cssPreflight: InternalUserDefinedOptions['cssPreflight'];
|
|
26
|
+
cssPreflightRange: InternalUserDefinedOptions['cssPreflightRange'];
|
|
25
27
|
customAttributesEntities: ReturnType<typeof toCustomAttributesEntities>;
|
|
26
28
|
disabledDefaultTemplateHandler: boolean | undefined;
|
|
27
29
|
ensureRuntimeClassSet: (...args: any[]) => Promise<Set<string>>;
|
|
@@ -11,5 +11,5 @@ interface FrameworkModuleCandidateRegistrarOptions {
|
|
|
11
11
|
sourceCandidateCollector: Pick<SourceCandidateStore, 'syncModuleSource'>;
|
|
12
12
|
styleHandler: ValidateCandidatesByGeneratorOptions['styleHandler'];
|
|
13
13
|
}
|
|
14
|
-
export declare function createFrameworkModuleCandidateRegistrar(options: FrameworkModuleCandidateRegistrarOptions): (id: string, source: string) => Promise<Set<string>>;
|
|
14
|
+
export declare function createFrameworkModuleCandidateRegistrar(options: FrameworkModuleCandidateRegistrarOptions): (id: string, source: string, extension?: string) => Promise<Set<string>>;
|
|
15
15
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { Compiler } from 'webpack';
|
|
1
2
|
interface WebpackWatchDependencyLoaderContext {
|
|
3
|
+
fs?: Pick<NonNullable<Compiler['inputFileSystem']>, 'stat'>;
|
|
2
4
|
addDependency?: (file: string) => void;
|
|
3
5
|
addMissingDependency?: (file: string) => void;
|
|
4
6
|
addContextDependency?: (context: string) => void;
|
|
5
7
|
}
|
|
6
|
-
export declare function registerWebpackWatchFile(loaderContext: WebpackWatchDependencyLoaderContext, file: string): void;
|
|
8
|
+
export declare function registerWebpackWatchFile(loaderContext: WebpackWatchDependencyLoaderContext, file: string): Promise<void> | undefined;
|
|
7
9
|
export declare function registerWebpackWatchContext(loaderContext: WebpackWatchDependencyLoaderContext, context: string): void;
|
|
8
10
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface LoaderEntry {
|
|
2
2
|
loader?: string;
|
|
3
3
|
}
|
|
4
|
+
export declare function findCssPreprocessorIndex(entries: LoaderEntry[]): number;
|
|
4
5
|
export interface LoaderAnchorFinders {
|
|
5
6
|
findRewriteAnchor: (entries: LoaderEntry[]) => number;
|
|
6
7
|
findClassSetAnchor: (entries: LoaderEntry[]) => number;
|
|
@@ -29,7 +29,10 @@ export interface RuntimeCompilationBuildState {
|
|
|
29
29
|
runtimeAffectingHashByFile: Map<string, string>;
|
|
30
30
|
linkedByEntry: Map<string, Set<string>>;
|
|
31
31
|
dependentsByLinkedFile: Map<string, Set<string>>;
|
|
32
|
-
bundleMarkupCandidatesByFile: Map<string,
|
|
32
|
+
bundleMarkupCandidatesByFile: Map<string, {
|
|
33
|
+
sourceFile: string;
|
|
34
|
+
candidates: Set<string>;
|
|
35
|
+
}>;
|
|
33
36
|
generatorCandidateSignature?: string | undefined;
|
|
34
37
|
}
|
|
35
38
|
export interface CreateRuntimeCompilationSnapshotOptions {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveMpxPlatform } from "./framework.js";
|
|
2
|
-
import { A as resolveBooleanObjectOption, Bt as resolveValidTailwindV4Candidates$1,
|
|
3
|
-
import { c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, i as resolveUniAppXOptions, o as applyV4CssCalcDefaults, s as warnMissingCssEntries, t as createTailwindcssRuntimeFromContext, u as getRuntimeClassSetSignatureWithSources } from "./tailwindcss-
|
|
2
|
+
import { A as resolveBooleanObjectOption, Bt as shouldUseUniAppWebRpxCompatibility, Ht as resolveValidTailwindV4Candidates$1, Lt as resolveCssMacroTailwindV4Source, Mt as _defineProperty, T as omitUndefined, Tt as isFileMatchedByTailwindSourceEntries, Vt as loadTailwindV4DesignSystem, a as resolveGeneratorRuntimeBranch, bt as createTailwindV4Engine$1, d as resolveTailwindV4SourceFromRuntime, i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source$1 } from "./generator-C2aWns8n.js";
|
|
3
|
+
import { c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, i as resolveUniAppXOptions, o as applyV4CssCalcDefaults, s as warnMissingCssEntries, t as createTailwindcssRuntimeFromContext, u as getRuntimeClassSetSignatureWithSources } from "./tailwindcss-c4PkOe1F.js";
|
|
4
4
|
import { i as isMap, n as defuOverrideArray$1 } from "./utils-MVwpU07P.js";
|
|
5
|
-
import { a as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, i as resolveDefaultCssPreflight, o as HARD_PARSE_CACHE_MAX_ENTRIES, r as getDefaultOptions } from "./defaults-
|
|
5
|
+
import { a as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, i as resolveDefaultCssPreflight, o as HARD_PARSE_CACHE_MAX_ENTRIES, r as getDefaultOptions } from "./defaults-CKx-4LcW.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import process from "node:process";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
2
|
const require_framework = require("./framework.cjs");
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
3
|
+
const require_generator = require("./generator-BoZIiZD5.cjs");
|
|
4
|
+
const require_tailwindcss = require("./tailwindcss-Bji4u8In.cjs");
|
|
5
5
|
require("./utils-CuKLf1Zv.cjs");
|
|
6
|
-
const require_defaults = require("./defaults-
|
|
6
|
+
const require_defaults = require("./defaults-CiGsr8Xq.cjs");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
9
9
|
let node_process = require("node:process");
|
|
@@ -22974,8 +22974,8 @@ var StatementParser = class extends ExpressionParser {
|
|
|
22974
22974
|
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
|
|
22975
22975
|
}
|
|
22976
22976
|
verifyBreakContinue(node, isBreak) {
|
|
22977
|
-
let i;
|
|
22978
|
-
for (
|
|
22977
|
+
let i = 0;
|
|
22978
|
+
for (; i < this.state.labels.length; ++i) {
|
|
22979
22979
|
const lab = this.state.labels[i];
|
|
22980
22980
|
if (node.label == null || lab.name === node.label.name) {
|
|
22981
22981
|
if (lab.kind != null && (isBreak || lab.kind === 1)) break;
|
|
@@ -40031,7 +40031,7 @@ function toCustomAttributesEntities(customAttributes) {
|
|
|
40031
40031
|
return Object.entries(customAttributes);
|
|
40032
40032
|
}
|
|
40033
40033
|
//#endregion
|
|
40034
|
-
//#region ../../node_modules/.pnpm/oxc-walker@1.1.1_@oxc-project+types@0.
|
|
40034
|
+
//#region ../../node_modules/.pnpm/oxc-walker@1.1.1_@oxc-project+types@0.149.0_oxc-parser@0.149.0_rolldown@1.2.7/node_modules/oxc-walker/dist/index.mjs
|
|
40035
40035
|
function isNode(v) {
|
|
40036
40036
|
return v !== null && typeof v === "object" && typeof v.type === "string";
|
|
40037
40037
|
}
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_compiler = require("./compiler-
|
|
2
|
+
const require_compiler = require("./compiler-DMPaUcH6.cjs");
|
|
3
3
|
const require_runtime_state = require("./runtime-state-BBQcA0n5.cjs");
|
|
4
4
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
5
5
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as createTailwindRuntimeReadyPromise, D as createCompilationEventBus, d as createCompiler, f as getCompilerContext, t as createCompilerRuntimeState, v as shouldSkipJsTransform, w as ensureRuntimeClassSet } from "./compiler-
|
|
1
|
+
import { C as createTailwindRuntimeReadyPromise, D as createCompilationEventBus, d as createCompiler, f as getCompilerContext, t as createCompilerRuntimeState, v as shouldSkipJsTransform, w as ensureRuntimeClassSet } from "./compiler-C9X5Afn4.js";
|
|
2
2
|
import { finalizeMiniProgramCss, finalizeMiniProgramCssRoot, postcss, removeTailwindSourceDirectivesRoot } from "@weapp-tailwindcss/postcss";
|
|
3
3
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
4
4
|
//#region src/core.ts
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
+
const require_generator = require("./generator-BoZIiZD5.cjs");
|
|
2
3
|
let node_path = require("node:path");
|
|
3
4
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
5
|
+
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
4
6
|
//#region src/bundlers/shared/css-imports.ts
|
|
5
7
|
const tailwindcssImportRE = /^(?:tailwindcss|weapp-tailwindcss)(?:\/.*)?$/;
|
|
6
8
|
const tailwindcssCssImportStatementRE = /(@import\s+(?:url\(\s*)?)(["'])((?:tailwindcss|weapp-tailwindcss)(?:\/[^"']*)?\$?)(\2\s*\)?)/gi;
|
|
9
|
+
function normalizeResolvedTailwindcssImports(code, pkgDir) {
|
|
10
|
+
if (!pkgDir) return code;
|
|
11
|
+
const paths = /^[a-z]:[\\/]|^\\\\/i.test(pkgDir) ? node_path.default.win32 : node_path.default.posix;
|
|
12
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(code);
|
|
13
|
+
let changed = false;
|
|
14
|
+
root.walkAtRules("import", (rule) => {
|
|
15
|
+
const parsed = require_generator.parseCssImportSpecifier(rule.params);
|
|
16
|
+
if (!parsed || !paths.isAbsolute(parsed.specifier)) return;
|
|
17
|
+
const subpath = paths.relative(pkgDir, parsed.specifier);
|
|
18
|
+
if (![
|
|
19
|
+
"index.css",
|
|
20
|
+
"theme.css",
|
|
21
|
+
"utilities.css",
|
|
22
|
+
"preflight.css"
|
|
23
|
+
].includes(subpath)) return;
|
|
24
|
+
const request = subpath === "index.css" ? "tailwindcss" : `tailwindcss/${subpath}`;
|
|
25
|
+
rule.params = rule.params.replace(parsed.raw, () => require_generator.quoteCssImportSpecifier(request, parsed.quote));
|
|
26
|
+
changed = true;
|
|
27
|
+
});
|
|
28
|
+
return changed ? root.toString() : code;
|
|
29
|
+
}
|
|
7
30
|
function normalizeTailwindcssSpecifier(specifier) {
|
|
8
31
|
if (specifier === "tailwindcss$" || specifier === "weapp-tailwindcss$") return specifier.slice(0, -1);
|
|
9
32
|
return specifier;
|
|
@@ -29,6 +52,12 @@ function rewriteTailwindcssImportsInCode(code, pkgDir, options) {
|
|
|
29
52
|
return hasReplacements ? rewritten : void 0;
|
|
30
53
|
}
|
|
31
54
|
//#endregion
|
|
55
|
+
Object.defineProperty(exports, "normalizeResolvedTailwindcssImports", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function() {
|
|
58
|
+
return normalizeResolvedTailwindcssImports;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
32
61
|
Object.defineProperty(exports, "resolveTailwindcssImport", {
|
|
33
62
|
enumerable: true,
|
|
34
63
|
get: function() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/bundlers/webpack/shared/css-loader-runtime.ts
|
|
2
2
|
function isWebpackCssLoaderRuntimeSource(source) {
|
|
3
|
-
|
|
3
|
+
if (source.trimStart().startsWith("// extracted by mini-css-extract-plugin")) return true;
|
|
4
|
+
return source.includes("___CSS_LOADER_EXPORT___") && source.includes("___CSS_LOADER_API_IMPORT___") && (source.includes("module.exports = ___CSS_LOADER_EXPORT___") || source.includes("export default ___CSS_LOADER_EXPORT___"));
|
|
4
5
|
}
|
|
5
6
|
//#endregion
|
|
6
7
|
Object.defineProperty(exports, "isWebpackCssLoaderRuntimeSource", {
|
|
@@ -6,7 +6,7 @@ const HARD_PARSE_CACHE_MAX_ENTRIES = 1024;
|
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/defaults.ts
|
|
8
8
|
const CSS_FILE_PATTERN = /.+\.(?:wx|ac|jx|tt|q|c|ty)ss$/;
|
|
9
|
-
const HTML_FILE_PATTERN = /.+\.(?:(?:wx|ax|jx|ks|tt|q|ty|xhs)ml|swan)$/;
|
|
9
|
+
const HTML_FILE_PATTERN = /.+\.(?:(?:wx|ax|jx|ks|tt|q|qx|ty|xhs)ml|swan)$/;
|
|
10
10
|
const JS_FILE_PATTERN = /.+\.[cm]?js?$/;
|
|
11
11
|
const alwaysFalse = () => false;
|
|
12
12
|
const TAILWIND_V4_CSS_PREFLIGHT = {
|
|
@@ -7,7 +7,7 @@ const HARD_PARSE_CACHE_MAX_ENTRIES = 1024;
|
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/defaults.ts
|
|
9
9
|
const CSS_FILE_PATTERN = /.+\.(?:wx|ac|jx|tt|q|c|ty)ss$/;
|
|
10
|
-
const HTML_FILE_PATTERN = /.+\.(?:(?:wx|ax|jx|ks|tt|q|ty|xhs)ml|swan)$/;
|
|
10
|
+
const HTML_FILE_PATTERN = /.+\.(?:(?:wx|ax|jx|ks|tt|q|qx|ty|xhs)ml|swan)$/;
|
|
11
11
|
const JS_FILE_PATTERN = /.+\.[cm]?js?$/;
|
|
12
12
|
const alwaysFalse = () => false;
|
|
13
13
|
const TAILWIND_V4_CSS_PREFLIGHT = {
|
package/dist/defaults.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_defaults = require("./defaults-
|
|
2
|
+
const require_defaults = require("./defaults-CiGsr8Xq.cjs");
|
|
3
3
|
exports.TAILWIND_V4_CSS_PREFLIGHT = require_defaults.TAILWIND_V4_CSS_PREFLIGHT;
|
|
4
4
|
exports.getDefaultCssPreflight = require_defaults.getDefaultCssPreflight;
|
|
5
5
|
exports.getDefaultOptions = require_defaults.getDefaultOptions;
|
package/dist/defaults.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as resolveDefaultCssPreflight, n as getDefaultCssPreflight, r as getDefaultOptions, t as TAILWIND_V4_CSS_PREFLIGHT } from "./defaults-
|
|
1
|
+
import { i as resolveDefaultCssPreflight, n as getDefaultCssPreflight, r as getDefaultOptions, t as TAILWIND_V4_CSS_PREFLIGHT } from "./defaults-CKx-4LcW.js";
|
|
2
2
|
export { TAILWIND_V4_CSS_PREFLIGHT, getDefaultCssPreflight, getDefaultOptions, resolveDefaultCssPreflight };
|