@dereekb/dbx-components-mcp 13.13.0 → 13.14.0

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.
@@ -5,7 +5,7 @@ const require = __createRequire(import.meta.url);
5
5
  // packages/dbx-components-mcp/package.json
6
6
  var package_default = {
7
7
  name: "@dereekb/dbx-components-mcp",
8
- version: "13.13.0",
8
+ version: "13.14.0",
9
9
  type: "module",
10
10
  bin: {
11
11
  "dbx-components-mcp": "dbx-components-mcp.js"
@@ -16,8 +16,8 @@ var package_default = {
16
16
  "ts-morph": "^21.0.0"
17
17
  },
18
18
  peerDependencies: {
19
- "@dereekb/dbx-cli": "13.13.0",
20
- "@dereekb/util": "13.13.0"
19
+ "@dereekb/dbx-cli": "13.14.0",
20
+ "@dereekb/util": "13.14.0"
21
21
  }
22
22
  };
23
23
 
@@ -27661,6 +27661,7 @@ import { join as join5, relative as relative8, sep as sep6 } from "node:path";
27661
27661
  // packages/dbx-cli/manifest-extract/src/lib/extract-crud.ts
27662
27662
  import { Node as Node22, Project as Project6 } from "ts-morph";
27663
27663
  var SUPPORTED_VERBS = /* @__PURE__ */ new Set(["create", "read", "update", "delete", "query", "invoke"]);
27664
+ var DBX_MODEL_API_MCP_RESULT_MARKER = "dbxModelApiMcpResult";
27664
27665
  function extractCrudEntries(source) {
27665
27666
  const project = new Project6({ useInMemoryFileSystem: true, skipAddingFilesFromTsConfig: true });
27666
27667
  const sourceFile = project.createSourceFile(source.name, source.text, { overwrite: true });
@@ -27714,7 +27715,7 @@ function extractCrudEntries(source) {
27714
27715
  if (!verbValueNode) {
27715
27716
  continue;
27716
27717
  }
27717
- collectVerbEntries({ modelName, verb, valueNode: verbValueNode, entries, fallbackDescription: readJsDocSummary(verbMember), resolveTypeDocs });
27718
+ collectVerbEntries({ modelName, verb, valueNode: verbValueNode, entries, fallbackDescription: readJsDocSummary(verbMember), fallbackMcpResultTypeName: readJsDocTagValue(verbMember, DBX_MODEL_API_MCP_RESULT_MARKER), resolveTypeDocs });
27718
27719
  }
27719
27720
  }
27720
27721
  }
@@ -27733,6 +27734,8 @@ function extractCrudEntries(source) {
27733
27734
  const tuple = valueNode ? readTupleParamsResult(valueNode) : void 0;
27734
27735
  const paramsDocs = resolveTypeDocs(tuple?.params);
27735
27736
  const resultDocs = resolveTypeDocs(tuple?.result);
27737
+ const mcpResultTypeName = readJsDocTagValue(member, DBX_MODEL_API_MCP_RESULT_MARKER);
27738
+ const mcpResultDocs = resolveTypeDocs(mcpResultTypeName);
27736
27739
  entries.push({
27737
27740
  model: key,
27738
27741
  verb: "standalone",
@@ -27745,7 +27748,10 @@ function extractCrudEntries(source) {
27745
27748
  paramsFields: paramsDocs?.fields,
27746
27749
  paramsHasApiParamsTag: paramsDocs?.hasApiParamsTag,
27747
27750
  resultTypeDescription: resultDocs?.typeDescription,
27748
- resultFields: resultDocs?.fields
27751
+ resultFields: resultDocs?.fields,
27752
+ mcpResultTypeName,
27753
+ mcpResultTypeDescription: mcpResultDocs?.typeDescription,
27754
+ mcpResultFields: mcpResultDocs?.fields
27749
27755
  });
27750
27756
  }
27751
27757
  }
@@ -27813,7 +27819,7 @@ function isNullLiteralType2(node) {
27813
27819
  return result;
27814
27820
  }
27815
27821
  function collectVerbEntries(input) {
27816
- const { modelName, verb, valueNode, entries, fallbackDescription, resolveTypeDocs } = input;
27822
+ const { modelName, verb, valueNode, entries, fallbackDescription, fallbackMcpResultTypeName, resolveTypeDocs } = input;
27817
27823
  if (Node22.isTypeLiteral(valueNode)) {
27818
27824
  for (const specMember of valueNode.getMembers()) {
27819
27825
  if (!Node22.isPropertySignature(specMember)) {
@@ -27824,6 +27830,8 @@ function collectVerbEntries(input) {
27824
27830
  const leaf2 = leafNode ? readTupleParamsResult(leafNode) ?? readBareParams(leafNode) : void 0;
27825
27831
  const paramsDocs2 = resolveTypeDocs(leaf2?.params);
27826
27832
  const resultDocs2 = resolveTypeDocs(leaf2?.result);
27833
+ const mcpResultTypeName = readJsDocTagValue(specMember, DBX_MODEL_API_MCP_RESULT_MARKER);
27834
+ const mcpResultDocs2 = resolveTypeDocs(mcpResultTypeName);
27827
27835
  entries.push({
27828
27836
  model: modelName,
27829
27837
  verb,
@@ -27836,7 +27844,10 @@ function collectVerbEntries(input) {
27836
27844
  paramsFields: paramsDocs2?.fields,
27837
27845
  paramsHasApiParamsTag: paramsDocs2?.hasApiParamsTag,
27838
27846
  resultTypeDescription: resultDocs2?.typeDescription,
27839
- resultFields: resultDocs2?.fields
27847
+ resultFields: resultDocs2?.fields,
27848
+ mcpResultTypeName,
27849
+ mcpResultTypeDescription: mcpResultDocs2?.typeDescription,
27850
+ mcpResultFields: mcpResultDocs2?.fields
27840
27851
  });
27841
27852
  }
27842
27853
  return;
@@ -27844,6 +27855,7 @@ function collectVerbEntries(input) {
27844
27855
  const leaf = readTupleParamsResult(valueNode) ?? readBareParams(valueNode);
27845
27856
  const paramsDocs = resolveTypeDocs(leaf?.params);
27846
27857
  const resultDocs = resolveTypeDocs(leaf?.result);
27858
+ const mcpResultDocs = resolveTypeDocs(fallbackMcpResultTypeName);
27847
27859
  entries.push({
27848
27860
  model: modelName,
27849
27861
  verb,
@@ -27856,7 +27868,10 @@ function collectVerbEntries(input) {
27856
27868
  paramsFields: paramsDocs?.fields,
27857
27869
  paramsHasApiParamsTag: paramsDocs?.hasApiParamsTag,
27858
27870
  resultTypeDescription: resultDocs?.typeDescription,
27859
- resultFields: resultDocs?.fields
27871
+ resultFields: resultDocs?.fields,
27872
+ mcpResultTypeName: fallbackMcpResultTypeName,
27873
+ mcpResultTypeDescription: mcpResultDocs?.typeDescription,
27874
+ mcpResultFields: mcpResultDocs?.fields
27860
27875
  });
27861
27876
  }
27862
27877
  function readTupleParamsResult(node) {
@@ -27935,6 +27950,20 @@ function hasJsDocFlag(node, tagName) {
27935
27950
  }
27936
27951
  return result;
27937
27952
  }
27953
+ function readJsDocTagValue(node, tagName) {
27954
+ let result;
27955
+ for (const doc of node.getJsDocs()) {
27956
+ for (const tag of doc.getTags()) {
27957
+ if (tag.getTagName() === tagName) {
27958
+ const token = tag.getCommentText()?.trim().split(/\s+/)[0];
27959
+ if (token) {
27960
+ result = token;
27961
+ }
27962
+ }
27963
+ }
27964
+ }
27965
+ return result;
27966
+ }
27938
27967
  function readJsDocSummary(node) {
27939
27968
  let result;
27940
27969
  const docs = node.getJsDocs();
@@ -403,7 +403,7 @@
403
403
  "source": "@dereekb/dbx-web",
404
404
  "module": "@dereekb/dbx-web",
405
405
  "file": "src/lib/button/_button.scss",
406
- "line": 144,
406
+ "line": 177,
407
407
  "declarations": [
408
408
  {
409
409
  "property": "display",
@@ -470,6 +470,28 @@
470
470
  "--mat-button-tonal-container-height"
471
471
  ]
472
472
  },
473
+ {
474
+ "slug": "button-icon-tile",
475
+ "selector": ".dbx-button-icon-tile",
476
+ "source": "@dereekb/dbx-web",
477
+ "module": "@dereekb/dbx-web",
478
+ "file": "src/lib/button/_button.scss",
479
+ "line": 106,
480
+ "declarations": [],
481
+ "role": "layout",
482
+ "intent": "turn a `<dbx-button>` that wraps a `<dbx-icon-tile>` into a clickable tile — strips the button's padding/min-width so it hugs the tile, adopts the tile's `--dbx-icon-tile-border-radius`, and lifts a neutralized (`--mat-sys-on-surface`) state layer above the tile so hover/press/ripple reads on every color variant (including opaque full-color and primary-tonal tiles)",
483
+ "seeAlso": [
484
+ "icon-tile",
485
+ "button-neutral-interaction-color"
486
+ ],
487
+ "antiUse": "don't apply to a `<dbx-button>` with no inner `<dbx-icon-tile>` — there is no tile surface to shape the button to or to overlay",
488
+ "tokensRead": [
489
+ "--dbx-icon-tile-border-radius",
490
+ "--mat-button-text-container-shape",
491
+ "--mat-sys-corner-full",
492
+ "--mat-sys-on-surface"
493
+ ]
494
+ },
473
495
  {
474
496
  "slug": "button-neutral-interaction-color",
475
497
  "selector": ".dbx-button-neutral-interaction-color",
@@ -490,7 +512,7 @@
490
512
  "source": "@dereekb/dbx-web",
491
513
  "module": "@dereekb/dbx-web",
492
514
  "file": "src/lib/button/_button.scss",
493
- "line": 132,
515
+ "line": 165,
494
516
  "declarations": [
495
517
  {
496
518
  "property": "padding-right",
@@ -553,6 +575,50 @@
553
575
  "--dbx-padding-3"
554
576
  ]
555
577
  },
578
+ {
579
+ "slug": "card-select",
580
+ "selector": ".dbx-card-select",
581
+ "source": "@dereekb/dbx-web",
582
+ "module": "@dereekb/dbx-web",
583
+ "file": "src/lib/layout/card/_card.scss",
584
+ "line": 48,
585
+ "declarations": [
586
+ {
587
+ "property": "position",
588
+ "value": "relative"
589
+ },
590
+ {
591
+ "property": "cursor",
592
+ "value": "pointer"
593
+ },
594
+ {
595
+ "property": "text-align",
596
+ "value": "center"
597
+ },
598
+ {
599
+ "property": "height",
600
+ "value": "100%"
601
+ }
602
+ ],
603
+ "role": "layout",
604
+ "intent": "selectable \"choice\" `<mat-card appearance=\"outlined\">` whose content is centered in a column (large `<mat-icon>`, title, subtitle). Pair with `[dbxColor]` + `[dbxColorTone]` and toggle the `.dbx-card-selected` modifier to paint the selected border to match the tonal wash. Put the large glyph in a `.dbx-card-select-icon` `<mat-icon>` and an optional round selected checkmark in a `.dbx-card-select-check` `<dbx-icon-tile [round]>` (absolutely positioned top-right). Fills its parent's height (`height: 100%`) so a row of cards laid out with `dbxFlexGroup` + `[dbxFlexSize]` stays equal-height as it shrinks and wraps.",
605
+ "seeAlso": [
606
+ "color",
607
+ "color-tonal",
608
+ "icon-tile",
609
+ "card-banner",
610
+ "flex-group",
611
+ "flex-size"
612
+ ],
613
+ "tokensRead": [
614
+ "--dbx-bg-color-current",
615
+ "--dbx-card-select-icon-size",
616
+ "--dbx-padding-2",
617
+ "--dbx-padding-3",
618
+ "--mat-sys-on-surface",
619
+ "--mat-sys-surface"
620
+ ]
621
+ },
556
622
  {
557
623
  "slug": "chip",
558
624
  "selector": ".dbx-chip",
@@ -1315,7 +1381,7 @@
1315
1381
  "source": "@dereekb/dbx-web",
1316
1382
  "module": "@dereekb/dbx-web",
1317
1383
  "file": "src/lib/button/_button.scss",
1318
- "line": 120,
1384
+ "line": 153,
1319
1385
  "declarations": [
1320
1386
  {
1321
1387
  "property": "width",
@@ -41,6 +41,29 @@
41
41
  }
42
42
  ]
43
43
  },
44
+ {
45
+ "slug": "card-feedback-selection",
46
+ "category": "card",
47
+ "summary": "Single-select row of centered `.dbx-card-select` choice cards laid out with `dbxFlexGroup` + equal-width `[dbxFlexSize]` columns (equal-size as the screen shrinks, stacking below the `small` breakpoint). The selected `<mat-card appearance=\"outlined\">` gets a tonal `[dbxColor]` wash, a matching themed border, and a round `<dbx-icon-tile [round]>` checkmark badge in the top-right; unselected cards stay neutral. Large glyphs are plain `<mat-icon>` that inherit the card's flipped text color.",
48
+ "header": "Feedback Selection Cards",
49
+ "className": "DocFeedbackSelectionCardExampleComponent",
50
+ "selector": "doc-feedback-selection-card-example",
51
+ "module": "apps/demo",
52
+ "appRef": "apps/demo",
53
+ "hint": "Single-select row of equal-size centered choice cards (dbxFlexGroup) — the selected card gets a tonal [dbxColor] wash, a matching themed border, and a round checkmark badge.",
54
+ "relatedSlugs": [
55
+ "mat-card",
56
+ "dbx-card-select",
57
+ "dbx-icon-tile",
58
+ "dbx-color",
59
+ "dbx-chip",
60
+ "dbx-flex-group",
61
+ "dbx-flex-size"
62
+ ],
63
+ "info": "<p>\n A \"selection\" / \"choice\" card lets the user pick exactly one option from a small set, with the chosen card emphasised. Each option is a stock\n <code>&lt;mat-card appearance=\"outlined\"&gt;</code>\n carrying the\n <code>.dbx-card-select</code>\n utility, which centers the card body in a column (a large\n <code>&lt;mat-icon&gt;</code>\n , a title, and a subtitle) and exposes a top-right slot for a checkmark badge via a\n <code>.dbx-card-select-check</code>\n child.\n</p>\n<p>\n Selection is a single-select\n <code>signal</code>\n . The selected card receives\n <code>[dbxColor]</code>\n +\n <code>[dbxColorTone]=\"16\"</code>\n , so the existing\n <code>mat-card.dbx-color</code>\n /\n <code>.dbx-color-tonal</code>\n rules paint the tonal background wash and flip the card text to the vibrant theme color — which the centered\n <code>&lt;mat-icon&gt;</code>\n (rendered in\n <code>currentColor</code>\n ) and the title inherit for free. The\n <code>.dbx-card-selected</code>\n modifier repaints the outlined-card border to that same\n <code>--dbx-bg-color-current</code>\n value, so the border matches the wash without any hard-coded colour.\n</p>\n<p>\n The round checkmark is a\n <code>&lt;dbx-icon-tile [round]&gt;</code>\n carrying its own\n <code>[dbxColor]</code>\n (no tone), so it renders as a solid vibrant circle with a contrast-colour check. The unselected card omits\n <code>[dbxColor]</code>\n entirely, so it keeps the neutral outline + on-surface text. Each choice carries its own semantic\n <code>color</code>\n (a positive\n <code>'primary'</code>\n , a destructive\n <code>'warn'</code>\n , and a\n <code>'notice'</code>\n review), so the emphasis colour follows the meaning of the option.\n</p>\n<p>\n The options sit in a\n <code>dbxFlexGroup</code>\n row, each an equal-width\n <code>[dbxFlexSize]=\"2\"</code>\n column, so the cards stay the same size and shrink in unison as the viewport narrows — and\n <code>.dbx-card-select</code>\n fills its column height (\n <code>height: 100%</code>\n ) so they stay equal-height even if one subtitle wraps. Below the\n <code>small</code>\n breakpoint,\n <code>[breakToColumn]</code>\n stacks them into a single column.\n</p>",
64
+ "snippet": "<div class=\"dbx-flex-bar dbx-mb3\">\n <span class=\"dbx-text-label-medium dbx-uppercase dbx-tracked-wide dbx-icon-spacer\">Feedback</span>\n <dbx-chip [small]=\"true\" color=\"notice\">Required</dbx-chip>\n</div>\n<div dbxFlexGroup breakpoint=\"small\" [breakToColumn]=\"true\">\n @for (choice of choices; track choice.key) {\n <div [dbxFlexSize]=\"2\">\n <mat-card appearance=\"outlined\" class=\"dbx-card-select\" role=\"button\" [class.dbx-card-selected]=\"isSelected(choice.key)\" [attr.aria-pressed]=\"isSelected(choice.key)\" [dbxColor]=\"isSelected(choice.key) ? choice.color : null\" [dbxColorTone]=\"isSelected(choice.key) ? 16 : null\" (click)=\"select(choice.key)\">\n <mat-card-content>\n @if (isSelected(choice.key)) {\n <dbx-icon-tile class=\"dbx-card-select-check\" icon=\"check\" [round]=\"true\" [dbxColor]=\"choice.color\"></dbx-icon-tile>\n }\n <mat-icon class=\"dbx-card-select-icon\">{{ choice.icon }}</mat-icon>\n <div class=\"dbx-text-title-medium\">{{ choice.title }}</div>\n <div class=\"dbx-note\">{{ choice.subtitle }}</div>\n </mat-card-content>\n </mat-card>\n </div>\n }\n</div>",
65
+ "uses": []
66
+ },
44
67
  {
45
68
  "slug": "card-hero-onboarding-progress",
46
69
  "category": "card",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-components-mcp",
3
- "version": "13.13.0",
3
+ "version": "13.14.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "dbx-components-mcp": "dbx-components-mcp.js"
@@ -11,7 +11,7 @@
11
11
  "ts-morph": "^21.0.0"
12
12
  },
13
13
  "peerDependencies": {
14
- "@dereekb/dbx-cli": "13.13.0",
15
- "@dereekb/util": "13.13.0"
14
+ "@dereekb/dbx-cli": "13.14.0",
15
+ "@dereekb/util": "13.14.0"
16
16
  }
17
17
  }