@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,607 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef, useCallback, useState, forwardRef, useImperativeHandle } from "react";
|
|
4
|
+
import { ZoomIn, ZoomOut, RotateCcw, Home, ExternalLink } from "lucide-react";
|
|
5
|
+
import { Button } from "@/components/ui/button";
|
|
6
|
+
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
7
|
+
import { cn } from "@/lib/utils";
|
|
8
|
+
import dagre from "dagre";
|
|
9
|
+
|
|
10
|
+
interface TableInfo {
|
|
11
|
+
name: string;
|
|
12
|
+
category?: string;
|
|
13
|
+
columns?: { name: string; type: string; primaryKey?: boolean }[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ForeignKey {
|
|
17
|
+
table: string;
|
|
18
|
+
column: string;
|
|
19
|
+
referencesTable: string;
|
|
20
|
+
referencesColumn: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface DrawflowErDiagramProps {
|
|
24
|
+
tables: TableInfo[];
|
|
25
|
+
foreignKeys: ForeignKey[];
|
|
26
|
+
className?: string;
|
|
27
|
+
fullscreen?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface DrawflowErDiagramRef {
|
|
31
|
+
navigateToTable: (tableName: string) => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Category colors for nodes (CSS color values for inline styles)
|
|
35
|
+
const categoryColors: Record<string, { bg: string; border: string; header: string }> = {
|
|
36
|
+
auth: { bg: "#eff6ff", border: "#93c5fd", header: "#dbeafe" },
|
|
37
|
+
organization: { bg: "#faf5ff", border: "#c4b5fd", header: "#ede9fe" },
|
|
38
|
+
project: { bg: "#fffbeb", border: "#fcd34d", header: "#fef3c7" },
|
|
39
|
+
session: { bg: "#ecfeff", border: "#67e8f9", header: "#cffafe" },
|
|
40
|
+
entity: { bg: "#fff1f2", border: "#fda4af", header: "#ffe4e6" },
|
|
41
|
+
activity: { bg: "#eef2ff", border: "#a5b4fc", header: "#e0e7ff" },
|
|
42
|
+
token: { bg: "#fff7ed", border: "#fdba74", header: "#ffedd5" },
|
|
43
|
+
content: { bg: "#f0fdf4", border: "#86efac", header: "#dcfce7" },
|
|
44
|
+
other: { bg: "#f9fafb", border: "#d1d5db", header: "#f3f4f6" },
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Generate HTML for a table node with inline styles
|
|
48
|
+
function generateTableNodeHtml(table: TableInfo): string {
|
|
49
|
+
const category = table.category || "other";
|
|
50
|
+
const colors = categoryColors[category] || categoryColors.other;
|
|
51
|
+
|
|
52
|
+
const columnsHtml = (table.columns || [])
|
|
53
|
+
.map((col) => {
|
|
54
|
+
const pkIcon = col.primaryKey ? '<span style="color: #f59e0b; margin-right: 4px;">🔑</span>' : "";
|
|
55
|
+
return `<div style="display: flex; align-items: center; gap: 8px; padding: 2px 8px; font-size: 11px; border-top: 1px solid #e5e7eb;">
|
|
56
|
+
${pkIcon}<span style="font-family: monospace; color: #374151;">${col.name}</span>
|
|
57
|
+
<span style="color: #9ca3af; margin-left: auto; font-size: 10px;">${col.type}</span>
|
|
58
|
+
</div>`;
|
|
59
|
+
})
|
|
60
|
+
.join("");
|
|
61
|
+
|
|
62
|
+
return `
|
|
63
|
+
<div class="er-table-node" style="
|
|
64
|
+
border-radius: 8px;
|
|
65
|
+
border: 2px solid ${colors.border};
|
|
66
|
+
background: ${colors.bg};
|
|
67
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
min-width: 160px;
|
|
70
|
+
">
|
|
71
|
+
<div style="
|
|
72
|
+
padding: 6px 10px;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
background: ${colors.header};
|
|
76
|
+
color: #1f2937;
|
|
77
|
+
">
|
|
78
|
+
${table.name}
|
|
79
|
+
</div>
|
|
80
|
+
<div style="background: white;">
|
|
81
|
+
${columnsHtml}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Calculate initial positions using dagre for relationship-based layout
|
|
88
|
+
function calculateInitialPositions(
|
|
89
|
+
tables: TableInfo[],
|
|
90
|
+
foreignKeys: ForeignKey[]
|
|
91
|
+
): Map<string, { x: number; y: number }> {
|
|
92
|
+
const positions = new Map<string, { x: number; y: number }>();
|
|
93
|
+
|
|
94
|
+
// Create a new directed graph
|
|
95
|
+
const g = new dagre.graphlib.Graph();
|
|
96
|
+
g.setGraph({
|
|
97
|
+
rankdir: "TB", // Top to bottom layout
|
|
98
|
+
nodesep: 80, // Horizontal separation between nodes
|
|
99
|
+
ranksep: 120, // Vertical separation between ranks
|
|
100
|
+
marginx: 50,
|
|
101
|
+
marginy: 50,
|
|
102
|
+
});
|
|
103
|
+
g.setDefaultEdgeLabel(() => ({}));
|
|
104
|
+
|
|
105
|
+
// Estimate node dimensions based on column count
|
|
106
|
+
tables.forEach((table) => {
|
|
107
|
+
const columnCount = table.columns?.length || 0;
|
|
108
|
+
const height = 30 + columnCount * 18; // header + columns
|
|
109
|
+
const width = 180;
|
|
110
|
+
g.setNode(table.name, { width, height });
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// Add edges for foreign key relationships
|
|
114
|
+
foreignKeys.forEach((fk) => {
|
|
115
|
+
// Edge goes from referenced table (parent) to referencing table (child)
|
|
116
|
+
if (fk.referencesTable !== fk.table) {
|
|
117
|
+
g.setEdge(fk.referencesTable, fk.table);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// Run the dagre layout algorithm
|
|
122
|
+
dagre.layout(g);
|
|
123
|
+
|
|
124
|
+
// Extract positions from the layout
|
|
125
|
+
g.nodes().forEach((nodeName) => {
|
|
126
|
+
const node = g.node(nodeName);
|
|
127
|
+
if (node) {
|
|
128
|
+
// dagre gives center positions, convert to top-left
|
|
129
|
+
positions.set(nodeName, {
|
|
130
|
+
x: node.x - (node.width || 180) / 2,
|
|
131
|
+
y: node.y - (node.height || 100) / 2,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
return positions;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export const DrawflowErDiagram = forwardRef<DrawflowErDiagramRef, DrawflowErDiagramProps>(
|
|
140
|
+
function DrawflowErDiagram({ tables, foreignKeys, className, fullscreen = false }, ref) {
|
|
141
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
142
|
+
const editorRef = useRef<unknown>(null);
|
|
143
|
+
const nodeIdsRef = useRef<Map<string, number>>(new Map());
|
|
144
|
+
const [selectedTable, setSelectedTable] = useState<string | null>(null);
|
|
145
|
+
const [zoom, setZoom] = useState(100);
|
|
146
|
+
const [isLoaded, setIsLoaded] = useState(false);
|
|
147
|
+
|
|
148
|
+
// Navigate to a specific table by centering it in the view
|
|
149
|
+
const navigateToTable = useCallback((tableName: string) => {
|
|
150
|
+
setSelectedTable(tableName);
|
|
151
|
+
|
|
152
|
+
if (!containerRef.current) return;
|
|
153
|
+
|
|
154
|
+
const editor = editorRef.current as {
|
|
155
|
+
canvas_x: number;
|
|
156
|
+
canvas_y: number;
|
|
157
|
+
zoom: number;
|
|
158
|
+
precanvas: HTMLElement;
|
|
159
|
+
node_selected: string | null;
|
|
160
|
+
dispatch: (event: string, data: unknown) => void;
|
|
161
|
+
getNodeFromId: (id: number) => unknown;
|
|
162
|
+
} | null;
|
|
163
|
+
|
|
164
|
+
if (!editor) return;
|
|
165
|
+
|
|
166
|
+
// Get node ID from our stored map
|
|
167
|
+
const nodeId = nodeIdsRef.current.get(tableName);
|
|
168
|
+
if (!nodeId) return;
|
|
169
|
+
|
|
170
|
+
// Find the node element by ID
|
|
171
|
+
const targetNode = containerRef.current.querySelector(`#node-${nodeId}`) as HTMLElement;
|
|
172
|
+
if (!targetNode) return;
|
|
173
|
+
|
|
174
|
+
// Get node position from style
|
|
175
|
+
const nodeX = parseFloat(targetNode.style.left) || 0;
|
|
176
|
+
const nodeY = parseFloat(targetNode.style.top) || 0;
|
|
177
|
+
|
|
178
|
+
// Get container dimensions
|
|
179
|
+
const containerWidth = containerRef.current.clientWidth;
|
|
180
|
+
const containerHeight = containerRef.current.clientHeight;
|
|
181
|
+
|
|
182
|
+
// Calculate the position to center the node
|
|
183
|
+
const targetX = containerWidth / 2 - nodeX - 100;
|
|
184
|
+
const targetY = containerHeight / 2 - nodeY - 80;
|
|
185
|
+
|
|
186
|
+
// Update Drawflow's internal canvas position
|
|
187
|
+
editor.canvas_x = targetX;
|
|
188
|
+
editor.canvas_y = targetY;
|
|
189
|
+
editor.zoom = 1;
|
|
190
|
+
|
|
191
|
+
// Apply transform directly to precanvas
|
|
192
|
+
if (editor.precanvas) {
|
|
193
|
+
editor.precanvas.style.transform = `translate(${targetX}px, ${targetY}px) scale(1)`;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
setZoom(100);
|
|
197
|
+
|
|
198
|
+
// Clear previous selection
|
|
199
|
+
containerRef.current.querySelectorAll(".drawflow-node.selected").forEach((node) => {
|
|
200
|
+
node.classList.remove("selected");
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// Select the node using Drawflow's mechanism
|
|
204
|
+
targetNode.classList.add("selected");
|
|
205
|
+
editor.node_selected = `node-${nodeId}`;
|
|
206
|
+
editor.dispatch("nodeSelected", nodeId);
|
|
207
|
+
}, []);
|
|
208
|
+
|
|
209
|
+
// Expose navigateToTable to parent via ref
|
|
210
|
+
useImperativeHandle(ref, () => ({
|
|
211
|
+
navigateToTable,
|
|
212
|
+
}), [navigateToTable]);
|
|
213
|
+
|
|
214
|
+
// Initialize Drawflow (dynamic import to avoid SSR issues)
|
|
215
|
+
useEffect(() => {
|
|
216
|
+
if (!containerRef.current || editorRef.current) return;
|
|
217
|
+
|
|
218
|
+
// Load Drawflow CSS from CDN
|
|
219
|
+
const cssId = "drawflow-css";
|
|
220
|
+
if (!document.getElementById(cssId)) {
|
|
221
|
+
const link = document.createElement("link");
|
|
222
|
+
link.id = cssId;
|
|
223
|
+
link.rel = "stylesheet";
|
|
224
|
+
link.href = "https://cdn.jsdelivr.net/gh/jerosoler/Drawflow/dist/drawflow.min.css";
|
|
225
|
+
document.head.appendChild(link);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Dynamic import of Drawflow
|
|
229
|
+
import("drawflow").then((DrawflowModule) => {
|
|
230
|
+
const Drawflow = DrawflowModule.default;
|
|
231
|
+
const editor = new Drawflow(containerRef.current!);
|
|
232
|
+
|
|
233
|
+
editor.reroute = true;
|
|
234
|
+
editor.reroute_fix_curvature = false; // Match official demo
|
|
235
|
+
editor.force_first_input = false;
|
|
236
|
+
editor.start();
|
|
237
|
+
|
|
238
|
+
// Store editor reference
|
|
239
|
+
editorRef.current = editor;
|
|
240
|
+
|
|
241
|
+
// Calculate positions
|
|
242
|
+
const positions = calculateInitialPositions(tables, foreignKeys);
|
|
243
|
+
|
|
244
|
+
// Add table nodes
|
|
245
|
+
tables.forEach((table) => {
|
|
246
|
+
const pos = positions.get(table.name) || { x: 100, y: 100 };
|
|
247
|
+
const html = generateTableNodeHtml(table);
|
|
248
|
+
|
|
249
|
+
const nodeId = editor.addNode(
|
|
250
|
+
table.name,
|
|
251
|
+
1,
|
|
252
|
+
1,
|
|
253
|
+
pos.x,
|
|
254
|
+
pos.y,
|
|
255
|
+
table.category || "other",
|
|
256
|
+
{},
|
|
257
|
+
html,
|
|
258
|
+
false
|
|
259
|
+
);
|
|
260
|
+
// Store node ID for later reference
|
|
261
|
+
nodeIdsRef.current.set(table.name, nodeId);
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
// Add connections after a delay to ensure DOM is ready
|
|
265
|
+
setTimeout(() => {
|
|
266
|
+
console.log("Adding connections for", foreignKeys.length, "foreign keys");
|
|
267
|
+
|
|
268
|
+
foreignKeys.forEach((fk) => {
|
|
269
|
+
const sourceId = nodeIdsRef.current.get(fk.referencesTable);
|
|
270
|
+
const targetId = nodeIdsRef.current.get(fk.table);
|
|
271
|
+
|
|
272
|
+
if (sourceId && targetId && sourceId !== targetId) {
|
|
273
|
+
try {
|
|
274
|
+
editor.addConnection(sourceId, targetId, "output_1", "input_1");
|
|
275
|
+
} catch (e) {
|
|
276
|
+
console.error("Connection error:", e);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
}, 200);
|
|
282
|
+
|
|
283
|
+
// Block delete operations
|
|
284
|
+
containerRef.current!.addEventListener("contextmenu", (e) => e.preventDefault());
|
|
285
|
+
|
|
286
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
287
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
288
|
+
e.preventDefault();
|
|
289
|
+
e.stopPropagation();
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
293
|
+
|
|
294
|
+
setIsLoaded(true);
|
|
295
|
+
|
|
296
|
+
return () => {
|
|
297
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
298
|
+
};
|
|
299
|
+
});
|
|
300
|
+
}, [tables, foreignKeys]);
|
|
301
|
+
|
|
302
|
+
// Zoom handlers
|
|
303
|
+
const handleZoomIn = useCallback(() => {
|
|
304
|
+
const editor = editorRef.current as { zoom_in: () => void; zoom: number } | null;
|
|
305
|
+
if (editor) {
|
|
306
|
+
editor.zoom_in();
|
|
307
|
+
setZoom(Math.round(editor.zoom * 100));
|
|
308
|
+
}
|
|
309
|
+
}, []);
|
|
310
|
+
|
|
311
|
+
const handleZoomOut = useCallback(() => {
|
|
312
|
+
const editor = editorRef.current as { zoom_out: () => void; zoom: number } | null;
|
|
313
|
+
if (editor) {
|
|
314
|
+
editor.zoom_out();
|
|
315
|
+
setZoom(Math.round(editor.zoom * 100));
|
|
316
|
+
}
|
|
317
|
+
}, []);
|
|
318
|
+
|
|
319
|
+
const handleZoomReset = useCallback(() => {
|
|
320
|
+
const editor = editorRef.current as { zoom_reset: () => void; zoom: number } | null;
|
|
321
|
+
if (editor) {
|
|
322
|
+
editor.zoom_reset();
|
|
323
|
+
setZoom(100);
|
|
324
|
+
}
|
|
325
|
+
}, []);
|
|
326
|
+
|
|
327
|
+
// Reset view to initial position
|
|
328
|
+
const handleViewReset = useCallback(() => {
|
|
329
|
+
const parentDrawflow = containerRef.current?.querySelector('.parent-drawflow') as HTMLElement;
|
|
330
|
+
if (parentDrawflow) {
|
|
331
|
+
parentDrawflow.style.transform = 'translate(0px, 0px) scale(1)';
|
|
332
|
+
setZoom(100);
|
|
333
|
+
}
|
|
334
|
+
}, []);
|
|
335
|
+
|
|
336
|
+
// Navigate to table
|
|
337
|
+
const handleTableClick = useCallback((tableName: string) => {
|
|
338
|
+
setSelectedTable(tableName);
|
|
339
|
+
if (containerRef.current) {
|
|
340
|
+
const nodeEl = containerRef.current.querySelector(`[data-name="${tableName}"]`) ||
|
|
341
|
+
Array.from(containerRef.current.querySelectorAll(".drawflow-node")).find(
|
|
342
|
+
(el) => el.textContent?.includes(tableName)
|
|
343
|
+
);
|
|
344
|
+
if (nodeEl) {
|
|
345
|
+
nodeEl.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });
|
|
346
|
+
(nodeEl as HTMLElement).style.boxShadow = "0 0 0 3px #3b82f6";
|
|
347
|
+
setTimeout(() => {
|
|
348
|
+
(nodeEl as HTMLElement).style.boxShadow = "";
|
|
349
|
+
}, 2000);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}, []);
|
|
353
|
+
|
|
354
|
+
// Fullscreen mode - just the diagram with zoom controls
|
|
355
|
+
if (fullscreen) {
|
|
356
|
+
return (
|
|
357
|
+
<div className={cn("flex flex-col h-full", className)}>
|
|
358
|
+
{/* Zoom Controls */}
|
|
359
|
+
<div className="flex items-center gap-2 p-3 bg-background border-b shrink-0">
|
|
360
|
+
<div className="flex items-center gap-1 rounded-md border p-1">
|
|
361
|
+
<Button
|
|
362
|
+
variant="ghost"
|
|
363
|
+
size="icon"
|
|
364
|
+
className="h-7 w-7"
|
|
365
|
+
onClick={handleZoomOut}
|
|
366
|
+
title="Zoom out"
|
|
367
|
+
>
|
|
368
|
+
<ZoomOut className="h-4 w-4" />
|
|
369
|
+
</Button>
|
|
370
|
+
<span className="w-14 text-center text-sm tabular-nums">
|
|
371
|
+
{zoom}%
|
|
372
|
+
</span>
|
|
373
|
+
<Button
|
|
374
|
+
variant="ghost"
|
|
375
|
+
size="icon"
|
|
376
|
+
className="h-7 w-7"
|
|
377
|
+
onClick={handleZoomIn}
|
|
378
|
+
title="Zoom in"
|
|
379
|
+
>
|
|
380
|
+
<ZoomIn className="h-4 w-4" />
|
|
381
|
+
</Button>
|
|
382
|
+
</div>
|
|
383
|
+
<Button
|
|
384
|
+
variant="ghost"
|
|
385
|
+
size="icon"
|
|
386
|
+
className="h-7 w-7"
|
|
387
|
+
onClick={handleZoomReset}
|
|
388
|
+
title="Reset zoom"
|
|
389
|
+
>
|
|
390
|
+
<RotateCcw className="h-4 w-4" />
|
|
391
|
+
</Button>
|
|
392
|
+
<Button
|
|
393
|
+
variant="ghost"
|
|
394
|
+
size="icon"
|
|
395
|
+
className="h-7 w-7"
|
|
396
|
+
onClick={handleViewReset}
|
|
397
|
+
title="ビューをリセット"
|
|
398
|
+
>
|
|
399
|
+
<Home className="h-4 w-4" />
|
|
400
|
+
</Button>
|
|
401
|
+
<span className="text-xs text-muted-foreground ml-2">
|
|
402
|
+
{isLoaded ? "Drag tables to rearrange" : "Loading..."}
|
|
403
|
+
</span>
|
|
404
|
+
<a
|
|
405
|
+
href="https://jerosoler.github.io/Drawflow/"
|
|
406
|
+
target="_blank"
|
|
407
|
+
rel="noopener noreferrer"
|
|
408
|
+
className="ml-auto flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors"
|
|
409
|
+
>
|
|
410
|
+
Drawflow Demo
|
|
411
|
+
<ExternalLink className="h-3 w-3" />
|
|
412
|
+
</a>
|
|
413
|
+
</div>
|
|
414
|
+
|
|
415
|
+
{/* Drawflow Container - fills remaining space */}
|
|
416
|
+
<div
|
|
417
|
+
ref={containerRef}
|
|
418
|
+
className="drawflow-container flex-1"
|
|
419
|
+
style={{
|
|
420
|
+
width: "100%",
|
|
421
|
+
minHeight: "500px",
|
|
422
|
+
backgroundColor: "#f8fafc",
|
|
423
|
+
backgroundImage: "radial-gradient(circle, #cbd5e1 1px, transparent 1px)",
|
|
424
|
+
backgroundSize: "20px 20px",
|
|
425
|
+
backgroundAttachment: "local",
|
|
426
|
+
position: "relative",
|
|
427
|
+
}}
|
|
428
|
+
/>
|
|
429
|
+
|
|
430
|
+
{/* Minimal custom styles - base styles from CDN */}
|
|
431
|
+
<style jsx global>{`
|
|
432
|
+
/* Custom colors for connections */
|
|
433
|
+
.drawflow .connection .main-path {
|
|
434
|
+
stroke: #3b82f6;
|
|
435
|
+
stroke-width: 2;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.drawflow .connection .main-path:hover {
|
|
439
|
+
stroke: #1d4ed8;
|
|
440
|
+
stroke-width: 3;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/* Custom input/output colors */
|
|
444
|
+
.drawflow .drawflow-node .input,
|
|
445
|
+
.drawflow .drawflow-node .output {
|
|
446
|
+
background: #3b82f6;
|
|
447
|
+
border: 2px solid white;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* Selection highlight */
|
|
451
|
+
.drawflow .drawflow-node.selected .er-table-node {
|
|
452
|
+
box-shadow: 0 0 0 2px #3b82f6 !important;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/* Hide delete button */
|
|
456
|
+
.drawflow .drawflow-delete {
|
|
457
|
+
display: none !important;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/* Node background transparent */
|
|
461
|
+
.drawflow .drawflow-node {
|
|
462
|
+
background: transparent;
|
|
463
|
+
border: none;
|
|
464
|
+
padding: 0;
|
|
465
|
+
}
|
|
466
|
+
`}</style>
|
|
467
|
+
</div>
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// Normal mode - with sidebar
|
|
472
|
+
return (
|
|
473
|
+
<div className={cn("flex flex-col lg:flex-row gap-4", className)}>
|
|
474
|
+
{/* Table List Sidebar */}
|
|
475
|
+
<div className="lg:w-48 shrink-0">
|
|
476
|
+
<div className="text-sm font-medium mb-2 text-muted-foreground">
|
|
477
|
+
Tables ({tables.length})
|
|
478
|
+
</div>
|
|
479
|
+
<ScrollArea className="h-[300px] lg:h-[500px] rounded-md border">
|
|
480
|
+
<div className="p-2 space-y-1">
|
|
481
|
+
{tables.map((table) => (
|
|
482
|
+
<button
|
|
483
|
+
key={table.name}
|
|
484
|
+
onClick={() => handleTableClick(table.name)}
|
|
485
|
+
className={cn(
|
|
486
|
+
"w-full text-left px-2 py-1.5 text-sm rounded-md transition-colors",
|
|
487
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
488
|
+
selectedTable === table.name && "bg-accent text-accent-foreground font-medium"
|
|
489
|
+
)}
|
|
490
|
+
>
|
|
491
|
+
{table.name}
|
|
492
|
+
</button>
|
|
493
|
+
))}
|
|
494
|
+
</div>
|
|
495
|
+
</ScrollArea>
|
|
496
|
+
</div>
|
|
497
|
+
|
|
498
|
+
{/* Diagram Area */}
|
|
499
|
+
<div className="flex-1 min-w-0">
|
|
500
|
+
{/* Zoom Controls */}
|
|
501
|
+
<div className="flex items-center gap-2 mb-3">
|
|
502
|
+
<div className="flex items-center gap-1 rounded-md border p-1">
|
|
503
|
+
<Button
|
|
504
|
+
variant="ghost"
|
|
505
|
+
size="icon"
|
|
506
|
+
className="h-7 w-7"
|
|
507
|
+
onClick={handleZoomOut}
|
|
508
|
+
title="Zoom out"
|
|
509
|
+
>
|
|
510
|
+
<ZoomOut className="h-4 w-4" />
|
|
511
|
+
</Button>
|
|
512
|
+
<span className="w-14 text-center text-sm tabular-nums">
|
|
513
|
+
{zoom}%
|
|
514
|
+
</span>
|
|
515
|
+
<Button
|
|
516
|
+
variant="ghost"
|
|
517
|
+
size="icon"
|
|
518
|
+
className="h-7 w-7"
|
|
519
|
+
onClick={handleZoomIn}
|
|
520
|
+
title="Zoom in"
|
|
521
|
+
>
|
|
522
|
+
<ZoomIn className="h-4 w-4" />
|
|
523
|
+
</Button>
|
|
524
|
+
</div>
|
|
525
|
+
<Button
|
|
526
|
+
variant="ghost"
|
|
527
|
+
size="icon"
|
|
528
|
+
className="h-7 w-7"
|
|
529
|
+
onClick={handleZoomReset}
|
|
530
|
+
title="Reset zoom"
|
|
531
|
+
>
|
|
532
|
+
<RotateCcw className="h-4 w-4" />
|
|
533
|
+
</Button>
|
|
534
|
+
<Button
|
|
535
|
+
variant="ghost"
|
|
536
|
+
size="icon"
|
|
537
|
+
className="h-7 w-7"
|
|
538
|
+
onClick={handleViewReset}
|
|
539
|
+
title="ビューをリセット"
|
|
540
|
+
>
|
|
541
|
+
<Home className="h-4 w-4" />
|
|
542
|
+
</Button>
|
|
543
|
+
<span className="text-xs text-muted-foreground ml-2">
|
|
544
|
+
{isLoaded ? "Drag tables to rearrange" : "Loading..."}
|
|
545
|
+
</span>
|
|
546
|
+
</div>
|
|
547
|
+
|
|
548
|
+
{/* Drawflow Container */}
|
|
549
|
+
<div
|
|
550
|
+
ref={containerRef}
|
|
551
|
+
className="drawflow-container rounded-lg border"
|
|
552
|
+
style={{
|
|
553
|
+
height: "600px",
|
|
554
|
+
width: "100%",
|
|
555
|
+
backgroundColor: "#f8fafc",
|
|
556
|
+
backgroundImage: "radial-gradient(circle, #cbd5e1 1px, transparent 1px)",
|
|
557
|
+
backgroundSize: "20px 20px",
|
|
558
|
+
position: "relative",
|
|
559
|
+
}}
|
|
560
|
+
/>
|
|
561
|
+
|
|
562
|
+
{/* Help Text */}
|
|
563
|
+
<p className="mt-2 text-xs text-muted-foreground">
|
|
564
|
+
Drag tables to rearrange. Connections show foreign key relationships.
|
|
565
|
+
</p>
|
|
566
|
+
</div>
|
|
567
|
+
|
|
568
|
+
{/* Minimal custom styles - base styles from CDN */}
|
|
569
|
+
<style jsx global>{`
|
|
570
|
+
/* Custom colors for connections */
|
|
571
|
+
.drawflow .connection .main-path {
|
|
572
|
+
stroke: #3b82f6;
|
|
573
|
+
stroke-width: 2;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.drawflow .connection .main-path:hover {
|
|
577
|
+
stroke: #1d4ed8;
|
|
578
|
+
stroke-width: 3;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/* Custom input/output colors */
|
|
582
|
+
.drawflow .drawflow-node .input,
|
|
583
|
+
.drawflow .drawflow-node .output {
|
|
584
|
+
background: #3b82f6;
|
|
585
|
+
border: 2px solid white;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/* Selection highlight */
|
|
589
|
+
.drawflow .drawflow-node.selected .er-table-node {
|
|
590
|
+
box-shadow: 0 0 0 2px #3b82f6 !important;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/* Hide delete button */
|
|
594
|
+
.drawflow .drawflow-delete {
|
|
595
|
+
display: none !important;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/* Node background transparent */
|
|
599
|
+
.drawflow .drawflow-node {
|
|
600
|
+
background: transparent;
|
|
601
|
+
border: none;
|
|
602
|
+
padding: 0;
|
|
603
|
+
}
|
|
604
|
+
`}</style>
|
|
605
|
+
</div>
|
|
606
|
+
);
|
|
607
|
+
});
|