@tailwindcss/oxide 0.0.0-insiders.eb40518 → 0.0.0-insiders.ec0049a

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/index.d.ts +23 -9
  3. package/index.js +41 -15
  4. package/package.json +33 -18
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Tailwind Labs, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/index.d.ts CHANGED
@@ -4,20 +4,34 @@
4
4
  /* auto-generated by NAPI-RS */
5
5
 
6
6
  export interface ChangedContent {
7
+ /** File path to the changed file */
7
8
  file?: string
9
+ /** Contents of the changed file */
8
10
  content?: string
11
+ /** File extension */
9
12
  extension: string
10
13
  }
11
- export interface ContentPathInfo {
14
+ export interface GlobEntry {
15
+ /** Base path of the glob */
12
16
  base: string
17
+ /** Glob pattern */
18
+ pattern: string
13
19
  }
14
- export function resolveContentPaths(args: ContentPathInfo): Array<string>
15
- export const enum IO {
16
- Sequential = 1,
17
- Parallel = 2
20
+ export interface ScannerOptions {
21
+ /** Glob sources */
22
+ sources?: Array<GlobEntry>
18
23
  }
19
- export const enum Parsing {
20
- Sequential = 4,
21
- Parallel = 8
24
+ export interface CandidateWithPosition {
25
+ /** The candidate string */
26
+ candidate: string
27
+ /** The position of the candidate inside the content file */
28
+ position: number
29
+ }
30
+ export declare class Scanner {
31
+ constructor(opts: ScannerOptions)
32
+ scan(): Array<string>
33
+ scanFiles(input: Array<ChangedContent>): Array<string>
34
+ getCandidatesWithPositions(input: ChangedContent): Array<CandidateWithPosition>
35
+ get files(): Array<string>
36
+ get globs(): Array<GlobEntry>
22
37
  }
23
- export function parseCandidateStrings(input: Array<ChangedContent>, strategy: number): Array<string>
package/index.js CHANGED
@@ -224,17 +224,32 @@ switch (platform) {
224
224
  }
225
225
  break
226
226
  case 'arm':
227
- localFileExisted = existsSync(
228
- join(__dirname, 'tailwindcss-oxide.linux-arm-gnueabihf.node')
229
- )
230
- try {
231
- if (localFileExisted) {
232
- nativeBinding = require('./tailwindcss-oxide.linux-arm-gnueabihf.node')
233
- } else {
234
- nativeBinding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
227
+ if (isMusl()) {
228
+ localFileExisted = existsSync(
229
+ join(__dirname, 'tailwindcss-oxide.linux-arm-musleabihf.node')
230
+ )
231
+ try {
232
+ if (localFileExisted) {
233
+ nativeBinding = require('./tailwindcss-oxide.linux-arm-musleabihf.node')
234
+ } else {
235
+ nativeBinding = require('@tailwindcss/oxide-linux-arm-musleabihf')
236
+ }
237
+ } catch (e) {
238
+ loadError = e
239
+ }
240
+ } else {
241
+ localFileExisted = existsSync(
242
+ join(__dirname, 'tailwindcss-oxide.linux-arm-gnueabihf.node')
243
+ )
244
+ try {
245
+ if (localFileExisted) {
246
+ nativeBinding = require('./tailwindcss-oxide.linux-arm-gnueabihf.node')
247
+ } else {
248
+ nativeBinding = require('@tailwindcss/oxide-linux-arm-gnueabihf')
249
+ }
250
+ } catch (e) {
251
+ loadError = e
235
252
  }
236
- } catch (e) {
237
- loadError = e
238
253
  }
239
254
  break
240
255
  case 'riscv64':
@@ -266,6 +281,20 @@ switch (platform) {
266
281
  }
267
282
  }
268
283
  break
284
+ case 's390x':
285
+ localFileExisted = existsSync(
286
+ join(__dirname, 'tailwindcss-oxide.linux-s390x-gnu.node')
287
+ )
288
+ try {
289
+ if (localFileExisted) {
290
+ nativeBinding = require('./tailwindcss-oxide.linux-s390x-gnu.node')
291
+ } else {
292
+ nativeBinding = require('@tailwindcss/oxide-linux-s390x-gnu')
293
+ }
294
+ } catch (e) {
295
+ loadError = e
296
+ }
297
+ break
269
298
  default:
270
299
  throw new Error(`Unsupported architecture on Linux: ${arch}`)
271
300
  }
@@ -281,9 +310,6 @@ if (!nativeBinding) {
281
310
  throw new Error(`Failed to load native binding`)
282
311
  }
283
312
 
284
- const { resolveContentPaths, IO, Parsing, parseCandidateStrings } = nativeBinding
313
+ const { Scanner } = nativeBinding
285
314
 
286
- module.exports.resolveContentPaths = resolveContentPaths
287
- module.exports.IO = IO
288
- module.exports.Parsing = Parsing
289
- module.exports.parseCandidateStrings = parseCandidateStrings
315
+ module.exports.Scanner = Scanner
package/package.json CHANGED
@@ -1,25 +1,33 @@
1
1
  {
2
2
  "name": "@tailwindcss/oxide",
3
- "version": "0.0.0-insiders.eb40518",
3
+ "version": "0.0.0-insiders.ec0049a",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/tailwindlabs/tailwindcss.git",
7
+ "directory": "crates/node"
8
+ },
4
9
  "main": "index.js",
5
10
  "types": "index.d.ts",
6
11
  "napi": {
7
12
  "name": "tailwindcss-oxide",
8
13
  "triples": {
9
14
  "additional": [
15
+ "armv7-linux-androideabi",
16
+ "aarch64-linux-android",
10
17
  "aarch64-apple-darwin",
11
18
  "aarch64-unknown-linux-gnu",
12
19
  "aarch64-unknown-linux-musl",
13
20
  "armv7-unknown-linux-gnueabihf",
14
21
  "x86_64-unknown-linux-musl",
15
22
  "x86_64-unknown-freebsd",
16
- "i686-pc-windows-msvc"
23
+ "i686-pc-windows-msvc",
24
+ "aarch64-pc-windows-msvc"
17
25
  ]
18
26
  }
19
27
  },
20
28
  "license": "MIT",
21
29
  "devDependencies": {
22
- "@napi-rs/cli": "^2.17.0"
30
+ "@napi-rs/cli": "^2.18.4"
23
31
  },
24
32
  "engines": {
25
33
  "node": ">= 10"
@@ -28,21 +36,28 @@
28
36
  "index.js",
29
37
  "index.d.ts"
30
38
  ],
31
- "scripts": {
32
- "artifacts": "npx napi artifacts",
33
- "build": "npx napi build --platform --release",
34
- "build:debug": "npx napi build --platform",
35
- "version": "npx napi version"
39
+ "publishConfig": {
40
+ "provenance": true,
41
+ "access": "public"
36
42
  },
37
43
  "optionalDependencies": {
38
- "@tailwindcss/oxide-darwin-arm64": "0.0.0-insiders.eb40518",
39
- "@tailwindcss/oxide-darwin-x64": "0.0.0-insiders.eb40518",
40
- "@tailwindcss/oxide-freebsd-x64": "0.0.0-insiders.eb40518",
41
- "@tailwindcss/oxide-linux-arm-gnueabihf": "0.0.0-insiders.eb40518",
42
- "@tailwindcss/oxide-linux-arm64-gnu": "0.0.0-insiders.eb40518",
43
- "@tailwindcss/oxide-linux-arm64-musl": "0.0.0-insiders.eb40518",
44
- "@tailwindcss/oxide-linux-x64-gnu": "0.0.0-insiders.eb40518",
45
- "@tailwindcss/oxide-linux-x64-musl": "0.0.0-insiders.eb40518",
46
- "@tailwindcss/oxide-win32-x64-msvc": "0.0.0-insiders.eb40518"
44
+ "@tailwindcss/oxide-android-arm64": "0.0.0-insiders.ec0049a",
45
+ "@tailwindcss/oxide-linux-arm-gnueabihf": "0.0.0-insiders.ec0049a",
46
+ "@tailwindcss/oxide-freebsd-x64": "0.0.0-insiders.ec0049a",
47
+ "@tailwindcss/oxide-darwin-arm64": "0.0.0-insiders.ec0049a",
48
+ "@tailwindcss/oxide-darwin-x64": "0.0.0-insiders.ec0049a",
49
+ "@tailwindcss/oxide-linux-arm64-gnu": "0.0.0-insiders.ec0049a",
50
+ "@tailwindcss/oxide-linux-arm64-musl": "0.0.0-insiders.ec0049a",
51
+ "@tailwindcss/oxide-win32-x64-msvc": "0.0.0-insiders.ec0049a",
52
+ "@tailwindcss/oxide-linux-x64-musl": "0.0.0-insiders.ec0049a",
53
+ "@tailwindcss/oxide-win32-arm64-msvc": "0.0.0-insiders.ec0049a",
54
+ "@tailwindcss/oxide-linux-x64-gnu": "0.0.0-insiders.ec0049a"
55
+ },
56
+ "scripts": {
57
+ "artifacts": "napi artifacts",
58
+ "build": "napi build --platform --release --no-const-enum",
59
+ "dev": "cargo watch --quiet --shell 'npm run build'",
60
+ "build:debug": "napi build --platform --no-const-enum",
61
+ "version": "napi version"
47
62
  }
48
- }
63
+ }