@rokkit/cli 1.0.0-next.155 → 1.0.0-next.159

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokkit/cli",
3
- "version": "1.0.0-next.155",
3
+ "version": "1.0.0-next.159",
4
4
  "description": "Command line utilities for icon bundling and conversion.",
5
5
  "repository": {
6
6
  "type": "git",
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Jerry Thomas
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.
@@ -1,10 +0,0 @@
1
- /**
2
- * Load rokkit.config.js using injected adapter or real filesystem.
3
- * Returns null (not an error) if config is absent or fails to load.
4
- * @param {{ readConfig?: () => Record<string, unknown>, cwd?: string }} adapters
5
- * @returns {Promise<Record<string, unknown> | null>}
6
- */
7
- export function loadConfig(adapters: {
8
- readConfig?: () => Record<string, unknown>;
9
- cwd?: string;
10
- }): Promise<Record<string, unknown> | null>;
@@ -1,58 +0,0 @@
1
- /**
2
- * Clean up and optimise SVG icon
3
- *
4
- * @param {string} svg SVG code
5
- * @param {boolean} color True if color should be preserved
6
- */
7
- export function cleanAndOptimizeIcon(svg: string, color: boolean): void;
8
- /**
9
- * Process icons
10
- *
11
- * @param {IconifyTools} iconSet Icon set
12
- * @param {boolean} color True if color should be preserved
13
- */
14
- export function processIcons(iconSet: IconifyTools, color: boolean): void;
15
- /**
16
- * Convert individual icons into a json bundle
17
- *
18
- * @param {string} folder Folder with icons
19
- * @param {import('./types').IconBuilderOptions} options Options for conversion
20
- * @returns {Promise<object>} The generated icon set
21
- */
22
- export function bundle(folder: string, options: import("./types").IconBuilderOptions): Promise<object>;
23
- /**
24
- * Convert icons to an iconify package
25
- *
26
- * @param {string} folder Folder with icons
27
- * @param {import('./types').IconBuilderOptions} options Options for conversion
28
- * @returns {Promise<object>} The generated icon set
29
- */
30
- export function convert(folder: string, options: import("./types").IconBuilderOptions): Promise<object>;
31
- /**
32
- * Read config file from path
33
- *
34
- * @param {string} configPath Path to config file
35
- * @returns {object} Parsed config object
36
- */
37
- export function readConfigFile(configPath: string): object;
38
- /**
39
- * Get folders from directory
40
- *
41
- * @param {string} dir Directory to scan for folders
42
- * @returns {string[]} List of folder names
43
- */
44
- export function getFolderNames(dir: string): string[];
45
- /**
46
- * Converts a folder of icons into an icon bundle
47
- * @param {string[]} folders
48
- * @param {import('./types').IconBuilderOptions} config
49
- * @param {import('./types').FolderOptions} opts
50
- */
51
- export function bundleFolders(folders: string[], config: import("./types").IconBuilderOptions, opts: import("./types").FolderOptions): void;
52
- /**
53
- * Converts a folder of icons into individual SVG files
54
- * @param {string[]} folders
55
- * @param {import('./types').IconBuilderOptions} config
56
- * @param {import('./types').FolderOptions} opts
57
- */
58
- export function convertFolders(folders: string[], config: import("./types").IconBuilderOptions, opts: import("./types").FolderOptions): void;
@@ -1,24 +0,0 @@
1
- /**
2
- * Run all doctor checks against the given filesystem adapter.
3
- * @param {{ exists: (p: string) => boolean, read: (p: string) => string, resolve: (p: string) => string }} fs
4
- * @returns {Array<{ id: string, label: string, status: 'pass'|'fail', fixable: boolean, fix: string, autoFix?: string }>}
5
- */
6
- export function runChecks(fs: {
7
- exists: (p: string) => boolean;
8
- read: (p: string) => string;
9
- resolve: (p: string) => string;
10
- }): Array<{
11
- id: string;
12
- label: string;
13
- status: "pass" | "fail";
14
- fixable: boolean;
15
- fix: string;
16
- autoFix?: string;
17
- }>;
18
- /**
19
- * Interactive doctor command — validates project setup.
20
- * @param {{ fix?: boolean }} [opts]
21
- */
22
- export function doctor(opts?: {
23
- fix?: boolean;
24
- }): void;
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,50 +0,0 @@
1
- /**
2
- * Build the chart config section from user prompt answers.
3
- * @param {{ chartColors: string, chartShades: string }} opts
4
- * @returns {Record<string, unknown>}
5
- */
6
- export function generateChartConfig({ chartColors, chartShades }: {
7
- chartColors: string;
8
- chartShades: string;
9
- }): Record<string, unknown>;
10
- export function generateConfig({ palette, customColors, icons, iconPath, themes, defaultTheme, switcher, includeChart, chartColors, chartShades }: {
11
- palette: any;
12
- customColors: any;
13
- icons: any;
14
- iconPath: any;
15
- themes: any;
16
- defaultTheme: any;
17
- switcher: any;
18
- includeChart: any;
19
- chartColors: any;
20
- chartShades: any;
21
- }): {
22
- colors: Record<string, unknown>;
23
- themes: any;
24
- defaultTheme: any;
25
- switcher: any;
26
- storageKey: string;
27
- };
28
- /**
29
- * Generate the content for uno.config.js.
30
- * @returns {string}
31
- */
32
- export function generateUnoConfig(): string;
33
- /**
34
- * Generate an array of CSS @import lines for app.css.
35
- * @param {string[]} themes
36
- * @returns {string[]}
37
- */
38
- export function generateAppCssImports(themes: string[]): string[];
39
- /**
40
- * Generate the flash-prevention script for app.html.
41
- * Returns null when no script is needed (system switcher).
42
- * @param {string} switcher — 'system' | 'manual' | 'full'
43
- * @param {string} [storageKey='rokkit-theme']
44
- * @returns {string | null}
45
- */
46
- export function generateInitScript(switcher: string, storageKey?: string, defaultStyle?: string): string | null;
47
- /**
48
- * Interactive init command — prompts the user, writes config files.
49
- */
50
- export function init(): Promise<void>;
@@ -1,28 +0,0 @@
1
- /**
2
- * Generate a skin scaffold object with all token keys set to default color names.
3
- * @returns {Record<string, string>}
4
- */
5
- export function generateSkinScaffold(): Record<string, string>;
6
- /**
7
- * Add a new skin entry to a config object (pure, no side effects).
8
- * @param {Record<string, unknown>} config
9
- * @param {string} name
10
- * @returns {Record<string, unknown>}
11
- */
12
- export function addSkinToConfig(config: Record<string, unknown>, name: string): Record<string, unknown>;
13
- /**
14
- * Serialize a rokkit config back to a JS module string.
15
- * @param {Record<string, unknown>} config
16
- * @returns {string}
17
- */
18
- export function serializeConfig(config: Record<string, unknown>): string;
19
- export function runSkinList(adapters?: {}): Promise<void>;
20
- export function runSkinCreate(name: any, adapters?: {}): Promise<void>;
21
- /**
22
- * CLI entry point for `rokkit skin` subcommands.
23
- * @param {string} sub — 'list' | 'create'
24
- * @param {{ name?: string }} opts
25
- */
26
- export function skin(sub: string, opts?: {
27
- name?: string;
28
- }): Promise<void>;
@@ -1,21 +0,0 @@
1
- /**
2
- * Generate a full CSS theme stub for the given style name.
3
- * Produces one `[data-style='<name>']` block per component.
4
- * @param {string} name
5
- * @returns {string}
6
- */
7
- export function generateThemeStub(name: string): string;
8
- export function runThemeList(adapters?: {}): Promise<void>;
9
- export function runThemeCreate(name: any, adapters?: {}): void;
10
- /**
11
- * CLI entry point for `rokkit theme` subcommands.
12
- * @param {string} sub — 'list' | 'create'
13
- * @param {{ name?: string }} opts
14
- */
15
- export function theme(sub: string, opts?: {
16
- name?: string;
17
- }): Promise<void>;
18
- /**
19
- * All component names that ship with Rokkit — one CSS block will be generated for each.
20
- */
21
- export const THEME_COMPONENTS: string[];
@@ -1,24 +0,0 @@
1
- export type IconPackageInfo = {
2
- namespace?: string | undefined;
3
- version?: string | undefined;
4
- homepage?: string | undefined;
5
- };
6
- export type BundleConfig = {
7
- color?: boolean | undefined;
8
- };
9
- export type BundleConfiguration = {
10
- package?: IconPackageInfo | undefined;
11
- bundles?: {
12
- [x: string]: BundleConfig;
13
- } | undefined;
14
- };
15
- export type IconBuilderOptions = {
16
- target: string;
17
- prefix: string;
18
- color: boolean;
19
- package?: IconPackageInfo | undefined;
20
- };
21
- export type FolderOptions = {
22
- input: string;
23
- output: string;
24
- };
@@ -1,33 +0,0 @@
1
- /**
2
- * Extract @rokkit/* packages from a parsed package.json object.
3
- * @param {Record<string, unknown>} pkgJson
4
- * @returns {{ name: string, current: string }[]}
5
- */
6
- export function getRokkitPackages(pkgJson: Record<string, unknown>): {
7
- name: string;
8
- current: string;
9
- }[];
10
- /**
11
- * Detect the package manager from lockfile presence.
12
- * @param {string[]} lockfiles — list of lockfile names that exist in cwd
13
- * @returns {'bun' | 'pnpm' | 'yarn' | 'npm'}
14
- */
15
- export function detectPackageManager(lockfiles: string[]): "bun" | "pnpm" | "yarn" | "npm";
16
- /**
17
- * Build the install command for the given package manager.
18
- * @param {'bun' | 'pnpm' | 'yarn' | 'npm'} pm
19
- * @param {string[]} packages — package specs like `@rokkit/ui@1.2.3`
20
- * @returns {{ bin: string, args: string[] }}
21
- */
22
- export function buildInstallCommand(pm: "bun" | "pnpm" | "yarn" | "npm", packages: string[]): {
23
- bin: string;
24
- args: string[];
25
- };
26
- export function runUpgrade(opts?: {}, adapters?: {}): void;
27
- /**
28
- * CLI entry point for `rokkit upgrade`
29
- * @param {{ apply?: boolean }} opts
30
- */
31
- export function upgrade(opts?: {
32
- apply?: boolean;
33
- }): void;