@godxjp/ui 31.17.1 → 31.19.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.
@@ -3,7 +3,7 @@
3
3
  You are about to write code against a design system you did not author. This file is the whole
4
4
  contract. Read it before you write JSX.
5
5
 
6
- **This catalog describes `@godxjp/ui` 31.17.1.** If the project you are editing has a different
6
+ **This catalog describes `@godxjp/ui` 31.19.0.** If the project you are editing has a different
7
7
  version in its `package.json`, read the pinned catalog for THAT version instead
8
8
  (`…/v<their-version>/agent/…`). A catalog newer than the installed package describes props that do
9
9
  not exist yet; older, and it hides props that do. Neither failure announces itself.
@@ -47,7 +47,7 @@ Then ask it: `search_components`, `get_component`, `get_tokens`, `get_rule`, `li
47
47
  task is a task** — "build a settings page", "confirm a destructive delete", "a list page with
48
48
  filters" — start HERE, not at the components. Then fetch `patterns/<name>.json` for complete,
49
49
  copy-paste-ready code. A component index answers "does X exist"; it cannot answer "build Y".
50
- 1. `components-index.json` — 48 KB, all 179 components as name + group +
50
+ 1. `components-index.json` — 49 KB, all 181 components as name + group +
51
51
  tagline. Read this when you already know the SHAPE you need. Each entry may carry `absorbed`:
52
52
  names that **do not exist** and map to it — `Combobox`, `Autocomplete`, `CountrySelect` and
53
53
  `SearchSelect` are all `Select`. If you are about to hand-roll something, search this field
@@ -6,7 +6,7 @@
6
6
  "name": "Actions",
7
7
  "props": [
8
8
  {
9
- "description": "The actions: { key, label?, icon?, onItemClick?, danger?, subItems?, actionRender? }. `label` is the accessible name AND the tooltip. `subItems` folds the action into a menu; `actionRender` replaces it entirely.",
9
+ "description": "The actions: { key, label?, icon?, onItemClick?, disabled?, danger?, subItems?, actionRender? }. `label` is the accessible name AND the tooltip. `disabled` makes a plain action `aria-disabled` and ignores its click, but keeps it focusable and in the arrow-key order (WAI-ARIA toolbar) — use it for a formatting toolbar while previewing or read-only, not to hide an action (gh#1109). `subItems` folds the action into a menu; `actionRender` replaces it entirely.",
10
10
  "name": "items",
11
11
  "required": true,
12
12
  "type": "ActionsItemsProp[]"
@@ -0,0 +1,64 @@
1
+ {
2
+ "docPath": "docs/data-display/markdown.tsx",
3
+ "example": "import { Prose } from \"@godxjp/ui/data-display\";\nimport { Markdown } from \"@godxjp/markdown\";\n\n<Prose measure=\"narrow\">\n <Markdown resolveUrl={(url) => (url.startsWith(\"asset:\") ? assetUrl(url) : undefined)}>\n {page.body}\n </Markdown>\n</Prose>",
4
+ "group": "data-display",
5
+ "importPath": "@godxjp/markdown",
6
+ "name": "Markdown",
7
+ "props": [
8
+ {
9
+ "description": "The Markdown source.",
10
+ "name": "children",
11
+ "required": true,
12
+ "type": "string"
13
+ },
14
+ {
15
+ "description": "Host markers (callouts, embeds), run after GFM. Their output is still sanitised — allow marker attributes with `schema`.",
16
+ "name": "remarkPlugins",
17
+ "type": "PluggableList"
18
+ },
19
+ {
20
+ "description": "Tags / attributes a host plugin needs. ADDITIVE: it can never widen the URL policy or bring raw HTML back.",
21
+ "name": "schema",
22
+ "type": "{ tagNames?: string[]; attributes?: Record<string, …> }"
23
+ },
24
+ {
25
+ "description": "Map a host scheme (`asset:…`, wiki links) to a real URL. Runs BEFORE the sanitiser, which then judges the result.",
26
+ "name": "resolveUrl",
27
+ "type": "(url, key) => string | undefined"
28
+ },
29
+ {
30
+ "description": "Server-assigned anchors instead of GitHub slugs.",
31
+ "name": "headingId",
32
+ "type": "({ depth, text, index }) => string | undefined"
33
+ },
34
+ {
35
+ "description": "Element overrides (react-markdown). A host `pre` replaces the Mermaid default.",
36
+ "name": "components",
37
+ "type": "Components"
38
+ },
39
+ {
40
+ "description": "Run AFTER the sanitiser — presentation only.",
41
+ "name": "rehypePlugins",
42
+ "type": "PluggableList"
43
+ },
44
+ {
45
+ "defaultValue": "true",
46
+ "description": "`false` keeps ```mermaid fences as code. Diagrams need the optional peer `mermaid`.",
47
+ "name": "mermaid",
48
+ "type": "boolean"
49
+ }
50
+ ],
51
+ "related": [
52
+ "Prose — the typography wrapper this renders into.",
53
+ "MarkdownEditor — editing; its preview is this renderer.",
54
+ "CodeBlock — a single block of preformatted text, not a document."
55
+ ],
56
+ "rules": [],
57
+ "storyPath": "data-display/markdown.tsx",
58
+ "tagline": "The one Markdown renderer for GoDX apps (sibling package `@godxjp/markdown`, versioned with the kit): GFM + GitHub heading anchors, one sanitiser schema (no raw HTML; http/https/mailto/relative URLs only), and ```mermaid drawn only after its SVG passes a fail-closed gate (gh#1108). Wrap it in `Prose`.",
59
+ "usage": [
60
+ "DO `<Prose><Markdown>{body}</Markdown></Prose>` for every rendered body (wiki page, issue, mail).",
61
+ "DO record `MARKDOWN_FORMAT` and `RENDERER_VERSION` on stored versions.",
62
+ "DON'T assemble react-markdown + rehype-sanitize per app, add rehype-raw, or render Mermaid yourself — `checkMermaidSvg` is the gate."
63
+ ]
64
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "docPath": "docs/data-entry/markdown-editor.tsx",
3
+ "example": "import { MarkdownEditor } from \"@godxjp/editor\";\nimport { FormField } from \"@godxjp/ui/data-entry\";\n\n<FormField id=\"body\" label=\"本文\">\n <MarkdownEditor\n value={body}\n onValueChange={setBody}\n upload={async (file) => ({ url: await storage.put(file), name: file.name })}\n />\n</FormField>",
4
+ "group": "data-entry",
5
+ "importPath": "@godxjp/editor",
6
+ "name": "MarkdownEditor",
7
+ "props": [
8
+ {
9
+ "description": "Controlled Markdown text (with `onValueChange`).",
10
+ "name": "value",
11
+ "type": "string"
12
+ },
13
+ {
14
+ "description": "Uncontrolled initial text.",
15
+ "name": "defaultValue",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "description": "Every change: typing, toolbar, uploads, undo.",
20
+ "name": "onValueChange",
21
+ "type": "(value: string) => void"
22
+ },
23
+ {
24
+ "description": "Controlled view (with `onModeChange`); `defaultMode` for uncontrolled. Default `write`.",
25
+ "name": "mode",
26
+ "type": "\"write\" | \"preview\" | \"split\""
27
+ },
28
+ {
29
+ "description": "Stores a pasted / dropped / attached file; the HOST decides where. A placeholder becomes `![name](url)` (images) or `[name](url)`; a failure removes it and names the file.",
30
+ "name": "upload",
31
+ "type": "(file: File) => Promise<{ url: string; name?: string }>"
32
+ },
33
+ {
34
+ "description": "Refuses files with this message, with or without `upload`; the attach button carries the reason and shows it instead of opening the picker (gh#1114).",
35
+ "name": "uploadBlockedReason",
36
+ "type": "string | null"
37
+ },
38
+ {
39
+ "description": "Replace the preview (an app with its own embeds).",
40
+ "name": "renderPreview",
41
+ "type": "(value: string) => ReactNode"
42
+ },
43
+ {
44
+ "description": "Extra toolbar actions — the extension point for new block types (`api`: value, selection, edit, insert, focus).",
45
+ "name": "actions",
46
+ "type": "{ key, label, icon, run(api) }[]"
47
+ },
48
+ {
49
+ "description": "Override any string (defaults: the kit's ja / en / vi catalogue).",
50
+ "name": "labels",
51
+ "type": "Partial<MarkdownEditorLabels>"
52
+ }
53
+ ],
54
+ "related": [
55
+ "Textarea — plain multi-line text; this is Textarea plus Markdown tooling.",
56
+ "Markdown — rendering a stored body."
57
+ ],
58
+ "rules": [],
59
+ "storyPath": "data-entry/markdown-editor.tsx",
60
+ "tagline": "Markdown editor (sibling package `@godxjp/editor`, versioned with the kit): the kit's Textarea with a WAI-ARIA formatting toolbar, write / preview / side by side (preview via `@godxjp/markdown`), IME-safe ⌘/Ctrl+B·I·K, one undo step per toolbar edit, and paste / drop / attach through a host `upload` (gh#1109).",
61
+ "usage": [
62
+ "DO put it inside `FormField` — `id` / `aria-*` reach the textarea.",
63
+ "DO keep a host autocomplete (ChatSuggestion) by passing its `onKeyDown`: it runs first, and `preventDefault()` skips the editor's shortcut.",
64
+ "DON'T build a toolbar over a bare Textarea, or a rich-text surface — this is the shared editor."
65
+ ]
66
+ }
@@ -16,6 +16,11 @@
16
16
  "name": "imageSize",
17
17
  "type": "\"fit\" | \"original\""
18
18
  },
19
+ {
20
+ "description": "Reading line length (gh#1112): caps the inline size at the `--page-measure-*` token — the same vocabulary and tokens as `Flex measure` / `PageContainer measure` (narrow 42rem, medium 48rem sit in the 45–75 character band). A cap, not a centred column: the body keeps its start edge under its heading. Use it on a document/wiki/decision body instead of narrowing the whole page column; title and metadata stay full width. Unset = full width.",
21
+ "name": "measure",
22
+ "type": "\"narrow\" | \"medium\" | \"wide\""
23
+ },
19
24
  {
20
25
  "description": "The rendered content.",
21
26
  "name": "children",
@@ -35,7 +40,7 @@
35
40
  ],
36
41
  "rules": [],
37
42
  "storyPath": "data-display/Prose.stories.tsx",
38
- "tagline": "Typography for rendered content (Markdown, CMS bodies, issue descriptions): styles the semantic HTML inside it from the tokens, with no opinion about where the HTML comes from.",
43
+ "tagline": "Typography for rendered content (Markdown, CMS bodies, issue descriptions): styles the semantic HTML inside it from the tokens, with no opinion about where the HTML comes from. To RENDER Markdown, use the sibling package `@godxjp/markdown` inside it — `<Prose><Markdown>{body}</Markdown></Prose>` — the one GFM renderer + sanitiser + Mermaid gate shared by every GoDX app; do not assemble react-markdown + rehype-sanitize per app (gh#1108).",
39
44
  "usage": [
40
45
  "DO import from `@godxjp/ui/data-display`: `import { Prose } from \"@godxjp/ui/data-display\";`",
41
46
  "DO wrap the OUTPUT of your Markdown pipeline (react-markdown + remark-gfm + rehype-sanitize), a sanitised CMS string via `dangerouslySetInnerHTML`, or plain JSX. Prose styles descendants: h1..h4, p, ul/ol/li, blockquote, code, pre, table/th/td, a, img, hr.",
@@ -104,7 +104,7 @@
104
104
  ],
105
105
  "rules": [],
106
106
  "storyPath": "data-entry/Textarea.stories.tsx",
107
- "tagline": "Styled wrapper around native <textarea>. Pair with FormField for labelled fields.",
107
+ "tagline": "Styled wrapper around native <textarea>. Pair with FormField for labelled fields. For a Markdown body (wiki page, issue description, mail) use the sibling package `@godxjp/editor` `MarkdownEditor` — this Textarea plus a formatting toolbar, preview through `@godxjp/markdown`, and paste/drop upload through a host `upload` function (gh#1109).",
108
108
  "usage": [
109
109
  "DO reach for `variant=\"ghost\"` ONLY when a parent surface already draws the box and owns focus — the composer Card, an inline edit cell. A standalone field keeps the default: without its own border it reads as plain text, not something you can type into.",
110
110
  "DO always wrap Textarea in FormField when it appears in a form — FormField clones aria-describedby, aria-required, and aria-invalid onto the child, giving error/helper announcements and screen-reader labelling for free. Pass matching id props to both.",
@@ -301,10 +301,20 @@
301
301
  "name": "CodeBlock",
302
302
  "tagline": "A block of preformatted text (request and response bodies, console output, snippets): mono, muted surface, soft-wrapped long lines by default, and an optional height cap that scrolls inside the block instead of pushing the page."
303
303
  },
304
+ {
305
+ "group": "data-display",
306
+ "name": "Markdown",
307
+ "tagline": "The one Markdown renderer for GoDX apps (sibling package `@godxjp/markdown`, versioned with the kit): GFM + GitHub heading anchors, one sanitiser schema (no raw HTML; http/https/mailto/relative URLs only), and ```mermaid drawn only after its SVG passes a fail-closed gate (gh#1108). Wrap it in `Prose`."
308
+ },
309
+ {
310
+ "group": "data-entry",
311
+ "name": "MarkdownEditor",
312
+ "tagline": "Markdown editor (sibling package `@godxjp/editor`, versioned with the kit): the kit's Textarea with a WAI-ARIA formatting toolbar, write / preview / side by side (preview via `@godxjp/markdown`), IME-safe ⌘/Ctrl+B·I·K, one undo step per toolbar edit, and paste / drop / attach through a host `upload` (gh#1109)."
313
+ },
304
314
  {
305
315
  "group": "data-display",
306
316
  "name": "Prose",
307
- "tagline": "Typography for rendered content (Markdown, CMS bodies, issue descriptions): styles the semantic HTML inside it from the tokens, with no opinion about where the HTML comes from."
317
+ "tagline": "Typography for rendered content (Markdown, CMS bodies, issue descriptions): styles the semantic HTML inside it from the tokens, with no opinion about where the HTML comes from. To RENDER Markdown, use the sibling package `@godxjp/markdown` inside it — `<Prose><Markdown>{body}</Markdown></Prose>` — the one GFM renderer + sanitiser + Mermaid gate shared by every GoDX app; do not assemble react-markdown + rehype-sanitize per app (gh#1108)."
308
318
  },
309
319
  {
310
320
  "group": "data-display",
@@ -392,7 +402,7 @@
392
402
  {
393
403
  "group": "data-entry",
394
404
  "name": "Textarea",
395
- "tagline": "Styled wrapper around native <textarea>. Pair with FormField for labelled fields."
405
+ "tagline": "Styled wrapper around native <textarea>. Pair with FormField for labelled fields. For a Markdown body (wiki page, issue description, mail) use the sibling package `@godxjp/editor` `MarkdownEditor` — this Textarea plus a formatting toolbar, preview through `@godxjp/markdown`, and paste/drop upload through a host `upload` function (gh#1109)."
396
406
  },
397
407
  {
398
408
  "group": "data-entry",
@@ -4987,6 +4987,136 @@
4987
4987
  "A stack trace in an error detail sheet: `wrap={false}` so frames stay on one line, scrolled horizontally."
4988
4988
  ]
4989
4989
  },
4990
+ {
4991
+ "docPath": "docs/data-display/markdown.tsx",
4992
+ "example": "import { Prose } from \"@godxjp/ui/data-display\";\nimport { Markdown } from \"@godxjp/markdown\";\n\n<Prose measure=\"narrow\">\n <Markdown resolveUrl={(url) => (url.startsWith(\"asset:\") ? assetUrl(url) : undefined)}>\n {page.body}\n </Markdown>\n</Prose>",
4993
+ "group": "data-display",
4994
+ "importPath": "@godxjp/markdown",
4995
+ "name": "Markdown",
4996
+ "props": [
4997
+ {
4998
+ "description": "The Markdown source.",
4999
+ "name": "children",
5000
+ "required": true,
5001
+ "type": "string"
5002
+ },
5003
+ {
5004
+ "description": "Host markers (callouts, embeds), run after GFM. Their output is still sanitised — allow marker attributes with `schema`.",
5005
+ "name": "remarkPlugins",
5006
+ "type": "PluggableList"
5007
+ },
5008
+ {
5009
+ "description": "Tags / attributes a host plugin needs. ADDITIVE: it can never widen the URL policy or bring raw HTML back.",
5010
+ "name": "schema",
5011
+ "type": "{ tagNames?: string[]; attributes?: Record<string, …> }"
5012
+ },
5013
+ {
5014
+ "description": "Map a host scheme (`asset:…`, wiki links) to a real URL. Runs BEFORE the sanitiser, which then judges the result.",
5015
+ "name": "resolveUrl",
5016
+ "type": "(url, key) => string | undefined"
5017
+ },
5018
+ {
5019
+ "description": "Server-assigned anchors instead of GitHub slugs.",
5020
+ "name": "headingId",
5021
+ "type": "({ depth, text, index }) => string | undefined"
5022
+ },
5023
+ {
5024
+ "description": "Element overrides (react-markdown). A host `pre` replaces the Mermaid default.",
5025
+ "name": "components",
5026
+ "type": "Components"
5027
+ },
5028
+ {
5029
+ "description": "Run AFTER the sanitiser — presentation only.",
5030
+ "name": "rehypePlugins",
5031
+ "type": "PluggableList"
5032
+ },
5033
+ {
5034
+ "defaultValue": "true",
5035
+ "description": "`false` keeps ```mermaid fences as code. Diagrams need the optional peer `mermaid`.",
5036
+ "name": "mermaid",
5037
+ "type": "boolean"
5038
+ }
5039
+ ],
5040
+ "related": [
5041
+ "Prose — the typography wrapper this renders into.",
5042
+ "MarkdownEditor — editing; its preview is this renderer.",
5043
+ "CodeBlock — a single block of preformatted text, not a document."
5044
+ ],
5045
+ "rules": [],
5046
+ "storyPath": "data-display/markdown.tsx",
5047
+ "tagline": "The one Markdown renderer for GoDX apps (sibling package `@godxjp/markdown`, versioned with the kit): GFM + GitHub heading anchors, one sanitiser schema (no raw HTML; http/https/mailto/relative URLs only), and ```mermaid drawn only after its SVG passes a fail-closed gate (gh#1108). Wrap it in `Prose`.",
5048
+ "usage": [
5049
+ "DO `<Prose><Markdown>{body}</Markdown></Prose>` for every rendered body (wiki page, issue, mail).",
5050
+ "DO record `MARKDOWN_FORMAT` and `RENDERER_VERSION` on stored versions.",
5051
+ "DON'T assemble react-markdown + rehype-sanitize per app, add rehype-raw, or render Mermaid yourself — `checkMermaidSvg` is the gate."
5052
+ ]
5053
+ },
5054
+ {
5055
+ "docPath": "docs/data-entry/markdown-editor.tsx",
5056
+ "example": "import { MarkdownEditor } from \"@godxjp/editor\";\nimport { FormField } from \"@godxjp/ui/data-entry\";\n\n<FormField id=\"body\" label=\"本文\">\n <MarkdownEditor\n value={body}\n onValueChange={setBody}\n upload={async (file) => ({ url: await storage.put(file), name: file.name })}\n />\n</FormField>",
5057
+ "group": "data-entry",
5058
+ "importPath": "@godxjp/editor",
5059
+ "name": "MarkdownEditor",
5060
+ "props": [
5061
+ {
5062
+ "description": "Controlled Markdown text (with `onValueChange`).",
5063
+ "name": "value",
5064
+ "type": "string"
5065
+ },
5066
+ {
5067
+ "description": "Uncontrolled initial text.",
5068
+ "name": "defaultValue",
5069
+ "type": "string"
5070
+ },
5071
+ {
5072
+ "description": "Every change: typing, toolbar, uploads, undo.",
5073
+ "name": "onValueChange",
5074
+ "type": "(value: string) => void"
5075
+ },
5076
+ {
5077
+ "description": "Controlled view (with `onModeChange`); `defaultMode` for uncontrolled. Default `write`.",
5078
+ "name": "mode",
5079
+ "type": "\"write\" | \"preview\" | \"split\""
5080
+ },
5081
+ {
5082
+ "description": "Stores a pasted / dropped / attached file; the HOST decides where. A placeholder becomes `![name](url)` (images) or `[name](url)`; a failure removes it and names the file.",
5083
+ "name": "upload",
5084
+ "type": "(file: File) => Promise<{ url: string; name?: string }>"
5085
+ },
5086
+ {
5087
+ "description": "Refuses files with this message, with or without `upload`; the attach button carries the reason and shows it instead of opening the picker (gh#1114).",
5088
+ "name": "uploadBlockedReason",
5089
+ "type": "string | null"
5090
+ },
5091
+ {
5092
+ "description": "Replace the preview (an app with its own embeds).",
5093
+ "name": "renderPreview",
5094
+ "type": "(value: string) => ReactNode"
5095
+ },
5096
+ {
5097
+ "description": "Extra toolbar actions — the extension point for new block types (`api`: value, selection, edit, insert, focus).",
5098
+ "name": "actions",
5099
+ "type": "{ key, label, icon, run(api) }[]"
5100
+ },
5101
+ {
5102
+ "description": "Override any string (defaults: the kit's ja / en / vi catalogue).",
5103
+ "name": "labels",
5104
+ "type": "Partial<MarkdownEditorLabels>"
5105
+ }
5106
+ ],
5107
+ "related": [
5108
+ "Textarea — plain multi-line text; this is Textarea plus Markdown tooling.",
5109
+ "Markdown — rendering a stored body."
5110
+ ],
5111
+ "rules": [],
5112
+ "storyPath": "data-entry/markdown-editor.tsx",
5113
+ "tagline": "Markdown editor (sibling package `@godxjp/editor`, versioned with the kit): the kit's Textarea with a WAI-ARIA formatting toolbar, write / preview / side by side (preview via `@godxjp/markdown`), IME-safe ⌘/Ctrl+B·I·K, one undo step per toolbar edit, and paste / drop / attach through a host `upload` (gh#1109).",
5114
+ "usage": [
5115
+ "DO put it inside `FormField` — `id` / `aria-*` reach the textarea.",
5116
+ "DO keep a host autocomplete (ChatSuggestion) by passing its `onKeyDown`: it runs first, and `preventDefault()` skips the editor's shortcut.",
5117
+ "DON'T build a toolbar over a bare Textarea, or a rich-text surface — this is the shared editor."
5118
+ ]
5119
+ },
4990
5120
  {
4991
5121
  "example": "import { Prose } from \"@godxjp/ui/data-display\";\nimport Markdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\n\n<Prose size=\"sm\">\n <Markdown remarkPlugins={[remarkGfm]}>{issue.description}</Markdown>\n</Prose>",
4992
5122
  "group": "data-display",
@@ -5005,6 +5135,11 @@
5005
5135
  "name": "imageSize",
5006
5136
  "type": "\"fit\" | \"original\""
5007
5137
  },
5138
+ {
5139
+ "description": "Reading line length (gh#1112): caps the inline size at the `--page-measure-*` token — the same vocabulary and tokens as `Flex measure` / `PageContainer measure` (narrow 42rem, medium 48rem sit in the 45–75 character band). A cap, not a centred column: the body keeps its start edge under its heading. Use it on a document/wiki/decision body instead of narrowing the whole page column; title and metadata stay full width. Unset = full width.",
5140
+ "name": "measure",
5141
+ "type": "\"narrow\" | \"medium\" | \"wide\""
5142
+ },
5008
5143
  {
5009
5144
  "description": "The rendered content.",
5010
5145
  "name": "children",
@@ -5024,7 +5159,7 @@
5024
5159
  ],
5025
5160
  "rules": [],
5026
5161
  "storyPath": "data-display/Prose.stories.tsx",
5027
- "tagline": "Typography for rendered content (Markdown, CMS bodies, issue descriptions): styles the semantic HTML inside it from the tokens, with no opinion about where the HTML comes from.",
5162
+ "tagline": "Typography for rendered content (Markdown, CMS bodies, issue descriptions): styles the semantic HTML inside it from the tokens, with no opinion about where the HTML comes from. To RENDER Markdown, use the sibling package `@godxjp/markdown` inside it — `<Prose><Markdown>{body}</Markdown></Prose>` — the one GFM renderer + sanitiser + Mermaid gate shared by every GoDX app; do not assemble react-markdown + rehype-sanitize per app (gh#1108).",
5028
5163
  "usage": [
5029
5164
  "DO import from `@godxjp/ui/data-display`: `import { Prose } from \"@godxjp/ui/data-display\";`",
5030
5165
  "DO wrap the OUTPUT of your Markdown pipeline (react-markdown + remark-gfm + rehype-sanitize), a sanitised CMS string via `dangerouslySetInnerHTML`, or plain JSX. Prose styles descendants: h1..h4, p, ul/ol/li, blockquote, code, pre, table/th/td, a, img, hr.",
@@ -6892,7 +7027,7 @@
6892
7027
  ],
6893
7028
  "rules": [],
6894
7029
  "storyPath": "data-entry/Textarea.stories.tsx",
6895
- "tagline": "Styled wrapper around native <textarea>. Pair with FormField for labelled fields.",
7030
+ "tagline": "Styled wrapper around native <textarea>. Pair with FormField for labelled fields. For a Markdown body (wiki page, issue description, mail) use the sibling package `@godxjp/editor` `MarkdownEditor` — this Textarea plus a formatting toolbar, preview through `@godxjp/markdown`, and paste/drop upload through a host `upload` function (gh#1109).",
6896
7031
  "usage": [
6897
7032
  "DO reach for `variant=\"ghost\"` ONLY when a parent surface already draws the box and owns focus — the composer Card, an inline edit cell. A standalone field keeps the default: without its own border it reads as plain text, not something you can type into.",
6898
7033
  "DO always wrap Textarea in FormField when it appears in a form — FormField clones aria-describedby, aria-required, and aria-invalid onto the child, giving error/helper announcements and screen-reader labelling for free. Pass matching id props to both.",
@@ -15678,7 +15813,7 @@
15678
15813
  "name": "Actions",
15679
15814
  "props": [
15680
15815
  {
15681
- "description": "The actions: { key, label?, icon?, onItemClick?, danger?, subItems?, actionRender? }. `label` is the accessible name AND the tooltip. `subItems` folds the action into a menu; `actionRender` replaces it entirely.",
15816
+ "description": "The actions: { key, label?, icon?, onItemClick?, disabled?, danger?, subItems?, actionRender? }. `label` is the accessible name AND the tooltip. `disabled` makes a plain action `aria-disabled` and ignores its click, but keeps it focusable and in the arrow-key order (WAI-ARIA toolbar) — use it for a formatting toolbar while previewing or read-only, not to hide an action (gh#1109). `subItems` folds the action into a menu; `actionRender` replaces it entirely.",
15682
15817
  "name": "items",
15683
15818
  "required": true,
15684
15819
  "type": "ActionsItemsProp[]"
package/agent/index.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "counts": {
3
3
  "anti-ai-tells": 26,
4
- "components": 179,
4
+ "components": 181,
5
5
  "patterns": 21,
6
6
  "rules": 50,
7
7
  "tokens": 2129,
@@ -10,7 +10,7 @@
10
10
  "files": [
11
11
  {
12
12
  "file": "components-index.json",
13
- "note": "48 KB — name + group + tagline for all 179. FETCH THIS FIRST, then fetch only the components you chose.",
13
+ "note": "49 KB — name + group + tagline for all 181. FETCH THIS FIRST, then fetch only the components you chose.",
14
14
  "url": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json"
15
15
  },
16
16
  {
@@ -48,7 +48,7 @@
48
48
  "note": "Pin to the tag that matches the @godxjp/ui version you installed. A catalog newer than your package describes props you do not have; older, and it hides props you do.",
49
49
  "read": {
50
50
  "live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
51
- "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.17.1/agent/index.json"
51
+ "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.19.0/agent/index.json"
52
52
  },
53
53
  "source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
54
54
  "start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
@@ -62,5 +62,5 @@
62
62
  "foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
63
63
  "semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
64
64
  },
65
- "version": "31.17.1"
65
+ "version": "31.19.0"
66
66
  }
package/agent/llms.txt CHANGED
@@ -1,10 +1,10 @@
1
1
  # @godxjp/ui
2
2
 
3
- > A Japanese-enterprise React design system: 179 components, 2129 design tokens,
4
- > 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.17.1.
3
+ > A Japanese-enterprise React design system: 181 components, 2129 design tokens,
4
+ > 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.19.0.
5
5
 
6
6
  If your client can run a process, do not read these files — run the MCP server instead
7
- (`npx @godxjp/ui-mcp@31.17.1`). It is searchable and version-locked. These files exist for agents
7
+ (`npx @godxjp/ui-mcp@31.19.0`). It is searchable and version-locked. These files exist for agents
8
8
  that can only fetch URLs.
9
9
 
10
10
  ## Start
@@ -15,7 +15,7 @@ that can only fetch URLs.
15
15
  ## Catalog
16
16
 
17
17
  - [patterns-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/patterns-index.json): 21 whole-task patterns (name, tagline, tags). Start here when the task is a TASK — "build a settings page" — then fetch `patterns/<name>.json` for complete code.
18
- - [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 48 KB — all 179 components as name, group, tagline, plus `absorbed`: the names that do NOT exist and map to it (`Combobox` → `Select`).
18
+ - [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 49 KB — all 181 components as name, group, tagline, plus `absorbed`: the names that do NOT exist and map to it (`Combobox` → `Select`).
19
19
  - [components/&lt;Name&gt;.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json): one file per component (1 KB–36 KB, median 6 KB). Read the index, then fetch only the ones you chose — this is the selective route, and the reason you do not need the blob.
20
20
  - [components.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json): 1.2 MB — every entry in one file. Most URL fetchers truncate a response this size without saying so; prefer the per-component files.
21
21
  - [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 104 `semantic` roles, 1814 `component` knobs.
@@ -26,7 +26,7 @@ that can only fetch URLs.
26
26
  ## Pinning
27
27
 
28
28
  Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
29
- the tag: `.../godx-jp/godxjp-ui/v31.17.1/agent/...`. A catalog that does not match the installed
29
+ the tag: `.../godx-jp/godxjp-ui/v31.19.0/agent/...`. A catalog that does not match the installed
30
30
  package describes props that are absent, or hides props that are present, and says nothing either way.
31
31
 
32
32
  Pinned catalogs only exist for releases whose tag actually contains `agent/`. If `…/v<version>/agent/index.json` returns 404, that release predates this catalog: read `…/main/…` instead and compare `index.json` → `version` against the package you have, so you at least know which way it drifted.
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { cn } from "../../lib/utils.js";
4
- const Prose = React.forwardRef(function Prose2({ size = "md", imageSize = "fit", className, children, ...rest }, ref) {
4
+ const Prose = React.forwardRef(function Prose2({ size = "md", imageSize = "fit", measure, className, children, ...rest }, ref) {
5
5
  return /* @__PURE__ */ jsx(
6
6
  "div",
7
7
  {
@@ -9,6 +9,7 @@ const Prose = React.forwardRef(function Prose2({ size = "md", imageSize = "fit",
9
9
  "data-slot": "prose",
10
10
  "data-size": size === "md" ? void 0 : size,
11
11
  "data-image-size": imageSize === "fit" ? void 0 : imageSize,
12
+ "data-measure": measure,
12
13
  className: cn("ui-prose", className),
13
14
  ...rest,
14
15
  children
@@ -58,6 +58,7 @@ const Actions = React.forwardRef(
58
58
  }
59
59
  };
60
60
  const dispatch = (item, keyPath, domEvent) => {
61
+ if (item.disabled) return;
61
62
  if (item.onItemClick) {
62
63
  item.onItemClick(item);
63
64
  return;
@@ -118,6 +119,7 @@ const Actions = React.forwardRef(
118
119
  LabelledIconButton,
119
120
  {
120
121
  label: name,
122
+ "aria-disabled": item.disabled || void 0,
121
123
  onClick: (event) => dispatch(item, [item.key], event),
122
124
  ...shared,
123
125
  children: item.icon
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$comment": "AUTO-GENERATED by scripts/gen-measurement-contract.mjs — do not edit. Read this instead of guessing: docs/MEASUREMENT-CONTRACT.md.",
3
- "version": "31.17.1",
3
+ "version": "31.19.0",
4
4
  "targetSize": {
5
5
  "standard": "WCAG 2.2 SC 2.5.8 Target Size (Minimum), level AA — 24×24 CSS px",
6
6
  "min": 24,
@@ -35,11 +35,20 @@ export type CodeBlockProp = {
35
35
  * @see Prose — typography for rendered content (Markdown, CMS bodies). Styles descendant semantic
36
36
  * HTML from the tokens; it has no opinion about where the HTML comes from.
37
37
  */
38
+ import type { FlexMeasureProp } from "./layout.prop.js";
38
39
  export type ProseProp = {
39
40
  /** Body size. `md` is the page body size; `sm` is the compact step. Default `md`. */
40
41
  size?: Extract<SizeProp, "sm" | "md">;
41
42
  /** `fit` scales images to the column (default); `original` shows them at their authored size. */
42
43
  imageSize?: "fit" | "original";
44
+ /**
45
+ * Caps the line length for reading (gh#1112): `narrow` / `medium` / `wide` read the same
46
+ * `--page-measure-*` tokens as `Flex measure` and `PageContainer measure`, so one theme knob sets
47
+ * every reading column. `narrow` (42rem) and `medium` (48rem) sit in the 45–75 character band.
48
+ * Unlike Flex it does NOT centre: the body keeps its start edge under the heading beside it.
49
+ * Unset = the full width of the container.
50
+ */
51
+ measure?: FlexMeasureProp;
43
52
  className?: ClassNameProp;
44
53
  children?: ChildrenProp;
45
54
  };
@@ -645,6 +645,14 @@ export type ActionsItemsProp = {
645
645
  /** Per-item handler. When present it WINS over the strip's `onClick`. Ant Design X `onItemClick`. */
646
646
  onItemClick?: (item: ActionsItemsProp) => void;
647
647
  /** Paint the action as irreversible. Ant Design X `danger`. */
648
+ /**
649
+ * The action cannot run right now (a formatting toolbar while previewing, a read-only document).
650
+ * It stays FOCUSABLE and in the arrow-key order, as the WAI-ARIA toolbar pattern recommends, so a
651
+ * keyboard or screen-reader user can still find it: it is `aria-disabled="true"` and a click is
652
+ * ignored, rather than a native `disabled` that would drop it from the toolbar's focus order.
653
+ * Applies to a plain action; a `subItems` trigger and an `actionRender` own their own state.
654
+ */
655
+ disabled?: DisabledProp;
648
656
  danger?: boolean;
649
657
  /** Nest the action into a menu behind one trigger. Ant Design X `subItems`. */
650
658
  subItems?: readonly Omit<ActionsItemsProp, "subItems" | "actionRender">[];
@@ -1285,6 +1285,18 @@
1285
1285
  font-size: var(--prose-font-size-sm);
1286
1286
  }
1287
1287
 
1288
+ .ui-prose[data-measure="narrow"] {
1289
+ max-inline-size: var(--page-measure-narrow);
1290
+ }
1291
+
1292
+ .ui-prose[data-measure="medium"] {
1293
+ max-inline-size: var(--page-measure-medium);
1294
+ }
1295
+
1296
+ .ui-prose[data-measure="wide"] {
1297
+ max-inline-size: var(--page-measure-wide);
1298
+ }
1299
+
1288
1300
  .ui-prose[data-image-size="original"] {
1289
1301
  overflow-x: auto;
1290
1302
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "31.17.1",
2
+ "version": "31.19.0",
3
3
  "generatedBy": "scripts/gen-style-layers.mjs — do not edit by hand; run `pnpm gen:style-layers`",
4
4
  "base": "base.css",
5
5
  "fonts": "fonts.css",
@@ -644,6 +644,21 @@
644
644
  "logo-layout.css"
645
645
  ]
646
646
  },
647
+ "Markdown": {
648
+ "layers": []
649
+ },
650
+ "MarkdownEditor": {
651
+ "layers": [
652
+ "layout.css",
653
+ "control.css",
654
+ "toggle.css",
655
+ "card-layout.css",
656
+ "text-layout.css",
657
+ "dialog-layout.css",
658
+ "data-display-layout.css",
659
+ "navigation-layout.css"
660
+ ]
661
+ },
647
662
  "Marquee": {
648
663
  "layers": [
649
664
  "motion.css",
@@ -2001,6 +2001,11 @@
2001
2001
  border-radius: var(--actions-radius, var(--radius));
2002
2002
  }
2003
2003
 
2004
+ .ui-actions [aria-disabled="true"] {
2005
+ opacity: var(--disabled-opacity);
2006
+ cursor: not-allowed;
2007
+ }
2008
+
2004
2009
  .ui-actions[data-variant="filled"],
2005
2010
  .ui-actions[data-variant="outlined"] {
2006
2011
  padding-block: var(--actions-padding-block);
@@ -3,8 +3,8 @@
3
3
  > Generated by `scripts/frame-coverage.mjs` (issue #163). Do not edit by hand — run `pnpm check:frame-coverage`.
4
4
  > Standard: [FRAME-COVERAGE-STANDARD.md](./FRAME-COVERAGE-STANDARD.md). A missing dimension is **UNTESTED**, never a pass.
5
5
 
6
- - Public components: **179**
7
- - With ≥1 frame: **155** · zero-frame: **24**
6
+ - Public components: **181**
7
+ - With ≥1 frame: **157** · zero-frame: **24**
8
8
  - Fully covered (every contract axis declared): **0**
9
9
 
10
10
  ## UNTESTED — no `/frame/**` route
@@ -98,6 +98,8 @@ Legend: ✓ covered · N/A reasoned skip · · UNTESTED (blank cell = UNTESTED).
98
98
  | EmptyState | ✓ | ✓ | N/A | N/A | · | · | · | · | · | · |
99
99
  | Progress | ✓ | · | N/A | · | · | · | · | · | · | · |
100
100
  | CodeBlock | ✓ | · | N/A | N/A | · | · | · | · | · | · |
101
+ | Markdown | ✓ | · | · | · | · | · | · | · | · | · |
102
+ | MarkdownEditor | ✓ | · | · | · | · | · | · | · | · | · |
101
103
  | Prose | ✓ | · | N/A | N/A | · | · | · | · | · | · |
102
104
  | Timeline | ✓ | ✓ | N/A | N/A | · | · | · | · | · | · |
103
105
  | TimelineGrid | ✓ | N/A | N/A | N/A | · | · | · | · | · | · |
@@ -0,0 +1,86 @@
1
+ import { Markdown, RENDERER_VERSION } from "@godxjp/markdown";
2
+ import {
3
+ Card,
4
+ CardContent,
5
+ CardDescription,
6
+ CardHeader,
7
+ CardTitle,
8
+ Prose,
9
+ } from "@godxjp/ui/data-display";
10
+ import { useTranslation } from "@godxjp/ui/i18n";
11
+ import { PageContainer, ResponsiveGrid } from "@godxjp/ui/layout";
12
+
13
+ const page = `# 結合テスト計画
14
+
15
+ 決済モジュールの請求書再発行シナリオを対象にする。詳細は[設計書](/wiki/設計/決済)を参照[^1]。
16
+
17
+ ## 範囲
18
+
19
+ | シナリオ | 担当 | 状態 |
20
+ |:--|:--|--:|
21
+ | 再発行(通常) | 田中 | 完了 |
22
+ | 再発行(税率変更後) | 佐藤 | 進行中 |
23
+
24
+ - [x] テストデータ作成
25
+ - [ ] ステージング反映
26
+ - [ ] 受入レビュー
27
+
28
+ ## 流れ
29
+
30
+ \`\`\`mermaid
31
+ graph LR
32
+ A[申請] --> B{承認}
33
+ B -->|承認| C[再発行]
34
+ B -->|差戻し| A
35
+ \`\`\`
36
+
37
+ \`\`\`ts
38
+ await invoices.reissue(id, { reason: "tax-rate" });
39
+ \`\`\`
40
+
41
+ [^1]: 設計書は 2026-10 版。`;
42
+
43
+ const hostile = `<script>alert(1)</script>
44
+
45
+ [危険なリンク](javascript:alert(1)) と ![データ画像](data:image/svg+xml;base64,PHN2Zz4=)
46
+
47
+ <img src=x onerror="alert(1)">`;
48
+
49
+ /**
50
+ * @godxjp/markdown — the one Markdown renderer (gh#1108). A wiki page body rendered as the
51
+ * published page shows it, and a hostile body rendered by the same component.
52
+ */
53
+ export default function Demo() {
54
+ const { t } = useTranslation();
55
+ return (
56
+ <PageContainer
57
+ title="Markdown"
58
+ subtitle={t("markdownDocs.subtitle", { version: String(RENDERER_VERSION) })}
59
+ >
60
+ <ResponsiveGrid columns={{ base: 1, lg: 2 }} gap="md">
61
+ <Card>
62
+ <CardHeader>
63
+ <CardTitle level={2}>{t("markdownDocs.page.title")}</CardTitle>
64
+ <CardDescription>{t("markdownDocs.page.description")}</CardDescription>
65
+ </CardHeader>
66
+ <CardContent>
67
+ <Prose>
68
+ <Markdown>{page}</Markdown>
69
+ </Prose>
70
+ </CardContent>
71
+ </Card>
72
+ <Card>
73
+ <CardHeader>
74
+ <CardTitle level={2}>{t("markdownDocs.hostile.title")}</CardTitle>
75
+ <CardDescription>{t("markdownDocs.hostile.description")}</CardDescription>
76
+ </CardHeader>
77
+ <CardContent>
78
+ <Prose>
79
+ <Markdown>{hostile}</Markdown>
80
+ </Prose>
81
+ </CardContent>
82
+ </Card>
83
+ </ResponsiveGrid>
84
+ </PageContainer>
85
+ );
86
+ }
@@ -0,0 +1,69 @@
1
+ import * as React from "react";
2
+ import { MarkdownEditor } from "@godxjp/editor";
3
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
4
+ import { Form, FormField } from "@godxjp/ui/data-entry";
5
+ import { Button } from "@godxjp/ui/general";
6
+ import { useTranslation } from "@godxjp/ui/i18n";
7
+ import { Flex, PageContainer } from "@godxjp/ui/layout";
8
+
9
+ import shot from "../assets/shot-landscape.svg";
10
+
11
+ const initial = `## 議事録 2026-10-02
12
+
13
+ - 決済モジュールの再発行は **税率変更後** のケースを追加する
14
+ - 次回レビュー:_10/9_
15
+
16
+ 画像はこの欄に貼り付けるか、ドラッグするか、クリップのボタンから添付します。`;
17
+
18
+ /** Stands in for the host's storage: a real app uploads the file and returns its URL. */
19
+ async function demoUpload(file: File) {
20
+ await new Promise((resolve) => setTimeout(resolve, 800));
21
+ return { url: shot, name: file.name };
22
+ }
23
+
24
+ /**
25
+ * @godxjp/editor — the Markdown editor (gh#1109). A page form: the editor inside a FormField,
26
+ * the preview through @godxjp/markdown, files through the host's `upload`.
27
+ */
28
+ export default function Demo() {
29
+ const { t } = useTranslation();
30
+ const [body, setBody] = React.useState(initial);
31
+ return (
32
+ <PageContainer title="MarkdownEditor" subtitle={t("markdownEditorDocs.subtitle")}>
33
+ <Card>
34
+ <CardHeader>
35
+ <CardTitle level={2}>{t("markdownEditorDocs.edit.title")}</CardTitle>
36
+ <CardDescription>{t("markdownEditorDocs.edit.description")}</CardDescription>
37
+ </CardHeader>
38
+ <CardContent>
39
+ <Form onSubmit={(event) => event.preventDefault()}>
40
+ <Flex direction="col" gap="md">
41
+ <FormField id="page-body" label={t("markdownEditorDocs.edit.label")}>
42
+ <MarkdownEditor
43
+ value={body}
44
+ onValueChange={setBody}
45
+ upload={demoUpload}
46
+ defaultMode="split"
47
+ />
48
+ </FormField>
49
+ <Flex justify="end">
50
+ <Button type="submit">{t("markdownEditorDocs.edit.save")}</Button>
51
+ </Flex>
52
+ </Flex>
53
+ </Form>
54
+ </CardContent>
55
+ </Card>
56
+ <Card>
57
+ <CardHeader>
58
+ <CardTitle level={2}>{t("markdownEditorDocs.readOnly.title")}</CardTitle>
59
+ <CardDescription>{t("markdownEditorDocs.readOnly.description")}</CardDescription>
60
+ </CardHeader>
61
+ <CardContent>
62
+ <FormField id="page-body-readonly" label={t("markdownEditorDocs.readOnly.label")}>
63
+ <MarkdownEditor defaultValue={initial} readOnly />
64
+ </FormField>
65
+ </CardContent>
66
+ </Card>
67
+ </PageContainer>
68
+ );
69
+ }
@@ -1573,5 +1573,30 @@
1573
1573
  "description": "A chip never wraps: a label wider than its container ends in an ellipsis (gh#1101), and when it was cut the full text opens in a tooltip on hover and on keyboard focus of the link or row around the chip (gh#1105). No extra props in a table cell or a Card.",
1574
1574
  "sample": "Via team · Platform infrastructure operations (East Japan region, night-shift rotation group 2)"
1575
1575
  }
1576
+ },
1577
+ "markdownDocs": {
1578
+ "subtitle": "@godxjp/markdown · GFM + heading anchors + sanitiser · renderer v{version}",
1579
+ "page": {
1580
+ "title": "Page body",
1581
+ "description": "Tables, checklists, code, footnotes, Mermaid. A Mermaid fence becomes a diagram only after its generated SVG passes the check; until then it shows as code."
1582
+ },
1583
+ "hostile": {
1584
+ "title": "A hostile body",
1585
+ "description": "Raw HTML never becomes elements, and javascript: and data: URLs are removed."
1586
+ }
1587
+ },
1588
+ "markdownEditorDocs": {
1589
+ "subtitle": "@godxjp/editor · formatting toolbar · write / preview / side by side · paste or drop to attach",
1590
+ "edit": {
1591
+ "title": "Edit a page",
1592
+ "description": "⌘/Ctrl + B, I, K for bold, italic, link. Shortcuts never fire during IME composition.",
1593
+ "label": "Body",
1594
+ "save": "Save"
1595
+ },
1596
+ "readOnly": {
1597
+ "title": "Read-only",
1598
+ "description": "The toolbar stays focusable, but its actions do nothing.",
1599
+ "label": "Body (view only)"
1600
+ }
1576
1601
  }
1577
1602
  }
@@ -1566,5 +1566,30 @@
1566
1566
  "description": "チップは折り返さず、コンテナより広いラベルは省略記号で切れます(gh#1101)。切れたときは、ホバーでも、チップを囲むリンクや行へのキーボードフォーカスでも、全文がツールチップに出ます(gh#1105)。表のセルでも Card でも追加の指定は要りません。",
1567
1567
  "sample": "チーム経由 · プラットフォーム基盤運用チーム(東日本リージョン・夜間当番ローテーション第二班)"
1568
1568
  }
1569
+ },
1570
+ "markdownDocs": {
1571
+ "subtitle": "@godxjp/markdown · GFM + 見出しアンカー + サニタイズ · renderer v{version}",
1572
+ "page": {
1573
+ "title": "ページ本文",
1574
+ "description": "表・チェックリスト・コード・脚注・Mermaid。Mermaid は生成された SVG が検査を通ったときだけ図になり、それまではコードのまま表示されます。"
1575
+ },
1576
+ "hostile": {
1577
+ "title": "悪意のある本文",
1578
+ "description": "生の HTML は要素にならず、javascript: や data: の URL は取り除かれます。"
1579
+ }
1580
+ },
1581
+ "markdownEditorDocs": {
1582
+ "subtitle": "@godxjp/editor · 書式ツールバー · 編集 / プレビュー / 並べて表示 · 貼り付け・ドロップで添付",
1583
+ "edit": {
1584
+ "title": "ページを編集",
1585
+ "description": "⌘/Ctrl + B・I・K で太字・斜体・リンク。変換中(IME)はショートカットが働きません。",
1586
+ "label": "本文",
1587
+ "save": "保存"
1588
+ },
1589
+ "readOnly": {
1590
+ "title": "読み取り専用",
1591
+ "description": "ツールバーはフォーカスできますが、操作は無効です。",
1592
+ "label": "本文(閲覧のみ)"
1593
+ }
1569
1594
  }
1570
1595
  }
@@ -1566,5 +1566,30 @@
1566
1566
  "description": "Chip không bao giờ xuống dòng: nhãn rộng hơn khung chứa sẽ kết thúc bằng dấu ba chấm (gh#1101), và khi bị cắt thì toàn văn hiện trong tooltip khi rê chuột hoặc khi focus bàn phím vào liên kết/hàng chứa chip (gh#1105). Trong ô bảng hay Card đều không cần thêm prop.",
1567
1567
  "sample": "Qua nhóm · Đội vận hành hạ tầng nền tảng (vùng Đông Nhật Bản, ca trực đêm nhóm 2)"
1568
1568
  }
1569
+ },
1570
+ "markdownDocs": {
1571
+ "subtitle": "@godxjp/markdown · GFM + neo tiêu đề + sanitize · renderer v{version}",
1572
+ "page": {
1573
+ "title": "Nội dung trang",
1574
+ "description": "Bảng, danh sách việc, mã, chú thích, Mermaid. Khối mermaid chỉ thành sơ đồ khi SVG sinh ra qua được kiểm tra; trước đó hiện dạng mã."
1575
+ },
1576
+ "hostile": {
1577
+ "title": "Nội dung độc hại",
1578
+ "description": "HTML thô không bao giờ thành phần tử; URL javascript: và data: bị loại bỏ."
1579
+ }
1580
+ },
1581
+ "markdownEditorDocs": {
1582
+ "subtitle": "@godxjp/editor · thanh định dạng · soạn / xem trước / song song · dán hoặc kéo thả để đính kèm",
1583
+ "edit": {
1584
+ "title": "Sửa trang",
1585
+ "description": "⌘/Ctrl + B, I, K: đậm, nghiêng, liên kết. Phím tắt không chạy khi đang gõ IME.",
1586
+ "label": "Nội dung",
1587
+ "save": "Lưu"
1588
+ },
1589
+ "readOnly": {
1590
+ "title": "Chỉ đọc",
1591
+ "description": "Thanh công cụ vẫn nhận focus nhưng thao tác bị vô hiệu.",
1592
+ "label": "Nội dung (chỉ xem)"
1593
+ }
1569
1594
  }
1570
1595
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@godxjp/ui",
3
- "version": "31.17.1",
4
- "godxUiMcp": "31.17.1",
3
+ "version": "31.19.0",
4
+ "godxUiMcp": "31.19.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  }
21
21
  },
22
22
  "sideEffects": false,
23
- "description": "@godxjp/ui \u2014 shared React UI framework (shadcn + Radix + Tailwind v4).",
23
+ "description": "@godxjp/ui — shared React UI framework (shadcn + Radix + Tailwind v4).",
24
24
  "files": [
25
25
  "LICENSE",
26
26
  "agent",
@@ -315,6 +315,7 @@
315
315
  "audit:component-cases": "node scripts/check-component-case-evidence.mjs",
316
316
  "audit:examples": "node scripts/ui-audit.mjs docs",
317
317
  "build": "tsup && tsc -p tsconfig.build.json && node scripts/copy-styles.mjs && node scripts/fix-esm-extensions.mjs && node scripts/add-use-client.mjs",
318
+ "build:packages": "cd packages/markdown && node ../../node_modules/tsup/dist/cli-default.js && cd ../editor && node ../../node_modules/tsup/dist/cli-default.js",
318
319
  "build:jis-level1-fonts": "node scripts/build-jis-level1-fonts.mjs",
319
320
  "capture:voiceover": "node scripts/capture-voiceover-evidence.mjs",
320
321
  "check:agent-catalog": "node scripts/gen-agent-catalog.mjs --check",
@@ -415,7 +416,8 @@
415
416
  "test:visual:table-collection-cjk": "node scripts/table-collection-cjk-visual.mjs",
416
417
  "test:visual:topbar-collision": "node scripts/topbar-collision-visual.mjs",
417
418
  "test:watch": "vitest",
418
- "typecheck": "node node_modules/typescript-7/bin/tsc --noEmit -p tsconfig.json",
419
+ "typecheck": "node node_modules/typescript-7/bin/tsc --noEmit -p tsconfig.json && pnpm typecheck:packages",
420
+ "typecheck:packages": "node node_modules/typescript-7/bin/tsc --noEmit -p packages/markdown/tsconfig.json && node node_modules/typescript-7/bin/tsc --noEmit -p packages/editor/tsconfig.json",
419
421
  "typecheck:docs": "node node_modules/typescript-7/bin/tsc --noEmit -p tsconfig.docs.json",
420
422
  "typecheck:mcp": "node node_modules/typescript-7/bin/tsc --noEmit -p mcp/tsconfig.json",
421
423
  "typecheck:ts6": "tsc --noEmit -p tsconfig.json",
@@ -513,6 +515,8 @@
513
515
  "@testing-library/jest-dom": "^7.0.1",
514
516
  "@testing-library/react": "^16.3.3",
515
517
  "@testing-library/user-event": "^14.6.6",
518
+ "@types/hast": "^3.0.5",
519
+ "@types/mdast": "^4.0.4",
516
520
  "@types/node": "^26.4.0",
517
521
  "@types/pngjs": "^6.0.5",
518
522
  "@types/react": "^19.2.18",
@@ -523,9 +527,11 @@
523
527
  "eslint": "^10.9.1",
524
528
  "eslint-plugin-react": "^7.37.5",
525
529
  "eslint-plugin-react-hooks": "^7.1.1",
530
+ "github-slugger": "^2.0.0",
526
531
  "globals": "^17.11.0",
527
532
  "jsdom": "^30.0.1",
528
533
  "jsqr": "^1.4.0",
534
+ "mermaid": "^11.17.2",
529
535
  "playwright": "^1.62.1",
530
536
  "pngjs": "^7.0.0",
531
537
  "prettier": "^3.9.6",
@@ -533,13 +539,17 @@
533
539
  "react": "^19.2.8",
534
540
  "react-dom": "^19.2.8",
535
541
  "react-hook-form": "^7.86.0",
542
+ "react-markdown": "^10.1.0",
536
543
  "react-router-dom": "^7.18.3",
537
544
  "recharts": "^3.10.1",
545
+ "rehype-sanitize": "^6.0.0",
546
+ "remark-gfm": "^4.0.1",
538
547
  "tailwindcss": "^4.3.3",
539
548
  "tsup": "^8.5.1",
540
549
  "typescript": "^6.0.3",
541
550
  "typescript-7": "npm:typescript@7.0.2",
542
551
  "typescript-eslint": "^8.68.0",
552
+ "unist-util-visit": "^5.1.0",
543
553
  "vite": "^8.2.2",
544
554
  "vitest": "^4.1.11",
545
555
  "zod": "^4.5.4"
@@ -125,8 +125,10 @@ const byLength = [...componentNames].sort((a, b) => b.length - a.length);
125
125
 
126
126
  const used = new Set();
127
127
  let sawNamespace = false;
128
+ // `@godxjp/editor` / `@godxjp/markdown` too (gh#1114): their components render kit components, and
129
+ // the manifest maps `MarkdownEditor` to the layers those need.
128
130
  const IMPORT =
129
- /(?:import|export)\s+(type\s+)?([^;'"]*?)\s*from\s*["'](@godxjp\/ui(?:\/[^"']*)?)["']/g;
131
+ /(?:import|export)\s+(type\s+)?([^;'"]*?)\s*from\s*["'](@godxjp\/(?:ui|editor|markdown)(?:\/[^"']*)?)["']/g;
130
132
  for (const file of new Set(sources)) {
131
133
  const src = readFileSync(file, "utf8");
132
134
  for (const m of src.matchAll(IMPORT)) {