skillui 1.1.9 → 1.2.1

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 (2) hide show
  1. package/dist/cli.js +97 -20
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -4010,7 +4010,7 @@ var require_jiti = __commonJS({
4010
4010
  }, pathe_ff20891b_dirname = function(p) {
4011
4011
  const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
4012
4012
  return 1 === segments.length && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
4013
- }, basename5 = function(p, extension) {
4013
+ }, basename6 = function(p, extension) {
4014
4014
  const lastSegment = normalizeWindowsPath(p).split("/").pop();
4015
4015
  return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
4016
4016
  }, suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
@@ -6706,7 +6706,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
6706
6706
  function transform2(topts) {
6707
6707
  let code2 = (function(filename, source, get) {
6708
6708
  if (!opts.cache || !filename) return get();
6709
- const sourceHash = ` /* v${opts.cacheVersion}-${md5(source, 16)} */`, filebase = basename5(pathe_ff20891b_dirname(filename)) + "-" + basename5(filename), cacheFile = join16(opts.cache, filebase + "." + md5(filename) + ".js");
6709
+ const sourceHash = ` /* v${opts.cacheVersion}-${md5(source, 16)} */`, filebase = basename6(pathe_ff20891b_dirname(filename)) + "-" + basename6(filename), cacheFile = join16(opts.cache, filebase + "." + md5(filename) + ".js");
6710
6710
  if ((0, external_fs_.existsSync)(cacheFile)) {
6711
6711
  const cacheSource = (0, external_fs_.readFileSync)(cacheFile, "utf8");
6712
6712
  if (cacheSource.endsWith(sourceHash)) return debug2("[cache hit]", filename, "~>", cacheFile), cacheSource;
@@ -6764,7 +6764,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
6764
6764
  }
6765
6765
  function evalModule(source, evalOptions = {}) {
6766
6766
  var _a2;
6767
- const id = evalOptions.id || (evalOptions.filename ? basename5(evalOptions.filename) : `_jitiEval.${evalOptions.ext || ".js"}`), filename = evalOptions.filename || _resolve2(id), ext = evalOptions.ext || extname3(filename), cache3 = evalOptions.cache || parentCache || {}, isTypescript = ".ts" === ext || ".mts" === ext || ".cts" === ext, isNativeModule = ".mjs" === ext || ".js" === ext && "module" === (null === (_a2 = (function(path17) {
6767
+ const id = evalOptions.id || (evalOptions.filename ? basename6(evalOptions.filename) : `_jitiEval.${evalOptions.ext || ".js"}`), filename = evalOptions.filename || _resolve2(id), ext = evalOptions.ext || extname3(filename), cache3 = evalOptions.cache || parentCache || {}, isTypescript = ".ts" === ext || ".mts" === ext || ".cts" === ext, isNativeModule = ".mjs" === ext || ".js" === ext && "module" === (null === (_a2 = (function(path17) {
6768
6768
  for (; path17 && "." !== path17 && "/" !== path17; ) {
6769
6769
  path17 = join16(path17, "..");
6770
6770
  try {
@@ -46006,8 +46006,8 @@ var require_tmp = __commonJS({
46006
46006
  if (!_isUndefined(options.name)) {
46007
46007
  const name42 = options.name;
46008
46008
  if (path17.isAbsolute(name42)) throw new Error(`name option must not contain an absolute path, found "${name42}".`);
46009
- const basename5 = path17.basename(name42);
46010
- if (basename5 === ".." || basename5 === "." || basename5 !== name42)
46009
+ const basename6 = path17.basename(name42);
46010
+ if (basename6 === ".." || basename6 === "." || basename6 !== name42)
46011
46011
  throw new Error(`name option must not contain a path, found "${name42}".`);
46012
46012
  }
46013
46013
  if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) {
@@ -100933,15 +100933,16 @@ function embedReferenceFiles(refsDir, skillDir) {
100933
100933
  # Full Reference Files
100934
100934
 
100935
100935
  `;
100936
- md += `> All reference files are embedded below so Claude has complete context from /skills.
100936
+ md += `> Every output file is embedded below. Claude has full design system context from /skills alone.
100937
100937
 
100938
100938
  `;
100939
100939
  const refFiles = [
100940
- { file: "DESIGN.md", title: "Design System Tokens" },
100941
- { file: "ANIMATIONS.md", title: "Animations & Motion" },
100942
- { file: "LAYOUT.md", title: "Layout & Grid" },
100943
- { file: "COMPONENTS.md", title: "Component Patterns" },
100944
- { file: "INTERACTIONS.md", title: "Interactions & States" }
100940
+ { file: "DESIGN.md", title: "Design System Tokens (DESIGN.md)" },
100941
+ { file: "VISUAL_GUIDE.md", title: "Visual Guide \u2014 Screenshots (VISUAL_GUIDE.md)" },
100942
+ { file: "ANIMATIONS.md", title: "Animations & Motion (ANIMATIONS.md)" },
100943
+ { file: "LAYOUT.md", title: "Layout & Grid (LAYOUT.md)" },
100944
+ { file: "COMPONENTS.md", title: "Component Patterns (COMPONENTS.md)" },
100945
+ { file: "INTERACTIONS.md", title: "Interactions & States (INTERACTIONS.md)" }
100945
100946
  ];
100946
100947
  for (const { file, title } of refFiles) {
100947
100948
  const filePath = path14.join(refsDir, file);
@@ -100953,8 +100954,9 @@ function embedReferenceFiles(refsDir, skillDir) {
100953
100954
  }
100954
100955
  md += `## ${title}
100955
100956
 
100957
+ ${content}
100958
+
100956
100959
  `;
100957
- md += content + "\n\n";
100958
100960
  }
100959
100961
  const tokensDir = path14.join(skillDir, "tokens");
100960
100962
  const tokenFiles = ["colors.json", "spacing.json", "typography.json"];
@@ -100962,17 +100964,91 @@ function embedReferenceFiles(refsDir, skillDir) {
100962
100964
  for (const tf of tokenFiles) {
100963
100965
  const p = path14.join(tokensDir, tf);
100964
100966
  if (!fs13.existsSync(p)) continue;
100965
- const raw = fs13.readFileSync(p, "utf-8").trim();
100966
- tokenSections.push(`### ${tf}
100967
+ tokenSections.push(`### tokens/${tf}
100967
100968
  \`\`\`json
100968
- ${raw}
100969
+ ${fs13.readFileSync(p, "utf-8").trim()}
100969
100970
  \`\`\``);
100970
100971
  }
100971
100972
  if (tokenSections.length > 0) {
100972
- md += `## Design Tokens (JSON)
100973
+ md += `## Design Tokens \u2014 JSON Files
100974
+
100975
+ ${tokenSections.join("\n\n")}
100976
+
100977
+ `;
100978
+ }
100979
+ const fontsDir = path14.join(skillDir, "fonts");
100980
+ if (fs13.existsSync(fontsDir)) {
100981
+ const fontFiles = fs13.readdirSync(fontsDir).filter((f) => /\.(woff2?|ttf|otf)$/i.test(f));
100982
+ if (fontFiles.length > 0) {
100983
+ md += `## Bundled Fonts (fonts/)
100984
+
100985
+ `;
100986
+ md += `The following font files are bundled in the \`fonts/\` directory:
100987
+
100988
+ `;
100989
+ for (const f of fontFiles) {
100990
+ md += `- \`fonts/${f}\`
100991
+ `;
100992
+ }
100993
+ md += `
100994
+ Use these local font files in \`@font-face\` declarations instead of fetching from Google Fonts.
100995
+
100996
+ `;
100997
+ }
100998
+ }
100999
+ const screensDir = path14.join(skillDir, "screens");
101000
+ if (fs13.existsSync(screensDir)) {
101001
+ md += `## Screenshots Inventory (screens/)
101002
+
101003
+ `;
101004
+ md += `> Study all screenshots carefully before implementing any UI. Match every visual detail exactly.
100973
101005
 
100974
101006
  `;
100975
- md += tokenSections.join("\n\n") + "\n\n";
101007
+ const screenSubDirs = [
101008
+ { dir: "scroll", label: "Scroll Journey", desc: "Cinematic scroll states \u2014 page visual at each scroll depth" },
101009
+ { dir: "pages", label: "Full Page Screenshots", desc: "Full-page screenshots of each crawled URL" },
101010
+ { dir: "sections", label: "Section Clips", desc: "Clipped individual sections and components" },
101011
+ { dir: "states", label: "Interaction States", desc: "Hover, focus, and active state captures" }
101012
+ ];
101013
+ for (const { dir: dir2, label, desc } of screenSubDirs) {
101014
+ const subDir = path14.join(screensDir, dir2);
101015
+ if (!fs13.existsSync(subDir)) continue;
101016
+ const imgs = fs13.readdirSync(subDir).filter((f) => /\.(png|jpg|jpeg|webp)$/i.test(f)).sort();
101017
+ if (imgs.length === 0) continue;
101018
+ md += `### ${label} (screens/${dir2}/)
101019
+
101020
+ *${desc}*
101021
+
101022
+ `;
101023
+ for (const img of imgs) {
101024
+ md += `![${img}](screens/${dir2}/${img})
101025
+
101026
+ `;
101027
+ }
101028
+ }
101029
+ const indexPath = path14.join(screensDir, "INDEX.md");
101030
+ if (fs13.existsSync(indexPath)) {
101031
+ const indexContent = fs13.readFileSync(indexPath, "utf-8").trim();
101032
+ md += `### Screenshot Index (screens/INDEX.md)
101033
+
101034
+ ${indexContent}
101035
+
101036
+ `;
101037
+ }
101038
+ }
101039
+ const ssDir = path14.join(skillDir, "screenshots");
101040
+ if (fs13.existsSync(ssDir)) {
101041
+ const ssFiles = fs13.readdirSync(ssDir).filter((f) => /\.(png|jpg|jpeg|webp)$/i.test(f));
101042
+ if (ssFiles.length > 0) {
101043
+ md += `## Homepage Screenshots (screenshots/)
101044
+
101045
+ `;
101046
+ for (const f of ssFiles) {
101047
+ md += `![${f}](screenshots/${f})
101048
+
101049
+ `;
101050
+ }
101051
+ }
100976
101052
  }
100977
101053
  return md;
100978
101054
  }
@@ -104610,7 +104686,7 @@ gradient.pastel = pastel;
104610
104686
  // src/ui.ts
104611
104687
  var import_cli_progress = __toESM(require_cli_progress());
104612
104688
  var path15 = __toESM(require("path"));
104613
- var VERSION = "1.1.9";
104689
+ var VERSION = "1.2.1";
104614
104690
  function padAnsi(str, width) {
104615
104691
  const raw = stripAnsi(str);
104616
104692
  return str + " ".repeat(Math.max(0, width - raw.length));
@@ -105029,8 +105105,9 @@ program2.name("skillui").description("Reverse-engineer design systems from any p
105029
105105
  const result = await generateSkill(profile, designMdContent, path16.resolve(opts.out), screenshotPath, ultraAnimations);
105030
105106
  skillFilePath = result.skillFile;
105031
105107
  succeedSpinner(spSkill, ".skill package", skillFilePath);
105032
- skillInstalled = installSkillForClaude(result.skillDir, safeName);
105033
- writeClaludeMd(result.skillDir, safeName, profile.projectName);
105108
+ const skillFolderName = path16.basename(result.skillDir);
105109
+ skillInstalled = installSkillForClaude(result.skillDir, skillFolderName);
105110
+ writeClaludeMd(result.skillDir, skillFolderName, profile.projectName);
105034
105111
  } catch (e) {
105035
105112
  failSpinner(spSkill, ".skill package", e.message);
105036
105113
  throw e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillui",
3
- "version": "1.1.9",
3
+ "version": "1.2.1",
4
4
  "description": "Reverse-engineer design systems from any website, repo, or project. Extracts colors, fonts, spacing, animations, and components — packaged as a .skill file for Claude. Pure static analysis, zero AI, zero API keys.",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {