@reftrixmcp/mcp-server 0.1.7 → 0.2.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 +36 -6
- package/package.json +46 -41
- package/src/admin/bull-board.ts +177 -0
- package/src/index.ts +32 -1
- package/src/middleware/auth.ts +6 -0
- package/src/middleware/index.ts +13 -0
- package/src/middleware/rate-limiter.ts +525 -0
- package/src/router.ts +36 -3
- package/src/schemas/common-search-filters.ts +42 -0
- package/src/services/background/background-design-db.service.ts +4 -6
- package/src/services/background/background-design-embedding.service.ts +6 -8
- package/src/services/background-search.service.ts +44 -16
- package/src/services/browser-process-manager.ts +29 -24
- package/src/services/layout-embedding.service.ts +18 -28
- package/src/services/layout-search.service.ts +52 -31
- package/src/services/layout-to-code.service.ts +13 -21
- package/src/services/ml/mood-brandtone-embedding.service.ts +4 -10
- package/src/services/motion/analyzers/webgl-motion-analyzer.ts +1 -3
- package/src/services/motion/existing-animation-detector.service.ts +11 -17
- package/src/services/motion/frame-analysis-save.helper.ts +3 -8
- package/src/services/motion/frame-capture.service.ts +5 -5
- package/src/services/motion/frame-embedding.service.ts +30 -46
- package/src/services/motion/js-animation-detector.ts +5 -15
- package/src/services/motion/js-animation-search.service.ts +12 -20
- package/src/services/motion/motion-db.service.ts +21 -31
- package/src/services/motion/three-js-scene-extractor.ts +1 -3
- package/src/services/motion/webgl-animation-detector.service.ts +5 -9
- package/src/services/motion/webgl-animation-embedding.service.ts +3 -5
- package/src/services/motion-persistence.service.ts +13 -19
- package/src/services/motion-search.service.ts +72 -57
- package/src/services/narrative/analyzers/worldview.analyzer.ts +6 -10
- package/src/services/narrative/narrative-analysis.service.ts +10 -16
- package/src/services/narrative/narrative-search.service.ts +89 -40
- package/src/services/narrative/types/narrative.types.ts +24 -6
- package/src/services/page/frame-analyzer.service.ts +1 -3
- package/src/services/page/layout-analyzer.service.ts +224 -303
- package/src/services/page/playwright-crawler.service.ts +14 -20
- package/src/services/page/quality-evaluator.service.ts +1 -3
- package/src/services/page/runtime-animation-detector.service.ts +7 -17
- package/src/services/page/video-recorder.service.ts +2 -6
- package/src/services/page/webgl-detector.service.ts +3 -5
- package/src/services/page-ingest-adapter.ts +269 -251
- package/src/services/part/part-search.service.ts +43 -22
- package/src/services/part/schemas.ts +6 -0
- package/src/services/project-context-analyzer.ts +3 -5
- package/src/services/quality/axe-accessibility.service.ts +3 -5
- package/src/services/quality/benchmark.service.ts +4 -16
- package/src/services/quality/pattern-matcher.service.ts +11 -21
- package/src/services/quality/playwright-axe.service.ts +10 -18
- package/src/services/quality-search.service.ts +16 -17
- package/src/services/responsive/multi-viewport-capture.service.ts +11 -17
- package/src/services/responsive/responsive-analysis-embedding.service.ts +7 -11
- package/src/services/responsive/responsive-analysis.service.ts +7 -11
- package/src/services/responsive/responsive-quality-evaluator.service.ts +4 -6
- package/src/services/responsive-search.service.ts +40 -5
- package/src/services/search-cache.service.ts +166 -0
- package/src/services/service-client.ts +16 -24
- package/src/services/service-initializer.ts +49 -945
- package/src/services/service-registrar-analysis.ts +679 -0
- package/src/services/service-registrar-search.ts +464 -0
- package/src/services/vision/scroll-vision-persistence.service.ts +4 -6
- package/src/services/vision-embedding-search.service.ts +57 -45
- package/src/services/vision-embedding.service.ts +8 -12
- package/src/services/worker-supervisor.service.ts +2 -6
- package/src/tools/background/schemas.ts +2 -1
- package/src/tools/background/search.tool.ts +93 -53
- package/src/tools/brief/validate.handler.ts +11 -26
- package/src/tools/design/search-by-image.tool.ts +891 -0
- package/src/tools/index.ts +42 -1
- package/src/tools/layout/batch-ingest.tool.ts +14 -21
- package/src/tools/layout/ingest.tool.ts +38 -88
- package/src/tools/layout/inspect/inspect.tool.ts +32 -59
- package/src/tools/layout/inspect/visual-extractors.utils.ts +3 -9
- package/src/tools/layout/schemas.ts +11 -8
- package/src/tools/layout/search-executor.ts +699 -0
- package/src/tools/layout/search-helpers.ts +620 -0
- package/src/tools/layout/search.tool.ts +148 -1371
- package/src/tools/layout/to-code.tool.ts +21 -42
- package/src/tools/motion/analyze-frames.handler.ts +19 -37
- package/src/tools/motion/code-generators.ts +1363 -0
- package/src/tools/motion/css-mode-handler.ts +14 -23
- package/src/tools/motion/detect.tool.ts +38 -60
- package/src/tools/motion/detection-modes.ts +4 -8
- package/src/tools/motion/di-factories.ts +87 -110
- package/src/tools/motion/search-helpers.ts +376 -0
- package/src/tools/motion/search.schemas.ts +9 -6
- package/src/tools/motion/search.tool.ts +81 -1717
- package/src/tools/narrative/analyze.tool.ts +14 -30
- package/src/tools/narrative/schemas.ts +14 -11
- package/src/tools/narrative/search.tool.ts +91 -77
- package/src/tools/page/analyze.tool.ts +21 -33
- package/src/tools/page/get-job-status.tool.ts +8 -12
- package/src/tools/page/handlers/db-handler.ts +3 -6
- package/src/tools/page/handlers/embedding-handler.ts +48 -81
- package/src/tools/page/handlers/execution-status-tracker.ts +3 -5
- package/src/tools/page/handlers/js-animation-handler.ts +29 -53
- package/src/tools/page/handlers/layout-handler.ts +45 -73
- package/src/tools/page/handlers/motion-handler.ts +24 -35
- package/src/tools/page/handlers/narrative-handler.ts +12 -24
- package/src/tools/page/handlers/phased-executor.ts +13 -16
- package/src/tools/page/handlers/quality-handler.ts +3 -4
- package/src/tools/page/handlers/result-builder.ts +21 -18
- package/src/tools/page/handlers/sync-helpers.ts +597 -0
- package/src/tools/page/handlers/sync-phase-handlers.ts +1170 -0
- package/src/tools/page/handlers/sync-processing.ts +192 -1542
- package/src/tools/page/handlers/timeout-utils.ts +23 -30
- package/src/tools/page/handlers/video-handler.ts +9 -9
- package/src/tools/page/handlers/webgl-animation-handler.ts +10 -13
- package/src/tools/part/compare.tool.ts +2 -20
- package/src/tools/part/inspect.tool.ts +11 -41
- package/src/tools/part/search.tool.ts +50 -28
- package/src/tools/preference/get.tool.ts +6 -19
- package/src/tools/preference/hear.tool.ts +6 -19
- package/src/tools/preference/reset.tool.ts +6 -19
- package/src/tools/project-get.ts +12 -14
- package/src/tools/project-list.ts +10 -22
- package/src/tools/quality/batch-evaluate.tool.ts +17 -23
- package/src/tools/quality/evaluate.tool.ts +42 -131
- package/src/tools/quality/get-job-status.tool.ts +2 -1
- package/src/tools/responsive/schemas.ts +2 -2
- package/src/tools/responsive/search.tool.ts +73 -46
- package/src/tools/search-unified.tool.ts +582 -0
- package/src/tools/style-get-palette.ts +18 -33
- package/src/tools/system-health.ts +24 -33
- package/src/utils/di-factory.ts +64 -0
- package/src/utils/prisma-wrapper-factory.ts +18 -17
- package/src/utils/sanitize-error.ts +132 -0
- package/src/utils/url-validator.ts +1 -3
- package/src/workers/batch-quality-worker.ts +5 -7
- package/src/workers/page-analyze-worker.ts +38 -24
- package/src/workers/phases/phase-0-ingest.ts +1 -1
- package/src/workers/phases/phase-1-layout.ts +10 -7
- package/src/workers/phases/phase-2-motion.ts +22 -23
- package/src/workers/phases/phase-4-narrative.ts +8 -12
- package/src/workers/phases/phase-5-embedding.ts +669 -457
- package/LICENSE +0 -661
- package/dist/api/health.d.ts +0 -122
- package/dist/api/health.d.ts.map +0 -1
- package/dist/api/health.js +0 -267
- package/dist/api/health.js.map +0 -1
- package/dist/config/index.d.ts +0 -9
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -27
- package/dist/config/index.js.map +0 -1
- package/dist/config/redis.d.ts +0 -99
- package/dist/config/redis.d.ts.map +0 -1
- package/dist/config/redis.js +0 -234
- package/dist/config/redis.js.map +0 -1
- package/dist/index.d.ts +0 -18
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -247
- package/dist/index.js.map +0 -1
- package/dist/lib/index.d.ts +0 -6
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/index.js +0 -14
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/project-context.d.ts +0 -51
- package/dist/lib/project-context.d.ts.map +0 -1
- package/dist/lib/project-context.js +0 -109
- package/dist/lib/project-context.js.map +0 -1
- package/dist/middleware/args-type-coercion.d.ts +0 -59
- package/dist/middleware/args-type-coercion.d.ts.map +0 -1
- package/dist/middleware/args-type-coercion.js +0 -187
- package/dist/middleware/args-type-coercion.js.map +0 -1
- package/dist/middleware/auth.d.ts +0 -122
- package/dist/middleware/auth.d.ts.map +0 -1
- package/dist/middleware/auth.js +0 -430
- package/dist/middleware/auth.js.map +0 -1
- package/dist/middleware/index.d.ts +0 -10
- package/dist/middleware/index.d.ts.map +0 -1
- package/dist/middleware/index.js +0 -38
- package/dist/middleware/index.js.map +0 -1
- package/dist/middleware/light-response-controller.d.ts +0 -206
- package/dist/middleware/light-response-controller.d.ts.map +0 -1
- package/dist/middleware/light-response-controller.js +0 -555
- package/dist/middleware/light-response-controller.js.map +0 -1
- package/dist/middleware/response-size-warning.d.ts +0 -97
- package/dist/middleware/response-size-warning.d.ts.map +0 -1
- package/dist/middleware/response-size-warning.js +0 -137
- package/dist/middleware/response-size-warning.js.map +0 -1
- package/dist/queues/batch-quality-queue.d.ts +0 -225
- package/dist/queues/batch-quality-queue.d.ts.map +0 -1
- package/dist/queues/batch-quality-queue.js +0 -375
- package/dist/queues/batch-quality-queue.js.map +0 -1
- package/dist/queues/index.d.ts +0 -10
- package/dist/queues/index.d.ts.map +0 -1
- package/dist/queues/index.js +0 -28
- package/dist/queues/index.js.map +0 -1
- package/dist/queues/page-analyze-queue.d.ts +0 -287
- package/dist/queues/page-analyze-queue.d.ts.map +0 -1
- package/dist/queues/page-analyze-queue.js +0 -219
- package/dist/queues/page-analyze-queue.js.map +0 -1
- package/dist/router.d.ts +0 -144
- package/dist/router.d.ts.map +0 -1
- package/dist/router.js +0 -261
- package/dist/router.js.map +0 -1
- package/dist/schemas/creative/index.d.ts +0 -8
- package/dist/schemas/creative/index.d.ts.map +0 -1
- package/dist/schemas/creative/index.js +0 -23
- package/dist/schemas/creative/index.js.map +0 -1
- package/dist/schemas/creative/palette.schema.d.ts +0 -741
- package/dist/schemas/creative/palette.schema.d.ts.map +0 -1
- package/dist/schemas/creative/palette.schema.js +0 -154
- package/dist/schemas/creative/palette.schema.js.map +0 -1
- package/dist/schemas/mood-brandtone-filters.d.ts +0 -740
- package/dist/schemas/mood-brandtone-filters.d.ts.map +0 -1
- package/dist/schemas/mood-brandtone-filters.js +0 -265
- package/dist/schemas/mood-brandtone-filters.js.map +0 -1
- package/dist/scripts/backfill-embeddings.d.ts +0 -3
- package/dist/scripts/backfill-embeddings.d.ts.map +0 -1
- package/dist/scripts/backfill-embeddings.js +0 -385
- package/dist/scripts/backfill-embeddings.js.map +0 -1
- package/dist/scripts/check-embedding-coverage.d.ts +0 -3
- package/dist/scripts/check-embedding-coverage.d.ts.map +0 -1
- package/dist/scripts/check-embedding-coverage.js +0 -103
- package/dist/scripts/check-embedding-coverage.js.map +0 -1
- package/dist/scripts/start-workers.d.ts +0 -3
- package/dist/scripts/start-workers.d.ts.map +0 -1
- package/dist/scripts/start-workers.js +0 -447
- package/dist/scripts/start-workers.js.map +0 -1
- package/dist/server.d.ts +0 -49
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -237
- package/dist/server.js.map +0 -1
- package/dist/services/background/background-design-db.service.d.ts +0 -65
- package/dist/services/background/background-design-db.service.d.ts.map +0 -1
- package/dist/services/background/background-design-db.service.js +0 -138
- package/dist/services/background/background-design-db.service.js.map +0 -1
- package/dist/services/background/background-design-detector.service.d.ts +0 -125
- package/dist/services/background/background-design-detector.service.d.ts.map +0 -1
- package/dist/services/background/background-design-detector.service.js +0 -1106
- package/dist/services/background/background-design-detector.service.js.map +0 -1
- package/dist/services/background/background-design-embedding.service.d.ts +0 -188
- package/dist/services/background/background-design-embedding.service.d.ts.map +0 -1
- package/dist/services/background/background-design-embedding.service.js +0 -386
- package/dist/services/background/background-design-embedding.service.js.map +0 -1
- package/dist/services/background-search.service.d.ts +0 -43
- package/dist/services/background-search.service.d.ts.map +0 -1
- package/dist/services/background-search.service.js +0 -235
- package/dist/services/background-search.service.js.map +0 -1
- package/dist/services/backup-service.d.ts +0 -135
- package/dist/services/backup-service.d.ts.map +0 -1
- package/dist/services/backup-service.js +0 -357
- package/dist/services/backup-service.js.map +0 -1
- package/dist/services/brief/brief-parser-service.d.ts +0 -47
- package/dist/services/brief/brief-parser-service.d.ts.map +0 -1
- package/dist/services/brief/brief-parser-service.js +0 -380
- package/dist/services/brief/brief-parser-service.js.map +0 -1
- package/dist/services/brief/schemas/brief-parser-schemas.d.ts +0 -278
- package/dist/services/brief/schemas/brief-parser-schemas.d.ts.map +0 -1
- package/dist/services/brief/schemas/brief-parser-schemas.js +0 -116
- package/dist/services/brief/schemas/brief-parser-schemas.js.map +0 -1
- package/dist/services/browser-process-manager.d.ts +0 -116
- package/dist/services/browser-process-manager.d.ts.map +0 -1
- package/dist/services/browser-process-manager.js +0 -259
- package/dist/services/browser-process-manager.js.map +0 -1
- package/dist/services/cache.d.ts +0 -119
- package/dist/services/cache.d.ts.map +0 -1
- package/dist/services/cache.js +0 -233
- package/dist/services/cache.js.map +0 -1
- package/dist/services/checksum-service.d.ts +0 -122
- package/dist/services/checksum-service.d.ts.map +0 -1
- package/dist/services/checksum-service.js +0 -270
- package/dist/services/checksum-service.js.map +0 -1
- package/dist/services/css-analysis-cache.service.d.ts +0 -248
- package/dist/services/css-analysis-cache.service.d.ts.map +0 -1
- package/dist/services/css-analysis-cache.service.js +0 -398
- package/dist/services/css-analysis-cache.service.js.map +0 -1
- package/dist/services/database-dumper.service.d.ts +0 -181
- package/dist/services/database-dumper.service.d.ts.map +0 -1
- package/dist/services/database-dumper.service.js +0 -550
- package/dist/services/database-dumper.service.js.map +0 -1
- package/dist/services/embedding-backfill.service.d.ts +0 -53
- package/dist/services/embedding-backfill.service.d.ts.map +0 -1
- package/dist/services/embedding-backfill.service.js +0 -672
- package/dist/services/embedding-backfill.service.js.map +0 -1
- package/dist/services/embedding-validation.service.d.ts +0 -64
- package/dist/services/embedding-validation.service.d.ts.map +0 -1
- package/dist/services/embedding-validation.service.js +0 -141
- package/dist/services/embedding-validation.service.js.map +0 -1
- package/dist/services/encryption-service.d.ts +0 -171
- package/dist/services/encryption-service.d.ts.map +0 -1
- package/dist/services/encryption-service.js +0 -343
- package/dist/services/encryption-service.js.map +0 -1
- package/dist/services/external-css-fetcher.d.ts +0 -185
- package/dist/services/external-css-fetcher.d.ts.map +0 -1
- package/dist/services/external-css-fetcher.js +0 -667
- package/dist/services/external-css-fetcher.js.map +0 -1
- package/dist/services/gpu-resource-manager.d.ts +0 -180
- package/dist/services/gpu-resource-manager.d.ts.map +0 -1
- package/dist/services/gpu-resource-manager.js +0 -485
- package/dist/services/gpu-resource-manager.js.map +0 -1
- package/dist/services/index.d.ts +0 -15
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/index.js +0 -73
- package/dist/services/index.js.map +0 -1
- package/dist/services/layout/component-splitter.d.ts +0 -63
- package/dist/services/layout/component-splitter.d.ts.map +0 -1
- package/dist/services/layout/component-splitter.js +0 -508
- package/dist/services/layout/component-splitter.js.map +0 -1
- package/dist/services/layout/html-to-jsx-converter.d.ts +0 -40
- package/dist/services/layout/html-to-jsx-converter.d.ts.map +0 -1
- package/dist/services/layout/html-to-jsx-converter.js +0 -484
- package/dist/services/layout/html-to-jsx-converter.js.map +0 -1
- package/dist/services/layout/semantic-html-converter.d.ts +0 -67
- package/dist/services/layout/semantic-html-converter.d.ts.map +0 -1
- package/dist/services/layout/semantic-html-converter.js +0 -247
- package/dist/services/layout/semantic-html-converter.js.map +0 -1
- package/dist/services/layout/style-to-tailwind-mapper.d.ts +0 -82
- package/dist/services/layout/style-to-tailwind-mapper.d.ts.map +0 -1
- package/dist/services/layout/style-to-tailwind-mapper.js +0 -1334
- package/dist/services/layout/style-to-tailwind-mapper.js.map +0 -1
- package/dist/services/layout-embedding.service.d.ts +0 -415
- package/dist/services/layout-embedding.service.d.ts.map +0 -1
- package/dist/services/layout-embedding.service.js +0 -1147
- package/dist/services/layout-embedding.service.js.map +0 -1
- package/dist/services/layout-generate-code-service-export.d.ts +0 -38
- package/dist/services/layout-generate-code-service-export.d.ts.map +0 -1
- package/dist/services/layout-generate-code-service-export.js +0 -77
- package/dist/services/layout-generate-code-service-export.js.map +0 -1
- package/dist/services/layout-search-service-export.d.ts +0 -31
- package/dist/services/layout-search-service-export.d.ts.map +0 -1
- package/dist/services/layout-search-service-export.js +0 -43
- package/dist/services/layout-search-service-export.js.map +0 -1
- package/dist/services/layout-search.service.d.ts +0 -111
- package/dist/services/layout-search.service.d.ts.map +0 -1
- package/dist/services/layout-search.service.js +0 -716
- package/dist/services/layout-search.service.js.map +0 -1
- package/dist/services/layout-to-code.service.d.ts +0 -85
- package/dist/services/layout-to-code.service.d.ts.map +0 -1
- package/dist/services/layout-to-code.service.js +0 -1368
- package/dist/services/layout-to-code.service.js.map +0 -1
- package/dist/services/metrics-collector.d.ts +0 -189
- package/dist/services/metrics-collector.d.ts.map +0 -1
- package/dist/services/metrics-collector.js +0 -344
- package/dist/services/metrics-collector.js.map +0 -1
- package/dist/services/ml/mood-brandtone-embedding.service.d.ts +0 -253
- package/dist/services/ml/mood-brandtone-embedding.service.d.ts.map +0 -1
- package/dist/services/ml/mood-brandtone-embedding.service.js +0 -678
- package/dist/services/ml/mood-brandtone-embedding.service.js.map +0 -1
- package/dist/services/motion/analyzers/color-change.analyzer.d.ts +0 -274
- package/dist/services/motion/analyzers/color-change.analyzer.d.ts.map +0 -1
- package/dist/services/motion/analyzers/color-change.analyzer.js +0 -644
- package/dist/services/motion/analyzers/color-change.analyzer.js.map +0 -1
- package/dist/services/motion/analyzers/frame-diff.analyzer.d.ts +0 -109
- package/dist/services/motion/analyzers/frame-diff.analyzer.d.ts.map +0 -1
- package/dist/services/motion/analyzers/frame-diff.analyzer.js +0 -315
- package/dist/services/motion/analyzers/frame-diff.analyzer.js.map +0 -1
- package/dist/services/motion/analyzers/layout-shift.detector.d.ts +0 -132
- package/dist/services/motion/analyzers/layout-shift.detector.d.ts.map +0 -1
- package/dist/services/motion/analyzers/layout-shift.detector.js +0 -179
- package/dist/services/motion/analyzers/layout-shift.detector.js.map +0 -1
- package/dist/services/motion/analyzers/motion-vector.estimator.d.ts +0 -88
- package/dist/services/motion/analyzers/motion-vector.estimator.d.ts.map +0 -1
- package/dist/services/motion/analyzers/motion-vector.estimator.js +0 -494
- package/dist/services/motion/analyzers/motion-vector.estimator.js.map +0 -1
- package/dist/services/motion/analyzers/webgl-motion-analyzer.d.ts +0 -167
- package/dist/services/motion/analyzers/webgl-motion-analyzer.d.ts.map +0 -1
- package/dist/services/motion/analyzers/webgl-motion-analyzer.js +0 -500
- package/dist/services/motion/analyzers/webgl-motion-analyzer.js.map +0 -1
- package/dist/services/motion/animation-metrics-collector.service.d.ts +0 -215
- package/dist/services/motion/animation-metrics-collector.service.d.ts.map +0 -1
- package/dist/services/motion/animation-metrics-collector.service.js +0 -502
- package/dist/services/motion/animation-metrics-collector.service.js.map +0 -1
- package/dist/services/motion/cls-calculator.service.d.ts +0 -186
- package/dist/services/motion/cls-calculator.service.d.ts.map +0 -1
- package/dist/services/motion/cls-calculator.service.js +0 -329
- package/dist/services/motion/cls-calculator.service.js.map +0 -1
- package/dist/services/motion/existing-animation-detector.service.d.ts +0 -208
- package/dist/services/motion/existing-animation-detector.service.d.ts.map +0 -1
- package/dist/services/motion/existing-animation-detector.service.js +0 -591
- package/dist/services/motion/existing-animation-detector.service.js.map +0 -1
- package/dist/services/motion/fade-detector.service.d.ts +0 -114
- package/dist/services/motion/fade-detector.service.d.ts.map +0 -1
- package/dist/services/motion/fade-detector.service.js +0 -249
- package/dist/services/motion/fade-detector.service.js.map +0 -1
- package/dist/services/motion/frame-analysis-save.helper.d.ts +0 -41
- package/dist/services/motion/frame-analysis-save.helper.d.ts.map +0 -1
- package/dist/services/motion/frame-analysis-save.helper.js +0 -235
- package/dist/services/motion/frame-analysis-save.helper.js.map +0 -1
- package/dist/services/motion/frame-capture.service.d.ts +0 -170
- package/dist/services/motion/frame-capture.service.d.ts.map +0 -1
- package/dist/services/motion/frame-capture.service.js +0 -476
- package/dist/services/motion/frame-capture.service.js.map +0 -1
- package/dist/services/motion/frame-embedding.service.d.ts +0 -315
- package/dist/services/motion/frame-embedding.service.d.ts.map +0 -1
- package/dist/services/motion/frame-embedding.service.js +0 -1023
- package/dist/services/motion/frame-embedding.service.js.map +0 -1
- package/dist/services/motion/frame-image-analysis.service.d.ts +0 -126
- package/dist/services/motion/frame-image-analysis.service.d.ts.map +0 -1
- package/dist/services/motion/frame-image-analysis.service.js +0 -982
- package/dist/services/motion/frame-image-analysis.service.js.map +0 -1
- package/dist/services/motion/frame-image-analyzer.adapter.d.ts +0 -168
- package/dist/services/motion/frame-image-analyzer.adapter.d.ts.map +0 -1
- package/dist/services/motion/frame-image-analyzer.adapter.js +0 -520
- package/dist/services/motion/frame-image-analyzer.adapter.js.map +0 -1
- package/dist/services/motion/frame-worker-pool.service.d.ts +0 -133
- package/dist/services/motion/frame-worker-pool.service.d.ts.map +0 -1
- package/dist/services/motion/frame-worker-pool.service.js +0 -410
- package/dist/services/motion/frame-worker-pool.service.js.map +0 -1
- package/dist/services/motion/infrastructure/frame-loader.d.ts +0 -77
- package/dist/services/motion/infrastructure/frame-loader.d.ts.map +0 -1
- package/dist/services/motion/infrastructure/frame-loader.js +0 -430
- package/dist/services/motion/infrastructure/frame-loader.js.map +0 -1
- package/dist/services/motion/js-animation-detector.d.ts +0 -382
- package/dist/services/motion/js-animation-detector.d.ts.map +0 -1
- package/dist/services/motion/js-animation-detector.js +0 -911
- package/dist/services/motion/js-animation-detector.js.map +0 -1
- package/dist/services/motion/js-animation-embedding.service.d.ts +0 -114
- package/dist/services/motion/js-animation-embedding.service.d.ts.map +0 -1
- package/dist/services/motion/js-animation-embedding.service.js +0 -289
- package/dist/services/motion/js-animation-embedding.service.js.map +0 -1
- package/dist/services/motion/js-animation-search.service.d.ts +0 -138
- package/dist/services/motion/js-animation-search.service.d.ts.map +0 -1
- package/dist/services/motion/js-animation-search.service.js +0 -503
- package/dist/services/motion/js-animation-search.service.js.map +0 -1
- package/dist/services/motion/motion-db.service.d.ts +0 -231
- package/dist/services/motion/motion-db.service.d.ts.map +0 -1
- package/dist/services/motion/motion-db.service.js +0 -676
- package/dist/services/motion/motion-db.service.js.map +0 -1
- package/dist/services/motion/three-js-scene-extractor.d.ts +0 -274
- package/dist/services/motion/three-js-scene-extractor.d.ts.map +0 -1
- package/dist/services/motion/three-js-scene-extractor.js +0 -1126
- package/dist/services/motion/three-js-scene-extractor.js.map +0 -1
- package/dist/services/motion/types.d.ts +0 -592
- package/dist/services/motion/types.d.ts.map +0 -1
- package/dist/services/motion/types.js +0 -121
- package/dist/services/motion/types.js.map +0 -1
- package/dist/services/motion/visual-category-classifier.d.ts +0 -273
- package/dist/services/motion/visual-category-classifier.d.ts.map +0 -1
- package/dist/services/motion/visual-category-classifier.js +0 -1060
- package/dist/services/motion/visual-category-classifier.js.map +0 -1
- package/dist/services/motion/webgl-animation-categorizer.d.ts +0 -151
- package/dist/services/motion/webgl-animation-categorizer.d.ts.map +0 -1
- package/dist/services/motion/webgl-animation-categorizer.js +0 -568
- package/dist/services/motion/webgl-animation-categorizer.js.map +0 -1
- package/dist/services/motion/webgl-animation-detector.service.d.ts +0 -204
- package/dist/services/motion/webgl-animation-detector.service.d.ts.map +0 -1
- package/dist/services/motion/webgl-animation-detector.service.js +0 -518
- package/dist/services/motion/webgl-animation-detector.service.js.map +0 -1
- package/dist/services/motion/webgl-animation-embedding.service.d.ts +0 -238
- package/dist/services/motion/webgl-animation-embedding.service.d.ts.map +0 -1
- package/dist/services/motion/webgl-animation-embedding.service.js +0 -368
- package/dist/services/motion/webgl-animation-embedding.service.js.map +0 -1
- package/dist/services/motion-detect-service-export.d.ts +0 -130
- package/dist/services/motion-detect-service-export.d.ts.map +0 -1
- package/dist/services/motion-detect-service-export.js +0 -160
- package/dist/services/motion-detect-service-export.js.map +0 -1
- package/dist/services/motion-persistence.service.d.ts +0 -144
- package/dist/services/motion-persistence.service.d.ts.map +0 -1
- package/dist/services/motion-persistence.service.js +0 -398
- package/dist/services/motion-persistence.service.js.map +0 -1
- package/dist/services/motion-search-service.d.ts +0 -10
- package/dist/services/motion-search-service.d.ts.map +0 -1
- package/dist/services/motion-search-service.js +0 -22
- package/dist/services/motion-search-service.js.map +0 -1
- package/dist/services/motion-search.service.d.ts +0 -210
- package/dist/services/motion-search.service.d.ts.map +0 -1
- package/dist/services/motion-search.service.js +0 -900
- package/dist/services/motion-search.service.js.map +0 -1
- package/dist/services/narrative/analyzers/layout-structure.analyzer.d.ts +0 -75
- package/dist/services/narrative/analyzers/layout-structure.analyzer.d.ts.map +0 -1
- package/dist/services/narrative/analyzers/layout-structure.analyzer.js +0 -489
- package/dist/services/narrative/analyzers/layout-structure.analyzer.js.map +0 -1
- package/dist/services/narrative/analyzers/worldview.analyzer.d.ts +0 -92
- package/dist/services/narrative/analyzers/worldview.analyzer.d.ts.map +0 -1
- package/dist/services/narrative/analyzers/worldview.analyzer.js +0 -477
- package/dist/services/narrative/analyzers/worldview.analyzer.js.map +0 -1
- package/dist/services/narrative/generators/confidence-calculator.d.ts +0 -65
- package/dist/services/narrative/generators/confidence-calculator.d.ts.map +0 -1
- package/dist/services/narrative/generators/confidence-calculator.js +0 -316
- package/dist/services/narrative/generators/confidence-calculator.js.map +0 -1
- package/dist/services/narrative/generators/text-representation.generator.d.ts +0 -67
- package/dist/services/narrative/generators/text-representation.generator.d.ts.map +0 -1
- package/dist/services/narrative/generators/text-representation.generator.js +0 -312
- package/dist/services/narrative/generators/text-representation.generator.js.map +0 -1
- package/dist/services/narrative/index.d.ts +0 -16
- package/dist/services/narrative/index.d.ts.map +0 -1
- package/dist/services/narrative/index.js +0 -63
- package/dist/services/narrative/index.js.map +0 -1
- package/dist/services/narrative/narrative-analysis.service.d.ts +0 -120
- package/dist/services/narrative/narrative-analysis.service.d.ts.map +0 -1
- package/dist/services/narrative/narrative-analysis.service.js +0 -479
- package/dist/services/narrative/narrative-analysis.service.js.map +0 -1
- package/dist/services/narrative/narrative-search.service.d.ts +0 -126
- package/dist/services/narrative/narrative-search.service.d.ts.map +0 -1
- package/dist/services/narrative/narrative-search.service.js +0 -516
- package/dist/services/narrative/narrative-search.service.js.map +0 -1
- package/dist/services/narrative/types/narrative.types.d.ts +0 -372
- package/dist/services/narrative/types/narrative.types.d.ts.map +0 -1
- package/dist/services/narrative/types/narrative.types.js +0 -5
- package/dist/services/narrative/types/narrative.types.js.map +0 -1
- package/dist/services/orphaned-job-utils.d.ts +0 -62
- package/dist/services/orphaned-job-utils.d.ts.map +0 -1
- package/dist/services/orphaned-job-utils.js +0 -130
- package/dist/services/orphaned-job-utils.js.map +0 -1
- package/dist/services/page/css-animation-parser.service.d.ts +0 -173
- package/dist/services/page/css-animation-parser.service.d.ts.map +0 -1
- package/dist/services/page/css-animation-parser.service.js +0 -537
- package/dist/services/page/css-animation-parser.service.js.map +0 -1
- package/dist/services/page/fallback-analyzer.service.d.ts +0 -140
- package/dist/services/page/fallback-analyzer.service.d.ts.map +0 -1
- package/dist/services/page/fallback-analyzer.service.js +0 -289
- package/dist/services/page/fallback-analyzer.service.js.map +0 -1
- package/dist/services/page/frame-analyzer.service.d.ts +0 -208
- package/dist/services/page/frame-analyzer.service.d.ts.map +0 -1
- package/dist/services/page/frame-analyzer.service.js +0 -628
- package/dist/services/page/frame-analyzer.service.js.map +0 -1
- package/dist/services/page/layout-analyzer.service.d.ts +0 -323
- package/dist/services/page/layout-analyzer.service.d.ts.map +0 -1
- package/dist/services/page/layout-analyzer.service.js +0 -2001
- package/dist/services/page/layout-analyzer.service.js.map +0 -1
- package/dist/services/page/motion-category-classifier.service.d.ts +0 -72
- package/dist/services/page/motion-category-classifier.service.d.ts.map +0 -1
- package/dist/services/page/motion-category-classifier.service.js +0 -340
- package/dist/services/page/motion-category-classifier.service.js.map +0 -1
- package/dist/services/page/motion-detector.service.d.ts +0 -76
- package/dist/services/page/motion-detector.service.d.ts.map +0 -1
- package/dist/services/page/motion-detector.service.js +0 -255
- package/dist/services/page/motion-detector.service.js.map +0 -1
- package/dist/services/page/motion-performance-analyzer.service.d.ts +0 -114
- package/dist/services/page/motion-performance-analyzer.service.d.ts.map +0 -1
- package/dist/services/page/motion-performance-analyzer.service.js +0 -315
- package/dist/services/page/motion-performance-analyzer.service.js.map +0 -1
- package/dist/services/page/playwright-crawler.service.d.ts +0 -106
- package/dist/services/page/playwright-crawler.service.d.ts.map +0 -1
- package/dist/services/page/playwright-crawler.service.js +0 -373
- package/dist/services/page/playwright-crawler.service.js.map +0 -1
- package/dist/services/page/quality-evaluator.service.d.ts +0 -107
- package/dist/services/page/quality-evaluator.service.d.ts.map +0 -1
- package/dist/services/page/quality-evaluator.service.js +0 -1138
- package/dist/services/page/quality-evaluator.service.js.map +0 -1
- package/dist/services/page/runtime-animation-detector.service.d.ts +0 -154
- package/dist/services/page/runtime-animation-detector.service.d.ts.map +0 -1
- package/dist/services/page/runtime-animation-detector.service.js +0 -480
- package/dist/services/page/runtime-animation-detector.service.js.map +0 -1
- package/dist/services/page/section-postprocessor.service.d.ts +0 -55
- package/dist/services/page/section-postprocessor.service.d.ts.map +0 -1
- package/dist/services/page/section-postprocessor.service.js +0 -708
- package/dist/services/page/section-postprocessor.service.js.map +0 -1
- package/dist/services/page/video-recorder.service.d.ts +0 -110
- package/dist/services/page/video-recorder.service.d.ts.map +0 -1
- package/dist/services/page/video-recorder.service.js +0 -441
- package/dist/services/page/video-recorder.service.js.map +0 -1
- package/dist/services/page/webgl-detector.service.d.ts +0 -113
- package/dist/services/page/webgl-detector.service.d.ts.map +0 -1
- package/dist/services/page/webgl-detector.service.js +0 -280
- package/dist/services/page/webgl-detector.service.js.map +0 -1
- package/dist/services/page-analyze-service.d.ts +0 -30
- package/dist/services/page-analyze-service.d.ts.map +0 -1
- package/dist/services/page-analyze-service.js +0 -58
- package/dist/services/page-analyze-service.js.map +0 -1
- package/dist/services/page-ingest-adapter.d.ts +0 -479
- package/dist/services/page-ingest-adapter.d.ts.map +0 -1
- package/dist/services/page-ingest-adapter.js +0 -1726
- package/dist/services/page-ingest-adapter.js.map +0 -1
- package/dist/services/palette-service-export.d.ts +0 -26
- package/dist/services/palette-service-export.d.ts.map +0 -1
- package/dist/services/palette-service-export.js +0 -22
- package/dist/services/palette-service-export.js.map +0 -1
- package/dist/services/part/index.d.ts +0 -22
- package/dist/services/part/index.d.ts.map +0 -1
- package/dist/services/part/index.js +0 -72
- package/dist/services/part/index.js.map +0 -1
- package/dist/services/part/part-backfill.service.d.ts +0 -66
- package/dist/services/part/part-backfill.service.d.ts.map +0 -1
- package/dist/services/part/part-backfill.service.js +0 -195
- package/dist/services/part/part-backfill.service.js.map +0 -1
- package/dist/services/part/part-bbox-playwright.service.d.ts +0 -85
- package/dist/services/part/part-bbox-playwright.service.d.ts.map +0 -1
- package/dist/services/part/part-bbox-playwright.service.js +0 -362
- package/dist/services/part/part-bbox-playwright.service.js.map +0 -1
- package/dist/services/part/part-db.service.d.ts +0 -41
- package/dist/services/part/part-db.service.d.ts.map +0 -1
- package/dist/services/part/part-db.service.js +0 -82
- package/dist/services/part/part-db.service.js.map +0 -1
- package/dist/services/part/part-embedding-db.service.d.ts +0 -52
- package/dist/services/part/part-embedding-db.service.d.ts.map +0 -1
- package/dist/services/part/part-embedding-db.service.js +0 -122
- package/dist/services/part/part-embedding-db.service.js.map +0 -1
- package/dist/services/part/part-embedding.service.d.ts +0 -140
- package/dist/services/part/part-embedding.service.d.ts.map +0 -1
- package/dist/services/part/part-embedding.service.js +0 -276
- package/dist/services/part/part-embedding.service.js.map +0 -1
- package/dist/services/part/part-extraction.service.d.ts +0 -75
- package/dist/services/part/part-extraction.service.d.ts.map +0 -1
- package/dist/services/part/part-extraction.service.js +0 -519
- package/dist/services/part/part-extraction.service.js.map +0 -1
- package/dist/services/part/part-search.service.d.ts +0 -180
- package/dist/services/part/part-search.service.d.ts.map +0 -1
- package/dist/services/part/part-search.service.js +0 -565
- package/dist/services/part/part-search.service.js.map +0 -1
- package/dist/services/part/schemas.d.ts +0 -232
- package/dist/services/part/schemas.d.ts.map +0 -1
- package/dist/services/part/schemas.js +0 -167
- package/dist/services/part/schemas.js.map +0 -1
- package/dist/services/part/section-screenshot-fallback.service.d.ts +0 -101
- package/dist/services/part/section-screenshot-fallback.service.d.ts.map +0 -1
- package/dist/services/part/section-screenshot-fallback.service.js +0 -489
- package/dist/services/part/section-screenshot-fallback.service.js.map +0 -1
- package/dist/services/part/types.d.ts +0 -189
- package/dist/services/part/types.d.ts.map +0 -1
- package/dist/services/part/types.js +0 -139
- package/dist/services/part/types.js.map +0 -1
- package/dist/services/persistent-cache.d.ts +0 -209
- package/dist/services/persistent-cache.d.ts.map +0 -1
- package/dist/services/persistent-cache.js +0 -633
- package/dist/services/persistent-cache.js.map +0 -1
- package/dist/services/preference-profile.service.d.ts +0 -143
- package/dist/services/preference-profile.service.d.ts.map +0 -1
- package/dist/services/preference-profile.service.js +0 -604
- package/dist/services/preference-profile.service.js.map +0 -1
- package/dist/services/preference-rerank.helper.d.ts +0 -128
- package/dist/services/preference-rerank.helper.d.ts.map +0 -1
- package/dist/services/preference-rerank.helper.js +0 -397
- package/dist/services/preference-rerank.helper.js.map +0 -1
- package/dist/services/production-guard.d.ts +0 -213
- package/dist/services/production-guard.d.ts.map +0 -1
- package/dist/services/production-guard.js +0 -357
- package/dist/services/production-guard.js.map +0 -1
- package/dist/services/project-context-analyzer.d.ts +0 -194
- package/dist/services/project-context-analyzer.d.ts.map +0 -1
- package/dist/services/project-context-analyzer.js +0 -747
- package/dist/services/project-context-analyzer.js.map +0 -1
- package/dist/services/quality/axe-accessibility.service.d.ts +0 -87
- package/dist/services/quality/axe-accessibility.service.d.ts.map +0 -1
- package/dist/services/quality/axe-accessibility.service.js +0 -188
- package/dist/services/quality/axe-accessibility.service.js.map +0 -1
- package/dist/services/quality/axe-core-shared.d.ts +0 -108
- package/dist/services/quality/axe-core-shared.d.ts.map +0 -1
- package/dist/services/quality/axe-core-shared.js +0 -136
- package/dist/services/quality/axe-core-shared.js.map +0 -1
- package/dist/services/quality/benchmark.service.d.ts +0 -178
- package/dist/services/quality/benchmark.service.d.ts.map +0 -1
- package/dist/services/quality/benchmark.service.js +0 -394
- package/dist/services/quality/benchmark.service.js.map +0 -1
- package/dist/services/quality/content-gap-detector.service.d.ts +0 -133
- package/dist/services/quality/content-gap-detector.service.d.ts.map +0 -1
- package/dist/services/quality/content-gap-detector.service.js +0 -364
- package/dist/services/quality/content-gap-detector.service.js.map +0 -1
- package/dist/services/quality/index.d.ts +0 -12
- package/dist/services/quality/index.d.ts.map +0 -1
- package/dist/services/quality/index.js +0 -12
- package/dist/services/quality/index.js.map +0 -1
- package/dist/services/quality/pattern-matcher.service.d.ts +0 -195
- package/dist/services/quality/pattern-matcher.service.d.ts.map +0 -1
- package/dist/services/quality/pattern-matcher.service.js +0 -630
- package/dist/services/quality/pattern-matcher.service.js.map +0 -1
- package/dist/services/quality/playwright-axe.service.d.ts +0 -84
- package/dist/services/quality/playwright-axe.service.d.ts.map +0 -1
- package/dist/services/quality/playwright-axe.service.js +0 -267
- package/dist/services/quality/playwright-axe.service.js.map +0 -1
- package/dist/services/quality/quality-evaluate.service.interface.d.ts +0 -216
- package/dist/services/quality/quality-evaluate.service.interface.d.ts.map +0 -1
- package/dist/services/quality/quality-evaluate.service.interface.js +0 -5
- package/dist/services/quality/quality-evaluate.service.interface.js.map +0 -1
- package/dist/services/quality/visual-design-analyzer.service.d.ts +0 -72
- package/dist/services/quality/visual-design-analyzer.service.d.ts.map +0 -1
- package/dist/services/quality/visual-design-analyzer.service.js +0 -762
- package/dist/services/quality/visual-design-analyzer.service.js.map +0 -1
- package/dist/services/quality-evaluate-service-export.d.ts +0 -122
- package/dist/services/quality-evaluate-service-export.d.ts.map +0 -1
- package/dist/services/quality-evaluate-service-export.js +0 -138
- package/dist/services/quality-evaluate-service-export.js.map +0 -1
- package/dist/services/quality-search.service.d.ts +0 -20
- package/dist/services/quality-search.service.d.ts.map +0 -1
- package/dist/services/quality-search.service.js +0 -260
- package/dist/services/quality-search.service.js.map +0 -1
- package/dist/services/query-analyzer.d.ts +0 -107
- package/dist/services/query-analyzer.d.ts.map +0 -1
- package/dist/services/query-analyzer.js +0 -222
- package/dist/services/query-analyzer.js.map +0 -1
- package/dist/services/query-context-analyzer.d.ts +0 -85
- package/dist/services/query-context-analyzer.d.ts.map +0 -1
- package/dist/services/query-context-analyzer.js +0 -728
- package/dist/services/query-context-analyzer.js.map +0 -1
- package/dist/services/queue-cleanup.service.d.ts +0 -102
- package/dist/services/queue-cleanup.service.d.ts.map +0 -1
- package/dist/services/queue-cleanup.service.js +0 -259
- package/dist/services/queue-cleanup.service.js.map +0 -1
- package/dist/services/responsive/difference-detector.service.d.ts +0 -77
- package/dist/services/responsive/difference-detector.service.d.ts.map +0 -1
- package/dist/services/responsive/difference-detector.service.js +0 -525
- package/dist/services/responsive/difference-detector.service.js.map +0 -1
- package/dist/services/responsive/index.d.ts +0 -16
- package/dist/services/responsive/index.d.ts.map +0 -1
- package/dist/services/responsive/index.js +0 -60
- package/dist/services/responsive/index.js.map +0 -1
- package/dist/services/responsive/multi-viewport-capture.service.d.ts +0 -103
- package/dist/services/responsive/multi-viewport-capture.service.d.ts.map +0 -1
- package/dist/services/responsive/multi-viewport-capture.service.js +0 -841
- package/dist/services/responsive/multi-viewport-capture.service.js.map +0 -1
- package/dist/services/responsive/responsive-analysis-embedding.service.d.ts +0 -114
- package/dist/services/responsive/responsive-analysis-embedding.service.d.ts.map +0 -1
- package/dist/services/responsive/responsive-analysis-embedding.service.js +0 -232
- package/dist/services/responsive/responsive-analysis-embedding.service.js.map +0 -1
- package/dist/services/responsive/responsive-analysis.service.d.ts +0 -37
- package/dist/services/responsive/responsive-analysis.service.d.ts.map +0 -1
- package/dist/services/responsive/responsive-analysis.service.js +0 -262
- package/dist/services/responsive/responsive-analysis.service.js.map +0 -1
- package/dist/services/responsive/responsive-persistence.service.d.ts +0 -45
- package/dist/services/responsive/responsive-persistence.service.d.ts.map +0 -1
- package/dist/services/responsive/responsive-persistence.service.js +0 -102
- package/dist/services/responsive/responsive-persistence.service.js.map +0 -1
- package/dist/services/responsive/responsive-quality-evaluator.service.d.ts +0 -80
- package/dist/services/responsive/responsive-quality-evaluator.service.d.ts.map +0 -1
- package/dist/services/responsive/responsive-quality-evaluator.service.js +0 -448
- package/dist/services/responsive/responsive-quality-evaluator.service.js.map +0 -1
- package/dist/services/responsive/shared-browser-manager.d.ts +0 -65
- package/dist/services/responsive/shared-browser-manager.d.ts.map +0 -1
- package/dist/services/responsive/shared-browser-manager.js +0 -112
- package/dist/services/responsive/shared-browser-manager.js.map +0 -1
- package/dist/services/responsive/types.d.ts +0 -367
- package/dist/services/responsive/types.d.ts.map +0 -1
- package/dist/services/responsive/types.js +0 -5
- package/dist/services/responsive/types.js.map +0 -1
- package/dist/services/responsive/viewport-diff.service.d.ts +0 -49
- package/dist/services/responsive/viewport-diff.service.d.ts.map +0 -1
- package/dist/services/responsive/viewport-diff.service.js +0 -178
- package/dist/services/responsive/viewport-diff.service.js.map +0 -1
- package/dist/services/responsive-search.service.d.ts +0 -52
- package/dist/services/responsive-search.service.d.ts.map +0 -1
- package/dist/services/responsive-search.service.js +0 -136
- package/dist/services/responsive-search.service.js.map +0 -1
- package/dist/services/search/mood-brandtone-search.service.d.ts +0 -99
- package/dist/services/search/mood-brandtone-search.service.d.ts.map +0 -1
- package/dist/services/search/mood-brandtone-search.service.js +0 -310
- package/dist/services/search/mood-brandtone-search.service.js.map +0 -1
- package/dist/services/search-performance.service.d.ts +0 -118
- package/dist/services/search-performance.service.d.ts.map +0 -1
- package/dist/services/search-performance.service.js +0 -181
- package/dist/services/search-performance.service.js.map +0 -1
- package/dist/services/section-screenshot.service.d.ts +0 -163
- package/dist/services/section-screenshot.service.d.ts.map +0 -1
- package/dist/services/section-screenshot.service.js +0 -363
- package/dist/services/section-screenshot.service.js.map +0 -1
- package/dist/services/service-client.d.ts +0 -181
- package/dist/services/service-client.d.ts.map +0 -1
- package/dist/services/service-client.js +0 -450
- package/dist/services/service-client.js.map +0 -1
- package/dist/services/service-initializer.d.ts +0 -174
- package/dist/services/service-initializer.d.ts.map +0 -1
- package/dist/services/service-initializer.js +0 -942
- package/dist/services/service-initializer.js.map +0 -1
- package/dist/services/storage/index.d.ts +0 -7
- package/dist/services/storage/index.d.ts.map +0 -1
- package/dist/services/storage/index.js +0 -14
- package/dist/services/storage/index.js.map +0 -1
- package/dist/services/storage/local-storage.provider.d.ts +0 -140
- package/dist/services/storage/local-storage.provider.d.ts.map +0 -1
- package/dist/services/storage/local-storage.provider.js +0 -333
- package/dist/services/storage/local-storage.provider.js.map +0 -1
- package/dist/services/style/index.d.ts +0 -7
- package/dist/services/style/index.d.ts.map +0 -1
- package/dist/services/style/index.js +0 -25
- package/dist/services/style/index.js.map +0 -1
- package/dist/services/style/palette-service.d.ts +0 -212
- package/dist/services/style/palette-service.d.ts.map +0 -1
- package/dist/services/style/palette-service.js +0 -423
- package/dist/services/style/palette-service.js.map +0 -1
- package/dist/services/style/prisma-palette-repository.d.ts +0 -35
- package/dist/services/style/prisma-palette-repository.d.ts.map +0 -1
- package/dist/services/style/prisma-palette-repository.js +0 -165
- package/dist/services/style/prisma-palette-repository.js.map +0 -1
- package/dist/services/vision/brandtone.analyzer.d.ts +0 -104
- package/dist/services/vision/brandtone.analyzer.d.ts.map +0 -1
- package/dist/services/vision/brandtone.analyzer.js +0 -279
- package/dist/services/vision/brandtone.analyzer.js.map +0 -1
- package/dist/services/vision/hardware-detector.d.ts +0 -166
- package/dist/services/vision/hardware-detector.d.ts.map +0 -1
- package/dist/services/vision/hardware-detector.js +0 -330
- package/dist/services/vision/hardware-detector.js.map +0 -1
- package/dist/services/vision/image-optimizer.d.ts +0 -152
- package/dist/services/vision/image-optimizer.d.ts.map +0 -1
- package/dist/services/vision/image-optimizer.js +0 -266
- package/dist/services/vision/image-optimizer.js.map +0 -1
- package/dist/services/vision/index.d.ts +0 -26
- package/dist/services/vision/index.d.ts.map +0 -1
- package/dist/services/vision/index.js +0 -80
- package/dist/services/vision/index.js.map +0 -1
- package/dist/services/vision/llama-vision-adapter.d.ts +0 -178
- package/dist/services/vision/llama-vision-adapter.d.ts.map +0 -1
- package/dist/services/vision/llama-vision-adapter.js +0 -307
- package/dist/services/vision/llama-vision-adapter.js.map +0 -1
- package/dist/services/vision/mcp-progress-adapter.d.ts +0 -128
- package/dist/services/vision/mcp-progress-adapter.d.ts.map +0 -1
- package/dist/services/vision/mcp-progress-adapter.js +0 -150
- package/dist/services/vision/mcp-progress-adapter.js.map +0 -1
- package/dist/services/vision/mood.analyzer.d.ts +0 -74
- package/dist/services/vision/mood.analyzer.d.ts.map +0 -1
- package/dist/services/vision/mood.analyzer.js +0 -258
- package/dist/services/vision/mood.analyzer.js.map +0 -1
- package/dist/services/vision/ollama-readiness-probe.d.ts +0 -87
- package/dist/services/vision/ollama-readiness-probe.d.ts.map +0 -1
- package/dist/services/vision/ollama-readiness-probe.js +0 -211
- package/dist/services/vision/ollama-readiness-probe.js.map +0 -1
- package/dist/services/vision/ollama-vision-client.d.ts +0 -129
- package/dist/services/vision/ollama-vision-client.d.ts.map +0 -1
- package/dist/services/vision/ollama-vision-client.js +0 -478
- package/dist/services/vision/ollama-vision-client.js.map +0 -1
- package/dist/services/vision/progress-reporter.d.ts +0 -140
- package/dist/services/vision/progress-reporter.d.ts.map +0 -1
- package/dist/services/vision/progress-reporter.js +0 -306
- package/dist/services/vision/progress-reporter.js.map +0 -1
- package/dist/services/vision/scroll-vision-capture.service.d.ts +0 -117
- package/dist/services/vision/scroll-vision-capture.service.d.ts.map +0 -1
- package/dist/services/vision/scroll-vision-capture.service.js +0 -266
- package/dist/services/vision/scroll-vision-capture.service.js.map +0 -1
- package/dist/services/vision/scroll-vision-persistence.service.d.ts +0 -48
- package/dist/services/vision/scroll-vision-persistence.service.d.ts.map +0 -1
- package/dist/services/vision/scroll-vision-persistence.service.js +0 -161
- package/dist/services/vision/scroll-vision-persistence.service.js.map +0 -1
- package/dist/services/vision/scroll-vision.analyzer.d.ts +0 -90
- package/dist/services/vision/scroll-vision.analyzer.d.ts.map +0 -1
- package/dist/services/vision/scroll-vision.analyzer.js +0 -280
- package/dist/services/vision/scroll-vision.analyzer.js.map +0 -1
- package/dist/services/vision/theme.analyzer.d.ts +0 -108
- package/dist/services/vision/theme.analyzer.d.ts.map +0 -1
- package/dist/services/vision/theme.analyzer.js +0 -315
- package/dist/services/vision/theme.analyzer.js.map +0 -1
- package/dist/services/vision/timeout-calculator.d.ts +0 -85
- package/dist/services/vision/timeout-calculator.d.ts.map +0 -1
- package/dist/services/vision/timeout-calculator.js +0 -142
- package/dist/services/vision/timeout-calculator.js.map +0 -1
- package/dist/services/vision/vision-fallback.service.d.ts +0 -121
- package/dist/services/vision/vision-fallback.service.d.ts.map +0 -1
- package/dist/services/vision/vision-fallback.service.js +0 -253
- package/dist/services/vision/vision-fallback.service.js.map +0 -1
- package/dist/services/vision/vision.cache.d.ts +0 -124
- package/dist/services/vision/vision.cache.d.ts.map +0 -1
- package/dist/services/vision/vision.cache.js +0 -261
- package/dist/services/vision/vision.cache.js.map +0 -1
- package/dist/services/vision/vision.errors.d.ts +0 -104
- package/dist/services/vision/vision.errors.d.ts.map +0 -1
- package/dist/services/vision/vision.errors.js +0 -133
- package/dist/services/vision/vision.errors.js.map +0 -1
- package/dist/services/vision/vision.prompts.d.ts +0 -47
- package/dist/services/vision/vision.prompts.d.ts.map +0 -1
- package/dist/services/vision/vision.prompts.js +0 -272
- package/dist/services/vision/vision.prompts.js.map +0 -1
- package/dist/services/vision/vram-utils.d.ts +0 -22
- package/dist/services/vision/vram-utils.d.ts.map +0 -1
- package/dist/services/vision/vram-utils.js +0 -57
- package/dist/services/vision/vram-utils.js.map +0 -1
- package/dist/services/vision-adapter/index.d.ts +0 -18
- package/dist/services/vision-adapter/index.d.ts.map +0 -1
- package/dist/services/vision-adapter/index.js +0 -31
- package/dist/services/vision-adapter/index.js.map +0 -1
- package/dist/services/vision-adapter/interface.d.ts +0 -1434
- package/dist/services/vision-adapter/interface.d.ts.map +0 -1
- package/dist/services/vision-adapter/interface.js +0 -326
- package/dist/services/vision-adapter/interface.js.map +0 -1
- package/dist/services/vision-adapter/llama-vision.adapter.d.ts +0 -373
- package/dist/services/vision-adapter/llama-vision.adapter.d.ts.map +0 -1
- package/dist/services/vision-adapter/llama-vision.adapter.js +0 -1751
- package/dist/services/vision-adapter/llama-vision.adapter.js.map +0 -1
- package/dist/services/vision-adapter/llama-vision.prompts.d.ts +0 -63
- package/dist/services/vision-adapter/llama-vision.prompts.d.ts.map +0 -1
- package/dist/services/vision-adapter/llama-vision.prompts.js +0 -234
- package/dist/services/vision-adapter/llama-vision.prompts.js.map +0 -1
- package/dist/services/vision-adapter/llama-vision.types.d.ts +0 -68
- package/dist/services/vision-adapter/llama-vision.types.d.ts.map +0 -1
- package/dist/services/vision-adapter/llama-vision.types.js +0 -21
- package/dist/services/vision-adapter/llama-vision.types.js.map +0 -1
- package/dist/services/vision-adapter/local.adapter.d.ts +0 -185
- package/dist/services/vision-adapter/local.adapter.d.ts.map +0 -1
- package/dist/services/vision-adapter/local.adapter.js +0 -835
- package/dist/services/vision-adapter/local.adapter.js.map +0 -1
- package/dist/services/vision-adapter/mock.adapter.d.ts +0 -174
- package/dist/services/vision-adapter/mock.adapter.d.ts.map +0 -1
- package/dist/services/vision-adapter/mock.adapter.js +0 -812
- package/dist/services/vision-adapter/mock.adapter.js.map +0 -1
- package/dist/services/vision-embedding-search.service.d.ts +0 -205
- package/dist/services/vision-embedding-search.service.d.ts.map +0 -1
- package/dist/services/vision-embedding-search.service.js +0 -742
- package/dist/services/vision-embedding-search.service.js.map +0 -1
- package/dist/services/vision-embedding.service.d.ts +0 -150
- package/dist/services/vision-embedding.service.d.ts.map +0 -1
- package/dist/services/vision-embedding.service.js +0 -461
- package/dist/services/vision-embedding.service.js.map +0 -1
- package/dist/services/visual/css-variable-extractor.service.d.ts +0 -97
- package/dist/services/visual/css-variable-extractor.service.d.ts.map +0 -1
- package/dist/services/visual/css-variable-extractor.service.js +0 -460
- package/dist/services/visual/css-variable-extractor.service.js.map +0 -1
- package/dist/services/visual/typography-extractor.service.d.ts +0 -137
- package/dist/services/visual/typography-extractor.service.d.ts.map +0 -1
- package/dist/services/visual/typography-extractor.service.js +0 -539
- package/dist/services/visual/typography-extractor.service.js.map +0 -1
- package/dist/services/visual-extractor/color-extractor.service.d.ts +0 -55
- package/dist/services/visual-extractor/color-extractor.service.d.ts.map +0 -1
- package/dist/services/visual-extractor/color-extractor.service.js +0 -281
- package/dist/services/visual-extractor/color-extractor.service.js.map +0 -1
- package/dist/services/visual-extractor/density-calculator.service.d.ts +0 -85
- package/dist/services/visual-extractor/density-calculator.service.d.ts.map +0 -1
- package/dist/services/visual-extractor/density-calculator.service.js +0 -369
- package/dist/services/visual-extractor/density-calculator.service.js.map +0 -1
- package/dist/services/visual-extractor/gradient-detector.service.d.ts +0 -134
- package/dist/services/visual-extractor/gradient-detector.service.d.ts.map +0 -1
- package/dist/services/visual-extractor/gradient-detector.service.js +0 -1172
- package/dist/services/visual-extractor/gradient-detector.service.js.map +0 -1
- package/dist/services/visual-extractor/image-utils.d.ts +0 -135
- package/dist/services/visual-extractor/image-utils.d.ts.map +0 -1
- package/dist/services/visual-extractor/image-utils.js +0 -305
- package/dist/services/visual-extractor/image-utils.js.map +0 -1
- package/dist/services/visual-extractor/pixel-theme-detector.service.d.ts +0 -58
- package/dist/services/visual-extractor/pixel-theme-detector.service.d.ts.map +0 -1
- package/dist/services/visual-extractor/pixel-theme-detector.service.js +0 -358
- package/dist/services/visual-extractor/pixel-theme-detector.service.js.map +0 -1
- package/dist/services/visual-extractor/theme-detector.service.d.ts +0 -101
- package/dist/services/visual-extractor/theme-detector.service.d.ts.map +0 -1
- package/dist/services/visual-extractor/theme-detector.service.js +0 -463
- package/dist/services/visual-extractor/theme-detector.service.js.map +0 -1
- package/dist/services/visual-extractor/visual-decoration-detector.service.d.ts +0 -43
- package/dist/services/visual-extractor/visual-decoration-detector.service.d.ts.map +0 -1
- package/dist/services/visual-extractor/visual-decoration-detector.service.js +0 -628
- package/dist/services/visual-extractor/visual-decoration-detector.service.js.map +0 -1
- package/dist/services/visual-extractor/visual-feature-merger.service.d.ts +0 -230
- package/dist/services/visual-extractor/visual-feature-merger.service.d.ts.map +0 -1
- package/dist/services/visual-extractor/visual-feature-merger.service.js +0 -482
- package/dist/services/visual-extractor/visual-feature-merger.service.js.map +0 -1
- package/dist/services/web-page.service.d.ts +0 -80
- package/dist/services/web-page.service.d.ts.map +0 -1
- package/dist/services/web-page.service.js +0 -211
- package/dist/services/web-page.service.js.map +0 -1
- package/dist/services/worker-constants.d.ts +0 -40
- package/dist/services/worker-constants.d.ts.map +0 -1
- package/dist/services/worker-constants.js +0 -51
- package/dist/services/worker-constants.js.map +0 -1
- package/dist/services/worker-db-save.service.d.ts +0 -311
- package/dist/services/worker-db-save.service.d.ts.map +0 -1
- package/dist/services/worker-db-save.service.js +0 -771
- package/dist/services/worker-db-save.service.js.map +0 -1
- package/dist/services/worker-memory-monitor.service.d.ts +0 -24
- package/dist/services/worker-memory-monitor.service.d.ts.map +0 -1
- package/dist/services/worker-memory-monitor.service.js +0 -105
- package/dist/services/worker-memory-monitor.service.js.map +0 -1
- package/dist/services/worker-memory-profile.d.ts +0 -65
- package/dist/services/worker-memory-profile.d.ts.map +0 -1
- package/dist/services/worker-memory-profile.js +0 -225
- package/dist/services/worker-memory-profile.js.map +0 -1
- package/dist/services/worker-stall-recovery.service.d.ts +0 -166
- package/dist/services/worker-stall-recovery.service.d.ts.map +0 -1
- package/dist/services/worker-stall-recovery.service.js +0 -335
- package/dist/services/worker-stall-recovery.service.js.map +0 -1
- package/dist/services/worker-supervisor.service.d.ts +0 -145
- package/dist/services/worker-supervisor.service.d.ts.map +0 -1
- package/dist/services/worker-supervisor.service.js +0 -635
- package/dist/services/worker-supervisor.service.js.map +0 -1
- package/dist/tools/background/schemas.d.ts +0 -85
- package/dist/tools/background/schemas.d.ts.map +0 -1
- package/dist/tools/background/schemas.js +0 -79
- package/dist/tools/background/schemas.js.map +0 -1
- package/dist/tools/background/search.tool.d.ts +0 -179
- package/dist/tools/background/search.tool.d.ts.map +0 -1
- package/dist/tools/background/search.tool.js +0 -318
- package/dist/tools/background/search.tool.js.map +0 -1
- package/dist/tools/brief/index.d.ts +0 -10
- package/dist/tools/brief/index.d.ts.map +0 -1
- package/dist/tools/brief/index.js +0 -54
- package/dist/tools/brief/index.js.map +0 -1
- package/dist/tools/brief/schemas.d.ts +0 -750
- package/dist/tools/brief/schemas.d.ts.map +0 -1
- package/dist/tools/brief/schemas.js +0 -212
- package/dist/tools/brief/schemas.js.map +0 -1
- package/dist/tools/brief/validate.handler.d.ts +0 -149
- package/dist/tools/brief/validate.handler.d.ts.map +0 -1
- package/dist/tools/brief/validate.handler.js +0 -247
- package/dist/tools/brief/validate.handler.js.map +0 -1
- package/dist/tools/brief/validate.service.d.ts +0 -100
- package/dist/tools/brief/validate.service.d.ts.map +0 -1
- package/dist/tools/brief/validate.service.js +0 -296
- package/dist/tools/brief/validate.service.js.map +0 -1
- package/dist/tools/common/error-codes.d.ts +0 -35
- package/dist/tools/common/error-codes.d.ts.map +0 -1
- package/dist/tools/common/error-codes.js +0 -92
- package/dist/tools/common/error-codes.js.map +0 -1
- package/dist/tools/common/index.d.ts +0 -7
- package/dist/tools/common/index.d.ts.map +0 -1
- package/dist/tools/common/index.js +0 -20
- package/dist/tools/common/index.js.map +0 -1
- package/dist/tools/index.d.ts +0 -2756
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -506
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/layout/batch-ingest.tool.d.ts +0 -82
- package/dist/tools/layout/batch-ingest.tool.d.ts.map +0 -1
- package/dist/tools/layout/batch-ingest.tool.js +0 -410
- package/dist/tools/layout/batch-ingest.tool.js.map +0 -1
- package/dist/tools/layout/index.d.ts +0 -13
- package/dist/tools/layout/index.d.ts.map +0 -1
- package/dist/tools/layout/index.js +0 -62
- package/dist/tools/layout/index.js.map +0 -1
- package/dist/tools/layout/ingest.tool.d.ts +0 -338
- package/dist/tools/layout/ingest.tool.d.ts.map +0 -1
- package/dist/tools/layout/ingest.tool.js +0 -1308
- package/dist/tools/layout/ingest.tool.js.map +0 -1
- package/dist/tools/layout/inspect/index.d.ts +0 -11
- package/dist/tools/layout/inspect/index.d.ts.map +0 -1
- package/dist/tools/layout/inspect/index.js +0 -55
- package/dist/tools/layout/inspect/index.js.map +0 -1
- package/dist/tools/layout/inspect/inspect.schemas.d.ts +0 -4130
- package/dist/tools/layout/inspect/inspect.schemas.d.ts.map +0 -1
- package/dist/tools/layout/inspect/inspect.schemas.js +0 -400
- package/dist/tools/layout/inspect/inspect.schemas.js.map +0 -1
- package/dist/tools/layout/inspect/inspect.tool.d.ts +0 -164
- package/dist/tools/layout/inspect/inspect.tool.d.ts.map +0 -1
- package/dist/tools/layout/inspect/inspect.tool.js +0 -738
- package/dist/tools/layout/inspect/inspect.tool.js.map +0 -1
- package/dist/tools/layout/inspect/inspect.utils.d.ts +0 -200
- package/dist/tools/layout/inspect/inspect.utils.d.ts.map +0 -1
- package/dist/tools/layout/inspect/inspect.utils.js +0 -1104
- package/dist/tools/layout/inspect/inspect.utils.js.map +0 -1
- package/dist/tools/layout/inspect/visual-extractors.schemas.d.ts +0 -3372
- package/dist/tools/layout/inspect/visual-extractors.schemas.d.ts.map +0 -1
- package/dist/tools/layout/inspect/visual-extractors.schemas.js +0 -558
- package/dist/tools/layout/inspect/visual-extractors.schemas.js.map +0 -1
- package/dist/tools/layout/inspect/visual-extractors.utils.d.ts +0 -86
- package/dist/tools/layout/inspect/visual-extractors.utils.d.ts.map +0 -1
- package/dist/tools/layout/inspect/visual-extractors.utils.js +0 -231
- package/dist/tools/layout/inspect/visual-extractors.utils.js.map +0 -1
- package/dist/tools/layout/schemas.d.ts +0 -11074
- package/dist/tools/layout/schemas.d.ts.map +0 -1
- package/dist/tools/layout/schemas.js +0 -1497
- package/dist/tools/layout/schemas.js.map +0 -1
- package/dist/tools/layout/search.tool.d.ts +0 -470
- package/dist/tools/layout/search.tool.d.ts.map +0 -1
- package/dist/tools/layout/search.tool.js +0 -1582
- package/dist/tools/layout/search.tool.js.map +0 -1
- package/dist/tools/layout/to-code.tool.d.ts +0 -280
- package/dist/tools/layout/to-code.tool.d.ts.map +0 -1
- package/dist/tools/layout/to-code.tool.js +0 -317
- package/dist/tools/layout/to-code.tool.js.map +0 -1
- package/dist/tools/motion/analyze-frames.handler.d.ts +0 -157
- package/dist/tools/motion/analyze-frames.handler.d.ts.map +0 -1
- package/dist/tools/motion/analyze-frames.handler.js +0 -263
- package/dist/tools/motion/analyze-frames.handler.js.map +0 -1
- package/dist/tools/motion/analyze-frames.schema.d.ts +0 -4599
- package/dist/tools/motion/analyze-frames.schema.d.ts.map +0 -1
- package/dist/tools/motion/analyze-frames.schema.js +0 -420
- package/dist/tools/motion/analyze-frames.schema.js.map +0 -1
- package/dist/tools/motion/css-mode-handler.d.ts +0 -70
- package/dist/tools/motion/css-mode-handler.d.ts.map +0 -1
- package/dist/tools/motion/css-mode-handler.js +0 -754
- package/dist/tools/motion/css-mode-handler.js.map +0 -1
- package/dist/tools/motion/detect.schemas.d.ts +0 -14288
- package/dist/tools/motion/detect.schemas.d.ts.map +0 -1
- package/dist/tools/motion/detect.schemas.js +0 -1715
- package/dist/tools/motion/detect.schemas.js.map +0 -1
- package/dist/tools/motion/detect.tool.d.ts +0 -195
- package/dist/tools/motion/detect.tool.d.ts.map +0 -1
- package/dist/tools/motion/detect.tool.js +0 -1421
- package/dist/tools/motion/detect.tool.js.map +0 -1
- package/dist/tools/motion/detection-modes.d.ts +0 -72
- package/dist/tools/motion/detection-modes.d.ts.map +0 -1
- package/dist/tools/motion/detection-modes.js +0 -353
- package/dist/tools/motion/detection-modes.js.map +0 -1
- package/dist/tools/motion/di-factories.d.ts +0 -341
- package/dist/tools/motion/di-factories.d.ts.map +0 -1
- package/dist/tools/motion/di-factories.js +0 -376
- package/dist/tools/motion/di-factories.js.map +0 -1
- package/dist/tools/motion/index.d.ts +0 -12
- package/dist/tools/motion/index.d.ts.map +0 -1
- package/dist/tools/motion/index.js +0 -146
- package/dist/tools/motion/index.js.map +0 -1
- package/dist/tools/motion/pattern-converter.d.ts +0 -49
- package/dist/tools/motion/pattern-converter.d.ts.map +0 -1
- package/dist/tools/motion/pattern-converter.js +0 -493
- package/dist/tools/motion/pattern-converter.js.map +0 -1
- package/dist/tools/motion/schemas.d.ts +0 -10
- package/dist/tools/motion/schemas.d.ts.map +0 -1
- package/dist/tools/motion/schemas.js +0 -28
- package/dist/tools/motion/schemas.js.map +0 -1
- package/dist/tools/motion/search.schemas.d.ts +0 -7500
- package/dist/tools/motion/search.schemas.d.ts.map +0 -1
- package/dist/tools/motion/search.schemas.js +0 -596
- package/dist/tools/motion/search.schemas.js.map +0 -1
- package/dist/tools/motion/search.tool.d.ts +0 -416
- package/dist/tools/motion/search.tool.d.ts.map +0 -1
- package/dist/tools/motion/search.tool.js +0 -2088
- package/dist/tools/motion/search.tool.js.map +0 -1
- package/dist/tools/motion/shared.schemas.d.ts +0 -994
- package/dist/tools/motion/shared.schemas.d.ts.map +0 -1
- package/dist/tools/motion/shared.schemas.js +0 -354
- package/dist/tools/motion/shared.schemas.js.map +0 -1
- package/dist/tools/narrative/analyze.tool.d.ts +0 -96
- package/dist/tools/narrative/analyze.tool.d.ts.map +0 -1
- package/dist/tools/narrative/analyze.tool.js +0 -396
- package/dist/tools/narrative/analyze.tool.js.map +0 -1
- package/dist/tools/narrative/index.d.ts +0 -15
- package/dist/tools/narrative/index.d.ts.map +0 -1
- package/dist/tools/narrative/index.js +0 -83
- package/dist/tools/narrative/index.js.map +0 -1
- package/dist/tools/narrative/schemas.d.ts +0 -5553
- package/dist/tools/narrative/schemas.d.ts.map +0 -1
- package/dist/tools/narrative/schemas.js +0 -747
- package/dist/tools/narrative/schemas.js.map +0 -1
- package/dist/tools/narrative/search.tool.d.ts +0 -160
- package/dist/tools/narrative/search.tool.d.ts.map +0 -1
- package/dist/tools/narrative/search.tool.js +0 -434
- package/dist/tools/narrative/search.tool.js.map +0 -1
- package/dist/tools/page/analyze.tool.d.ts +0 -502
- package/dist/tools/page/analyze.tool.d.ts.map +0 -1
- package/dist/tools/page/analyze.tool.js +0 -875
- package/dist/tools/page/analyze.tool.js.map +0 -1
- package/dist/tools/page/get-job-status.tool.d.ts +0 -43
- package/dist/tools/page/get-job-status.tool.d.ts.map +0 -1
- package/dist/tools/page/get-job-status.tool.js +0 -178
- package/dist/tools/page/get-job-status.tool.js.map +0 -1
- package/dist/tools/page/handlers/db-handler.d.ts +0 -155
- package/dist/tools/page/handlers/db-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/db-handler.js +0 -368
- package/dist/tools/page/handlers/db-handler.js.map +0 -1
- package/dist/tools/page/handlers/embedding-handler.d.ts +0 -200
- package/dist/tools/page/handlers/embedding-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/embedding-handler.js +0 -541
- package/dist/tools/page/handlers/embedding-handler.js.map +0 -1
- package/dist/tools/page/handlers/execution-status-tracker.d.ts +0 -146
- package/dist/tools/page/handlers/execution-status-tracker.d.ts.map +0 -1
- package/dist/tools/page/handlers/execution-status-tracker.js +0 -348
- package/dist/tools/page/handlers/execution-status-tracker.js.map +0 -1
- package/dist/tools/page/handlers/js-animation-handler.d.ts +0 -197
- package/dist/tools/page/handlers/js-animation-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/js-animation-handler.js +0 -952
- package/dist/tools/page/handlers/js-animation-handler.js.map +0 -1
- package/dist/tools/page/handlers/layout-handler.d.ts +0 -31
- package/dist/tools/page/handlers/layout-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/layout-handler.js +0 -1181
- package/dist/tools/page/handlers/layout-handler.js.map +0 -1
- package/dist/tools/page/handlers/motion-handler.d.ts +0 -31
- package/dist/tools/page/handlers/motion-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/motion-handler.js +0 -940
- package/dist/tools/page/handlers/motion-handler.js.map +0 -1
- package/dist/tools/page/handlers/narrative-handler.d.ts +0 -23
- package/dist/tools/page/handlers/narrative-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/narrative-handler.js +0 -279
- package/dist/tools/page/handlers/narrative-handler.js.map +0 -1
- package/dist/tools/page/handlers/phased-db-handler.d.ts +0 -83
- package/dist/tools/page/handlers/phased-db-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/phased-db-handler.js +0 -120
- package/dist/tools/page/handlers/phased-db-handler.js.map +0 -1
- package/dist/tools/page/handlers/phased-executor.d.ts +0 -123
- package/dist/tools/page/handlers/phased-executor.d.ts.map +0 -1
- package/dist/tools/page/handlers/phased-executor.js +0 -205
- package/dist/tools/page/handlers/phased-executor.js.map +0 -1
- package/dist/tools/page/handlers/quality-handler.d.ts +0 -9
- package/dist/tools/page/handlers/quality-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/quality-handler.js +0 -100
- package/dist/tools/page/handlers/quality-handler.js.map +0 -1
- package/dist/tools/page/handlers/result-builder.d.ts +0 -105
- package/dist/tools/page/handlers/result-builder.d.ts.map +0 -1
- package/dist/tools/page/handlers/result-builder.js +0 -447
- package/dist/tools/page/handlers/result-builder.js.map +0 -1
- package/dist/tools/page/handlers/retry-strategy.d.ts +0 -106
- package/dist/tools/page/handlers/retry-strategy.d.ts.map +0 -1
- package/dist/tools/page/handlers/retry-strategy.js +0 -169
- package/dist/tools/page/handlers/retry-strategy.js.map +0 -1
- package/dist/tools/page/handlers/sync-processing.d.ts +0 -26
- package/dist/tools/page/handlers/sync-processing.d.ts.map +0 -1
- package/dist/tools/page/handlers/sync-processing.js +0 -1659
- package/dist/tools/page/handlers/sync-processing.js.map +0 -1
- package/dist/tools/page/handlers/timeout-utils.d.ts +0 -278
- package/dist/tools/page/handlers/timeout-utils.d.ts.map +0 -1
- package/dist/tools/page/handlers/timeout-utils.js +0 -600
- package/dist/tools/page/handlers/timeout-utils.js.map +0 -1
- package/dist/tools/page/handlers/types.d.ts +0 -1229
- package/dist/tools/page/handlers/types.d.ts.map +0 -1
- package/dist/tools/page/handlers/types.js +0 -21
- package/dist/tools/page/handlers/types.js.map +0 -1
- package/dist/tools/page/handlers/video-handler.d.ts +0 -11
- package/dist/tools/page/handlers/video-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/video-handler.js +0 -235
- package/dist/tools/page/handlers/video-handler.js.map +0 -1
- package/dist/tools/page/handlers/webgl-animation-handler.d.ts +0 -48
- package/dist/tools/page/handlers/webgl-animation-handler.d.ts.map +0 -1
- package/dist/tools/page/handlers/webgl-animation-handler.js +0 -237
- package/dist/tools/page/handlers/webgl-animation-handler.js.map +0 -1
- package/dist/tools/page/handlers/webgl-detector.d.ts +0 -184
- package/dist/tools/page/handlers/webgl-detector.d.ts.map +0 -1
- package/dist/tools/page/handlers/webgl-detector.js +0 -680
- package/dist/tools/page/handlers/webgl-detector.js.map +0 -1
- package/dist/tools/page/handlers/webgl-domains.d.ts +0 -133
- package/dist/tools/page/handlers/webgl-domains.d.ts.map +0 -1
- package/dist/tools/page/handlers/webgl-domains.js +0 -420
- package/dist/tools/page/handlers/webgl-domains.js.map +0 -1
- package/dist/tools/page/handlers/webgl-pre-detector.d.ts +0 -100
- package/dist/tools/page/handlers/webgl-pre-detector.d.ts.map +0 -1
- package/dist/tools/page/handlers/webgl-pre-detector.js +0 -248
- package/dist/tools/page/handlers/webgl-pre-detector.js.map +0 -1
- package/dist/tools/page/index.d.ts +0 -10
- package/dist/tools/page/index.d.ts.map +0 -1
- package/dist/tools/page/index.js +0 -84
- package/dist/tools/page/index.js.map +0 -1
- package/dist/tools/page/input.schemas.d.ts +0 -2223
- package/dist/tools/page/input.schemas.d.ts.map +0 -1
- package/dist/tools/page/input.schemas.js +0 -853
- package/dist/tools/page/input.schemas.js.map +0 -1
- package/dist/tools/page/output.schemas.d.ts +0 -26026
- package/dist/tools/page/output.schemas.d.ts.map +0 -1
- package/dist/tools/page/output.schemas.js +0 -1414
- package/dist/tools/page/output.schemas.js.map +0 -1
- package/dist/tools/page/schemas.d.ts +0 -10
- package/dist/tools/page/schemas.d.ts.map +0 -1
- package/dist/tools/page/schemas.js +0 -28
- package/dist/tools/page/schemas.js.map +0 -1
- package/dist/tools/page/shared.schemas.d.ts +0 -38
- package/dist/tools/page/shared.schemas.d.ts.map +0 -1
- package/dist/tools/page/shared.schemas.js +0 -69
- package/dist/tools/page/shared.schemas.js.map +0 -1
- package/dist/tools/part/compare.tool.d.ts +0 -106
- package/dist/tools/part/compare.tool.d.ts.map +0 -1
- package/dist/tools/part/compare.tool.js +0 -421
- package/dist/tools/part/compare.tool.js.map +0 -1
- package/dist/tools/part/inspect.tool.d.ts +0 -108
- package/dist/tools/part/inspect.tool.d.ts.map +0 -1
- package/dist/tools/part/inspect.tool.js +0 -279
- package/dist/tools/part/inspect.tool.js.map +0 -1
- package/dist/tools/part/search.tool.d.ts +0 -121
- package/dist/tools/part/search.tool.d.ts.map +0 -1
- package/dist/tools/part/search.tool.js +0 -381
- package/dist/tools/part/search.tool.js.map +0 -1
- package/dist/tools/preference/get.tool.d.ts +0 -74
- package/dist/tools/preference/get.tool.d.ts.map +0 -1
- package/dist/tools/preference/get.tool.js +0 -175
- package/dist/tools/preference/get.tool.js.map +0 -1
- package/dist/tools/preference/hear.tool.d.ts +0 -267
- package/dist/tools/preference/hear.tool.d.ts.map +0 -1
- package/dist/tools/preference/hear.tool.js +0 -268
- package/dist/tools/preference/hear.tool.js.map +0 -1
- package/dist/tools/preference/index.d.ts +0 -16
- package/dist/tools/preference/index.d.ts.map +0 -1
- package/dist/tools/preference/index.js +0 -43
- package/dist/tools/preference/index.js.map +0 -1
- package/dist/tools/preference/reset.tool.d.ts +0 -71
- package/dist/tools/preference/reset.tool.d.ts.map +0 -1
- package/dist/tools/preference/reset.tool.js +0 -205
- package/dist/tools/preference/reset.tool.js.map +0 -1
- package/dist/tools/preference/schemas.d.ts +0 -174
- package/dist/tools/preference/schemas.d.ts.map +0 -1
- package/dist/tools/preference/schemas.js +0 -142
- package/dist/tools/preference/schemas.js.map +0 -1
- package/dist/tools/project-get.d.ts +0 -42
- package/dist/tools/project-get.d.ts.map +0 -1
- package/dist/tools/project-get.js +0 -152
- package/dist/tools/project-get.js.map +0 -1
- package/dist/tools/project-list.d.ts +0 -66
- package/dist/tools/project-list.d.ts.map +0 -1
- package/dist/tools/project-list.js +0 -201
- package/dist/tools/project-list.js.map +0 -1
- package/dist/tools/quality/batch-evaluate.tool.d.ts +0 -101
- package/dist/tools/quality/batch-evaluate.tool.d.ts.map +0 -1
- package/dist/tools/quality/batch-evaluate.tool.js +0 -393
- package/dist/tools/quality/batch-evaluate.tool.js.map +0 -1
- package/dist/tools/quality/evaluate-engine.d.ts +0 -166
- package/dist/tools/quality/evaluate-engine.d.ts.map +0 -1
- package/dist/tools/quality/evaluate-engine.js +0 -1061
- package/dist/tools/quality/evaluate-engine.js.map +0 -1
- package/dist/tools/quality/evaluate.tool.d.ts +0 -286
- package/dist/tools/quality/evaluate.tool.d.ts.map +0 -1
- package/dist/tools/quality/evaluate.tool.js +0 -815
- package/dist/tools/quality/evaluate.tool.js.map +0 -1
- package/dist/tools/quality/get-job-status.tool.d.ts +0 -44
- package/dist/tools/quality/get-job-status.tool.d.ts.map +0 -1
- package/dist/tools/quality/get-job-status.tool.js +0 -291
- package/dist/tools/quality/get-job-status.tool.js.map +0 -1
- package/dist/tools/quality/improvement-utils.d.ts +0 -24
- package/dist/tools/quality/improvement-utils.d.ts.map +0 -1
- package/dist/tools/quality/improvement-utils.js +0 -307
- package/dist/tools/quality/improvement-utils.js.map +0 -1
- package/dist/tools/quality/index.d.ts +0 -11
- package/dist/tools/quality/index.d.ts.map +0 -1
- package/dist/tools/quality/index.js +0 -49
- package/dist/tools/quality/index.js.map +0 -1
- package/dist/tools/quality/schemas.d.ts +0 -14098
- package/dist/tools/quality/schemas.d.ts.map +0 -1
- package/dist/tools/quality/schemas.js +0 -950
- package/dist/tools/quality/schemas.js.map +0 -1
- package/dist/tools/responsive/schemas.d.ts +0 -156
- package/dist/tools/responsive/schemas.d.ts.map +0 -1
- package/dist/tools/responsive/schemas.js +0 -86
- package/dist/tools/responsive/schemas.js.map +0 -1
- package/dist/tools/responsive/search.tool.d.ts +0 -130
- package/dist/tools/responsive/search.tool.d.ts.map +0 -1
- package/dist/tools/responsive/search.tool.js +0 -324
- package/dist/tools/responsive/search.tool.js.map +0 -1
- package/dist/tools/schemas/index.d.ts +0 -10
- package/dist/tools/schemas/index.d.ts.map +0 -1
- package/dist/tools/schemas/index.js +0 -45
- package/dist/tools/schemas/index.js.map +0 -1
- package/dist/tools/schemas/layout-schemas.d.ts +0 -521
- package/dist/tools/schemas/layout-schemas.d.ts.map +0 -1
- package/dist/tools/schemas/layout-schemas.js +0 -281
- package/dist/tools/schemas/layout-schemas.js.map +0 -1
- package/dist/tools/schemas/project-schemas.d.ts +0 -417
- package/dist/tools/schemas/project-schemas.d.ts.map +0 -1
- package/dist/tools/schemas/project-schemas.js +0 -159
- package/dist/tools/schemas/project-schemas.js.map +0 -1
- package/dist/tools/schemas/shared.d.ts +0 -107
- package/dist/tools/schemas/shared.d.ts.map +0 -1
- package/dist/tools/schemas/shared.js +0 -150
- package/dist/tools/schemas/shared.js.map +0 -1
- package/dist/tools/schemas/style-schemas.d.ts +0 -114
- package/dist/tools/schemas/style-schemas.d.ts.map +0 -1
- package/dist/tools/schemas/style-schemas.js +0 -61
- package/dist/tools/schemas/style-schemas.js.map +0 -1
- package/dist/tools/style-get-palette.d.ts +0 -136
- package/dist/tools/style-get-palette.d.ts.map +0 -1
- package/dist/tools/style-get-palette.js +0 -259
- package/dist/tools/style-get-palette.js.map +0 -1
- package/dist/tools/system-health.d.ts +0 -255
- package/dist/tools/system-health.d.ts.map +0 -1
- package/dist/tools/system-health.js +0 -463
- package/dist/tools/system-health.js.map +0 -1
- package/dist/transport.d.ts +0 -29
- package/dist/transport.d.ts.map +0 -1
- package/dist/transport.js +0 -50
- package/dist/transport.js.map +0 -1
- package/dist/types/creative/index.d.ts +0 -8
- package/dist/types/creative/index.d.ts.map +0 -1
- package/dist/types/creative/index.js +0 -5
- package/dist/types/creative/index.js.map +0 -1
- package/dist/types/creative/palette.d.ts +0 -142
- package/dist/types/creative/palette.d.ts.map +0 -1
- package/dist/types/creative/palette.js +0 -5
- package/dist/types/creative/palette.js.map +0 -1
- package/dist/types/reftrix-window.d.ts +0 -124
- package/dist/types/reftrix-window.d.ts.map +0 -1
- package/dist/types/reftrix-window.js +0 -68
- package/dist/types/reftrix-window.js.map +0 -1
- package/dist/utils/actionable-warning.d.ts +0 -170
- package/dist/utils/actionable-warning.d.ts.map +0 -1
- package/dist/utils/actionable-warning.js +0 -818
- package/dist/utils/actionable-warning.js.map +0 -1
- package/dist/utils/blank-image-detector.d.ts +0 -22
- package/dist/utils/blank-image-detector.d.ts.map +0 -1
- package/dist/utils/blank-image-detector.js +0 -133
- package/dist/utils/blank-image-detector.js.map +0 -1
- package/dist/utils/color.d.ts +0 -203
- package/dist/utils/color.d.ts.map +0 -1
- package/dist/utils/color.js +0 -442
- package/dist/utils/color.js.map +0 -1
- package/dist/utils/deprecation-warning.d.ts +0 -43
- package/dist/utils/deprecation-warning.d.ts.map +0 -1
- package/dist/utils/deprecation-warning.js +0 -112
- package/dist/utils/deprecation-warning.js.map +0 -1
- package/dist/utils/error-messages.d.ts +0 -233
- package/dist/utils/error-messages.d.ts.map +0 -1
- package/dist/utils/error-messages.js +0 -721
- package/dist/utils/error-messages.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -64
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -82
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/gpu-browser-args.d.ts +0 -27
- package/dist/utils/gpu-browser-args.d.ts.map +0 -1
- package/dist/utils/gpu-browser-args.js +0 -42
- package/dist/utils/gpu-browser-args.js.map +0 -1
- package/dist/utils/html-sanitizer.d.ts +0 -116
- package/dist/utils/html-sanitizer.d.ts.map +0 -1
- package/dist/utils/html-sanitizer.js +0 -630
- package/dist/utils/html-sanitizer.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -141
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -249
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/mcp-response.d.ts +0 -317
- package/dist/utils/mcp-response.d.ts.map +0 -1
- package/dist/utils/mcp-response.js +0 -270
- package/dist/utils/mcp-response.js.map +0 -1
- package/dist/utils/path-security.d.ts +0 -73
- package/dist/utils/path-security.d.ts.map +0 -1
- package/dist/utils/path-security.js +0 -389
- package/dist/utils/path-security.js.map +0 -1
- package/dist/utils/prisma-wrapper-factory.d.ts +0 -152
- package/dist/utils/prisma-wrapper-factory.d.ts.map +0 -1
- package/dist/utils/prisma-wrapper-factory.js +0 -124
- package/dist/utils/prisma-wrapper-factory.js.map +0 -1
- package/dist/utils/safe-parse-int.d.ts +0 -41
- package/dist/utils/safe-parse-int.d.ts.map +0 -1
- package/dist/utils/safe-parse-int.js +0 -49
- package/dist/utils/safe-parse-int.js.map +0 -1
- package/dist/utils/url-normalizer.d.ts +0 -38
- package/dist/utils/url-normalizer.d.ts.map +0 -1
- package/dist/utils/url-normalizer.js +0 -103
- package/dist/utils/url-normalizer.js.map +0 -1
- package/dist/utils/url-validator.d.ts +0 -86
- package/dist/utils/url-validator.d.ts.map +0 -1
- package/dist/utils/url-validator.js +0 -533
- package/dist/utils/url-validator.js.map +0 -1
- package/dist/workers/batch-quality-worker.d.ts +0 -87
- package/dist/workers/batch-quality-worker.d.ts.map +0 -1
- package/dist/workers/batch-quality-worker.js +0 -300
- package/dist/workers/batch-quality-worker.js.map +0 -1
- package/dist/workers/page-analyze-worker.d.ts +0 -63
- package/dist/workers/page-analyze-worker.d.ts.map +0 -1
- package/dist/workers/page-analyze-worker.js +0 -872
- package/dist/workers/page-analyze-worker.js.map +0 -1
- package/dist/workers/phases/phase-0-ingest.d.ts +0 -42
- package/dist/workers/phases/phase-0-ingest.d.ts.map +0 -1
- package/dist/workers/phases/phase-0-ingest.js +0 -197
- package/dist/workers/phases/phase-0-ingest.js.map +0 -1
- package/dist/workers/phases/phase-1-layout.d.ts +0 -63
- package/dist/workers/phases/phase-1-layout.d.ts.map +0 -1
- package/dist/workers/phases/phase-1-layout.js +0 -362
- package/dist/workers/phases/phase-1-layout.js.map +0 -1
- package/dist/workers/phases/phase-2-motion.d.ts +0 -93
- package/dist/workers/phases/phase-2-motion.d.ts.map +0 -1
- package/dist/workers/phases/phase-2-motion.js +0 -408
- package/dist/workers/phases/phase-2-motion.js.map +0 -1
- package/dist/workers/phases/phase-3-quality.d.ts +0 -61
- package/dist/workers/phases/phase-3-quality.d.ts.map +0 -1
- package/dist/workers/phases/phase-3-quality.js +0 -191
- package/dist/workers/phases/phase-3-quality.js.map +0 -1
- package/dist/workers/phases/phase-4-narrative.d.ts +0 -37
- package/dist/workers/phases/phase-4-narrative.d.ts.map +0 -1
- package/dist/workers/phases/phase-4-narrative.js +0 -309
- package/dist/workers/phases/phase-4-narrative.js.map +0 -1
- package/dist/workers/phases/phase-5-embedding.d.ts +0 -56
- package/dist/workers/phases/phase-5-embedding.d.ts.map +0 -1
- package/dist/workers/phases/phase-5-embedding.js +0 -1350
- package/dist/workers/phases/phase-5-embedding.js.map +0 -1
- package/dist/workers/phases/types.d.ts +0 -411
- package/dist/workers/phases/types.d.ts.map +0 -1
- package/dist/workers/phases/types.js +0 -540
- package/dist/workers/phases/types.js.map +0 -1
|
@@ -0,0 +1,1363 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 TKMD and Reftrix Contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* motion.search コード生成モジュール
|
|
6
|
+
* 9つのフォーマット(CSS, CSSModule, Tailwind, StyledComponents, Emotion, FramerMotion, GSAP, Three.js, Lottie)の
|
|
7
|
+
* コード生成関数を提供します。
|
|
8
|
+
*
|
|
9
|
+
* @module tools/motion/code-generators
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type {
|
|
13
|
+
MotionPatternInput,
|
|
14
|
+
ImplementationFormat,
|
|
15
|
+
ImplementationOptions,
|
|
16
|
+
ImplementationMetadata,
|
|
17
|
+
} from "./schemas";
|
|
18
|
+
|
|
19
|
+
// =====================================================
|
|
20
|
+
// 型定義
|
|
21
|
+
// =====================================================
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* コード生成結果インターフェース
|
|
25
|
+
*/
|
|
26
|
+
export interface GenerationResult {
|
|
27
|
+
code: string;
|
|
28
|
+
metadata: ImplementationMetadata;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// =====================================================
|
|
32
|
+
// ユーティリティ関数
|
|
33
|
+
// =====================================================
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* ミリ秒をCSS時間単位に変換
|
|
37
|
+
*/
|
|
38
|
+
export function formatDuration(ms: number): string {
|
|
39
|
+
if (ms >= 1000 && ms % 1000 === 0) {
|
|
40
|
+
return `${ms / 1000}s`;
|
|
41
|
+
}
|
|
42
|
+
return `${ms}ms`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* キーフレームのパーセンテージを計算
|
|
47
|
+
*/
|
|
48
|
+
function offsetToPercent(offset: number): string {
|
|
49
|
+
return `${Math.round(offset * 100)}%`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 行数をカウント
|
|
54
|
+
*/
|
|
55
|
+
function countLines(code: string): number {
|
|
56
|
+
return code.split("\n").length;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* PascalCaseに変換
|
|
61
|
+
*/
|
|
62
|
+
function toPascalCase(str: string): string {
|
|
63
|
+
return str.replace(/[-_](\w)/g, (_, c) => c.toUpperCase()).replace(/^\w/, (c) => c.toUpperCase());
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// =====================================================
|
|
67
|
+
// コード生成関数
|
|
68
|
+
// =====================================================
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* CSS生成
|
|
72
|
+
*/
|
|
73
|
+
function generateCSS(
|
|
74
|
+
pattern: MotionPatternInput,
|
|
75
|
+
options: ImplementationOptions
|
|
76
|
+
): GenerationResult {
|
|
77
|
+
const lines: string[] = [];
|
|
78
|
+
const selector = options.selector || ".animated";
|
|
79
|
+
const hasKeyframes = pattern.properties.some((p) => p.keyframes && p.keyframes.length > 0);
|
|
80
|
+
|
|
81
|
+
// @keyframes 生成
|
|
82
|
+
if (pattern.type !== "transition") {
|
|
83
|
+
lines.push(`@keyframes ${pattern.name} {`);
|
|
84
|
+
|
|
85
|
+
if (hasKeyframes) {
|
|
86
|
+
const allOffsets = new Set<number>();
|
|
87
|
+
pattern.properties.forEach((prop) => {
|
|
88
|
+
prop.keyframes?.forEach((kf) => allOffsets.add(kf.offset));
|
|
89
|
+
});
|
|
90
|
+
allOffsets.add(0);
|
|
91
|
+
allOffsets.add(1);
|
|
92
|
+
|
|
93
|
+
const sortedOffsets = Array.from(allOffsets).sort((a, b) => a - b);
|
|
94
|
+
|
|
95
|
+
for (const offset of sortedOffsets) {
|
|
96
|
+
lines.push(` ${offsetToPercent(offset)} {`);
|
|
97
|
+
for (const prop of pattern.properties) {
|
|
98
|
+
const kf = prop.keyframes?.find((k) => k.offset === offset);
|
|
99
|
+
if (kf) {
|
|
100
|
+
lines.push(` ${prop.name}: ${kf.value};`);
|
|
101
|
+
} else if (offset === 0) {
|
|
102
|
+
lines.push(` ${prop.name}: ${prop.from};`);
|
|
103
|
+
} else if (offset === 1) {
|
|
104
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
lines.push(" }");
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
lines.push(" from {");
|
|
111
|
+
for (const prop of pattern.properties) {
|
|
112
|
+
lines.push(` ${prop.name}: ${prop.from};`);
|
|
113
|
+
}
|
|
114
|
+
lines.push(" }");
|
|
115
|
+
lines.push(" to {");
|
|
116
|
+
for (const prop of pattern.properties) {
|
|
117
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
118
|
+
}
|
|
119
|
+
lines.push(" }");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
lines.push("}");
|
|
123
|
+
lines.push("");
|
|
124
|
+
|
|
125
|
+
// ベンダープレフィックス
|
|
126
|
+
if (options.includeVendorPrefixes) {
|
|
127
|
+
lines.push(`@-webkit-keyframes ${pattern.name} {`);
|
|
128
|
+
if (hasKeyframes) {
|
|
129
|
+
const allOffsets = new Set<number>();
|
|
130
|
+
pattern.properties.forEach((prop) => {
|
|
131
|
+
prop.keyframes?.forEach((kf) => allOffsets.add(kf.offset));
|
|
132
|
+
});
|
|
133
|
+
allOffsets.add(0);
|
|
134
|
+
allOffsets.add(1);
|
|
135
|
+
|
|
136
|
+
const sortedOffsets = Array.from(allOffsets).sort((a, b) => a - b);
|
|
137
|
+
|
|
138
|
+
for (const offset of sortedOffsets) {
|
|
139
|
+
lines.push(` ${offsetToPercent(offset)} {`);
|
|
140
|
+
for (const prop of pattern.properties) {
|
|
141
|
+
const kf = prop.keyframes?.find((k) => k.offset === offset);
|
|
142
|
+
if (kf) {
|
|
143
|
+
lines.push(` ${prop.name}: ${kf.value};`);
|
|
144
|
+
} else if (offset === 0) {
|
|
145
|
+
lines.push(` ${prop.name}: ${prop.from};`);
|
|
146
|
+
} else if (offset === 1) {
|
|
147
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
lines.push(" }");
|
|
151
|
+
}
|
|
152
|
+
} else {
|
|
153
|
+
lines.push(" from {");
|
|
154
|
+
for (const prop of pattern.properties) {
|
|
155
|
+
lines.push(` ${prop.name}: ${prop.from};`);
|
|
156
|
+
}
|
|
157
|
+
lines.push(" }");
|
|
158
|
+
lines.push(" to {");
|
|
159
|
+
for (const prop of pattern.properties) {
|
|
160
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
161
|
+
}
|
|
162
|
+
lines.push(" }");
|
|
163
|
+
}
|
|
164
|
+
lines.push("}");
|
|
165
|
+
lines.push("");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// セレクタルール
|
|
170
|
+
lines.push(`${selector} {`);
|
|
171
|
+
|
|
172
|
+
if (pattern.type === "transition") {
|
|
173
|
+
const props = pattern.properties.map((p) => p.name).join(", ");
|
|
174
|
+
lines.push(` transition: ${props} ${formatDuration(pattern.duration)} ${pattern.easing};`);
|
|
175
|
+
if (options.includeVendorPrefixes) {
|
|
176
|
+
lines.push(
|
|
177
|
+
` -webkit-transition: ${props} ${formatDuration(pattern.duration)} ${pattern.easing};`
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
} else {
|
|
181
|
+
const iterations = pattern.iterations === "infinite" ? "infinite" : pattern.iterations;
|
|
182
|
+
const animationValue = [
|
|
183
|
+
pattern.name,
|
|
184
|
+
formatDuration(pattern.duration),
|
|
185
|
+
pattern.easing,
|
|
186
|
+
pattern.delay > 0 ? formatDuration(pattern.delay) : null,
|
|
187
|
+
iterations !== 1 ? iterations : null,
|
|
188
|
+
pattern.direction !== "normal" ? pattern.direction : null,
|
|
189
|
+
pattern.fillMode !== "none" ? pattern.fillMode : null,
|
|
190
|
+
]
|
|
191
|
+
.filter(Boolean)
|
|
192
|
+
.join(" ");
|
|
193
|
+
|
|
194
|
+
lines.push(` animation: ${animationValue};`);
|
|
195
|
+
if (options.includeVendorPrefixes) {
|
|
196
|
+
lines.push(` -webkit-animation: ${animationValue};`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
lines.push("}");
|
|
201
|
+
|
|
202
|
+
// hover/scroll タイプの追加ルール
|
|
203
|
+
if (pattern.type === "hover") {
|
|
204
|
+
lines.push("");
|
|
205
|
+
lines.push(`${selector}:hover {`);
|
|
206
|
+
for (const prop of pattern.properties) {
|
|
207
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
208
|
+
}
|
|
209
|
+
lines.push("}");
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// prefers-reduced-motion
|
|
213
|
+
if (options.includeReducedMotion) {
|
|
214
|
+
lines.push("");
|
|
215
|
+
lines.push("@media (prefers-reduced-motion: reduce) {");
|
|
216
|
+
lines.push(` ${selector} {`);
|
|
217
|
+
if (pattern.type === "transition") {
|
|
218
|
+
lines.push(" transition: none;");
|
|
219
|
+
} else {
|
|
220
|
+
lines.push(" animation: none;");
|
|
221
|
+
}
|
|
222
|
+
lines.push(" }");
|
|
223
|
+
lines.push("}");
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const code = lines.join("\n");
|
|
227
|
+
|
|
228
|
+
return {
|
|
229
|
+
code,
|
|
230
|
+
metadata: {
|
|
231
|
+
linesOfCode: countLines(code),
|
|
232
|
+
hasKeyframes: pattern.type !== "transition",
|
|
233
|
+
hasReducedMotion: options.includeReducedMotion ?? true,
|
|
234
|
+
dependencies: [],
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* CSS Module生成
|
|
241
|
+
*/
|
|
242
|
+
function generateCSSModule(
|
|
243
|
+
pattern: MotionPatternInput,
|
|
244
|
+
options: ImplementationOptions
|
|
245
|
+
): GenerationResult {
|
|
246
|
+
const result = generateCSS(pattern, {
|
|
247
|
+
...options,
|
|
248
|
+
selector: `.${pattern.name}`,
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
return {
|
|
252
|
+
...result,
|
|
253
|
+
metadata: {
|
|
254
|
+
...result.metadata,
|
|
255
|
+
dependencies: [],
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Tailwind生成
|
|
262
|
+
*/
|
|
263
|
+
function generateTailwind(
|
|
264
|
+
pattern: MotionPatternInput,
|
|
265
|
+
options: ImplementationOptions
|
|
266
|
+
): GenerationResult {
|
|
267
|
+
const lines: string[] = [];
|
|
268
|
+
|
|
269
|
+
lines.push("/* Add to tailwind.config.js */");
|
|
270
|
+
lines.push("module.exports = {");
|
|
271
|
+
lines.push(" theme: {");
|
|
272
|
+
lines.push(" extend: {");
|
|
273
|
+
|
|
274
|
+
lines.push(" animation: {");
|
|
275
|
+
const iterations = pattern.iterations === "infinite" ? "infinite" : "";
|
|
276
|
+
const direction = pattern.direction !== "normal" ? pattern.direction : "";
|
|
277
|
+
lines.push(
|
|
278
|
+
` '${pattern.name}': '${pattern.name} ${formatDuration(pattern.duration)} ${pattern.easing} ${iterations} ${direction}'.trim(),`
|
|
279
|
+
);
|
|
280
|
+
lines.push(" },");
|
|
281
|
+
|
|
282
|
+
lines.push(" keyframes: {");
|
|
283
|
+
lines.push(` '${pattern.name}': {`);
|
|
284
|
+
|
|
285
|
+
if (pattern.properties.some((p) => p.keyframes && p.keyframes.length > 0)) {
|
|
286
|
+
const allOffsets = new Set<number>();
|
|
287
|
+
pattern.properties.forEach((prop) => {
|
|
288
|
+
prop.keyframes?.forEach((kf) => allOffsets.add(kf.offset));
|
|
289
|
+
});
|
|
290
|
+
allOffsets.add(0);
|
|
291
|
+
allOffsets.add(1);
|
|
292
|
+
|
|
293
|
+
const sortedOffsets = Array.from(allOffsets).sort((a, b) => a - b);
|
|
294
|
+
|
|
295
|
+
for (const offset of sortedOffsets) {
|
|
296
|
+
lines.push(` '${offsetToPercent(offset)}': {`);
|
|
297
|
+
for (const prop of pattern.properties) {
|
|
298
|
+
const kf = prop.keyframes?.find((k) => k.offset === offset);
|
|
299
|
+
if (kf) {
|
|
300
|
+
lines.push(` ${prop.name}: '${kf.value}',`);
|
|
301
|
+
} else if (offset === 0) {
|
|
302
|
+
lines.push(` ${prop.name}: '${prop.from}',`);
|
|
303
|
+
} else if (offset === 1) {
|
|
304
|
+
lines.push(` ${prop.name}: '${prop.to}',`);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
lines.push(" },");
|
|
308
|
+
}
|
|
309
|
+
} else {
|
|
310
|
+
lines.push(" '0%': {");
|
|
311
|
+
for (const prop of pattern.properties) {
|
|
312
|
+
lines.push(` ${prop.name}: '${prop.from}',`);
|
|
313
|
+
}
|
|
314
|
+
lines.push(" },");
|
|
315
|
+
lines.push(" '100%': {");
|
|
316
|
+
for (const prop of pattern.properties) {
|
|
317
|
+
lines.push(` ${prop.name}: '${prop.to}',`);
|
|
318
|
+
}
|
|
319
|
+
lines.push(" },");
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
lines.push(" },");
|
|
323
|
+
lines.push(" },");
|
|
324
|
+
lines.push(" },");
|
|
325
|
+
lines.push(" },");
|
|
326
|
+
lines.push("};");
|
|
327
|
+
lines.push("");
|
|
328
|
+
lines.push("/* Usage in JSX */");
|
|
329
|
+
lines.push(`<div className="animate-${pattern.name}">Content</div>`);
|
|
330
|
+
|
|
331
|
+
if (options.includeReducedMotion) {
|
|
332
|
+
lines.push("");
|
|
333
|
+
lines.push("/* For reduced motion support */");
|
|
334
|
+
lines.push(`<div className="animate-${pattern.name} motion-reduce:animate-none">Content</div>`);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const code = lines.join("\n");
|
|
338
|
+
|
|
339
|
+
return {
|
|
340
|
+
code,
|
|
341
|
+
metadata: {
|
|
342
|
+
linesOfCode: countLines(code),
|
|
343
|
+
hasKeyframes: true,
|
|
344
|
+
hasReducedMotion: options.includeReducedMotion ?? true,
|
|
345
|
+
dependencies: ["tailwindcss"],
|
|
346
|
+
},
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* styled-components生成
|
|
352
|
+
*/
|
|
353
|
+
function generateStyledComponents(
|
|
354
|
+
pattern: MotionPatternInput,
|
|
355
|
+
options: ImplementationOptions
|
|
356
|
+
): GenerationResult {
|
|
357
|
+
const lines: string[] = [];
|
|
358
|
+
const componentName = options.componentName || toPascalCase(pattern.name) + "Animation";
|
|
359
|
+
const ts = options.typescript ?? true;
|
|
360
|
+
|
|
361
|
+
lines.push("import styled, { keyframes } from 'styled-components';");
|
|
362
|
+
if (ts) {
|
|
363
|
+
lines.push("import type { FC, ReactNode } from 'react';");
|
|
364
|
+
}
|
|
365
|
+
lines.push("");
|
|
366
|
+
|
|
367
|
+
lines.push(`const ${pattern.name}Keyframes = keyframes\``);
|
|
368
|
+
|
|
369
|
+
if (pattern.properties.some((p) => p.keyframes && p.keyframes.length > 0)) {
|
|
370
|
+
const allOffsets = new Set<number>();
|
|
371
|
+
pattern.properties.forEach((prop) => {
|
|
372
|
+
prop.keyframes?.forEach((kf) => allOffsets.add(kf.offset));
|
|
373
|
+
});
|
|
374
|
+
allOffsets.add(0);
|
|
375
|
+
allOffsets.add(1);
|
|
376
|
+
|
|
377
|
+
const sortedOffsets = Array.from(allOffsets).sort((a, b) => a - b);
|
|
378
|
+
|
|
379
|
+
for (const offset of sortedOffsets) {
|
|
380
|
+
lines.push(` ${offsetToPercent(offset)} {`);
|
|
381
|
+
for (const prop of pattern.properties) {
|
|
382
|
+
const kf = prop.keyframes?.find((k) => k.offset === offset);
|
|
383
|
+
if (kf) {
|
|
384
|
+
lines.push(` ${prop.name}: ${kf.value};`);
|
|
385
|
+
} else if (offset === 0) {
|
|
386
|
+
lines.push(` ${prop.name}: ${prop.from};`);
|
|
387
|
+
} else if (offset === 1) {
|
|
388
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
lines.push(" }");
|
|
392
|
+
}
|
|
393
|
+
} else {
|
|
394
|
+
lines.push(" from {");
|
|
395
|
+
for (const prop of pattern.properties) {
|
|
396
|
+
lines.push(` ${prop.name}: ${prop.from};`);
|
|
397
|
+
}
|
|
398
|
+
lines.push(" }");
|
|
399
|
+
lines.push(" to {");
|
|
400
|
+
for (const prop of pattern.properties) {
|
|
401
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
402
|
+
}
|
|
403
|
+
lines.push(" }");
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
lines.push("`;");
|
|
407
|
+
lines.push("");
|
|
408
|
+
|
|
409
|
+
const iterationsVal = pattern.iterations === "infinite" ? "infinite" : pattern.iterations;
|
|
410
|
+
const directionVal = pattern.direction !== "normal" ? pattern.direction : "";
|
|
411
|
+
const fillModeVal = pattern.fillMode !== "none" ? pattern.fillMode : "";
|
|
412
|
+
|
|
413
|
+
lines.push(`const ${componentName}Container = styled.div\``);
|
|
414
|
+
lines.push(
|
|
415
|
+
` animation: \${${pattern.name}Keyframes} ${formatDuration(pattern.duration)} ${pattern.easing}${pattern.delay > 0 ? ` ${formatDuration(pattern.delay)}` : ""}${iterationsVal !== 1 ? ` ${iterationsVal}` : ""}${directionVal ? ` ${directionVal}` : ""}${fillModeVal ? ` ${fillModeVal}` : ""};`
|
|
416
|
+
);
|
|
417
|
+
|
|
418
|
+
if (options.includeReducedMotion) {
|
|
419
|
+
lines.push("");
|
|
420
|
+
lines.push(" @media (prefers-reduced-motion: reduce) {");
|
|
421
|
+
lines.push(" animation: none;");
|
|
422
|
+
lines.push(" }");
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
lines.push("`;");
|
|
426
|
+
lines.push("");
|
|
427
|
+
|
|
428
|
+
if (ts) {
|
|
429
|
+
lines.push(`interface ${componentName}Props {`);
|
|
430
|
+
lines.push(" children: ReactNode;");
|
|
431
|
+
lines.push(" className?: string;");
|
|
432
|
+
lines.push("}");
|
|
433
|
+
lines.push("");
|
|
434
|
+
lines.push(
|
|
435
|
+
`export const ${componentName}: FC<${componentName}Props> = ({ children, className }) => {`
|
|
436
|
+
);
|
|
437
|
+
} else {
|
|
438
|
+
lines.push(`export const ${componentName} = ({ children, className }) => {`);
|
|
439
|
+
}
|
|
440
|
+
lines.push(
|
|
441
|
+
` return <${componentName}Container className={className}>{children}</${componentName}Container>;`
|
|
442
|
+
);
|
|
443
|
+
lines.push("};");
|
|
444
|
+
|
|
445
|
+
const code = lines.join("\n");
|
|
446
|
+
|
|
447
|
+
return {
|
|
448
|
+
code,
|
|
449
|
+
metadata: {
|
|
450
|
+
linesOfCode: countLines(code),
|
|
451
|
+
hasKeyframes: true,
|
|
452
|
+
hasReducedMotion: options.includeReducedMotion ?? true,
|
|
453
|
+
dependencies: ["styled-components"],
|
|
454
|
+
},
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Emotion生成
|
|
460
|
+
*/
|
|
461
|
+
function generateEmotion(
|
|
462
|
+
pattern: MotionPatternInput,
|
|
463
|
+
options: ImplementationOptions
|
|
464
|
+
): GenerationResult {
|
|
465
|
+
const lines: string[] = [];
|
|
466
|
+
const componentName = options.componentName || toPascalCase(pattern.name) + "Animation";
|
|
467
|
+
const ts = options.typescript ?? true;
|
|
468
|
+
|
|
469
|
+
lines.push("/** @jsxImportSource @emotion/react */");
|
|
470
|
+
lines.push("import { css, keyframes } from '@emotion/react';");
|
|
471
|
+
if (ts) {
|
|
472
|
+
lines.push("import type { FC, ReactNode } from 'react';");
|
|
473
|
+
}
|
|
474
|
+
lines.push("");
|
|
475
|
+
|
|
476
|
+
lines.push(`const ${pattern.name}Keyframes = keyframes\``);
|
|
477
|
+
|
|
478
|
+
if (pattern.properties.some((p) => p.keyframes && p.keyframes.length > 0)) {
|
|
479
|
+
const allOffsets = new Set<number>();
|
|
480
|
+
pattern.properties.forEach((prop) => {
|
|
481
|
+
prop.keyframes?.forEach((kf) => allOffsets.add(kf.offset));
|
|
482
|
+
});
|
|
483
|
+
allOffsets.add(0);
|
|
484
|
+
allOffsets.add(1);
|
|
485
|
+
|
|
486
|
+
const sortedOffsets = Array.from(allOffsets).sort((a, b) => a - b);
|
|
487
|
+
|
|
488
|
+
for (const offset of sortedOffsets) {
|
|
489
|
+
lines.push(` ${offsetToPercent(offset)} {`);
|
|
490
|
+
for (const prop of pattern.properties) {
|
|
491
|
+
const kf = prop.keyframes?.find((k) => k.offset === offset);
|
|
492
|
+
if (kf) {
|
|
493
|
+
lines.push(` ${prop.name}: ${kf.value};`);
|
|
494
|
+
} else if (offset === 0) {
|
|
495
|
+
lines.push(` ${prop.name}: ${prop.from};`);
|
|
496
|
+
} else if (offset === 1) {
|
|
497
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
lines.push(" }");
|
|
501
|
+
}
|
|
502
|
+
} else {
|
|
503
|
+
lines.push(" from {");
|
|
504
|
+
for (const prop of pattern.properties) {
|
|
505
|
+
lines.push(` ${prop.name}: ${prop.from};`);
|
|
506
|
+
}
|
|
507
|
+
lines.push(" }");
|
|
508
|
+
lines.push(" to {");
|
|
509
|
+
for (const prop of pattern.properties) {
|
|
510
|
+
lines.push(` ${prop.name}: ${prop.to};`);
|
|
511
|
+
}
|
|
512
|
+
lines.push(" }");
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
lines.push("`;");
|
|
516
|
+
lines.push("");
|
|
517
|
+
|
|
518
|
+
const iterationsVal = pattern.iterations === "infinite" ? "infinite" : pattern.iterations;
|
|
519
|
+
const directionVal = pattern.direction !== "normal" ? pattern.direction : "";
|
|
520
|
+
const fillModeVal = pattern.fillMode !== "none" ? pattern.fillMode : "";
|
|
521
|
+
|
|
522
|
+
lines.push(`const ${pattern.name}Style = css\``);
|
|
523
|
+
lines.push(
|
|
524
|
+
` animation: \${${pattern.name}Keyframes} ${formatDuration(pattern.duration)} ${pattern.easing}${pattern.delay > 0 ? ` ${formatDuration(pattern.delay)}` : ""}${iterationsVal !== 1 ? ` ${iterationsVal}` : ""}${directionVal ? ` ${directionVal}` : ""}${fillModeVal ? ` ${fillModeVal}` : ""};`
|
|
525
|
+
);
|
|
526
|
+
|
|
527
|
+
if (options.includeReducedMotion) {
|
|
528
|
+
lines.push("");
|
|
529
|
+
lines.push(" @media (prefers-reduced-motion: reduce) {");
|
|
530
|
+
lines.push(" animation: none;");
|
|
531
|
+
lines.push(" }");
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
lines.push("`;");
|
|
535
|
+
lines.push("");
|
|
536
|
+
|
|
537
|
+
if (ts) {
|
|
538
|
+
lines.push(`interface ${componentName}Props {`);
|
|
539
|
+
lines.push(" children: ReactNode;");
|
|
540
|
+
lines.push(" className?: string;");
|
|
541
|
+
lines.push("}");
|
|
542
|
+
lines.push("");
|
|
543
|
+
lines.push(
|
|
544
|
+
`export const ${componentName}: FC<${componentName}Props> = ({ children, className }) => {`
|
|
545
|
+
);
|
|
546
|
+
} else {
|
|
547
|
+
lines.push(`export const ${componentName} = ({ children, className }) => {`);
|
|
548
|
+
}
|
|
549
|
+
lines.push(` return <div css={${pattern.name}Style} className={className}>{children}</div>;`);
|
|
550
|
+
lines.push("};");
|
|
551
|
+
|
|
552
|
+
const code = lines.join("\n");
|
|
553
|
+
|
|
554
|
+
return {
|
|
555
|
+
code,
|
|
556
|
+
metadata: {
|
|
557
|
+
linesOfCode: countLines(code),
|
|
558
|
+
hasKeyframes: true,
|
|
559
|
+
hasReducedMotion: options.includeReducedMotion ?? true,
|
|
560
|
+
dependencies: ["@emotion/react"],
|
|
561
|
+
},
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Framer Motion生成
|
|
567
|
+
*/
|
|
568
|
+
function generateFramerMotion(
|
|
569
|
+
pattern: MotionPatternInput,
|
|
570
|
+
options: ImplementationOptions
|
|
571
|
+
): GenerationResult {
|
|
572
|
+
const lines: string[] = [];
|
|
573
|
+
const componentName = options.componentName || toPascalCase(pattern.name) + "Motion";
|
|
574
|
+
const ts = options.typescript ?? true;
|
|
575
|
+
const isScroll = pattern.type === "scroll";
|
|
576
|
+
|
|
577
|
+
lines.push("import { motion } from 'framer-motion';");
|
|
578
|
+
if (ts) {
|
|
579
|
+
lines.push("import type { FC, ReactNode } from 'react';");
|
|
580
|
+
}
|
|
581
|
+
lines.push("");
|
|
582
|
+
|
|
583
|
+
lines.push(`const ${pattern.name}Variants = {`);
|
|
584
|
+
lines.push(" initial: {");
|
|
585
|
+
for (const prop of pattern.properties) {
|
|
586
|
+
const cssName = prop.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
587
|
+
lines.push(` ${cssName}: ${JSON.stringify(prop.from)},`);
|
|
588
|
+
}
|
|
589
|
+
lines.push(" },");
|
|
590
|
+
lines.push(" animate: {");
|
|
591
|
+
for (const prop of pattern.properties) {
|
|
592
|
+
const cssName = prop.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
593
|
+
lines.push(` ${cssName}: ${JSON.stringify(prop.to)},`);
|
|
594
|
+
}
|
|
595
|
+
lines.push(" },");
|
|
596
|
+
lines.push("};");
|
|
597
|
+
lines.push("");
|
|
598
|
+
|
|
599
|
+
lines.push(`const ${pattern.name}Transition = {`);
|
|
600
|
+
lines.push(` duration: ${pattern.duration / 1000},`);
|
|
601
|
+
lines.push(` ease: ${JSON.stringify(pattern.easing)},`);
|
|
602
|
+
if (pattern.delay > 0) {
|
|
603
|
+
lines.push(` delay: ${pattern.delay / 1000},`);
|
|
604
|
+
}
|
|
605
|
+
if (pattern.iterations === "infinite") {
|
|
606
|
+
lines.push(" repeat: Infinity,");
|
|
607
|
+
} else if (pattern.iterations > 1) {
|
|
608
|
+
lines.push(` repeat: ${pattern.iterations - 1},`);
|
|
609
|
+
}
|
|
610
|
+
if (pattern.direction === "alternate" || pattern.direction === "alternate-reverse") {
|
|
611
|
+
lines.push(" repeatType: 'reverse',");
|
|
612
|
+
}
|
|
613
|
+
lines.push("};");
|
|
614
|
+
lines.push("");
|
|
615
|
+
|
|
616
|
+
if (ts) {
|
|
617
|
+
lines.push(`interface ${componentName}Props {`);
|
|
618
|
+
lines.push(" children: ReactNode;");
|
|
619
|
+
lines.push(" className?: string;");
|
|
620
|
+
lines.push("}");
|
|
621
|
+
lines.push("");
|
|
622
|
+
lines.push(
|
|
623
|
+
`export const ${componentName}: FC<${componentName}Props> = ({ children, className }) => {`
|
|
624
|
+
);
|
|
625
|
+
} else {
|
|
626
|
+
lines.push(`export const ${componentName} = ({ children, className }) => {`);
|
|
627
|
+
}
|
|
628
|
+
lines.push(" return (");
|
|
629
|
+
lines.push(" <motion.div");
|
|
630
|
+
lines.push(` variants={${pattern.name}Variants}`);
|
|
631
|
+
lines.push(' initial="initial"');
|
|
632
|
+
|
|
633
|
+
if (isScroll) {
|
|
634
|
+
lines.push(' whileInView="animate"');
|
|
635
|
+
lines.push(" viewport={{ once: true }}");
|
|
636
|
+
} else {
|
|
637
|
+
lines.push(' animate="animate"');
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
lines.push(` transition={${pattern.name}Transition}`);
|
|
641
|
+
lines.push(" className={className}");
|
|
642
|
+
lines.push(" >");
|
|
643
|
+
lines.push(" {children}");
|
|
644
|
+
lines.push(" </motion.div>");
|
|
645
|
+
lines.push(" );");
|
|
646
|
+
lines.push("};");
|
|
647
|
+
|
|
648
|
+
if (options.includeReducedMotion) {
|
|
649
|
+
lines.push("");
|
|
650
|
+
lines.push("/* Note: Framer Motion automatically respects prefers-reduced-motion */");
|
|
651
|
+
lines.push(
|
|
652
|
+
'/* Set reducedMotion="user" in AnimatePresence or MotionConfig for custom handling */'
|
|
653
|
+
);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
const code = lines.join("\n");
|
|
657
|
+
|
|
658
|
+
return {
|
|
659
|
+
code,
|
|
660
|
+
metadata: {
|
|
661
|
+
linesOfCode: countLines(code),
|
|
662
|
+
hasKeyframes: false,
|
|
663
|
+
hasReducedMotion: options.includeReducedMotion ?? true,
|
|
664
|
+
dependencies: ["framer-motion"],
|
|
665
|
+
},
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* GSAP生成
|
|
671
|
+
*/
|
|
672
|
+
function generateGSAP(
|
|
673
|
+
pattern: MotionPatternInput,
|
|
674
|
+
options: ImplementationOptions
|
|
675
|
+
): GenerationResult {
|
|
676
|
+
const lines: string[] = [];
|
|
677
|
+
const componentName = options.componentName || toPascalCase(pattern.name) + "GSAP";
|
|
678
|
+
const ts = options.typescript ?? true;
|
|
679
|
+
const isScroll = pattern.type === "scroll";
|
|
680
|
+
|
|
681
|
+
lines.push("import { gsap } from 'gsap';");
|
|
682
|
+
if (isScroll) {
|
|
683
|
+
lines.push("import { ScrollTrigger } from 'gsap/ScrollTrigger';");
|
|
684
|
+
lines.push("");
|
|
685
|
+
lines.push("gsap.registerPlugin(ScrollTrigger);");
|
|
686
|
+
}
|
|
687
|
+
if (ts) {
|
|
688
|
+
lines.push("import { useRef, useEffect } from 'react';");
|
|
689
|
+
lines.push("import type { FC, ReactNode } from 'react';");
|
|
690
|
+
} else {
|
|
691
|
+
lines.push("import { useRef, useEffect } from 'react';");
|
|
692
|
+
}
|
|
693
|
+
lines.push("");
|
|
694
|
+
|
|
695
|
+
lines.push(
|
|
696
|
+
`const use${toPascalCase(pattern.name)}Animation = (ref${ts ? ": React.RefObject<HTMLDivElement>" : ""}) => {`
|
|
697
|
+
);
|
|
698
|
+
lines.push(" useEffect(() => {");
|
|
699
|
+
lines.push(" if (!ref.current) return;");
|
|
700
|
+
lines.push("");
|
|
701
|
+
|
|
702
|
+
const toProps: string[] = [];
|
|
703
|
+
for (const prop of pattern.properties) {
|
|
704
|
+
const propName = prop.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
705
|
+
toProps.push(` ${propName}: ${JSON.stringify(prop.to)}`);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
const fromProps: string[] = [];
|
|
709
|
+
for (const prop of pattern.properties) {
|
|
710
|
+
const propName = prop.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
711
|
+
fromProps.push(` ${propName}: ${JSON.stringify(prop.from)}`);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
lines.push(" const animation = gsap.fromTo(");
|
|
715
|
+
lines.push(" ref.current,");
|
|
716
|
+
lines.push(" {");
|
|
717
|
+
lines.push(fromProps.join(",\n"));
|
|
718
|
+
lines.push(" },");
|
|
719
|
+
lines.push(" {");
|
|
720
|
+
lines.push(toProps.join(",\n") + ",");
|
|
721
|
+
lines.push(` duration: ${pattern.duration / 1000},`);
|
|
722
|
+
lines.push(` ease: ${JSON.stringify(pattern.easing)},`);
|
|
723
|
+
if (pattern.delay > 0) {
|
|
724
|
+
lines.push(` delay: ${pattern.delay / 1000},`);
|
|
725
|
+
}
|
|
726
|
+
if (pattern.iterations === "infinite") {
|
|
727
|
+
lines.push(" repeat: -1,");
|
|
728
|
+
} else if (pattern.iterations > 1) {
|
|
729
|
+
lines.push(` repeat: ${pattern.iterations - 1},`);
|
|
730
|
+
}
|
|
731
|
+
if (pattern.direction === "alternate" || pattern.direction === "alternate-reverse") {
|
|
732
|
+
lines.push(" yoyo: true,");
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
if (isScroll) {
|
|
736
|
+
lines.push(" scrollTrigger: {");
|
|
737
|
+
lines.push(" trigger: ref.current,");
|
|
738
|
+
lines.push(" start: 'top 80%',");
|
|
739
|
+
lines.push(" end: 'bottom 20%',");
|
|
740
|
+
lines.push(" toggleActions: 'play none none reverse',");
|
|
741
|
+
lines.push(" },");
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
lines.push(" }");
|
|
745
|
+
lines.push(" );");
|
|
746
|
+
lines.push("");
|
|
747
|
+
lines.push(" return () => {");
|
|
748
|
+
lines.push(" animation.kill();");
|
|
749
|
+
lines.push(" };");
|
|
750
|
+
lines.push(" }, [ref]);");
|
|
751
|
+
lines.push("};");
|
|
752
|
+
lines.push("");
|
|
753
|
+
|
|
754
|
+
if (ts) {
|
|
755
|
+
lines.push(`interface ${componentName}Props {`);
|
|
756
|
+
lines.push(" children: ReactNode;");
|
|
757
|
+
lines.push(" className?: string;");
|
|
758
|
+
lines.push("}");
|
|
759
|
+
lines.push("");
|
|
760
|
+
lines.push(
|
|
761
|
+
`export const ${componentName}: FC<${componentName}Props> = ({ children, className }) => {`
|
|
762
|
+
);
|
|
763
|
+
} else {
|
|
764
|
+
lines.push(`export const ${componentName} = ({ children, className }) => {`);
|
|
765
|
+
}
|
|
766
|
+
lines.push(` const ref = useRef${ts ? "<HTMLDivElement>" : ""}(null);`);
|
|
767
|
+
lines.push(` use${toPascalCase(pattern.name)}Animation(ref);`);
|
|
768
|
+
lines.push("");
|
|
769
|
+
lines.push(" return (");
|
|
770
|
+
lines.push(" <div ref={ref} className={className}>");
|
|
771
|
+
lines.push(" {children}");
|
|
772
|
+
lines.push(" </div>");
|
|
773
|
+
lines.push(" );");
|
|
774
|
+
lines.push("};");
|
|
775
|
+
|
|
776
|
+
if (options.includeReducedMotion) {
|
|
777
|
+
lines.push("");
|
|
778
|
+
lines.push("/* Add reduced motion check */");
|
|
779
|
+
lines.push(
|
|
780
|
+
'// const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;'
|
|
781
|
+
);
|
|
782
|
+
lines.push("// if (prefersReducedMotion) return;");
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
const code = lines.join("\n");
|
|
786
|
+
const dependencies = isScroll ? ["gsap", "gsap/ScrollTrigger"] : ["gsap"];
|
|
787
|
+
|
|
788
|
+
return {
|
|
789
|
+
code,
|
|
790
|
+
metadata: {
|
|
791
|
+
linesOfCode: countLines(code),
|
|
792
|
+
hasKeyframes: false,
|
|
793
|
+
hasReducedMotion: options.includeReducedMotion ?? true,
|
|
794
|
+
dependencies,
|
|
795
|
+
},
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Three.js (React Three Fiber) 生成
|
|
801
|
+
*
|
|
802
|
+
* @react-three/fiber を使用した3Dアニメーションコードを生成
|
|
803
|
+
* - useFrame によるアニメーションループ
|
|
804
|
+
* - scroll-driven アニメーション対応
|
|
805
|
+
* - TypeScript 型定義付き
|
|
806
|
+
*/
|
|
807
|
+
function generateThreeJS(
|
|
808
|
+
pattern: MotionPatternInput,
|
|
809
|
+
options: ImplementationOptions
|
|
810
|
+
): GenerationResult {
|
|
811
|
+
const lines: string[] = [];
|
|
812
|
+
const componentName = options.componentName || toPascalCase(pattern.name) + "Scene";
|
|
813
|
+
const ts = options.typescript ?? true;
|
|
814
|
+
const isScroll = pattern.type === "scroll";
|
|
815
|
+
|
|
816
|
+
// Imports
|
|
817
|
+
lines.push("import { useRef } from 'react';");
|
|
818
|
+
lines.push("import { Canvas, useFrame } from '@react-three/fiber';");
|
|
819
|
+
if (isScroll) {
|
|
820
|
+
lines.push("import { useScroll } from '@react-three/drei';");
|
|
821
|
+
}
|
|
822
|
+
if (ts) {
|
|
823
|
+
lines.push("import type { FC } from 'react';");
|
|
824
|
+
lines.push("import type { Mesh, Group } from 'three';");
|
|
825
|
+
}
|
|
826
|
+
lines.push("");
|
|
827
|
+
|
|
828
|
+
// Extract animation properties and convert to Three.js-compatible values
|
|
829
|
+
const positionProps = pattern.properties.filter((p) =>
|
|
830
|
+
["translateX", "translateY", "translateZ", "x", "y", "z"].includes(p.name)
|
|
831
|
+
);
|
|
832
|
+
const rotationProps = pattern.properties.filter((p) =>
|
|
833
|
+
["rotateX", "rotateY", "rotateZ", "rotate"].includes(p.name)
|
|
834
|
+
);
|
|
835
|
+
const scaleProps = pattern.properties.filter((p) =>
|
|
836
|
+
["scale", "scaleX", "scaleY", "scaleZ"].includes(p.name)
|
|
837
|
+
);
|
|
838
|
+
const opacityProps = pattern.properties.filter((p) => ["opacity"].includes(p.name));
|
|
839
|
+
|
|
840
|
+
// Helper function name
|
|
841
|
+
const animatedObjectName = toPascalCase(pattern.name) + "Object";
|
|
842
|
+
|
|
843
|
+
// Animated Object Component
|
|
844
|
+
if (ts) {
|
|
845
|
+
lines.push(`interface ${animatedObjectName}Props {`);
|
|
846
|
+
lines.push(" children?: React.ReactNode;");
|
|
847
|
+
lines.push("}");
|
|
848
|
+
lines.push("");
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
lines.push(
|
|
852
|
+
`const ${animatedObjectName}${ts ? `: FC<${animatedObjectName}Props>` : ""} = ({ children }) => {`
|
|
853
|
+
);
|
|
854
|
+
lines.push(` const meshRef = useRef${ts ? "<Mesh>" : ""}(null);`);
|
|
855
|
+
|
|
856
|
+
if (isScroll) {
|
|
857
|
+
lines.push(" const scroll = useScroll();");
|
|
858
|
+
lines.push("");
|
|
859
|
+
lines.push(" useFrame(() => {");
|
|
860
|
+
lines.push(" if (!meshRef.current) return;");
|
|
861
|
+
lines.push(" const progress = scroll.offset;");
|
|
862
|
+
} else {
|
|
863
|
+
lines.push(` const duration = ${pattern.duration / 1000}; // seconds`);
|
|
864
|
+
lines.push(` const startTime = useRef${ts ? "<number>" : ""}(0);`);
|
|
865
|
+
lines.push("");
|
|
866
|
+
lines.push(" useFrame((state) => {");
|
|
867
|
+
lines.push(" if (!meshRef.current) return;");
|
|
868
|
+
lines.push(" if (startTime.current === 0) startTime.current = state.clock.elapsedTime;");
|
|
869
|
+
lines.push("");
|
|
870
|
+
lines.push(" const elapsed = state.clock.elapsedTime - startTime.current;");
|
|
871
|
+
if (pattern.iterations === "infinite") {
|
|
872
|
+
lines.push(" const progress = (elapsed % duration) / duration;");
|
|
873
|
+
} else {
|
|
874
|
+
lines.push(" const progress = Math.min(elapsed / duration, 1);");
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
lines.push("");
|
|
879
|
+
|
|
880
|
+
// Apply easing
|
|
881
|
+
lines.push(" // Apply easing function");
|
|
882
|
+
lines.push(
|
|
883
|
+
` const eased = ease${toPascalCase(pattern.easing.replace(/[^a-zA-Z]/g, ""))}(progress);`
|
|
884
|
+
);
|
|
885
|
+
lines.push("");
|
|
886
|
+
|
|
887
|
+
// Position animations
|
|
888
|
+
if (positionProps.length > 0) {
|
|
889
|
+
lines.push(" // Position animation");
|
|
890
|
+
for (const prop of positionProps) {
|
|
891
|
+
const axis =
|
|
892
|
+
prop.name.replace(/translate|[XYZ]/gi, "").toLowerCase() ||
|
|
893
|
+
prop.name.charAt(prop.name.length - 1).toLowerCase();
|
|
894
|
+
const fromVal = parseFloat(prop.from) || 0;
|
|
895
|
+
const toVal = parseFloat(prop.to) || 0;
|
|
896
|
+
lines.push(
|
|
897
|
+
` meshRef.current.position.${axis} = ${fromVal} + (${toVal} - ${fromVal}) * eased;`
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
// Rotation animations
|
|
903
|
+
if (rotationProps.length > 0) {
|
|
904
|
+
lines.push(" // Rotation animation");
|
|
905
|
+
for (const prop of rotationProps) {
|
|
906
|
+
const axis = prop.name.replace("rotate", "").toLowerCase() || "y";
|
|
907
|
+
const fromVal = parseFloat(prop.from) || 0;
|
|
908
|
+
const toVal = parseFloat(prop.to) || Math.PI * 2;
|
|
909
|
+
lines.push(
|
|
910
|
+
` meshRef.current.rotation.${axis} = ${fromVal} + (${toVal} - ${fromVal}) * eased;`
|
|
911
|
+
);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
// Scale animations
|
|
916
|
+
const scaleProp = scaleProps[0];
|
|
917
|
+
if (scaleProp) {
|
|
918
|
+
lines.push(" // Scale animation");
|
|
919
|
+
const fromVal = parseFloat(scaleProp.from) || 1;
|
|
920
|
+
const toVal = parseFloat(scaleProp.to) || 1;
|
|
921
|
+
lines.push(` const scaleValue = ${fromVal} + (${toVal} - ${fromVal}) * eased;`);
|
|
922
|
+
lines.push(" meshRef.current.scale.setScalar(scaleValue);");
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
// Opacity animations (material)
|
|
926
|
+
const opacityProp = opacityProps[0];
|
|
927
|
+
if (opacityProp) {
|
|
928
|
+
lines.push(" // Opacity animation");
|
|
929
|
+
const fromVal = parseFloat(opacityProp.from) || 1;
|
|
930
|
+
const toVal = parseFloat(opacityProp.to) || 0;
|
|
931
|
+
lines.push(` if (meshRef.current.material && 'opacity' in meshRef.current.material) {`);
|
|
932
|
+
lines.push(
|
|
933
|
+
` (meshRef.current.material as any).opacity = ${fromVal} + (${toVal} - ${fromVal}) * eased;`
|
|
934
|
+
);
|
|
935
|
+
lines.push(" }");
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
lines.push(" });");
|
|
939
|
+
lines.push("");
|
|
940
|
+
lines.push(" return (");
|
|
941
|
+
lines.push(" <mesh ref={meshRef}>");
|
|
942
|
+
lines.push(" {children || (");
|
|
943
|
+
lines.push(" <>");
|
|
944
|
+
lines.push(" <boxGeometry args={[1, 1, 1]} />");
|
|
945
|
+
lines.push(' <meshStandardMaterial color="#4f46e5" transparent />');
|
|
946
|
+
lines.push(" </>");
|
|
947
|
+
lines.push(" )}");
|
|
948
|
+
lines.push(" </mesh>");
|
|
949
|
+
lines.push(" );");
|
|
950
|
+
lines.push("};");
|
|
951
|
+
lines.push("");
|
|
952
|
+
|
|
953
|
+
// Easing function
|
|
954
|
+
lines.push("// Easing function");
|
|
955
|
+
const easingName = `ease${toPascalCase(pattern.easing.replace(/[^a-zA-Z]/g, ""))}`;
|
|
956
|
+
lines.push(`function ${easingName}(t${ts ? ": number" : ""})${ts ? ": number" : ""} {`);
|
|
957
|
+
switch (pattern.easing) {
|
|
958
|
+
case "ease-in":
|
|
959
|
+
lines.push(" return t * t;");
|
|
960
|
+
break;
|
|
961
|
+
case "ease-out":
|
|
962
|
+
lines.push(" return t * (2 - t);");
|
|
963
|
+
break;
|
|
964
|
+
case "ease-in-out":
|
|
965
|
+
lines.push(" return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;");
|
|
966
|
+
break;
|
|
967
|
+
case "linear":
|
|
968
|
+
lines.push(" return t;");
|
|
969
|
+
break;
|
|
970
|
+
default:
|
|
971
|
+
// Default to ease-out for unknown easing
|
|
972
|
+
lines.push(" return t * (2 - t);");
|
|
973
|
+
}
|
|
974
|
+
lines.push("}");
|
|
975
|
+
lines.push("");
|
|
976
|
+
|
|
977
|
+
// Main Scene Component
|
|
978
|
+
if (ts) {
|
|
979
|
+
lines.push(`interface ${componentName}Props {`);
|
|
980
|
+
lines.push(" className?: string;");
|
|
981
|
+
lines.push("}");
|
|
982
|
+
lines.push("");
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
lines.push(
|
|
986
|
+
`export const ${componentName}${ts ? `: FC<${componentName}Props>` : ""} = ({ className }) => {`
|
|
987
|
+
);
|
|
988
|
+
|
|
989
|
+
if (options.includeReducedMotion) {
|
|
990
|
+
lines.push(" // Check for reduced motion preference");
|
|
991
|
+
lines.push(' const prefersReducedMotion = typeof window !== "undefined"');
|
|
992
|
+
lines.push(' && window.matchMedia("(prefers-reduced-motion: reduce)").matches;');
|
|
993
|
+
lines.push("");
|
|
994
|
+
lines.push(" if (prefersReducedMotion) {");
|
|
995
|
+
lines.push(" return (");
|
|
996
|
+
lines.push(
|
|
997
|
+
' <div className={className} style={{ width: "100%", height: "400px", background: "#1a1a2e" }}>'
|
|
998
|
+
);
|
|
999
|
+
lines.push(" {/* Static fallback for reduced motion */}");
|
|
1000
|
+
lines.push(" </div>");
|
|
1001
|
+
lines.push(" );");
|
|
1002
|
+
lines.push(" }");
|
|
1003
|
+
lines.push("");
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
lines.push(" return (");
|
|
1007
|
+
lines.push(' <div className={className} style={{ width: "100%", height: "400px" }}>');
|
|
1008
|
+
lines.push(" <Canvas camera={{ position: [0, 0, 5], fov: 50 }}>");
|
|
1009
|
+
lines.push(" <ambientLight intensity={0.5} />");
|
|
1010
|
+
lines.push(" <pointLight position={[10, 10, 10]} />");
|
|
1011
|
+
lines.push(` <${animatedObjectName} />`);
|
|
1012
|
+
lines.push(" </Canvas>");
|
|
1013
|
+
lines.push(" </div>");
|
|
1014
|
+
lines.push(" );");
|
|
1015
|
+
lines.push("};");
|
|
1016
|
+
|
|
1017
|
+
const code = lines.join("\n");
|
|
1018
|
+
const dependencies = isScroll
|
|
1019
|
+
? ["@react-three/fiber", "@react-three/drei", "three"]
|
|
1020
|
+
: ["@react-three/fiber", "three"];
|
|
1021
|
+
|
|
1022
|
+
return {
|
|
1023
|
+
code,
|
|
1024
|
+
metadata: {
|
|
1025
|
+
linesOfCode: countLines(code),
|
|
1026
|
+
hasKeyframes: false,
|
|
1027
|
+
hasReducedMotion: options.includeReducedMotion ?? true,
|
|
1028
|
+
dependencies,
|
|
1029
|
+
},
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// =====================================================
|
|
1034
|
+
// Lottie 生成ヘルパー
|
|
1035
|
+
// =====================================================
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* Lottie トランスフォームキーフレームを生成する
|
|
1039
|
+
* CSSアニメーションプロパティをLottie JSON形式のトランスフォーム(ks)に変換する
|
|
1040
|
+
*
|
|
1041
|
+
* Generates Lottie transform keyframes from CSS animation properties.
|
|
1042
|
+
* Converts opacity, translate, scale, and rotation to Lottie JSON transform (ks) format.
|
|
1043
|
+
*/
|
|
1044
|
+
function buildLottieTransformLines(
|
|
1045
|
+
pattern: MotionPatternInput,
|
|
1046
|
+
startFrame: number,
|
|
1047
|
+
durationInFrames: number
|
|
1048
|
+
): string[] {
|
|
1049
|
+
const lines: string[] = [];
|
|
1050
|
+
|
|
1051
|
+
// Opacity animation
|
|
1052
|
+
const opacityProp = pattern.properties.find((p) => p.name === "opacity");
|
|
1053
|
+
if (opacityProp) {
|
|
1054
|
+
const fromOpacity = parseFloat(opacityProp.from) * 100 || 0;
|
|
1055
|
+
const toOpacity = parseFloat(opacityProp.to) * 100 || 100;
|
|
1056
|
+
lines.push(" o: {"); // Opacity
|
|
1057
|
+
lines.push(" a: 1,"); // Animated
|
|
1058
|
+
lines.push(" k: [");
|
|
1059
|
+
lines.push(
|
|
1060
|
+
` { i: { x: [0.4], y: [1] }, o: { x: [0.6], y: [0] }, t: ${startFrame}, s: [${fromOpacity}] },`
|
|
1061
|
+
);
|
|
1062
|
+
lines.push(` { t: ${startFrame + durationInFrames}, s: [${toOpacity}] }`);
|
|
1063
|
+
lines.push(" ]");
|
|
1064
|
+
lines.push(" },");
|
|
1065
|
+
} else {
|
|
1066
|
+
lines.push(" o: { a: 0, k: 100 },");
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
// Position animation (transform: translate)
|
|
1070
|
+
const translateXProp = pattern.properties.find((p) => p.name === "translateX");
|
|
1071
|
+
const translateYProp = pattern.properties.find((p) => p.name === "translateY");
|
|
1072
|
+
if (translateXProp || translateYProp) {
|
|
1073
|
+
const fromX = translateXProp ? parseFloat(translateXProp.from) || 0 : 0;
|
|
1074
|
+
const toX = translateXProp ? parseFloat(translateXProp.to) || 0 : 0;
|
|
1075
|
+
const fromY = translateYProp ? parseFloat(translateYProp.from) || 0 : 0;
|
|
1076
|
+
const toY = translateYProp ? parseFloat(translateYProp.to) || 0 : 0;
|
|
1077
|
+
lines.push(" p: {"); // Position
|
|
1078
|
+
lines.push(" a: 1,");
|
|
1079
|
+
lines.push(" k: [");
|
|
1080
|
+
lines.push(
|
|
1081
|
+
` { i: { x: 0.4, y: 1 }, o: { x: 0.6, y: 0 }, t: ${startFrame}, s: [${100 + fromX}, ${100 + fromY}, 0] },`
|
|
1082
|
+
);
|
|
1083
|
+
lines.push(
|
|
1084
|
+
` { t: ${startFrame + durationInFrames}, s: [${100 + toX}, ${100 + toY}, 0] }`
|
|
1085
|
+
);
|
|
1086
|
+
lines.push(" ]");
|
|
1087
|
+
lines.push(" },");
|
|
1088
|
+
} else {
|
|
1089
|
+
lines.push(" p: { a: 0, k: [100, 100, 0] },");
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
// Scale animation
|
|
1093
|
+
const scaleProp = pattern.properties.find((p) => p.name === "scale");
|
|
1094
|
+
if (scaleProp) {
|
|
1095
|
+
const fromScale = parseFloat(scaleProp.from) * 100 || 100;
|
|
1096
|
+
const toScale = parseFloat(scaleProp.to) * 100 || 100;
|
|
1097
|
+
lines.push(" s: {"); // Scale
|
|
1098
|
+
lines.push(" a: 1,");
|
|
1099
|
+
lines.push(" k: [");
|
|
1100
|
+
lines.push(
|
|
1101
|
+
` { i: { x: [0.4], y: [1] }, o: { x: [0.6], y: [0] }, t: ${startFrame}, s: [${fromScale}, ${fromScale}, 100] },`
|
|
1102
|
+
);
|
|
1103
|
+
lines.push(
|
|
1104
|
+
` { t: ${startFrame + durationInFrames}, s: [${toScale}, ${toScale}, 100] }`
|
|
1105
|
+
);
|
|
1106
|
+
lines.push(" ]");
|
|
1107
|
+
lines.push(" },");
|
|
1108
|
+
} else {
|
|
1109
|
+
lines.push(" s: { a: 0, k: [100, 100, 100] },");
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
// Rotation animation
|
|
1113
|
+
const rotateProp = pattern.properties.find((p) => p.name === "rotate");
|
|
1114
|
+
if (rotateProp) {
|
|
1115
|
+
const fromRotate = parseFloat(rotateProp.from) || 0;
|
|
1116
|
+
const toRotate = parseFloat(rotateProp.to) || 0;
|
|
1117
|
+
lines.push(" r: {"); // Rotation
|
|
1118
|
+
lines.push(" a: 1,");
|
|
1119
|
+
lines.push(" k: [");
|
|
1120
|
+
lines.push(
|
|
1121
|
+
` { i: { x: [0.4], y: [1] }, o: { x: [0.6], y: [0] }, t: ${startFrame}, s: [${fromRotate}] },`
|
|
1122
|
+
);
|
|
1123
|
+
lines.push(` { t: ${startFrame + durationInFrames}, s: [${toRotate}] }`);
|
|
1124
|
+
lines.push(" ]");
|
|
1125
|
+
lines.push(" },");
|
|
1126
|
+
} else {
|
|
1127
|
+
lines.push(" r: { a: 0, k: 0 },");
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
lines.push(" a: { a: 0, k: [100, 100, 0] }"); // Anchor point
|
|
1131
|
+
|
|
1132
|
+
return lines;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Lottie アニメーションデータオブジェクト(JSON)のコード行を生成する
|
|
1137
|
+
* Lottie v5.7.8 形式のレイヤー・シェイプ構造を出力する
|
|
1138
|
+
*
|
|
1139
|
+
* Generates Lottie animation data object (JSON) code lines.
|
|
1140
|
+
* Outputs layer and shape structure in Lottie v5.7.8 format.
|
|
1141
|
+
*/
|
|
1142
|
+
function buildLottieAnimationDataLines(
|
|
1143
|
+
pattern: MotionPatternInput,
|
|
1144
|
+
startFrame: number,
|
|
1145
|
+
durationInFrames: number
|
|
1146
|
+
): string[] {
|
|
1147
|
+
const lines: string[] = [];
|
|
1148
|
+
|
|
1149
|
+
lines.push("/**");
|
|
1150
|
+
lines.push(" * Lottie Animation Data");
|
|
1151
|
+
lines.push(" * Generated from CSS animation pattern.");
|
|
1152
|
+
lines.push(
|
|
1153
|
+
" * For complex animations, replace with actual Lottie JSON export from After Effects/Figma."
|
|
1154
|
+
);
|
|
1155
|
+
lines.push(" */");
|
|
1156
|
+
|
|
1157
|
+
lines.push(`const ${pattern.name}AnimationData = {`);
|
|
1158
|
+
lines.push(' v: "5.7.8",');
|
|
1159
|
+
lines.push(` fr: 60,`); // Frame rate
|
|
1160
|
+
lines.push(` ip: ${startFrame},`); // In point
|
|
1161
|
+
lines.push(` op: ${startFrame + durationInFrames},`); // Out point
|
|
1162
|
+
lines.push(" w: 200,"); // Width
|
|
1163
|
+
lines.push(" h: 200,"); // Height
|
|
1164
|
+
lines.push(' nm: "' + pattern.name + '",');
|
|
1165
|
+
lines.push(" ddd: 0,");
|
|
1166
|
+
lines.push(" assets: [],");
|
|
1167
|
+
lines.push(" layers: [");
|
|
1168
|
+
lines.push(" {");
|
|
1169
|
+
lines.push(" ddd: 0,");
|
|
1170
|
+
lines.push(" ind: 1,");
|
|
1171
|
+
lines.push(" ty: 4,"); // Shape layer
|
|
1172
|
+
lines.push(` nm: "${pattern.name}",`);
|
|
1173
|
+
lines.push(` sr: 1,`);
|
|
1174
|
+
lines.push(" ks: {"); // Transform
|
|
1175
|
+
|
|
1176
|
+
lines.push(...buildLottieTransformLines(pattern, startFrame, durationInFrames));
|
|
1177
|
+
|
|
1178
|
+
lines.push(" },");
|
|
1179
|
+
|
|
1180
|
+
// Shape contents (simple rectangle)
|
|
1181
|
+
lines.push(" shapes: [");
|
|
1182
|
+
lines.push(" {");
|
|
1183
|
+
lines.push(' ty: "rc",'); // Rectangle
|
|
1184
|
+
lines.push(" d: 1,");
|
|
1185
|
+
lines.push(" s: { a: 0, k: [100, 100] },"); // Size
|
|
1186
|
+
lines.push(" p: { a: 0, k: [0, 0] },"); // Position
|
|
1187
|
+
lines.push(" r: { a: 0, k: 8 },"); // Corner radius
|
|
1188
|
+
lines.push(' nm: "Rectangle"');
|
|
1189
|
+
lines.push(" },");
|
|
1190
|
+
lines.push(" {");
|
|
1191
|
+
lines.push(' ty: "fl",'); // Fill
|
|
1192
|
+
lines.push(" c: { a: 0, k: [0.31, 0.275, 0.898, 1] },"); // Color (#4f46e5)
|
|
1193
|
+
lines.push(" o: { a: 0, k: 100 },");
|
|
1194
|
+
lines.push(' nm: "Fill"');
|
|
1195
|
+
lines.push(" }");
|
|
1196
|
+
lines.push(" ],");
|
|
1197
|
+
lines.push(` ip: ${startFrame},`);
|
|
1198
|
+
lines.push(` op: ${startFrame + durationInFrames},`);
|
|
1199
|
+
lines.push(" st: 0");
|
|
1200
|
+
lines.push(" }");
|
|
1201
|
+
lines.push(" ]");
|
|
1202
|
+
lines.push("};");
|
|
1203
|
+
|
|
1204
|
+
return lines;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Lottie Reactコンポーネントのコード行を生成する
|
|
1209
|
+
* TypeScript型定義、prefers-reduced-motion対応、使用例コメントを含む
|
|
1210
|
+
*
|
|
1211
|
+
* Generates Lottie React component code lines.
|
|
1212
|
+
* Includes TypeScript type definitions, prefers-reduced-motion support, and usage comments.
|
|
1213
|
+
*/
|
|
1214
|
+
function buildLottieComponentLines(
|
|
1215
|
+
pattern: MotionPatternInput,
|
|
1216
|
+
options: ImplementationOptions,
|
|
1217
|
+
componentName: string,
|
|
1218
|
+
ts: boolean
|
|
1219
|
+
): string[] {
|
|
1220
|
+
const lines: string[] = [];
|
|
1221
|
+
|
|
1222
|
+
// React component
|
|
1223
|
+
if (ts) {
|
|
1224
|
+
lines.push(`interface ${componentName}Props {`);
|
|
1225
|
+
lines.push(" className?: string;");
|
|
1226
|
+
lines.push(" loop?: boolean;");
|
|
1227
|
+
lines.push(" autoplay?: boolean;");
|
|
1228
|
+
lines.push("}");
|
|
1229
|
+
lines.push("");
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
lines.push(`export const ${componentName}${ts ? `: FC<${componentName}Props>` : ""} = ({`);
|
|
1233
|
+
lines.push(" className,");
|
|
1234
|
+
lines.push(` loop = ${pattern.iterations === "infinite"},`);
|
|
1235
|
+
lines.push(" autoplay = true,");
|
|
1236
|
+
lines.push("}) => {");
|
|
1237
|
+
|
|
1238
|
+
if (options.includeReducedMotion) {
|
|
1239
|
+
lines.push(" // Check for reduced motion preference");
|
|
1240
|
+
lines.push(' const prefersReducedMotion = typeof window !== "undefined"');
|
|
1241
|
+
lines.push(' && window.matchMedia("(prefers-reduced-motion: reduce)").matches;');
|
|
1242
|
+
lines.push("");
|
|
1243
|
+
lines.push(" if (prefersReducedMotion) {");
|
|
1244
|
+
lines.push(" return (");
|
|
1245
|
+
lines.push(" <div className={className} style={{ width: 200, height: 200 }}>");
|
|
1246
|
+
lines.push(" {/* Static fallback for reduced motion */}");
|
|
1247
|
+
lines.push(
|
|
1248
|
+
' <div style={{ width: 100, height: 100, background: "#4f46e5", borderRadius: 8, margin: "auto" }} />'
|
|
1249
|
+
);
|
|
1250
|
+
lines.push(" </div>");
|
|
1251
|
+
lines.push(" );");
|
|
1252
|
+
lines.push(" }");
|
|
1253
|
+
lines.push("");
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
lines.push(" return (");
|
|
1257
|
+
lines.push(" <Lottie");
|
|
1258
|
+
lines.push(` animationData={${pattern.name}AnimationData}`);
|
|
1259
|
+
lines.push(" loop={loop}");
|
|
1260
|
+
lines.push(" autoplay={autoplay}");
|
|
1261
|
+
lines.push(" className={className}");
|
|
1262
|
+
lines.push(" style={{ width: 200, height: 200 }}");
|
|
1263
|
+
lines.push(" />");
|
|
1264
|
+
lines.push(" );");
|
|
1265
|
+
lines.push("};");
|
|
1266
|
+
lines.push("");
|
|
1267
|
+
|
|
1268
|
+
// Usage instructions
|
|
1269
|
+
lines.push("/**");
|
|
1270
|
+
lines.push(" * Usage:");
|
|
1271
|
+
lines.push(` * import { ${componentName} } from './path-to-component';`);
|
|
1272
|
+
lines.push(" *");
|
|
1273
|
+
lines.push(` * <${componentName} />`);
|
|
1274
|
+
lines.push(` * <${componentName} loop={false} autoplay={true} />`);
|
|
1275
|
+
lines.push(" *");
|
|
1276
|
+
lines.push(" * Note: For production use, export your animation from After Effects with");
|
|
1277
|
+
lines.push(" * Bodymovin plugin or from Figma, and replace the animationData above.");
|
|
1278
|
+
lines.push(" */");
|
|
1279
|
+
|
|
1280
|
+
return lines;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* Lottie (lottie-react) 生成
|
|
1285
|
+
*
|
|
1286
|
+
* lottie-react を使用したアニメーションコンポーネントを生成
|
|
1287
|
+
* - アニメーションデータ構造生成(Lottie JSON形式)
|
|
1288
|
+
* - React コンポーネントラッパー
|
|
1289
|
+
* - TypeScript 型定義付き
|
|
1290
|
+
*/
|
|
1291
|
+
function generateLottie(
|
|
1292
|
+
pattern: MotionPatternInput,
|
|
1293
|
+
options: ImplementationOptions
|
|
1294
|
+
): GenerationResult {
|
|
1295
|
+
const lines: string[] = [];
|
|
1296
|
+
const componentName = options.componentName || toPascalCase(pattern.name) + "Animation";
|
|
1297
|
+
const ts = options.typescript ?? true;
|
|
1298
|
+
|
|
1299
|
+
// Imports
|
|
1300
|
+
lines.push("import Lottie from 'lottie-react';");
|
|
1301
|
+
if (ts) {
|
|
1302
|
+
lines.push("import type { FC } from 'react';");
|
|
1303
|
+
lines.push("import type { LottieComponentProps } from 'lottie-react';");
|
|
1304
|
+
}
|
|
1305
|
+
lines.push("");
|
|
1306
|
+
|
|
1307
|
+
// Generate Lottie-like animation data structure
|
|
1308
|
+
const durationInFrames = Math.round((pattern.duration / 1000) * 60); // 60fps
|
|
1309
|
+
const startFrame = Math.round((pattern.delay / 1000) * 60);
|
|
1310
|
+
|
|
1311
|
+
lines.push(...buildLottieAnimationDataLines(pattern, startFrame, durationInFrames));
|
|
1312
|
+
lines.push("");
|
|
1313
|
+
|
|
1314
|
+
lines.push(...buildLottieComponentLines(pattern, options, componentName, ts));
|
|
1315
|
+
|
|
1316
|
+
const code = lines.join("\n");
|
|
1317
|
+
|
|
1318
|
+
return {
|
|
1319
|
+
code,
|
|
1320
|
+
metadata: {
|
|
1321
|
+
linesOfCode: countLines(code),
|
|
1322
|
+
hasKeyframes: false,
|
|
1323
|
+
hasReducedMotion: options.includeReducedMotion ?? true,
|
|
1324
|
+
dependencies: ["lottie-react"],
|
|
1325
|
+
},
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
// =====================================================
|
|
1330
|
+
// メイン生成関数
|
|
1331
|
+
// =====================================================
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* メイン生成関数 — フォーマットに応じて適切なコード生成関数にディスパッチする
|
|
1335
|
+
*/
|
|
1336
|
+
export function generateImplementation(
|
|
1337
|
+
pattern: MotionPatternInput,
|
|
1338
|
+
format: ImplementationFormat,
|
|
1339
|
+
options: ImplementationOptions
|
|
1340
|
+
): GenerationResult {
|
|
1341
|
+
switch (format) {
|
|
1342
|
+
case "css":
|
|
1343
|
+
return generateCSS(pattern, options);
|
|
1344
|
+
case "css-module":
|
|
1345
|
+
return generateCSSModule(pattern, options);
|
|
1346
|
+
case "tailwind":
|
|
1347
|
+
return generateTailwind(pattern, options);
|
|
1348
|
+
case "styled-components":
|
|
1349
|
+
return generateStyledComponents(pattern, options);
|
|
1350
|
+
case "emotion":
|
|
1351
|
+
return generateEmotion(pattern, options);
|
|
1352
|
+
case "framer-motion":
|
|
1353
|
+
return generateFramerMotion(pattern, options);
|
|
1354
|
+
case "gsap":
|
|
1355
|
+
return generateGSAP(pattern, options);
|
|
1356
|
+
case "three-js":
|
|
1357
|
+
return generateThreeJS(pattern, options);
|
|
1358
|
+
case "lottie":
|
|
1359
|
+
return generateLottie(pattern, options);
|
|
1360
|
+
default:
|
|
1361
|
+
return generateCSS(pattern, options);
|
|
1362
|
+
}
|
|
1363
|
+
}
|