@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
|
@@ -1,1104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// SPDX-FileCopyrightText: 2026 TKMD and Reftrix Contributors
|
|
3
|
-
// SPDX-License-Identifier: AGPL-3.0-only
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.DEFAULT_SECTION_HEIGHT = exports.SECTION_DEFAULT_HEIGHTS = void 0;
|
|
6
|
-
exports.detectSections = detectSections;
|
|
7
|
-
exports.extractSectionContent = extractSectionContent;
|
|
8
|
-
exports.extractSectionStyle = extractSectionStyle;
|
|
9
|
-
exports.extractColors = extractColors;
|
|
10
|
-
exports.inferColorRole = inferColorRole;
|
|
11
|
-
exports.analyzeTypography = analyzeTypography;
|
|
12
|
-
exports.detectGrid = detectGrid;
|
|
13
|
-
exports.generateTextRepresentation = generateTextRepresentation;
|
|
14
|
-
exports.getDefaultColorPalette = getDefaultColorPalette;
|
|
15
|
-
exports.getDefaultTypography = getDefaultTypography;
|
|
16
|
-
exports.getDefaultGrid = getDefaultGrid;
|
|
17
|
-
exports.getDefaultMediaElements = getDefaultMediaElements;
|
|
18
|
-
exports.detectVideos = detectVideos;
|
|
19
|
-
exports.detectVisualDecorations = detectVisualDecorations;
|
|
20
|
-
exports.getDefaultVisualDecorations = getDefaultVisualDecorations;
|
|
21
|
-
/**
|
|
22
|
-
* layout.inspect HTMLパースユーティリティ
|
|
23
|
-
*
|
|
24
|
-
* HTMLから以下の情報を抽出する純粋関数群:
|
|
25
|
-
* - セクション構成(hero, features, cta等)
|
|
26
|
-
* - 色情報(パレット、ドミナント、背景、テキスト色)
|
|
27
|
-
* - タイポグラフィ(フォント、サイズスケール、行間)
|
|
28
|
-
* - グリッド構成(flex, grid, float)
|
|
29
|
-
* - Embedding用テキスト表現
|
|
30
|
-
*
|
|
31
|
-
* @module tools/layout/inspect/inspect.utils
|
|
32
|
-
*/
|
|
33
|
-
const jsdom_1 = require("jsdom");
|
|
34
|
-
const visual_decoration_detector_service_1 = require("../../../services/visual-extractor/visual-decoration-detector.service");
|
|
35
|
-
/**
|
|
36
|
-
* セクション検出用の正規表現パターン
|
|
37
|
-
* 優先度順に並べられている
|
|
38
|
-
*/
|
|
39
|
-
const SECTION_PATTERNS = [
|
|
40
|
-
{ pattern: /<header[^>]*>/i, type: "header", confidence: 0.95 },
|
|
41
|
-
{ pattern: /<nav[^>]*>/i, type: "navigation", confidence: 0.9 },
|
|
42
|
-
{ pattern: /class="[^"]*hero[^"]*"/i, type: "hero", confidence: 0.9 },
|
|
43
|
-
{ pattern: /<section[^>]*class="[^"]*hero[^"]*"/i, type: "hero", confidence: 0.95 },
|
|
44
|
-
{ pattern: /class="[^"]*features?[^"]*"/i, type: "features", confidence: 0.85 },
|
|
45
|
-
{ pattern: /class="[^"]*testimonial[^"]*"/i, type: "testimonial", confidence: 0.9 },
|
|
46
|
-
{ pattern: /<blockquote/i, type: "testimonial", confidence: 0.7 },
|
|
47
|
-
{ pattern: /class="[^"]*pricing[^"]*"/i, type: "pricing", confidence: 0.9 },
|
|
48
|
-
{ pattern: /class="[^"]*cta[^"]*"/i, type: "cta", confidence: 0.85 },
|
|
49
|
-
{ pattern: /<footer[^>]*>/i, type: "footer", confidence: 0.95 },
|
|
50
|
-
{ pattern: /class="[^"]*gallery[^"]*"/i, type: "gallery", confidence: 0.85 },
|
|
51
|
-
{ pattern: /class="[^"]*about[^"]*"/i, type: "about", confidence: 0.8 },
|
|
52
|
-
{ pattern: /class="[^"]*contact[^"]*"/i, type: "contact", confidence: 0.85 },
|
|
53
|
-
{ pattern: /class="[^"]*faq[^"]*"/i, type: "faq", confidence: 0.85 },
|
|
54
|
-
{ pattern: /class="[^"]*team[^"]*"/i, type: "team", confidence: 0.8 },
|
|
55
|
-
];
|
|
56
|
-
const SECTION_SELECTORS = [
|
|
57
|
-
{ selector: "header", type: "header", confidence: 0.95 },
|
|
58
|
-
{ selector: "nav", type: "navigation", confidence: 0.9 },
|
|
59
|
-
{
|
|
60
|
-
selector: 'section[class*="hero"], div[class*="hero"], [class*="hero"]',
|
|
61
|
-
type: "hero",
|
|
62
|
-
confidence: 0.9,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
selector: 'section[class*="feature"], div[class*="feature"], [class*="feature"]',
|
|
66
|
-
type: "features",
|
|
67
|
-
confidence: 0.85,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
selector: 'section[class*="testimonial"], div[class*="testimonial"], [class*="testimonial"]',
|
|
71
|
-
type: "testimonial",
|
|
72
|
-
confidence: 0.9,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
selector: 'section[class*="pricing"], div[class*="pricing"], [class*="pricing"]',
|
|
76
|
-
type: "pricing",
|
|
77
|
-
confidence: 0.9,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
selector: 'section[class*="cta"], div[class*="cta"], [class*="cta"]',
|
|
81
|
-
type: "cta",
|
|
82
|
-
confidence: 0.85,
|
|
83
|
-
},
|
|
84
|
-
{ selector: "footer", type: "footer", confidence: 0.95 },
|
|
85
|
-
{
|
|
86
|
-
selector: 'section[class*="gallery"], div[class*="gallery"], [class*="gallery"]',
|
|
87
|
-
type: "gallery",
|
|
88
|
-
confidence: 0.85,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
selector: 'section[class*="about"], div[class*="about"], [class*="about"]',
|
|
92
|
-
type: "about",
|
|
93
|
-
confidence: 0.8,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
selector: 'section[class*="contact"], div[class*="contact"], [class*="contact"]',
|
|
97
|
-
type: "contact",
|
|
98
|
-
confidence: 0.85,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
selector: 'section[class*="faq"], div[class*="faq"], [class*="faq"]',
|
|
102
|
-
type: "faq",
|
|
103
|
-
confidence: 0.85,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
selector: 'section[class*="team"], div[class*="team"], [class*="team"]',
|
|
107
|
-
type: "team",
|
|
108
|
-
confidence: 0.8,
|
|
109
|
-
},
|
|
110
|
-
// WordPress / DigitalSilk block wrappers: treat each wrapper as a distinct content section
|
|
111
|
-
{
|
|
112
|
-
selector: 'div[class*="dst-wrapper"], div[class*="ds-blocks-dst-wrapper"]',
|
|
113
|
-
type: "content",
|
|
114
|
-
confidence: 0.65,
|
|
115
|
-
multi: true,
|
|
116
|
-
},
|
|
117
|
-
];
|
|
118
|
-
/**
|
|
119
|
-
* セクションタイプごとのデフォルト高さ(ピクセル)
|
|
120
|
-
*/
|
|
121
|
-
exports.SECTION_DEFAULT_HEIGHTS = {
|
|
122
|
-
hero: 600,
|
|
123
|
-
footer: 200,
|
|
124
|
-
};
|
|
125
|
-
exports.DEFAULT_SECTION_HEIGHT = 400;
|
|
126
|
-
// =====================================================
|
|
127
|
-
// セクション検出関数
|
|
128
|
-
// =====================================================
|
|
129
|
-
/**
|
|
130
|
-
* HTMLからセクションを検出する
|
|
131
|
-
*
|
|
132
|
-
* JSDOMを使用してHTML内のセクション構成を解析します。
|
|
133
|
-
* 各セクションの実際のHTML範囲を特定し、そのコンテンツのみを抽出します。
|
|
134
|
-
* 検出されたセクションは位置(startY)でソートされ、一意のIDが割り当てられます。
|
|
135
|
-
*
|
|
136
|
-
* @param html - 解析対象のHTML文字列
|
|
137
|
-
* @returns 検出されたセクション情報の配列
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* ```typescript
|
|
141
|
-
* const html = '<section class="hero"><h1>Welcome</h1></section>';
|
|
142
|
-
* const sections = detectSections(html);
|
|
143
|
-
* // [{ id: 'section-0', type: 'hero', confidence: 0.9, ... }]
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
function detectSections(html) {
|
|
147
|
-
const sections = [];
|
|
148
|
-
let currentY = 0;
|
|
149
|
-
// 検出されたタイプを記録(重複防止)
|
|
150
|
-
const detectedTypes = new Set();
|
|
151
|
-
// 処理済み要素を記録(同じ要素を複数回処理しない)
|
|
152
|
-
const processedElements = new Set();
|
|
153
|
-
// JSDOMでHTMLをパース
|
|
154
|
-
const dom = new jsdom_1.JSDOM(html);
|
|
155
|
-
const document = dom.window.document;
|
|
156
|
-
for (const { selector, type, confidence, multi } of SECTION_SELECTORS) {
|
|
157
|
-
if (!multi && detectedTypes.has(type))
|
|
158
|
-
continue;
|
|
159
|
-
// セレクターにマッチする最初の要素を取得
|
|
160
|
-
const elements = document.querySelectorAll(selector);
|
|
161
|
-
for (const element of elements) {
|
|
162
|
-
// 既に処理済みの要素、または処理済み要素の子要素はスキップ
|
|
163
|
-
if (processedElements.has(element))
|
|
164
|
-
continue;
|
|
165
|
-
let isChildOfProcessed = false;
|
|
166
|
-
for (const processed of processedElements) {
|
|
167
|
-
if (processed.contains(element)) {
|
|
168
|
-
isChildOfProcessed = true;
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
if (isChildOfProcessed)
|
|
173
|
-
continue;
|
|
174
|
-
// このタイプが既に検出済みならスキップ
|
|
175
|
-
if (!multi && detectedTypes.has(type))
|
|
176
|
-
break;
|
|
177
|
-
if (!multi) {
|
|
178
|
-
detectedTypes.add(type);
|
|
179
|
-
}
|
|
180
|
-
processedElements.add(element);
|
|
181
|
-
const sectionHeight = exports.SECTION_DEFAULT_HEIGHTS[type] ?? exports.DEFAULT_SECTION_HEIGHT;
|
|
182
|
-
// セクション要素のHTMLを取得して、そのコンテンツのみを抽出
|
|
183
|
-
const sectionHtml = element.outerHTML;
|
|
184
|
-
sections.push({
|
|
185
|
-
id: `section-${sections.length}`,
|
|
186
|
-
type,
|
|
187
|
-
confidence,
|
|
188
|
-
position: {
|
|
189
|
-
startY: currentY,
|
|
190
|
-
endY: currentY + sectionHeight,
|
|
191
|
-
height: sectionHeight,
|
|
192
|
-
},
|
|
193
|
-
content: extractSectionContent(sectionHtml, type),
|
|
194
|
-
style: extractSectionStyle(sectionHtml, type),
|
|
195
|
-
});
|
|
196
|
-
currentY += sectionHeight;
|
|
197
|
-
if (!multi) {
|
|
198
|
-
break; // このタイプの最初の要素のみ処理
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
// 正規表現パターンでのフォールバック検出
|
|
203
|
-
// (DOMセレクターで検出できなかったセクション用)
|
|
204
|
-
for (const { pattern, type, confidence } of SECTION_PATTERNS) {
|
|
205
|
-
if (pattern.test(html) && !detectedTypes.has(type)) {
|
|
206
|
-
// セクション要素のHTML範囲を正規表現で抽出
|
|
207
|
-
const sectionHtml = extractSectionHtmlByPattern(html, type);
|
|
208
|
-
if (sectionHtml) {
|
|
209
|
-
detectedTypes.add(type);
|
|
210
|
-
const sectionHeight = exports.SECTION_DEFAULT_HEIGHTS[type] ?? exports.DEFAULT_SECTION_HEIGHT;
|
|
211
|
-
sections.push({
|
|
212
|
-
id: `section-${sections.length}`,
|
|
213
|
-
type,
|
|
214
|
-
confidence,
|
|
215
|
-
position: {
|
|
216
|
-
startY: currentY,
|
|
217
|
-
endY: currentY + sectionHeight,
|
|
218
|
-
height: sectionHeight,
|
|
219
|
-
},
|
|
220
|
-
content: extractSectionContent(sectionHtml, type),
|
|
221
|
-
style: extractSectionStyle(sectionHtml, type),
|
|
222
|
-
});
|
|
223
|
-
currentY += sectionHeight;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
// ソート(position.startYで昇順)
|
|
228
|
-
sections.sort((a, b) => a.position.startY - b.position.startY);
|
|
229
|
-
// IDを再割り当て
|
|
230
|
-
sections.forEach((section, index) => {
|
|
231
|
-
section.id = `section-${index}`;
|
|
232
|
-
});
|
|
233
|
-
return sections;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* 正規表現パターンを使用してセクションのHTML範囲を抽出
|
|
237
|
-
*
|
|
238
|
-
* @param html - 解析対象のHTML文字列
|
|
239
|
-
* @param type - セクションタイプ
|
|
240
|
-
* @returns セクションのHTML文字列、見つからない場合はnull
|
|
241
|
-
*/
|
|
242
|
-
function extractSectionHtmlByPattern(html, type) {
|
|
243
|
-
// JSDOMでパースして該当セクションを探す
|
|
244
|
-
const dom = new jsdom_1.JSDOM(html);
|
|
245
|
-
const document = dom.window.document;
|
|
246
|
-
// タイプに応じたセレクターでセクションを取得
|
|
247
|
-
const selectorMap = {
|
|
248
|
-
header: "header",
|
|
249
|
-
navigation: "nav",
|
|
250
|
-
hero: '[class*="hero"], section[class*="hero"]',
|
|
251
|
-
features: '[class*="feature"], section[class*="feature"]',
|
|
252
|
-
testimonial: '[class*="testimonial"], section[class*="testimonial"]',
|
|
253
|
-
pricing: '[class*="pricing"], section[class*="pricing"]',
|
|
254
|
-
cta: '[class*="cta"]:not(button), section[class*="cta"]',
|
|
255
|
-
footer: "footer",
|
|
256
|
-
content: '[class*="content"], section[class*="content"], main',
|
|
257
|
-
gallery: '[class*="gallery"], section[class*="gallery"]',
|
|
258
|
-
about: '[class*="about"], section[class*="about"]',
|
|
259
|
-
contact: '[class*="contact"], section[class*="contact"]',
|
|
260
|
-
faq: '[class*="faq"], section[class*="faq"]',
|
|
261
|
-
team: '[class*="team"], section[class*="team"]',
|
|
262
|
-
stats: '[class*="stats"], section[class*="stats"]',
|
|
263
|
-
unknown: "",
|
|
264
|
-
};
|
|
265
|
-
const selector = selectorMap[type];
|
|
266
|
-
if (!selector)
|
|
267
|
-
return null;
|
|
268
|
-
const element = document.querySelector(selector);
|
|
269
|
-
return element?.outerHTML ?? null;
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* セクションコンテンツを抽出
|
|
273
|
-
*
|
|
274
|
-
* 渡されたHTMLからセクションタイプに対応する要素を特定し、
|
|
275
|
-
* その要素内のコンテンツ(見出し、段落、リンク、画像、ボタン)を抽出します。
|
|
276
|
-
*
|
|
277
|
-
* HTML全体が渡された場合は、セクションタイプに対応する要素を自動的に特定します。
|
|
278
|
-
* セクション要素のHTMLのみが渡された場合は、そのHTMLから直接抽出します。
|
|
279
|
-
*
|
|
280
|
-
* @param html - 解析対象のHTML文字列
|
|
281
|
-
* @param sectionType - セクションタイプ(コンテンツ抽出の範囲を特定するために使用)
|
|
282
|
-
* @returns セクションコンテンツ情報
|
|
283
|
-
*/
|
|
284
|
-
function extractSectionContent(html, sectionType) {
|
|
285
|
-
// セクションタイプに対応するセレクター
|
|
286
|
-
const selectorMap = {
|
|
287
|
-
header: "header",
|
|
288
|
-
navigation: "nav",
|
|
289
|
-
hero: '[class*="hero"], section[class*="hero"]',
|
|
290
|
-
features: '[class*="feature"], section[class*="feature"]',
|
|
291
|
-
testimonial: '[class*="testimonial"], section[class*="testimonial"]',
|
|
292
|
-
pricing: '[class*="pricing"], section[class*="pricing"]',
|
|
293
|
-
cta: 'section[class*="cta"], div[class*="cta"]:not(button)',
|
|
294
|
-
footer: "footer",
|
|
295
|
-
content: '[class*="content"], section[class*="content"], main',
|
|
296
|
-
gallery: '[class*="gallery"], section[class*="gallery"]',
|
|
297
|
-
about: '[class*="about"], section[class*="about"]',
|
|
298
|
-
contact: '[class*="contact"], section[class*="contact"]',
|
|
299
|
-
faq: '[class*="faq"], section[class*="faq"]',
|
|
300
|
-
team: '[class*="team"], section[class*="team"]',
|
|
301
|
-
stats: '[class*="stats"], section[class*="stats"]',
|
|
302
|
-
unknown: "",
|
|
303
|
-
};
|
|
304
|
-
// JSDOMでHTMLをパース
|
|
305
|
-
const dom = new jsdom_1.JSDOM(html);
|
|
306
|
-
const document = dom.window.document;
|
|
307
|
-
// セレクターで該当セクション要素を取得
|
|
308
|
-
const selector = selectorMap[sectionType];
|
|
309
|
-
let sectionElement = null;
|
|
310
|
-
if (selector) {
|
|
311
|
-
sectionElement = document.querySelector(selector);
|
|
312
|
-
}
|
|
313
|
-
// セクション要素が見つからない場合は、渡されたHTML全体がセクション要素として扱う
|
|
314
|
-
// (detectSectionsから呼ばれた場合、既にセクション範囲のHTMLが渡されている)
|
|
315
|
-
if (!sectionElement) {
|
|
316
|
-
sectionElement = document.body;
|
|
317
|
-
}
|
|
318
|
-
return extractContentFromElement(sectionElement);
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* DOM要素からコンテンツを抽出
|
|
322
|
-
*
|
|
323
|
-
* @param element - 対象のDOM要素
|
|
324
|
-
* @returns セクションコンテンツ情報
|
|
325
|
-
*/
|
|
326
|
-
function extractContentFromElement(element) {
|
|
327
|
-
const headings = [];
|
|
328
|
-
const paragraphs = [];
|
|
329
|
-
const links = [];
|
|
330
|
-
const images = [];
|
|
331
|
-
const buttons = [];
|
|
332
|
-
// 見出し抽出(h1-h6)
|
|
333
|
-
const headingElements = element.querySelectorAll("h1, h2, h3, h4, h5, h6");
|
|
334
|
-
for (const h of headingElements) {
|
|
335
|
-
const level = parseInt(h.tagName.charAt(1), 10);
|
|
336
|
-
const text = h.textContent?.trim() ?? "";
|
|
337
|
-
if (text) {
|
|
338
|
-
headings.push({ level, text });
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
// 段落抽出
|
|
342
|
-
const paragraphElements = element.querySelectorAll("p");
|
|
343
|
-
for (const p of paragraphElements) {
|
|
344
|
-
const text = p.textContent?.trim() ?? "";
|
|
345
|
-
if (text) {
|
|
346
|
-
paragraphs.push(text);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
// リンク抽出
|
|
350
|
-
const linkElements = element.querySelectorAll("a[href]");
|
|
351
|
-
for (const a of linkElements) {
|
|
352
|
-
const href = a.getAttribute("href") ?? "";
|
|
353
|
-
const text = a.textContent?.trim() ?? "";
|
|
354
|
-
links.push({ href, text });
|
|
355
|
-
}
|
|
356
|
-
// 画像抽出
|
|
357
|
-
const imageElements = element.querySelectorAll("img[src]");
|
|
358
|
-
for (const img of imageElements) {
|
|
359
|
-
const src = img.getAttribute("src") ?? "";
|
|
360
|
-
const alt = img.getAttribute("alt") ?? undefined;
|
|
361
|
-
images.push({ src, alt });
|
|
362
|
-
}
|
|
363
|
-
// ボタン抽出
|
|
364
|
-
const buttonElements = element.querySelectorAll("button");
|
|
365
|
-
for (const btn of buttonElements) {
|
|
366
|
-
const text = btn.textContent?.trim() ?? "";
|
|
367
|
-
const className = btn.getAttribute("class") ?? "";
|
|
368
|
-
const type = className.includes("cta") || className.includes("primary") ? "primary" : "secondary";
|
|
369
|
-
buttons.push({ text, type });
|
|
370
|
-
}
|
|
371
|
-
return { headings, paragraphs, links, images, buttons };
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* セクションスタイルを抽出
|
|
375
|
-
*
|
|
376
|
-
* HTML/CSS内からスタイル情報(背景色、テキスト色、グラデーション、背景画像)を抽出します。
|
|
377
|
-
* heroセクションは特別な処理で、.heroクラスのスタイルを解析します。
|
|
378
|
-
*
|
|
379
|
-
* @param html - 解析対象のHTML文字列
|
|
380
|
-
* @param sectionType - セクションタイプ(heroの場合は特別処理)
|
|
381
|
-
* @returns セクションスタイル情報
|
|
382
|
-
*/
|
|
383
|
-
function extractSectionStyle(html, sectionType) {
|
|
384
|
-
const style = {};
|
|
385
|
-
// 背景色の検出
|
|
386
|
-
const bgColorMatch = html.match(/background(?:-color)?:\s*([#\w]+)/i);
|
|
387
|
-
if (bgColorMatch) {
|
|
388
|
-
const color = bgColorMatch[1];
|
|
389
|
-
if (color?.startsWith("#")) {
|
|
390
|
-
style.backgroundColor = color;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
// テキスト色の検出
|
|
394
|
-
const textColorMatch = html.match(/(?:^|\s)color:\s*([#\w]+)/i);
|
|
395
|
-
if (textColorMatch) {
|
|
396
|
-
const color = textColorMatch[1];
|
|
397
|
-
if (color?.startsWith("#")) {
|
|
398
|
-
style.textColor = color;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
// グラデーションの検出
|
|
402
|
-
style.hasGradient = /linear-gradient|radial-gradient/i.test(html);
|
|
403
|
-
// 背景画像の検出
|
|
404
|
-
style.hasImage = /background(?:-image)?:\s*url/i.test(html);
|
|
405
|
-
// heroセクションは特別な処理
|
|
406
|
-
if (sectionType === "hero") {
|
|
407
|
-
const heroStyleMatch = html.match(/\.hero\s*\{([^}]*)\}/i);
|
|
408
|
-
if (heroStyleMatch) {
|
|
409
|
-
const heroStyle = heroStyleMatch[1] ?? "";
|
|
410
|
-
const heroBgMatch = heroStyle.match(/background(?:-color)?:\s*([^;]+)/i);
|
|
411
|
-
if (heroBgMatch) {
|
|
412
|
-
const bgValue = heroBgMatch[1]?.trim() ?? "";
|
|
413
|
-
if (bgValue.includes("gradient")) {
|
|
414
|
-
style.hasGradient = true;
|
|
415
|
-
// グラデーションから最初の色を抽出
|
|
416
|
-
const colorMatch = bgValue.match(/#[0-9a-fA-F]{6}/);
|
|
417
|
-
if (colorMatch) {
|
|
418
|
-
style.backgroundColor = colorMatch[0];
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
else if (bgValue.startsWith("#")) {
|
|
422
|
-
style.backgroundColor = bgValue;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
// heroセクションのテキスト色
|
|
426
|
-
const heroColorMatch = heroStyle.match(/(?:^|;)\s*color:\s*([^;]+)/i);
|
|
427
|
-
if (heroColorMatch) {
|
|
428
|
-
style.textColor = heroColorMatch[1]?.trim();
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
return style;
|
|
433
|
-
}
|
|
434
|
-
// =====================================================
|
|
435
|
-
// 色情報抽出関数
|
|
436
|
-
// =====================================================
|
|
437
|
-
/**
|
|
438
|
-
* 色情報を抽出
|
|
439
|
-
*
|
|
440
|
-
* HTML/CSS内からHEXカラーとRGBカラーを抽出し、出現回数でソートしたパレットを作成します。
|
|
441
|
-
* 色の役割(primary, secondary, background, text)も推定します。
|
|
442
|
-
*
|
|
443
|
-
* @param html - 解析対象のHTML文字列
|
|
444
|
-
* @returns カラーパレット情報
|
|
445
|
-
*
|
|
446
|
-
* @example
|
|
447
|
-
* ```typescript
|
|
448
|
-
* const html = '<div style="color: #333; background: #ffffff;">';
|
|
449
|
-
* const colors = extractColors(html);
|
|
450
|
-
* // { palette: [...], dominant: '#333333', background: '#FFFFFF', text: '#333333' }
|
|
451
|
-
* ```
|
|
452
|
-
*/
|
|
453
|
-
function extractColors(html) {
|
|
454
|
-
const colorCounts = new Map();
|
|
455
|
-
// HEXカラーを抽出
|
|
456
|
-
const hexMatches = html.matchAll(/#([0-9a-fA-F]{6})\b/g);
|
|
457
|
-
for (const match of hexMatches) {
|
|
458
|
-
const hex = `#${(match[1] ?? "").toUpperCase()}`;
|
|
459
|
-
colorCounts.set(hex, (colorCounts.get(hex) ?? 0) + 1);
|
|
460
|
-
}
|
|
461
|
-
// rgb/rgbaカラーを抽出しHEXに変換
|
|
462
|
-
const rgbMatches = html.matchAll(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/gi);
|
|
463
|
-
for (const match of rgbMatches) {
|
|
464
|
-
const r = parseInt(match[1] ?? "0", 10);
|
|
465
|
-
const g = parseInt(match[2] ?? "0", 10);
|
|
466
|
-
const b = parseInt(match[3] ?? "0", 10);
|
|
467
|
-
const hex = rgbToHex(r, g, b);
|
|
468
|
-
colorCounts.set(hex, (colorCounts.get(hex) ?? 0) + 1);
|
|
469
|
-
}
|
|
470
|
-
// ソートしてパレット作成
|
|
471
|
-
const sortedColors = Array.from(colorCounts.entries())
|
|
472
|
-
.sort((a, b) => b[1] - a[1])
|
|
473
|
-
.map(([hex, count]) => ({ hex, count }));
|
|
474
|
-
// 色の役割を推定
|
|
475
|
-
const palette = sortedColors.map((color, index) => {
|
|
476
|
-
const role = inferColorRole(color.hex, index, sortedColors);
|
|
477
|
-
return { ...color, role };
|
|
478
|
-
});
|
|
479
|
-
// ドミナント、背景、テキスト色の決定
|
|
480
|
-
const dominant = palette.find((c) => c.role === "primary")?.hex ??
|
|
481
|
-
palette.find((c) => c.role !== "background" && c.role !== "text")?.hex ??
|
|
482
|
-
"#000000";
|
|
483
|
-
const background = palette.find((c) => c.role === "background")?.hex ?? "#FFFFFF";
|
|
484
|
-
const text = palette.find((c) => c.role === "text")?.hex ?? "#000000";
|
|
485
|
-
const accent = palette.find((c) => c.role === "secondary")?.hex;
|
|
486
|
-
return {
|
|
487
|
-
palette,
|
|
488
|
-
dominant,
|
|
489
|
-
background,
|
|
490
|
-
text,
|
|
491
|
-
accent,
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* RGBをHEX形式に変換
|
|
496
|
-
*
|
|
497
|
-
* @param r - 赤成分(0-255)
|
|
498
|
-
* @param g - 緑成分(0-255)
|
|
499
|
-
* @param b - 青成分(0-255)
|
|
500
|
-
* @returns HEX形式の色コード(大文字)
|
|
501
|
-
*/
|
|
502
|
-
function rgbToHex(r, g, b) {
|
|
503
|
-
return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
504
|
-
}
|
|
505
|
-
/**
|
|
506
|
-
* 色の役割を推定
|
|
507
|
-
*
|
|
508
|
-
* @param hex - HEX形式の色コード
|
|
509
|
-
* @param index - パレット内のインデックス
|
|
510
|
-
* @param sortedColors - ソート済み色配列
|
|
511
|
-
* @returns 推定された色の役割
|
|
512
|
-
*/
|
|
513
|
-
function inferColorRole(hex, index, sortedColors) {
|
|
514
|
-
const hexLower = hex.toLowerCase();
|
|
515
|
-
// 白系
|
|
516
|
-
if (hexLower === "#ffffff" || hexLower === "#fff") {
|
|
517
|
-
return "background";
|
|
518
|
-
}
|
|
519
|
-
// 黒系(ダークモードのテキストやボディカラー)
|
|
520
|
-
if (hexLower === "#000000" ||
|
|
521
|
-
hexLower === "#1a1a1a" ||
|
|
522
|
-
hexLower === "#1f2937" ||
|
|
523
|
-
hexLower === "#111827") {
|
|
524
|
-
return "text";
|
|
525
|
-
}
|
|
526
|
-
// 白・黒以外の色で役割を決定
|
|
527
|
-
// 白・黒を除いたインデックスを計算
|
|
528
|
-
const colorIndex = sortedColors.slice(0, index + 1).filter((c) => {
|
|
529
|
-
const h = c.hex.toLowerCase();
|
|
530
|
-
return (h !== "#ffffff" &&
|
|
531
|
-
h !== "#fff" &&
|
|
532
|
-
h !== "#000000" &&
|
|
533
|
-
h !== "#1a1a1a" &&
|
|
534
|
-
h !== "#1f2937" &&
|
|
535
|
-
h !== "#111827");
|
|
536
|
-
}).length - 1;
|
|
537
|
-
// 最も使われている色(白・黒以外で最初)
|
|
538
|
-
if (colorIndex === 0) {
|
|
539
|
-
return "primary";
|
|
540
|
-
}
|
|
541
|
-
// 2番目に使われている色
|
|
542
|
-
if (colorIndex === 1) {
|
|
543
|
-
return "secondary";
|
|
544
|
-
}
|
|
545
|
-
return undefined;
|
|
546
|
-
}
|
|
547
|
-
// =====================================================
|
|
548
|
-
// タイポグラフィ解析関数
|
|
549
|
-
// =====================================================
|
|
550
|
-
/**
|
|
551
|
-
* タイポグラフィ情報を解析
|
|
552
|
-
*
|
|
553
|
-
* HTML/CSS内からフォント情報、見出しサイズスケール、本文サイズ、行間を抽出します。
|
|
554
|
-
*
|
|
555
|
-
* @param html - 解析対象のHTML文字列
|
|
556
|
-
* @returns タイポグラフィ情報
|
|
557
|
-
*
|
|
558
|
-
* @example
|
|
559
|
-
* ```typescript
|
|
560
|
-
* const html = '<style>body { font-family: "Inter", sans-serif; }</style>';
|
|
561
|
-
* const typography = analyzeTypography(html);
|
|
562
|
-
* // { fonts: [{ family: 'Inter', weights: [400] }], ... }
|
|
563
|
-
* ```
|
|
564
|
-
*/
|
|
565
|
-
function analyzeTypography(html) {
|
|
566
|
-
const fonts = [];
|
|
567
|
-
const fontFamilies = new Map();
|
|
568
|
-
// font-familyを抽出
|
|
569
|
-
const fontFamilyMatches = html.matchAll(/font-family:\s*([^;]+)/gi);
|
|
570
|
-
for (const match of fontFamilyMatches) {
|
|
571
|
-
const familyString = match[1] ?? "";
|
|
572
|
-
// 最初のフォントを取得
|
|
573
|
-
const firstFont = familyString.split(",")[0]?.trim().replace(/['"]/g, "");
|
|
574
|
-
if (firstFont && !firstFont.startsWith("-apple-system")) {
|
|
575
|
-
if (!fontFamilies.has(firstFont)) {
|
|
576
|
-
fontFamilies.set(firstFont, new Set());
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
// font-weightを抽出
|
|
581
|
-
const fontWeightMatches = html.matchAll(/font-weight:\s*(\d+|bold|normal)/gi);
|
|
582
|
-
for (const match of fontWeightMatches) {
|
|
583
|
-
const weightStr = match[1] ?? "400";
|
|
584
|
-
const weight = parseWeight(weightStr);
|
|
585
|
-
// すべてのフォントに適用
|
|
586
|
-
for (const [, weights] of fontFamilies) {
|
|
587
|
-
weights.add(weight);
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
// フォント情報を配列に変換
|
|
591
|
-
for (const [family, weights] of fontFamilies) {
|
|
592
|
-
fonts.push({
|
|
593
|
-
family,
|
|
594
|
-
weights: Array.from(weights).sort((a, b) => a - b),
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
// デフォルトフォントがない場合
|
|
598
|
-
if (fonts.length === 0) {
|
|
599
|
-
fonts.push({ family: "sans-serif", weights: [400] });
|
|
600
|
-
}
|
|
601
|
-
// 見出しスケールを抽出
|
|
602
|
-
const headingScale = extractHeadingScale(html);
|
|
603
|
-
// 本文サイズ
|
|
604
|
-
const bodySize = extractBodySize(html);
|
|
605
|
-
// 行間
|
|
606
|
-
const lineHeight = extractLineHeight(html);
|
|
607
|
-
return {
|
|
608
|
-
fonts,
|
|
609
|
-
headingScale,
|
|
610
|
-
bodySize,
|
|
611
|
-
lineHeight,
|
|
612
|
-
};
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* font-weight文字列を数値に変換
|
|
616
|
-
*/
|
|
617
|
-
function parseWeight(weightStr) {
|
|
618
|
-
if (weightStr === "bold")
|
|
619
|
-
return 700;
|
|
620
|
-
if (weightStr === "normal")
|
|
621
|
-
return 400;
|
|
622
|
-
return parseInt(weightStr, 10);
|
|
623
|
-
}
|
|
624
|
-
/**
|
|
625
|
-
* 見出しサイズスケールを抽出
|
|
626
|
-
* - <style>タグ内のCSS: h1 { font-size: 64px; }
|
|
627
|
-
* - インラインスタイル: <h1 style="font-size: 64px;">
|
|
628
|
-
*/
|
|
629
|
-
function extractHeadingScale(html) {
|
|
630
|
-
const headingScale = [];
|
|
631
|
-
for (let i = 1; i <= 6; i++) {
|
|
632
|
-
// <style>タグ内のCSSブロック形式
|
|
633
|
-
let sizeMatch = html.match(new RegExp(`h${i}[^{]*\\{[^}]*font-size:\\s*(\\d+)`, "i"));
|
|
634
|
-
// インラインスタイル形式: <h1 style="font-size: 64px;">
|
|
635
|
-
if (!sizeMatch) {
|
|
636
|
-
sizeMatch = html.match(new RegExp(`<h${i}[^>]*style="[^"]*font-size:\\s*(\\d+)`, "i"));
|
|
637
|
-
}
|
|
638
|
-
// シングルクォート版
|
|
639
|
-
if (!sizeMatch) {
|
|
640
|
-
sizeMatch = html.match(new RegExp(`<h${i}[^>]*style='[^']*font-size:\\s*(\\d+)`, "i"));
|
|
641
|
-
}
|
|
642
|
-
if (sizeMatch) {
|
|
643
|
-
headingScale.push(parseInt(sizeMatch[1] ?? "16", 10));
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
// デフォルトスケール
|
|
647
|
-
if (headingScale.length === 0) {
|
|
648
|
-
headingScale.push(48, 36, 24, 20, 18, 16);
|
|
649
|
-
}
|
|
650
|
-
return headingScale;
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* 本文サイズを抽出
|
|
654
|
-
* - <style>タグ内のCSS: body { font-size: 16px; } または p { font-size: 18px; }
|
|
655
|
-
* - インラインスタイル: <p style="font-size: 18px;">
|
|
656
|
-
*/
|
|
657
|
-
function extractBodySize(html) {
|
|
658
|
-
// <style>タグ内のCSSブロック形式
|
|
659
|
-
let bodySizeMatch = html.match(/(?:body|p)[^{]*\{[^}]*font-size:\s*(\d+)/i);
|
|
660
|
-
if (bodySizeMatch) {
|
|
661
|
-
return parseInt(bodySizeMatch[1] ?? "16", 10);
|
|
662
|
-
}
|
|
663
|
-
// インラインスタイル: <p style="font-size: 18px;">
|
|
664
|
-
bodySizeMatch = html.match(/<p[^>]*style="[^"]*font-size:\s*(\d+)/i);
|
|
665
|
-
if (bodySizeMatch) {
|
|
666
|
-
return parseInt(bodySizeMatch[1] ?? "16", 10);
|
|
667
|
-
}
|
|
668
|
-
// シングルクォート版
|
|
669
|
-
bodySizeMatch = html.match(/<p[^>]*style='[^']*font-size:\s*(\d+)/i);
|
|
670
|
-
if (bodySizeMatch) {
|
|
671
|
-
return parseInt(bodySizeMatch[1] ?? "16", 10);
|
|
672
|
-
}
|
|
673
|
-
return 16;
|
|
674
|
-
}
|
|
675
|
-
/**
|
|
676
|
-
* 行間を抽出
|
|
677
|
-
*/
|
|
678
|
-
function extractLineHeight(html) {
|
|
679
|
-
const lineHeightMatch = html.match(/line-height:\s*([\d.]+)/i);
|
|
680
|
-
if (lineHeightMatch) {
|
|
681
|
-
return parseFloat(lineHeightMatch[1] ?? "1.5");
|
|
682
|
-
}
|
|
683
|
-
return 1.5;
|
|
684
|
-
}
|
|
685
|
-
// =====================================================
|
|
686
|
-
// グリッド検出関数
|
|
687
|
-
// =====================================================
|
|
688
|
-
/**
|
|
689
|
-
* グリッド情報を検出
|
|
690
|
-
*
|
|
691
|
-
* HTML/CSS内からグリッドシステム(CSS Grid, Flexbox, Float)を検出します。
|
|
692
|
-
* 検出優先度: CSS Grid > Flexbox > Float
|
|
693
|
-
*
|
|
694
|
-
* @param html - 解析対象のHTML文字列
|
|
695
|
-
* @returns グリッド情報
|
|
696
|
-
*
|
|
697
|
-
* @example
|
|
698
|
-
* ```typescript
|
|
699
|
-
* const html = '<style>.container { display: grid; grid-template-columns: repeat(3, 1fr); }</style>';
|
|
700
|
-
* const grid = detectGrid(html);
|
|
701
|
-
* // { type: 'grid', columns: 3 }
|
|
702
|
-
* ```
|
|
703
|
-
*/
|
|
704
|
-
function detectGrid(html) {
|
|
705
|
-
// CSS Gridの検出
|
|
706
|
-
const gridMatch = html.match(/display:\s*grid/i);
|
|
707
|
-
if (gridMatch) {
|
|
708
|
-
return parseGridStyles(html);
|
|
709
|
-
}
|
|
710
|
-
// Flexboxの検出
|
|
711
|
-
const flexMatch = html.match(/display:\s*flex/i);
|
|
712
|
-
if (flexMatch) {
|
|
713
|
-
return parseFlexStyles(html);
|
|
714
|
-
}
|
|
715
|
-
// Floatの検出
|
|
716
|
-
const floatMatch = html.match(/float:\s*(left|right)/i);
|
|
717
|
-
if (floatMatch) {
|
|
718
|
-
return { type: "float" };
|
|
719
|
-
}
|
|
720
|
-
return { type: "unknown" };
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* CSS Gridスタイルを解析
|
|
724
|
-
*/
|
|
725
|
-
function parseGridStyles(html) {
|
|
726
|
-
const grid = { type: "grid" };
|
|
727
|
-
// カラム数
|
|
728
|
-
const columnsMatch = html.match(/grid-template-columns:\s*repeat\(\s*(\d+)/i);
|
|
729
|
-
if (columnsMatch) {
|
|
730
|
-
grid.columns = parseInt(columnsMatch[1] ?? "1", 10);
|
|
731
|
-
}
|
|
732
|
-
// ガター幅
|
|
733
|
-
const gapMatch = html.match(/gap:\s*(\d+)/i);
|
|
734
|
-
if (gapMatch) {
|
|
735
|
-
grid.gutterWidth = parseInt(gapMatch[1] ?? "0", 10);
|
|
736
|
-
}
|
|
737
|
-
// max-width
|
|
738
|
-
const maxWidthMatch = html.match(/max-width:\s*(\d+)/i);
|
|
739
|
-
if (maxWidthMatch) {
|
|
740
|
-
grid.maxWidth = parseInt(maxWidthMatch[1] ?? "0", 10);
|
|
741
|
-
}
|
|
742
|
-
// ブレイクポイント
|
|
743
|
-
const breakpoints = parseBreakpoints(html);
|
|
744
|
-
if (breakpoints.length > 0) {
|
|
745
|
-
grid.breakpoints = breakpoints;
|
|
746
|
-
}
|
|
747
|
-
return grid;
|
|
748
|
-
}
|
|
749
|
-
/**
|
|
750
|
-
* Flexboxスタイルを解析
|
|
751
|
-
*/
|
|
752
|
-
function parseFlexStyles(html) {
|
|
753
|
-
const grid = { type: "flex" };
|
|
754
|
-
// ガター幅
|
|
755
|
-
const gapMatch = html.match(/gap:\s*(\d+)/i);
|
|
756
|
-
if (gapMatch) {
|
|
757
|
-
grid.gutterWidth = parseInt(gapMatch[1] ?? "0", 10);
|
|
758
|
-
}
|
|
759
|
-
return grid;
|
|
760
|
-
}
|
|
761
|
-
/**
|
|
762
|
-
* ブレイクポイントを解析
|
|
763
|
-
*/
|
|
764
|
-
function parseBreakpoints(html) {
|
|
765
|
-
const breakpoints = [];
|
|
766
|
-
const mediaMatches = html.matchAll(/@media[^{]*\((?:max|min)-width:\s*(\d+)px\)/gi);
|
|
767
|
-
for (const match of mediaMatches) {
|
|
768
|
-
const width = parseInt(match[1] ?? "0", 10);
|
|
769
|
-
let name = "sm";
|
|
770
|
-
if (width >= 1024)
|
|
771
|
-
name = "lg";
|
|
772
|
-
else if (width >= 768)
|
|
773
|
-
name = "md";
|
|
774
|
-
else if (width >= 480)
|
|
775
|
-
name = "sm";
|
|
776
|
-
else
|
|
777
|
-
name = "xs";
|
|
778
|
-
breakpoints.push({ name, minWidth: width });
|
|
779
|
-
}
|
|
780
|
-
return breakpoints.sort((a, b) => a.minWidth - b.minWidth);
|
|
781
|
-
}
|
|
782
|
-
// =====================================================
|
|
783
|
-
// テキスト表現生成関数
|
|
784
|
-
// =====================================================
|
|
785
|
-
/**
|
|
786
|
-
* テキスト表現を生成(Embedding用)
|
|
787
|
-
*
|
|
788
|
-
* 解析データからベクトル検索用のテキスト表現を生成します。
|
|
789
|
-
* セクション構成、色、タイポグラフィ、グリッド情報、メディア要素を自然言語で表現します。
|
|
790
|
-
*
|
|
791
|
-
* @param data - 解析済みレイアウトデータ
|
|
792
|
-
* @returns Embedding用テキスト表現
|
|
793
|
-
*
|
|
794
|
-
* @example
|
|
795
|
-
* ```typescript
|
|
796
|
-
* const data: LayoutInspectData = { ... };
|
|
797
|
-
* const text = generateTextRepresentation(data);
|
|
798
|
-
* // "Layout with 3 sections: hero, features, footer. Color palette: #3B82F6 dominant, #FFFFFF background."
|
|
799
|
-
* ```
|
|
800
|
-
*/
|
|
801
|
-
function generateTextRepresentation(data) {
|
|
802
|
-
const parts = [];
|
|
803
|
-
// セクション情報
|
|
804
|
-
if (data.sections.length > 0) {
|
|
805
|
-
const sectionTypes = data.sections.map((s) => s.type).join(", ");
|
|
806
|
-
parts.push(`Layout with ${data.sections.length} sections: ${sectionTypes}.`);
|
|
807
|
-
// heroセクションの詳細
|
|
808
|
-
const hero = data.sections.find((s) => s.type === "hero");
|
|
809
|
-
if (hero) {
|
|
810
|
-
const heading = hero.content.headings[0];
|
|
811
|
-
if (heading) {
|
|
812
|
-
parts.push(`Hero section with heading '${heading.text}'.`);
|
|
813
|
-
}
|
|
814
|
-
if (hero.content.buttons.length > 0) {
|
|
815
|
-
const buttonTexts = hero.content.buttons.map((b) => b.text).join(", ");
|
|
816
|
-
parts.push(`CTA buttons: ${buttonTexts}.`);
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
// featuresセクション
|
|
820
|
-
const features = data.sections.find((s) => s.type === "features");
|
|
821
|
-
if (features) {
|
|
822
|
-
const imageCount = features.content.images.length;
|
|
823
|
-
if (imageCount > 0) {
|
|
824
|
-
parts.push(`${imageCount} feature items with icons.`);
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
// 色情報
|
|
829
|
-
parts.push(`Color palette: ${data.colors.dominant} dominant, ${data.colors.background} background.`);
|
|
830
|
-
// タイポグラフィ情報
|
|
831
|
-
if (data.typography.fonts.length > 0) {
|
|
832
|
-
const fontNames = data.typography.fonts.map((f) => f.family).join(", ");
|
|
833
|
-
parts.push(`Typography: ${fontNames} font.`);
|
|
834
|
-
}
|
|
835
|
-
// グリッド情報
|
|
836
|
-
if (data.grid.type !== "unknown") {
|
|
837
|
-
let gridDesc = `${data.grid.type} layout`;
|
|
838
|
-
if (data.grid.columns) {
|
|
839
|
-
gridDesc += ` with ${data.grid.columns} columns`;
|
|
840
|
-
}
|
|
841
|
-
parts.push(`${gridDesc}.`);
|
|
842
|
-
}
|
|
843
|
-
// メディア要素情報(video)
|
|
844
|
-
if (data.mediaElements) {
|
|
845
|
-
const { videos, backgroundVideos } = data.mediaElements;
|
|
846
|
-
if (backgroundVideos.length > 0) {
|
|
847
|
-
parts.push(`Background video: ${backgroundVideos.length} video(s) used as background.`);
|
|
848
|
-
}
|
|
849
|
-
if (videos.length > backgroundVideos.length) {
|
|
850
|
-
const inlineCount = videos.length - backgroundVideos.length;
|
|
851
|
-
parts.push(`Media: ${inlineCount} inline video(s).`);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
return parts.join(" ");
|
|
855
|
-
}
|
|
856
|
-
// =====================================================
|
|
857
|
-
// デフォルト値ヘルパー
|
|
858
|
-
// =====================================================
|
|
859
|
-
/**
|
|
860
|
-
* デフォルトのカラーパレット情報を取得
|
|
861
|
-
*
|
|
862
|
-
* @returns デフォルトのColorPaletteInfo
|
|
863
|
-
*/
|
|
864
|
-
function getDefaultColorPalette() {
|
|
865
|
-
return {
|
|
866
|
-
palette: [],
|
|
867
|
-
dominant: "#000000",
|
|
868
|
-
background: "#FFFFFF",
|
|
869
|
-
text: "#000000",
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
/**
|
|
873
|
-
* デフォルトのタイポグラフィ情報を取得
|
|
874
|
-
*
|
|
875
|
-
* @returns デフォルトのTypographyInfo
|
|
876
|
-
*/
|
|
877
|
-
function getDefaultTypography() {
|
|
878
|
-
return {
|
|
879
|
-
fonts: [],
|
|
880
|
-
headingScale: [],
|
|
881
|
-
bodySize: 16,
|
|
882
|
-
lineHeight: 1.5,
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
/**
|
|
886
|
-
* デフォルトのグリッド情報を取得
|
|
887
|
-
*
|
|
888
|
-
* @returns デフォルトのGridInfo
|
|
889
|
-
*/
|
|
890
|
-
function getDefaultGrid() {
|
|
891
|
-
return { type: "unknown" };
|
|
892
|
-
}
|
|
893
|
-
// =====================================================
|
|
894
|
-
// Video要素検出関数
|
|
895
|
-
// =====================================================
|
|
896
|
-
/**
|
|
897
|
-
* デフォルトのメディア要素情報を取得
|
|
898
|
-
*
|
|
899
|
-
* @returns デフォルトのMediaElements
|
|
900
|
-
*/
|
|
901
|
-
function getDefaultMediaElements() {
|
|
902
|
-
return {
|
|
903
|
-
videos: [],
|
|
904
|
-
backgroundVideos: [],
|
|
905
|
-
};
|
|
906
|
-
}
|
|
907
|
-
/**
|
|
908
|
-
* Video要素の配置パターンを解析
|
|
909
|
-
*
|
|
910
|
-
* @param element - video要素または親コンテナ
|
|
911
|
-
* @param style - インラインスタイル文字列
|
|
912
|
-
* @returns 配置パターン
|
|
913
|
-
*/
|
|
914
|
-
function analyzeVideoPositioning(element, style) {
|
|
915
|
-
const styleLower = style.toLowerCase();
|
|
916
|
-
// 親要素のスタイルもチェック
|
|
917
|
-
const parentStyle = element.parentElement?.getAttribute("style")?.toLowerCase() ?? "";
|
|
918
|
-
// position: fixed + z-index: -1 パターン(ページ全体背景)
|
|
919
|
-
if ((styleLower.includes("position: fixed") ||
|
|
920
|
-
styleLower.includes("position:fixed") ||
|
|
921
|
-
parentStyle.includes("position: fixed") ||
|
|
922
|
-
parentStyle.includes("position:fixed")) &&
|
|
923
|
-
(styleLower.includes("z-index: -1") ||
|
|
924
|
-
styleLower.includes("z-index:-1") ||
|
|
925
|
-
parentStyle.includes("z-index: -1") ||
|
|
926
|
-
parentStyle.includes("z-index:-1"))) {
|
|
927
|
-
return "fixed-background";
|
|
928
|
-
}
|
|
929
|
-
// position: absolute + z-index: -1 パターン(セクション背景)
|
|
930
|
-
if ((styleLower.includes("position: absolute") ||
|
|
931
|
-
styleLower.includes("position:absolute") ||
|
|
932
|
-
parentStyle.includes("position: absolute") ||
|
|
933
|
-
parentStyle.includes("position:absolute")) &&
|
|
934
|
-
(styleLower.includes("z-index: -1") ||
|
|
935
|
-
styleLower.includes("z-index:-1") ||
|
|
936
|
-
parentStyle.includes("z-index: -1") ||
|
|
937
|
-
parentStyle.includes("z-index:-1"))) {
|
|
938
|
-
return "absolute-background";
|
|
939
|
-
}
|
|
940
|
-
return "inline";
|
|
941
|
-
}
|
|
942
|
-
/**
|
|
943
|
-
* Video要素のCSSセレクタを生成
|
|
944
|
-
*
|
|
945
|
-
* @param element - video要素
|
|
946
|
-
* @param index - 同一タグ内でのインデックス
|
|
947
|
-
* @returns CSSセレクタ文字列
|
|
948
|
-
*/
|
|
949
|
-
function generateVideoSelector(element, index) {
|
|
950
|
-
// 親要素のクラスやIDを取得して、より具体的なセレクタを生成
|
|
951
|
-
const parentClasses = [];
|
|
952
|
-
let parent = element.parentElement;
|
|
953
|
-
let depth = 0;
|
|
954
|
-
const maxDepth = 3;
|
|
955
|
-
while (parent && depth < maxDepth) {
|
|
956
|
-
const parentClass = parent.getAttribute("class");
|
|
957
|
-
const parentId = parent.getAttribute("id");
|
|
958
|
-
const parentTag = parent.tagName.toLowerCase();
|
|
959
|
-
if (parentId) {
|
|
960
|
-
parentClasses.unshift(`#${parentId}`);
|
|
961
|
-
break;
|
|
962
|
-
}
|
|
963
|
-
else if (parentClass) {
|
|
964
|
-
const firstClass = parentClass.split(" ").filter((c) => c.trim())[0];
|
|
965
|
-
if (firstClass) {
|
|
966
|
-
parentClasses.unshift(`.${firstClass}`);
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
else if (parentTag === "section" || parentTag === "header" || parentTag === "footer") {
|
|
970
|
-
parentClasses.unshift(parentTag);
|
|
971
|
-
}
|
|
972
|
-
parent = parent.parentElement;
|
|
973
|
-
depth++;
|
|
974
|
-
}
|
|
975
|
-
// セレクタを構築
|
|
976
|
-
if (parentClasses.length > 0) {
|
|
977
|
-
return `${parentClasses.join(" ")} video`;
|
|
978
|
-
}
|
|
979
|
-
// フォールバック: インデックスベース
|
|
980
|
-
return index === 0 ? "video" : `video:nth-of-type(${index + 1})`;
|
|
981
|
-
}
|
|
982
|
-
/**
|
|
983
|
-
* HTMLからVideo要素を検出する
|
|
984
|
-
*
|
|
985
|
-
* JSDOMを使用してHTML内のvideo要素を解析します。
|
|
986
|
-
* - src属性とsource子要素からURL抽出
|
|
987
|
-
* - poster属性の抽出
|
|
988
|
-
* - 再生制御属性(autoplay, loop, muted, playsinline, controls)の検出
|
|
989
|
-
* - 背景動画パターン(position: absolute/fixed + z-index: -1)の判定
|
|
990
|
-
*
|
|
991
|
-
* @param html - 解析対象のHTML文字列
|
|
992
|
-
* @returns メディア要素情報
|
|
993
|
-
*
|
|
994
|
-
* @example
|
|
995
|
-
* ```typescript
|
|
996
|
-
* const html = '<video autoplay muted loop src="/bg.mp4" style="position: absolute; z-index: -1;"></video>';
|
|
997
|
-
* const media = detectVideos(html);
|
|
998
|
-
* // { videos: [{ src: '/bg.mp4', positioning: 'absolute-background', ... }], backgroundVideos: [...] }
|
|
999
|
-
* ```
|
|
1000
|
-
*/
|
|
1001
|
-
function detectVideos(html) {
|
|
1002
|
-
const videos = [];
|
|
1003
|
-
// JSDOMでHTMLをパース
|
|
1004
|
-
const dom = new jsdom_1.JSDOM(html);
|
|
1005
|
-
const document = dom.window.document;
|
|
1006
|
-
// video要素を検出
|
|
1007
|
-
const videoElements = document.querySelectorAll("video");
|
|
1008
|
-
videoElements.forEach((videoElement, index) => {
|
|
1009
|
-
const videoInfo = {
|
|
1010
|
-
selector: generateVideoSelector(videoElement, index),
|
|
1011
|
-
};
|
|
1012
|
-
// src属性
|
|
1013
|
-
const src = videoElement.getAttribute("src");
|
|
1014
|
-
if (src) {
|
|
1015
|
-
videoInfo.src = src;
|
|
1016
|
-
}
|
|
1017
|
-
// source子要素
|
|
1018
|
-
const sourceElements = videoElement.querySelectorAll("source");
|
|
1019
|
-
if (sourceElements.length > 0) {
|
|
1020
|
-
videoInfo.sources = [];
|
|
1021
|
-
sourceElements.forEach((sourceElement) => {
|
|
1022
|
-
const sourceSrc = sourceElement.getAttribute("src");
|
|
1023
|
-
const sourceType = sourceElement.getAttribute("type");
|
|
1024
|
-
if (sourceSrc) {
|
|
1025
|
-
const sourceInfo = { src: sourceSrc };
|
|
1026
|
-
if (sourceType) {
|
|
1027
|
-
sourceInfo.type = sourceType;
|
|
1028
|
-
}
|
|
1029
|
-
videoInfo.sources.push(sourceInfo);
|
|
1030
|
-
}
|
|
1031
|
-
});
|
|
1032
|
-
}
|
|
1033
|
-
// poster属性
|
|
1034
|
-
const poster = videoElement.getAttribute("poster");
|
|
1035
|
-
if (poster) {
|
|
1036
|
-
videoInfo.poster = poster;
|
|
1037
|
-
}
|
|
1038
|
-
// 再生制御属性
|
|
1039
|
-
videoInfo.attributes = {
|
|
1040
|
-
autoplay: videoElement.hasAttribute("autoplay"),
|
|
1041
|
-
loop: videoElement.hasAttribute("loop"),
|
|
1042
|
-
muted: videoElement.hasAttribute("muted"),
|
|
1043
|
-
playsinline: videoElement.hasAttribute("playsinline"),
|
|
1044
|
-
controls: videoElement.hasAttribute("controls"),
|
|
1045
|
-
};
|
|
1046
|
-
// 配置パターン解析
|
|
1047
|
-
const style = videoElement.getAttribute("style") ?? "";
|
|
1048
|
-
videoInfo.positioning = analyzeVideoPositioning(videoElement, style);
|
|
1049
|
-
videos.push(videoInfo);
|
|
1050
|
-
});
|
|
1051
|
-
// 背景動画のフィルタ
|
|
1052
|
-
const backgroundVideos = videos.filter((v) => v.positioning === "absolute-background" || v.positioning === "fixed-background");
|
|
1053
|
-
return {
|
|
1054
|
-
videos,
|
|
1055
|
-
backgroundVideos,
|
|
1056
|
-
};
|
|
1057
|
-
}
|
|
1058
|
-
// =====================================================
|
|
1059
|
-
// VisualDecoration検出関数
|
|
1060
|
-
// =====================================================
|
|
1061
|
-
/**
|
|
1062
|
-
* VisualDecorationDetectorサービスのシングルトンインスタンス
|
|
1063
|
-
*/
|
|
1064
|
-
const visualDecorationDetector = new visual_decoration_detector_service_1.VisualDecorationDetectorService();
|
|
1065
|
-
/**
|
|
1066
|
-
* HTMLから視覚的装飾要素を検出する
|
|
1067
|
-
*
|
|
1068
|
-
* 以下の視覚効果を検出します:
|
|
1069
|
-
* - glow: box-shadowベースの発光効果
|
|
1070
|
-
* - gradient: linear-gradient, radial-gradient, conic-gradient背景
|
|
1071
|
-
* - animated-border: アニメーション付きボーダー、グラデーションボーダー
|
|
1072
|
-
* - glass-morphism: backdrop-filterベースのガラス効果
|
|
1073
|
-
*
|
|
1074
|
-
* @param html - 解析対象のHTML文字列
|
|
1075
|
-
* @returns 検出された視覚装飾の結果
|
|
1076
|
-
*
|
|
1077
|
-
* @example
|
|
1078
|
-
* ```typescript
|
|
1079
|
-
* const html = '<div style="box-shadow: 0 0 20px rgba(255, 100, 50, 0.5);"></div>';
|
|
1080
|
-
* const result = detectVisualDecorations(html);
|
|
1081
|
-
* // { decorations: [{ type: 'glow', element: 'div', properties: { color: '#ff6432', blur: 20 }, confidence: 0.9 }], ... }
|
|
1082
|
-
* ```
|
|
1083
|
-
*/
|
|
1084
|
-
function detectVisualDecorations(html) {
|
|
1085
|
-
return visualDecorationDetector.detectFromHTML(html);
|
|
1086
|
-
}
|
|
1087
|
-
/**
|
|
1088
|
-
* デフォルトのVisualDecorationsResult を取得
|
|
1089
|
-
*
|
|
1090
|
-
* @returns デフォルトのVisualDecorationsResult
|
|
1091
|
-
*/
|
|
1092
|
-
function getDefaultVisualDecorations() {
|
|
1093
|
-
return {
|
|
1094
|
-
decorations: [],
|
|
1095
|
-
summary: {
|
|
1096
|
-
glowCount: 0,
|
|
1097
|
-
gradientCount: 0,
|
|
1098
|
-
animatedBorderCount: 0,
|
|
1099
|
-
glassMorphismCount: 0,
|
|
1100
|
-
},
|
|
1101
|
-
processingTimeMs: 0,
|
|
1102
|
-
};
|
|
1103
|
-
}
|
|
1104
|
-
//# sourceMappingURL=inspect.utils.js.map
|