weapp-tailwindcss 5.0.0 → 5.0.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.
- package/dist/{bundle-state-DgGEhk_z.js → bundle-state-Bvj01pW7.js} +35 -3
- package/dist/{bundle-state-CnaJxkFY.mjs → bundle-state-DY3eq4Gz.mjs} +24 -4
- package/dist/bundlers/shared/generated-css-marker.d.ts +6 -0
- package/dist/bundlers/shared/generator-css/directives.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/source-files.d.ts +11 -5
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +2 -0
- package/dist/bundlers/shared/generator-css.d.ts +1 -0
- package/dist/bundlers/vite/bundle-state.d.ts +5 -1
- package/dist/bundlers/vite/css-finalizer.d.ts +12 -3
- package/dist/bundlers/vite/generate-bundle.d.ts +22 -6
- package/dist/bundlers/vite/processed-css-assets.d.ts +10 -2
- package/dist/bundlers/vite/source-candidates.d.ts +2 -0
- package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +8 -0
- package/dist/cli.js +1 -0
- package/dist/cli.mjs +1 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{generator--0-ekuVO.js → generator-Bd1LntD3.js} +1 -1
- package/dist/{generator-B76ovqsv.mjs → generator-DRHWC1t-.mjs} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +16 -10
- package/dist/gulp.mjs +14 -8
- package/dist/{incremental-runtime-class-set-CN6K_97P.js → incremental-runtime-class-set-Bl18sFqt.js} +540 -694
- package/dist/{incremental-runtime-class-set-x10M9bn_.mjs → incremental-runtime-class-set-CAEuUesH.mjs} +495 -619
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{postcss-CR9UCaIK.mjs → postcss-CJrmfXvi.mjs} +4 -4
- package/dist/{postcss-hYimKoN_.js → postcss-DfnqZ4Bm.js} +4 -4
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-DPtJjZmV.js → precheck-Bj5ReSOU.js} +2 -2
- package/dist/{precheck-BrNwLG2e.mjs → precheck-CUr1DYyy.mjs} +2 -2
- package/dist/presets.js +2 -2
- package/dist/presets.mjs +2 -2
- package/dist/{source-candidates-DN1mihlU.mjs → source-candidates-D7b-Jzsx.mjs} +44 -11
- package/dist/{source-candidates-DSxme_O2.js → source-candidates-DQxvGPSw.js} +49 -10
- package/dist/tailwindcss/source-scan.d.ts +3 -1
- package/dist/{tailwindcss-DWtPieNE.mjs → tailwindcss-D5RogwtV.mjs} +14 -49
- package/dist/{tailwindcss-glCm_d3H.js → tailwindcss-jvoYizzX.js} +19 -48
- package/dist/{v3-engine-DCxNPBVs.mjs → v3-engine-BCUGX3gX.mjs} +644 -36
- package/dist/{v3-engine-D3BMLVAN.js → v3-engine-CmIF_gsq.js} +775 -35
- package/dist/{vite-Ec0uX6kF.js → vite-D1ZdgbWa.js} +533 -290
- package/dist/{vite-DOprpdH-.mjs → vite-jBTi5CwO.mjs} +532 -289
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/{runtime-registry-DpcR3IHI.js → watch-dependencies-zwx4EhBn.js} +39 -0
- package/dist/weapp-tw-css-import-rewrite-loader.js +1953 -1630
- package/dist/weapp-tw-runtime-classset-loader.js +6 -6
- package/dist/{webpack-DFlZcqAU.mjs → webpack-CChDqRrl.mjs} +6 -6
- package/dist/{webpack-Ccohlg3A.js → webpack-vk2uqSnK.js} +7 -7
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_precheck = require("./precheck-
|
|
2
|
+
const require_precheck = require("./precheck-Bj5ReSOU.js");
|
|
3
3
|
let node_module = require("node:module");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_chunk.__toESM(node_process);
|
|
@@ -121,6 +121,7 @@ function resolvePackageDir(name) {
|
|
|
121
121
|
//#region src/bundlers/shared/generated-css-marker.ts
|
|
122
122
|
const BUNDLER_GENERATED_CSS_MARKER_RE = /\/\*!\s*weapp-tailwindcss (?:vite|webpack)-generated-css(?::[^\s*]+)?\s*\*\/\s*/i;
|
|
123
123
|
const BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE = /\/\*!\s*weapp-tailwindcss (?:vite|webpack)-generated-css(?::[^\s*]+)?\s*\*\/\s*/gi;
|
|
124
|
+
const BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE = /\/\*!\s*weapp-tailwindcss (vite|webpack)-generated-css(?::([^\s*]+))?\s*\*\/\s*/gi;
|
|
124
125
|
function createBundlerGeneratedCssMarker(bundler, file) {
|
|
125
126
|
return `/*! weapp-tailwindcss ${bundler}-generated-css:${encodeURIComponent(file)} */`;
|
|
126
127
|
}
|
|
@@ -130,6 +131,23 @@ function hasBundlerGeneratedCssMarker(source) {
|
|
|
130
131
|
function stripBundlerGeneratedCssMarkers(source) {
|
|
131
132
|
return source.replace(BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE, "");
|
|
132
133
|
}
|
|
134
|
+
function parseBundlerGeneratedCssMarkerBlocks(source) {
|
|
135
|
+
const blocks = [];
|
|
136
|
+
let match = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.exec(source);
|
|
137
|
+
while (match !== null) {
|
|
138
|
+
const cssStart = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.lastIndex;
|
|
139
|
+
const nextMatch = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.exec(source);
|
|
140
|
+
const cssEnd = nextMatch?.index ?? source.length;
|
|
141
|
+
const file = match[2] ? decodeURIComponent(match[2]) : void 0;
|
|
142
|
+
blocks.push({
|
|
143
|
+
bundler: match[1],
|
|
144
|
+
file,
|
|
145
|
+
css: source.slice(cssStart, cssEnd)
|
|
146
|
+
});
|
|
147
|
+
match = nextMatch;
|
|
148
|
+
}
|
|
149
|
+
return blocks;
|
|
150
|
+
}
|
|
133
151
|
//#endregion
|
|
134
152
|
//#region src/bundlers/shared/run-tasks.ts
|
|
135
153
|
async function runWithConcurrency(factories, limit = Math.min(4, Math.max(1, factories.length))) {
|
|
@@ -328,7 +346,7 @@ function collectJsEntries(fileName, output, outDir, store) {
|
|
|
328
346
|
function markProcessFile(type, file, processFiles) {
|
|
329
347
|
if (type === "html" || type === "js" || type === "css") processFiles[type].add(file);
|
|
330
348
|
}
|
|
331
|
-
function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false) {
|
|
349
|
+
function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false, options = {}) {
|
|
332
350
|
const sourceHashByFile = /* @__PURE__ */ new Map();
|
|
333
351
|
const runtimeAffectingSignatureByFile = /* @__PURE__ */ new Map();
|
|
334
352
|
const runtimeAffectingHashByFile = /* @__PURE__ */ new Map();
|
|
@@ -338,7 +356,8 @@ function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false) {
|
|
|
338
356
|
const linkedImpactsByEntry = /* @__PURE__ */ new Map();
|
|
339
357
|
const jsEntries = /* @__PURE__ */ new Map();
|
|
340
358
|
const entries = [];
|
|
341
|
-
const firstRun = state.
|
|
359
|
+
const firstRun = state.iteration === 0 && state.sourceHashByFile.size === 0;
|
|
360
|
+
const hasOmittedKnownFiles = options.hasOmittedKnownFiles === true;
|
|
342
361
|
for (const [file, output] of Object.entries(bundle)) {
|
|
343
362
|
const type = classifyBundleEntry(file, opts);
|
|
344
363
|
const source = readEntrySource(output);
|
|
@@ -385,6 +404,7 @@ function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false) {
|
|
|
385
404
|
sourceHashByFile,
|
|
386
405
|
runtimeAffectingSignatureByFile,
|
|
387
406
|
runtimeAffectingHashByFile,
|
|
407
|
+
hasOmittedKnownFiles,
|
|
388
408
|
changedByType,
|
|
389
409
|
runtimeAffectingChangedByType,
|
|
390
410
|
processFiles,
|
|
@@ -443,6 +463,12 @@ Object.defineProperty(exports, "createBundlerGeneratedCssMarker", {
|
|
|
443
463
|
return createBundlerGeneratedCssMarker;
|
|
444
464
|
}
|
|
445
465
|
});
|
|
466
|
+
Object.defineProperty(exports, "createRuntimeAffectingSourceSignature", {
|
|
467
|
+
enumerable: true,
|
|
468
|
+
get: function() {
|
|
469
|
+
return createRuntimeAffectingSourceSignature;
|
|
470
|
+
}
|
|
471
|
+
});
|
|
446
472
|
Object.defineProperty(exports, "formatPostcssSourceMap", {
|
|
447
473
|
enumerable: true,
|
|
448
474
|
get: function() {
|
|
@@ -473,6 +499,12 @@ Object.defineProperty(exports, "normalizeOutputPathKey", {
|
|
|
473
499
|
return normalizeOutputPathKey;
|
|
474
500
|
}
|
|
475
501
|
});
|
|
502
|
+
Object.defineProperty(exports, "parseBundlerGeneratedCssMarkerBlocks", {
|
|
503
|
+
enumerable: true,
|
|
504
|
+
get: function() {
|
|
505
|
+
return parseBundlerGeneratedCssMarkerBlocks;
|
|
506
|
+
}
|
|
507
|
+
});
|
|
476
508
|
Object.defineProperty(exports, "pushConcurrentTaskFactories", {
|
|
477
509
|
enumerable: true,
|
|
478
510
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as traverse, h as babelParse, o as Parser } from "./precheck-
|
|
1
|
+
import { g as traverse, h as babelParse, o as Parser } from "./precheck-CUr1DYyy.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import path from "node:path";
|
|
@@ -118,6 +118,7 @@ function resolvePackageDir(name) {
|
|
|
118
118
|
//#region src/bundlers/shared/generated-css-marker.ts
|
|
119
119
|
const BUNDLER_GENERATED_CSS_MARKER_RE = /\/\*!\s*weapp-tailwindcss (?:vite|webpack)-generated-css(?::[^\s*]+)?\s*\*\/\s*/i;
|
|
120
120
|
const BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE = /\/\*!\s*weapp-tailwindcss (?:vite|webpack)-generated-css(?::[^\s*]+)?\s*\*\/\s*/gi;
|
|
121
|
+
const BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE = /\/\*!\s*weapp-tailwindcss (vite|webpack)-generated-css(?::([^\s*]+))?\s*\*\/\s*/gi;
|
|
121
122
|
function createBundlerGeneratedCssMarker(bundler, file) {
|
|
122
123
|
return `/*! weapp-tailwindcss ${bundler}-generated-css:${encodeURIComponent(file)} */`;
|
|
123
124
|
}
|
|
@@ -127,6 +128,23 @@ function hasBundlerGeneratedCssMarker(source) {
|
|
|
127
128
|
function stripBundlerGeneratedCssMarkers(source) {
|
|
128
129
|
return source.replace(BUNDLER_GENERATED_CSS_MARKER_GLOBAL_RE, "");
|
|
129
130
|
}
|
|
131
|
+
function parseBundlerGeneratedCssMarkerBlocks(source) {
|
|
132
|
+
const blocks = [];
|
|
133
|
+
let match = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.exec(source);
|
|
134
|
+
while (match !== null) {
|
|
135
|
+
const cssStart = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.lastIndex;
|
|
136
|
+
const nextMatch = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.exec(source);
|
|
137
|
+
const cssEnd = nextMatch?.index ?? source.length;
|
|
138
|
+
const file = match[2] ? decodeURIComponent(match[2]) : void 0;
|
|
139
|
+
blocks.push({
|
|
140
|
+
bundler: match[1],
|
|
141
|
+
file,
|
|
142
|
+
css: source.slice(cssStart, cssEnd)
|
|
143
|
+
});
|
|
144
|
+
match = nextMatch;
|
|
145
|
+
}
|
|
146
|
+
return blocks;
|
|
147
|
+
}
|
|
130
148
|
//#endregion
|
|
131
149
|
//#region src/bundlers/shared/run-tasks.ts
|
|
132
150
|
async function runWithConcurrency(factories, limit = Math.min(4, Math.max(1, factories.length))) {
|
|
@@ -325,7 +343,7 @@ function collectJsEntries(fileName, output, outDir, store) {
|
|
|
325
343
|
function markProcessFile(type, file, processFiles) {
|
|
326
344
|
if (type === "html" || type === "js" || type === "css") processFiles[type].add(file);
|
|
327
345
|
}
|
|
328
|
-
function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false) {
|
|
346
|
+
function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false, options = {}) {
|
|
329
347
|
const sourceHashByFile = /* @__PURE__ */ new Map();
|
|
330
348
|
const runtimeAffectingSignatureByFile = /* @__PURE__ */ new Map();
|
|
331
349
|
const runtimeAffectingHashByFile = /* @__PURE__ */ new Map();
|
|
@@ -335,7 +353,8 @@ function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false) {
|
|
|
335
353
|
const linkedImpactsByEntry = /* @__PURE__ */ new Map();
|
|
336
354
|
const jsEntries = /* @__PURE__ */ new Map();
|
|
337
355
|
const entries = [];
|
|
338
|
-
const firstRun = state.
|
|
356
|
+
const firstRun = state.iteration === 0 && state.sourceHashByFile.size === 0;
|
|
357
|
+
const hasOmittedKnownFiles = options.hasOmittedKnownFiles === true;
|
|
339
358
|
for (const [file, output] of Object.entries(bundle)) {
|
|
340
359
|
const type = classifyBundleEntry(file, opts);
|
|
341
360
|
const source = readEntrySource(output);
|
|
@@ -382,6 +401,7 @@ function buildBundleSnapshot(bundle, opts, outDir, state, forceAll = false) {
|
|
|
382
401
|
sourceHashByFile,
|
|
383
402
|
runtimeAffectingSignatureByFile,
|
|
384
403
|
runtimeAffectingHashByFile,
|
|
404
|
+
hasOmittedKnownFiles,
|
|
385
405
|
changedByType,
|
|
386
406
|
runtimeAffectingChangedByType,
|
|
387
407
|
processFiles,
|
|
@@ -410,4 +430,4 @@ function updateBundleBuildState(state, snapshot, linkedByEntry, options = {}) {
|
|
|
410
430
|
state.dependentsByLinkedFile = invertLinkedByEntry(state.linkedByEntry);
|
|
411
431
|
}
|
|
412
432
|
//#endregion
|
|
413
|
-
export {
|
|
433
|
+
export { toAbsoluteOutputPath as S, slash as _, applyLinkedResults as a, normalizeOutputPathKey as b, createBundlerGeneratedCssMarker as c, stripBundlerGeneratedCssMarkers as d, resolvePackageDir as f, isCSSRequest as g, formatPostcssSourceMap as h, createRuntimeAffectingSourceSignature as i, hasBundlerGeneratedCssMarker as l, cleanUrl as m, createBundleBuildState as n, createBundleModuleGraphOptions as o, resolvePluginDisabledState as p, updateBundleBuildState as r, pushConcurrentTaskFactories as s, buildBundleSnapshot as t, parseBundlerGeneratedCssMarkerBlocks as u, isSourceStyleRequest as v, resolveOutputSpecifier as x, stripRequestQuery as y };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export interface BundlerGeneratedCssMarkerBlock {
|
|
2
|
+
bundler: 'vite' | 'webpack';
|
|
3
|
+
file?: string | undefined;
|
|
4
|
+
css: string;
|
|
5
|
+
}
|
|
1
6
|
export declare function createBundlerGeneratedCssMarker(bundler: 'vite' | 'webpack', file: string): string;
|
|
2
7
|
export declare function hasBundlerGeneratedCssMarker(source: unknown): boolean;
|
|
3
8
|
export declare function stripBundlerGeneratedCssMarkers(source: string): string;
|
|
9
|
+
export declare function parseBundlerGeneratedCssMarkerBlocks(source: string): BundlerGeneratedCssMarkerBlock[];
|
|
@@ -2,6 +2,7 @@ interface TailwindDirectiveOptions {
|
|
|
2
2
|
importFallback?: boolean | undefined;
|
|
3
3
|
}
|
|
4
4
|
export declare function parseImportRequest(params: string): string | undefined;
|
|
5
|
+
export declare function normalizeTailwindConfigDirectives(rawSource: string, base: string): string;
|
|
5
6
|
export declare function normalizeTailwindSourceForGenerator(rawSource: string, options?: TailwindDirectiveOptions): string;
|
|
6
7
|
export declare function normalizeTailwindV3CssEntrySource(rawSource: string): string;
|
|
7
8
|
export declare function normalizeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
export interface SourceSideCssEntryOptions {
|
|
2
|
+
projectRoot?: string | undefined;
|
|
3
|
+
cwd?: string | undefined;
|
|
4
|
+
outputRoot?: string | undefined;
|
|
5
|
+
sourceFile?: string | undefined;
|
|
6
|
+
cssSources?: Array<{
|
|
7
|
+
file?: string | undefined;
|
|
8
|
+
}> | undefined;
|
|
9
|
+
cssEntries?: string[] | undefined;
|
|
10
|
+
}
|
|
1
11
|
export interface SourceSideCssEntrySource {
|
|
2
12
|
css: string;
|
|
3
13
|
config?: string | undefined;
|
|
@@ -5,10 +15,6 @@ export interface SourceSideCssEntrySource {
|
|
|
5
15
|
base: string;
|
|
6
16
|
file: string;
|
|
7
17
|
}
|
|
8
|
-
export declare function resolveSourceSideCssEntrySource(file: string, sourceOptions: {
|
|
9
|
-
projectRoot?: string;
|
|
10
|
-
cwd?: string;
|
|
11
|
-
outputRoot?: string;
|
|
12
|
-
}, resolveOptions?: {
|
|
18
|
+
export declare function resolveSourceSideCssEntrySource(file: string, sourceOptions: SourceSideCssEntryOptions, resolveOptions?: {
|
|
13
19
|
removeConfig?: boolean;
|
|
14
20
|
}): SourceSideCssEntrySource | undefined;
|
|
@@ -8,9 +8,11 @@ interface GeneratorSourceRuntimeState {
|
|
|
8
8
|
interface GeneratorSourceSelectionOptions {
|
|
9
9
|
runtime?: Set<string> | undefined;
|
|
10
10
|
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
11
|
+
cssEntries?: string[] | undefined;
|
|
11
12
|
}
|
|
12
13
|
export interface GeneratorSourceMetadata {
|
|
13
14
|
matchedCssSourceFile?: string | undefined;
|
|
15
|
+
sourceEntries?: TailwindSourceEntry[] | undefined;
|
|
14
16
|
sourceBase?: string | undefined;
|
|
15
17
|
sourceCss?: string | undefined;
|
|
16
18
|
}
|
|
@@ -21,6 +21,7 @@ export interface GenerateCssByGeneratorOptions {
|
|
|
21
21
|
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
22
22
|
debug: (format: string, ...args: unknown[]) => void;
|
|
23
23
|
previousCss?: string | undefined;
|
|
24
|
+
deferEmptyScopedCssSource?: boolean | undefined;
|
|
24
25
|
}
|
|
25
26
|
export interface GenerateCssByGeneratorResult {
|
|
26
27
|
css: string;
|
|
@@ -19,6 +19,7 @@ export interface BundleSnapshot {
|
|
|
19
19
|
sourceHashByFile: Map<string, string>;
|
|
20
20
|
runtimeAffectingSignatureByFile: Map<string, string>;
|
|
21
21
|
runtimeAffectingHashByFile: Map<string, string>;
|
|
22
|
+
hasOmittedKnownFiles: boolean;
|
|
22
23
|
changedByType: Record<EntryType, Set<string>>;
|
|
23
24
|
runtimeAffectingChangedByType: Record<EntryType, Set<string>>;
|
|
24
25
|
processFiles: ProcessFileSets;
|
|
@@ -36,9 +37,12 @@ export interface BundleBuildState {
|
|
|
36
37
|
interface UpdateBundleBuildStateOptions {
|
|
37
38
|
incremental?: boolean;
|
|
38
39
|
}
|
|
40
|
+
interface BuildBundleSnapshotOptions {
|
|
41
|
+
hasOmittedKnownFiles?: boolean | undefined;
|
|
42
|
+
}
|
|
39
43
|
export declare function createBundleBuildState(): BundleBuildState;
|
|
40
44
|
export declare function classifyBundleEntry(file: string, opts: InternalUserDefinedOptions): EntryType;
|
|
41
|
-
export declare function buildBundleSnapshot(bundle: Record<string, OutputAsset | OutputChunk>, opts: InternalUserDefinedOptions, outDir: string, state: BundleBuildState, forceAll?: boolean): BundleSnapshot;
|
|
45
|
+
export declare function buildBundleSnapshot(bundle: Record<string, OutputAsset | OutputChunk>, opts: InternalUserDefinedOptions, outDir: string, state: BundleBuildState, forceAll?: boolean, options?: BuildBundleSnapshotOptions): BundleSnapshot;
|
|
42
46
|
export declare function buildBundleSnapshotForBuild(bundle: Record<string, OutputAsset | OutputChunk>, opts: InternalUserDefinedOptions, outDir: string): BundleSnapshot;
|
|
43
47
|
export declare function updateBundleBuildState(state: BundleBuildState, snapshot: BundleSnapshot, linkedByEntry: Map<string, Set<string>>, options?: UpdateBundleBuildStateOptions): void;
|
|
44
48
|
export {};
|
|
@@ -2,6 +2,10 @@ import type { OutputAsset } from 'rollup';
|
|
|
2
2
|
import type { Plugin, ResolvedConfig } from 'vite';
|
|
3
3
|
import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
4
4
|
import type { InternalUserDefinedOptions } from '../../types';
|
|
5
|
+
interface RememberedMainCssSource {
|
|
6
|
+
rawSource: string;
|
|
7
|
+
sourceFile: string;
|
|
8
|
+
}
|
|
5
9
|
interface CssFinalizerContext {
|
|
6
10
|
opts: InternalUserDefinedOptions;
|
|
7
11
|
runtimeState: {
|
|
@@ -14,14 +18,19 @@ interface CssFinalizerContext {
|
|
|
14
18
|
debug: (format: string, ...args: unknown[]) => void;
|
|
15
19
|
getResolvedConfig: () => ResolvedConfig | undefined;
|
|
16
20
|
recordCssAssetResult?: (file: string, css: string) => void;
|
|
17
|
-
recordViteProcessedCssAssetResult?: (file: string, css: string
|
|
18
|
-
|
|
21
|
+
recordViteProcessedCssAssetResult?: (file: string, css: string, options?: {
|
|
22
|
+
injectIntoMain?: boolean | undefined;
|
|
23
|
+
}) => void;
|
|
24
|
+
getViteProcessedCssAssetResults?: () => Iterable<[string, string | {
|
|
25
|
+
css: string;
|
|
26
|
+
injectIntoMain?: boolean | undefined;
|
|
27
|
+
}]>;
|
|
19
28
|
getRecordedGeneratorCandidates?: () => Set<string> | undefined;
|
|
20
29
|
getSourceCandidates?: () => Set<string>;
|
|
21
30
|
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
22
31
|
waitForSourceCandidateSyncs?: () => Promise<void>;
|
|
23
32
|
rememberMainCssSource?: (file: string, rawSource: string) => void;
|
|
24
|
-
getRememberedMainCssSource?: (file: string) =>
|
|
33
|
+
getRememberedMainCssSource?: (file: string) => RememberedMainCssSource | undefined;
|
|
25
34
|
isViteProcessedCssAsset?: (asset: OutputAsset, file?: string) => boolean;
|
|
26
35
|
}
|
|
27
36
|
export declare function createViteCssFinalizerOutputPlugin(context: CssFinalizerContext): Plugin;
|
|
@@ -19,20 +19,35 @@ interface GenerateBundleContext {
|
|
|
19
19
|
debug: (format: string, ...args: unknown[]) => void;
|
|
20
20
|
getResolvedConfig: () => ResolvedConfig | undefined;
|
|
21
21
|
markCssAssetProcessed?: (asset: OutputAsset, file?: string) => void;
|
|
22
|
+
isCssAssetProcessed?: (asset: OutputAsset, file?: string) => boolean;
|
|
22
23
|
isViteProcessedCssAsset?: (asset: OutputAsset, file?: string) => boolean;
|
|
23
24
|
recordCssAssetResult?: (file: string, css: string) => void;
|
|
24
|
-
recordViteProcessedCssAssetResult?: (file: string, css: string
|
|
25
|
-
|
|
25
|
+
recordViteProcessedCssAssetResult?: (file: string, css: string, options?: {
|
|
26
|
+
injectIntoMain?: boolean | undefined;
|
|
27
|
+
}) => void;
|
|
28
|
+
getViteProcessedCssAssetResults?: () => Iterable<[string, string | {
|
|
29
|
+
css: string;
|
|
30
|
+
injectIntoMain?: boolean | undefined;
|
|
31
|
+
}]>;
|
|
32
|
+
getViteProcessedCssAssetResult?: (file: string) => {
|
|
33
|
+
css: string;
|
|
34
|
+
injectIntoMain?: boolean | undefined;
|
|
35
|
+
} | undefined;
|
|
26
36
|
getSourceCandidates?: () => Set<string>;
|
|
27
37
|
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
28
38
|
waitForSourceCandidateSyncs?: () => Promise<void>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
rememberCssSource?: (entry: RememberedCssSource, cssRuntimeSignature?: string) => void;
|
|
40
|
+
getRememberedCssSources?: () => Iterable<[string, RememberedCssSource]>;
|
|
41
|
+
getRememberedCssSignature?: (file: string) => string | undefined;
|
|
42
|
+
setRememberedCssSignature?: (file: string, cssRuntimeSignature: string) => void;
|
|
33
43
|
recordGeneratorCandidates?: (candidates: Set<string>) => void;
|
|
34
44
|
hmrTimingRecorder?: HmrTimingRecorder;
|
|
35
45
|
}
|
|
46
|
+
export interface RememberedCssSource {
|
|
47
|
+
outputFile: string;
|
|
48
|
+
rawSource: string;
|
|
49
|
+
sourceFile: string;
|
|
50
|
+
}
|
|
36
51
|
interface GenerateBundleThis {
|
|
37
52
|
addWatchFile?: (id: string) => void;
|
|
38
53
|
emitFile?: (emittedFile: {
|
|
@@ -42,5 +57,6 @@ interface GenerateBundleThis {
|
|
|
42
57
|
}) => string;
|
|
43
58
|
}
|
|
44
59
|
export declare function resolveReplayCssOutputFile(rootDir: string, file: string): string;
|
|
60
|
+
export declare function resolveViteCssPipelineOutputFile(file: string, _opts: Pick<InternalUserDefinedOptions, 'cssMatcher'>, rootDir: string, isWebGeneratorTarget?: boolean): string;
|
|
45
61
|
export declare function createGenerateBundleHook(context: GenerateBundleContext): (this: GenerateBundleThis, _opt: unknown, bundle: Record<string, OutputAsset | OutputChunk>) => Promise<void>;
|
|
46
62
|
export {};
|
|
@@ -6,17 +6,25 @@ interface CssAssetMarkerMatcher {
|
|
|
6
6
|
interface CssAssetProcessedMarker {
|
|
7
7
|
(asset: OutputAsset, file?: string): void;
|
|
8
8
|
}
|
|
9
|
+
interface CssAssetResultRecordOptions {
|
|
10
|
+
injectIntoMain?: boolean | undefined;
|
|
11
|
+
}
|
|
9
12
|
interface CssAssetResultRecorder {
|
|
10
|
-
(file: string, css: string): void;
|
|
13
|
+
(file: string, css: string, options?: CssAssetResultRecordOptions): void;
|
|
11
14
|
}
|
|
12
15
|
interface CssAssetResultsGetter {
|
|
13
|
-
(): Iterable<[string, string
|
|
16
|
+
(): Iterable<[string, string | {
|
|
17
|
+
css: string;
|
|
18
|
+
injectIntoMain?: boolean | undefined;
|
|
19
|
+
}]>;
|
|
14
20
|
}
|
|
15
21
|
interface CollectViteProcessedCssAssetOptions {
|
|
22
|
+
opts?: InternalUserDefinedOptions | undefined;
|
|
16
23
|
isViteProcessedCssAsset?: CssAssetMarkerMatcher | undefined;
|
|
17
24
|
markCssAssetProcessed?: CssAssetProcessedMarker | undefined;
|
|
18
25
|
recordCssAssetResult?: CssAssetResultRecorder | undefined;
|
|
19
26
|
recordViteProcessedCssAssetResult?: CssAssetResultRecorder | undefined;
|
|
27
|
+
resolveViteProcessedCssOutputFile?: ((file: string) => string | undefined) | undefined;
|
|
20
28
|
debug?: ((format: string, ...args: unknown[]) => void) | undefined;
|
|
21
29
|
}
|
|
22
30
|
interface InjectViteProcessedCssAssetOptions {
|
|
@@ -31,7 +31,9 @@ interface ScanSourceCandidateRootOptions {
|
|
|
31
31
|
}
|
|
32
32
|
export interface SourceCandidateCollectorOptions {
|
|
33
33
|
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
34
|
+
extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
|
|
34
35
|
}
|
|
36
|
+
export declare function createTailwindV3DefaultExtractor(): ((source: string) => Set<string>) | undefined;
|
|
35
37
|
export declare function isSourceCandidateRequest(id: string): boolean;
|
|
36
38
|
export declare function createSourceCandidateCollector(options?: SourceCandidateCollectorOptions): SourceCandidateCollector;
|
|
37
39
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface WebpackWatchDependencyLoaderContext {
|
|
2
|
+
addDependency?: (file: string) => void;
|
|
3
|
+
addMissingDependency?: (file: string) => void;
|
|
4
|
+
addContextDependency?: (context: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function registerWebpackWatchFile(loaderContext: WebpackWatchDependencyLoaderContext, file: string): void;
|
|
7
|
+
export declare function registerWebpackWatchContext(loaderContext: WebpackWatchDependencyLoaderContext, context: string): void;
|
|
8
|
+
export {};
|
package/dist/cli.js
CHANGED
|
@@ -664,6 +664,7 @@ function createTailwindV3DefaultColorThemeCss() {
|
|
|
664
664
|
" margin: auto;",
|
|
665
665
|
"}"
|
|
666
666
|
].join("\n");
|
|
667
|
+
(0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
667
668
|
(0, _weapp_tailwindcss_postcss.createStyleHandler)({
|
|
668
669
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
669
670
|
cssRemoveHoverPseudoClass: true,
|
package/dist/cli.mjs
CHANGED
package/dist/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_precheck = require("./precheck-
|
|
2
|
+
const require_precheck = require("./precheck-Bj5ReSOU.js");
|
|
3
3
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
4
4
|
//#region src/core.ts
|
|
5
5
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
package/dist/core.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-
|
|
1
|
+
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-CUr1DYyy.mjs";
|
|
2
2
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
3
3
|
//#region src/core.ts
|
|
4
4
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CmIF_gsq.js");
|
|
3
3
|
let node_process = require("node:process");
|
|
4
4
|
node_process = require_chunk.__toESM(node_process);
|
|
5
5
|
//#region src/generator/options.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as createTailwindV4Engine, i as createTailwindV3Engine, n as resolveTailwindV3SourceFromPatcher, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-BCUGX3gX.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
//#region src/generator/options.ts
|
|
4
4
|
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
package/dist/generator.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CmIF_gsq.js");
|
|
3
|
+
const require_generator = require("./generator-Bd1LntD3.js");
|
|
4
4
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
5
5
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
6
6
|
exports.createWeappTailwindcssGeneratorFromPatcher = require_generator.createWeappTailwindcssGeneratorFromPatcher;
|
package/dist/generator.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { K as transformTailwindV4CssByTarget, S as resolveTailwindV4SourceOptionsFromPatcher, a as transformTailwindV3CssByTarget, b as resolveTailwindV4SourceFromPatchOptions, n as resolveTailwindV3SourceFromPatcher, o as transformTailwindV3CssToWeapp, q as transformTailwindV4CssToWeapp, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source } from "./v3-engine-BCUGX3gX.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromPatcher, r as resolveTailwindSourceFromPatcher, t as createWeappTailwindcssGenerator } from "./generator-DRHWC1t-.mjs";
|
|
3
3
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromPatcher, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromPatcher, resolveTailwindV3Source, resolveTailwindV3SourceFromPatcher, resolveTailwindV3SourceOptionsFromPatcher, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions, resolveTailwindV4SourceFromPatcher, resolveTailwindV4SourceOptionsFromPatcher, transformTailwindV3CssByTarget, transformTailwindV3CssToWeapp, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|
package/dist/gulp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const require_source_candidates = require("./source-candidates-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-CmIF_gsq.js");
|
|
4
|
+
const require_precheck = require("./precheck-Bj5ReSOU.js");
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-jvoYizzX.js");
|
|
6
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-Bl18sFqt.js");
|
|
7
|
+
const require_source_candidates = require("./source-candidates-DQxvGPSw.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
10
10
|
let node_process = require("node:process");
|
|
@@ -54,6 +54,7 @@ function createPlugins(options = {}) {
|
|
|
54
54
|
const runtimeSourcesByFile = /* @__PURE__ */ new Map();
|
|
55
55
|
let cachedGulpSourceCandidates;
|
|
56
56
|
let cachedGulpSourceCandidateSignature;
|
|
57
|
+
const sourceCandidateExtractor = initialTwPatcher.majorVersion === 3 ? require_source_candidates.createTailwindV3DefaultExtractor() : void 0;
|
|
57
58
|
const bundleRuntimeClassSetManager = options.__internalGulpRuntimeClassSetManager ?? require_incremental_runtime_class_set.createBundleRuntimeClassSetManager();
|
|
58
59
|
async function refreshRuntimeSet(options = false) {
|
|
59
60
|
const normalizedOptions = typeof options === "boolean" ? {
|
|
@@ -151,7 +152,10 @@ function createPlugins(options = {}) {
|
|
|
151
152
|
dependencies: [...sourceScan?.dependencies ?? []].sort()
|
|
152
153
|
}));
|
|
153
154
|
if (!forceRefresh && cachedGulpSourceCandidateSignature === nextSignature && cachedGulpSourceCandidates) return cachedGulpSourceCandidates;
|
|
154
|
-
const collector = require_source_candidates.createSourceCandidateCollector({
|
|
155
|
+
const collector = require_source_candidates.createSourceCandidateCollector({
|
|
156
|
+
bareArbitraryValues: opts.arbitraryValues?.bareArbitraryValues,
|
|
157
|
+
extractor: sourceCandidateExtractor
|
|
158
|
+
});
|
|
155
159
|
await collector.scanRoot({
|
|
156
160
|
entries: sourceScan?.entries,
|
|
157
161
|
root
|
|
@@ -169,10 +173,12 @@ function createPlugins(options = {}) {
|
|
|
169
173
|
].join("\n\n"));
|
|
170
174
|
}
|
|
171
175
|
async function registerAutoCssSource(file, rawSource) {
|
|
172
|
-
if (hasInitialTailwindCssRoots || (runtimeState.twPatcher.majorVersion ?? 0) < 4 || !file.path || !
|
|
173
|
-
const
|
|
176
|
+
if (hasInitialTailwindCssRoots || (runtimeState.twPatcher.majorVersion ?? 0) < 4 || !file.path || !require_v3_engine.hasTailwindRootDirectives(rawSource)) return false;
|
|
177
|
+
const sourceFile = node_path.default.resolve(file.path);
|
|
178
|
+
const sourceCss = require_v3_engine.normalizeTailwindSourceForGenerator(require_v3_engine.normalizeTailwindConfigDirectives(rawSource, node_path.default.dirname(sourceFile)), { importFallback: true });
|
|
174
179
|
if (!require_tailwindcss.upsertTailwindV4CssSource(opts, {
|
|
175
|
-
file:
|
|
180
|
+
file: sourceFile,
|
|
181
|
+
base: node_path.default.dirname(sourceFile),
|
|
176
182
|
css: sourceCss
|
|
177
183
|
})) return false;
|
|
178
184
|
runtimeSetInitialized = false;
|
|
@@ -292,7 +298,7 @@ function createPlugins(options = {}) {
|
|
|
292
298
|
const rawSource = file.contents.toString();
|
|
293
299
|
const cssSourceChanged = await registerAutoCssSource(file, rawSource);
|
|
294
300
|
const isMainChunk = opts.mainCssChunkMatcher(resolveGulpMatcherName(file), opts.appType);
|
|
295
|
-
const shouldUseGenerator = runtimeState.twPatcher.majorVersion !== 3 ||
|
|
301
|
+
const shouldUseGenerator = runtimeState.twPatcher.majorVersion !== 3 || require_v3_engine.hasTailwindRootDirectives(rawSource);
|
|
296
302
|
let nextRuntimeSet = await refreshRuntimeSet({
|
|
297
303
|
forceRefresh: cssSourceChanged,
|
|
298
304
|
forceCollect: cssSourceChanged || runtimeState.twPatcher.majorVersion !== 4 && isMainChunk,
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { t as createSourceCandidateCollector } from "./source-candidates-
|
|
1
|
+
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-CUr1DYyy.mjs";
|
|
2
|
+
import { E as normalizeTailwindConfigDirectives, O as normalizeTailwindSourceForGenerator, _ as resolveViteSourceScanEntries, ct as createDebug, l as getRuntimeClassSetSignature, w as hasTailwindRootDirectives } from "./v3-engine-BCUGX3gX.mjs";
|
|
3
|
+
import { c as hasConfiguredTailwindV4CssRoots, l as upsertTailwindV4CssSource } from "./tailwindcss-D5RogwtV.mjs";
|
|
4
|
+
import { i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-CAEuUesH.mjs";
|
|
5
|
+
import { n as createTailwindV3DefaultExtractor, t as createSourceCandidateCollector } from "./source-candidates-D7b-Jzsx.mjs";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
import path from "node:path";
|
|
@@ -48,6 +48,7 @@ function createPlugins(options = {}) {
|
|
|
48
48
|
const runtimeSourcesByFile = /* @__PURE__ */ new Map();
|
|
49
49
|
let cachedGulpSourceCandidates;
|
|
50
50
|
let cachedGulpSourceCandidateSignature;
|
|
51
|
+
const sourceCandidateExtractor = initialTwPatcher.majorVersion === 3 ? createTailwindV3DefaultExtractor() : void 0;
|
|
51
52
|
const bundleRuntimeClassSetManager = options.__internalGulpRuntimeClassSetManager ?? createBundleRuntimeClassSetManager();
|
|
52
53
|
async function refreshRuntimeSet(options = false) {
|
|
53
54
|
const normalizedOptions = typeof options === "boolean" ? {
|
|
@@ -145,7 +146,10 @@ function createPlugins(options = {}) {
|
|
|
145
146
|
dependencies: [...sourceScan?.dependencies ?? []].sort()
|
|
146
147
|
}));
|
|
147
148
|
if (!forceRefresh && cachedGulpSourceCandidateSignature === nextSignature && cachedGulpSourceCandidates) return cachedGulpSourceCandidates;
|
|
148
|
-
const collector = createSourceCandidateCollector({
|
|
149
|
+
const collector = createSourceCandidateCollector({
|
|
150
|
+
bareArbitraryValues: opts.arbitraryValues?.bareArbitraryValues,
|
|
151
|
+
extractor: sourceCandidateExtractor
|
|
152
|
+
});
|
|
149
153
|
await collector.scanRoot({
|
|
150
154
|
entries: sourceScan?.entries,
|
|
151
155
|
root
|
|
@@ -164,9 +168,11 @@ function createPlugins(options = {}) {
|
|
|
164
168
|
}
|
|
165
169
|
async function registerAutoCssSource(file, rawSource) {
|
|
166
170
|
if (hasInitialTailwindCssRoots || (runtimeState.twPatcher.majorVersion ?? 0) < 4 || !file.path || !hasTailwindRootDirectives(rawSource)) return false;
|
|
167
|
-
const
|
|
171
|
+
const sourceFile = path.resolve(file.path);
|
|
172
|
+
const sourceCss = normalizeTailwindSourceForGenerator(normalizeTailwindConfigDirectives(rawSource, path.dirname(sourceFile)), { importFallback: true });
|
|
168
173
|
if (!upsertTailwindV4CssSource(opts, {
|
|
169
|
-
file:
|
|
174
|
+
file: sourceFile,
|
|
175
|
+
base: path.dirname(sourceFile),
|
|
170
176
|
css: sourceCss
|
|
171
177
|
})) return false;
|
|
172
178
|
runtimeSetInitialized = false;
|