@shirokuma-library/shirokuma-docs 0.1.0-alpha.5
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.
Potentially problematic release.
This version of @shirokuma-library/shirokuma-docs might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/README.en.md +308 -0
- package/README.md +308 -0
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/bin/shirokuma-docs +2 -0
- package/dist/analyzers/details-test-analysis.d.ts +31 -0
- package/dist/analyzers/details-test-analysis.d.ts.map +1 -0
- package/dist/analyzers/details-test-analysis.js +172 -0
- package/dist/analyzers/details-test-analysis.js.map +1 -0
- package/dist/analyzers/feature-map-builder.d.ts +20 -0
- package/dist/analyzers/feature-map-builder.d.ts.map +1 -0
- package/dist/analyzers/feature-map-builder.js +154 -0
- package/dist/analyzers/feature-map-builder.js.map +1 -0
- package/dist/analyzers/feature-map-references.d.ts +34 -0
- package/dist/analyzers/feature-map-references.d.ts.map +1 -0
- package/dist/analyzers/feature-map-references.js +249 -0
- package/dist/analyzers/feature-map-references.js.map +1 -0
- package/dist/analyzers/reference-analyzer.d.ts +95 -0
- package/dist/analyzers/reference-analyzer.d.ts.map +1 -0
- package/dist/analyzers/reference-analyzer.js +372 -0
- package/dist/analyzers/reference-analyzer.js.map +1 -0
- package/dist/commands/adr.d.ts +26 -0
- package/dist/commands/adr.d.ts.map +1 -0
- package/dist/commands/adr.js +129 -0
- package/dist/commands/adr.js.map +1 -0
- package/dist/commands/api-tools.d.ts +83 -0
- package/dist/commands/api-tools.d.ts.map +1 -0
- package/dist/commands/api-tools.js +775 -0
- package/dist/commands/api-tools.js.map +1 -0
- package/dist/commands/coverage.d.ts +139 -0
- package/dist/commands/coverage.d.ts.map +1 -0
- package/dist/commands/coverage.js +481 -0
- package/dist/commands/coverage.js.map +1 -0
- package/dist/commands/deps.d.ts +24 -0
- package/dist/commands/deps.d.ts.map +1 -0
- package/dist/commands/deps.js +211 -0
- package/dist/commands/deps.js.map +1 -0
- package/dist/commands/details-context.d.ts +38 -0
- package/dist/commands/details-context.d.ts.map +1 -0
- package/dist/commands/details-context.js +193 -0
- package/dist/commands/details-context.js.map +1 -0
- package/dist/commands/details-types.d.ts +315 -0
- package/dist/commands/details-types.d.ts.map +1 -0
- package/dist/commands/details-types.js +7 -0
- package/dist/commands/details-types.js.map +1 -0
- package/dist/commands/details.d.ts +24 -0
- package/dist/commands/details.d.ts.map +1 -0
- package/dist/commands/details.js +299 -0
- package/dist/commands/details.js.map +1 -0
- package/dist/commands/discussion-templates.d.ts +26 -0
- package/dist/commands/discussion-templates.d.ts.map +1 -0
- package/dist/commands/discussion-templates.js +270 -0
- package/dist/commands/discussion-templates.js.map +1 -0
- package/dist/commands/discussions.d.ts +31 -0
- package/dist/commands/discussions.d.ts.map +1 -0
- package/dist/commands/discussions.js +743 -0
- package/dist/commands/discussions.js.map +1 -0
- package/dist/commands/feature-map-types.d.ts +294 -0
- package/dist/commands/feature-map-types.d.ts.map +1 -0
- package/dist/commands/feature-map-types.js +8 -0
- package/dist/commands/feature-map-types.js.map +1 -0
- package/dist/commands/feature-map.d.ts +30 -0
- package/dist/commands/feature-map.d.ts.map +1 -0
- package/dist/commands/feature-map.js +137 -0
- package/dist/commands/feature-map.js.map +1 -0
- package/dist/commands/generate.d.ts +16 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/generate.js +88 -0
- package/dist/commands/generate.js.map +1 -0
- package/dist/commands/gh-discussions.d.ts +31 -0
- package/dist/commands/gh-discussions.d.ts.map +1 -0
- package/dist/commands/gh-discussions.js +743 -0
- package/dist/commands/gh-discussions.js.map +1 -0
- package/dist/commands/gh-issues-pr.d.ts +74 -0
- package/dist/commands/gh-issues-pr.d.ts.map +1 -0
- package/dist/commands/gh-issues-pr.js +417 -0
- package/dist/commands/gh-issues-pr.js.map +1 -0
- package/dist/commands/gh-issues.d.ts +90 -0
- package/dist/commands/gh-issues.d.ts.map +1 -0
- package/dist/commands/gh-issues.js +1297 -0
- package/dist/commands/gh-issues.js.map +1 -0
- package/dist/commands/gh-projects.d.ts +54 -0
- package/dist/commands/gh-projects.d.ts.map +1 -0
- package/dist/commands/gh-projects.js +966 -0
- package/dist/commands/gh-projects.js.map +1 -0
- package/dist/commands/gh-repo.d.ts +18 -0
- package/dist/commands/gh-repo.d.ts.map +1 -0
- package/dist/commands/gh-repo.js +253 -0
- package/dist/commands/gh-repo.js.map +1 -0
- package/dist/commands/github-data.d.ts +67 -0
- package/dist/commands/github-data.d.ts.map +1 -0
- package/dist/commands/github-data.js +361 -0
- package/dist/commands/github-data.js.map +1 -0
- package/dist/commands/i18n.d.ts +102 -0
- package/dist/commands/i18n.d.ts.map +1 -0
- package/dist/commands/i18n.js +829 -0
- package/dist/commands/i18n.js.map +1 -0
- package/dist/commands/impact.d.ts +14 -0
- package/dist/commands/impact.d.ts.map +1 -0
- package/dist/commands/impact.js +263 -0
- package/dist/commands/impact.js.map +1 -0
- package/dist/commands/init.d.ts +53 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +429 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/issues-pr.d.ts +74 -0
- package/dist/commands/issues-pr.d.ts.map +1 -0
- package/dist/commands/issues-pr.js +417 -0
- package/dist/commands/issues-pr.js.map +1 -0
- package/dist/commands/issues.d.ts +76 -0
- package/dist/commands/issues.d.ts.map +1 -0
- package/dist/commands/issues.js +1285 -0
- package/dist/commands/issues.js.map +1 -0
- package/dist/commands/link-docs.d.ts +21 -0
- package/dist/commands/link-docs.d.ts.map +1 -0
- package/dist/commands/link-docs.js +990 -0
- package/dist/commands/link-docs.js.map +1 -0
- package/dist/commands/lint-annotations.d.ts +28 -0
- package/dist/commands/lint-annotations.d.ts.map +1 -0
- package/dist/commands/lint-annotations.js +511 -0
- package/dist/commands/lint-annotations.js.map +1 -0
- package/dist/commands/lint-code.d.ts +26 -0
- package/dist/commands/lint-code.d.ts.map +1 -0
- package/dist/commands/lint-code.js +428 -0
- package/dist/commands/lint-code.js.map +1 -0
- package/dist/commands/lint-coverage.d.ts +33 -0
- package/dist/commands/lint-coverage.d.ts.map +1 -0
- package/dist/commands/lint-coverage.js +379 -0
- package/dist/commands/lint-coverage.js.map +1 -0
- package/dist/commands/lint-docs.d.ts +23 -0
- package/dist/commands/lint-docs.d.ts.map +1 -0
- package/dist/commands/lint-docs.js +338 -0
- package/dist/commands/lint-docs.js.map +1 -0
- package/dist/commands/lint-structure.d.ts +38 -0
- package/dist/commands/lint-structure.d.ts.map +1 -0
- package/dist/commands/lint-structure.js +350 -0
- package/dist/commands/lint-structure.js.map +1 -0
- package/dist/commands/lint-tests.d.ts +25 -0
- package/dist/commands/lint-tests.d.ts.map +1 -0
- package/dist/commands/lint-tests.js +105 -0
- package/dist/commands/lint-tests.js.map +1 -0
- package/dist/commands/lint-workflow.d.ts +36 -0
- package/dist/commands/lint-workflow.d.ts.map +1 -0
- package/dist/commands/lint-workflow.js +255 -0
- package/dist/commands/lint-workflow.js.map +1 -0
- package/dist/commands/overview.d.ts +21 -0
- package/dist/commands/overview.d.ts.map +1 -0
- package/dist/commands/overview.js +1300 -0
- package/dist/commands/overview.js.map +1 -0
- package/dist/commands/packages.d.ts +107 -0
- package/dist/commands/packages.d.ts.map +1 -0
- package/dist/commands/packages.js +308 -0
- package/dist/commands/packages.js.map +1 -0
- package/dist/commands/portal-nextjs.d.ts +23 -0
- package/dist/commands/portal-nextjs.d.ts.map +1 -0
- package/dist/commands/portal-nextjs.js +336 -0
- package/dist/commands/portal-nextjs.js.map +1 -0
- package/dist/commands/portal.d.ts +24 -0
- package/dist/commands/portal.d.ts.map +1 -0
- package/dist/commands/portal.js +16 -0
- package/dist/commands/portal.js.map +1 -0
- package/dist/commands/projects.d.ts +54 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +969 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/repo-pairs.d.ts +19 -0
- package/dist/commands/repo-pairs.d.ts.map +1 -0
- package/dist/commands/repo-pairs.js +529 -0
- package/dist/commands/repo-pairs.js.map +1 -0
- package/dist/commands/repo.d.ts +18 -0
- package/dist/commands/repo.d.ts.map +1 -0
- package/dist/commands/repo.js +253 -0
- package/dist/commands/repo.js.map +1 -0
- package/dist/commands/schema.d.ts +49 -0
- package/dist/commands/schema.d.ts.map +1 -0
- package/dist/commands/schema.js +830 -0
- package/dist/commands/schema.js.map +1 -0
- package/dist/commands/screenshots.d.ts +203 -0
- package/dist/commands/screenshots.d.ts.map +1 -0
- package/dist/commands/screenshots.js +1234 -0
- package/dist/commands/screenshots.js.map +1 -0
- package/dist/commands/search-index.d.ts +83 -0
- package/dist/commands/search-index.d.ts.map +1 -0
- package/dist/commands/search-index.js +389 -0
- package/dist/commands/search-index.js.map +1 -0
- package/dist/commands/session.d.ts +153 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +1243 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/test-cases-types.d.ts +154 -0
- package/dist/commands/test-cases-types.d.ts.map +1 -0
- package/dist/commands/test-cases-types.js +7 -0
- package/dist/commands/test-cases-types.js.map +1 -0
- package/dist/commands/test-cases.d.ts +28 -0
- package/dist/commands/test-cases.d.ts.map +1 -0
- package/dist/commands/test-cases.js +192 -0
- package/dist/commands/test-cases.js.map +1 -0
- package/dist/commands/typedoc.d.ts +21 -0
- package/dist/commands/typedoc.d.ts.map +1 -0
- package/dist/commands/typedoc.js +192 -0
- package/dist/commands/typedoc.js.map +1 -0
- package/dist/commands/update-skills.d.ts +56 -0
- package/dist/commands/update-skills.d.ts.map +1 -0
- package/dist/commands/update-skills.js +620 -0
- package/dist/commands/update-skills.js.map +1 -0
- package/dist/generators/details-entity-pages.d.ts +40 -0
- package/dist/generators/details-entity-pages.d.ts.map +1 -0
- package/dist/generators/details-entity-pages.js +301 -0
- package/dist/generators/details-entity-pages.js.map +1 -0
- package/dist/generators/details-html.d.ts +23 -0
- package/dist/generators/details-html.d.ts.map +1 -0
- package/dist/generators/details-html.js +324 -0
- package/dist/generators/details-html.js.map +1 -0
- package/dist/generators/details-module-page.d.ts +33 -0
- package/dist/generators/details-module-page.d.ts.map +1 -0
- package/dist/generators/details-module-page.js +408 -0
- package/dist/generators/details-module-page.js.map +1 -0
- package/dist/generators/details-styles.d.ts +39 -0
- package/dist/generators/details-styles.d.ts.map +1 -0
- package/dist/generators/details-styles.js +409 -0
- package/dist/generators/details-styles.js.map +1 -0
- package/dist/generators/feature-map-html.d.ts +66 -0
- package/dist/generators/feature-map-html.d.ts.map +1 -0
- package/dist/generators/feature-map-html.js +569 -0
- package/dist/generators/feature-map-html.js.map +1 -0
- package/dist/generators/feature-map-styles.d.ts +39 -0
- package/dist/generators/feature-map-styles.d.ts.map +1 -0
- package/dist/generators/feature-map-styles.js +449 -0
- package/dist/generators/feature-map-styles.js.map +1 -0
- package/dist/generators/test-cases-hierarchy.d.ts +21 -0
- package/dist/generators/test-cases-hierarchy.d.ts.map +1 -0
- package/dist/generators/test-cases-hierarchy.js +336 -0
- package/dist/generators/test-cases-hierarchy.js.map +1 -0
- package/dist/generators/test-cases-main.d.ts +20 -0
- package/dist/generators/test-cases-main.d.ts.map +1 -0
- package/dist/generators/test-cases-main.js +439 -0
- package/dist/generators/test-cases-main.js.map +1 -0
- package/dist/generators/test-cases-styles.d.ts +64 -0
- package/dist/generators/test-cases-styles.d.ts.map +1 -0
- package/dist/generators/test-cases-styles.js +1277 -0
- package/dist/generators/test-cases-styles.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +517 -0
- package/dist/index.js.map +1 -0
- package/dist/lint/annotation-lint.d.ts +198 -0
- package/dist/lint/annotation-lint.d.ts.map +1 -0
- package/dist/lint/annotation-lint.js +510 -0
- package/dist/lint/annotation-lint.js.map +1 -0
- package/dist/lint/annotation-types.d.ts +161 -0
- package/dist/lint/annotation-types.d.ts.map +1 -0
- package/dist/lint/annotation-types.js +31 -0
- package/dist/lint/annotation-types.js.map +1 -0
- package/dist/lint/code-types.d.ts +135 -0
- package/dist/lint/code-types.d.ts.map +1 -0
- package/dist/lint/code-types.js +25 -0
- package/dist/lint/code-types.js.map +1 -0
- package/dist/lint/coverage-types.d.ts +128 -0
- package/dist/lint/coverage-types.d.ts.map +1 -0
- package/dist/lint/coverage-types.js +24 -0
- package/dist/lint/coverage-types.js.map +1 -0
- package/dist/lint/docs-types.d.ts +214 -0
- package/dist/lint/docs-types.d.ts.map +1 -0
- package/dist/lint/docs-types.js +18 -0
- package/dist/lint/docs-types.js.map +1 -0
- package/dist/lint/formatters/index.d.ts +14 -0
- package/dist/lint/formatters/index.d.ts.map +1 -0
- package/dist/lint/formatters/index.js +28 -0
- package/dist/lint/formatters/index.js.map +1 -0
- package/dist/lint/formatters/json.d.ts +11 -0
- package/dist/lint/formatters/json.d.ts.map +1 -0
- package/dist/lint/formatters/json.js +12 -0
- package/dist/lint/formatters/json.js.map +1 -0
- package/dist/lint/formatters/summary.d.ts +11 -0
- package/dist/lint/formatters/summary.d.ts.map +1 -0
- package/dist/lint/formatters/summary.js +37 -0
- package/dist/lint/formatters/summary.js.map +1 -0
- package/dist/lint/formatters/terminal.d.ts +11 -0
- package/dist/lint/formatters/terminal.d.ts.map +1 -0
- package/dist/lint/formatters/terminal.js +99 -0
- package/dist/lint/formatters/terminal.js.map +1 -0
- package/dist/lint/index.d.ts +18 -0
- package/dist/lint/index.d.ts.map +1 -0
- package/dist/lint/index.js +103 -0
- package/dist/lint/index.js.map +1 -0
- package/dist/lint/rules/annotation-required.d.ts +35 -0
- package/dist/lint/rules/annotation-required.d.ts.map +1 -0
- package/dist/lint/rules/annotation-required.js +127 -0
- package/dist/lint/rules/annotation-required.js.map +1 -0
- package/dist/lint/rules/code-rules.d.ts +12 -0
- package/dist/lint/rules/code-rules.d.ts.map +1 -0
- package/dist/lint/rules/code-rules.js +11 -0
- package/dist/lint/rules/code-rules.js.map +1 -0
- package/dist/lint/rules/describe-coverage.d.ts +8 -0
- package/dist/lint/rules/describe-coverage.d.ts.map +1 -0
- package/dist/lint/rules/describe-coverage.js +43 -0
- package/dist/lint/rules/describe-coverage.js.map +1 -0
- package/dist/lint/rules/duplicate-testdoc.d.ts +8 -0
- package/dist/lint/rules/duplicate-testdoc.d.ts.map +1 -0
- package/dist/lint/rules/duplicate-testdoc.js +38 -0
- package/dist/lint/rules/duplicate-testdoc.js.map +1 -0
- package/dist/lint/rules/index.d.ts +29 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/index.js +55 -0
- package/dist/lint/rules/index.js.map +1 -0
- package/dist/lint/rules/server-action-structure.d.ts +37 -0
- package/dist/lint/rules/server-action-structure.d.ts.map +1 -0
- package/dist/lint/rules/server-action-structure.js +151 -0
- package/dist/lint/rules/server-action-structure.js.map +1 -0
- package/dist/lint/rules/skipped-test-report.d.ts +11 -0
- package/dist/lint/rules/skipped-test-report.d.ts.map +1 -0
- package/dist/lint/rules/skipped-test-report.js +31 -0
- package/dist/lint/rules/skipped-test-report.js.map +1 -0
- package/dist/lint/rules/structure-rules.d.ts +67 -0
- package/dist/lint/rules/structure-rules.d.ts.map +1 -0
- package/dist/lint/rules/structure-rules.js +615 -0
- package/dist/lint/rules/structure-rules.js.map +1 -0
- package/dist/lint/rules/testdoc-japanese.d.ts +8 -0
- package/dist/lint/rules/testdoc-japanese.d.ts.map +1 -0
- package/dist/lint/rules/testdoc-japanese.js +31 -0
- package/dist/lint/rules/testdoc-japanese.js.map +1 -0
- package/dist/lint/rules/testdoc-min-length.d.ts +8 -0
- package/dist/lint/rules/testdoc-min-length.d.ts.map +1 -0
- package/dist/lint/rules/testdoc-min-length.js +31 -0
- package/dist/lint/rules/testdoc-min-length.js.map +1 -0
- package/dist/lint/rules/testdoc-required.d.ts +8 -0
- package/dist/lint/rules/testdoc-required.d.ts.map +1 -0
- package/dist/lint/rules/testdoc-required.js +27 -0
- package/dist/lint/rules/testdoc-required.js.map +1 -0
- package/dist/lint/rules/workflow-branch-naming.d.ts +20 -0
- package/dist/lint/rules/workflow-branch-naming.d.ts.map +1 -0
- package/dist/lint/rules/workflow-branch-naming.js +85 -0
- package/dist/lint/rules/workflow-branch-naming.js.map +1 -0
- package/dist/lint/rules/workflow-commit-format.d.ts +27 -0
- package/dist/lint/rules/workflow-commit-format.d.ts.map +1 -0
- package/dist/lint/rules/workflow-commit-format.js +92 -0
- package/dist/lint/rules/workflow-commit-format.js.map +1 -0
- package/dist/lint/rules/workflow-issue-fields.d.ts +24 -0
- package/dist/lint/rules/workflow-issue-fields.d.ts.map +1 -0
- package/dist/lint/rules/workflow-issue-fields.js +89 -0
- package/dist/lint/rules/workflow-issue-fields.js.map +1 -0
- package/dist/lint/rules/workflow-main-protection.d.ts +32 -0
- package/dist/lint/rules/workflow-main-protection.d.ts.map +1 -0
- package/dist/lint/rules/workflow-main-protection.js +114 -0
- package/dist/lint/rules/workflow-main-protection.js.map +1 -0
- package/dist/lint/structure-types.d.ts +216 -0
- package/dist/lint/structure-types.d.ts.map +1 -0
- package/dist/lint/structure-types.js +96 -0
- package/dist/lint/structure-types.js.map +1 -0
- package/dist/lint/types.d.ts +154 -0
- package/dist/lint/types.d.ts.map +1 -0
- package/dist/lint/types.js +21 -0
- package/dist/lint/types.js.map +1 -0
- package/dist/lint/workflow-types.d.ts +90 -0
- package/dist/lint/workflow-types.d.ts.map +1 -0
- package/dist/lint/workflow-types.js +7 -0
- package/dist/lint/workflow-types.js.map +1 -0
- package/dist/md/analyzer/index.d.ts +46 -0
- package/dist/md/analyzer/index.d.ts.map +1 -0
- package/dist/md/analyzer/index.js +288 -0
- package/dist/md/analyzer/index.js.map +1 -0
- package/dist/md/builder/index.d.ts +91 -0
- package/dist/md/builder/index.d.ts.map +1 -0
- package/dist/md/builder/index.js +446 -0
- package/dist/md/builder/index.js.map +1 -0
- package/dist/md/cli/analyze.d.ts +11 -0
- package/dist/md/cli/analyze.d.ts.map +1 -0
- package/dist/md/cli/analyze.js +118 -0
- package/dist/md/cli/analyze.js.map +1 -0
- package/dist/md/cli/build.d.ts +11 -0
- package/dist/md/cli/build.d.ts.map +1 -0
- package/dist/md/cli/build.js +74 -0
- package/dist/md/cli/build.js.map +1 -0
- package/dist/md/cli/extract.d.ts +25 -0
- package/dist/md/cli/extract.d.ts.map +1 -0
- package/dist/md/cli/extract.js +230 -0
- package/dist/md/cli/extract.js.map +1 -0
- package/dist/md/cli/index.d.ts +3 -0
- package/dist/md/cli/index.d.ts.map +1 -0
- package/dist/md/cli/index.js +99 -0
- package/dist/md/cli/index.js.map +1 -0
- package/dist/md/cli/lint.d.ts +11 -0
- package/dist/md/cli/lint.d.ts.map +1 -0
- package/dist/md/cli/lint.js +165 -0
- package/dist/md/cli/lint.js.map +1 -0
- package/dist/md/cli/list.d.ts +16 -0
- package/dist/md/cli/list.d.ts.map +1 -0
- package/dist/md/cli/list.js +85 -0
- package/dist/md/cli/list.js.map +1 -0
- package/dist/md/cli/program.d.ts +11 -0
- package/dist/md/cli/program.d.ts.map +1 -0
- package/dist/md/cli/program.js +104 -0
- package/dist/md/cli/program.js.map +1 -0
- package/dist/md/cli/validate.d.ts +8 -0
- package/dist/md/cli/validate.d.ts.map +1 -0
- package/dist/md/cli/validate.js +82 -0
- package/dist/md/cli/validate.js.map +1 -0
- package/dist/md/constants.d.ts +69 -0
- package/dist/md/constants.d.ts.map +1 -0
- package/dist/md/constants.js +69 -0
- package/dist/md/constants.js.map +1 -0
- package/dist/md/extractor/index.d.ts +57 -0
- package/dist/md/extractor/index.d.ts.map +1 -0
- package/dist/md/extractor/index.js +359 -0
- package/dist/md/extractor/index.js.map +1 -0
- package/dist/md/index.d.ts +26 -0
- package/dist/md/index.d.ts.map +1 -0
- package/dist/md/index.js +30 -0
- package/dist/md/index.js.map +1 -0
- package/dist/md/linter/index.d.ts +20 -0
- package/dist/md/linter/index.d.ts.map +1 -0
- package/dist/md/linter/index.js +412 -0
- package/dist/md/linter/index.js.map +1 -0
- package/dist/md/linter/token-optimizer.d.ts +66 -0
- package/dist/md/linter/token-optimizer.d.ts.map +1 -0
- package/dist/md/linter/token-optimizer.js +292 -0
- package/dist/md/linter/token-optimizer.js.map +1 -0
- package/dist/md/lister/index.d.ts +42 -0
- package/dist/md/lister/index.d.ts.map +1 -0
- package/dist/md/lister/index.js +317 -0
- package/dist/md/lister/index.js.map +1 -0
- package/dist/md/parser/heading-numbers.d.ts +43 -0
- package/dist/md/parser/heading-numbers.d.ts.map +1 -0
- package/dist/md/parser/heading-numbers.js +97 -0
- package/dist/md/parser/heading-numbers.js.map +1 -0
- package/dist/md/parser/section-meta.d.ts +50 -0
- package/dist/md/parser/section-meta.d.ts.map +1 -0
- package/dist/md/parser/section-meta.js +212 -0
- package/dist/md/parser/section-meta.js.map +1 -0
- package/dist/md/parser/template.d.ts +56 -0
- package/dist/md/parser/template.d.ts.map +1 -0
- package/dist/md/parser/template.js +122 -0
- package/dist/md/parser/template.js.map +1 -0
- package/dist/md/plugins/loader.d.ts +15 -0
- package/dist/md/plugins/loader.d.ts.map +1 -0
- package/dist/md/plugins/loader.js +80 -0
- package/dist/md/plugins/loader.js.map +1 -0
- package/dist/md/plugins/normalize-headings.d.ts +43 -0
- package/dist/md/plugins/normalize-headings.d.ts.map +1 -0
- package/dist/md/plugins/normalize-headings.js +51 -0
- package/dist/md/plugins/normalize-headings.js.map +1 -0
- package/dist/md/plugins/normalize-whitespace.d.ts +46 -0
- package/dist/md/plugins/normalize-whitespace.d.ts.map +1 -0
- package/dist/md/plugins/normalize-whitespace.js +86 -0
- package/dist/md/plugins/normalize-whitespace.js.map +1 -0
- package/dist/md/plugins/remove-badges.d.ts +36 -0
- package/dist/md/plugins/remove-badges.d.ts.map +1 -0
- package/dist/md/plugins/remove-badges.js +59 -0
- package/dist/md/plugins/remove-badges.js.map +1 -0
- package/dist/md/plugins/remove-comments.d.ts +27 -0
- package/dist/md/plugins/remove-comments.d.ts.map +1 -0
- package/dist/md/plugins/remove-comments.js +40 -0
- package/dist/md/plugins/remove-comments.js.map +1 -0
- package/dist/md/plugins/remove-duplicates.d.ts +40 -0
- package/dist/md/plugins/remove-duplicates.d.ts.map +1 -0
- package/dist/md/plugins/remove-duplicates.js +72 -0
- package/dist/md/plugins/remove-duplicates.js.map +1 -0
- package/dist/md/plugins/remove-internal-links.d.ts +38 -0
- package/dist/md/plugins/remove-internal-links.d.ts.map +1 -0
- package/dist/md/plugins/remove-internal-links.js +66 -0
- package/dist/md/plugins/remove-internal-links.js.map +1 -0
- package/dist/md/plugins/strip-heading-numbers.d.ts +35 -0
- package/dist/md/plugins/strip-heading-numbers.d.ts.map +1 -0
- package/dist/md/plugins/strip-heading-numbers.js +59 -0
- package/dist/md/plugins/strip-heading-numbers.js.map +1 -0
- package/dist/md/plugins/strip-section-meta.d.ts +37 -0
- package/dist/md/plugins/strip-section-meta.d.ts.map +1 -0
- package/dist/md/plugins/strip-section-meta.js +62 -0
- package/dist/md/plugins/strip-section-meta.js.map +1 -0
- package/dist/md/types/config.d.ts +260 -0
- package/dist/md/types/config.d.ts.map +1 -0
- package/dist/md/types/config.js +156 -0
- package/dist/md/types/config.js.map +1 -0
- package/dist/md/types/document.d.ts +37 -0
- package/dist/md/types/document.d.ts.map +1 -0
- package/dist/md/types/document.js +2 -0
- package/dist/md/types/document.js.map +1 -0
- package/dist/md/types/validation.d.ts +107 -0
- package/dist/md/types/validation.d.ts.map +1 -0
- package/dist/md/types/validation.js +2 -0
- package/dist/md/types/validation.js.map +1 -0
- package/dist/md/utils/code-blocks.d.ts +136 -0
- package/dist/md/utils/code-blocks.d.ts.map +1 -0
- package/dist/md/utils/code-blocks.js +178 -0
- package/dist/md/utils/code-blocks.js.map +1 -0
- package/dist/md/utils/config.d.ts +10 -0
- package/dist/md/utils/config.d.ts.map +1 -0
- package/dist/md/utils/config.js +99 -0
- package/dist/md/utils/config.js.map +1 -0
- package/dist/md/utils/file-collector.d.ts +78 -0
- package/dist/md/utils/file-collector.d.ts.map +1 -0
- package/dist/md/utils/file-collector.js +100 -0
- package/dist/md/utils/file-collector.js.map +1 -0
- package/dist/md/utils/markdown.d.ts +18 -0
- package/dist/md/utils/markdown.d.ts.map +1 -0
- package/dist/md/utils/markdown.js +93 -0
- package/dist/md/utils/markdown.js.map +1 -0
- package/dist/md/utils/remark.d.ts +91 -0
- package/dist/md/utils/remark.d.ts.map +1 -0
- package/dist/md/utils/remark.js +125 -0
- package/dist/md/utils/remark.js.map +1 -0
- package/dist/md/utils/tokens.d.ts +9 -0
- package/dist/md/utils/tokens.d.ts.map +1 -0
- package/dist/md/utils/tokens.js +31 -0
- package/dist/md/utils/tokens.js.map +1 -0
- package/dist/md/validator/index.d.ts +40 -0
- package/dist/md/validator/index.d.ts.map +1 -0
- package/dist/md/validator/index.js +289 -0
- package/dist/md/validator/index.js.map +1 -0
- package/dist/parsers/details-jsdoc.d.ts +46 -0
- package/dist/parsers/details-jsdoc.d.ts.map +1 -0
- package/dist/parsers/details-jsdoc.js +262 -0
- package/dist/parsers/details-jsdoc.js.map +1 -0
- package/dist/parsers/details-zod.d.ts +22 -0
- package/dist/parsers/details-zod.d.ts.map +1 -0
- package/dist/parsers/details-zod.js +145 -0
- package/dist/parsers/details-zod.js.map +1 -0
- package/dist/parsers/drizzle-schema.d.ts +92 -0
- package/dist/parsers/drizzle-schema.d.ts.map +1 -0
- package/dist/parsers/drizzle-schema.js +376 -0
- package/dist/parsers/drizzle-schema.js.map +1 -0
- package/dist/parsers/feature-map-tags.d.ts +45 -0
- package/dist/parsers/feature-map-tags.d.ts.map +1 -0
- package/dist/parsers/feature-map-tags.js +292 -0
- package/dist/parsers/feature-map-tags.js.map +1 -0
- package/dist/parsers/feature-map-type-extraction.d.ts +62 -0
- package/dist/parsers/feature-map-type-extraction.d.ts.map +1 -0
- package/dist/parsers/feature-map-type-extraction.js +347 -0
- package/dist/parsers/feature-map-type-extraction.js.map +1 -0
- package/dist/parsers/feature-map-utils.d.ts +34 -0
- package/dist/parsers/feature-map-utils.d.ts.map +1 -0
- package/dist/parsers/feature-map-utils.js +101 -0
- package/dist/parsers/feature-map-utils.js.map +1 -0
- package/dist/parsers/jsdoc-common.d.ts +209 -0
- package/dist/parsers/jsdoc-common.d.ts.map +1 -0
- package/dist/parsers/jsdoc-common.js +655 -0
- package/dist/parsers/jsdoc-common.js.map +1 -0
- package/dist/parsers/jsdoc.d.ts +76 -0
- package/dist/parsers/jsdoc.d.ts.map +1 -0
- package/dist/parsers/jsdoc.js +238 -0
- package/dist/parsers/jsdoc.js.map +1 -0
- package/dist/parsers/screenshot-annotations.d.ts +96 -0
- package/dist/parsers/screenshot-annotations.d.ts.map +1 -0
- package/dist/parsers/screenshot-annotations.js +227 -0
- package/dist/parsers/screenshot-annotations.js.map +1 -0
- package/dist/parsers/test-annotations.d.ts +46 -0
- package/dist/parsers/test-annotations.d.ts.map +1 -0
- package/dist/parsers/test-annotations.js +393 -0
- package/dist/parsers/test-annotations.js.map +1 -0
- package/dist/parsers/test-categorization.d.ts +42 -0
- package/dist/parsers/test-categorization.d.ts.map +1 -0
- package/dist/parsers/test-categorization.js +182 -0
- package/dist/parsers/test-categorization.js.map +1 -0
- package/dist/parsers/zod-schema.d.ts +105 -0
- package/dist/parsers/zod-schema.d.ts.map +1 -0
- package/dist/parsers/zod-schema.js +270 -0
- package/dist/parsers/zod-schema.js.map +1 -0
- package/dist/utils/action-inference.d.ts +23 -0
- package/dist/utils/action-inference.d.ts.map +1 -0
- package/dist/utils/action-inference.js +36 -0
- package/dist/utils/action-inference.js.map +1 -0
- package/dist/utils/app-inference.d.ts +31 -0
- package/dist/utils/app-inference.d.ts.map +1 -0
- package/dist/utils/app-inference.js +41 -0
- package/dist/utils/app-inference.js.map +1 -0
- package/dist/utils/auto-infer.d.ts +93 -0
- package/dist/utils/auto-infer.d.ts.map +1 -0
- package/dist/utils/auto-infer.js +184 -0
- package/dist/utils/auto-infer.js.map +1 -0
- package/dist/utils/config.d.ts +709 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +504 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/file.d.ts +46 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +103 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/formatters.d.ts +111 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/formatters.js +164 -0
- package/dist/utils/formatters.js.map +1 -0
- package/dist/utils/gh-config.d.ts +99 -0
- package/dist/utils/gh-config.d.ts.map +1 -0
- package/dist/utils/gh-config.js +247 -0
- package/dist/utils/gh-config.js.map +1 -0
- package/dist/utils/github.d.ts +98 -0
- package/dist/utils/github.d.ts.map +1 -0
- package/dist/utils/github.js +295 -0
- package/dist/utils/github.js.map +1 -0
- package/dist/utils/html.d.ts +107 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +376 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/i18n.d.ts +40 -0
- package/dist/utils/i18n.d.ts.map +1 -0
- package/dist/utils/i18n.js +148 -0
- package/dist/utils/i18n.js.map +1 -0
- package/dist/utils/logger.d.ts +20 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +49 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/project-fields.d.ts +71 -0
- package/dist/utils/project-fields.d.ts.map +1 -0
- package/dist/utils/project-fields.js +318 -0
- package/dist/utils/project-fields.js.map +1 -0
- package/dist/utils/repo-pairs.d.ts +94 -0
- package/dist/utils/repo-pairs.d.ts.map +1 -0
- package/dist/utils/repo-pairs.js +196 -0
- package/dist/utils/repo-pairs.js.map +1 -0
- package/dist/utils/route-inference.d.ts +81 -0
- package/dist/utils/route-inference.d.ts.map +1 -0
- package/dist/utils/route-inference.js +137 -0
- package/dist/utils/route-inference.js.map +1 -0
- package/dist/utils/setup-check.d.ts +34 -0
- package/dist/utils/setup-check.d.ts.map +1 -0
- package/dist/utils/setup-check.js +136 -0
- package/dist/utils/setup-check.js.map +1 -0
- package/dist/utils/shirokumaignore.d.ts +55 -0
- package/dist/utils/shirokumaignore.d.ts.map +1 -0
- package/dist/utils/shirokumaignore.js +94 -0
- package/dist/utils/shirokumaignore.js.map +1 -0
- package/dist/utils/skills-repo.d.ts +353 -0
- package/dist/utils/skills-repo.d.ts.map +1 -0
- package/dist/utils/skills-repo.js +793 -0
- package/dist/utils/skills-repo.js.map +1 -0
- package/dist/utils/status-workflow.d.ts +54 -0
- package/dist/utils/status-workflow.d.ts.map +1 -0
- package/dist/utils/status-workflow.js +103 -0
- package/dist/utils/status-workflow.js.map +1 -0
- package/dist/validators/frontmatter.d.ts +41 -0
- package/dist/validators/frontmatter.d.ts.map +1 -0
- package/dist/validators/frontmatter.js +117 -0
- package/dist/validators/frontmatter.js.map +1 -0
- package/dist/validators/link-checker.d.ts +48 -0
- package/dist/validators/link-checker.d.ts.map +1 -0
- package/dist/validators/link-checker.js +108 -0
- package/dist/validators/link-checker.js.map +1 -0
- package/dist/validators/markdown-structure.d.ts +50 -0
- package/dist/validators/markdown-structure.d.ts.map +1 -0
- package/dist/validators/markdown-structure.js +253 -0
- package/dist/validators/markdown-structure.js.map +1 -0
- package/i18n/cli/en.json +155 -0
- package/i18n/cli/ja.json +155 -0
- package/i18n/discussion/en.json +191 -0
- package/i18n/discussion/ja.json +191 -0
- package/package.json +113 -0
- package/portal/app/api-tools/api-tools-client.tsx +411 -0
- package/portal/app/api-tools/api-tools-document.tsx +240 -0
- package/portal/app/api-tools/page.tsx +56 -0
- package/portal/app/api-tools/swagger-view.tsx +114 -0
- package/portal/app/apps/[appId]/[type]/[module]/[item]/item-tabs-client.tsx +71 -0
- package/portal/app/apps/[appId]/[type]/[module]/[item]/page.tsx +1422 -0
- package/portal/app/apps/[appId]/[type]/[module]/page.tsx +373 -0
- package/portal/app/apps/[appId]/feature-map/feature-map-app-document.tsx +298 -0
- package/portal/app/apps/[appId]/feature-map/page.tsx +224 -0
- package/portal/app/apps/[appId]/i18n/page.tsx +139 -0
- package/portal/app/apps/[appId]/test-cases/page.tsx +840 -0
- package/portal/app/apps/[appId]/tools/[tool]/page.tsx +351 -0
- package/portal/app/apps/[appId]/tools/api-tools-client.tsx +429 -0
- package/portal/app/apps/[appId]/tools/page.tsx +119 -0
- package/portal/app/db-schema/[db]/[table]/page.tsx +235 -0
- package/portal/app/db-schema/[db]/diagram/page.tsx +81 -0
- package/portal/app/db-schema/[db]/page.tsx +148 -0
- package/portal/app/db-schema/db-schema-document.tsx +100 -0
- package/portal/app/db-schema/diagram/client.tsx +211 -0
- package/portal/app/db-schema/diagram/page.tsx +20 -0
- package/portal/app/db-schema/page.tsx +145 -0
- package/portal/app/db-schema/table-detail-document.tsx +710 -0
- package/portal/app/db-schema/table-detail.tsx +747 -0
- package/portal/app/db-schema/table-list-document.tsx +224 -0
- package/portal/app/db-schema/table-list.tsx +247 -0
- package/portal/app/details/[type]/[module]/[item]/item-tabs-client.tsx +71 -0
- package/portal/app/details/[type]/[module]/[item]/page.tsx +1286 -0
- package/portal/app/details/[type]/[module]/page.tsx +884 -0
- package/portal/app/feature-map/feature-map-client.tsx +681 -0
- package/portal/app/feature-map/feature-map-document.tsx +313 -0
- package/portal/app/feature-map/page.tsx +438 -0
- package/portal/app/globals.css +205 -0
- package/portal/app/i18n/[...namespace]/page.tsx +190 -0
- package/portal/app/i18n/i18n-client.tsx +369 -0
- package/portal/app/i18n/page.tsx +339 -0
- package/portal/app/layout.tsx +37 -0
- package/portal/app/overview/page.tsx +65 -0
- package/portal/app/packages/[packageId]/page.tsx +201 -0
- package/portal/app/packages/page.tsx +148 -0
- package/portal/app/page.tsx +568 -0
- package/portal/app/test-cases/[file]/[line]/page.tsx +455 -0
- package/portal/app/test-cases/[file]/[line]/test-detail-document.tsx +335 -0
- package/portal/app/test-cases/[file]/page.tsx +323 -0
- package/portal/app/test-cases/[file]/test-file-document.tsx +335 -0
- package/portal/app/test-cases/page.tsx +546 -0
- package/portal/app/test-cases/test-cases-document.tsx +384 -0
- package/portal/components/code-block.tsx +57 -0
- package/portal/components/document/doc-params-table.tsx +71 -0
- package/portal/components/document/doc-section.tsx +133 -0
- package/portal/components/document/doc-table.tsx +119 -0
- package/portal/components/document/index.ts +9 -0
- package/portal/components/drawflow-er-diagram.tsx +607 -0
- package/portal/components/interactive-er-diagram.tsx +228 -0
- package/portal/components/layout/app-sidebar.tsx +490 -0
- package/portal/components/layout/er-sidebar.tsx +116 -0
- package/portal/components/layout/global-header.tsx +117 -0
- package/portal/components/layout/layout-content.tsx +48 -0
- package/portal/components/markdown-content.tsx +120 -0
- package/portal/components/mermaid-diagram.tsx +83 -0
- package/portal/components/reactflow-er-diagram.tsx +475 -0
- package/portal/components/search-dialog.tsx +268 -0
- package/portal/components/shared/coverage-score-bar.tsx +144 -0
- package/portal/components/swagger/endpoint-accordion.tsx +117 -0
- package/portal/components/swagger/index.ts +7 -0
- package/portal/components/swagger/method-badge.tsx +55 -0
- package/portal/components/swagger/params-table.tsx +78 -0
- package/portal/components/tabs-with-hash.tsx +43 -0
- package/portal/components/test/index.ts +2 -0
- package/portal/components/test/test-bdd-card.tsx +192 -0
- package/portal/components/test/test-matrix.tsx +242 -0
- package/portal/components/ui/accordion.tsx +66 -0
- package/portal/components/ui/badge.tsx +46 -0
- package/portal/components/ui/breadcrumb.tsx +109 -0
- package/portal/components/ui/button.tsx +62 -0
- package/portal/components/ui/card.tsx +92 -0
- package/portal/components/ui/collapsible.tsx +33 -0
- package/portal/components/ui/dialog.tsx +118 -0
- package/portal/components/ui/progress.tsx +28 -0
- package/portal/components/ui/scroll-area.tsx +58 -0
- package/portal/components/ui/sheet.tsx +139 -0
- package/portal/components/ui/table.tsx +116 -0
- package/portal/components/ui/tabs.tsx +66 -0
- package/portal/components.json +21 -0
- package/portal/lib/constants/test-categories.ts +186 -0
- package/portal/lib/data-loader.ts +1181 -0
- package/portal/lib/db-schema-utils.ts +182 -0
- package/portal/lib/format.ts +43 -0
- package/portal/lib/hooks/use-hash-tab.ts +144 -0
- package/portal/lib/path-utils.ts +25 -0
- package/portal/lib/search-index-generator.ts +214 -0
- package/portal/lib/search.ts +126 -0
- package/portal/lib/sidebar-context.tsx +111 -0
- package/portal/lib/types.ts +740 -0
- package/portal/lib/utils.ts +6 -0
- package/portal/next.config.ts +21 -0
- package/portal/package.json +45 -0
- package/portal/postcss.config.mjs +8 -0
- package/portal/tsconfig.json +41 -0
- package/portal/types/drawflow.d.ts +80 -0
- package/templates/README.md +73 -0
- package/templates/coverage.html +367 -0
- package/templates/dark-theme.css +443 -0
- package/templates/discussion/adr.yml.hbs +65 -0
- package/templates/discussion/handovers.yml.hbs +57 -0
- package/templates/discussion/knowledge.yml.hbs +60 -0
- package/templates/discussion/reports.yml.hbs +68 -0
- package/templates/discussion/research.yml.hbs +61 -0
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table Detail - ドキュメント形式表示
|
|
3
|
+
*
|
|
4
|
+
* テーブル詳細をテーブル・アコーディオン形式で表示
|
|
5
|
+
* 視線移動を減らすため、タグではなくテーブル形式を使用
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import Link from "next/link";
|
|
9
|
+
import {
|
|
10
|
+
Database,
|
|
11
|
+
Key,
|
|
12
|
+
Link2,
|
|
13
|
+
Hash,
|
|
14
|
+
ArrowLeft,
|
|
15
|
+
ArrowRight,
|
|
16
|
+
Table2,
|
|
17
|
+
FileCode,
|
|
18
|
+
Code,
|
|
19
|
+
Monitor,
|
|
20
|
+
Component,
|
|
21
|
+
Bot,
|
|
22
|
+
Wrench,
|
|
23
|
+
} from "lucide-react";
|
|
24
|
+
import type {
|
|
25
|
+
FeatureMapData,
|
|
26
|
+
ActionItem,
|
|
27
|
+
ScreenItem,
|
|
28
|
+
ComponentItem,
|
|
29
|
+
DbTable,
|
|
30
|
+
DbColumn,
|
|
31
|
+
DbSchemaData,
|
|
32
|
+
ApiToolsData,
|
|
33
|
+
} from "@/lib/types";
|
|
34
|
+
import { Badge } from "@/components/ui/badge";
|
|
35
|
+
import { Button } from "@/components/ui/button";
|
|
36
|
+
import { DocSection, DocTable, type DocTableColumn } from "@/components/document";
|
|
37
|
+
import {
|
|
38
|
+
normalizeCategory,
|
|
39
|
+
getCategoryConfig,
|
|
40
|
+
} from "@/lib/db-schema-utils";
|
|
41
|
+
|
|
42
|
+
// MCP Tool type
|
|
43
|
+
interface ApiTool {
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
category?: string;
|
|
47
|
+
dbTables?: string[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Feature Map related items type
|
|
51
|
+
interface RelatedFeatureItems {
|
|
52
|
+
actions: { moduleName: string; action: ActionItem }[];
|
|
53
|
+
screens: { moduleName: string; screen: ScreenItem }[];
|
|
54
|
+
components: { moduleName: string; component: ComponentItem }[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Find related API tools for a table
|
|
59
|
+
*/
|
|
60
|
+
function findRelatedApiTools(tableName: string, apiTools: ApiToolsData | null): ApiTool[] {
|
|
61
|
+
if (!apiTools?.tools) return [];
|
|
62
|
+
return apiTools.tools.filter((tool) => tool.dbTables?.includes(tableName));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Find related Feature Map items for a table
|
|
67
|
+
*/
|
|
68
|
+
function findRelatedFeatureItems(
|
|
69
|
+
tableName: string,
|
|
70
|
+
featureMap: FeatureMapData
|
|
71
|
+
): RelatedFeatureItems {
|
|
72
|
+
const result: RelatedFeatureItems = {
|
|
73
|
+
actions: [],
|
|
74
|
+
screens: [],
|
|
75
|
+
components: [],
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const relatedActionNames = new Set<string>();
|
|
79
|
+
|
|
80
|
+
const allModules: [string, typeof featureMap.features[string]][] = [
|
|
81
|
+
...Object.entries(featureMap.features),
|
|
82
|
+
["uncategorized", featureMap.uncategorized],
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
for (const [moduleName, group] of allModules) {
|
|
86
|
+
if (!group) continue;
|
|
87
|
+
|
|
88
|
+
for (const action of group.actions || []) {
|
|
89
|
+
if (action.dbTables?.includes(tableName)) {
|
|
90
|
+
result.actions.push({ moduleName, action });
|
|
91
|
+
relatedActionNames.add(action.name);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
for (const [moduleName, group] of allModules) {
|
|
97
|
+
if (!group) continue;
|
|
98
|
+
|
|
99
|
+
for (const screen of group.screens || []) {
|
|
100
|
+
if (screen.actions?.some((a) => relatedActionNames.has(a))) {
|
|
101
|
+
result.screens.push({ moduleName, screen });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Column row type for table
|
|
110
|
+
interface ColumnRow {
|
|
111
|
+
name: string;
|
|
112
|
+
type: string;
|
|
113
|
+
isPrimaryKey: boolean;
|
|
114
|
+
isUnique: boolean;
|
|
115
|
+
isRequired: boolean;
|
|
116
|
+
referencedTable?: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
defaultValue?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Relationship row types
|
|
122
|
+
interface ReferenceRow {
|
|
123
|
+
column: string;
|
|
124
|
+
targetTable: string;
|
|
125
|
+
targetColumn: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
interface ReferencedByRow {
|
|
129
|
+
sourceTable: string;
|
|
130
|
+
sourceColumn: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Related table row
|
|
134
|
+
interface RelatedTableRow {
|
|
135
|
+
name: string;
|
|
136
|
+
columnCount: number;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Usage row types
|
|
140
|
+
interface ActionRow {
|
|
141
|
+
name: string;
|
|
142
|
+
module: string;
|
|
143
|
+
app?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
interface ScreenRow {
|
|
147
|
+
name: string;
|
|
148
|
+
module: string;
|
|
149
|
+
app?: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface ApiToolRow {
|
|
153
|
+
name: string;
|
|
154
|
+
description: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface TableDetailDocumentProps {
|
|
158
|
+
table: DbTable;
|
|
159
|
+
allTables: DbTable[];
|
|
160
|
+
featureMap: FeatureMapData | null;
|
|
161
|
+
apiTools: ApiToolsData | null;
|
|
162
|
+
urlPrefix: string;
|
|
163
|
+
dbName?: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Table Detail Document Component
|
|
168
|
+
*/
|
|
169
|
+
export function TableDetailDocument({
|
|
170
|
+
table,
|
|
171
|
+
allTables,
|
|
172
|
+
featureMap,
|
|
173
|
+
apiTools,
|
|
174
|
+
urlPrefix,
|
|
175
|
+
dbName,
|
|
176
|
+
}: TableDetailDocumentProps) {
|
|
177
|
+
const tableName = table.name;
|
|
178
|
+
const category = normalizeCategory(table.category);
|
|
179
|
+
const config = getCategoryConfig(category);
|
|
180
|
+
const columnCount = table.columns?.length ?? table.columnCount ?? 0;
|
|
181
|
+
|
|
182
|
+
// Build FK map
|
|
183
|
+
const foreignKeyMap = new Map<string, { table: string; column: string }>();
|
|
184
|
+
if (table.foreignKeys) {
|
|
185
|
+
for (const fk of table.foreignKeys) {
|
|
186
|
+
foreignKeyMap.set(fk.column, { table: fk.references.table, column: fk.references.column });
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Find tables that reference this table
|
|
191
|
+
const referencedBy: ReferencedByRow[] = [];
|
|
192
|
+
for (const t of allTables) {
|
|
193
|
+
if (t.foreignKeys) {
|
|
194
|
+
for (const fk of t.foreignKeys) {
|
|
195
|
+
if (fk.references.table === tableName) {
|
|
196
|
+
referencedBy.push({ sourceTable: t.name, sourceColumn: fk.column });
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Find same-category tables for navigation
|
|
203
|
+
const sameCategoryTables: RelatedTableRow[] = allTables
|
|
204
|
+
.filter((t) => normalizeCategory(t.category) === category && t.name !== tableName)
|
|
205
|
+
.slice(0, 10)
|
|
206
|
+
.map((t) => ({
|
|
207
|
+
name: t.name,
|
|
208
|
+
columnCount: t.columns?.length ?? t.columnCount ?? 0,
|
|
209
|
+
}));
|
|
210
|
+
|
|
211
|
+
// Find related Feature Map items
|
|
212
|
+
const relatedFeatureItems = featureMap
|
|
213
|
+
? findRelatedFeatureItems(tableName, featureMap)
|
|
214
|
+
: null;
|
|
215
|
+
|
|
216
|
+
// Find related API tools
|
|
217
|
+
const relatedApiTools = findRelatedApiTools(tableName, apiTools);
|
|
218
|
+
|
|
219
|
+
// Find prev/next table
|
|
220
|
+
const tableIndex = allTables.findIndex((t) => t.name === tableName);
|
|
221
|
+
const prevTable = tableIndex > 0 ? allTables[tableIndex - 1] : null;
|
|
222
|
+
const nextTable = tableIndex < allTables.length - 1 ? allTables[tableIndex + 1] : null;
|
|
223
|
+
|
|
224
|
+
// Prepare column data
|
|
225
|
+
const columnRows: ColumnRow[] = (table.columns || []).map((col) => {
|
|
226
|
+
const fk = foreignKeyMap.get(col.name);
|
|
227
|
+
return {
|
|
228
|
+
name: col.name,
|
|
229
|
+
type: col.type,
|
|
230
|
+
isPrimaryKey: col.primaryKey || false,
|
|
231
|
+
isUnique: col.unique || false,
|
|
232
|
+
isRequired: !col.nullable && !col.primaryKey,
|
|
233
|
+
referencedTable: fk?.table,
|
|
234
|
+
description: col.description,
|
|
235
|
+
defaultValue: col.default,
|
|
236
|
+
};
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// Prepare reference data
|
|
240
|
+
const referenceRows: ReferenceRow[] = (table.foreignKeys || []).map((fk) => ({
|
|
241
|
+
column: fk.column,
|
|
242
|
+
targetTable: fk.references.table,
|
|
243
|
+
targetColumn: fk.references.column,
|
|
244
|
+
}));
|
|
245
|
+
|
|
246
|
+
// Prepare usage data
|
|
247
|
+
const actionRows: ActionRow[] = (relatedFeatureItems?.actions || []).map(({ moduleName, action }) => ({
|
|
248
|
+
name: action.name,
|
|
249
|
+
module: moduleName,
|
|
250
|
+
app: action.app,
|
|
251
|
+
}));
|
|
252
|
+
|
|
253
|
+
const screenRows: ScreenRow[] = (relatedFeatureItems?.screens || []).map(({ moduleName, screen }) => ({
|
|
254
|
+
name: screen.name,
|
|
255
|
+
module: moduleName,
|
|
256
|
+
app: screen.app,
|
|
257
|
+
}));
|
|
258
|
+
|
|
259
|
+
const apiToolRows: ApiToolRow[] = relatedApiTools.map((tool) => ({
|
|
260
|
+
name: tool.name,
|
|
261
|
+
description: tool.description,
|
|
262
|
+
}));
|
|
263
|
+
|
|
264
|
+
// Column definitions
|
|
265
|
+
const columnColumns: DocTableColumn<ColumnRow>[] = [
|
|
266
|
+
{
|
|
267
|
+
key: "name",
|
|
268
|
+
header: "Column",
|
|
269
|
+
width: "180px",
|
|
270
|
+
render: (_, row) => <span className="font-mono font-medium">{row.name}</span>,
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
key: "type",
|
|
274
|
+
header: "Type",
|
|
275
|
+
width: "140px",
|
|
276
|
+
render: (_, row) => (
|
|
277
|
+
<code className="rounded bg-muted px-1.5 py-0.5 text-xs">{row.type}</code>
|
|
278
|
+
),
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
key: "constraints",
|
|
282
|
+
header: "Constraints",
|
|
283
|
+
width: "200px",
|
|
284
|
+
render: (_, row) => (
|
|
285
|
+
<div className="flex flex-wrap gap-1">
|
|
286
|
+
{row.isPrimaryKey && (
|
|
287
|
+
<Badge className="bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400 border-0 text-xs">
|
|
288
|
+
<Key className="mr-1 h-3 w-3" />
|
|
289
|
+
PK
|
|
290
|
+
</Badge>
|
|
291
|
+
)}
|
|
292
|
+
{row.isUnique && !row.isPrimaryKey && (
|
|
293
|
+
<Badge className="bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400 border-0 text-xs">
|
|
294
|
+
<Hash className="mr-1 h-3 w-3" />
|
|
295
|
+
Unique
|
|
296
|
+
</Badge>
|
|
297
|
+
)}
|
|
298
|
+
{row.isRequired && (
|
|
299
|
+
<Badge className="bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400 border-0 text-xs">
|
|
300
|
+
Required
|
|
301
|
+
</Badge>
|
|
302
|
+
)}
|
|
303
|
+
{row.referencedTable && (
|
|
304
|
+
<Link href={`${urlPrefix}/${encodeURIComponent(row.referencedTable)}`}>
|
|
305
|
+
<Badge className="bg-accent-purple/10 text-accent-purple border-0 cursor-pointer hover:bg-accent-purple/20 text-xs">
|
|
306
|
+
<Database className="mr-1 h-3 w-3" />
|
|
307
|
+
→ {row.referencedTable}
|
|
308
|
+
</Badge>
|
|
309
|
+
</Link>
|
|
310
|
+
)}
|
|
311
|
+
</div>
|
|
312
|
+
),
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
key: "description",
|
|
316
|
+
header: "Description",
|
|
317
|
+
render: (_, row) => row.description || "-",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
key: "defaultValue",
|
|
321
|
+
header: "Default",
|
|
322
|
+
width: "120px",
|
|
323
|
+
render: (_, row) =>
|
|
324
|
+
row.defaultValue ? (
|
|
325
|
+
<code className="rounded bg-muted px-1.5 py-0.5 text-xs">{row.defaultValue}</code>
|
|
326
|
+
) : (
|
|
327
|
+
"-"
|
|
328
|
+
),
|
|
329
|
+
},
|
|
330
|
+
];
|
|
331
|
+
|
|
332
|
+
// Reference columns
|
|
333
|
+
const referenceColumns: DocTableColumn<ReferenceRow>[] = [
|
|
334
|
+
{
|
|
335
|
+
key: "column",
|
|
336
|
+
header: "Column",
|
|
337
|
+
width: "200px",
|
|
338
|
+
render: (_, row) => <span className="font-mono">{row.column}</span>,
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
key: "targetTable",
|
|
342
|
+
header: "References Table",
|
|
343
|
+
width: "200px",
|
|
344
|
+
render: (_, row) => (
|
|
345
|
+
<Link
|
|
346
|
+
href={`${urlPrefix}/${encodeURIComponent(row.targetTable)}`}
|
|
347
|
+
className="font-mono text-primary hover:underline"
|
|
348
|
+
>
|
|
349
|
+
{row.targetTable}
|
|
350
|
+
</Link>
|
|
351
|
+
),
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
key: "targetColumn",
|
|
355
|
+
header: "Target Column",
|
|
356
|
+
render: (_, row) => <span className="font-mono">{row.targetColumn}</span>,
|
|
357
|
+
},
|
|
358
|
+
];
|
|
359
|
+
|
|
360
|
+
// Referenced by columns
|
|
361
|
+
const referencedByColumns: DocTableColumn<ReferencedByRow>[] = [
|
|
362
|
+
{
|
|
363
|
+
key: "sourceTable",
|
|
364
|
+
header: "Table",
|
|
365
|
+
width: "200px",
|
|
366
|
+
render: (_, row) => (
|
|
367
|
+
<Link
|
|
368
|
+
href={`${urlPrefix}/${encodeURIComponent(row.sourceTable)}`}
|
|
369
|
+
className="font-mono text-primary hover:underline"
|
|
370
|
+
>
|
|
371
|
+
{row.sourceTable}
|
|
372
|
+
</Link>
|
|
373
|
+
),
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
key: "sourceColumn",
|
|
377
|
+
header: "Column",
|
|
378
|
+
render: (_, row) => <span className="font-mono">{row.sourceColumn}</span>,
|
|
379
|
+
},
|
|
380
|
+
];
|
|
381
|
+
|
|
382
|
+
// Related table columns
|
|
383
|
+
const relatedTableColumns: DocTableColumn<RelatedTableRow>[] = [
|
|
384
|
+
{
|
|
385
|
+
key: "name",
|
|
386
|
+
header: "Table",
|
|
387
|
+
width: "200px",
|
|
388
|
+
render: (_, row) => (
|
|
389
|
+
<Link
|
|
390
|
+
href={`${urlPrefix}/${encodeURIComponent(row.name)}`}
|
|
391
|
+
className="font-mono text-primary hover:underline"
|
|
392
|
+
>
|
|
393
|
+
{row.name}
|
|
394
|
+
</Link>
|
|
395
|
+
),
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
key: "columnCount",
|
|
399
|
+
header: "Columns",
|
|
400
|
+
width: "100px",
|
|
401
|
+
align: "right",
|
|
402
|
+
render: (_, row) => row.columnCount,
|
|
403
|
+
},
|
|
404
|
+
];
|
|
405
|
+
|
|
406
|
+
// Action columns
|
|
407
|
+
const actionColumns: DocTableColumn<ActionRow>[] = [
|
|
408
|
+
{
|
|
409
|
+
key: "name",
|
|
410
|
+
header: "Action",
|
|
411
|
+
width: "250px",
|
|
412
|
+
render: (_, row) => (
|
|
413
|
+
<Link
|
|
414
|
+
href={`/details/actions/${encodeURIComponent(row.module)}/${encodeURIComponent(row.name)}`}
|
|
415
|
+
className="font-mono text-primary hover:underline flex items-center gap-1"
|
|
416
|
+
>
|
|
417
|
+
<Code className="h-3 w-3 text-accent-yellow" />
|
|
418
|
+
{row.name}
|
|
419
|
+
</Link>
|
|
420
|
+
),
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
key: "module",
|
|
424
|
+
header: "Module",
|
|
425
|
+
width: "150px",
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
key: "app",
|
|
429
|
+
header: "App",
|
|
430
|
+
width: "100px",
|
|
431
|
+
render: (_, row) => row.app || "-",
|
|
432
|
+
},
|
|
433
|
+
];
|
|
434
|
+
|
|
435
|
+
// Screen columns
|
|
436
|
+
const screenColumns: DocTableColumn<ScreenRow>[] = [
|
|
437
|
+
{
|
|
438
|
+
key: "name",
|
|
439
|
+
header: "Screen",
|
|
440
|
+
width: "250px",
|
|
441
|
+
render: (_, row) => (
|
|
442
|
+
<Link
|
|
443
|
+
href={`/details/screens/${encodeURIComponent(row.module)}/${encodeURIComponent(row.name)}`}
|
|
444
|
+
className="font-mono text-primary hover:underline flex items-center gap-1"
|
|
445
|
+
>
|
|
446
|
+
<Monitor className="h-3 w-3 text-accent-blue" />
|
|
447
|
+
{row.name}
|
|
448
|
+
</Link>
|
|
449
|
+
),
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
key: "module",
|
|
453
|
+
header: "Module",
|
|
454
|
+
width: "150px",
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
key: "app",
|
|
458
|
+
header: "App",
|
|
459
|
+
width: "100px",
|
|
460
|
+
render: (_, row) => row.app || "-",
|
|
461
|
+
},
|
|
462
|
+
];
|
|
463
|
+
|
|
464
|
+
// API Tool columns
|
|
465
|
+
const apiToolColumns: DocTableColumn<ApiToolRow>[] = [
|
|
466
|
+
{
|
|
467
|
+
key: "name",
|
|
468
|
+
header: "Tool",
|
|
469
|
+
width: "250px",
|
|
470
|
+
render: (_, row) => (
|
|
471
|
+
<Link
|
|
472
|
+
href={`/apps/mcp/tools/${row.name}`}
|
|
473
|
+
className="font-mono text-primary hover:underline flex items-center gap-1"
|
|
474
|
+
>
|
|
475
|
+
<Wrench className="h-3 w-3 text-purple-500" />
|
|
476
|
+
{row.name}
|
|
477
|
+
</Link>
|
|
478
|
+
),
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
key: "description",
|
|
482
|
+
header: "Description",
|
|
483
|
+
},
|
|
484
|
+
];
|
|
485
|
+
|
|
486
|
+
// Summary data
|
|
487
|
+
const summaryData = [
|
|
488
|
+
{ metric: "Columns", value: columnCount },
|
|
489
|
+
{ metric: "Foreign Keys", value: table.foreignKeys?.length ?? 0 },
|
|
490
|
+
{ metric: "Referenced By", value: referencedBy.length },
|
|
491
|
+
{ metric: "Indexes", value: table.indexes?.length ?? 0 },
|
|
492
|
+
{ metric: "Used By Actions", value: actionRows.length },
|
|
493
|
+
{ metric: "API Tools", value: apiToolRows.length },
|
|
494
|
+
];
|
|
495
|
+
|
|
496
|
+
const summaryColumns: DocTableColumn<(typeof summaryData)[0]>[] = [
|
|
497
|
+
{ key: "metric", header: "Metric", width: "150px" },
|
|
498
|
+
{
|
|
499
|
+
key: "value",
|
|
500
|
+
header: "Count",
|
|
501
|
+
width: "80px",
|
|
502
|
+
align: "right",
|
|
503
|
+
render: (_, row) => <span className="font-bold">{row.value}</span>,
|
|
504
|
+
},
|
|
505
|
+
];
|
|
506
|
+
|
|
507
|
+
return (
|
|
508
|
+
<div className="space-y-6">
|
|
509
|
+
{/* Header */}
|
|
510
|
+
<header className="space-y-4">
|
|
511
|
+
<div className="flex items-start gap-4">
|
|
512
|
+
<div className={`rounded-lg p-3 ${config.bgColor}`}>
|
|
513
|
+
<Table2 className={`h-8 w-8 ${config.color}`} />
|
|
514
|
+
</div>
|
|
515
|
+
<div className="flex-1">
|
|
516
|
+
<div className="flex items-center gap-3 flex-wrap">
|
|
517
|
+
<h1 className="text-3xl font-bold font-mono tracking-tight">{tableName}</h1>
|
|
518
|
+
<Badge variant="outline" className={config.bgColor}>
|
|
519
|
+
{config.label}
|
|
520
|
+
</Badge>
|
|
521
|
+
{dbName && (
|
|
522
|
+
<Badge variant="secondary" className="font-mono">
|
|
523
|
+
{dbName}
|
|
524
|
+
</Badge>
|
|
525
|
+
)}
|
|
526
|
+
</div>
|
|
527
|
+
{table.file && (
|
|
528
|
+
<p className="mt-1 text-sm text-muted-foreground flex items-center gap-1">
|
|
529
|
+
<FileCode className="h-3.5 w-3.5" />
|
|
530
|
+
Defined in <code className="rounded bg-muted px-1">{table.file}</code>
|
|
531
|
+
</p>
|
|
532
|
+
)}
|
|
533
|
+
</div>
|
|
534
|
+
</div>
|
|
535
|
+
{table.description && table.description !== "*" && (
|
|
536
|
+
<div className="rounded-lg border bg-muted/30 p-4">
|
|
537
|
+
<p className="text-sm text-muted-foreground whitespace-pre-line leading-relaxed">
|
|
538
|
+
{table.description}
|
|
539
|
+
</p>
|
|
540
|
+
</div>
|
|
541
|
+
)}
|
|
542
|
+
</header>
|
|
543
|
+
|
|
544
|
+
{/* Summary */}
|
|
545
|
+
<DocSection
|
|
546
|
+
title="サマリー"
|
|
547
|
+
variant="info"
|
|
548
|
+
icon={<Database className="h-4 w-4" />}
|
|
549
|
+
preview={`${columnCount} cols, ${table.foreignKeys?.length ?? 0} FK`}
|
|
550
|
+
defaultOpen
|
|
551
|
+
>
|
|
552
|
+
<DocTable columns={summaryColumns} data={summaryData} />
|
|
553
|
+
</DocSection>
|
|
554
|
+
|
|
555
|
+
{/* Columns */}
|
|
556
|
+
<DocSection
|
|
557
|
+
title="カラム一覧"
|
|
558
|
+
variant="primary"
|
|
559
|
+
icon={<Table2 className="h-4 w-4" />}
|
|
560
|
+
badge={<Badge variant="outline">{columnCount}</Badge>}
|
|
561
|
+
preview={columnRows.slice(0, 3).map(r => r.name).join(", ") + (columnRows.length > 3 ? "..." : "")}
|
|
562
|
+
defaultOpen
|
|
563
|
+
>
|
|
564
|
+
{columnRows.length > 0 ? (
|
|
565
|
+
<DocTable columns={columnColumns} data={columnRows} />
|
|
566
|
+
) : (
|
|
567
|
+
<p className="text-sm text-muted-foreground">
|
|
568
|
+
Column details not available. Run <code className="rounded bg-muted px-1">shirokuma-docs schema --full</code> to generate.
|
|
569
|
+
</p>
|
|
570
|
+
)}
|
|
571
|
+
</DocSection>
|
|
572
|
+
|
|
573
|
+
{/* Indexes */}
|
|
574
|
+
{table.indexes && table.indexes.length > 0 && (
|
|
575
|
+
<DocSection
|
|
576
|
+
title="インデックス"
|
|
577
|
+
variant="cyan"
|
|
578
|
+
icon={<Hash className="h-4 w-4" />}
|
|
579
|
+
badge={<Badge variant="outline">{table.indexes.length}</Badge>}
|
|
580
|
+
preview={table.indexes.slice(0, 2).map(i => i.name).join(", ")}
|
|
581
|
+
defaultOpen
|
|
582
|
+
>
|
|
583
|
+
<DocTable
|
|
584
|
+
columns={[
|
|
585
|
+
{ key: "name", header: "Name", width: "200px", render: (_, row) => <span className="font-mono">{row.name}</span> },
|
|
586
|
+
{ key: "columns", header: "Columns", render: (_, row) => row.columns?.join(", ") || "-" },
|
|
587
|
+
{ key: "unique", header: "Unique", width: "80px", align: "center", render: (_, row) => row.unique ? "Yes" : "-" },
|
|
588
|
+
{ key: "description", header: "Description", render: (_, row) => row.description || "-" },
|
|
589
|
+
]}
|
|
590
|
+
data={table.indexes}
|
|
591
|
+
/>
|
|
592
|
+
</DocSection>
|
|
593
|
+
)}
|
|
594
|
+
|
|
595
|
+
{/* Relationships - References */}
|
|
596
|
+
{referenceRows.length > 0 && (
|
|
597
|
+
<DocSection
|
|
598
|
+
title="外部キー参照 (このテーブル → 他テーブル)"
|
|
599
|
+
variant="purple"
|
|
600
|
+
icon={<ArrowRight className="h-4 w-4" />}
|
|
601
|
+
badge={<Badge variant="outline">{referenceRows.length}</Badge>}
|
|
602
|
+
preview={referenceRows.slice(0, 2).map(r => `→${r.targetTable}`).join(", ")}
|
|
603
|
+
defaultOpen
|
|
604
|
+
>
|
|
605
|
+
<DocTable columns={referenceColumns} data={referenceRows} />
|
|
606
|
+
</DocSection>
|
|
607
|
+
)}
|
|
608
|
+
|
|
609
|
+
{/* Relationships - Referenced By */}
|
|
610
|
+
{referencedBy.length > 0 && (
|
|
611
|
+
<DocSection
|
|
612
|
+
title="被参照 (他テーブル → このテーブル)"
|
|
613
|
+
variant="success"
|
|
614
|
+
icon={<ArrowLeft className="h-4 w-4" />}
|
|
615
|
+
badge={<Badge variant="outline">{referencedBy.length}</Badge>}
|
|
616
|
+
preview={referencedBy.slice(0, 2).map(r => `${r.sourceTable}←`).join(", ")}
|
|
617
|
+
defaultOpen
|
|
618
|
+
>
|
|
619
|
+
<DocTable columns={referencedByColumns} data={referencedBy} />
|
|
620
|
+
</DocSection>
|
|
621
|
+
)}
|
|
622
|
+
|
|
623
|
+
{/* Related Tables */}
|
|
624
|
+
{sameCategoryTables.length > 0 && (
|
|
625
|
+
<DocSection
|
|
626
|
+
title={`関連テーブル (${config.label})`}
|
|
627
|
+
variant="default"
|
|
628
|
+
icon={<Link2 className="h-4 w-4" />}
|
|
629
|
+
badge={<Badge variant="outline">{sameCategoryTables.length}</Badge>}
|
|
630
|
+
preview={sameCategoryTables.slice(0, 3).map(t => t.name).join(", ")}
|
|
631
|
+
defaultOpen
|
|
632
|
+
>
|
|
633
|
+
<DocTable columns={relatedTableColumns} data={sameCategoryTables} />
|
|
634
|
+
</DocSection>
|
|
635
|
+
)}
|
|
636
|
+
|
|
637
|
+
{/* Usage - Actions */}
|
|
638
|
+
{actionRows.length > 0 && (
|
|
639
|
+
<DocSection
|
|
640
|
+
title="使用するServer Actions"
|
|
641
|
+
variant="warning"
|
|
642
|
+
icon={<Code className="h-4 w-4" />}
|
|
643
|
+
badge={<Badge variant="outline">{actionRows.length}</Badge>}
|
|
644
|
+
preview={actionRows.slice(0, 2).map(a => a.name).join(", ")}
|
|
645
|
+
defaultOpen
|
|
646
|
+
>
|
|
647
|
+
<DocTable columns={actionColumns} data={actionRows} />
|
|
648
|
+
</DocSection>
|
|
649
|
+
)}
|
|
650
|
+
|
|
651
|
+
{/* Usage - Screens */}
|
|
652
|
+
{screenRows.length > 0 && (
|
|
653
|
+
<DocSection
|
|
654
|
+
title="使用する画面"
|
|
655
|
+
variant="info"
|
|
656
|
+
icon={<Monitor className="h-4 w-4" />}
|
|
657
|
+
badge={<Badge variant="outline">{screenRows.length}</Badge>}
|
|
658
|
+
preview={screenRows.slice(0, 2).map(s => s.name).join(", ")}
|
|
659
|
+
defaultOpen
|
|
660
|
+
>
|
|
661
|
+
<DocTable columns={screenColumns} data={screenRows} />
|
|
662
|
+
</DocSection>
|
|
663
|
+
)}
|
|
664
|
+
|
|
665
|
+
{/* Usage - API Tools */}
|
|
666
|
+
{apiToolRows.length > 0 && (
|
|
667
|
+
<DocSection
|
|
668
|
+
title="使用するAPIツール"
|
|
669
|
+
variant="purple"
|
|
670
|
+
icon={<Bot className="h-4 w-4" />}
|
|
671
|
+
badge={<Badge variant="outline">{apiToolRows.length}</Badge>}
|
|
672
|
+
preview={apiToolRows.slice(0, 2).map(t => t.name).join(", ")}
|
|
673
|
+
defaultOpen
|
|
674
|
+
>
|
|
675
|
+
<DocTable columns={apiToolColumns} data={apiToolRows} />
|
|
676
|
+
</DocSection>
|
|
677
|
+
)}
|
|
678
|
+
|
|
679
|
+
{/* Prev/Next navigation */}
|
|
680
|
+
<div className="flex items-center justify-between pt-4 border-t">
|
|
681
|
+
{prevTable ? (
|
|
682
|
+
<Button asChild variant="ghost" className="gap-2">
|
|
683
|
+
<Link href={`${urlPrefix}/${encodeURIComponent(prevTable.name)}`}>
|
|
684
|
+
<ArrowLeft className="h-4 w-4" />
|
|
685
|
+
<span className="font-mono">{prevTable.name}</span>
|
|
686
|
+
</Link>
|
|
687
|
+
</Button>
|
|
688
|
+
) : (
|
|
689
|
+
<div />
|
|
690
|
+
)}
|
|
691
|
+
<Button asChild variant="outline">
|
|
692
|
+
<Link href={dbName ? `/db-schema/${encodeURIComponent(dbName)}` : "/db-schema"}>
|
|
693
|
+
<Database className="mr-2 h-4 w-4" />
|
|
694
|
+
All Tables
|
|
695
|
+
</Link>
|
|
696
|
+
</Button>
|
|
697
|
+
{nextTable ? (
|
|
698
|
+
<Button asChild variant="ghost" className="gap-2">
|
|
699
|
+
<Link href={`${urlPrefix}/${encodeURIComponent(nextTable.name)}`}>
|
|
700
|
+
<span className="font-mono">{nextTable.name}</span>
|
|
701
|
+
<ArrowRight className="h-4 w-4" />
|
|
702
|
+
</Link>
|
|
703
|
+
</Button>
|
|
704
|
+
) : (
|
|
705
|
+
<div />
|
|
706
|
+
)}
|
|
707
|
+
</div>
|
|
708
|
+
</div>
|
|
709
|
+
);
|
|
710
|
+
}
|