@kznlabs/labsui 0.1.4 → 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.
Files changed (2) hide show
  1. package/dist/index.js +28 -34
  2. 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.4",
17287
+ version: "0.1.5",
17288
17288
  license: "MIT",
17289
17289
  exports: "./src/index.ts",
17290
17290
  publish: {
@@ -18170,8 +18170,7 @@ 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/mcp.ts
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-]*$" },
@@ -18182,18 +18181,25 @@ var names = {
18182
18181
  var installed = {
18183
18182
  ...names,
18184
18183
  minItems: 0,
18185
- description: "Installed item names, e.g. button. Empty: every installed item."
18184
+ description: "Installed item names, e.g. button. Empty: all installed items."
18186
18185
  };
18187
18186
  var dryRun = {
18188
18187
  type: "boolean",
18189
18188
  default: false,
18190
18189
  description: "Report what would change, write nothing."
18191
18190
  };
18191
+ var readOnly = { readOnlyHint: true, openWorldHint: false };
18192
+ var writes = {
18193
+ readOnlyHint: false,
18194
+ destructiveHint: false,
18195
+ idempotentHint: true,
18196
+ openWorldHint: true
18197
+ };
18192
18198
  var TOOLS = [
18193
18199
  {
18194
18200
  name: "search",
18195
18201
  title: "Search labsUI",
18196
- description: "Find components, blocks, hooks and helpers by name, export (useModal) or intent (date range, toast promise). All words must match; best first. No query lists everything.",
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.",
18197
18203
  inputSchema: {
18198
18204
  type: "object",
18199
18205
  properties: {
@@ -18201,7 +18207,7 @@ var TOOLS = [
18201
18207
  kind: {
18202
18208
  type: "string",
18203
18209
  enum: ["component", "block", "hook", "helper", "setup"],
18204
- description: "Only items of this kind."
18210
+ description: "Only this kind: component (primitive), block (composed section), hook, helper or setup."
18205
18211
  },
18206
18212
  limit: {
18207
18213
  type: "integer",
@@ -18212,12 +18218,12 @@ var TOOLS = [
18212
18218
  }
18213
18219
  }
18214
18220
  },
18215
- annotations: { readOnlyHint: true, openWorldHint: false }
18221
+ annotations: readOnly
18216
18222
  },
18217
18223
  {
18218
18224
  name: "view",
18219
18225
  title: "View labsUI items",
18220
- description: "Exact props and types, a usage line, full examples, what it brings along and which npm packages it installs. Call before writing code with a component.",
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.",
18221
18227
  inputSchema: {
18222
18228
  type: "object",
18223
18229
  properties: {
@@ -18226,72 +18232,60 @@ var TOOLS = [
18226
18232
  },
18227
18233
  required: ["names"]
18228
18234
  },
18229
- annotations: { readOnlyHint: true, openWorldHint: false }
18235
+ annotations: readOnly
18230
18236
  },
18231
18237
  {
18232
18238
  name: "add",
18233
18239
  title: "Add labsUI items",
18234
- description: "Copy items and everything they import into the project and install their npm packages. Keeps files that already exist. Reports what to mount in the root layout.",
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.",
18235
18241
  inputSchema: {
18236
18242
  type: "object",
18237
18243
  properties: { names, dryRun },
18238
18244
  required: ["names"]
18239
18245
  },
18240
- annotations: {
18241
- readOnlyHint: false,
18242
- destructiveHint: false,
18243
- idempotentHint: true,
18244
- openWorldHint: true
18245
- }
18246
+ annotations: writes
18246
18247
  },
18247
18248
  {
18248
18249
  name: "init",
18249
18250
  title: "Set up labsUI",
18250
- description: "One-time setup: styles, theme, utils and motion provider; imports labsui.css into the Tailwind stylesheet and writes labsui.json. Returns the root layout code to add.",
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.",
18251
18252
  inputSchema: {
18252
18253
  type: "object",
18253
18254
  properties: { dryRun }
18254
18255
  },
18255
- annotations: {
18256
- readOnlyHint: false,
18257
- destructiveHint: false,
18258
- idempotentHint: true,
18259
- openWorldHint: true
18260
- }
18256
+ annotations: writes
18261
18257
  },
18262
18258
  {
18263
18259
  name: "diff",
18264
18260
  title: "Diff installed labsUI items",
18265
- description: "How installed items differ from this labsui version, as unified patches from the registry file to the project's. No names: every item that differs.",
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.",
18266
18262
  inputSchema: {
18267
18263
  type: "object",
18268
18264
  properties: { names: installed }
18269
18265
  },
18270
- annotations: { readOnlyHint: true, openWorldHint: false }
18266
+ annotations: readOnly
18271
18267
  },
18272
18268
  {
18273
18269
  name: "update",
18274
18270
  title: "Update labsUI items",
18275
- description: "Bring installed 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. No names: everything installed.",
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.",
18276
18272
  inputSchema: {
18277
18273
  type: "object",
18278
18274
  properties: { names: installed, dryRun }
18279
18275
  },
18280
- annotations: {
18281
- readOnlyHint: false,
18282
- destructiveHint: true,
18283
- idempotentHint: true,
18284
- openWorldHint: true
18285
- }
18276
+ annotations: { ...writes, destructiveHint: true }
18286
18277
  },
18287
18278
  {
18288
18279
  name: "doctor",
18289
18280
  title: "Check the labsUI setup",
18290
- description: "Checks 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. Each problem comes with its fix.",
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.",
18291
18282
  inputSchema: { type: "object", properties: {} },
18292
- annotations: { readOnlyHint: true, openWorldHint: false }
18283
+ annotations: readOnly
18293
18284
  }
18294
18285
  ];
18286
+
18287
+ // src/mcp.ts
18288
+ var PROTOCOLS = ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"];
18295
18289
  var text = (text, structured) => ({
18296
18290
  content: [{ type: "text", text }],
18297
18291
  ...structured !== undefined && { structuredContent: structured }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kznlabs/labsui",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Add labsUI components to your React + Tailwind v4 project: clean primitives you own, with smooth spring motion.",
5
5
  "type": "module",
6
6
  "mcpName": "io.github.kznlabs/labsui",