tutuca 0.9.39 → 0.9.41
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/dist/tutuca-cli.js +92 -39
- package/dist/tutuca-dev.js +18 -0
- package/dist/tutuca-dev.min.js +1 -1
- package/package.json +6 -7
- package/skill/immutable-js/SKILL.md +79 -0
- package/skill/immutable-js/references/collection.md +346 -0
- package/skill/immutable-js/references/conversions.md +99 -0
- package/skill/immutable-js/references/deep-updates.md +172 -0
- package/skill/immutable-js/references/equality.md +95 -0
- package/skill/immutable-js/references/list.md +266 -0
- package/skill/immutable-js/references/map.md +300 -0
- package/skill/immutable-js/references/predicates.md +93 -0
- package/skill/immutable-js/references/range-repeat.md +55 -0
- package/skill/immutable-js/references/record.md +196 -0
- package/skill/immutable-js/references/seq.md +248 -0
- package/skill/immutable-js/references/set.md +270 -0
- package/skill/immutable-js/references/shallow-functional.md +99 -0
- package/skill/immutable-js/references/stack.md +210 -0
- package/skill/margaui/SKILL.md +101 -0
- package/skill/margaui/components/accordion.md +127 -0
- package/skill/margaui/components/alert.md +174 -0
- package/skill/margaui/components/avatar.md +220 -0
- package/skill/margaui/components/badge.md +193 -0
- package/skill/margaui/components/breadcrumbs.md +103 -0
- package/skill/margaui/components/button.md +322 -0
- package/skill/margaui/components/calendar.md +67 -0
- package/skill/margaui/components/card.md +373 -0
- package/skill/margaui/components/carousel.md +387 -0
- package/skill/margaui/components/chat.md +171 -0
- package/skill/margaui/components/checkbox.md +101 -0
- package/skill/margaui/components/collapse.md +172 -0
- package/skill/margaui/components/countdown.md +165 -0
- package/skill/margaui/components/diff.md +53 -0
- package/skill/margaui/components/divider.md +107 -0
- package/skill/margaui/components/dock.md +173 -0
- package/skill/margaui/components/drawer.md +184 -0
- package/skill/margaui/components/dropdown.md +388 -0
- package/skill/margaui/components/fab.md +346 -0
- package/skill/margaui/components/fieldset.md +88 -0
- package/skill/margaui/components/file-input.md +84 -0
- package/skill/margaui/components/filter.md +52 -0
- package/skill/margaui/components/footer.md +583 -0
- package/skill/margaui/components/hero.md +135 -0
- package/skill/margaui/components/hover-3d.md +129 -0
- package/skill/margaui/components/hover-gallery.md +49 -0
- package/skill/margaui/components/indicator.md +265 -0
- package/skill/margaui/components/input.md +389 -0
- package/skill/margaui/components/join.md +100 -0
- package/skill/margaui/components/kbd.md +127 -0
- package/skill/margaui/components/label.md +102 -0
- package/skill/margaui/components/link.md +96 -0
- package/skill/margaui/components/list.md +182 -0
- package/skill/margaui/components/loading.md +105 -0
- package/skill/margaui/components/mask.md +168 -0
- package/skill/margaui/components/menu.md +856 -0
- package/skill/margaui/components/mockup-browser.md +39 -0
- package/skill/margaui/components/mockup-code.md +81 -0
- package/skill/margaui/components/mockup-phone.md +39 -0
- package/skill/margaui/components/mockup-window.md +33 -0
- package/skill/margaui/components/modal.md +178 -0
- package/skill/margaui/components/navbar.md +282 -0
- package/skill/margaui/components/pagination.md +122 -0
- package/skill/margaui/components/progress.md +135 -0
- package/skill/margaui/components/radial-progress.md +67 -0
- package/skill/margaui/components/radio.md +133 -0
- package/skill/margaui/components/range.md +134 -0
- package/skill/margaui/components/rating.md +170 -0
- package/skill/margaui/components/select.md +225 -0
- package/skill/margaui/components/skeleton.md +64 -0
- package/skill/margaui/components/stack.md +142 -0
- package/skill/margaui/components/stat.md +254 -0
- package/skill/margaui/components/status.md +73 -0
- package/skill/margaui/components/steps.md +138 -0
- package/skill/margaui/components/swap.md +152 -0
- package/skill/margaui/components/tab.md +248 -0
- package/skill/margaui/components/table.md +1018 -0
- package/skill/margaui/components/text-rotate.md +91 -0
- package/skill/margaui/components/textarea.md +85 -0
- package/skill/margaui/components/theme-controller.md +266 -0
- package/skill/margaui/components/timeline.md +1356 -0
- package/skill/margaui/components/toast.md +165 -0
- package/skill/margaui/components/toggle.md +135 -0
- package/skill/margaui/components/tooltip.md +181 -0
- package/skill/margaui/components/validator.md +163 -0
- package/skill/{advanced.md → tutuca/advanced.md} +5 -0
- package/skill/{cli.md → tutuca/cli.md} +17 -0
- package/skill/{core.md → tutuca/core.md} +5 -0
- /package/skill/{SKILL.md → tutuca/SKILL.md} +0 -0
package/dist/tutuca-cli.js
CHANGED
|
@@ -10378,24 +10378,53 @@ __export(exports_install_skill, {
|
|
|
10378
10378
|
run: () => run,
|
|
10379
10379
|
describe: () => describe
|
|
10380
10380
|
});
|
|
10381
|
-
import { existsSync, mkdirSync, readdirSync
|
|
10381
|
+
import { cpSync, existsSync, mkdirSync, readdirSync } from "node:fs";
|
|
10382
10382
|
import { homedir } from "node:os";
|
|
10383
10383
|
import { dirname, resolve } from "node:path";
|
|
10384
|
-
import { parseArgs } from "node:util";
|
|
10385
10384
|
import { fileURLToPath } from "node:url";
|
|
10386
|
-
|
|
10385
|
+
import { parseArgs } from "node:util";
|
|
10386
|
+
function findSkillsRoot() {
|
|
10387
10387
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
10388
10388
|
const candidates = [resolve(here, "..", "..", "..", "skill"), resolve(here, "..", "skill")];
|
|
10389
10389
|
for (const c of candidates) {
|
|
10390
|
-
if (existsSync(resolve(c, "SKILL.md")))
|
|
10390
|
+
if (existsSync(resolve(c, "tutuca", "SKILL.md")))
|
|
10391
10391
|
return c;
|
|
10392
10392
|
}
|
|
10393
10393
|
return null;
|
|
10394
10394
|
}
|
|
10395
|
-
function targetDir(scope) {
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10395
|
+
function targetDir(scope, name) {
|
|
10396
|
+
const base = scope === "user" ? homedir() : process.cwd();
|
|
10397
|
+
return resolve(base, ".claude/skills", name);
|
|
10398
|
+
}
|
|
10399
|
+
function targetHasSkillFiles(dir) {
|
|
10400
|
+
if (!existsSync(dir))
|
|
10401
|
+
return false;
|
|
10402
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
10403
|
+
if (entry.isFile() && entry.name.endsWith(".md"))
|
|
10404
|
+
return true;
|
|
10405
|
+
if (entry.isDirectory() && targetHasSkillFiles(resolve(dir, entry.name)))
|
|
10406
|
+
return true;
|
|
10407
|
+
}
|
|
10408
|
+
return false;
|
|
10409
|
+
}
|
|
10410
|
+
function installSkill(skill, root, scope, force) {
|
|
10411
|
+
const src = resolve(root, skill.srcSubdir);
|
|
10412
|
+
if (!existsSync(resolve(src, "SKILL.md"))) {
|
|
10413
|
+
process.stderr.write(`tutuca: missing skill assets for ${skill.name} at ${src}
|
|
10414
|
+
`);
|
|
10415
|
+
process.exit(1);
|
|
10416
|
+
}
|
|
10417
|
+
const target = targetDir(scope, skill.name);
|
|
10418
|
+
if (targetHasSkillFiles(target) && !force) {
|
|
10419
|
+
process.stderr.write(`tutuca: ${target} already contains skill files. Re-run with --force to overwrite.
|
|
10420
|
+
`);
|
|
10421
|
+
process.exit(1);
|
|
10422
|
+
}
|
|
10423
|
+
mkdirSync(target, { recursive: true });
|
|
10424
|
+
cpSync(src, target, { recursive: true });
|
|
10425
|
+
const rel = scope === "project" ? `.claude/skills/${skill.name}` : target;
|
|
10426
|
+
process.stdout.write(`installed ${skill.name} skill → ${rel}
|
|
10427
|
+
`);
|
|
10399
10428
|
}
|
|
10400
10429
|
async function run(argv) {
|
|
10401
10430
|
const parsed = parseArgs({
|
|
@@ -10403,62 +10432,68 @@ async function run(argv) {
|
|
|
10403
10432
|
options: {
|
|
10404
10433
|
user: { type: "boolean", default: false },
|
|
10405
10434
|
project: { type: "boolean", default: false },
|
|
10435
|
+
"margaui-skill": { type: "boolean", default: false },
|
|
10436
|
+
"immutable-skill": { type: "boolean", default: false },
|
|
10437
|
+
all: { type: "boolean", default: false },
|
|
10406
10438
|
force: { type: "boolean", short: "f", default: false },
|
|
10407
10439
|
help: { type: "boolean", short: "h", default: false }
|
|
10408
10440
|
},
|
|
10409
10441
|
allowPositionals: false
|
|
10410
10442
|
});
|
|
10411
10443
|
if (parsed.values.help) {
|
|
10412
|
-
process.stdout.write(`tutuca install-skill [--user | --project] [--force]
|
|
10444
|
+
process.stdout.write(`tutuca install-skill [--user | --project] [--margaui-skill | --immutable-skill | --all] [--force]
|
|
10445
|
+
` + `
|
|
10446
|
+
` + ` Installs Claude Code skill assets into .claude/skills/<name>/.
|
|
10447
|
+
` + ` Defaults to --project (cwd); --user installs at ~/.claude/skills/.
|
|
10448
|
+
` + `
|
|
10449
|
+
` + ` Selection:
|
|
10450
|
+
` + ` (default) install the tutuca skill
|
|
10451
|
+
` + ` --margaui-skill install the margaui skill instead
|
|
10452
|
+
` + ` --immutable-skill install the immutable-js skill instead
|
|
10453
|
+
` + ` --all install every bundled skill (tutuca + margaui + immutable-js)
|
|
10413
10454
|
` + `
|
|
10414
|
-
` + ` Copies SKILL.md + core.md + cli.md + advanced.md into
|
|
10415
|
-
` + ` .claude/skills/tutuca/. Defaults to --project (cwd).
|
|
10416
|
-
` + ` --user installs at ~/.claude/skills/tutuca/.
|
|
10417
10455
|
` + ` --force overwrites existing files.
|
|
10418
10456
|
`);
|
|
10419
10457
|
return;
|
|
10420
10458
|
}
|
|
10421
10459
|
if (parsed.values.user && parsed.values.project) {
|
|
10422
10460
|
process.stderr.write(`tutuca: --user and --project are mutually exclusive
|
|
10461
|
+
`);
|
|
10462
|
+
process.exit(1);
|
|
10463
|
+
}
|
|
10464
|
+
const selectionFlags = ["margaui-skill", "immutable-skill", "all"].filter((k) => parsed.values[k]);
|
|
10465
|
+
if (selectionFlags.length > 1) {
|
|
10466
|
+
process.stderr.write(`tutuca: ${selectionFlags.map((f) => `--${f}`).join(", ")} are mutually exclusive
|
|
10423
10467
|
`);
|
|
10424
10468
|
process.exit(1);
|
|
10425
10469
|
}
|
|
10426
10470
|
const scope = parsed.values.user ? "user" : "project";
|
|
10427
|
-
const
|
|
10428
|
-
|
|
10429
|
-
if (!src) {
|
|
10471
|
+
const root = findSkillsRoot();
|
|
10472
|
+
if (!root) {
|
|
10430
10473
|
process.stderr.write(`tutuca: skill assets not found alongside this CLI.
|
|
10431
10474
|
` + "If you're running from a checkout, run `bun scripts/build-skill.js` first.\n");
|
|
10432
10475
|
process.exit(1);
|
|
10433
10476
|
}
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
}
|
|
10477
|
+
let selected;
|
|
10478
|
+
if (parsed.values.all) {
|
|
10479
|
+
selected = SKILLS;
|
|
10480
|
+
} else {
|
|
10481
|
+
const selFlag = SKILLS.find((s) => s.flag && parsed.values[s.flag]);
|
|
10482
|
+
selected = selFlag ? [selFlag] : SKILLS.filter((s) => s.name === "tutuca");
|
|
10441
10483
|
}
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
const from = resolve(src, name);
|
|
10445
|
-
if (!existsSync(from)) {
|
|
10446
|
-
process.stderr.write(`tutuca: missing skill asset: ${from}
|
|
10447
|
-
`);
|
|
10448
|
-
process.exit(1);
|
|
10449
|
-
}
|
|
10450
|
-
const buf = readFileSync(from);
|
|
10451
|
-
writeFileSync(resolve(target, name), buf);
|
|
10484
|
+
for (const skill of selected) {
|
|
10485
|
+
installSkill(skill, root, scope, parsed.values.force);
|
|
10452
10486
|
}
|
|
10453
|
-
const rel = scope === "project" ? ".claude/skills/tutuca" : target;
|
|
10454
|
-
process.stdout.write(`installed tutuca skill → ${rel}
|
|
10455
|
-
`);
|
|
10456
10487
|
process.stdout.write(`Open a Claude Code session in this directory to use it.
|
|
10457
10488
|
`);
|
|
10458
10489
|
}
|
|
10459
|
-
var describe = "Install
|
|
10490
|
+
var describe = "Install Claude Code skills (tutuca, margaui, immutable-js) into .claude/skills/.", SKILLS;
|
|
10460
10491
|
var init_install_skill = __esm(() => {
|
|
10461
|
-
|
|
10492
|
+
SKILLS = [
|
|
10493
|
+
{ name: "tutuca", srcSubdir: "tutuca", flag: null },
|
|
10494
|
+
{ name: "margaui", srcSubdir: "margaui", flag: "margaui-skill" },
|
|
10495
|
+
{ name: "immutable-js", srcSubdir: "immutable-js", flag: "immutable-skill" }
|
|
10496
|
+
];
|
|
10462
10497
|
});
|
|
10463
10498
|
|
|
10464
10499
|
// tools/tutuca.js
|
|
@@ -10670,7 +10705,7 @@ async function loadAndNormalize(modulePath) {
|
|
|
10670
10705
|
}
|
|
10671
10706
|
|
|
10672
10707
|
// tools/cli/output.js
|
|
10673
|
-
import { writeFileSync
|
|
10708
|
+
import { writeFileSync } from "node:fs";
|
|
10674
10709
|
|
|
10675
10710
|
// tools/format/cli.js
|
|
10676
10711
|
var exports_cli = {};
|
|
@@ -10815,6 +10850,24 @@ function lintIdToMessage(id, info) {
|
|
|
10815
10850
|
return `Misnested formatting tag </${info.tag}> — adoption agency will reorder nodes${fmtLocationSuffix(info)}`;
|
|
10816
10851
|
case "HTML_UNEXPECTED_END_TAG":
|
|
10817
10852
|
return `Unexpected end tag </${info.tag}>${fmtLocationSuffix(info)}`;
|
|
10853
|
+
case "HTML_UNCLOSED_BEFORE_END":
|
|
10854
|
+
return `<${info.unclosed}> still open when </${info.tag}> was seen — implicitly closed${fmtLocationSuffix(info)}`;
|
|
10855
|
+
case "HTML_DUPLICATE_ATTRIBUTE":
|
|
10856
|
+
return `Duplicate attribute '${info.name}' — second occurrence dropped${fmtLocationSuffix(info)}`;
|
|
10857
|
+
case "HTML_ATTRIBUTES_ON_END_TAG":
|
|
10858
|
+
return `Attributes on end tag </${info.tag}> — dropped by the parser${fmtLocationSuffix(info)}`;
|
|
10859
|
+
case "HTML_SELF_CLOSING_END_TAG":
|
|
10860
|
+
return `Self-closing end tag </${info.tag}/> — trailing '/' is meaningless${fmtLocationSuffix(info)}`;
|
|
10861
|
+
case "HTML_MISSING_ATTRIBUTE_VALUE":
|
|
10862
|
+
return `Attribute '${info.name}' is missing a value${fmtLocationSuffix(info)}`;
|
|
10863
|
+
case "HTML_CDATA_IN_HTML_NAMESPACE":
|
|
10864
|
+
return `CDATA section in HTML namespace — reinterpreted as a bogus comment${fmtLocationSuffix(info)}`;
|
|
10865
|
+
case "HTML_BOGUS_COMMENT":
|
|
10866
|
+
return `Bogus comment — content dropped by the parser${fmtLocationSuffix(info)}`;
|
|
10867
|
+
case "HTML_SVG_ATTR_WILL_LOWERCASE":
|
|
10868
|
+
return `SVG attribute '${info.raw}' will be rewritten to '${info.canonical}'${fmtLocationSuffix(info)}`;
|
|
10869
|
+
case "HTML_MATHML_ATTR_WILL_LOWERCASE":
|
|
10870
|
+
return `MathML attribute '${info.raw}' will be rewritten to '${info.canonical}'${fmtLocationSuffix(info)}`;
|
|
10818
10871
|
case "LINT_ERROR":
|
|
10819
10872
|
return info.message;
|
|
10820
10873
|
default:
|
|
@@ -11173,7 +11226,7 @@ async function formatResult(formatName, result, options = {}) {
|
|
|
11173
11226
|
async function emit(result, { format: format5, pretty, output }) {
|
|
11174
11227
|
const text = await formatResult(format5, result, { pretty });
|
|
11175
11228
|
if (output) {
|
|
11176
|
-
|
|
11229
|
+
writeFileSync(output, text);
|
|
11177
11230
|
} else {
|
|
11178
11231
|
process.stdout.write(text);
|
|
11179
11232
|
if (!text.endsWith(`
|
package/dist/tutuca-dev.js
CHANGED
|
@@ -4471,6 +4471,24 @@ function lintIdToMessage(id, info) {
|
|
|
4471
4471
|
return `Misnested formatting tag </${info.tag}> — adoption agency will reorder nodes${fmtLocationSuffix(info)}`;
|
|
4472
4472
|
case "HTML_UNEXPECTED_END_TAG":
|
|
4473
4473
|
return `Unexpected end tag </${info.tag}>${fmtLocationSuffix(info)}`;
|
|
4474
|
+
case "HTML_UNCLOSED_BEFORE_END":
|
|
4475
|
+
return `<${info.unclosed}> still open when </${info.tag}> was seen — implicitly closed${fmtLocationSuffix(info)}`;
|
|
4476
|
+
case "HTML_DUPLICATE_ATTRIBUTE":
|
|
4477
|
+
return `Duplicate attribute '${info.name}' — second occurrence dropped${fmtLocationSuffix(info)}`;
|
|
4478
|
+
case "HTML_ATTRIBUTES_ON_END_TAG":
|
|
4479
|
+
return `Attributes on end tag </${info.tag}> — dropped by the parser${fmtLocationSuffix(info)}`;
|
|
4480
|
+
case "HTML_SELF_CLOSING_END_TAG":
|
|
4481
|
+
return `Self-closing end tag </${info.tag}/> — trailing '/' is meaningless${fmtLocationSuffix(info)}`;
|
|
4482
|
+
case "HTML_MISSING_ATTRIBUTE_VALUE":
|
|
4483
|
+
return `Attribute '${info.name}' is missing a value${fmtLocationSuffix(info)}`;
|
|
4484
|
+
case "HTML_CDATA_IN_HTML_NAMESPACE":
|
|
4485
|
+
return `CDATA section in HTML namespace — reinterpreted as a bogus comment${fmtLocationSuffix(info)}`;
|
|
4486
|
+
case "HTML_BOGUS_COMMENT":
|
|
4487
|
+
return `Bogus comment — content dropped by the parser${fmtLocationSuffix(info)}`;
|
|
4488
|
+
case "HTML_SVG_ATTR_WILL_LOWERCASE":
|
|
4489
|
+
return `SVG attribute '${info.raw}' will be rewritten to '${info.canonical}'${fmtLocationSuffix(info)}`;
|
|
4490
|
+
case "HTML_MATHML_ATTR_WILL_LOWERCASE":
|
|
4491
|
+
return `MathML attribute '${info.raw}' will be rewritten to '${info.canonical}'${fmtLocationSuffix(info)}`;
|
|
4474
4492
|
case "LINT_ERROR":
|
|
4475
4493
|
return info.message;
|
|
4476
4494
|
default:
|