@shirokuma-library/shirokuma-docs 0.1.0-alpha.10
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 +346 -0
- package/README.md +346 -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 +174 -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 +195 -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 +744 -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 +468 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/issues-pr.d.ts +83 -0
- package/dist/commands/issues-pr.d.ts.map +1 -0
- package/dist/commands/issues-pr.js +572 -0
- package/dist/commands/issues-pr.js.map +1 -0
- package/dist/commands/issues.d.ts +78 -0
- package/dist/commands/issues.d.ts.map +1 -0
- package/dist/commands/issues.js +1541 -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 +1191 -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/search.d.ts +24 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +254 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/session.d.ts +159 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +1274 -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 +626 -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 +600 -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 +152 -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 +617 -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 +365 -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 +421 -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 +299 -0
- package/dist/md/validator/index.js.map +1 -0
- package/dist/parsers/details-jsdoc.d.ts +42 -0
- package/dist/parsers/details-jsdoc.d.ts.map +1 -0
- package/dist/parsers/details-jsdoc.js +256 -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 +146 -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 +650 -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 +271 -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 +123 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/formatters.js +199 -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 +108 -0
- package/dist/utils/github.d.ts.map +1 -0
- package/dist/utils/github.js +320 -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/sanitize.d.ts +27 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/dist/utils/sanitize.js +38 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/dist/utils/setup-check.d.ts +48 -0
- package/dist/utils/setup-check.d.ts.map +1 -0
- package/dist/utils/setup-check.js +226 -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 +164 -0
- package/i18n/cli/ja.json +164 -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 +18 -0
- package/portal/package.json +45 -0
- package/portal/postcss.config.mjs +8 -0
- package/portal/tsconfig.json +42 -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,475 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useCallback, useState, forwardRef, useImperativeHandle } from "react";
|
|
4
|
+
import {
|
|
5
|
+
ReactFlow,
|
|
6
|
+
Controls,
|
|
7
|
+
Background,
|
|
8
|
+
useNodesState,
|
|
9
|
+
useEdgesState,
|
|
10
|
+
type Node,
|
|
11
|
+
type Edge,
|
|
12
|
+
type NodeTypes,
|
|
13
|
+
MarkerType,
|
|
14
|
+
useReactFlow,
|
|
15
|
+
ReactFlowProvider,
|
|
16
|
+
Handle,
|
|
17
|
+
Position,
|
|
18
|
+
} from "@xyflow/react";
|
|
19
|
+
import "@xyflow/react/dist/style.css";
|
|
20
|
+
import ELK from "elkjs/lib/elk.bundled.js";
|
|
21
|
+
import { cn } from "@/lib/utils";
|
|
22
|
+
|
|
23
|
+
interface TableInfo {
|
|
24
|
+
name: string;
|
|
25
|
+
category?: string;
|
|
26
|
+
columns?: { name: string; type: string; primaryKey?: boolean }[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface ForeignKey {
|
|
30
|
+
table: string;
|
|
31
|
+
column: string;
|
|
32
|
+
referencesTable: string;
|
|
33
|
+
referencesColumn: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface ReactFlowErDiagramProps {
|
|
37
|
+
tables: TableInfo[];
|
|
38
|
+
foreignKeys: ForeignKey[];
|
|
39
|
+
className?: string;
|
|
40
|
+
fullscreen?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ReactFlowErDiagramRef {
|
|
44
|
+
navigateToTable: (tableName: string) => void;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Category colors for nodes
|
|
48
|
+
const categoryColors: Record<string, { bg: string; border: string; header: string }> = {
|
|
49
|
+
auth: { bg: "#eff6ff", border: "#3b82f6", header: "#dbeafe" },
|
|
50
|
+
organization: { bg: "#faf5ff", border: "#a855f7", header: "#ede9fe" },
|
|
51
|
+
project: { bg: "#fffbeb", border: "#f59e0b", header: "#fef3c7" },
|
|
52
|
+
session: { bg: "#ecfeff", border: "#06b6d4", header: "#cffafe" },
|
|
53
|
+
entity: { bg: "#fff1f2", border: "#f43f5e", header: "#ffe4e6" },
|
|
54
|
+
activity: { bg: "#eef2ff", border: "#6366f1", header: "#e0e7ff" },
|
|
55
|
+
token: { bg: "#fff7ed", border: "#f97316", header: "#ffedd5" },
|
|
56
|
+
content: { bg: "#f0fdf4", border: "#22c55e", header: "#dcfce7" },
|
|
57
|
+
other: { bg: "#f9fafb", border: "#6b7280", header: "#f3f4f6" },
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Normalize category name to match categoryOrder
|
|
61
|
+
function normalizeCategory(category: string | undefined): string {
|
|
62
|
+
if (!category) return "other";
|
|
63
|
+
const lower = category.toLowerCase();
|
|
64
|
+
|
|
65
|
+
// Handle aliases
|
|
66
|
+
if (lower === "authentication" || lower === "auth") return "auth";
|
|
67
|
+
if (lower === "organizations" || lower === "organization") return "organization";
|
|
68
|
+
if (lower === "projects" || lower === "project") return "project";
|
|
69
|
+
if (lower === "sessions" || lower === "session" || lower === "work sessions") return "session";
|
|
70
|
+
if (lower === "entities" || lower === "entity") return "entity";
|
|
71
|
+
if (lower === "activities" || lower === "activity") return "activity";
|
|
72
|
+
if (lower === "tokens" || lower === "token" || lower === "mcp tokens") return "token";
|
|
73
|
+
if (lower === "content" || lower === "contents") return "content";
|
|
74
|
+
if (lower === "user context" || lower === "context") return "other";
|
|
75
|
+
|
|
76
|
+
return "other";
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Custom node component for tables
|
|
80
|
+
function TableNode({ data }: { data: { label: string; category: string; columns: { name: string; type: string; primaryKey?: boolean }[] } }) {
|
|
81
|
+
const colors = categoryColors[data.category] || categoryColors.other;
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<div
|
|
85
|
+
className="er-table-node"
|
|
86
|
+
style={{
|
|
87
|
+
borderRadius: 8,
|
|
88
|
+
border: `2px solid ${colors.border}`,
|
|
89
|
+
background: colors.bg,
|
|
90
|
+
boxShadow: "0 1px 3px rgba(0,0,0,0.1)",
|
|
91
|
+
overflow: "visible",
|
|
92
|
+
minWidth: 180,
|
|
93
|
+
fontSize: 12,
|
|
94
|
+
position: "relative",
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
97
|
+
{/* Connection handles - Left for target (incoming), Right for source (outgoing) */}
|
|
98
|
+
<Handle
|
|
99
|
+
type="target"
|
|
100
|
+
position={Position.Left}
|
|
101
|
+
style={{
|
|
102
|
+
background: colors.border,
|
|
103
|
+
width: 8,
|
|
104
|
+
height: 8,
|
|
105
|
+
border: "2px solid white",
|
|
106
|
+
}}
|
|
107
|
+
/>
|
|
108
|
+
<Handle
|
|
109
|
+
type="source"
|
|
110
|
+
position={Position.Right}
|
|
111
|
+
style={{
|
|
112
|
+
background: colors.border,
|
|
113
|
+
width: 8,
|
|
114
|
+
height: 8,
|
|
115
|
+
border: "2px solid white",
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
|
|
119
|
+
{/* Header */}
|
|
120
|
+
<div
|
|
121
|
+
style={{
|
|
122
|
+
padding: "8px 12px",
|
|
123
|
+
fontWeight: 600,
|
|
124
|
+
background: colors.header,
|
|
125
|
+
color: "#1f2937",
|
|
126
|
+
borderBottom: `1px solid ${colors.border}`,
|
|
127
|
+
borderRadius: "6px 6px 0 0",
|
|
128
|
+
}}
|
|
129
|
+
>
|
|
130
|
+
{data.label}
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
{/* Columns */}
|
|
134
|
+
<div style={{ background: "white", borderRadius: "0 0 6px 6px" }}>
|
|
135
|
+
{data.columns.map((col, idx) => (
|
|
136
|
+
<div
|
|
137
|
+
key={col.name}
|
|
138
|
+
style={{
|
|
139
|
+
display: "flex",
|
|
140
|
+
alignItems: "center",
|
|
141
|
+
gap: 8,
|
|
142
|
+
padding: "4px 12px",
|
|
143
|
+
borderTop: idx > 0 ? "1px solid #e5e7eb" : "none",
|
|
144
|
+
fontSize: 11,
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
{col.primaryKey && (
|
|
148
|
+
<span style={{ color: "#f59e0b" }}>🔑</span>
|
|
149
|
+
)}
|
|
150
|
+
<span style={{ fontFamily: "monospace", color: "#374151" }}>
|
|
151
|
+
{col.name}
|
|
152
|
+
</span>
|
|
153
|
+
<span style={{ color: "#9ca3af", marginLeft: "auto", fontSize: 10 }}>
|
|
154
|
+
{col.type}
|
|
155
|
+
</span>
|
|
156
|
+
</div>
|
|
157
|
+
))}
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const nodeTypes: NodeTypes = {
|
|
164
|
+
table: TableNode,
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
// ELK instance
|
|
168
|
+
const elk = new ELK();
|
|
169
|
+
|
|
170
|
+
// Calculate node dimensions
|
|
171
|
+
function getNodeDimensions(table: TableInfo): { width: number; height: number } {
|
|
172
|
+
const columnCount = table.columns?.length || 0;
|
|
173
|
+
return {
|
|
174
|
+
width: 220,
|
|
175
|
+
height: 40 + columnCount * 22,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Category display order (left to right)
|
|
180
|
+
const categoryOrder = [
|
|
181
|
+
"auth",
|
|
182
|
+
"organization",
|
|
183
|
+
"project",
|
|
184
|
+
"session",
|
|
185
|
+
"entity",
|
|
186
|
+
"activity",
|
|
187
|
+
"token",
|
|
188
|
+
"content",
|
|
189
|
+
"other",
|
|
190
|
+
];
|
|
191
|
+
|
|
192
|
+
// Calculate layout using ELK with hierarchical grouping by category
|
|
193
|
+
async function calculateElkLayout(
|
|
194
|
+
tables: TableInfo[],
|
|
195
|
+
foreignKeys: ForeignKey[]
|
|
196
|
+
): Promise<{ nodes: Node[]; edges: Edge[] }> {
|
|
197
|
+
// Create a set of valid table names for quick lookup
|
|
198
|
+
const tableNames = new Set(tables.map((t) => t.name));
|
|
199
|
+
|
|
200
|
+
// Filter out edges that reference non-existent tables
|
|
201
|
+
const validForeignKeys = foreignKeys.filter(
|
|
202
|
+
(fk) =>
|
|
203
|
+
fk.referencesTable !== fk.table &&
|
|
204
|
+
tableNames.has(fk.table) &&
|
|
205
|
+
tableNames.has(fk.referencesTable)
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
// Group tables by category
|
|
209
|
+
const tablesByCategory: Record<string, TableInfo[]> = {};
|
|
210
|
+
for (const table of tables) {
|
|
211
|
+
const category = normalizeCategory(table.category);
|
|
212
|
+
if (!tablesByCategory[category]) {
|
|
213
|
+
tablesByCategory[category] = [];
|
|
214
|
+
}
|
|
215
|
+
tablesByCategory[category].push(table);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Create category group nodes with their table children
|
|
219
|
+
const categoryNodes = categoryOrder
|
|
220
|
+
.filter((cat) => tablesByCategory[cat] && tablesByCategory[cat].length > 0)
|
|
221
|
+
.map((category) => {
|
|
222
|
+
const categoryTables = tablesByCategory[category];
|
|
223
|
+
const children = categoryTables.map((table) => {
|
|
224
|
+
const { width, height } = getNodeDimensions(table);
|
|
225
|
+
return {
|
|
226
|
+
id: table.name,
|
|
227
|
+
width,
|
|
228
|
+
height,
|
|
229
|
+
labels: [{ text: table.name }],
|
|
230
|
+
};
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
return {
|
|
234
|
+
id: `category-${category}`,
|
|
235
|
+
labels: [{ text: category }],
|
|
236
|
+
layoutOptions: {
|
|
237
|
+
"elk.algorithm": "layered",
|
|
238
|
+
"elk.direction": "DOWN",
|
|
239
|
+
"elk.spacing.nodeNode": "30",
|
|
240
|
+
"elk.layered.spacing.nodeNodeBetweenLayers": "40",
|
|
241
|
+
"elk.padding": "[top=40,left=20,bottom=20,right=20]",
|
|
242
|
+
},
|
|
243
|
+
children,
|
|
244
|
+
};
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
// Create edges at the root level (between tables in different categories)
|
|
248
|
+
const elkEdges = validForeignKeys.map((fk, idx) => ({
|
|
249
|
+
id: `edge-${idx}`,
|
|
250
|
+
sources: [fk.referencesTable],
|
|
251
|
+
targets: [fk.table],
|
|
252
|
+
}));
|
|
253
|
+
|
|
254
|
+
const graph = {
|
|
255
|
+
id: "root",
|
|
256
|
+
layoutOptions: {
|
|
257
|
+
"elk.algorithm": "layered",
|
|
258
|
+
"elk.direction": "RIGHT",
|
|
259
|
+
"elk.spacing.nodeNode": "80",
|
|
260
|
+
"elk.layered.spacing.nodeNodeBetweenLayers": "120",
|
|
261
|
+
"elk.layered.spacing.edgeNodeBetweenLayers": "40",
|
|
262
|
+
"elk.layered.nodePlacement.strategy": "NETWORK_SIMPLEX",
|
|
263
|
+
"elk.layered.crossingMinimization.strategy": "LAYER_SWEEP",
|
|
264
|
+
"elk.hierarchyHandling": "INCLUDE_CHILDREN",
|
|
265
|
+
"elk.padding": "[top=50,left=50,bottom=50,right=50]",
|
|
266
|
+
},
|
|
267
|
+
children: categoryNodes,
|
|
268
|
+
edges: elkEdges,
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
// Run ELK layout
|
|
272
|
+
const layoutedGraph = await elk.layout(graph);
|
|
273
|
+
|
|
274
|
+
// Convert ELK result to React Flow nodes
|
|
275
|
+
const nodes: Node[] = [];
|
|
276
|
+
|
|
277
|
+
for (const categoryNode of layoutedGraph.children || []) {
|
|
278
|
+
const categoryX = categoryNode.x || 0;
|
|
279
|
+
const categoryY = categoryNode.y || 0;
|
|
280
|
+
|
|
281
|
+
// Add table nodes with absolute positions
|
|
282
|
+
for (const elkNode of categoryNode.children || []) {
|
|
283
|
+
const table = tables.find((t) => t.name === elkNode.id);
|
|
284
|
+
if (!table) continue;
|
|
285
|
+
|
|
286
|
+
const category = normalizeCategory(table.category);
|
|
287
|
+
|
|
288
|
+
nodes.push({
|
|
289
|
+
id: elkNode.id,
|
|
290
|
+
type: "table",
|
|
291
|
+
position: {
|
|
292
|
+
x: categoryX + (elkNode.x || 0),
|
|
293
|
+
y: categoryY + (elkNode.y || 0),
|
|
294
|
+
},
|
|
295
|
+
data: {
|
|
296
|
+
label: table.name,
|
|
297
|
+
category,
|
|
298
|
+
columns: table.columns || [],
|
|
299
|
+
},
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Create edges with category-aware colors
|
|
305
|
+
const edges: Edge[] = validForeignKeys.map((fk, idx) => {
|
|
306
|
+
const sourceTable = tables.find((t) => t.name === fk.referencesTable);
|
|
307
|
+
const category = normalizeCategory(sourceTable?.category);
|
|
308
|
+
const colors = categoryColors[category] || categoryColors.other;
|
|
309
|
+
|
|
310
|
+
return {
|
|
311
|
+
id: `edge-${idx}-${fk.table}-${fk.referencesTable}`,
|
|
312
|
+
source: fk.referencesTable,
|
|
313
|
+
target: fk.table,
|
|
314
|
+
type: "smoothstep",
|
|
315
|
+
animated: false,
|
|
316
|
+
style: { stroke: colors.border, strokeWidth: 2 },
|
|
317
|
+
markerEnd: {
|
|
318
|
+
type: MarkerType.ArrowClosed,
|
|
319
|
+
color: colors.border,
|
|
320
|
+
width: 20,
|
|
321
|
+
height: 20,
|
|
322
|
+
},
|
|
323
|
+
label: `${fk.column} → ${fk.referencesColumn}`,
|
|
324
|
+
labelStyle: { fontSize: 10, fill: "#6b7280" },
|
|
325
|
+
labelBgStyle: { fill: "white", fillOpacity: 0.8 },
|
|
326
|
+
};
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
return { nodes, edges };
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// Inner component that uses React Flow hooks
|
|
333
|
+
function ReactFlowErDiagramInner(
|
|
334
|
+
{ tables, foreignKeys, className, onNavigate }: ReactFlowErDiagramProps & { onNavigate?: (fn: (tableName: string) => void) => void }
|
|
335
|
+
) {
|
|
336
|
+
const [nodes, setNodes, onNodesChange] = useNodesState<Node>([]);
|
|
337
|
+
const [edges, setEdges, onEdgesChange] = useEdgesState<Edge>([]);
|
|
338
|
+
const [isLayouting, setIsLayouting] = useState(true);
|
|
339
|
+
const { fitView, setCenter, getNode } = useReactFlow();
|
|
340
|
+
|
|
341
|
+
// Run ELK layout on mount and when data changes
|
|
342
|
+
useEffect(() => {
|
|
343
|
+
let cancelled = false;
|
|
344
|
+
|
|
345
|
+
async function runLayout() {
|
|
346
|
+
setIsLayouting(true);
|
|
347
|
+
try {
|
|
348
|
+
const { nodes: layoutedNodes, edges: layoutedEdges } = await calculateElkLayout(tables, foreignKeys);
|
|
349
|
+
if (!cancelled) {
|
|
350
|
+
setNodes(layoutedNodes);
|
|
351
|
+
setEdges(layoutedEdges);
|
|
352
|
+
}
|
|
353
|
+
} catch (error) {
|
|
354
|
+
console.error("ELK layout error:", error);
|
|
355
|
+
} finally {
|
|
356
|
+
if (!cancelled) {
|
|
357
|
+
setIsLayouting(false);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
runLayout();
|
|
363
|
+
|
|
364
|
+
return () => {
|
|
365
|
+
cancelled = true;
|
|
366
|
+
};
|
|
367
|
+
}, [tables, foreignKeys, setNodes, setEdges]);
|
|
368
|
+
|
|
369
|
+
// Navigate to a specific table
|
|
370
|
+
const navigateToTable = useCallback((tableName: string) => {
|
|
371
|
+
const node = getNode(tableName);
|
|
372
|
+
if (node) {
|
|
373
|
+
const x = node.position.x + (node.measured?.width || 200) / 2;
|
|
374
|
+
const y = node.position.y + (node.measured?.height || 100) / 2;
|
|
375
|
+
setCenter(x, y, { zoom: 1, duration: 500 });
|
|
376
|
+
|
|
377
|
+
setNodes((nds) =>
|
|
378
|
+
nds.map((n) => ({
|
|
379
|
+
...n,
|
|
380
|
+
selected: n.id === tableName,
|
|
381
|
+
style: n.id === tableName
|
|
382
|
+
? { ...n.style, boxShadow: "0 0 0 3px #3b82f6" }
|
|
383
|
+
: { ...n.style, boxShadow: undefined },
|
|
384
|
+
}))
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
}, [getNode, setCenter, setNodes]);
|
|
388
|
+
|
|
389
|
+
// Expose navigate function to parent
|
|
390
|
+
useEffect(() => {
|
|
391
|
+
if (onNavigate) {
|
|
392
|
+
onNavigate(navigateToTable);
|
|
393
|
+
}
|
|
394
|
+
}, [navigateToTable, onNavigate]);
|
|
395
|
+
|
|
396
|
+
// Fit view after layout completes
|
|
397
|
+
useEffect(() => {
|
|
398
|
+
if (!isLayouting && nodes.length > 0) {
|
|
399
|
+
const timer = setTimeout(() => {
|
|
400
|
+
fitView({ padding: 0.1, duration: 500, maxZoom: 1.0 });
|
|
401
|
+
}, 100);
|
|
402
|
+
return () => clearTimeout(timer);
|
|
403
|
+
}
|
|
404
|
+
}, [isLayouting, nodes.length, fitView]);
|
|
405
|
+
|
|
406
|
+
return (
|
|
407
|
+
<div className={cn("w-full h-full", className)}>
|
|
408
|
+
{isLayouting && (
|
|
409
|
+
<div className="absolute inset-0 flex items-center justify-center bg-background/50 z-10">
|
|
410
|
+
<div className="text-muted-foreground">Calculating layout...</div>
|
|
411
|
+
</div>
|
|
412
|
+
)}
|
|
413
|
+
<ReactFlow
|
|
414
|
+
className="dark"
|
|
415
|
+
nodes={nodes}
|
|
416
|
+
edges={edges}
|
|
417
|
+
onNodesChange={onNodesChange}
|
|
418
|
+
onEdgesChange={onEdgesChange}
|
|
419
|
+
nodeTypes={nodeTypes}
|
|
420
|
+
fitView
|
|
421
|
+
fitViewOptions={{ padding: 0.1, maxZoom: 1.0 }}
|
|
422
|
+
minZoom={0.1}
|
|
423
|
+
maxZoom={2.0}
|
|
424
|
+
defaultViewport={{ x: 0, y: 0, zoom: 0.7 }}
|
|
425
|
+
proOptions={{ hideAttribution: true }}
|
|
426
|
+
nodesDraggable={true}
|
|
427
|
+
nodesConnectable={false}
|
|
428
|
+
elementsSelectable={true}
|
|
429
|
+
panOnDrag={true}
|
|
430
|
+
zoomOnScroll={true}
|
|
431
|
+
zoomOnPinch={true}
|
|
432
|
+
selectNodesOnDrag={false}
|
|
433
|
+
>
|
|
434
|
+
<Background color="#94a3b8" gap={24} size={1} />
|
|
435
|
+
<Controls
|
|
436
|
+
showZoom={true}
|
|
437
|
+
showFitView={true}
|
|
438
|
+
showInteractive={false}
|
|
439
|
+
position="top-right"
|
|
440
|
+
/>
|
|
441
|
+
</ReactFlow>
|
|
442
|
+
</div>
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// Wrapper component with ReactFlowProvider and ref forwarding
|
|
447
|
+
export const ReactFlowErDiagram = forwardRef<ReactFlowErDiagramRef, ReactFlowErDiagramProps>(
|
|
448
|
+
function ReactFlowErDiagram({ tables, foreignKeys, className, fullscreen = false }, ref) {
|
|
449
|
+
const [navigateFn, setNavigateFn] = useState<((tableName: string) => void) | null>(null);
|
|
450
|
+
|
|
451
|
+
useImperativeHandle(ref, () => ({
|
|
452
|
+
navigateToTable: (tableName: string) => {
|
|
453
|
+
if (navigateFn) {
|
|
454
|
+
navigateFn(tableName);
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
}), [navigateFn]);
|
|
458
|
+
|
|
459
|
+
const handleNavigate = useCallback((fn: (tableName: string) => void) => {
|
|
460
|
+
setNavigateFn(() => fn);
|
|
461
|
+
}, []);
|
|
462
|
+
|
|
463
|
+
return (
|
|
464
|
+
<ReactFlowProvider>
|
|
465
|
+
<ReactFlowErDiagramInner
|
|
466
|
+
tables={tables}
|
|
467
|
+
foreignKeys={foreignKeys}
|
|
468
|
+
className={className}
|
|
469
|
+
fullscreen={fullscreen}
|
|
470
|
+
onNavigate={handleNavigate}
|
|
471
|
+
/>
|
|
472
|
+
</ReactFlowProvider>
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
);
|