@godxjp/ui-mcp 17.0.0 → 17.0.1

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 CHANGED
@@ -1926,7 +1926,9 @@ import { Smartphone } from "lucide-react";
1926
1926
  "DON'T: wrap DataState in your own conditional \u2014 e.g. `{query.isSuccess && <DataState \u2026>}`. DataState IS the conditional; the outer guard is redundant and breaks the retry/refetch skeleton.",
1927
1927
  "DON'T: use DataState for `useInfiniteQuery` results. The `query` prop type is `UseQueryResult<T>`, not `UseInfiniteQueryResult`. Use `InfiniteQueryState` (from `@godxjp/ui/query`) instead, which accepts `flatten` and renders a load-more footer.",
1928
1928
  "DO: classify errors by cause. Use session renewal/sign-in for 401, access guidance for 403, contextual correction for domain errors, and opt into showRetry only for transient network/5xx errors.",
1929
- "DO: pass prerequisite for enabled:false queries. Pending + fetchStatus idle is unstarted, not loading, and never renders a skeleton."
1929
+ "DO: pass prerequisite for enabled:false queries. Pending + fetchStatus idle is unstarted, not loading, and never renders a skeleton.",
1930
+ "DO: rely on the localized, cause-specific error message \u2014 the raw backend/token/stack text is never shown. For a domain-specific message (e.g. a 422 field error) pass a custom errorRenderer.",
1931
+ "DO: expect a background refetch over existing data to keep the content on screen with a polite sr-only busy status \u2014 it does not flash the skeleton. Only the initial fetch (isPending) shows the skeleton."
1930
1932
  ],
1931
1933
  useCases: [
1932
1934
  "A detail page that loads a single invoice/journal entry via `useQuery` \u2014 DataState renders the skeleton row while fetching, an error alert with retry if the API fails, and the `<InvoiceCard>` only when data is confirmed non-null.",
@@ -1947,12 +1949,7 @@ import { Smartphone } from "lucide-react";
1947
1949
  {(d) => <MemberTable items={d.items} />}
1948
1950
  </DataState>`,
1949
1951
  storyPath: "query/DataState.stories.tsx",
1950
- rules: [
1951
- "Errors are classified by cause (via classifyQueryError). Retry is offered ONLY for transient/network/5xx; a 401/expired-token routes to session renewal through onAuthError; 403/404/422 present a cause-aware message with no blind retry.",
1952
- "The user-facing detail is a localized, cause-specific message \u2014 the raw backend/token/stack text is never shown. For a domain-specific message (e.g. a 422 field error) pass a custom errorRenderer.",
1953
- "A disabled/unstarted query (enabled:false \u2192 isPending with fetchStatus 'idle') renders the prerequisite slot, never the skeleton. Always pass prerequisite for tenant/org-gated queries.",
1954
- "A background refetch over existing data keeps the content on screen with a polite sr-only busy status \u2014 it does not flash the skeleton. Only the initial fetch (isPending) shows the skeleton."
1955
- ]
1952
+ rules: []
1956
1953
  },
1957
1954
  {
1958
1955
  name: "InfiniteQueryState",
@@ -7893,7 +7890,7 @@ var TOKENS = [
7893
7890
  name: "--duration-{fast,base,slow}",
7894
7891
  category: "primitive",
7895
7892
  tier: "primitive",
7896
- role: "Motion durations (150 / 250 / 500ms). Read these instead of a literal `0.5s` for enter/transition timing (rule #2). dxs-kintai keeps motion short; honour `prefers-reduced-motion` at the call site."
7893
+ role: "Motion durations (150 / 250 / 500ms). Read these instead of a literal `0.5s` for enter/transition timing (rule #2). the reference design keeps motion short; honour `prefers-reduced-motion` at the call site."
7897
7894
  },
7898
7895
  {
7899
7896
  name: "--ease-{standard,emphasized,decelerate,accelerate}",
@@ -8119,7 +8116,7 @@ var COMPONENT_TOKENS = [
8119
8116
  {
8120
8117
  "name": "--card-shadow",
8121
8118
  "value": "0 0 0 0 transparent",
8122
- "description": "Resting elevation \u2014 quiet by default (rule #44): cards are flat (1px border, no shadow) in the * dxs-kintai baseline. A service that wants lifted cards sets this to an elevation token once, * e.g. --card-shadow: var(--shadow-sm), and every Card picks up the shadow with no markup change."
8119
+ "description": "Resting elevation \u2014 quiet by default (rule #44): cards are flat (1px border, no shadow) in the * reference-design baseline. A service that wants lifted cards sets this to an elevation token once, * e.g. --card-shadow: var(--shadow-sm), and every Card picks up the shadow with no markup change."
8123
8120
  },
8124
8121
  {
8125
8122
  "name": "--card-glow",
@@ -9118,7 +9115,7 @@ var CARDINAL_RULES = [
9118
9115
  {
9119
9116
  number: 11,
9120
9117
  title: "Submodule discipline",
9121
- body: "Two-PR workflow: (1) submodule PR \u2192 `main`, (2) umbrella PR \u2192 bump pin. Never push a pin to a SHA not on the submodule remote."
9118
+ body: "Two-PR workflow: (1) submodule PR \u2192 `main`, (2) downstream PR \u2192 bump pin. Never push a pin to a SHA not on the submodule remote."
9122
9119
  },
9123
9120
  {
9124
9121
  number: 12,
@@ -10482,8 +10479,8 @@ rule (get_rule) involved, with a minimal repro, expected vs actual, version, and
10482
10479
  id: "design-to-page",
10483
10480
  audience: "consumer",
10484
10481
  name: "Design handoff \u2192 real page (consumer build guide)",
10485
- whenToUse: "You (a consumer agent) received a Claude Design handoff \u2014 a bundle/mock/screenshot/HTML prototype or a written brief \u2014 and must build it as a REAL page with @godxjp/ui. Read this BEFORE writing any JSX. It teaches: read intent, map every block to a real primitive via this MCP, consume existing tokens, apply the dxs-kintai DNA, treat tables as the centerpiece, resolve gaps by extend-or-ask, and verify.",
10486
- source: "@godxjp/ui .design/research (chats-intent, tables, atomic-components) + dxs-kintai SKILL/colors_and_type.css",
10482
+ whenToUse: "You (a consumer agent) received a Claude Design handoff \u2014 a bundle/mock/screenshot/HTML prototype or a written brief \u2014 and must build it as a REAL page with @godxjp/ui. Read this BEFORE writing any JSX. It teaches: read intent, map every block to a real primitive via this MCP, consume existing tokens, apply the reference-design DNA, treat tables as the centerpiece, resolve gaps by extend-or-ask, and verify.",
10483
+ source: "@godxjp/ui .design/research (chats-intent, tables, atomic-components) + reference-design SKILL/colors_and_type.css",
10487
10484
  sections: [
10488
10485
  {
10489
10486
  id: "read-intent",
@@ -10532,7 +10529,7 @@ never a literal px. Radii: card 6px, control 4px, inner pill 2px.`
10532
10529
  },
10533
10530
  {
10534
10531
  id: "dna",
10535
- title: "Apply the dxs-kintai DNA",
10532
+ title: "Apply the reference-design DNA",
10536
10533
  tagline: "\u6E0B\u307F / \u9593 / \u7C21\u7D20 \u2014 fixed color signaling, dense, small headings, 14/1.7, no emoji.",
10537
10534
  body: `These rules survive when you drop the prototype's divs:
10538
10535
  \u2022 \u6E0B\u307F (restraint): primary chroma \u2264 0.18 \u2014 --primary is the single most-important
@@ -10638,7 +10635,7 @@ just buries a library bug inside every app). Instead:
10638
10635
  audience: "consumer",
10639
10636
  name: "Compose a screen \u2014 primitives \u2192 a finished app view (consumer)",
10640
10637
  whenToUse: "You (a consumer agent) are building a NEW screen/page in an app that imports @godxjp/ui \u2014 from a written brief or product requirement, not a design handoff. Read this to assemble it from real primitives via this MCP: pick the right components, lay out one-intent-per-screen, wire every state + a11y + i18n, and verify. For a Claude Design handoff bundle/mock specifically, use design-to-page instead.",
10641
- source: "@godxjp/ui MCP (consumer surface) \u2014 taste/one-intent + component-discipline + dxs-kintai DNA",
10638
+ source: "@godxjp/ui MCP (consumer surface) \u2014 taste/one-intent + component-discipline + reference-design DNA",
10642
10639
  sections: [
10643
10640
  {
10644
10641
  id: "pick-primitives",
@@ -11037,7 +11034,7 @@ function routeTask(task, opts) {
11037
11034
  ],
11038
11035
  "design-to-page",
11039
11036
  "map-to-primitives",
11040
- "Map every block to a real @godxjp/ui primitive (MCP-first), consume existing tokens, apply the dxs-kintai DNA, tables central, gaps \u2192 extend-or-ask, verify.",
11037
+ "Map every block to a real @godxjp/ui primitive (MCP-first), consume existing tokens, apply the reference-design DNA, tables central, gaps \u2192 extend-or-ask, verify.",
11041
11038
  ["design-to-page/read-intent", "design-to-page/dna", "design-to-page/tables-central"]
11042
11039
  );
11043
11040
  route(
@@ -12004,12 +12001,12 @@ var AUDIT_RULES = [
12004
12001
  standard: "W3C CSS Logical Properties L1 \xB7 WCAG 2.2 (1.3.2)",
12005
12002
  fix: "Use logical utilities (ms-/me-/ps-/pe-, start-/end-, text-start/end, border-s/e, rounded-s/e)."
12006
12003
  },
12007
- // ── copy (dxs-kintai DNA) ────────────────────────────────────────────────
12004
+ // ── copy (reference-design DNA) ──────────────────────────────────────────
12008
12005
  {
12009
12006
  id: "no-em-dash-in-copy",
12010
12007
  severity: "warn",
12011
12008
  category: "copy",
12012
- standard: "@godxjp/ui dxs-kintai typography",
12009
+ standard: "@godxjp/ui reference-design typography",
12013
12010
  fix: "No em-dash (\u2014) in copy; use a middot \xB7 or two calm sentences."
12014
12011
  }
12015
12012
  ];
@@ -12038,7 +12035,7 @@ var VISUAL_RULES = [
12038
12035
  id: "oversaturated-accent",
12039
12036
  severity: "warn",
12040
12037
  category: "color",
12041
- standard: "@godxjp/ui dxs-kintai \u6E0B\u307F (OKLCH chroma \u2264 0.18)",
12038
+ standard: "@godxjp/ui reference-design \u6E0B\u307F (OKLCH chroma \u2264 0.18)",
12042
12039
  fix: "Desaturate brand/primary surfaces (OKLCH chroma \u2264 0.18); read --primary tokens, no raw vivid bars."
12043
12040
  },
12044
12041
  {
@@ -12063,7 +12060,7 @@ function visualRulesByCategory(category) {
12063
12060
  // package.json
12064
12061
  var package_default = {
12065
12062
  name: "@godxjp/ui-mcp",
12066
- version: "17.0.0",
12063
+ version: "17.0.1",
12067
12064
  godxUiCompatibility: "17.0.x",
12068
12065
  description: "Model Context Protocol server for @godxjp/ui \u2014 gives Claude Code / Codex CLI / Cursor / any MCP-aware agent live access to the component catalog, prop vocabulary, design tokens, 45 cardinal rules, copy-paste-ready patterns, 12 design / taste skills synthesised from Leonxlnx/taste-skill, 20+ anti-AI-tell patterns, and a 50-check redesign audit \u2014 token-efficient (list \u2192 drill-down).",
12069
12066
  type: "module",