tailwindcss-patch 9.4.1 → 9.4.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.
Files changed (34) hide show
  1. package/README.md +69 -0
  2. package/dist/{cli-CBVPia5Z.js → cli-BztQHMRp.js} +63 -64
  3. package/dist/{cli-CgBdW1U5.mjs → cli-D0jXMGXf.mjs} +1 -1
  4. package/dist/cli.js +5 -6
  5. package/dist/cli.mjs +2 -2
  6. package/dist/commands/cli-runtime.d.mts +1 -1
  7. package/dist/commands/cli-runtime.d.ts +1 -1
  8. package/dist/commands/cli-runtime.js +6 -6
  9. package/dist/commands/cli-runtime.mjs +2 -2
  10. package/dist/{dist-B1VBpHtd.js → dist-DDcbvOwe.js} +2 -2
  11. package/dist/index.d.mts +105 -5
  12. package/dist/index.d.ts +105 -5
  13. package/dist/index.js +325 -62
  14. package/dist/index.mjs +253 -4
  15. package/dist/{migrate-config-DqknZpUe.mjs → validate-Bug_WYcU.mjs} +193 -93
  16. package/dist/{validate-CaJv2g5K.d.ts → validate-BuqRodYI.d.ts} +65 -16
  17. package/dist/{migrate-config-Dn9OTXpO.js → validate-DbuKewV-.js} +257 -100
  18. package/dist/{validate-Dr7IkGU8.d.mts → validate-oAkURzUC.d.mts} +65 -15
  19. package/package.json +9 -9
  20. package/src/extraction/candidate-extractor.ts +76 -12
  21. package/src/public-api.ts +54 -13
  22. package/src/style-candidates.ts +35 -0
  23. package/src/style-generator.ts +80 -0
  24. package/src/v3/index.ts +11 -0
  25. package/src/v3/style-generator.ts +384 -0
  26. package/src/v4/bare-arbitrary-values.ts +127 -2
  27. package/src/v4/engine.ts +5 -2
  28. package/src/v4/index.ts +20 -4
  29. package/src/v4/node-adapter.ts +1 -1
  30. package/src/v4/source-scan.ts +1 -1
  31. package/src/v4/style-generator.ts +44 -0
  32. package/src/v4/types.ts +23 -0
  33. package/dist/chunk-8l464Juk.js +0 -28
  34. /package/dist/{dist-BjUV1yEM.mjs → dist-CxmNpfyy.mjs} +0 -0
package/src/v4/types.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { TailwindStyleSource } from '../style-candidates'
2
+
1
3
  export interface TailwindV4SourceOptions {
2
4
  projectRoot?: string
3
5
  cwd?: string
@@ -29,6 +31,8 @@ export interface TailwindV4CandidateSource {
29
31
  extension?: string
30
32
  }
31
33
 
34
+ export interface TailwindV4StyleSource extends TailwindStyleSource {}
35
+
32
36
  export interface TailwindV4GenerateOptions {
33
37
  candidates?: Iterable<string>
34
38
  sources?: TailwindV4CandidateSource[]
@@ -67,6 +71,25 @@ export interface TailwindV4GenerateResult {
67
71
  root: TailwindV4CompiledSourceRoot
68
72
  }
69
73
 
74
+ export interface TailwindV4StyleGenerateOptions extends TailwindV4SourceOptions {
75
+ source?: TailwindV4ResolvedSource
76
+ candidates?: Iterable<string>
77
+ sources?: TailwindV4StyleSource[]
78
+ /**
79
+ * Enables UnoCSS-style bare arbitrary values such as `p-10%` and `p-2.5px`.
80
+ */
81
+ bareArbitraryValues?: TailwindV4GenerateOptions['bareArbitraryValues']
82
+ /**
83
+ * Scans the compiled Tailwind CSS v4 source entries in addition to in-memory sources.
84
+ */
85
+ scanSources?: TailwindV4GenerateOptions['scanSources']
86
+ }
87
+
88
+ export interface TailwindV4StyleGenerateResult extends TailwindV4GenerateResult {
89
+ tokens: Set<string>
90
+ source: TailwindV4ResolvedSource
91
+ }
92
+
70
93
  export interface TailwindV4DesignSystem {
71
94
  parseCandidate: (candidate: string) => unknown[]
72
95
  candidatesToCss: (candidates: string[]) => Array<string | null | undefined>
@@ -1,28 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
- value: mod,
20
- enumerable: true
21
- }) : target, mod));
22
- //#endregion
23
- Object.defineProperty(exports, "__toESM", {
24
- enumerable: true,
25
- get: function() {
26
- return __toESM;
27
- }
28
- });
File without changes