@tomako/tools-runtime 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/package.json +629 -0
- package/src/assets/icons/brands/social/bluesky-icon.tsx +9 -0
- package/src/assets/icons/brands/social/facebook-icon.tsx +9 -0
- package/src/assets/icons/brands/social/index.ts +8 -0
- package/src/assets/icons/brands/social/instagram-icon.tsx +9 -0
- package/src/assets/icons/brands/social/linkedin-icon.tsx +9 -0
- package/src/assets/icons/brands/social/threads-icon.tsx +9 -0
- package/src/assets/icons/brands/social/tiktok-icon.tsx +10 -0
- package/src/assets/icons/brands/social/x-icon.tsx +9 -0
- package/src/assets/icons/brands/social/youtube-icon.tsx +9 -0
- package/src/assets/icons/social-profile/facebook-icon.tsx +12 -0
- package/src/assets/icons/social-profile/index.ts +29 -0
- package/src/assets/icons/social-profile/instagram-icon.tsx +18 -0
- package/src/assets/icons/social-profile/linkedin-icon.tsx +12 -0
- package/src/assets/icons/social-profile/tiktok-icon.tsx +12 -0
- package/src/assets/icons/social-profile/x-icon.tsx +13 -0
- package/src/assets/icons/social-profile/youtube-icon.tsx +12 -0
- package/src/components/tools/engine/form-builder.tsx +219 -0
- package/src/components/tools/engine/package-widget-loader.tsx +38 -0
- package/src/components/tools/engine/package-widget-runtime.tsx +409 -0
- package/src/components/tools/engine/package-widget.tsx +77 -0
- package/src/components/tools/engine/result-view.tsx +596 -0
- package/src/components/tools/engine/use-legacy-llm-task.ts +64 -0
- package/src/components/tools/engine/use-tool-task.ts +195 -0
- package/src/components/tools/market-forecast-report.tsx +1150 -0
- package/src/components/tools/registry.ts +13 -0
- package/src/components/tools/workspace/index.ts +39 -0
- package/src/components/tools/workspace/tool-action-bar.tsx +99 -0
- package/src/components/tools/workspace/tool-empty-panel.tsx +32 -0
- package/src/components/tools/workspace/tool-error-panel.tsx +40 -0
- package/src/components/tools/workspace/tool-field.tsx +124 -0
- package/src/components/tools/workspace/tool-file-upload.tsx +112 -0
- package/src/components/tools/workspace/tool-form-section.tsx +21 -0
- package/src/components/tools/workspace/tool-form-shell.tsx +36 -0
- package/src/components/tools/workspace/tool-loading-panel.tsx +269 -0
- package/src/components/tools/workspace/tool-option-row.tsx +97 -0
- package/src/components/tools/workspace/tool-preview-panel.tsx +31 -0
- package/src/components/tools/workspace/tool-result-actions.tsx +67 -0
- package/src/components/tools/workspace/tool-result-file-actions.ts +31 -0
- package/src/components/tools/workspace/tool-result-header.tsx +39 -0
- package/src/components/tools/workspace/tool-status.tsx +13 -0
- package/src/components/tools/workspace/tool-workspace-layout.tsx +226 -0
- package/src/constants/LKS.ts +29 -0
- package/src/constants/related-tools.ts +18 -0
- package/src/constants/social-profile-kit.ts +284 -0
- package/src/constants/tool-assets.ts +7 -0
- package/src/env.d.ts +3 -0
- package/src/features/tools/_templates/standard-tool.container.tsx +90 -0
- package/src/features/tools/app-icon-resizer/app-icon-resizer.container.tsx +11 -0
- package/src/features/tools/app-icon-resizer/app-icon-resizer.spec.ts +15 -0
- package/src/features/tools/app-icon-resizer/widget/app-icon-resizer.tsx +444 -0
- package/src/features/tools/app-icon-resizer/widget/constants.ts +19 -0
- package/src/features/tools/app-icon-resizer/widget/helpers.ts +314 -0
- package/src/features/tools/app-icon-resizer/widget/index.ts +7 -0
- package/src/features/tools/app-icon-resizer/widget/platform-icons.tsx +59 -0
- package/src/features/tools/app-icon-resizer/widget/preview-dialogs.tsx +139 -0
- package/src/features/tools/app-icon-resizer/widget/result-shell.tsx +165 -0
- package/src/features/tools/app-icon-resizer/widget/types.ts +36 -0
- package/src/features/tools/app-store-screenshot-generator/app-store-screenshot-generator.container.tsx +108 -0
- package/src/features/tools/app-store-screenshot-generator/app-store-screenshot-generator.spec.ts +14 -0
- package/src/features/tools/app-store-screenshot-generator/config.ts +3 -0
- package/src/features/tools/app-store-screenshot-generator/widget/app-store-screenshot-generator.tsx +1250 -0
- package/src/features/tools/app-store-screenshot-generator/widget/asset-slots.ts +76 -0
- package/src/features/tools/app-store-screenshot-generator/widget/constants.ts +43 -0
- package/src/features/tools/app-store-screenshot-generator/widget/form-controls.tsx +214 -0
- package/src/features/tools/app-store-screenshot-generator/widget/generation.ts +528 -0
- package/src/features/tools/app-store-screenshot-generator/widget/index.ts +7 -0
- package/src/features/tools/app-store-screenshot-generator/widget/input-media.ts +175 -0
- package/src/features/tools/app-store-screenshot-generator/widget/types.ts +60 -0
- package/src/features/tools/app-store-screenshot-generator/widget/zip.ts +119 -0
- package/src/features/tools/build-in-public-story-generator/build-in-public-story-generator.container.tsx +135 -0
- package/src/features/tools/build-in-public-story-generator/build-in-public-story-generator.spec.ts +15 -0
- package/src/features/tools/build-in-public-story-generator/widget/build-in-public-story-generator.tsx +314 -0
- package/src/features/tools/build-in-public-story-generator/widget/constants.ts +3 -0
- package/src/features/tools/build-in-public-story-generator/widget/helpers.ts +25 -0
- package/src/features/tools/build-in-public-story-generator/widget/index.ts +7 -0
- package/src/features/tools/build-in-public-story-generator/widget/preview-panels.tsx +58 -0
- package/src/features/tools/build-in-public-story-generator/widget/result-shell.tsx +164 -0
- package/src/features/tools/build-in-public-story-generator/widget/types.ts +6 -0
- package/src/features/tools/cold-start-channel-selector/cold-start-channel-selector.container.tsx +30 -0
- package/src/features/tools/cold-start-channel-selector/cold-start-channel-selector.spec.ts +15 -0
- package/src/features/tools/cold-start-channel-selector/widget/cold-start-channel-selector.tsx +417 -0
- package/src/features/tools/cold-start-channel-selector/widget/constants.ts +46 -0
- package/src/features/tools/cold-start-channel-selector/widget/form-controls.tsx +41 -0
- package/src/features/tools/cold-start-channel-selector/widget/helpers.ts +75 -0
- package/src/features/tools/cold-start-channel-selector/widget/index.ts +7 -0
- package/src/features/tools/cold-start-channel-selector/widget/preview-panels.tsx +250 -0
- package/src/features/tools/cold-start-channel-selector/widget/result-shell.tsx +199 -0
- package/src/features/tools/cold-start-channel-selector/widget/types.ts +21 -0
- package/src/features/tools/commercial-bp-generator/commercial-bp-generator.container.tsx +102 -0
- package/src/features/tools/commercial-bp-generator/commercial-bp-generator.spec.ts +14 -0
- package/src/features/tools/commercial-bp-generator/widget/commercial-bp-generator.tsx +676 -0
- package/src/features/tools/commercial-bp-generator/widget/constants.ts +32 -0
- package/src/features/tools/commercial-bp-generator/widget/helpers.ts +147 -0
- package/src/features/tools/commercial-bp-generator/widget/index.ts +7 -0
- package/src/features/tools/commercial-bp-generator/widget/result-shell.tsx +271 -0
- package/src/features/tools/commercial-bp-generator/widget/style-option.tsx +54 -0
- package/src/features/tools/commercial-bp-generator/widget/types.ts +33 -0
- package/src/features/tools/community-feedback-inbox/community-feedback-inbox.container.tsx +126 -0
- package/src/features/tools/community-feedback-inbox/community-feedback-inbox.spec.ts +15 -0
- package/src/features/tools/community-feedback-inbox/widget/community-feedback-inbox.tsx +271 -0
- package/src/features/tools/community-feedback-inbox/widget/constants.ts +3 -0
- package/src/features/tools/community-feedback-inbox/widget/helpers.ts +28 -0
- package/src/features/tools/community-feedback-inbox/widget/index.ts +7 -0
- package/src/features/tools/community-feedback-inbox/widget/preview-panels.tsx +92 -0
- package/src/features/tools/community-feedback-inbox/widget/result-shell.tsx +266 -0
- package/src/features/tools/community-feedback-inbox/widget/types.ts +6 -0
- package/src/features/tools/community-pain-point-extractor/community-pain-point-extractor.container.tsx +124 -0
- package/src/features/tools/community-pain-point-extractor/community-pain-point-extractor.spec.ts +15 -0
- package/src/features/tools/community-pain-point-extractor/widget/community-pain-point-extractor.tsx +404 -0
- package/src/features/tools/community-pain-point-extractor/widget/constants.ts +41 -0
- package/src/features/tools/community-pain-point-extractor/widget/helpers.ts +76 -0
- package/src/features/tools/community-pain-point-extractor/widget/index.ts +8 -0
- package/src/features/tools/community-pain-point-extractor/widget/progress-panels.tsx +251 -0
- package/src/features/tools/community-pain-point-extractor/widget/result-shell.tsx +478 -0
- package/src/features/tools/community-pain-point-extractor/widget/types.ts +33 -0
- package/src/features/tools/community-post-risk-checker/community-post-risk-checker.package.ts +792 -0
- package/src/features/tools/competitor-analysis/competitor-analysis.container.tsx +136 -0
- package/src/features/tools/competitor-analysis/competitor-analysis.spec.ts +15 -0
- package/src/features/tools/competitor-analysis/widget/competitor-analysis.tsx +241 -0
- package/src/features/tools/competitor-analysis/widget/constants.ts +9 -0
- package/src/features/tools/competitor-analysis/widget/index.ts +7 -0
- package/src/features/tools/competitor-analysis/widget/preview-panels.tsx +60 -0
- package/src/features/tools/competitor-analysis/widget/result-shell.tsx +418 -0
- package/src/features/tools/competitor-analysis/widget/types.ts +13 -0
- package/src/features/tools/disclaimer-generator/disclaimer-generator.package.ts +339 -0
- package/src/features/tools/email-template-generator/email-template-generator.container.tsx +224 -0
- package/src/features/tools/email-template-generator/email-template-generator.spec.ts +14 -0
- package/src/features/tools/email-template-generator/widget/email-template-generator.tsx +358 -0
- package/src/features/tools/email-template-generator/widget/helpers.ts +39 -0
- package/src/features/tools/email-template-generator/widget/index.ts +7 -0
- package/src/features/tools/email-template-generator/widget/preview-panel.tsx +311 -0
- package/src/features/tools/email-template-generator/widget/result-text-block.tsx +7 -0
- package/src/features/tools/email-template-generator/widget/types.ts +24 -0
- package/src/features/tools/gtm-readiness-checklist/gtm-readiness-checklist.container.tsx +75 -0
- package/src/features/tools/gtm-readiness-checklist/gtm-readiness-checklist.spec.ts +15 -0
- package/src/features/tools/gtm-readiness-checklist/widget/gtm-readiness-checklist.tsx +122 -0
- package/src/features/tools/gtm-readiness-checklist/widget/index.ts +7 -0
- package/src/features/tools/investor-matching-planner/investor-matching-planner.package.ts +869 -0
- package/src/features/tools/koko-codex-assistant/koko-codex-assistant.container.tsx +151 -0
- package/src/features/tools/koko-codex-assistant/koko-codex-assistant.spec.ts +14 -0
- package/src/features/tools/koko-codex-assistant/widget/index.ts +7 -0
- package/src/features/tools/koko-codex-assistant/widget/koko-codex-assistant-download.tsx +192 -0
- package/src/features/tools/logo-generator/logo-generator.container.tsx +112 -0
- package/src/features/tools/logo-generator/logo-generator.spec.ts +15 -0
- package/src/features/tools/logo-generator/widget/index.ts +7 -0
- package/src/features/tools/logo-generator/widget/logo-generator.tsx +1244 -0
- package/src/features/tools/market-forecast-report/market-forecast-report.container.tsx +73 -0
- package/src/features/tools/market-forecast-report/market-forecast-report.spec.ts +15 -0
- package/src/features/tools/million-user-growth-test/million-user-growth-test.container.tsx +123 -0
- package/src/features/tools/million-user-growth-test/million-user-growth-test.spec.ts +14 -0
- package/src/features/tools/million-user-growth-test/widget/index.ts +7 -0
- package/src/features/tools/million-user-growth-test/widget/million-user-growth-test.tsx +433 -0
- package/src/features/tools/module-loader.ts +107 -0
- package/src/features/tools/og-image-generator/og-image-generator.container.tsx +86 -0
- package/src/features/tools/og-image-generator/og-image-generator.spec.ts +14 -0
- package/src/features/tools/og-image-generator/widget/constants.ts +38 -0
- package/src/features/tools/og-image-generator/widget/form-fields.tsx +240 -0
- package/src/features/tools/og-image-generator/widget/index.ts +7 -0
- package/src/features/tools/og-image-generator/widget/og-image-generator.tsx +742 -0
- package/src/features/tools/og-image-generator/widget/preview-panel.tsx +305 -0
- package/src/features/tools/og-image-generator/widget/types.ts +1 -0
- package/src/features/tools/package/direct-models.ts +20 -0
- package/src/features/tools/package/form.ts +38 -0
- package/src/features/tools/package/l10n.ts +22 -0
- package/src/features/tools/package/package-container.tsx +285 -0
- package/src/features/tools/package/package-loaders.ts +22 -0
- package/src/features/tools/package/package-registry.ts +36 -0
- package/src/features/tools/package/result-markdown.ts +142 -0
- package/src/features/tools/package/schema.ts +379 -0
- package/src/features/tools/package/to-tool-module.ts +20 -0
- package/src/features/tools/package/to-tool-spec.ts +52 -0
- package/src/features/tools/package/types.ts +381 -0
- package/src/features/tools/pitch-deck-generator/pitch-deck-generator.container.tsx +175 -0
- package/src/features/tools/pitch-deck-generator/pitch-deck-generator.spec.ts +14 -0
- package/src/features/tools/pitch-deck-generator/pitch-deck-library-data.ts +476 -0
- package/src/features/tools/pitch-deck-generator/pitch-deck-library.tsx +159 -0
- package/src/features/tools/pitch-deck-generator/widget/ceremony-line.tsx +27 -0
- package/src/features/tools/pitch-deck-generator/widget/constants.ts +27 -0
- package/src/features/tools/pitch-deck-generator/widget/index.ts +7 -0
- package/src/features/tools/pitch-deck-generator/widget/pitch-deck-generator.tsx +763 -0
- package/src/features/tools/pitch-deck-generator/widget/result-helpers.ts +102 -0
- package/src/features/tools/pitch-deck-generator/widget/result-shell.tsx +263 -0
- package/src/features/tools/pitch-deck-generator/widget/slide-frame.tsx +106 -0
- package/src/features/tools/pitch-deck-generator/widget/slide-lightbox.tsx +149 -0
- package/src/features/tools/pitch-deck-generator/widget/style-option.tsx +54 -0
- package/src/features/tools/pitch-deck-generator/widget/types.ts +44 -0
- package/src/features/tools/product-agreement-generator/product-agreement-generator.container.tsx +137 -0
- package/src/features/tools/product-agreement-generator/product-agreement-generator.spec.ts +14 -0
- package/src/features/tools/product-agreement-generator/widget/constants.ts +27 -0
- package/src/features/tools/product-agreement-generator/widget/form-controls.tsx +218 -0
- package/src/features/tools/product-agreement-generator/widget/helpers.ts +68 -0
- package/src/features/tools/product-agreement-generator/widget/index.ts +7 -0
- package/src/features/tools/product-agreement-generator/widget/product-agreement-generator.tsx +671 -0
- package/src/features/tools/product-agreement-generator/widget/result-shell.tsx +473 -0
- package/src/features/tools/product-agreement-generator/widget/types.ts +89 -0
- package/src/features/tools/product-hunt-launch-planner/product-hunt-launch-planner.container.tsx +122 -0
- package/src/features/tools/product-hunt-launch-planner/product-hunt-launch-planner.spec.ts +15 -0
- package/src/features/tools/product-hunt-launch-planner/widget/constants.ts +5 -0
- package/src/features/tools/product-hunt-launch-planner/widget/helpers.ts +44 -0
- package/src/features/tools/product-hunt-launch-planner/widget/index.ts +7 -0
- package/src/features/tools/product-hunt-launch-planner/widget/preview-panel.tsx +143 -0
- package/src/features/tools/product-hunt-launch-planner/widget/product-hunt-launch-planner.tsx +504 -0
- package/src/features/tools/product-hunt-launch-planner/widget/result-shell.tsx +176 -0
- package/src/features/tools/product-hunt-launch-planner/widget/types.ts +20 -0
- package/src/features/tools/product-name-generator/product-name-generator.container.tsx +14 -0
- package/src/features/tools/product-name-generator/product-name-generator.spec.ts +15 -0
- package/src/features/tools/product-name-generator/widget/candidate-card.tsx +273 -0
- package/src/features/tools/product-name-generator/widget/constants.ts +21 -0
- package/src/features/tools/product-name-generator/widget/form-controls.tsx +136 -0
- package/src/features/tools/product-name-generator/widget/helpers.ts +41 -0
- package/src/features/tools/product-name-generator/widget/index.ts +7 -0
- package/src/features/tools/product-name-generator/widget/product-name-generator.tsx +776 -0
- package/src/features/tools/product-name-generator/widget/types.ts +36 -0
- package/src/features/tools/product-positioning-analyzer/product-positioning-analyzer.package.ts +801 -0
- package/src/features/tools/product-poster-generator/product-poster-generator.container.tsx +14 -0
- package/src/features/tools/product-poster-generator/product-poster-generator.spec.ts +15 -0
- package/src/features/tools/product-poster-generator/widget/constants.ts +125 -0
- package/src/features/tools/product-poster-generator/widget/form-controls.tsx +204 -0
- package/src/features/tools/product-poster-generator/widget/helpers.ts +155 -0
- package/src/features/tools/product-poster-generator/widget/index.ts +7 -0
- package/src/features/tools/product-poster-generator/widget/product-poster-generator.tsx +663 -0
- package/src/features/tools/product-poster-generator/widget/result-shell.tsx +12 -0
- package/src/features/tools/product-poster-generator/widget/types.ts +83 -0
- package/src/features/tools/product-ui-generator/product-ui-generator.container.tsx +116 -0
- package/src/features/tools/product-ui-generator/product-ui-generator.spec.ts +14 -0
- package/src/features/tools/product-ui-generator/widget/constants.ts +18 -0
- package/src/features/tools/product-ui-generator/widget/helpers.ts +11 -0
- package/src/features/tools/product-ui-generator/widget/index.ts +7 -0
- package/src/features/tools/product-ui-generator/widget/preview-panels.tsx +73 -0
- package/src/features/tools/product-ui-generator/widget/product-ui-generator.tsx +304 -0
- package/src/features/tools/product-ui-generator/widget/result-shell.tsx +118 -0
- package/src/features/tools/product-ui-generator/widget/types.ts +9 -0
- package/src/features/tools/reddit-pain-point-finder/reddit-pain-point-finder.container.tsx +113 -0
- package/src/features/tools/reddit-pain-point-finder/reddit-pain-point-finder.spec.ts +15 -0
- package/src/features/tools/reddit-pain-point-finder/widget/constants.ts +5 -0
- package/src/features/tools/reddit-pain-point-finder/widget/index.ts +7 -0
- package/src/features/tools/reddit-pain-point-finder/widget/preview-panels.tsx +73 -0
- package/src/features/tools/reddit-pain-point-finder/widget/reddit-pain-point-finder.tsx +281 -0
- package/src/features/tools/reddit-pain-point-finder/widget/result-shell.tsx +203 -0
- package/src/features/tools/reddit-pain-point-finder/widget/types.ts +15 -0
- package/src/features/tools/registry.ts +288 -0
- package/src/features/tools/runtime-registry.ts +186 -0
- package/src/features/tools/shared/create-guide-stack-container.tsx +176 -0
- package/src/features/tools/shared/create-standard-landing-container.tsx +163 -0
- package/src/features/tools/shared/tool-content-sections.tsx +659 -0
- package/src/features/tools/shared/tool-cta.tsx +66 -0
- package/src/features/tools/shared/tool-draft-view.tsx +53 -0
- package/src/features/tools/shared/tool-guide-section.tsx +191 -0
- package/src/features/tools/shared/tool-handoff.tsx +38 -0
- package/src/features/tools/shared/tool-mcp-badge.tsx +23 -0
- package/src/features/tools/shared/tool-message-translator.ts +37 -0
- package/src/features/tools/shared/tool-page-shell.tsx +348 -0
- package/src/features/tools/shared/tool-standard-generation-steps.tsx +52 -0
- package/src/features/tools/shared/tool-standard-landing-sections.tsx +447 -0
- package/src/features/tools/shared/tool-ui-registry.ts +237 -0
- package/src/features/tools/shared/tool-widget-slot.tsx +29 -0
- package/src/features/tools/slogan-generator/slogan-generator.package.ts +641 -0
- package/src/features/tools/social-listening-research-report/social-listening-research-report.container.tsx +124 -0
- package/src/features/tools/social-listening-research-report/social-listening-research-report.spec.ts +15 -0
- package/src/features/tools/social-listening-research-report/widget/constants.ts +4 -0
- package/src/features/tools/social-listening-research-report/widget/index.ts +7 -0
- package/src/features/tools/social-listening-research-report/widget/preview-panels.tsx +73 -0
- package/src/features/tools/social-listening-research-report/widget/result-shell.tsx +216 -0
- package/src/features/tools/social-listening-research-report/widget/social-listening-research-report.tsx +303 -0
- package/src/features/tools/social-listening-research-report/widget/types.ts +15 -0
- package/src/features/tools/social-platform-asset-adapter/social-platform-asset-adapter.container.tsx +123 -0
- package/src/features/tools/social-platform-asset-adapter/social-platform-asset-adapter.spec.ts +15 -0
- package/src/features/tools/social-platform-asset-adapter/widget/constants.ts +43 -0
- package/src/features/tools/social-platform-asset-adapter/widget/helpers.ts +249 -0
- package/src/features/tools/social-platform-asset-adapter/widget/index.ts +7 -0
- package/src/features/tools/social-platform-asset-adapter/widget/result-shell.tsx +350 -0
- package/src/features/tools/social-platform-asset-adapter/widget/section-heading.tsx +18 -0
- package/src/features/tools/social-platform-asset-adapter/widget/social-platform-asset-adapter.tsx +641 -0
- package/src/features/tools/social-platform-asset-adapter/widget/types.ts +40 -0
- package/src/features/tools/social-profile-kit/social-profile-kit.container.tsx +177 -0
- package/src/features/tools/social-profile-kit/social-profile-kit.spec.ts +15 -0
- package/src/features/tools/social-profile-kit/widget/context-editor.tsx +171 -0
- package/src/features/tools/social-profile-kit/widget/generation-runtime.ts +281 -0
- package/src/features/tools/social-profile-kit/widget/index.ts +7 -0
- package/src/features/tools/social-profile-kit/widget/input-panel.tsx +294 -0
- package/src/features/tools/social-profile-kit/widget/platform-dock.tsx +115 -0
- package/src/features/tools/social-profile-kit/widget/profile-canvas.tsx +318 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/bluesky-preview.tsx +188 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/facebook-preview.tsx +168 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/index.ts +1 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/instagram-preview.tsx +278 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/linkedin-preview.tsx +358 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/profile-preview.tsx +348 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/shared.tsx +391 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/threads-preview.tsx +148 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/tiktok-preview.tsx +319 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/x-preview.tsx +341 -0
- package/src/features/tools/social-profile-kit/widget/profile-preview/youtube-preview.tsx +297 -0
- package/src/features/tools/social-profile-kit/widget/social-profile-kit-generator.tsx +1059 -0
- package/src/features/tools/social-profile-kit/widget/types.ts +104 -0
- package/src/features/tools/spec-registry.ts +158 -0
- package/src/features/tools/startup-idea-research/startup-idea-research.container.tsx +111 -0
- package/src/features/tools/startup-idea-research/startup-idea-research.spec.ts +15 -0
- package/src/features/tools/startup-idea-research/widget/constants.ts +11 -0
- package/src/features/tools/startup-idea-research/widget/index.ts +7 -0
- package/src/features/tools/startup-idea-research/widget/preview-panels.tsx +67 -0
- package/src/features/tools/startup-idea-research/widget/result-shell.tsx +323 -0
- package/src/features/tools/startup-idea-research/widget/startup-idea-research.tsx +272 -0
- package/src/features/tools/startup-idea-research/widget/types.ts +21 -0
- package/src/features/tools/tarot-reading/tarot-reading.container.tsx +412 -0
- package/src/features/tools/tarot-reading/tarot-reading.spec.ts +15 -0
- package/src/features/tools/tarot-reading/widget/cards.tsx +152 -0
- package/src/features/tools/tarot-reading/widget/constants.ts +69 -0
- package/src/features/tools/tarot-reading/widget/deck-view.tsx +86 -0
- package/src/features/tools/tarot-reading/widget/deck.ts +86 -0
- package/src/features/tools/tarot-reading/widget/index.ts +7 -0
- package/src/features/tools/tarot-reading/widget/landing-view.tsx +209 -0
- package/src/features/tools/tarot-reading/widget/reading-copy.tsx +138 -0
- package/src/features/tools/tarot-reading/widget/reading-view.tsx +189 -0
- package/src/features/tools/tarot-reading/widget/reveal-view.tsx +50 -0
- package/src/features/tools/tarot-reading/widget/ritual-view.tsx +276 -0
- package/src/features/tools/tarot-reading/widget/tarot-reading.tsx +262 -0
- package/src/features/tools/tarot-reading/widget/types.ts +22 -0
- package/src/features/tools/twitter-gif-downloader/twitter-gif-downloader.container.tsx +114 -0
- package/src/features/tools/twitter-gif-downloader/twitter-gif-downloader.spec.ts +14 -0
- package/src/features/tools/twitter-gif-downloader/widget/index.ts +7 -0
- package/src/features/tools/twitter-gif-downloader/widget/twitter-gif-downloader.tsx +351 -0
- package/src/features/tools/types.ts +68 -0
- package/src/features/tools/user-interview-guide-generator/user-interview-guide-generator.package.ts +774 -0
- package/src/features/tools/user-interview-insight-report-generator/user-interview-insight-report-generator.container.tsx +23 -0
- package/src/features/tools/user-interview-insight-report-generator/user-interview-insight-report-generator.spec.ts +14 -0
- package/src/features/tools/user-interview-insight-report-generator/widget/constants.ts +8 -0
- package/src/features/tools/user-interview-insight-report-generator/widget/helpers.ts +4 -0
- package/src/features/tools/user-interview-insight-report-generator/widget/index.ts +7 -0
- package/src/features/tools/user-interview-insight-report-generator/widget/preview-panels.tsx +55 -0
- package/src/features/tools/user-interview-insight-report-generator/widget/result-shell.tsx +122 -0
- package/src/features/tools/user-interview-insight-report-generator/widget/types.ts +16 -0
- package/src/features/tools/user-interview-insight-report-generator/widget/user-interview-insight-report-generator.tsx +293 -0
- package/src/features/tools/user-interview-record-generator/user-interview-record-generator.container.tsx +18 -0
- package/src/features/tools/user-interview-record-generator/user-interview-record-generator.spec.ts +14 -0
- package/src/features/tools/user-interview-record-generator/widget/constants.ts +9 -0
- package/src/features/tools/user-interview-record-generator/widget/helpers.ts +4 -0
- package/src/features/tools/user-interview-record-generator/widget/index.ts +7 -0
- package/src/features/tools/user-interview-record-generator/widget/preview-panels.tsx +48 -0
- package/src/features/tools/user-interview-record-generator/widget/result-shell.tsx +128 -0
- package/src/features/tools/user-interview-record-generator/widget/types.ts +16 -0
- package/src/features/tools/user-interview-record-generator/widget/user-interview-record-generator.tsx +305 -0
- package/src/features/tools/utm-builder/utm-builder.package.ts +846 -0
- package/src/features/tools/widget-registry.ts +73 -0
- package/src/generated/mcp-tools-registry.json +17 -0
- package/src/host/client-proxy.test.ts +33 -0
- package/src/host/client.ts +678 -0
- package/src/host/server.ts +119 -0
- package/src/i18n/client.ts +11 -0
- package/src/i18n/locale-fallback.ts +38 -0
- package/src/i18n/locale.ts +18 -0
- package/src/i18n/messages/en/page/tools.ts +124 -0
- package/src/i18n/messages/en/tools/app-icon-resizer.ts +244 -0
- package/src/i18n/messages/en/tools/app-store-screenshot-generator.ts +145 -0
- package/src/i18n/messages/en/tools/build-in-public-story-generator.ts +229 -0
- package/src/i18n/messages/en/tools/cold-start-channel-selector.ts +423 -0
- package/src/i18n/messages/en/tools/commercial-bp-generator.ts +304 -0
- package/src/i18n/messages/en/tools/community-feedback-inbox.ts +218 -0
- package/src/i18n/messages/en/tools/community-pain-point-extractor.ts +230 -0
- package/src/i18n/messages/en/tools/community-post-risk-checker.ts +209 -0
- package/src/i18n/messages/en/tools/competitor-analysis.ts +197 -0
- package/src/i18n/messages/en/tools/email-template-generator.ts +302 -0
- package/src/i18n/messages/en/tools/engine.ts +69 -0
- package/src/i18n/messages/en/tools/gtm-readiness-checklist.ts +166 -0
- package/src/i18n/messages/en/tools/index.ts +73 -0
- package/src/i18n/messages/en/tools/koko-codex-assistant.ts +171 -0
- package/src/i18n/messages/en/tools/logo-generator.ts +173 -0
- package/src/i18n/messages/en/tools/market-forecast-report.ts +228 -0
- package/src/i18n/messages/en/tools/million-user-growth-test.ts +386 -0
- package/src/i18n/messages/en/tools/og-image-generator.ts +172 -0
- package/src/i18n/messages/en/tools/pitch-deck-generator.ts +358 -0
- package/src/i18n/messages/en/tools/product-agreement-generator.ts +411 -0
- package/src/i18n/messages/en/tools/product-hunt-launch-planner.ts +272 -0
- package/src/i18n/messages/en/tools/product-name-generator.ts +383 -0
- package/src/i18n/messages/en/tools/product-poster-generator.ts +294 -0
- package/src/i18n/messages/en/tools/product-ui-generator.ts +234 -0
- package/src/i18n/messages/en/tools/reddit-pain-point-finder.ts +163 -0
- package/src/i18n/messages/en/tools/shared.ts +24 -0
- package/src/i18n/messages/en/tools/social-listening-research-report.ts +185 -0
- package/src/i18n/messages/en/tools/social-media-profile-generator.ts +22 -0
- package/src/i18n/messages/en/tools/social-platform-asset-adapter.ts +287 -0
- package/src/i18n/messages/en/tools/social-profile-kit.ts +150 -0
- package/src/i18n/messages/en/tools/startup-idea-research.ts +170 -0
- package/src/i18n/messages/en/tools/tarot-reading.ts +230 -0
- package/src/i18n/messages/en/tools/twitter-gif-downloader.ts +145 -0
- package/src/i18n/messages/en/tools/user-interview-insight-report-generator.ts +242 -0
- package/src/i18n/messages/en/tools/user-interview-record-generator.ts +244 -0
- package/src/i18n/messages/en/tools-ui.ts +704 -0
- package/src/i18n/messages/zh/page/tools.ts +124 -0
- package/src/i18n/messages/zh/tools/app-icon-resizer.ts +242 -0
- package/src/i18n/messages/zh/tools/app-store-screenshot-generator.ts +145 -0
- package/src/i18n/messages/zh/tools/build-in-public-story-generator.ts +230 -0
- package/src/i18n/messages/zh/tools/cold-start-channel-selector.ts +422 -0
- package/src/i18n/messages/zh/tools/commercial-bp-generator.ts +302 -0
- package/src/i18n/messages/zh/tools/community-feedback-inbox.ts +217 -0
- package/src/i18n/messages/zh/tools/community-pain-point-extractor.ts +230 -0
- package/src/i18n/messages/zh/tools/community-post-risk-checker.ts +200 -0
- package/src/i18n/messages/zh/tools/competitor-analysis.ts +192 -0
- package/src/i18n/messages/zh/tools/email-template-generator.ts +302 -0
- package/src/i18n/messages/zh/tools/engine.ts +68 -0
- package/src/i18n/messages/zh/tools/gtm-readiness-checklist.ts +166 -0
- package/src/i18n/messages/zh/tools/index.ts +73 -0
- package/src/i18n/messages/zh/tools/koko-codex-assistant.ts +170 -0
- package/src/i18n/messages/zh/tools/logo-generator.ts +172 -0
- package/src/i18n/messages/zh/tools/market-forecast-report.ts +228 -0
- package/src/i18n/messages/zh/tools/million-user-growth-test.ts +385 -0
- package/src/i18n/messages/zh/tools/og-image-generator.ts +173 -0
- package/src/i18n/messages/zh/tools/pitch-deck-generator.ts +358 -0
- package/src/i18n/messages/zh/tools/product-agreement-generator.ts +401 -0
- package/src/i18n/messages/zh/tools/product-hunt-launch-planner.ts +267 -0
- package/src/i18n/messages/zh/tools/product-name-generator.ts +383 -0
- package/src/i18n/messages/zh/tools/product-poster-generator.ts +282 -0
- package/src/i18n/messages/zh/tools/product-ui-generator.ts +234 -0
- package/src/i18n/messages/zh/tools/reddit-pain-point-finder.ts +162 -0
- package/src/i18n/messages/zh/tools/shared.ts +24 -0
- package/src/i18n/messages/zh/tools/social-listening-research-report.ts +181 -0
- package/src/i18n/messages/zh/tools/social-media-profile-generator.ts +22 -0
- package/src/i18n/messages/zh/tools/social-platform-asset-adapter.ts +284 -0
- package/src/i18n/messages/zh/tools/social-profile-kit.ts +150 -0
- package/src/i18n/messages/zh/tools/startup-idea-research.ts +165 -0
- package/src/i18n/messages/zh/tools/tarot-reading.ts +228 -0
- package/src/i18n/messages/zh/tools/twitter-gif-downloader.ts +138 -0
- package/src/i18n/messages/zh/tools/user-interview-insight-report-generator.ts +224 -0
- package/src/i18n/messages/zh/tools/user-interview-record-generator.ts +226 -0
- package/src/i18n/messages/zh/tools-ui.ts +684 -0
- package/src/i18n/messages/zh-tw/page/tools.ts +115 -0
- package/src/i18n/messages/zh-tw/tools/app-icon-resizer.ts +242 -0
- package/src/i18n/messages/zh-tw/tools/app-store-screenshot-generator.ts +145 -0
- package/src/i18n/messages/zh-tw/tools/build-in-public-story-generator.ts +230 -0
- package/src/i18n/messages/zh-tw/tools/cold-start-channel-selector.ts +440 -0
- package/src/i18n/messages/zh-tw/tools/commercial-bp-generator.ts +302 -0
- package/src/i18n/messages/zh-tw/tools/community-feedback-inbox.ts +217 -0
- package/src/i18n/messages/zh-tw/tools/community-pain-point-extractor.ts +230 -0
- package/src/i18n/messages/zh-tw/tools/community-post-risk-checker.ts +200 -0
- package/src/i18n/messages/zh-tw/tools/competitor-analysis.ts +192 -0
- package/src/i18n/messages/zh-tw/tools/email-template-generator.ts +302 -0
- package/src/i18n/messages/zh-tw/tools/engine.ts +68 -0
- package/src/i18n/messages/zh-tw/tools/gtm-readiness-checklist.ts +166 -0
- package/src/i18n/messages/zh-tw/tools/index.ts +73 -0
- package/src/i18n/messages/zh-tw/tools/koko-codex-assistant.ts +170 -0
- package/src/i18n/messages/zh-tw/tools/logo-generator.ts +71 -0
- package/src/i18n/messages/zh-tw/tools/market-forecast-report.ts +228 -0
- package/src/i18n/messages/zh-tw/tools/million-user-growth-test.ts +385 -0
- package/src/i18n/messages/zh-tw/tools/og-image-generator.ts +173 -0
- package/src/i18n/messages/zh-tw/tools/pitch-deck-generator.ts +358 -0
- package/src/i18n/messages/zh-tw/tools/product-agreement-generator.ts +401 -0
- package/src/i18n/messages/zh-tw/tools/product-hunt-launch-planner.ts +267 -0
- package/src/i18n/messages/zh-tw/tools/product-name-generator.ts +383 -0
- package/src/i18n/messages/zh-tw/tools/product-poster-generator.ts +282 -0
- package/src/i18n/messages/zh-tw/tools/product-ui-generator.ts +234 -0
- package/src/i18n/messages/zh-tw/tools/reddit-pain-point-finder.ts +162 -0
- package/src/i18n/messages/zh-tw/tools/shared.ts +24 -0
- package/src/i18n/messages/zh-tw/tools/social-listening-research-report.ts +181 -0
- package/src/i18n/messages/zh-tw/tools/social-media-profile-generator.ts +22 -0
- package/src/i18n/messages/zh-tw/tools/social-platform-asset-adapter.ts +284 -0
- package/src/i18n/messages/zh-tw/tools/social-profile-kit.ts +150 -0
- package/src/i18n/messages/zh-tw/tools/startup-idea-research.ts +165 -0
- package/src/i18n/messages/zh-tw/tools/tarot-reading.ts +228 -0
- package/src/i18n/messages/zh-tw/tools/twitter-gif-downloader.ts +138 -0
- package/src/i18n/messages/zh-tw/tools/user-interview-insight-report-generator.ts +224 -0
- package/src/i18n/messages/zh-tw/tools/user-interview-record-generator.ts +226 -0
- package/src/i18n/messages/zh-tw/tools-ui.ts +525 -0
- package/src/index.ts +15 -0
- package/src/lib/activity-task-handoff.ts +404 -0
- package/src/lib/api/errors.ts +39 -0
- package/src/lib/app-origin.ts +30 -0
- package/src/lib/fact-claim-contract.ts +68 -0
- package/src/lib/fake-delay.ts +3 -0
- package/src/lib/file/download.ts +10 -0
- package/src/lib/routing/locale-paths.ts +27 -0
- package/src/lib/seo-meta.ts +3 -0
- package/src/lib/tools/app-icon-resizer-schema.ts +191 -0
- package/src/lib/tools/app-store-screenshot-generator-schema.ts +185 -0
- package/src/lib/tools/build-in-public-story-generator-schema.ts +67 -0
- package/src/lib/tools/build-in-public-story-generator.format.ts +507 -0
- package/src/lib/tools/cold-start-channel-selector-schema.ts +147 -0
- package/src/lib/tools/commercial-bp-generator-schema.ts +222 -0
- package/src/lib/tools/community-feedback-inbox-schema.ts +125 -0
- package/src/lib/tools/community-feedback-inbox.format.ts +764 -0
- package/src/lib/tools/community-pain-point-extractor-schema.ts +166 -0
- package/src/lib/tools/community-post-risk-checker-schema.ts +99 -0
- package/src/lib/tools/community-post-risk-checker.format.ts +557 -0
- package/src/lib/tools/competitor-analysis-schema.ts +144 -0
- package/src/lib/tools/draft-preview-access.ts +3 -0
- package/src/lib/tools/draft-store.ts +69 -0
- package/src/lib/tools/email-template-generator-schema.ts +124 -0
- package/src/lib/tools/gtm-checklist-copy.ts +57 -0
- package/src/lib/tools/gtm-checklist-structure.ts +37 -0
- package/src/lib/tools/image-download.ts +68 -0
- package/src/lib/tools/input-quality.ts +97 -0
- package/src/lib/tools/logo-generator-schema.ts +224 -0
- package/src/lib/tools/market-forecast-report-schema.ts +299 -0
- package/src/lib/tools/mcp-registry.ts +16 -0
- package/src/lib/tools/mcp-types.ts +18 -0
- package/src/lib/tools/million-user-growth-test-schema.ts +49 -0
- package/src/lib/tools/million-user-growth-test.ts +181 -0
- package/src/lib/tools/og-image-generator-render.ts +448 -0
- package/src/lib/tools/og-image-generator-schema.ts +140 -0
- package/src/lib/tools/ops-catalog.ts +102 -0
- package/src/lib/tools/pitch-deck-generator-schema.ts +182 -0
- package/src/lib/tools/pitch-deck-package.ts +0 -0
- package/src/lib/tools/product-agreement-generator-schema.ts +168 -0
- package/src/lib/tools/product-hunt-launch-planner-schema.ts +136 -0
- package/src/lib/tools/product-hunt-launch-planner.format.ts +72 -0
- package/src/lib/tools/product-name-generator-schema.ts +563 -0
- package/src/lib/tools/product-poster-generator-schema.ts +215 -0
- package/src/lib/tools/product-ui-generator-schema.ts +157 -0
- package/src/lib/tools/reddit-pain-point-finder-schema.ts +88 -0
- package/src/lib/tools/resolve-tool-locale-copy.ts +75 -0
- package/src/lib/tools/slug.ts +60 -0
- package/src/lib/tools/social-listening-research-report-schema.ts +105 -0
- package/src/lib/tools/social-platform-asset-adapter-schema.ts +152 -0
- package/src/lib/tools/social-profile-kit.constants.ts +12 -0
- package/src/lib/tools/social-profile-kit.generation.ts +257 -0
- package/src/lib/tools/social-profile-kit.input.ts +290 -0
- package/src/lib/tools/social-profile-kit.manual.ts +481 -0
- package/src/lib/tools/social-profile-kit.package.ts +220 -0
- package/src/lib/tools/social-profile-kit.schema.ts +328 -0
- package/src/lib/tools/startup-idea-research-schema.ts +107 -0
- package/src/lib/tools/tarot-imagery.ts +89 -0
- package/src/lib/tools/tarot-reading.ts +1044 -0
- package/src/lib/tools/tool-message-keys.ts +18 -0
- package/src/lib/tools/types.ts +32 -0
- package/src/lib/tools/user-interview.format.ts +147 -0
- package/src/lib/tools/user-interview.generation.ts +670 -0
- package/src/lib/tools/user-interview.schema.ts +192 -0
- package/src/lib/zip.ts +106 -0
- package/src/services/tools/handlers/gtm-readiness-checklist.ts +71 -0
- package/src/services/tools/handlers/types.ts +7 -0
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Button } from "@tomako/ui/button";
|
|
4
|
+
import { Field, Input, Textarea } from "@tomako/ui/input";
|
|
5
|
+
import { Tabs, TabsList, TabsTrigger } from "@tomako/ui/tabs";
|
|
6
|
+
import { useTranslations } from "../../../../i18n/client";
|
|
7
|
+
import {
|
|
8
|
+
PRODUCT_AGREEMENT_DATA_CATEGORIES,
|
|
9
|
+
PRODUCT_AGREEMENT_FEATURES,
|
|
10
|
+
type ProductAgreementAgentDocument,
|
|
11
|
+
type ProductAgreementAgentResult,
|
|
12
|
+
} from "../../../../lib/tools/product-agreement-generator-schema";
|
|
13
|
+
import {
|
|
14
|
+
AlertTriangle,
|
|
15
|
+
CheckCircle2,
|
|
16
|
+
Cloud,
|
|
17
|
+
Copy,
|
|
18
|
+
Download,
|
|
19
|
+
Loader2,
|
|
20
|
+
MessageSquare,
|
|
21
|
+
Send,
|
|
22
|
+
Sparkles,
|
|
23
|
+
} from "lucide-react";
|
|
24
|
+
import type { RefObject } from "react";
|
|
25
|
+
|
|
26
|
+
import { supplementModuleOrder } from "./constants";
|
|
27
|
+
import { DisclosureList, DocumentButton, MultiSelectMenu } from "./form-controls";
|
|
28
|
+
import { formatStatus } from "./helpers";
|
|
29
|
+
import type {
|
|
30
|
+
ChatMessage,
|
|
31
|
+
FormCopy,
|
|
32
|
+
FormState,
|
|
33
|
+
GenerationState,
|
|
34
|
+
ModuleCopy,
|
|
35
|
+
SupplementModule,
|
|
36
|
+
} from "./types";
|
|
37
|
+
|
|
38
|
+
export function ResultShell({
|
|
39
|
+
resultSectionRef,
|
|
40
|
+
state,
|
|
41
|
+
result,
|
|
42
|
+
activeDocument,
|
|
43
|
+
form,
|
|
44
|
+
copy,
|
|
45
|
+
supplementModules,
|
|
46
|
+
revisionExamples,
|
|
47
|
+
valueJoiner,
|
|
48
|
+
activeSupplement,
|
|
49
|
+
setActiveSupplement,
|
|
50
|
+
setActiveDocumentIndex,
|
|
51
|
+
agentInstruction,
|
|
52
|
+
setAgentInstruction,
|
|
53
|
+
chatMessages,
|
|
54
|
+
copied,
|
|
55
|
+
isRevising,
|
|
56
|
+
canRevise,
|
|
57
|
+
t,
|
|
58
|
+
update,
|
|
59
|
+
generateWithAgent,
|
|
60
|
+
reviseWithAgent,
|
|
61
|
+
copyResult,
|
|
62
|
+
downloadResult,
|
|
63
|
+
moduleInstruction,
|
|
64
|
+
}: {
|
|
65
|
+
resultSectionRef: RefObject<HTMLElement | null>;
|
|
66
|
+
state: GenerationState;
|
|
67
|
+
result: ProductAgreementAgentResult | null;
|
|
68
|
+
activeDocument: ProductAgreementAgentDocument | null;
|
|
69
|
+
form: FormState;
|
|
70
|
+
copy: FormCopy;
|
|
71
|
+
supplementModules: ModuleCopy;
|
|
72
|
+
revisionExamples: readonly string[];
|
|
73
|
+
valueJoiner: string;
|
|
74
|
+
activeSupplement: SupplementModule;
|
|
75
|
+
setActiveSupplement: (value: SupplementModule) => void;
|
|
76
|
+
setActiveDocumentIndex: (index: number) => void;
|
|
77
|
+
agentInstruction: string;
|
|
78
|
+
setAgentInstruction: (value: string) => void;
|
|
79
|
+
chatMessages: ChatMessage[];
|
|
80
|
+
copied: boolean;
|
|
81
|
+
isRevising: boolean;
|
|
82
|
+
canRevise: boolean;
|
|
83
|
+
t: ReturnType<typeof useTranslations>;
|
|
84
|
+
update: <K extends keyof FormState>(key: K, value: FormState[K]) => void;
|
|
85
|
+
generateWithAgent: () => void;
|
|
86
|
+
reviseWithAgent: (instruction: string) => void;
|
|
87
|
+
copyResult: () => void;
|
|
88
|
+
downloadResult: () => void;
|
|
89
|
+
moduleInstruction: (module: SupplementModule) => string;
|
|
90
|
+
}) {
|
|
91
|
+
if (state.phase === "idle" && !result) return null;
|
|
92
|
+
|
|
93
|
+
return (
|
|
94
|
+
<section
|
|
95
|
+
ref={resultSectionRef}
|
|
96
|
+
className="rounded-[1.75rem] border border-[#D8D4CA] bg-[#F4F5ED] p-5 md:p-7"
|
|
97
|
+
>
|
|
98
|
+
{state.phase === "loading" && !result ? (
|
|
99
|
+
<div className="flex min-h-[520px] flex-col justify-center rounded-[1.5rem] border border-[#D8D4CA] bg-white p-7 text-center">
|
|
100
|
+
<div className="mx-auto flex size-14 items-center justify-center rounded-full bg-[#111111] text-white">
|
|
101
|
+
<Loader2 aria-hidden className="size-6 animate-spin" />
|
|
102
|
+
</div>
|
|
103
|
+
<h3 className="mt-5 text-2xl font-semibold leading-tight text-[#111111]">
|
|
104
|
+
{t("loadingTitle")}
|
|
105
|
+
</h3>
|
|
106
|
+
<p className="mx-auto mt-3 max-w-lg text-sm leading-6 text-[#555555]">
|
|
107
|
+
{t("loadingHint")}
|
|
108
|
+
</p>
|
|
109
|
+
<p className="mt-4 text-xs font-semibold uppercase text-[#777777]">
|
|
110
|
+
{state.taskId ? `${state.taskId} · ` : ""}
|
|
111
|
+
{formatStatus(state.status)}
|
|
112
|
+
</p>
|
|
113
|
+
</div>
|
|
114
|
+
) : null}
|
|
115
|
+
|
|
116
|
+
{state.phase === "error" && !result ? (
|
|
117
|
+
<div className="flex min-h-[520px] flex-col justify-center rounded-[1.5rem] border border-[#FFD2C2] bg-[#FFF4EC] p-7 text-center">
|
|
118
|
+
<div className="mx-auto flex size-14 items-center justify-center rounded-full bg-[#FF5A2E] text-white">
|
|
119
|
+
<AlertTriangle aria-hidden className="size-6" />
|
|
120
|
+
</div>
|
|
121
|
+
<h3 className="mt-5 text-2xl font-semibold leading-tight text-[#111111]">
|
|
122
|
+
{t("errorTitle")}
|
|
123
|
+
</h3>
|
|
124
|
+
<p className="mx-auto mt-3 max-w-lg text-sm leading-6 text-[#6A382A]">
|
|
125
|
+
{state.message || t("errors.agent")}
|
|
126
|
+
</p>
|
|
127
|
+
<Button
|
|
128
|
+
type="button"
|
|
129
|
+
variant="ghost"
|
|
130
|
+
onClick={() => void generateWithAgent()}
|
|
131
|
+
className="mx-auto mt-6 inline-flex min-h-11 items-center gap-2 rounded-full bg-[#111111] px-5 text-sm font-semibold text-white hover:bg-[#111111]"
|
|
132
|
+
>
|
|
133
|
+
<Cloud aria-hidden className="size-4" />
|
|
134
|
+
{t("retryAgent")}
|
|
135
|
+
</Button>
|
|
136
|
+
</div>
|
|
137
|
+
) : null}
|
|
138
|
+
|
|
139
|
+
{result && activeDocument ? (
|
|
140
|
+
<div className="grid gap-5">
|
|
141
|
+
<div className="rounded-[1.5rem] border border-[#D8D4CA] bg-white p-5 shadow-[0_14px_34px_rgba(17,17,17,0.08)]">
|
|
142
|
+
<div className="flex flex-col gap-4 md:flex-row md:items-start md:justify-between">
|
|
143
|
+
<div>
|
|
144
|
+
<div className="flex flex-wrap gap-2">
|
|
145
|
+
<p className="inline-flex items-center gap-2 rounded-full bg-[#111111] px-3 py-1.5 text-xs font-semibold text-white">
|
|
146
|
+
<AlertTriangle aria-hidden className="size-3.5 text-[#B7FF3E]" />
|
|
147
|
+
{t("agentResult")}
|
|
148
|
+
</p>
|
|
149
|
+
{isRevising ? (
|
|
150
|
+
<p className="inline-flex items-center gap-2 rounded-full bg-[#B7FF3E] px-3 py-1.5 text-xs font-semibold text-[#111111]">
|
|
151
|
+
<Loader2 aria-hidden className="size-3.5 animate-spin" />
|
|
152
|
+
{t("revisingStatus")}
|
|
153
|
+
</p>
|
|
154
|
+
) : null}
|
|
155
|
+
</div>
|
|
156
|
+
<h3 className="mt-4 text-2xl font-semibold leading-tight text-[#111111]">
|
|
157
|
+
{form.productName || t("resultTitle")}
|
|
158
|
+
</h3>
|
|
159
|
+
<p className="mt-2 text-sm leading-6 text-[#555555]">{result.summary}</p>
|
|
160
|
+
<p className="mt-3 rounded-2xl bg-[#FFF4EC] px-4 py-3 text-sm leading-6 text-[#6A382A]">
|
|
161
|
+
{result.disclaimer}
|
|
162
|
+
</p>
|
|
163
|
+
{state.phase === "error" ? (
|
|
164
|
+
<p className="mt-3 rounded-2xl border border-[#FFD2C2] bg-[#FFF4EC] px-4 py-3 text-sm font-semibold leading-6 text-[#8A260F]">
|
|
165
|
+
{state.message}
|
|
166
|
+
</p>
|
|
167
|
+
) : null}
|
|
168
|
+
</div>
|
|
169
|
+
<div className="flex shrink-0 gap-2">
|
|
170
|
+
<Button
|
|
171
|
+
type="button"
|
|
172
|
+
variant="outline"
|
|
173
|
+
onClick={() => void copyResult()}
|
|
174
|
+
className="inline-flex size-11 items-center justify-center rounded-full border border-[#D8D4CA] bg-white text-[#111111] transition hover:-translate-y-0.5"
|
|
175
|
+
aria-label={copied ? t("copied") : t("copyAll")}
|
|
176
|
+
title={copied ? t("copied") : t("copyAll")}
|
|
177
|
+
>
|
|
178
|
+
{copied ? (
|
|
179
|
+
<CheckCircle2 aria-hidden className="size-4" />
|
|
180
|
+
) : (
|
|
181
|
+
<Copy aria-hidden className="size-4" />
|
|
182
|
+
)}
|
|
183
|
+
</Button>
|
|
184
|
+
<Button
|
|
185
|
+
type="button"
|
|
186
|
+
variant="ghost"
|
|
187
|
+
onClick={downloadResult}
|
|
188
|
+
className="inline-flex size-11 items-center justify-center rounded-full bg-[#B7FF3E] text-[#111111] transition hover:-translate-y-0.5 hover:bg-[#B7FF3E]"
|
|
189
|
+
aria-label={t("downloadAll")}
|
|
190
|
+
title={t("downloadAll")}
|
|
191
|
+
>
|
|
192
|
+
<Download aria-hidden className="size-4" />
|
|
193
|
+
</Button>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
{result.missingInfo.length ? (
|
|
199
|
+
<div className="rounded-[1.5rem] border border-[#FFD2C2] bg-[#FFF4EC] p-4">
|
|
200
|
+
<p className="text-sm font-semibold text-[#111111]">
|
|
201
|
+
{t("missingPromptTitle")}
|
|
202
|
+
</p>
|
|
203
|
+
<div className="mt-3 flex flex-wrap gap-2">
|
|
204
|
+
{result.missingInfo.slice(0, 6).map((item) => (
|
|
205
|
+
<Button
|
|
206
|
+
key={item}
|
|
207
|
+
type="button"
|
|
208
|
+
variant="outline"
|
|
209
|
+
onClick={() => {
|
|
210
|
+
setActiveSupplement("risk");
|
|
211
|
+
setAgentInstruction(item);
|
|
212
|
+
}}
|
|
213
|
+
className="h-auto whitespace-normal rounded-full border border-[#F1B99E] bg-white px-3 py-2 text-left text-xs font-semibold leading-5 text-[#6A382A] transition hover:border-[#111111] hover:bg-white hover:text-[#111111]"
|
|
214
|
+
>
|
|
215
|
+
{item}
|
|
216
|
+
</Button>
|
|
217
|
+
))}
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
) : null}
|
|
221
|
+
|
|
222
|
+
<div className="grid gap-4 xl:grid-cols-[260px_minmax(0,1fr)]">
|
|
223
|
+
<div className="grid content-start gap-3">
|
|
224
|
+
{result.documents.map((document, index) => (
|
|
225
|
+
<DocumentButton
|
|
226
|
+
key={`${document.type}-${document.title}`}
|
|
227
|
+
document={document}
|
|
228
|
+
active={activeDocument === document}
|
|
229
|
+
onClick={() => setActiveDocumentIndex(index)}
|
|
230
|
+
/>
|
|
231
|
+
))}
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<article className="max-h-[820px] overflow-auto rounded-[1.5rem] border border-[#D8D4CA] bg-white p-6 shadow-[0_14px_34px_rgba(17,17,17,0.06)]">
|
|
235
|
+
<h3 className="text-xl font-semibold leading-tight text-[#111111]">
|
|
236
|
+
{activeDocument.title}
|
|
237
|
+
</h3>
|
|
238
|
+
{activeDocument.summary ? (
|
|
239
|
+
<p className="mt-2 text-sm leading-6 text-[#666666]">
|
|
240
|
+
{activeDocument.summary}
|
|
241
|
+
</p>
|
|
242
|
+
) : null}
|
|
243
|
+
<div className="mt-5 whitespace-pre-wrap text-sm leading-7 text-[#3D3D3D]">
|
|
244
|
+
{activeDocument.markdown}
|
|
245
|
+
</div>
|
|
246
|
+
</article>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<div className="rounded-[1.5rem] border border-[#D8D4CA] bg-white p-5 shadow-[0_14px_34px_rgba(17,17,17,0.06)]">
|
|
250
|
+
<div className="flex items-start gap-3">
|
|
251
|
+
<span className="flex size-10 shrink-0 items-center justify-center rounded-full bg-[#B7FF3E] text-[#111111]">
|
|
252
|
+
<Sparkles aria-hidden className="size-4" />
|
|
253
|
+
</span>
|
|
254
|
+
<div>
|
|
255
|
+
<h3 className="text-base font-semibold text-[#111111]">
|
|
256
|
+
{t("supplement.title")}
|
|
257
|
+
</h3>
|
|
258
|
+
<p className="mt-1 text-sm leading-6 text-[#555555]">
|
|
259
|
+
{t("supplement.hint")}
|
|
260
|
+
</p>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
<Tabs
|
|
265
|
+
value={activeSupplement}
|
|
266
|
+
onValueChange={(value) => setActiveSupplement(value as SupplementModule)}
|
|
267
|
+
>
|
|
268
|
+
<TabsList className="mt-4 flex h-auto flex-wrap justify-start gap-2 rounded-none border-0 bg-transparent p-0">
|
|
269
|
+
{supplementModuleOrder.map((module) => (
|
|
270
|
+
<TabsTrigger
|
|
271
|
+
key={module}
|
|
272
|
+
value={module}
|
|
273
|
+
className="h-auto rounded-full border border-[#D8D4CA] bg-[#F7F6F2] px-3.5 py-2 text-xs font-semibold text-[#555555] shadow-none transition hover:border-[#111111] data-[state=active]:border-[#B7FF3E] data-[state=active]:bg-[#F1FFD9] data-[state=active]:text-[#111111] data-[state=active]:shadow-none"
|
|
274
|
+
>
|
|
275
|
+
{supplementModules[module].label}
|
|
276
|
+
</TabsTrigger>
|
|
277
|
+
))}
|
|
278
|
+
</TabsList>
|
|
279
|
+
</Tabs>
|
|
280
|
+
|
|
281
|
+
<p className="mt-3 text-xs leading-5 text-[#777777]">
|
|
282
|
+
{supplementModules[activeSupplement].hint}
|
|
283
|
+
</p>
|
|
284
|
+
|
|
285
|
+
<div className="mt-5 grid gap-5">
|
|
286
|
+
{activeSupplement === "risk" ? (
|
|
287
|
+
<>
|
|
288
|
+
<MultiSelectMenu
|
|
289
|
+
title={t("dataTitle")}
|
|
290
|
+
hint={t("dataHint")}
|
|
291
|
+
placeholder={t("dataPlaceholder")}
|
|
292
|
+
joiner={valueJoiner}
|
|
293
|
+
options={PRODUCT_AGREEMENT_DATA_CATEGORIES}
|
|
294
|
+
values={form.dataCategories}
|
|
295
|
+
labels={copy.dataCategories}
|
|
296
|
+
onChange={(values) => update("dataCategories", values)}
|
|
297
|
+
/>
|
|
298
|
+
|
|
299
|
+
<MultiSelectMenu
|
|
300
|
+
title={t("featureTitle")}
|
|
301
|
+
hint={t("featureHint")}
|
|
302
|
+
placeholder={t("featurePlaceholder")}
|
|
303
|
+
joiner={valueJoiner}
|
|
304
|
+
options={PRODUCT_AGREEMENT_FEATURES}
|
|
305
|
+
values={form.features}
|
|
306
|
+
labels={copy.features}
|
|
307
|
+
onChange={(values) => update("features", values)}
|
|
308
|
+
/>
|
|
309
|
+
</>
|
|
310
|
+
) : null}
|
|
311
|
+
|
|
312
|
+
{activeSupplement === "publish" ? (
|
|
313
|
+
<>
|
|
314
|
+
<Field label={t("operatorLabel")} hint={t("optional")}>
|
|
315
|
+
<Input
|
|
316
|
+
className="h-12 rounded-2xl border-[#CFC9BC] bg-[#F7F6F2] text-[15px] shadow-none focus-visible:border-[#111111] focus-visible:ring-[#B7FF3E]/35"
|
|
317
|
+
placeholder={t("operatorPlaceholder")}
|
|
318
|
+
value={form.operatorName}
|
|
319
|
+
onChange={(event) => update("operatorName", event.target.value)}
|
|
320
|
+
/>
|
|
321
|
+
</Field>
|
|
322
|
+
|
|
323
|
+
<div className="grid gap-4 md:grid-cols-2">
|
|
324
|
+
<Field label={t("urlLabel")} hint={t("optional")}>
|
|
325
|
+
<Input
|
|
326
|
+
className="h-12 rounded-2xl border-[#CFC9BC] bg-[#F7F6F2] text-[15px] shadow-none focus-visible:border-[#111111] focus-visible:ring-[#B7FF3E]/35"
|
|
327
|
+
placeholder={t("urlPlaceholder")}
|
|
328
|
+
value={form.productUrl}
|
|
329
|
+
onChange={(event) => update("productUrl", event.target.value)}
|
|
330
|
+
/>
|
|
331
|
+
</Field>
|
|
332
|
+
<Field label={t("contactLabel")} hint={t("optional")}>
|
|
333
|
+
<Input
|
|
334
|
+
className="h-12 rounded-2xl border-[#CFC9BC] bg-[#F7F6F2] text-[15px] shadow-none focus-visible:border-[#111111] focus-visible:ring-[#B7FF3E]/35"
|
|
335
|
+
placeholder={t("contactPlaceholder")}
|
|
336
|
+
value={form.contactEmail}
|
|
337
|
+
onChange={(event) => update("contactEmail", event.target.value)}
|
|
338
|
+
/>
|
|
339
|
+
</Field>
|
|
340
|
+
</div>
|
|
341
|
+
</>
|
|
342
|
+
) : null}
|
|
343
|
+
|
|
344
|
+
{activeSupplement === "notes" ? (
|
|
345
|
+
<Field label={t("notesLabel")} hint={t("optional")}>
|
|
346
|
+
<Textarea
|
|
347
|
+
className="min-h-32 rounded-2xl border-[#CFC9BC] bg-[#F7F6F2] text-[15px] shadow-none focus-visible:border-[#111111] focus-visible:ring-[#B7FF3E]/35"
|
|
348
|
+
placeholder={t("notesPlaceholder")}
|
|
349
|
+
value={form.notes}
|
|
350
|
+
onChange={(event) => update("notes", event.target.value)}
|
|
351
|
+
/>
|
|
352
|
+
</Field>
|
|
353
|
+
) : null}
|
|
354
|
+
</div>
|
|
355
|
+
|
|
356
|
+
<Button
|
|
357
|
+
type="button"
|
|
358
|
+
variant="ghost"
|
|
359
|
+
onClick={() => void reviseWithAgent(moduleInstruction(activeSupplement))}
|
|
360
|
+
disabled={!canRevise}
|
|
361
|
+
className="mt-5 inline-flex min-h-12 items-center gap-2 rounded-full bg-[#111111] px-5 text-sm font-semibold text-white transition hover:-translate-y-0.5 hover:bg-[#111111] disabled:pointer-events-none disabled:opacity-55"
|
|
362
|
+
>
|
|
363
|
+
{isRevising ? (
|
|
364
|
+
<Loader2 aria-hidden className="size-4 animate-spin" />
|
|
365
|
+
) : (
|
|
366
|
+
<Sparkles aria-hidden className="size-4" />
|
|
367
|
+
)}
|
|
368
|
+
{isRevising ? t("updatingAgent") : t("applySupplement")}
|
|
369
|
+
</Button>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<div className="rounded-[1.5rem] border border-[#D8D4CA] bg-white p-5 shadow-[0_14px_34px_rgba(17,17,17,0.06)]">
|
|
373
|
+
<div className="flex items-start gap-3">
|
|
374
|
+
<span className="flex size-10 shrink-0 items-center justify-center rounded-full bg-[#111111] text-white">
|
|
375
|
+
<MessageSquare aria-hidden className="size-4" />
|
|
376
|
+
</span>
|
|
377
|
+
<div>
|
|
378
|
+
<h3 className="text-base font-semibold text-[#111111]">
|
|
379
|
+
{t("conversation.title")}
|
|
380
|
+
</h3>
|
|
381
|
+
<p className="mt-1 text-sm leading-6 text-[#555555]">
|
|
382
|
+
{t("conversation.hint")}
|
|
383
|
+
</p>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
|
|
387
|
+
{chatMessages.length ? (
|
|
388
|
+
<div className="mt-4 grid max-h-56 gap-3 overflow-auto rounded-2xl bg-[#F7F6F2] p-3">
|
|
389
|
+
{chatMessages.map((message) => (
|
|
390
|
+
<p
|
|
391
|
+
key={message.id}
|
|
392
|
+
className={`rounded-2xl px-4 py-3 text-sm leading-6 ${
|
|
393
|
+
message.role === "user"
|
|
394
|
+
? "ml-8 bg-[#111111] text-white"
|
|
395
|
+
: message.tone === "error"
|
|
396
|
+
? "mr-8 bg-[#FFF4EC] text-[#8A260F]"
|
|
397
|
+
: "mr-8 bg-white text-[#555555]"
|
|
398
|
+
}`}
|
|
399
|
+
>
|
|
400
|
+
{message.content}
|
|
401
|
+
</p>
|
|
402
|
+
))}
|
|
403
|
+
</div>
|
|
404
|
+
) : null}
|
|
405
|
+
|
|
406
|
+
<div className="mt-4 flex flex-wrap gap-2">
|
|
407
|
+
{revisionExamples.map((example) => (
|
|
408
|
+
<Button
|
|
409
|
+
key={example}
|
|
410
|
+
type="button"
|
|
411
|
+
variant="outline"
|
|
412
|
+
onClick={() => setAgentInstruction(example)}
|
|
413
|
+
className="h-auto whitespace-normal rounded-full border border-[#D8D4CA] bg-[#F7F6F2] px-3 py-2 text-xs font-semibold text-[#555555] transition hover:border-[#111111] hover:bg-white hover:text-[#111111]"
|
|
414
|
+
>
|
|
415
|
+
{example}
|
|
416
|
+
</Button>
|
|
417
|
+
))}
|
|
418
|
+
</div>
|
|
419
|
+
|
|
420
|
+
<div className="mt-4 grid gap-3 md:grid-cols-[1fr_auto]">
|
|
421
|
+
<Textarea
|
|
422
|
+
className="min-h-24 rounded-2xl border-[#CFC9BC] bg-[#F7F6F2] text-[15px] shadow-none focus-visible:border-[#111111] focus-visible:ring-[#B7FF3E]/35"
|
|
423
|
+
placeholder={t("conversation.placeholder")}
|
|
424
|
+
value={agentInstruction}
|
|
425
|
+
onChange={(event) => setAgentInstruction(event.target.value)}
|
|
426
|
+
/>
|
|
427
|
+
<Button
|
|
428
|
+
type="button"
|
|
429
|
+
variant="ghost"
|
|
430
|
+
onClick={() => void reviseWithAgent(agentInstruction)}
|
|
431
|
+
disabled={!canRevise || !agentInstruction.trim()}
|
|
432
|
+
className="inline-flex min-h-12 items-center justify-center gap-2 rounded-full bg-[#111111] px-5 text-sm font-semibold text-white transition hover:-translate-y-0.5 hover:bg-[#111111] disabled:pointer-events-none disabled:opacity-55"
|
|
433
|
+
>
|
|
434
|
+
{isRevising ? (
|
|
435
|
+
<Loader2 aria-hidden className="size-4 animate-spin" />
|
|
436
|
+
) : (
|
|
437
|
+
<Send aria-hidden className="size-4" />
|
|
438
|
+
)}
|
|
439
|
+
{t("conversation.send")}
|
|
440
|
+
</Button>
|
|
441
|
+
</div>
|
|
442
|
+
</div>
|
|
443
|
+
|
|
444
|
+
<div className="rounded-[1.5rem] border border-[#D8D4CA] bg-white p-5">
|
|
445
|
+
<h3 className="text-base font-semibold text-[#111111]">{t("checksTitle")}</h3>
|
|
446
|
+
<p className="mt-1 text-sm leading-6 text-[#555555]">{t("checksHint")}</p>
|
|
447
|
+
<div className="mt-4 grid gap-3 lg:grid-cols-2">
|
|
448
|
+
<DisclosureList
|
|
449
|
+
title={t("download.riskHeading")}
|
|
450
|
+
items={result.riskFlags.map((flag) => `${flag.label}: ${flag.detail}`)}
|
|
451
|
+
tone="warning"
|
|
452
|
+
/>
|
|
453
|
+
<DisclosureList
|
|
454
|
+
title={t("download.missingInfoHeading")}
|
|
455
|
+
items={result.missingInfo}
|
|
456
|
+
tone="warning"
|
|
457
|
+
/>
|
|
458
|
+
<DisclosureList
|
|
459
|
+
title={t("download.jurisdictionHeading")}
|
|
460
|
+
items={result.jurisdictionNotes}
|
|
461
|
+
/>
|
|
462
|
+
<DisclosureList
|
|
463
|
+
title={t("download.reviewHeading")}
|
|
464
|
+
items={result.reviewChecklist}
|
|
465
|
+
/>
|
|
466
|
+
</div>
|
|
467
|
+
</div>
|
|
468
|
+
</div>
|
|
469
|
+
) : null}
|
|
470
|
+
</section>
|
|
471
|
+
|
|
472
|
+
);
|
|
473
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ProductAgreementAgentResult,
|
|
3
|
+
ProductAgreementDataCategory,
|
|
4
|
+
ProductAgreementDocumentType,
|
|
5
|
+
ProductAgreementFeature,
|
|
6
|
+
ProductAgreementProductType,
|
|
7
|
+
ProductAgreementRegion,
|
|
8
|
+
} from "../../../../lib/tools/product-agreement-generator-schema";
|
|
9
|
+
|
|
10
|
+
export type FormState = {
|
|
11
|
+
productName: string;
|
|
12
|
+
operatorName: string;
|
|
13
|
+
productUrl: string;
|
|
14
|
+
contactEmail: string;
|
|
15
|
+
productDescription: string;
|
|
16
|
+
productType: ProductAgreementProductType;
|
|
17
|
+
primaryRegion: ProductAgreementRegion;
|
|
18
|
+
dataCategories: ProductAgreementDataCategory[];
|
|
19
|
+
features: ProductAgreementFeature[];
|
|
20
|
+
documents: ProductAgreementDocumentType[];
|
|
21
|
+
notes: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type LoadingMode = "initial" | "revision";
|
|
25
|
+
|
|
26
|
+
export type GenerationState =
|
|
27
|
+
| { phase: "idle" }
|
|
28
|
+
| {
|
|
29
|
+
phase: "loading";
|
|
30
|
+
status: string;
|
|
31
|
+
mode: LoadingMode;
|
|
32
|
+
taskId?: string;
|
|
33
|
+
previous?: ProductAgreementAgentResult;
|
|
34
|
+
}
|
|
35
|
+
| { phase: "done"; data: ProductAgreementAgentResult; taskId?: string }
|
|
36
|
+
| {
|
|
37
|
+
phase: "error";
|
|
38
|
+
message: string;
|
|
39
|
+
taskId?: string;
|
|
40
|
+
previous?: ProductAgreementAgentResult;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type AgreementTab = "starter" | "privacy" | "commercial";
|
|
44
|
+
|
|
45
|
+
export type AgreementTabCopy = {
|
|
46
|
+
label: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type FormCopy = {
|
|
50
|
+
agreementTabs: Record<AgreementTab, AgreementTabCopy>;
|
|
51
|
+
productTypes: Record<ProductAgreementProductType, string>;
|
|
52
|
+
regions: Record<ProductAgreementRegion, string>;
|
|
53
|
+
dataCategories: Record<ProductAgreementDataCategory, string>;
|
|
54
|
+
features: Record<ProductAgreementFeature, string>;
|
|
55
|
+
documentLabels: Record<ProductAgreementDocumentType, string>;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type ResolveOptions = {
|
|
59
|
+
final?: boolean;
|
|
60
|
+
retries?: number;
|
|
61
|
+
mode?: LoadingMode;
|
|
62
|
+
previous?: ProductAgreementAgentResult | null;
|
|
63
|
+
successMessage?: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type SupplementModule = "risk" | "publish" | "notes";
|
|
67
|
+
|
|
68
|
+
export type ModuleCopy = Record<
|
|
69
|
+
SupplementModule,
|
|
70
|
+
{
|
|
71
|
+
label: string;
|
|
72
|
+
hint: string;
|
|
73
|
+
}
|
|
74
|
+
>;
|
|
75
|
+
|
|
76
|
+
export type PreviewCopy = {
|
|
77
|
+
beforeTitle: string;
|
|
78
|
+
afterTitle: string;
|
|
79
|
+
productFallback: string;
|
|
80
|
+
briefFallback: string;
|
|
81
|
+
reviewItems: readonly string[];
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export type ChatMessage = {
|
|
85
|
+
id: string;
|
|
86
|
+
role: "user" | "agent";
|
|
87
|
+
content: string;
|
|
88
|
+
tone?: "normal" | "error";
|
|
89
|
+
};
|
package/src/features/tools/product-hunt-launch-planner/product-hunt-launch-planner.container.tsx
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { createToolGuideTranslator } from "../shared/tool-message-translator";
|
|
2
|
+
|
|
3
|
+
import { ProductHuntLaunchPlanner } from "./widget";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
ToolCardGrid,
|
|
7
|
+
ToolFaqSection,
|
|
8
|
+
ToolPlainTextGrid,
|
|
9
|
+
ToolSection,
|
|
10
|
+
type ToolFaqItem,
|
|
11
|
+
type ToolTextCard,
|
|
12
|
+
} from "../shared/tool-content-sections";
|
|
13
|
+
import { ToolCta } from "../shared/tool-cta";
|
|
14
|
+
import {
|
|
15
|
+
ToolGuideSection,
|
|
16
|
+
ToolImageVisual,
|
|
17
|
+
ToolWorkspaceSection,
|
|
18
|
+
} from "../shared/tool-guide-section";
|
|
19
|
+
import { ToolPageShell } from "../shared/tool-page-shell";
|
|
20
|
+
import type { ToolPageProps } from "../types";
|
|
21
|
+
|
|
22
|
+
export async function ProductHuntLaunchPlannerContainer({
|
|
23
|
+
locale,
|
|
24
|
+
spec,
|
|
25
|
+
}: ToolPageProps) {
|
|
26
|
+
const t = await createToolGuideTranslator(locale, "toolsPages.productHuntLaunchPlanner.guide");
|
|
27
|
+
const outputItems = t.raw("outputItems") as readonly ToolTextCard[];
|
|
28
|
+
const supportItems = t.raw("supportItems") as readonly string[];
|
|
29
|
+
const boundaryItems = t.raw("boundaryItems") as readonly string[];
|
|
30
|
+
const failureItems = t.raw("failureItems") as readonly string[];
|
|
31
|
+
const resultUseItems = t.raw("resultUseItems") as readonly string[];
|
|
32
|
+
const whyTomakoItems = t.raw("whyTomakoItems") as readonly ToolTextCard[];
|
|
33
|
+
const standardItems = t.raw("standardItems") as readonly string[];
|
|
34
|
+
const faqItems = t.raw("faqItems") as readonly ToolFaqItem[];
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<ToolPageShell
|
|
38
|
+
heroBackgroundAlt={t("heroVisualAlt")}
|
|
39
|
+
heroBackgroundImage="/tools/product-hunt-launch-planner-hero-generated.webp"
|
|
40
|
+
heroVariant="immersive"
|
|
41
|
+
locale={locale}
|
|
42
|
+
spec={spec}
|
|
43
|
+
>
|
|
44
|
+
<ToolWorkspaceSection
|
|
45
|
+
badge={t("workspaceBadge")}
|
|
46
|
+
heading={t("workspaceHeading")}
|
|
47
|
+
hint={t("workspaceHint")}
|
|
48
|
+
>
|
|
49
|
+
<ProductHuntLaunchPlanner />
|
|
50
|
+
</ToolWorkspaceSection>
|
|
51
|
+
<ToolSection heading={t("outputs")}>
|
|
52
|
+
<ToolCardGrid items={outputItems} columns="four" />
|
|
53
|
+
</ToolSection>
|
|
54
|
+
<ToolGuideSection
|
|
55
|
+
heading={t("supportHeading")}
|
|
56
|
+
visual={
|
|
57
|
+
<ToolImageVisual
|
|
58
|
+
alt={t("supportVisualAlt")}
|
|
59
|
+
src="/tools/product-hunt-launch-planner-value-generated.webp"
|
|
60
|
+
wide
|
|
61
|
+
/>
|
|
62
|
+
}
|
|
63
|
+
>
|
|
64
|
+
<ToolPlainTextGrid items={supportItems} />
|
|
65
|
+
</ToolGuideSection>
|
|
66
|
+
<ToolGuideSection
|
|
67
|
+
heading={t("boundaryHeading")}
|
|
68
|
+
reverse
|
|
69
|
+
visual={
|
|
70
|
+
<ToolImageVisual
|
|
71
|
+
alt={t("boundaryVisualAlt")}
|
|
72
|
+
src="/tools/product-hunt-launch-planner-boundary-generated.webp"
|
|
73
|
+
wide
|
|
74
|
+
/>
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
<ToolPlainTextGrid items={boundaryItems} />
|
|
78
|
+
<h3 className="mt-8 text-xl font-semibold text-[#111111]">
|
|
79
|
+
{t("failureHeading")}
|
|
80
|
+
</h3>
|
|
81
|
+
<ToolPlainTextGrid items={failureItems} />
|
|
82
|
+
</ToolGuideSection>
|
|
83
|
+
<ToolGuideSection
|
|
84
|
+
heading={t("resultUseHeading")}
|
|
85
|
+
visual={
|
|
86
|
+
<ToolImageVisual
|
|
87
|
+
alt={t("resultUseVisualAlt")}
|
|
88
|
+
src="/tools/product-hunt-launch-planner-use-case-generated.webp"
|
|
89
|
+
wide
|
|
90
|
+
/>
|
|
91
|
+
}
|
|
92
|
+
>
|
|
93
|
+
<ToolPlainTextGrid items={resultUseItems} />
|
|
94
|
+
</ToolGuideSection>
|
|
95
|
+
<ToolSection heading={t("whyTomakoHeading")}>
|
|
96
|
+
<ToolCardGrid items={whyTomakoItems} columns="four" />
|
|
97
|
+
</ToolSection>
|
|
98
|
+
<ToolGuideSection
|
|
99
|
+
heading={t("standardHeading")}
|
|
100
|
+
reverse
|
|
101
|
+
visual={
|
|
102
|
+
<ToolImageVisual
|
|
103
|
+
alt={t("standardVisualAlt")}
|
|
104
|
+
src="/tools/product-hunt-launch-planner-standard-generated.webp"
|
|
105
|
+
wide
|
|
106
|
+
/>
|
|
107
|
+
}
|
|
108
|
+
>
|
|
109
|
+
<ToolPlainTextGrid items={standardItems} />
|
|
110
|
+
</ToolGuideSection>
|
|
111
|
+
<ToolFaqSection heading={t("faq")} items={faqItems} />
|
|
112
|
+
<ToolCta
|
|
113
|
+
hint={t("ctaHint")}
|
|
114
|
+
primary={{
|
|
115
|
+
href: "/tools/gtm-readiness-checklist",
|
|
116
|
+
label: t("ctaPrimary"),
|
|
117
|
+
}}
|
|
118
|
+
secondary={{ href: "/tools/cold-start-channel-selector", label: t("ctaSecondary") }}
|
|
119
|
+
/>
|
|
120
|
+
</ToolPageShell>
|
|
121
|
+
);
|
|
122
|
+
}
|