@kznlabs/labsui 0.1.3 → 0.1.5
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/index.js +54 -45
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17284,7 +17284,7 @@ async function fetchAllItems(source) {
|
|
|
17284
17284
|
// jsr.json
|
|
17285
17285
|
var jsr_default = {
|
|
17286
17286
|
name: "@kznlabs/labsui",
|
|
17287
|
-
version: "0.1.
|
|
17287
|
+
version: "0.1.5",
|
|
17288
17288
|
license: "MIT",
|
|
17289
17289
|
exports: "./src/index.ts",
|
|
17290
17290
|
publish: {
|
|
@@ -18170,33 +18170,60 @@ labsUI components live in this project as source: edit them like your own code.
|
|
|
18170
18170
|
- Pointer targets are at least 24×24 px. Prefer native validation
|
|
18171
18171
|
(\`required\`, \`type\`, \`pattern\`).`;
|
|
18172
18172
|
|
|
18173
|
-
// src/
|
|
18174
|
-
var PROTOCOLS = ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"];
|
|
18173
|
+
// src/tools.ts
|
|
18175
18174
|
var names = {
|
|
18176
18175
|
type: "array",
|
|
18177
18176
|
items: { type: "string", pattern: "^[a-z0-9][a-z0-9-]*$" },
|
|
18178
18177
|
minItems: 1,
|
|
18179
|
-
maxItems: 20
|
|
18178
|
+
maxItems: 20,
|
|
18179
|
+
description: "Item names as search lists them, e.g. button or date-picker."
|
|
18180
|
+
};
|
|
18181
|
+
var installed = {
|
|
18182
|
+
...names,
|
|
18183
|
+
minItems: 0,
|
|
18184
|
+
description: "Installed item names, e.g. button. Empty: all installed items."
|
|
18185
|
+
};
|
|
18186
|
+
var dryRun = {
|
|
18187
|
+
type: "boolean",
|
|
18188
|
+
default: false,
|
|
18189
|
+
description: "Report what would change, write nothing."
|
|
18190
|
+
};
|
|
18191
|
+
var readOnly = { readOnlyHint: true, openWorldHint: false };
|
|
18192
|
+
var writes = {
|
|
18193
|
+
readOnlyHint: false,
|
|
18194
|
+
destructiveHint: false,
|
|
18195
|
+
idempotentHint: true,
|
|
18196
|
+
openWorldHint: true
|
|
18180
18197
|
};
|
|
18181
18198
|
var TOOLS = [
|
|
18182
18199
|
{
|
|
18183
18200
|
name: "search",
|
|
18184
18201
|
title: "Search labsUI",
|
|
18185
|
-
description: "Find components, blocks, hooks and helpers by name, export (useModal) or intent (date range, toast promise). All words must match
|
|
18202
|
+
description: "Find labsUI components, blocks, hooks and helpers by name, export (useModal) or intent (date range, toast promise). All words must match, best match first; no query lists everything. Returns one line per hit: name, kind and summary. Start here when you don't know an item's name, then call view on the hits.",
|
|
18186
18203
|
inputSchema: {
|
|
18187
18204
|
type: "object",
|
|
18188
18205
|
properties: {
|
|
18189
18206
|
query: { type: "string", description: "Words to match. Empty lists everything." },
|
|
18190
|
-
kind: {
|
|
18191
|
-
|
|
18207
|
+
kind: {
|
|
18208
|
+
type: "string",
|
|
18209
|
+
enum: ["component", "block", "hook", "helper", "setup"],
|
|
18210
|
+
description: "Only this kind: component (primitive), block (composed section), hook, helper or setup."
|
|
18211
|
+
},
|
|
18212
|
+
limit: {
|
|
18213
|
+
type: "integer",
|
|
18214
|
+
minimum: 1,
|
|
18215
|
+
maximum: 200,
|
|
18216
|
+
default: 12,
|
|
18217
|
+
description: "Most results to return."
|
|
18218
|
+
}
|
|
18192
18219
|
}
|
|
18193
18220
|
},
|
|
18194
|
-
annotations:
|
|
18221
|
+
annotations: readOnly
|
|
18195
18222
|
},
|
|
18196
18223
|
{
|
|
18197
18224
|
name: "view",
|
|
18198
18225
|
title: "View labsUI items",
|
|
18199
|
-
description: "
|
|
18226
|
+
description: "Read the docs of labsUI items by name: exact props and types, a usage line, full examples, and the items and npm packages each brings along. Call it before writing code with a component instead of guessing props; find names with search, install with add.",
|
|
18200
18227
|
inputSchema: {
|
|
18201
18228
|
type: "object",
|
|
18202
18229
|
properties: {
|
|
@@ -18205,78 +18232,60 @@ var TOOLS = [
|
|
|
18205
18232
|
},
|
|
18206
18233
|
required: ["names"]
|
|
18207
18234
|
},
|
|
18208
|
-
annotations:
|
|
18235
|
+
annotations: readOnly
|
|
18209
18236
|
},
|
|
18210
18237
|
{
|
|
18211
18238
|
name: "add",
|
|
18212
18239
|
title: "Add labsUI items",
|
|
18213
|
-
description: "
|
|
18240
|
+
description: "Install labsUI items into the project: copies each item and everything it imports, then installs their npm packages. Existing files are kept, never overwritten. Returns the files written, the packages installed and anything to mount once in the root layout. Needs init first; dryRun previews. To bring installed items to a newer version, use update instead.",
|
|
18214
18241
|
inputSchema: {
|
|
18215
18242
|
type: "object",
|
|
18216
|
-
properties: {
|
|
18217
|
-
names,
|
|
18218
|
-
dryRun: { type: "boolean", default: false, description: "Report, write nothing." }
|
|
18219
|
-
},
|
|
18243
|
+
properties: { names, dryRun },
|
|
18220
18244
|
required: ["names"]
|
|
18221
18245
|
},
|
|
18222
|
-
annotations:
|
|
18223
|
-
readOnlyHint: false,
|
|
18224
|
-
destructiveHint: false,
|
|
18225
|
-
idempotentHint: true,
|
|
18226
|
-
openWorldHint: true
|
|
18227
|
-
}
|
|
18246
|
+
annotations: writes
|
|
18228
18247
|
},
|
|
18229
18248
|
{
|
|
18230
18249
|
name: "init",
|
|
18231
18250
|
title: "Set up labsUI",
|
|
18232
|
-
description: "
|
|
18251
|
+
description: "Set up labsUI in a project, once, before add: writes the styles, theme, utils and motion provider, imports labsui.css into the Tailwind stylesheet and records settings in labsui.json. Returns warnings, the files written and the root layout code to add. Needs React 19 and Tailwind v4; run doctor first if unsure. Safe to repeat: existing files are kept. dryRun previews.",
|
|
18233
18252
|
inputSchema: {
|
|
18234
18253
|
type: "object",
|
|
18235
|
-
properties: { dryRun
|
|
18254
|
+
properties: { dryRun }
|
|
18236
18255
|
},
|
|
18237
|
-
annotations:
|
|
18238
|
-
readOnlyHint: false,
|
|
18239
|
-
destructiveHint: false,
|
|
18240
|
-
idempotentHint: true,
|
|
18241
|
-
openWorldHint: true
|
|
18242
|
-
}
|
|
18256
|
+
annotations: writes
|
|
18243
18257
|
},
|
|
18244
18258
|
{
|
|
18245
18259
|
name: "diff",
|
|
18246
18260
|
title: "Diff installed labsUI items",
|
|
18247
|
-
description: "
|
|
18261
|
+
description: "Compare installed labsUI items with this labsUI version. Returns a unified patch per changed file, from the registry file to the project file (+ lines exist only in the project); matching items are left out, and when nothing differs it says so. Use it to see local edits before update. Needs init.",
|
|
18248
18262
|
inputSchema: {
|
|
18249
18263
|
type: "object",
|
|
18250
|
-
properties: { names:
|
|
18264
|
+
properties: { names: installed }
|
|
18251
18265
|
},
|
|
18252
|
-
annotations:
|
|
18266
|
+
annotations: readOnly
|
|
18253
18267
|
},
|
|
18254
18268
|
{
|
|
18255
18269
|
name: "update",
|
|
18256
18270
|
title: "Update labsUI items",
|
|
18257
|
-
description: "Bring installed items to this
|
|
18271
|
+
description: "Bring installed labsUI items to this labsUI version. Unedited files are replaced; edited ones are merged three ways from the version that installed them, with conflict markers where both sides changed the same lines. Returns each changed item as replaced, merged, conflicts (with the files to resolve) or kept with the reason. Run diff first to see local edits; dryRun previews. Only for installed items: new ones go through add.",
|
|
18258
18272
|
inputSchema: {
|
|
18259
18273
|
type: "object",
|
|
18260
|
-
properties: {
|
|
18261
|
-
names: { ...names, minItems: 0 },
|
|
18262
|
-
dryRun: { type: "boolean", default: false, description: "Report, write nothing." }
|
|
18263
|
-
}
|
|
18274
|
+
properties: { names: installed, dryRun }
|
|
18264
18275
|
},
|
|
18265
|
-
annotations: {
|
|
18266
|
-
readOnlyHint: false,
|
|
18267
|
-
destructiveHint: true,
|
|
18268
|
-
idempotentHint: true,
|
|
18269
|
-
openWorldHint: true
|
|
18270
|
-
}
|
|
18276
|
+
annotations: { ...writes, destructiveHint: true }
|
|
18271
18277
|
},
|
|
18272
18278
|
{
|
|
18273
18279
|
name: "doctor",
|
|
18274
18280
|
title: "Check the labsUI setup",
|
|
18275
|
-
description: "
|
|
18281
|
+
description: "Check the labsUI setup: React 19, Tailwind v4, the path alias, the stylesheet import, MotionProvider and themeScript wiring, mounted Toaster/Confirmer, missing npm packages or files, and local edits. Returns pass, warn or fail per check, each problem with its fix. Run it after init or add, or when components look unstyled; for line-level changes use diff.",
|
|
18276
18282
|
inputSchema: { type: "object", properties: {} },
|
|
18277
|
-
annotations:
|
|
18283
|
+
annotations: readOnly
|
|
18278
18284
|
}
|
|
18279
18285
|
];
|
|
18286
|
+
|
|
18287
|
+
// src/mcp.ts
|
|
18288
|
+
var PROTOCOLS = ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"];
|
|
18280
18289
|
var text = (text, structured) => ({
|
|
18281
18290
|
content: [{ type: "text", text }],
|
|
18282
18291
|
...structured !== undefined && { structuredContent: structured }
|
package/package.json
CHANGED