@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,384 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test Cases - ドキュメント形式表示
|
|
3
|
+
*
|
|
4
|
+
* テスト統計をテーブル・アコーディオン形式で表示
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import Link from "next/link";
|
|
8
|
+
import {
|
|
9
|
+
FlaskConical,
|
|
10
|
+
AppWindow,
|
|
11
|
+
ArrowRight,
|
|
12
|
+
BarChart3,
|
|
13
|
+
AlertTriangle,
|
|
14
|
+
CheckCircle2,
|
|
15
|
+
XCircle,
|
|
16
|
+
} from "lucide-react";
|
|
17
|
+
import { Badge } from "@/components/ui/badge";
|
|
18
|
+
import { Progress } from "@/components/ui/progress";
|
|
19
|
+
import { DocSection, DocTable, type DocTableColumn } from "@/components/document";
|
|
20
|
+
import type { TestCasesData, ApplicationsData } from "@/lib/types";
|
|
21
|
+
|
|
22
|
+
// Test category labels
|
|
23
|
+
const testCategoryLabels: Record<string, { ja: string; color: string }> = {
|
|
24
|
+
"happy-path": { ja: "正常系", color: "bg-green-500" },
|
|
25
|
+
auth: { ja: "認証", color: "bg-blue-500" },
|
|
26
|
+
"error-handling": { ja: "異常系", color: "bg-red-500" },
|
|
27
|
+
validation: { ja: "バリデーション", color: "bg-yellow-500" },
|
|
28
|
+
"edge-case": { ja: "境界値", color: "bg-purple-500" },
|
|
29
|
+
integration: { ja: "統合", color: "bg-cyan-500" },
|
|
30
|
+
other: { ja: "その他", color: "bg-gray-500" },
|
|
31
|
+
success: { ja: "正常系", color: "bg-green-500" },
|
|
32
|
+
error: { ja: "異常系", color: "bg-red-500" },
|
|
33
|
+
edge: { ja: "境界値", color: "bg-purple-500" },
|
|
34
|
+
unknown: { ja: "その他", color: "bg-gray-500" },
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
interface AppStatItem {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
total: number;
|
|
42
|
+
jest: number;
|
|
43
|
+
e2e: number;
|
|
44
|
+
percentage: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface CategoryItem {
|
|
48
|
+
category: string;
|
|
49
|
+
label: string;
|
|
50
|
+
count: number;
|
|
51
|
+
percentage: number;
|
|
52
|
+
colorClass: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface TestCasesDocumentProps {
|
|
56
|
+
data: TestCasesData;
|
|
57
|
+
applications: ApplicationsData | null;
|
|
58
|
+
coverageStats: {
|
|
59
|
+
totalItems: number;
|
|
60
|
+
testedItems: number;
|
|
61
|
+
coveragePercent: number;
|
|
62
|
+
};
|
|
63
|
+
coverageGapsCount: number;
|
|
64
|
+
qualityAnalysis: {
|
|
65
|
+
status: "good" | "warning" | "poor";
|
|
66
|
+
message: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function TestCasesDocument({
|
|
71
|
+
data,
|
|
72
|
+
applications,
|
|
73
|
+
coverageStats,
|
|
74
|
+
coverageGapsCount,
|
|
75
|
+
qualityAnalysis,
|
|
76
|
+
}: TestCasesDocumentProps) {
|
|
77
|
+
// Calculate category breakdown
|
|
78
|
+
const categoryBreakdown: Record<string, number> = {};
|
|
79
|
+
for (const tc of data.testCases) {
|
|
80
|
+
const cat = tc.category || "unknown";
|
|
81
|
+
categoryBreakdown[cat] = (categoryBreakdown[cat] || 0) + 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Calculate per-app stats
|
|
85
|
+
const appStats: AppStatItem[] =
|
|
86
|
+
applications?.apps?.map((app) => {
|
|
87
|
+
const appPrefixes = [app.source || `apps/${app.id}`, `tests/e2e/${app.id}`];
|
|
88
|
+
const appTests = data.testCases.filter((tc) =>
|
|
89
|
+
appPrefixes.some((prefix) => tc.file.startsWith(prefix))
|
|
90
|
+
);
|
|
91
|
+
const jestTests = appTests.filter((tc) => tc.framework === "jest").length;
|
|
92
|
+
const e2eTests = appTests.filter((tc) => tc.framework === "playwright").length;
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
id: app.id,
|
|
96
|
+
name: app.name,
|
|
97
|
+
description: app.description,
|
|
98
|
+
total: appTests.length,
|
|
99
|
+
jest: jestTests,
|
|
100
|
+
e2e: e2eTests,
|
|
101
|
+
percentage:
|
|
102
|
+
data.summary.totalTests > 0
|
|
103
|
+
? Math.round((appTests.length / data.summary.totalTests) * 100)
|
|
104
|
+
: 0,
|
|
105
|
+
};
|
|
106
|
+
}) || [];
|
|
107
|
+
|
|
108
|
+
// Top categories for chart
|
|
109
|
+
const topCategories: CategoryItem[] = Object.entries(categoryBreakdown)
|
|
110
|
+
.filter(([_, count]) => count > 0)
|
|
111
|
+
.sort((a, b) => b[1] - a[1])
|
|
112
|
+
.slice(0, 5)
|
|
113
|
+
.map(([category, count]) => {
|
|
114
|
+
const config = testCategoryLabels[category] || testCategoryLabels.unknown;
|
|
115
|
+
return {
|
|
116
|
+
category,
|
|
117
|
+
label: config.ja,
|
|
118
|
+
count,
|
|
119
|
+
percentage: Math.round((count / data.summary.totalTests) * 100),
|
|
120
|
+
colorClass: config.color,
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Summary table columns
|
|
125
|
+
const summaryData = [
|
|
126
|
+
{ metric: "総テスト数", value: data.summary.totalTests, unit: "tests" },
|
|
127
|
+
{ metric: "Jest (Unit)", value: data.summary.jestTests, unit: "tests" },
|
|
128
|
+
{ metric: "Playwright (E2E)", value: data.summary.playwrightTests, unit: "tests" },
|
|
129
|
+
{ metric: "テストファイル数", value: data.summary.fileStats?.length || 0, unit: "files" },
|
|
130
|
+
{ metric: "カバレッジ率", value: coverageStats.coveragePercent, unit: "%" },
|
|
131
|
+
{ metric: "テストなし", value: coverageGapsCount, unit: "items" },
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
const summaryColumns: DocTableColumn<(typeof summaryData)[0]>[] = [
|
|
135
|
+
{ key: "metric", header: "項目", width: "200px" },
|
|
136
|
+
{
|
|
137
|
+
key: "value",
|
|
138
|
+
header: "値",
|
|
139
|
+
width: "100px",
|
|
140
|
+
align: "right",
|
|
141
|
+
render: (_, row) => (
|
|
142
|
+
<span
|
|
143
|
+
className={`text-lg font-bold ${
|
|
144
|
+
row.metric === "テストなし" && row.value > 0 ? "text-red-500" : ""
|
|
145
|
+
}`}
|
|
146
|
+
>
|
|
147
|
+
{row.value}
|
|
148
|
+
</span>
|
|
149
|
+
),
|
|
150
|
+
},
|
|
151
|
+
{ key: "unit", header: "単位", width: "80px" },
|
|
152
|
+
];
|
|
153
|
+
|
|
154
|
+
// App stats columns
|
|
155
|
+
const appColumns: DocTableColumn<AppStatItem>[] = [
|
|
156
|
+
{
|
|
157
|
+
key: "name",
|
|
158
|
+
header: "アプリ",
|
|
159
|
+
width: "200px",
|
|
160
|
+
render: (_, row) => (
|
|
161
|
+
<Link
|
|
162
|
+
href={`/apps/${row.id}/test-cases`}
|
|
163
|
+
className="font-medium text-primary hover:underline flex items-center gap-1"
|
|
164
|
+
>
|
|
165
|
+
{row.name}
|
|
166
|
+
<ArrowRight className="h-3 w-3" />
|
|
167
|
+
</Link>
|
|
168
|
+
),
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
key: "total",
|
|
172
|
+
header: "Total",
|
|
173
|
+
width: "80px",
|
|
174
|
+
align: "right",
|
|
175
|
+
render: (_, row) => <Badge variant="secondary">{row.total}</Badge>,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
key: "jest",
|
|
179
|
+
header: "Jest",
|
|
180
|
+
width: "80px",
|
|
181
|
+
align: "right",
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
key: "e2e",
|
|
185
|
+
header: "E2E",
|
|
186
|
+
width: "80px",
|
|
187
|
+
align: "right",
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
key: "percentage",
|
|
191
|
+
header: "割合",
|
|
192
|
+
width: "100px",
|
|
193
|
+
render: (_, row) => (
|
|
194
|
+
<div className="flex items-center gap-2">
|
|
195
|
+
<Progress value={row.percentage} className="h-2 flex-1" />
|
|
196
|
+
<span className="text-xs text-muted-foreground">{row.percentage}%</span>
|
|
197
|
+
</div>
|
|
198
|
+
),
|
|
199
|
+
},
|
|
200
|
+
];
|
|
201
|
+
|
|
202
|
+
// Category columns
|
|
203
|
+
const categoryColumns: DocTableColumn<CategoryItem>[] = [
|
|
204
|
+
{
|
|
205
|
+
key: "label",
|
|
206
|
+
header: "カテゴリ",
|
|
207
|
+
width: "150px",
|
|
208
|
+
render: (_, row) => (
|
|
209
|
+
<div className="flex items-center gap-2">
|
|
210
|
+
<div className={`h-3 w-3 rounded-full ${row.colorClass}`} />
|
|
211
|
+
<span>{row.label}</span>
|
|
212
|
+
</div>
|
|
213
|
+
),
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
key: "count",
|
|
217
|
+
header: "数",
|
|
218
|
+
width: "80px",
|
|
219
|
+
align: "right",
|
|
220
|
+
render: (_, row) => <span className="font-mono">{row.count}</span>,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
key: "percentage",
|
|
224
|
+
header: "割合",
|
|
225
|
+
render: (_, row) => (
|
|
226
|
+
<div className="flex items-center gap-2">
|
|
227
|
+
<Progress value={row.percentage} className="h-2 flex-1" />
|
|
228
|
+
<span className="text-sm text-muted-foreground w-12 text-right">
|
|
229
|
+
{row.percentage}%
|
|
230
|
+
</span>
|
|
231
|
+
</div>
|
|
232
|
+
),
|
|
233
|
+
},
|
|
234
|
+
];
|
|
235
|
+
|
|
236
|
+
return (
|
|
237
|
+
<div className="space-y-6">
|
|
238
|
+
{/* Generated timestamp */}
|
|
239
|
+
{data.generatedAt && (
|
|
240
|
+
<div className="text-sm text-muted-foreground text-right">
|
|
241
|
+
Generated: {new Date(data.generatedAt).toLocaleString("ja-JP")}
|
|
242
|
+
</div>
|
|
243
|
+
)}
|
|
244
|
+
|
|
245
|
+
{/* Summary Section */}
|
|
246
|
+
<DocSection
|
|
247
|
+
title="サマリー"
|
|
248
|
+
variant="info"
|
|
249
|
+
icon={<FlaskConical className="h-4 w-4" />}
|
|
250
|
+
preview={`${data.summary.totalTests} tests, ${coverageStats.coveragePercent}% coverage`}
|
|
251
|
+
>
|
|
252
|
+
<div className="grid gap-4 md:grid-cols-2">
|
|
253
|
+
<div>
|
|
254
|
+
<DocTable columns={summaryColumns} data={summaryData} />
|
|
255
|
+
</div>
|
|
256
|
+
<div className="space-y-4">
|
|
257
|
+
<div className="space-y-2">
|
|
258
|
+
<div className="flex items-center justify-between text-sm">
|
|
259
|
+
<span>テストカバレッジ</span>
|
|
260
|
+
<span className="font-medium">{coverageStats.coveragePercent}%</span>
|
|
261
|
+
</div>
|
|
262
|
+
<Progress value={coverageStats.coveragePercent} className="h-3" />
|
|
263
|
+
<p className="text-xs text-muted-foreground">
|
|
264
|
+
{coverageStats.testedItems} / {coverageStats.totalItems} items tested
|
|
265
|
+
</p>
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
<div className="p-4 rounded-lg border">
|
|
269
|
+
<div className="flex items-center gap-2">
|
|
270
|
+
<span className="text-sm text-muted-foreground">品質スコア:</span>
|
|
271
|
+
{qualityAnalysis.status === "good" ? (
|
|
272
|
+
<span className="flex items-center gap-1 text-green-500">
|
|
273
|
+
<CheckCircle2 className="h-4 w-4" />
|
|
274
|
+
{qualityAnalysis.message}
|
|
275
|
+
</span>
|
|
276
|
+
) : qualityAnalysis.status === "warning" ? (
|
|
277
|
+
<span className="flex items-center gap-1 text-yellow-500">
|
|
278
|
+
<AlertTriangle className="h-4 w-4" />
|
|
279
|
+
{qualityAnalysis.message}
|
|
280
|
+
</span>
|
|
281
|
+
) : (
|
|
282
|
+
<span className="flex items-center gap-1 text-red-500">
|
|
283
|
+
<XCircle className="h-4 w-4" />
|
|
284
|
+
{qualityAnalysis.message}
|
|
285
|
+
</span>
|
|
286
|
+
)}
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
</DocSection>
|
|
292
|
+
|
|
293
|
+
{/* App Stats */}
|
|
294
|
+
{appStats.length > 0 && (
|
|
295
|
+
<DocSection
|
|
296
|
+
title="アプリ別テスト"
|
|
297
|
+
badge={<Badge variant="outline">{appStats.length} apps</Badge>}
|
|
298
|
+
preview={appStats.slice(0, 2).map(a => a.name).join(", ")}
|
|
299
|
+
>
|
|
300
|
+
<DocTable columns={appColumns} data={appStats} />
|
|
301
|
+
</DocSection>
|
|
302
|
+
)}
|
|
303
|
+
|
|
304
|
+
{/* Category Distribution */}
|
|
305
|
+
<DocSection
|
|
306
|
+
title="テストカテゴリ分布"
|
|
307
|
+
badge={
|
|
308
|
+
<Badge variant="outline">{Object.keys(categoryBreakdown).length} categories</Badge>
|
|
309
|
+
}
|
|
310
|
+
preview={topCategories.slice(0, 2).map(c => `${c.label}:${c.count}`).join(", ")}
|
|
311
|
+
>
|
|
312
|
+
<DocTable columns={categoryColumns} data={topCategories} />
|
|
313
|
+
</DocSection>
|
|
314
|
+
|
|
315
|
+
{/* Framework Distribution */}
|
|
316
|
+
<DocSection title="フレームワーク分布">
|
|
317
|
+
<div className="space-y-4">
|
|
318
|
+
<div className="space-y-1">
|
|
319
|
+
<div className="flex items-center justify-between text-sm">
|
|
320
|
+
<div className="flex items-center gap-2">
|
|
321
|
+
<div className="h-3 w-3 rounded-full bg-blue-500" />
|
|
322
|
+
<span>Jest (Unit)</span>
|
|
323
|
+
</div>
|
|
324
|
+
<span className="text-muted-foreground">
|
|
325
|
+
{data.summary.jestTests} (
|
|
326
|
+
{Math.round((data.summary.jestTests / data.summary.totalTests) * 100)}%)
|
|
327
|
+
</span>
|
|
328
|
+
</div>
|
|
329
|
+
<Progress
|
|
330
|
+
value={(data.summary.jestTests / data.summary.totalTests) * 100}
|
|
331
|
+
className="h-2"
|
|
332
|
+
/>
|
|
333
|
+
</div>
|
|
334
|
+
<div className="space-y-1">
|
|
335
|
+
<div className="flex items-center justify-between text-sm">
|
|
336
|
+
<div className="flex items-center gap-2">
|
|
337
|
+
<div className="h-3 w-3 rounded-full bg-purple-500" />
|
|
338
|
+
<span>Playwright (E2E)</span>
|
|
339
|
+
</div>
|
|
340
|
+
<span className="text-muted-foreground">
|
|
341
|
+
{data.summary.playwrightTests} (
|
|
342
|
+
{Math.round((data.summary.playwrightTests / data.summary.totalTests) * 100)}%)
|
|
343
|
+
</span>
|
|
344
|
+
</div>
|
|
345
|
+
<Progress
|
|
346
|
+
value={(data.summary.playwrightTests / data.summary.totalTests) * 100}
|
|
347
|
+
className="h-2"
|
|
348
|
+
/>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
</DocSection>
|
|
352
|
+
|
|
353
|
+
{/* Coverage Gaps Alert */}
|
|
354
|
+
{coverageGapsCount > 0 && (
|
|
355
|
+
<DocSection
|
|
356
|
+
title="カバレッジギャップ"
|
|
357
|
+
badge={<Badge variant="destructive">{coverageGapsCount} items</Badge>}
|
|
358
|
+
>
|
|
359
|
+
<p className="text-sm text-muted-foreground">
|
|
360
|
+
テストが存在しない機能が {coverageGapsCount} 件あります。
|
|
361
|
+
詳細はアプリ別ダッシュボードの「ギャップ」タブで確認できます。
|
|
362
|
+
</p>
|
|
363
|
+
</DocSection>
|
|
364
|
+
)}
|
|
365
|
+
|
|
366
|
+
{/* Quick Links */}
|
|
367
|
+
<DocSection title="関連ページ">
|
|
368
|
+
<div className="flex flex-wrap gap-4">
|
|
369
|
+
{appStats.map((app) => (
|
|
370
|
+
<Link
|
|
371
|
+
key={app.id}
|
|
372
|
+
href={`/apps/${app.id}/test-cases`}
|
|
373
|
+
className="flex items-center gap-2 text-sm text-primary hover:underline"
|
|
374
|
+
>
|
|
375
|
+
<FlaskConical className="h-4 w-4" />
|
|
376
|
+
{app.name} ({app.total} tests)
|
|
377
|
+
<ArrowRight className="h-3 w-3" />
|
|
378
|
+
</Link>
|
|
379
|
+
))}
|
|
380
|
+
</div>
|
|
381
|
+
</DocSection>
|
|
382
|
+
</div>
|
|
383
|
+
);
|
|
384
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
import hljs from "highlight.js/lib/core";
|
|
5
|
+
// Register commonly used languages
|
|
6
|
+
import javascript from "highlight.js/lib/languages/javascript";
|
|
7
|
+
import typescript from "highlight.js/lib/languages/typescript";
|
|
8
|
+
import bash from "highlight.js/lib/languages/bash";
|
|
9
|
+
import json from "highlight.js/lib/languages/json";
|
|
10
|
+
import yaml from "highlight.js/lib/languages/yaml";
|
|
11
|
+
import sql from "highlight.js/lib/languages/sql";
|
|
12
|
+
import xml from "highlight.js/lib/languages/xml";
|
|
13
|
+
import css from "highlight.js/lib/languages/css";
|
|
14
|
+
import markdown from "highlight.js/lib/languages/markdown";
|
|
15
|
+
|
|
16
|
+
// Register languages
|
|
17
|
+
hljs.registerLanguage("javascript", javascript);
|
|
18
|
+
hljs.registerLanguage("js", javascript);
|
|
19
|
+
hljs.registerLanguage("typescript", typescript);
|
|
20
|
+
hljs.registerLanguage("ts", typescript);
|
|
21
|
+
hljs.registerLanguage("tsx", typescript);
|
|
22
|
+
hljs.registerLanguage("bash", bash);
|
|
23
|
+
hljs.registerLanguage("shell", bash);
|
|
24
|
+
hljs.registerLanguage("sh", bash);
|
|
25
|
+
hljs.registerLanguage("json", json);
|
|
26
|
+
hljs.registerLanguage("yaml", yaml);
|
|
27
|
+
hljs.registerLanguage("yml", yaml);
|
|
28
|
+
hljs.registerLanguage("sql", sql);
|
|
29
|
+
hljs.registerLanguage("xml", xml);
|
|
30
|
+
hljs.registerLanguage("html", xml);
|
|
31
|
+
hljs.registerLanguage("css", css);
|
|
32
|
+
hljs.registerLanguage("markdown", markdown);
|
|
33
|
+
hljs.registerLanguage("md", markdown);
|
|
34
|
+
|
|
35
|
+
interface CodeBlockProps {
|
|
36
|
+
code: string;
|
|
37
|
+
language?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function CodeBlock({ code, language, className }: CodeBlockProps) {
|
|
42
|
+
const codeRef = useRef<HTMLElement>(null);
|
|
43
|
+
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (codeRef.current && language && hljs.getLanguage(language)) {
|
|
46
|
+
hljs.highlightElement(codeRef.current);
|
|
47
|
+
}
|
|
48
|
+
}, [code, language]);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<pre className={`overflow-x-auto rounded-lg bg-muted p-4 text-sm ${className || ""}`}>
|
|
52
|
+
<code ref={codeRef} className={language ? `language-${language}` : ""}>
|
|
53
|
+
{code}
|
|
54
|
+
</code>
|
|
55
|
+
</pre>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DocParamsTable - パラメータテーブル
|
|
3
|
+
*
|
|
4
|
+
* API ツールやServer Actionsのパラメータを表示するテーブル
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Badge } from "@/components/ui/badge";
|
|
8
|
+
import { DocTable, type DocTableColumn } from "./doc-table";
|
|
9
|
+
|
|
10
|
+
export interface ApiParam {
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface DocParamsTableProps {
|
|
18
|
+
params: ApiParam[];
|
|
19
|
+
emptyMessage?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function DocParamsTable({
|
|
23
|
+
params,
|
|
24
|
+
emptyMessage = "パラメータなし",
|
|
25
|
+
}: DocParamsTableProps) {
|
|
26
|
+
const columns: DocTableColumn<ApiParam>[] = [
|
|
27
|
+
{
|
|
28
|
+
key: "name",
|
|
29
|
+
header: "Name",
|
|
30
|
+
width: "150px",
|
|
31
|
+
render: (_, row) => (
|
|
32
|
+
<code className="text-sm font-mono text-primary">{row.name}</code>
|
|
33
|
+
),
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "type",
|
|
37
|
+
header: "Type",
|
|
38
|
+
width: "120px",
|
|
39
|
+
render: (_, row) => (
|
|
40
|
+
<code className="text-xs bg-muted px-1.5 py-0.5 rounded">
|
|
41
|
+
{row.type}
|
|
42
|
+
</code>
|
|
43
|
+
),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "required",
|
|
47
|
+
header: "Required",
|
|
48
|
+
width: "80px",
|
|
49
|
+
align: "center",
|
|
50
|
+
render: (_, row) => (
|
|
51
|
+
<Badge
|
|
52
|
+
variant={row.required ? "default" : "secondary"}
|
|
53
|
+
className="text-xs"
|
|
54
|
+
>
|
|
55
|
+
{row.required ? "Yes" : "No"}
|
|
56
|
+
</Badge>
|
|
57
|
+
),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "description",
|
|
61
|
+
header: "Description",
|
|
62
|
+
render: (_, row) => (
|
|
63
|
+
<span className="text-sm text-muted-foreground">
|
|
64
|
+
{row.description || "-"}
|
|
65
|
+
</span>
|
|
66
|
+
),
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
return <DocTable columns={columns} data={params} emptyMessage={emptyMessage} />;
|
|
71
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DocSection - アコーディオン付きドキュメントセクション
|
|
3
|
+
*
|
|
4
|
+
* ドキュメント形式のポータルで使用する折りたたみ可能なセクション
|
|
5
|
+
* - 色分けによるカテゴリ識別
|
|
6
|
+
* - 閉じた状態でもプレビュー表示
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
Accordion,
|
|
11
|
+
AccordionContent,
|
|
12
|
+
AccordionItem,
|
|
13
|
+
AccordionTrigger,
|
|
14
|
+
} from "@/components/ui/accordion";
|
|
15
|
+
|
|
16
|
+
/** セクションの色バリアント */
|
|
17
|
+
export type DocSectionVariant =
|
|
18
|
+
| "default"
|
|
19
|
+
| "primary"
|
|
20
|
+
| "success"
|
|
21
|
+
| "warning"
|
|
22
|
+
| "danger"
|
|
23
|
+
| "info"
|
|
24
|
+
| "purple"
|
|
25
|
+
| "cyan";
|
|
26
|
+
|
|
27
|
+
const variantStyles: Record<
|
|
28
|
+
DocSectionVariant,
|
|
29
|
+
{ border: string; bg: string; accent: string }
|
|
30
|
+
> = {
|
|
31
|
+
default: {
|
|
32
|
+
border: "border-border",
|
|
33
|
+
bg: "bg-background",
|
|
34
|
+
accent: "text-foreground",
|
|
35
|
+
},
|
|
36
|
+
primary: {
|
|
37
|
+
border: "border-primary/30",
|
|
38
|
+
bg: "bg-primary/5",
|
|
39
|
+
accent: "text-primary",
|
|
40
|
+
},
|
|
41
|
+
success: {
|
|
42
|
+
border: "border-green-500/30",
|
|
43
|
+
bg: "bg-green-500/5",
|
|
44
|
+
accent: "text-green-600 dark:text-green-400",
|
|
45
|
+
},
|
|
46
|
+
warning: {
|
|
47
|
+
border: "border-yellow-500/30",
|
|
48
|
+
bg: "bg-yellow-500/5",
|
|
49
|
+
accent: "text-yellow-600 dark:text-yellow-400",
|
|
50
|
+
},
|
|
51
|
+
danger: {
|
|
52
|
+
border: "border-red-500/30",
|
|
53
|
+
bg: "bg-red-500/5",
|
|
54
|
+
accent: "text-red-600 dark:text-red-400",
|
|
55
|
+
},
|
|
56
|
+
info: {
|
|
57
|
+
border: "border-blue-500/30",
|
|
58
|
+
bg: "bg-blue-500/5",
|
|
59
|
+
accent: "text-blue-600 dark:text-blue-400",
|
|
60
|
+
},
|
|
61
|
+
purple: {
|
|
62
|
+
border: "border-purple-500/30",
|
|
63
|
+
bg: "bg-purple-500/5",
|
|
64
|
+
accent: "text-purple-600 dark:text-purple-400",
|
|
65
|
+
},
|
|
66
|
+
cyan: {
|
|
67
|
+
border: "border-cyan-500/30",
|
|
68
|
+
bg: "bg-cyan-500/5",
|
|
69
|
+
accent: "text-cyan-600 dark:text-cyan-400",
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
interface DocSectionProps {
|
|
74
|
+
/** セクションタイトル */
|
|
75
|
+
title: string;
|
|
76
|
+
/** タイトル横に表示するバッジ等 */
|
|
77
|
+
badge?: React.ReactNode;
|
|
78
|
+
/** デフォルトで開いた状態にするか */
|
|
79
|
+
defaultOpen?: boolean;
|
|
80
|
+
/** セクション内容 */
|
|
81
|
+
children: React.ReactNode;
|
|
82
|
+
/** 追加のCSSクラス */
|
|
83
|
+
className?: string;
|
|
84
|
+
/** 色バリアント */
|
|
85
|
+
variant?: DocSectionVariant;
|
|
86
|
+
/** 閉じた状態で表示するプレビュー(1行サマリー) */
|
|
87
|
+
preview?: React.ReactNode;
|
|
88
|
+
/** アイコン(タイトル左に表示) */
|
|
89
|
+
icon?: React.ReactNode;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function DocSection({
|
|
93
|
+
title,
|
|
94
|
+
badge,
|
|
95
|
+
defaultOpen = false,
|
|
96
|
+
children,
|
|
97
|
+
className = "",
|
|
98
|
+
variant = "default",
|
|
99
|
+
preview,
|
|
100
|
+
icon,
|
|
101
|
+
}: DocSectionProps) {
|
|
102
|
+
const styles = variantStyles[variant];
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<Accordion
|
|
106
|
+
type="single"
|
|
107
|
+
collapsible
|
|
108
|
+
defaultValue={defaultOpen ? "section" : undefined}
|
|
109
|
+
className={className}
|
|
110
|
+
>
|
|
111
|
+
<AccordionItem
|
|
112
|
+
value="section"
|
|
113
|
+
className={`border rounded-lg ${styles.border} ${styles.bg}`}
|
|
114
|
+
>
|
|
115
|
+
<AccordionTrigger className="px-4 py-3 hover:no-underline group">
|
|
116
|
+
<div className="flex items-center justify-between w-full pr-2">
|
|
117
|
+
<div className="flex items-center gap-3">
|
|
118
|
+
{icon && <span className={styles.accent}>{icon}</span>}
|
|
119
|
+
<span className={`font-semibold ${styles.accent}`}>{title}</span>
|
|
120
|
+
{badge}
|
|
121
|
+
</div>
|
|
122
|
+
{preview && (
|
|
123
|
+
<div className="text-sm text-muted-foreground font-normal group-data-[state=open]:hidden">
|
|
124
|
+
{preview}
|
|
125
|
+
</div>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
</AccordionTrigger>
|
|
129
|
+
<AccordionContent className="px-4 pb-4">{children}</AccordionContent>
|
|
130
|
+
</AccordionItem>
|
|
131
|
+
</Accordion>
|
|
132
|
+
);
|
|
133
|
+
}
|