@pyreon/mcp 0.7.6 → 0.7.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/mcp",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "description": "MCP server for Pyreon — AI-powered framework assistance",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,7 +42,7 @@
42
42
  "prepublishOnly": "bun run build"
43
43
  },
44
44
  "dependencies": {
45
- "@pyreon/compiler": "^0.7.6",
45
+ "@pyreon/compiler": "^0.7.8",
46
46
  "@modelcontextprotocol/sdk": "^1.27.1",
47
47
  "zod": "^3.25.76"
48
48
  },
@@ -137,6 +137,19 @@ store.items.push(4) // only items subscribers fire`,
137
137
  "Integrates with Suspense. Access .loading(), .error(), and call resource() for the value.",
138
138
  },
139
139
 
140
+ "reactivity/untrack": {
141
+ signature: "untrack<T>(fn: () => T): T",
142
+ example: `import { untrack } from "@pyreon/reactivity"
143
+
144
+ // Read signals without subscribing:
145
+ effect(() => {
146
+ const name = untrack(() => userName())
147
+ console.log("Count changed:", count(), "user is", name)
148
+ })`,
149
+ notes:
150
+ "Alias for runUntracked. Reads signals inside fn without adding them as dependencies of the current effect/computed.",
151
+ },
152
+
140
153
  // ═══════════════════════════════════════════════════════════════════════════
141
154
  // @pyreon/core
142
155
  // ═══════════════════════════════════════════════════════════════════════════
@@ -306,6 +319,67 @@ const current = signal("home")
306
319
  </ErrorBoundary>`,
307
320
  },
308
321
 
322
+ "core/cx": {
323
+ signature: "cx(...values: ClassValue[]): string",
324
+ example: `import { cx } from "@pyreon/core"
325
+
326
+ cx("foo", "bar") // "foo bar"
327
+ cx("base", isActive && "active") // conditional
328
+ cx({ base: true, active: isActive() }) // object syntax
329
+ cx(["a", ["b", { c: true }]]) // nested arrays
330
+
331
+ // class prop accepts ClassValue directly:
332
+ <div class={["base", cond && "active"]} />
333
+ <div class={{ base: true, active: isActive() }} />`,
334
+ notes:
335
+ "Combines class values into a single string. Accepts strings, booleans, objects, arrays (nested). Falsy values are ignored. ClassValue type is also exported from @pyreon/core.",
336
+ mistakes: `- \`class={cx(...)}\` works but is redundant — class prop already accepts ClassValue
337
+ - \`class={condition ? "a" : undefined}\` → Use \`class={[condition && "a"]}\` or \`class={{ a: condition }}\``,
338
+ },
339
+
340
+ "core/splitProps": {
341
+ signature: "splitProps<T, K extends keyof T>(props: T, keys: K[]): [Pick<T, K>, Omit<T, K>]",
342
+ example: `import { splitProps } from "@pyreon/core"
343
+
344
+ const Button = (props: { class?: string; onClick: () => void; children: VNodeChild }) => {
345
+ const [local, rest] = splitProps(props, ["class"])
346
+ return <button {...rest} class={cx("btn", local.class)} />
347
+ }`,
348
+ notes:
349
+ "Splits a props object into two: picked keys and the rest. Preserves signal reactivity on both halves.",
350
+ mistakes: `- Destructuring props directly breaks reactivity — use splitProps instead
351
+ - \`const { class: cls, ...rest } = props\` → \`const [local, rest] = splitProps(props, ["class"])\``,
352
+ },
353
+
354
+ "core/mergeProps": {
355
+ signature: "mergeProps<T extends object[]>(...sources: T): MergedProps<T>",
356
+ example: `import { mergeProps } from "@pyreon/core"
357
+
358
+ const Button = (props: { size?: string; variant?: string }) => {
359
+ const merged = mergeProps({ size: "md", variant: "primary" }, props)
360
+ return <button class={\`btn-\${merged.size} btn-\${merged.variant}\`} />
361
+ }`,
362
+ notes:
363
+ "Merges multiple props objects. Last source wins for each key. Preserves reactivity — reads are lazy.",
364
+ },
365
+
366
+ "core/createUniqueId": {
367
+ signature: "createUniqueId(): string",
368
+ example: `import { createUniqueId } from "@pyreon/core"
369
+
370
+ const LabeledInput = (props: { label: string }) => {
371
+ const id = createUniqueId()
372
+ return (
373
+ <>
374
+ <label for={id}>{props.label}</label>
375
+ <input id={id} />
376
+ </>
377
+ )
378
+ }`,
379
+ notes:
380
+ 'Returns a unique string ID ("pyreon-1", "pyreon-2", etc.). SSR-safe — IDs are consistent between server and client when called in the same order.',
381
+ },
382
+
309
383
  // ═══════════════════════════════════════════════════════════════════════════
310
384
  // @pyreon/router
311
385
  // ═══════════════════════════════════════════════════════════════════════════