@fragments-sdk/context 0.4.2 → 0.4.3

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.
@@ -35,6 +35,19 @@ var CLI_COMMAND_CATEGORIES = {
35
35
  };
36
36
  var CLI_COMMANDS = [
37
37
  // ── Setup ──
38
+ {
39
+ name: "setup",
40
+ description: "Configure @fragments-sdk/ui in a consumer project (styles, providers, Next.js config)",
41
+ category: "setup",
42
+ usage: "fragments setup [options]",
43
+ options: [
44
+ { flags: "--root <dir>", description: "Project root directory" },
45
+ { flags: "-y, --yes", description: "Skip interactive prompts" },
46
+ { flags: "--brand <color>", description: "Brand color hex (e.g., #6366f1)" },
47
+ { flags: "--scss", description: "Create SCSS seed file for build-time theming" },
48
+ { flags: "--mcp", description: "Configure MCP server for AI tooling" }
49
+ ]
50
+ },
38
51
  {
39
52
  name: "init",
40
53
  description: "Initialize fragments in a project (interactive by default)",
@@ -288,6 +288,21 @@ var MCP_TOOL_DEFINITIONS = [
288
288
  }
289
289
  },
290
290
  required: ["component"]
291
+ },
292
+ {
293
+ key: "generate_ui",
294
+ description: "Generate a complete UI from a natural language description. Returns a structured element tree that can be rendered with Fragments components. Optionally pass an existing element tree to refine it.",
295
+ params: {
296
+ prompt: {
297
+ type: "string",
298
+ description: 'Natural language description of the UI to generate (e.g., "a settings page with profile section and notification preferences")'
299
+ },
300
+ currentTree: {
301
+ type: "object",
302
+ description: "Optional existing element tree to refine. When provided, the AI will modify this tree based on the prompt instead of generating from scratch."
303
+ }
304
+ },
305
+ required: ["prompt"]
291
306
  }
292
307
  ];
293
308
  var CLI_TOOL_EXTENSIONS = [
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CLI_COMMANDS,
3
3
  CLI_COMMAND_CATEGORIES
4
- } from "../chunk-U7P5372N.js";
4
+ } from "../chunk-BZ6SGVA2.js";
5
5
  export {
6
6
  CLI_COMMANDS,
7
7
  CLI_COMMAND_CATEGORIES
package/dist/index.js CHANGED
@@ -3,11 +3,11 @@ import {
3
3
  MCP_TOOL_DEFINITIONS,
4
4
  buildMcpTools,
5
5
  buildToolNames
6
- } from "./chunk-FGBRIJOT.js";
6
+ } from "./chunk-RTJ3JOPA.js";
7
7
  import {
8
8
  CLI_COMMANDS,
9
9
  CLI_COMMAND_CATEGORIES
10
- } from "./chunk-U7P5372N.js";
10
+ } from "./chunk-BZ6SGVA2.js";
11
11
  import {
12
12
  chunkByAST,
13
13
  chunkByLines,
@@ -3,7 +3,7 @@ import {
3
3
  MCP_TOOL_DEFINITIONS,
4
4
  buildMcpTools,
5
5
  buildToolNames
6
- } from "../chunk-FGBRIJOT.js";
6
+ } from "../chunk-RTJ3JOPA.js";
7
7
  export {
8
8
  CLI_TOOL_EXTENSIONS,
9
9
  MCP_TOOL_DEFINITIONS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fragments-sdk/context",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "license": "FSL-1.1-MIT",
5
5
  "description": "Code intelligence and RAG primitives for design system and codebase indexing",
6
6
  "author": "Conan McNicholl",