uniskin 0.0.1 → 0.3.0
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/LICENSE +21 -0
- package/README.md +122 -1
- package/dist/cli/bin.d.ts +3 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +9 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/css.d.ts +25 -0
- package/dist/cli/css.d.ts.map +1 -0
- package/dist/cli/css.js +68 -0
- package/dist/cli/css.js.map +1 -0
- package/dist/cli/init.d.ts +20 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +92 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/main.d.ts +5 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +85 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/new-adapter.d.ts +11 -0
- package/dist/cli/new-adapter.d.ts.map +1 -0
- package/dist/cli/new-adapter.js +66 -0
- package/dist/cli/new-adapter.js.map +1 -0
- package/dist/cli/project.d.ts +30 -0
- package/dist/cli/project.d.ts.map +1 -0
- package/dist/cli/project.js +158 -0
- package/dist/cli/project.js.map +1 -0
- package/dist/default-theme.d.ts +948 -0
- package/dist/default-theme.d.ts.map +1 -0
- package/dist/default-theme.js +944 -0
- package/dist/default-theme.js.map +1 -0
- package/dist/emit.d.ts +23 -0
- package/dist/emit.d.ts.map +1 -0
- package/dist/emit.js +105 -0
- package/dist/emit.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +67 -0
- package/dist/index.js.map +1 -0
- package/dist/merge.d.ts +49 -0
- package/dist/merge.d.ts.map +1 -0
- package/dist/merge.js +188 -0
- package/dist/merge.js.map +1 -0
- package/dist/types.d.ts +94 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +44 -0
- package/dist/types.js.map +1 -0
- package/package.json +56 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Uniskin contributors
|
|
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/README.md
CHANGED
|
@@ -1,3 +1,124 @@
|
|
|
1
1
|
# uniskin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One semantic class vocabulary, swappable Tailwind CSS v4 UI skins.
|
|
4
|
+
|
|
5
|
+
Write `ui-button ui-primary` once, in plain HTML, React, Vue, PHP or anything
|
|
6
|
+
else. Pick an **adapter** in your CSS to decide how it looks: the built-in
|
|
7
|
+
default, a shadcn/ui look, a daisyUI look, or your own. Switching adapters
|
|
8
|
+
needs **zero markup changes**. The output is CSS only, with no runtime
|
|
9
|
+
JavaScript.
|
|
10
|
+
|
|
11
|
+
```css
|
|
12
|
+
@import "tailwindcss";
|
|
13
|
+
@plugin "uniskin" { adapter: "shadcn"; } /* or "daisyui", or "./my-adapter.js" */
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<button class="ui-button ui-primary ui-outline ui-sm">Save</button>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
The quickest way is the CLI. It detects your package manager and Tailwind v4
|
|
23
|
+
stylesheet, installs the packages and adds the `@plugin` line for you:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npx uniskin init
|
|
27
|
+
# or choose the skin up front
|
|
28
|
+
npx uniskin init --adapter shadcn --yes
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or install by hand:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npm install uniskin # core plugin + built-in default skin
|
|
35
|
+
npm install @uniskin/shadcn # optional: shadcn/ui look
|
|
36
|
+
npm install @uniskin/daisyui daisyui # optional: daisyUI look
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Then add the `@plugin` line to your Tailwind entry CSS (see above).
|
|
40
|
+
|
|
41
|
+
Requires **tailwindcss 4.3.3 or newer**.
|
|
42
|
+
|
|
43
|
+
## Plugin options
|
|
44
|
+
|
|
45
|
+
```css
|
|
46
|
+
@plugin "uniskin" {
|
|
47
|
+
adapter: "shadcn"; /* "default" | "shadcn" | "daisyui" | package name | "./path.js" */
|
|
48
|
+
prefix: "ui"; /* class prefix: ui-button, or uk-button with prefix "uk" */
|
|
49
|
+
dark: "media"; /* "media" | "class" | false */
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
| Option | Default | What it does |
|
|
54
|
+
|-----------|-------------|--------------|
|
|
55
|
+
| `adapter` | `"default"` | Which skin to use. A relative path or package name resolves from the stylesheet that declared `@plugin`. |
|
|
56
|
+
| `prefix` | `"ui"` | Class prefix for every class and keyframe. |
|
|
57
|
+
| `dark` | `"media"` | `"media"`: `.dark` / `[data-theme="dark"]` plus `prefers-color-scheme: dark`. `"class"`: only the class or attribute. `false`: no dark tokens. |
|
|
58
|
+
| `debug` | `false` | Print the full list of slots an adapter leaves to the default style. Also enabled by `UNISKIN_DEBUG=1`. |
|
|
59
|
+
|
|
60
|
+
## Vocabulary
|
|
61
|
+
|
|
62
|
+
| Kind | Classes |
|
|
63
|
+
|------------|---------|
|
|
64
|
+
| Components | `ui-button`, `ui-input`, `ui-textarea`, `ui-select`, `ui-checkbox`, `ui-radio`, `ui-switch`, `ui-field`, `ui-card`, `ui-badge`, `ui-alert`, `ui-modal`, `ui-tabs` |
|
|
65
|
+
| Parts | `ui-field-label`, `ui-field-hint`, `ui-field-error`, `ui-card-header`, `ui-card-body`, `ui-card-footer`, `ui-modal-box`, `ui-tab` |
|
|
66
|
+
| Intent | `ui-primary`, `ui-secondary`, `ui-success`, `ui-warning`, `ui-danger` |
|
|
67
|
+
| Style | `ui-outline`, `ui-ghost`, `ui-soft` (solid is the default) |
|
|
68
|
+
| Size | `ui-sm`, `ui-lg` (medium is the default) |
|
|
69
|
+
| State | `ui-disabled`, `ui-loading`, `ui-active` |
|
|
70
|
+
|
|
71
|
+
- Intents and styles combine freely: `ui-danger ui-outline`.
|
|
72
|
+
- Modifiers compile to compound selectors (`.ui-button.ui-primary`), so
|
|
73
|
+
`ui-outline` on a button and on a card can look completely different.
|
|
74
|
+
- States also style their native equivalents: `ui-disabled` matches
|
|
75
|
+
`:disabled` and `[aria-disabled="true"]`, `ui-loading` matches
|
|
76
|
+
`[aria-busy="true"]`, `ui-active` matches `[aria-selected="true"]` and
|
|
77
|
+
`[aria-pressed="true"]`.
|
|
78
|
+
- Every interactive component has `:focus-visible` styling, and animations
|
|
79
|
+
respect `prefers-reduced-motion`.
|
|
80
|
+
|
|
81
|
+
Classes are emitted on demand from Tailwind's automatic content detection, the
|
|
82
|
+
same scanning that finds `p-4` finds `ui-button`. Per-component markup,
|
|
83
|
+
modifiers and accessibility notes are in the
|
|
84
|
+
[vocabulary reference](https://github.com/Munawarhussain729/uniskin/blob/main/docs/vocabulary.md).
|
|
85
|
+
|
|
86
|
+
## Write your own adapter
|
|
87
|
+
|
|
88
|
+
An adapter overrides only what it wants; everything else falls back to the
|
|
89
|
+
default skin.
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
// my-adapter.ts
|
|
93
|
+
import { defineAdapter } from "uniskin/adapter";
|
|
94
|
+
|
|
95
|
+
export default defineAdapter({
|
|
96
|
+
name: "acme",
|
|
97
|
+
tokens: { "--ui-primary": "rebeccapurple" },
|
|
98
|
+
components: {
|
|
99
|
+
button: {
|
|
100
|
+
base: { "border-radius": "999px" },
|
|
101
|
+
styles: { outline: { "border-width": "2px" } },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```css
|
|
108
|
+
@plugin "uniskin" { adapter: "./my-adapter.ts"; }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`npx uniskin new-adapter <name>` scaffolds one. See the
|
|
112
|
+
[adapter guide](https://github.com/Munawarhussain729/uniskin/blob/main/docs/writing-adapters.md).
|
|
113
|
+
|
|
114
|
+
## Documentation
|
|
115
|
+
|
|
116
|
+
- [Getting started](https://github.com/Munawarhussain729/uniskin/blob/main/docs/getting-started.md)
|
|
117
|
+
- [CLI reference](https://github.com/Munawarhussain729/uniskin/blob/main/docs/cli.md)
|
|
118
|
+
- [Vocabulary reference](https://github.com/Munawarhussain729/uniskin/blob/main/docs/vocabulary.md)
|
|
119
|
+
- [Writing adapters](https://github.com/Munawarhussain729/uniskin/blob/main/docs/writing-adapters.md)
|
|
120
|
+
- [Changelog](https://github.com/Munawarhussain729/uniskin/blob/main/packages/uniskin/CHANGELOG.md)
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../src/cli/bin.ts"],"names":[],"mappings":""}
|
package/dist/cli/bin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/cli/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAC9B,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1B,CAAC,EACD,CAAC,CAAU,EAAE,EAAE;IACb,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type AdapterChoice = "default" | "shadcn" | "daisyui";
|
|
2
|
+
export declare const ADAPTERS: readonly AdapterChoice[];
|
|
3
|
+
/** Packages each adapter choice needs in the project. */
|
|
4
|
+
export declare const ADAPTER_PACKAGES: Record<AdapterChoice, string[]>;
|
|
5
|
+
/** The `@plugin` lines for a choice. Only the documented `adapter` option is used. */
|
|
6
|
+
export declare function pluginLines(adapter: AdapterChoice): string[];
|
|
7
|
+
export declare function hasUniskinPlugin(css: string): boolean;
|
|
8
|
+
export interface InsertResult {
|
|
9
|
+
/** New file content (identical to the input when nothing changed). */
|
|
10
|
+
content: string;
|
|
11
|
+
changed: boolean;
|
|
12
|
+
/** 1-based line number of the first inserted line. */
|
|
13
|
+
line?: number;
|
|
14
|
+
added: string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Inserts the plugin line(s) after the last single-line `@import` so that
|
|
18
|
+
* `@import` statements stay first, as CSS requires. Idempotent: a file that
|
|
19
|
+
* already has `@plugin "uniskin"` is returned untouched. Existing content is
|
|
20
|
+
* never modified or reordered.
|
|
21
|
+
*/
|
|
22
|
+
export declare function insertPlugin(css: string, adapter: AdapterChoice): InsertResult;
|
|
23
|
+
/** Minimal unified-style diff for a pure insertion of `added` at 1-based `line`. */
|
|
24
|
+
export declare function insertionDiff(file: string, before: string, line: number, added: string[]): string;
|
|
25
|
+
//# sourceMappingURL=css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/cli/css.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC7D,eAAO,MAAM,QAAQ,EAAE,SAAS,aAAa,EAAqC,CAAC;AAEnF,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,CAM5D,CAAC;AAEF,sFAAsF;AACtF,wBAAgB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE,CAS5D;AAKD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,YAAY,CAgB9E;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAcjG"}
|
package/dist/cli/css.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { stripComments } from "./project.js";
|
|
2
|
+
export const ADAPTERS = ["default", "shadcn", "daisyui"];
|
|
3
|
+
/** Packages each adapter choice needs in the project. */
|
|
4
|
+
export const ADAPTER_PACKAGES = {
|
|
5
|
+
default: ["uniskin"],
|
|
6
|
+
shadcn: ["uniskin", "@uniskin/shadcn"],
|
|
7
|
+
// daisyUI is a peer of the adapter: the adapter maps --ui-* onto daisyUI's
|
|
8
|
+
// --color-* variables, which only exist once daisyUI itself is loaded.
|
|
9
|
+
daisyui: ["uniskin", "@uniskin/daisyui", "daisyui"],
|
|
10
|
+
};
|
|
11
|
+
/** The `@plugin` lines for a choice. Only the documented `adapter` option is used. */
|
|
12
|
+
export function pluginLines(adapter) {
|
|
13
|
+
switch (adapter) {
|
|
14
|
+
case "default":
|
|
15
|
+
return ['@plugin "uniskin";'];
|
|
16
|
+
case "shadcn":
|
|
17
|
+
return ['@plugin "uniskin" { adapter: "shadcn"; }'];
|
|
18
|
+
case "daisyui":
|
|
19
|
+
return ['@plugin "daisyui";', '@plugin "uniskin" { adapter: "daisyui"; }'];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const UNISKIN_PLUGIN = /@plugin\s+["']uniskin["']/;
|
|
23
|
+
const DAISY_PLUGIN = /@plugin\s+["']daisyui["']/;
|
|
24
|
+
export function hasUniskinPlugin(css) {
|
|
25
|
+
return UNISKIN_PLUGIN.test(stripComments(css));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Inserts the plugin line(s) after the last single-line `@import` so that
|
|
29
|
+
* `@import` statements stay first, as CSS requires. Idempotent: a file that
|
|
30
|
+
* already has `@plugin "uniskin"` is returned untouched. Existing content is
|
|
31
|
+
* never modified or reordered.
|
|
32
|
+
*/
|
|
33
|
+
export function insertPlugin(css, adapter) {
|
|
34
|
+
if (hasUniskinPlugin(css))
|
|
35
|
+
return { content: css, changed: false, added: [] };
|
|
36
|
+
const eol = css.includes("\r\n") ? "\r\n" : "\n";
|
|
37
|
+
const hasDaisy = DAISY_PLUGIN.test(stripComments(css));
|
|
38
|
+
const lines = pluginLines(adapter).filter((l) => !(hasDaisy && DAISY_PLUGIN.test(l)));
|
|
39
|
+
const masked = stripComments(css).split(/\r?\n/);
|
|
40
|
+
let after = -1;
|
|
41
|
+
masked.forEach((l, i) => {
|
|
42
|
+
if (/^\s*@import\b[^;{]*;\s*$/.test(l))
|
|
43
|
+
after = i;
|
|
44
|
+
});
|
|
45
|
+
if (after === -1) {
|
|
46
|
+
return { content: lines.join(eol) + eol + css, changed: true, line: 1, added: lines };
|
|
47
|
+
}
|
|
48
|
+
const src = css.split(/\r?\n/);
|
|
49
|
+
src.splice(after + 1, 0, ...lines);
|
|
50
|
+
return { content: src.join(eol), changed: true, line: after + 2, added: lines };
|
|
51
|
+
}
|
|
52
|
+
/** Minimal unified-style diff for a pure insertion of `added` at 1-based `line`. */
|
|
53
|
+
export function insertionDiff(file, before, line, added) {
|
|
54
|
+
const b = before.replace(/\r?\n$/, "").split(/\r?\n/);
|
|
55
|
+
const start = Math.max(0, line - 3);
|
|
56
|
+
const ctxBefore = b.slice(start, line - 1);
|
|
57
|
+
const ctxAfter = b.slice(line - 1, line + 1);
|
|
58
|
+
const oldLen = ctxBefore.length + ctxAfter.length;
|
|
59
|
+
return [
|
|
60
|
+
`--- ${file}`,
|
|
61
|
+
`+++ ${file}`,
|
|
62
|
+
`@@ -${start + 1},${oldLen} +${start + 1},${oldLen + added.length} @@`,
|
|
63
|
+
...ctxBefore.map((l) => ` ${l}`),
|
|
64
|
+
...added.map((l) => `+${l}`),
|
|
65
|
+
...ctxAfter.map((l) => ` ${l}`),
|
|
66
|
+
].join("\n");
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","sourceRoot":"","sources":["../../src/cli/css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C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AAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAClD,OAAO;QACL,OAAO,IAAI,EAAE;QACb,OAAO,IAAI,EAAE;QACb,OAAO,KAAK,GAAG,CAAC,IAAI,MAAM,KAAK,KAAK,GAAG,CAAC,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,KAAK;QACtE,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;KAChC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface InitOptions {
|
|
2
|
+
cwd: string;
|
|
3
|
+
adapter?: string;
|
|
4
|
+
css?: string;
|
|
5
|
+
yes?: boolean;
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface Io {
|
|
9
|
+
log(message: string): void;
|
|
10
|
+
error(message: string): void;
|
|
11
|
+
/** Interactive prompt; undefined when not interactive. */
|
|
12
|
+
select?(question: string, choices: string[]): Promise<string>;
|
|
13
|
+
/** Runs an install command; returns the exit code. */
|
|
14
|
+
run(command: string, args: string[], cwd: string): number;
|
|
15
|
+
}
|
|
16
|
+
export declare class CliError extends Error {
|
|
17
|
+
}
|
|
18
|
+
/** Returns a process exit code. Throws CliError for user-facing failures. */
|
|
19
|
+
export declare function init(opts: InitOptions, io: Io): Promise<number>;
|
|
20
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,EAAE;IACjB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,0DAA0D;IAC1D,MAAM,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9D,sDAAsD;IACtD,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3D;AAED,qBAAa,QAAS,SAAQ,KAAK;CAAG;AAEtC,6EAA6E;AAC7E,wBAAsB,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAoFrE"}
|
package/dist/cli/init.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { ADAPTERS, ADAPTER_PACKAGES, hasUniskinPlugin, insertPlugin, insertionDiff, pluginLines, } from "./css.js";
|
|
4
|
+
import { checkTailwind, detectPackageManager, findTailwindCss, hasTailwindImport, installCommand, isDeclared, } from "./project.js";
|
|
5
|
+
export class CliError extends Error {
|
|
6
|
+
}
|
|
7
|
+
/** Returns a process exit code. Throws CliError for user-facing failures. */
|
|
8
|
+
export async function init(opts, io) {
|
|
9
|
+
const cwd = path.resolve(opts.cwd);
|
|
10
|
+
if (opts.adapter !== undefined && !ADAPTERS.includes(opts.adapter)) {
|
|
11
|
+
throw new CliError(`Unknown adapter "${opts.adapter}". Choose one of: ${ADAPTERS.join(", ")}.`);
|
|
12
|
+
}
|
|
13
|
+
const tw = checkTailwind(cwd);
|
|
14
|
+
if (!tw.ok)
|
|
15
|
+
throw new CliError(tw.reason);
|
|
16
|
+
if (tw.warning)
|
|
17
|
+
io.log(`warning: ${tw.warning}`);
|
|
18
|
+
let cssFile;
|
|
19
|
+
if (opts.css !== undefined) {
|
|
20
|
+
cssFile = path.resolve(cwd, opts.css);
|
|
21
|
+
let text;
|
|
22
|
+
try {
|
|
23
|
+
text = readFileSync(cssFile, "utf8");
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
throw new CliError(`Cannot read CSS file ${opts.css}.`);
|
|
27
|
+
}
|
|
28
|
+
if (!hasTailwindImport(text)) {
|
|
29
|
+
throw new CliError(`${opts.css} does not contain @import "tailwindcss". Pass the Tailwind entry stylesheet.`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const candidates = findTailwindCss(cwd);
|
|
34
|
+
if (candidates.length === 0) {
|
|
35
|
+
throw new CliError('No CSS file with @import "tailwindcss" found. Create one, or pass --css <path>.');
|
|
36
|
+
}
|
|
37
|
+
if (candidates.length === 1) {
|
|
38
|
+
cssFile = candidates[0];
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const rel = candidates.map((c) => path.relative(cwd, c));
|
|
42
|
+
if (opts.yes || !io.select) {
|
|
43
|
+
throw new CliError(`Found several Tailwind entry stylesheets (${rel.join(", ")}). Pick one with --css <path>.`);
|
|
44
|
+
}
|
|
45
|
+
cssFile = path.resolve(cwd, await io.select("Which stylesheet should be updated?", rel));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const relCss = path.relative(cwd, cssFile) || cssFile;
|
|
49
|
+
const original = readFileSync(cssFile, "utf8");
|
|
50
|
+
if (hasUniskinPlugin(original)) {
|
|
51
|
+
io.log(`${relCss} already configures uniskin; nothing to do.`);
|
|
52
|
+
return 0;
|
|
53
|
+
}
|
|
54
|
+
let adapter = opts.adapter;
|
|
55
|
+
if (adapter === undefined) {
|
|
56
|
+
if (opts.yes)
|
|
57
|
+
adapter = "default";
|
|
58
|
+
else if (io.select)
|
|
59
|
+
adapter = (await io.select("Which adapter do you want?", [...ADAPTERS]));
|
|
60
|
+
else
|
|
61
|
+
throw new CliError("Not an interactive terminal: pass --adapter <default|shadcn|daisyui> or --yes.");
|
|
62
|
+
}
|
|
63
|
+
const pm = detectPackageManager(cwd);
|
|
64
|
+
const missing = ADAPTER_PACKAGES[adapter].filter((p) => !isDeclared(cwd, p));
|
|
65
|
+
const result = insertPlugin(original, adapter);
|
|
66
|
+
if (opts.dryRun) {
|
|
67
|
+
io.log(`dry run (package manager: ${pm}) - no changes made.`);
|
|
68
|
+
if (missing.length > 0) {
|
|
69
|
+
const { command, args } = installCommand(pm, missing);
|
|
70
|
+
io.log(`would run: ${command} ${args.join(" ")}`);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
io.log("all required packages are already declared.");
|
|
74
|
+
}
|
|
75
|
+
io.log(insertionDiff(relCss, original, result.line ?? 1, result.added));
|
|
76
|
+
return 0;
|
|
77
|
+
}
|
|
78
|
+
if (missing.length > 0) {
|
|
79
|
+
const { command, args } = installCommand(pm, missing);
|
|
80
|
+
io.log(`running: ${command} ${args.join(" ")}`);
|
|
81
|
+
const code = io.run(command, args, cwd);
|
|
82
|
+
if (code !== 0) {
|
|
83
|
+
throw new CliError(`${command} exited with code ${code}; the stylesheet was not modified.`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
writeFileSync(cssFile, result.content);
|
|
87
|
+
io.log(`updated ${relCss}:`);
|
|
88
|
+
for (const l of pluginLines(adapter))
|
|
89
|
+
io.log(` ${l}`);
|
|
90
|
+
return 0;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,QAAQ,EACR,gBAAgB,EAEhB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,UAAU,GACX,MAAM,cAAc,CAAC;AAmBtB,MAAM,OAAO,QAAS,SAAQ,KAAK;CAAG;AAEtC,6EAA6E;AAC7E,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,IAAiB,EAAE,EAAM;IAClD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEnC,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAwB,CAAC,EAAE,CAAC;QACpF,MAAM,IAAI,QAAQ,CAAC,oBAAoB,IAAI,CAAC,OAAO,qBAAqB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClG,CAAC;IAED,MAAM,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,CAAC,EAAE;QAAE,MAAM,IAAI,QAAQ,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AG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAIA,OAAO,EAAkB,KAAK,EAAE,EAAE,MAAM,WAAW,CAAC;AAkBpD,wBAAgB,MAAM,IAAI,EAAE,CAuB3B;AAED,sDAAsD;AACtD,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,EAAa,EAAE,GAAG,SAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsClG"}
|
package/dist/cli/main.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { createInterface } from "node:readline/promises";
|
|
4
|
+
import { parseArgs } from "node:util";
|
|
5
|
+
import { CliError, init } from "./init.js";
|
|
6
|
+
import { newAdapter } from "./new-adapter.js";
|
|
7
|
+
const HELP = `uniskin - set up the Uniskin Tailwind v4 plugin
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
uniskin init [--adapter default|shadcn|daisyui] [--css <path>] [--yes] [--dry-run]
|
|
11
|
+
uniskin new-adapter <name> [--file]
|
|
12
|
+
|
|
13
|
+
init Install packages and add the @plugin line to your Tailwind CSS.
|
|
14
|
+
new-adapter Scaffold uniskin-adapter-<name>/ (or <name>.js with --file).
|
|
15
|
+
`;
|
|
16
|
+
function ownVersion() {
|
|
17
|
+
const pkgPath = new URL("../../package.json", import.meta.url);
|
|
18
|
+
return JSON.parse(readFileSync(pkgPath, "utf8")).version;
|
|
19
|
+
}
|
|
20
|
+
export function realIo() {
|
|
21
|
+
return {
|
|
22
|
+
log: (m) => console.log(m),
|
|
23
|
+
error: (m) => console.error(m),
|
|
24
|
+
select: process.stdin.isTTY
|
|
25
|
+
? async (question, choices) => {
|
|
26
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
27
|
+
try {
|
|
28
|
+
for (;;) {
|
|
29
|
+
const list = choices.map((c, i) => ` ${i + 1}) ${c}`).join("\n");
|
|
30
|
+
const answer = (await rl.question(`${question}\n${list}\n> `)).trim();
|
|
31
|
+
const byIndex = choices[Number(answer) - 1];
|
|
32
|
+
if (byIndex)
|
|
33
|
+
return byIndex;
|
|
34
|
+
if (choices.includes(answer))
|
|
35
|
+
return answer;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
rl.close();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
: undefined,
|
|
43
|
+
run: (command, args, cwd) => spawnSync(command, args, { cwd, stdio: "inherit", shell: process.platform === "win32" }).status ?? 1,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** Runs the CLI and returns the process exit code. */
|
|
47
|
+
export async function main(argv, io = realIo(), cwd = process.cwd()) {
|
|
48
|
+
try {
|
|
49
|
+
const { values, positionals } = parseArgs({
|
|
50
|
+
args: argv,
|
|
51
|
+
allowPositionals: true,
|
|
52
|
+
options: {
|
|
53
|
+
adapter: { type: "string" },
|
|
54
|
+
css: { type: "string" },
|
|
55
|
+
yes: { type: "boolean", short: "y" },
|
|
56
|
+
"dry-run": { type: "boolean" },
|
|
57
|
+
file: { type: "boolean" },
|
|
58
|
+
help: { type: "boolean", short: "h" },
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
const [command, ...rest] = positionals;
|
|
62
|
+
if (values.help || !command) {
|
|
63
|
+
io.log(HELP);
|
|
64
|
+
return values.help ? 0 : 1;
|
|
65
|
+
}
|
|
66
|
+
if (command === "init") {
|
|
67
|
+
return await init({ cwd, adapter: values.adapter, css: values.css, yes: values.yes, dryRun: values["dry-run"] }, io);
|
|
68
|
+
}
|
|
69
|
+
if (command === "new-adapter") {
|
|
70
|
+
if (rest.length !== 1)
|
|
71
|
+
throw new CliError("Usage: uniskin new-adapter <name> [--file]");
|
|
72
|
+
return newAdapter({ cwd, name: rest[0], file: values.file, uniskinVersion: ownVersion() }, io);
|
|
73
|
+
}
|
|
74
|
+
throw new CliError(`Unknown command "${command}".\n\n${HELP}`);
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
const code = e.code;
|
|
78
|
+
if (e instanceof CliError || code?.startsWith("ERR_PARSE_ARGS")) {
|
|
79
|
+
io.error(`error: ${e.message}`);
|
|
80
|
+
return 1;
|
|
81
|
+
}
|
|
82
|
+
throw e;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAW,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,IAAI,GAAG;;;;;;;;CAQZ,CAAC;AAEF,SAAS,UAAU;IACjB,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/D,OAAQ,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAyB,CAAC,OAAO,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,MAAM;IACpB,OAAO;QACL,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,KAAK,EAAE,C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9B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;gBAAE,MAAM,IAAI,QAAQ,CAAC,4CAA4C,CAAC,CAAC;YACxF,OAAO,UAAU,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAClG,CAAC;QACD,MAAM,IAAI,QAAQ,CAAC,oBAAoB,OAAO,SAAS,IAAI,EAAE,CAAC,CAAC;IACjE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,GAAI,CAAuB,CAAC,IAAI,CAAC;QAC3C,IAAI,CAAC,YAAY,QAAQ,IAAI,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAChE,EAAE,CAAC,KAAK,CAAC,UAAW,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3C,OAAO,CAAC,CAAC;QACX,CAAC;QACD,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Io } from "./init.js";
|
|
2
|
+
export interface NewAdapterOptions {
|
|
3
|
+
cwd: string;
|
|
4
|
+
name: string;
|
|
5
|
+
/** Write a single `<name>.js` file instead of a package directory. */
|
|
6
|
+
file?: boolean;
|
|
7
|
+
/** Version of uniskin, used as the peer range base. */
|
|
8
|
+
uniskinVersion: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function newAdapter(opts: NewAdapterOptions, io: Io): number;
|
|
11
|
+
//# sourceMappingURL=new-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-adapter.d.ts","sourceRoot":"","sources":["../../src/cli/new-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;CACxB;AA0BD,wBAAgB,UAAU,CAAC,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,GAAG,MAAM,CAyClE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { CliError } from "./init.js";
|
|
4
|
+
const ADAPTER_PREFIX = "uniskin-adapter-";
|
|
5
|
+
function adapterSource(name) {
|
|
6
|
+
return `import { defineAdapter } from "uniskin/adapter";
|
|
7
|
+
|
|
8
|
+
// Deep-merged over the built-in default theme: define only what you change.
|
|
9
|
+
// Overriding tokens is the easiest start; every component inherits them.
|
|
10
|
+
export default defineAdapter({
|
|
11
|
+
name: ${JSON.stringify(name)},
|
|
12
|
+
tokens: {
|
|
13
|
+
"--ui-primary": "oklch(0.55 0.2 300)",
|
|
14
|
+
"--ui-primary-fg": "oklch(0.98 0 0)",
|
|
15
|
+
},
|
|
16
|
+
components: {
|
|
17
|
+
button: {
|
|
18
|
+
base: {
|
|
19
|
+
"border-radius": "9999px",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
export function newAdapter(opts, io) {
|
|
27
|
+
const slug = opts.name.startsWith(ADAPTER_PREFIX) ? opts.name.slice(ADAPTER_PREFIX.length) : opts.name;
|
|
28
|
+
if (!/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(slug)) {
|
|
29
|
+
throw new CliError(`Invalid adapter name "${opts.name}". Use lowercase letters, digits and hyphens, starting with a letter.`);
|
|
30
|
+
}
|
|
31
|
+
const cwd = path.resolve(opts.cwd);
|
|
32
|
+
if (opts.file) {
|
|
33
|
+
const target = path.join(cwd, `${slug}.js`);
|
|
34
|
+
if (existsSync(target))
|
|
35
|
+
throw new CliError(`${slug}.js already exists; not overwriting.`);
|
|
36
|
+
writeFileSync(target, adapterSource(slug));
|
|
37
|
+
io.log(`created ${slug}.js`);
|
|
38
|
+
io.log(`use it: @plugin "uniskin" { adapter: "./${slug}.js"; }`);
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
const pkgName = `${ADAPTER_PREFIX}${slug}`;
|
|
42
|
+
const dir = path.join(cwd, pkgName);
|
|
43
|
+
if (existsSync(dir))
|
|
44
|
+
throw new CliError(`${pkgName}/ already exists; not overwriting.`);
|
|
45
|
+
mkdirSync(dir, { recursive: true });
|
|
46
|
+
const pkg = {
|
|
47
|
+
name: pkgName,
|
|
48
|
+
version: "0.0.0",
|
|
49
|
+
description: `${slug} adapter for Uniskin`,
|
|
50
|
+
type: "module",
|
|
51
|
+
main: "./index.js",
|
|
52
|
+
exports: { ".": "./index.js" },
|
|
53
|
+
files: ["index.js"],
|
|
54
|
+
keywords: ["tailwindcss", "uniskin", "adapter"],
|
|
55
|
+
license: "MIT",
|
|
56
|
+
peerDependencies: { uniskin: `^${opts.uniskinVersion}` },
|
|
57
|
+
};
|
|
58
|
+
writeFileSync(path.join(dir, "package.json"), JSON.stringify(pkg, null, 2) + "\n");
|
|
59
|
+
writeFileSync(path.join(dir, "index.js"), adapterSource(slug));
|
|
60
|
+
io.log(`created ${pkgName}/package.json`);
|
|
61
|
+
io.log(`created ${pkgName}/index.js`);
|
|
62
|
+
io.log(`use it: @plugin "uniskin" { adapter: "${pkgName}"; }`);
|
|
63
|
+
io.log("see docs/writing-adapters.md for the full slot reference.");
|
|
64
|
+
return 0;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=new-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-adapter.js","sourceRoot":"","sources":["../../src/cli/new-adapter.ts"],"names":[],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AC,GAAG,CAAC,2DAA2D,CAAC,CAAC;IACpE,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
|
2
|
+
/** Detects the package manager from the nearest lockfile, walking up from `cwd`. Defaults to npm. */
|
|
3
|
+
export declare function detectPackageManager(cwd: string): PackageManager;
|
|
4
|
+
export declare function installCommand(pm: PackageManager, packages: string[]): {
|
|
5
|
+
command: string;
|
|
6
|
+
args: string[];
|
|
7
|
+
};
|
|
8
|
+
/** True when `name` is declared in the package.json at `cwd`. */
|
|
9
|
+
export declare function isDeclared(cwd: string, name: string): boolean;
|
|
10
|
+
export declare const MIN_TAILWIND = "4.3.3";
|
|
11
|
+
export type TailwindCheck = {
|
|
12
|
+
ok: true;
|
|
13
|
+
version?: string;
|
|
14
|
+
warning?: string;
|
|
15
|
+
} | {
|
|
16
|
+
ok: false;
|
|
17
|
+
reason: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Checks that Tailwind CSS >= 4.3.3 is available. Looks at `cwd`'s
|
|
21
|
+
* package.json first, then ancestors (hoisted monorepo roots). The
|
|
22
|
+
* installed version in node_modules wins over the declared range.
|
|
23
|
+
*/
|
|
24
|
+
export declare function checkTailwind(cwd: string): TailwindCheck;
|
|
25
|
+
/** Blanks out CSS comments, keeping line structure. */
|
|
26
|
+
export declare function stripComments(css: string): string;
|
|
27
|
+
export declare function hasTailwindImport(css: string): boolean;
|
|
28
|
+
/** Finds `.css` files under `cwd` that import Tailwind, shallowest first. */
|
|
29
|
+
export declare function findTailwindCss(cwd: string): string[];
|
|
30
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/cli/project.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAW7D,qGAAqG;AACrG,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAUhE;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAG1G;AA4BD,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC,MAAM,MAAM,aAAa,GACrB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAiBlC;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CA8CxD;AAMD,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAyBrD"}
|