@tryvitris/website-harness 0.1.0-beta.6 → 0.1.0-beta.7
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 +4 -4
- package/agent/graph.yaml +0 -2
- package/agent/refs/components.md +5 -41
- package/agent/refs/compose.md +1 -1
- package/agent/refs/implement.md +2 -2
- package/agent/refs/jev.md +1 -1
- package/agent/refs/layout.md +1 -1
- package/agent/refs/storyboard.md +1 -1
- package/agent/refs/template-adaptation.md +1 -1
- package/bin/api/agent/evaluate.js +10 -15
- package/bin/api/agent/grade.js +10 -15
- package/bin/api/cli/api.js +18 -23
- package/bin/api/cli.js +20 -25
- package/bin/api/engine.js +11 -16
- package/bin/api/hosting.js +12 -17
- package/bin/api/index.js +2 -3
- package/bin/api/references.js +1 -2
- package/bin/api/render.js +2 -4
- package/bin/chunks/{chunk-4GZCAWWK.js → chunk-4MFPATAB.js} +2 -4
- package/bin/chunks/{chunk-5OOPJNGN.js → chunk-5JTBC6UK.js} +1 -4
- package/bin/chunks/{chunk-Z2UNY47A.js → chunk-5YSPWKFF.js} +1 -1
- package/bin/chunks/{chunk-FYN4T4SV.js → chunk-7V3OKLKH.js} +15 -26
- package/bin/chunks/{chunk-3CTBXY5K.js → chunk-FRABKM65.js} +1936 -1899
- package/bin/chunks/{chunk-4DM5TTLG.js → chunk-H7Y72HXC.js} +5 -5
- package/bin/chunks/{chunk-R7YELY3C.js → chunk-HL6JVA4A.js} +100 -81
- package/bin/chunks/{chunk-54JC5L35.js → chunk-O55LAQ2C.js} +3 -5
- package/bin/chunks/{chunk-VH7PM7KJ.js → chunk-P56ZDMX7.js} +4 -6
- package/bin/chunks/{chunk-7VLBEAFW.js → chunk-PGFFKPK6.js} +2 -2
- package/bin/chunks/{chunk-YQYHROLZ.js → chunk-QRWGFLUU.js} +2 -2
- package/bin/chunks/{chunk-CBEJZO4L.js → chunk-TTAUU3AZ.js} +2 -2
- package/bin/chunks/{chunk-E5Y46VBX.js → chunk-VTI32UGJ.js} +200 -103
- package/bin/chunks/{chunk-DRJQ4OOU.js → chunk-WOORR67N.js} +0 -45
- package/bin/chunks/{chunk-B5I45LFD.js → chunk-YZWEXHT4.js} +11 -13
- package/bin/chunks/{chunk-YCVGD2CG.js → chunk-ZIROO2U4.js} +1204 -1176
- package/bin/chunks/{chunk-42IXFXUD.js → chunk-ZWFG4GPG.js} +11 -15
- package/bin/chunks/{design-context-store-IAT2P2OC.js → design-context-store-DCZOAK56.js} +10 -15
- package/bin/chunks/{packets-VBMY4SQJ.js → packets-QOLWPRNV.js} +10 -15
- package/bin/chunks/{policy-2I37JUU3.js → policy-MP2JZXI3.js} +1 -1
- package/bin/chunks/{preparation-S4MG3RPL.js → preparation-T2IOD5SJ.js} +10 -15
- package/bin/chunks/{questions-HKELBDFL.js → questions-XK545GCX.js} +1 -11
- package/bin/types/src/agent/composition-authoring.d.ts +2 -2
- package/bin/types/src/agent/jev/calibration.d.ts +2 -2
- package/bin/types/src/agent/jev/config.d.ts +1 -1
- package/bin/types/src/agent/jev/questions.d.ts +0 -10
- package/bin/types/src/agent/jev/types.d.ts +0 -2
- package/bin/types/src/agent/site-inputs.d.ts +9 -1
- package/bin/types/src/agent/template-catalog.d.ts +20 -0
- package/bin/types/src/agent/theme-selection.d.ts +4 -2
- package/bin/types/src/build/archives.d.ts +2 -0
- package/bin/vitris-art.js +10 -15
- package/bin/vitris-build.js +3 -5
- package/bin/vitris-create-site.js +12 -17
- package/bin/vitris-cursor-hook.js +10 -15
- package/bin/vitris-eval.js +12 -17
- package/bin/vitris-go.js +14 -19
- package/bin/vitris-harvest.js +11 -16
- package/bin/vitris-knowledge.js +11 -16
- package/bin/vitris-launch-preflight.js +11 -17
- package/bin/vitris-motion-view.js +13 -19
- package/bin/vitris-references.js +4 -7
- package/bin/vitris-refresh.js +11 -16
- package/bin/vitris-stock.js +1 -1
- package/bin/vitris-themes.js +10 -15
- package/bin/vitris-upgrade.js +11 -16
- package/bin/vitris-verify-browser.js +43 -8
- package/bin/vitris-verify-performance.js +3 -5
- package/bin/vitris.js +20 -25
- package/design-system/MASTER.md +2 -2
- package/docs/CLI.md +2 -1
- package/docs/DISTRIBUTION.md +1 -1
- package/package.json +2 -7
- package/templates/site/README.md +2 -0
- package/templates/site/gitignore +1 -0
- package/bin/chunks/chunk-6H3T46F5.js +0 -25
- package/bin/chunks/chunk-ANMJRJQ5.js +0 -31
- package/bin/chunks/chunk-FOXUQXTV.js +0 -278
- package/bin/chunks/chunk-HNORQ74T.js +0 -40
- package/bin/chunks/chunk-T7DGRVTP.js +0 -458
- package/bin/types/src/agent/jev/block-catalog.d.ts +0 -95
- package/bin/types/src/agent/jev/component-select.d.ts +0 -102
- package/bin/types/src/blocks/library-profile.d.ts +0 -9
- package/bin/types/src/blocks/metadata.d.ts +0 -65
- package/bin/vitris-blocks.js +0 -238
- package/blocks/CONVENTIONS.md +0 -121
- package/blocks/INDEX.md +0 -130
- package/blocks/about/about-awards/README.md +0 -36
- package/blocks/about/about-awards/styles.css +0 -13
- package/blocks/about/about-awards/template.html +0 -1
- package/blocks/about/about-credentials/README.md +0 -33
- package/blocks/about/about-credentials/block.meta.json +0 -85
- package/blocks/about/about-credentials/styles.css +0 -4
- package/blocks/about/about-credentials/template.html +0 -1
- package/blocks/about/about-founder/README.md +0 -35
- package/blocks/about/about-founder/styles.css +0 -9
- package/blocks/about/about-founder/template.html +0 -1
- package/blocks/about/about-mission/README.md +0 -31
- package/blocks/about/about-mission/styles.css +0 -5
- package/blocks/about/about-mission/template.html +0 -1
- package/blocks/about/about-statement/README.md +0 -28
- package/blocks/about/about-statement/styles.css +0 -7
- package/blocks/about/about-statement/template.html +0 -1
- package/blocks/about/about-story/README.md +0 -35
- package/blocks/about/about-story/styles.css +0 -5
- package/blocks/about/about-story/template.html +0 -1
- package/blocks/about/about-timeline/README.md +0 -33
- package/blocks/about/about-timeline/styles.css +0 -8
- package/blocks/about/about-timeline/template.html +0 -1
- package/blocks/about/about-values/README.md +0 -31
- package/blocks/about/about-values/styles.css +0 -3
- package/blocks/about/about-values/template.html +0 -1
- package/blocks/blog/blog-featured/README.md +0 -39
- package/blocks/blog/blog-featured/styles.css +0 -12
- package/blocks/blog/blog-featured/template.html +0 -1
- package/blocks/blog/blog-index/README.md +0 -34
- package/blocks/blog/blog-index/styles.css +0 -6
- package/blocks/blog/blog-index/template.html +0 -1
- package/blocks/blog/blog-post-header/README.md +0 -31
- package/blocks/blog/blog-post-header/styles.css +0 -8
- package/blocks/blog/blog-post-header/template.html +0 -1
- package/blocks/contact/contact-cards/README.md +0 -32
- package/blocks/contact/contact-cards/styles.css +0 -7
- package/blocks/contact/contact-cards/template.html +0 -1
- package/blocks/contact/contact-chips/README.md +0 -41
- package/blocks/contact/contact-chips/styles.css +0 -13
- package/blocks/contact/contact-chips/template.html +0 -1
- package/blocks/contact/contact-hours/README.md +0 -41
- package/blocks/contact/contact-hours/block.meta.json +0 -87
- package/blocks/contact/contact-hours/styles.css +0 -8
- package/blocks/contact/contact-hours/template.html +0 -1
- package/blocks/contact/contact-map/README.md +0 -39
- package/blocks/contact/contact-map/styles.css +0 -10
- package/blocks/contact/contact-map/template.html +0 -1
- package/blocks/contact/contact-offices/README.md +0 -32
- package/blocks/contact/contact-offices/styles.css +0 -8
- package/blocks/contact/contact-offices/template.html +0 -1
- package/blocks/contact/contact-phone-first/README.md +0 -33
- package/blocks/contact/contact-phone-first/block.meta.json +0 -86
- package/blocks/contact/contact-phone-first/styles.css +0 -11
- package/blocks/contact/contact-phone-first/template.html +0 -1
- package/blocks/contact/contact-split/README.md +0 -43
- package/blocks/contact/contact-split/styles.css +0 -12
- package/blocks/contact/contact-split/template.html +0 -1
- package/blocks/contact/contact-visit/README.md +0 -36
- package/blocks/contact/contact-visit/block.meta.json +0 -88
- package/blocks/contact/contact-visit/styles.css +0 -13
- package/blocks/contact/contact-visit/template.html +0 -1
- package/blocks/contact/service-areas/README.md +0 -32
- package/blocks/contact/service-areas/styles.css +0 -9
- package/blocks/contact/service-areas/template.html +0 -1
- package/blocks/content/glossary/README.md +0 -35
- package/blocks/content/glossary/styles.css +0 -6
- package/blocks/content/glossary/template.html +0 -1
- package/blocks/content/list-split/README.md +0 -33
- package/blocks/content/list-split/styles.css +0 -13
- package/blocks/content/list-split/template.html +0 -1
- package/blocks/content/prose-split/README.md +0 -32
- package/blocks/content/prose-split/styles.css +0 -12
- package/blocks/content/prose-split/template.html +0 -1
- package/blocks/content/specification-ledger/README.md +0 -32
- package/blocks/content/specification-ledger/block.meta.json +0 -85
- package/blocks/content/specification-ledger/styles.css +0 -10
- package/blocks/content/specification-ledger/template.html +0 -1
- package/blocks/cta/cta-band/README.md +0 -33
- package/blocks/cta/cta-band/styles.css +0 -11
- package/blocks/cta/cta-band/template.html +0 -1
- package/blocks/cta/cta-card/README.md +0 -35
- package/blocks/cta/cta-card/styles.css +0 -8
- package/blocks/cta/cta-card/template.html +0 -1
- package/blocks/cta/cta-floating-bar/README.md +0 -28
- package/blocks/cta/cta-floating-bar/styles.css +0 -8
- package/blocks/cta/cta-floating-bar/template.html +0 -1
- package/blocks/cta/cta-inline/README.md +0 -30
- package/blocks/cta/cta-inline/styles.css +0 -9
- package/blocks/cta/cta-inline/template.html +0 -1
- package/blocks/cta/cta-newsletter/README.md +0 -34
- package/blocks/cta/cta-newsletter/styles.css +0 -8
- package/blocks/cta/cta-newsletter/template.html +0 -1
- package/blocks/cta/cta-photo-fan/README.md +0 -36
- package/blocks/cta/cta-photo-fan/styles.css +0 -14
- package/blocks/cta/cta-photo-fan/template.html +0 -1
- package/blocks/cta/cta-split/README.md +0 -38
- package/blocks/cta/cta-split/styles.css +0 -10
- package/blocks/cta/cta-split/template.html +0 -1
- package/blocks/faq/faq-accordion/README.md +0 -36
- package/blocks/faq/faq-accordion/styles.css +0 -6
- package/blocks/faq/faq-accordion/template.html +0 -1
- package/blocks/faq/faq-grouped/README.md +0 -40
- package/blocks/faq/faq-grouped/styles.css +0 -20
- package/blocks/faq/faq-grouped/template.html +0 -1
- package/blocks/faq/faq-split/README.md +0 -37
- package/blocks/faq/faq-split/styles.css +0 -5
- package/blocks/faq/faq-split/template.html +0 -1
- package/blocks/faq/faq-tabs/README.md +0 -36
- package/blocks/faq/faq-tabs/styles.css +0 -3
- package/blocks/faq/faq-tabs/template.html +0 -1
- package/blocks/feature/feature-bento/README.md +0 -33
- package/blocks/feature/feature-bento/styles.css +0 -7
- package/blocks/feature/feature-bento/template.html +0 -1
- package/blocks/feature/feature-compare-table/README.md +0 -44
- package/blocks/feature/feature-compare-table/styles.css +0 -15
- package/blocks/feature/feature-compare-table/template.html +0 -1
- package/blocks/feature/feature-comparison/README.md +0 -34
- package/blocks/feature/feature-comparison/styles.css +0 -6
- package/blocks/feature/feature-comparison/template.html +0 -1
- package/blocks/feature/feature-grid-3/README.md +0 -34
- package/blocks/feature/feature-grid-3/styles.css +0 -8
- package/blocks/feature/feature-grid-3/template.html +0 -1
- package/blocks/feature/feature-icon-list/README.md +0 -39
- package/blocks/feature/feature-icon-list/styles.css +0 -9
- package/blocks/feature/feature-icon-list/template.html +0 -1
- package/blocks/feature/feature-spotlight/README.md +0 -39
- package/blocks/feature/feature-spotlight/styles.css +0 -5
- package/blocks/feature/feature-spotlight/template.html +0 -1
- package/blocks/feature/feature-stats-band/README.md +0 -33
- package/blocks/feature/feature-stats-band/styles.css +0 -8
- package/blocks/feature/feature-stats-band/template.html +0 -1
- package/blocks/feature/feature-tabs/README.md +0 -38
- package/blocks/feature/feature-tabs/styles.css +0 -7
- package/blocks/feature/feature-tabs/template.html +0 -1
- package/blocks/feature/feature-thumb-list/README.md +0 -38
- package/blocks/feature/feature-thumb-list/styles.css +0 -13
- package/blocks/feature/feature-thumb-list/template.html +0 -1
- package/blocks/feature/feature-zigzag/README.md +0 -31
- package/blocks/feature/feature-zigzag/styles.css +0 -6
- package/blocks/feature/feature-zigzag/template.html +0 -1
- package/blocks/footer/footer-columns/README.md +0 -39
- package/blocks/footer/footer-columns/styles.css +0 -16
- package/blocks/footer/footer-columns/template.html +0 -1
- package/blocks/footer/footer-compact/README.md +0 -33
- package/blocks/footer/footer-compact/styles.css +0 -12
- package/blocks/footer/footer-compact/template.html +0 -1
- package/blocks/footer/footer-cta/README.md +0 -37
- package/blocks/footer/footer-cta/styles.css +0 -18
- package/blocks/footer/footer-cta/template.html +0 -1
- package/blocks/footer/footer-social/README.md +0 -37
- package/blocks/footer/footer-social/styles.css +0 -17
- package/blocks/footer/footer-social/template.html +0 -1
- package/blocks/footer/footer-wordmark/README.md +0 -40
- package/blocks/footer/footer-wordmark/styles.css +0 -19
- package/blocks/footer/footer-wordmark/template.html +0 -1
- package/blocks/gallery/gallery-before-after/README.md +0 -31
- package/blocks/gallery/gallery-before-after/styles.css +0 -6
- package/blocks/gallery/gallery-before-after/template.html +0 -1
- package/blocks/gallery/gallery-carousel/README.md +0 -32
- package/blocks/gallery/gallery-carousel/styles.css +0 -7
- package/blocks/gallery/gallery-carousel/template.html +0 -1
- package/blocks/gallery/gallery-grid/README.md +0 -39
- package/blocks/gallery/gallery-grid/styles.css +0 -13
- package/blocks/gallery/gallery-grid/template.html +0 -1
- package/blocks/gallery/gallery-masonry/README.md +0 -33
- package/blocks/gallery/gallery-masonry/styles.css +0 -4
- package/blocks/gallery/gallery-masonry/template.html +0 -1
- package/blocks/gallery/gallery-mosaic-split/README.md +0 -40
- package/blocks/gallery/gallery-mosaic-split/styles.css +0 -15
- package/blocks/gallery/gallery-mosaic-split/template.html +0 -1
- package/blocks/hero/hero-asymmetric/README.md +0 -34
- package/blocks/hero/hero-asymmetric/styles.css +0 -13
- package/blocks/hero/hero-asymmetric/template.html +0 -10
- package/blocks/hero/hero-before-after/README.md +0 -38
- package/blocks/hero/hero-before-after/styles.css +0 -8
- package/blocks/hero/hero-before-after/template.html +0 -19
- package/blocks/hero/hero-editorial/README.md +0 -34
- package/blocks/hero/hero-editorial/block.meta.json +0 -85
- package/blocks/hero/hero-editorial/styles.css +0 -6
- package/blocks/hero/hero-editorial/template.html +0 -10
- package/blocks/hero/hero-evidence/README.md +0 -32
- package/blocks/hero/hero-evidence/block.meta.json +0 -85
- package/blocks/hero/hero-evidence/styles.css +0 -13
- package/blocks/hero/hero-evidence/template.html +0 -1
- package/blocks/hero/hero-form/README.md +0 -46
- package/blocks/hero/hero-form/styles.css +0 -11
- package/blocks/hero/hero-form/template.html +0 -15
- package/blocks/hero/hero-menu/README.md +0 -36
- package/blocks/hero/hero-menu/styles.css +0 -7
- package/blocks/hero/hero-menu/template.html +0 -10
- package/blocks/hero/hero-overlay/README.md +0 -35
- package/blocks/hero/hero-overlay/styles.css +0 -14
- package/blocks/hero/hero-overlay/template.html +0 -10
- package/blocks/hero/hero-page/README.md +0 -35
- package/blocks/hero/hero-page/styles.css +0 -19
- package/blocks/hero/hero-page/template.html +0 -1
- package/blocks/hero/hero-product/README.md +0 -41
- package/blocks/hero/hero-product/styles.css +0 -11
- package/blocks/hero/hero-product/template.html +0 -14
- package/blocks/hero/hero-service/README.md +0 -37
- package/blocks/hero/hero-service/block.meta.json +0 -85
- package/blocks/hero/hero-service/styles.css +0 -17
- package/blocks/hero/hero-service/template.html +0 -1
- package/blocks/hero/hero-split/README.md +0 -36
- package/blocks/hero/hero-split/styles.css +0 -7
- package/blocks/hero/hero-split/template.html +0 -11
- package/blocks/hero/hero-statement/README.md +0 -33
- package/blocks/hero/hero-statement/styles.css +0 -8
- package/blocks/hero/hero-statement/template.html +0 -1
- package/blocks/hero/hero-stats/README.md +0 -37
- package/blocks/hero/hero-stats/styles.css +0 -10
- package/blocks/hero/hero-stats/template.html +0 -10
- package/blocks/hero/hero-video-still/README.md +0 -36
- package/blocks/hero/hero-video-still/styles.css +0 -9
- package/blocks/hero/hero-video-still/template.html +0 -13
- package/blocks/icons.md +0 -44
- package/blocks/incentives/incentive-banner/README.md +0 -28
- package/blocks/incentives/incentive-banner/styles.css +0 -7
- package/blocks/incentives/incentive-banner/template.html +0 -1
- package/blocks/incentives/incentive-cards/README.md +0 -31
- package/blocks/incentives/incentive-cards/styles.css +0 -4
- package/blocks/incentives/incentive-cards/template.html +0 -1
- package/blocks/navbar/nav-announcement/README.md +0 -35
- package/blocks/navbar/nav-announcement/styles.css +0 -10
- package/blocks/navbar/nav-announcement/template.html +0 -14
- package/blocks/navbar/nav-centered/README.md +0 -35
- package/blocks/navbar/nav-centered/styles.css +0 -11
- package/blocks/navbar/nav-centered/template.html +0 -12
- package/blocks/navbar/nav-minimal/README.md +0 -29
- package/blocks/navbar/nav-minimal/styles.css +0 -5
- package/blocks/navbar/nav-minimal/template.html +0 -6
- package/blocks/navbar/nav-split/README.md +0 -34
- package/blocks/navbar/nav-split/styles.css +0 -11
- package/blocks/navbar/nav-split/template.html +0 -11
- package/blocks/navbar/nav-utility/README.md +0 -37
- package/blocks/navbar/nav-utility/styles.css +0 -17
- package/blocks/navbar/nav-utility/template.html +0 -12
- package/blocks/pricing/menu-featured/README.md +0 -34
- package/blocks/pricing/menu-featured/styles.css +0 -4
- package/blocks/pricing/menu-featured/template.html +0 -1
- package/blocks/pricing/menu-sections/README.md +0 -33
- package/blocks/pricing/menu-sections/styles.css +0 -9
- package/blocks/pricing/menu-sections/template.html +0 -1
- package/blocks/pricing/pricing-table/README.md +0 -40
- package/blocks/pricing/pricing-table/styles.css +0 -9
- package/blocks/pricing/pricing-table/template.html +0 -1
- package/blocks/pricing/pricing-tiers/README.md +0 -34
- package/blocks/pricing/pricing-tiers/styles.css +0 -7
- package/blocks/pricing/pricing-tiers/template.html +0 -1
- package/blocks/pricing/pricing-toggle/README.md +0 -34
- package/blocks/pricing/pricing-toggle/styles.css +0 -10
- package/blocks/pricing/pricing-toggle/template.html +0 -1
- package/blocks/process/process-carousel/README.md +0 -33
- package/blocks/process/process-carousel/styles.css +0 -5
- package/blocks/process/process-carousel/template.html +0 -1
- package/blocks/process/process-split/README.md +0 -35
- package/blocks/process/process-split/styles.css +0 -6
- package/blocks/process/process-split/template.html +0 -1
- package/blocks/process/process-stepper/README.md +0 -40
- package/blocks/process/process-stepper/styles.css +0 -11
- package/blocks/process/process-stepper/template.html +0 -1
- package/blocks/process/process-steps/README.md +0 -35
- package/blocks/process/process-steps/styles.css +0 -6
- package/blocks/process/process-steps/template.html +0 -1
- package/blocks/process/process-sticky/README.md +0 -38
- package/blocks/process/process-sticky/styles.css +0 -12
- package/blocks/process/process-sticky/template.html +0 -1
- package/blocks/process/process-timeline/README.md +0 -35
- package/blocks/process/process-timeline/styles.css +0 -10
- package/blocks/process/process-timeline/template.html +0 -1
- package/blocks/services/services-cards/README.md +0 -34
- package/blocks/services/services-cards/styles.css +0 -3
- package/blocks/services/services-cards/template.html +0 -1
- package/blocks/services/services-carousel/README.md +0 -34
- package/blocks/services/services-carousel/styles.css +0 -6
- package/blocks/services/services-carousel/template.html +0 -1
- package/blocks/services/services-list/README.md +0 -32
- package/blocks/services/services-list/block.meta.json +0 -85
- package/blocks/services/services-list/styles.css +0 -10
- package/blocks/services/services-list/template.html +0 -1
- package/blocks/services/services-menu/README.md +0 -39
- package/blocks/services/services-menu/styles.css +0 -6
- package/blocks/services/services-menu/template.html +0 -1
- package/blocks/services/services-packages/README.md +0 -34
- package/blocks/services/services-packages/styles.css +0 -6
- package/blocks/services/services-packages/template.html +0 -1
- package/blocks/services/services-panels/README.md +0 -36
- package/blocks/services/services-panels/styles.css +0 -15
- package/blocks/services/services-panels/template.html +0 -1
- package/blocks/services/services-photo-grid/README.md +0 -39
- package/blocks/services/services-photo-grid/styles.css +0 -10
- package/blocks/services/services-photo-grid/template.html +0 -1
- package/blocks/services/services-priority/README.md +0 -33
- package/blocks/services/services-priority/block.meta.json +0 -86
- package/blocks/services/services-priority/styles.css +0 -16
- package/blocks/services/services-priority/template.html +0 -1
- package/blocks/stats/stats-cards/README.md +0 -31
- package/blocks/stats/stats-cards/styles.css +0 -4
- package/blocks/stats/stats-cards/template.html +0 -1
- package/blocks/stats/stats-mosaic/README.md +0 -27
- package/blocks/stats/stats-mosaic/styles.css +0 -9
- package/blocks/stats/stats-mosaic/template.html +0 -1
- package/blocks/stats/stats-row/README.md +0 -29
- package/blocks/stats/stats-row/styles.css +0 -8
- package/blocks/stats/stats-row/template.html +0 -1
- package/blocks/stats/stats-split/README.md +0 -35
- package/blocks/stats/stats-split/styles.css +0 -3
- package/blocks/stats/stats-split/template.html +0 -1
- package/blocks/team/team-featured/README.md +0 -42
- package/blocks/team/team-featured/styles.css +0 -9
- package/blocks/team/team-featured/template.html +0 -1
- package/blocks/team/team-grid/README.md +0 -35
- package/blocks/team/team-grid/styles.css +0 -8
- package/blocks/team/team-grid/template.html +0 -1
- package/blocks/team/team-list/README.md +0 -32
- package/blocks/team/team-list/styles.css +0 -7
- package/blocks/team/team-list/template.html +0 -1
- package/blocks/testimonial/testimonial-carousel/README.md +0 -32
- package/blocks/testimonial/testimonial-carousel/styles.css +0 -7
- package/blocks/testimonial/testimonial-carousel/template.html +0 -1
- package/blocks/testimonial/testimonial-grid/README.md +0 -32
- package/blocks/testimonial/testimonial-grid/styles.css +0 -5
- package/blocks/testimonial/testimonial-grid/template.html +0 -1
- package/blocks/testimonial/testimonial-mosaic/README.md +0 -38
- package/blocks/testimonial/testimonial-mosaic/styles.css +0 -14
- package/blocks/testimonial/testimonial-mosaic/template.html +0 -1
- package/blocks/testimonial/testimonial-platform/README.md +0 -34
- package/blocks/testimonial/testimonial-platform/styles.css +0 -17
- package/blocks/testimonial/testimonial-platform/template.html +0 -1
- package/blocks/testimonial/testimonial-rating/README.md +0 -28
- package/blocks/testimonial/testimonial-rating/styles.css +0 -6
- package/blocks/testimonial/testimonial-rating/template.html +0 -1
- package/blocks/testimonial/testimonial-spotlight/README.md +0 -31
- package/blocks/testimonial/testimonial-spotlight/styles.css +0 -9
- package/blocks/testimonial/testimonial-spotlight/template.html +0 -1
- package/blocks/testimonial/testimonial-switcher/README.md +0 -39
- package/blocks/testimonial/testimonial-switcher/styles.css +0 -23
- package/blocks/testimonial/testimonial-switcher/template.html +0 -1
- package/blocks/testimonial/testimonial-wall/README.md +0 -34
- package/blocks/testimonial/testimonial-wall/styles.css +0 -7
- package/blocks/testimonial/testimonial-wall/template.html +0 -1
- package/blocks/trust-strip/trust-badges/README.md +0 -30
- package/blocks/trust-strip/trust-badges/styles.css +0 -5
- package/blocks/trust-strip/trust-badges/template.html +0 -1
- package/blocks/trust-strip/trust-certs/README.md +0 -31
- package/blocks/trust-strip/trust-certs/styles.css +0 -12
- package/blocks/trust-strip/trust-certs/template.html +0 -1
- package/blocks/trust-strip/trust-logos/README.md +0 -32
- package/blocks/trust-strip/trust-logos/styles.css +0 -5
- package/blocks/trust-strip/trust-logos/template.html +0 -1
- package/blocks/trust-strip/trust-quote/README.md +0 -29
- package/blocks/trust-strip/trust-quote/styles.css +0 -5
- package/blocks/trust-strip/trust-quote/template.html +0 -1
- package/blocks/trust-strip/trust-reviews/README.md +0 -35
- package/blocks/trust-strip/trust-reviews/styles.css +0 -9
- package/blocks/trust-strip/trust-reviews/template.html +0 -1
- package/blocks/work/case-alternating/README.md +0 -34
- package/blocks/work/case-alternating/block.meta.json +0 -86
- package/blocks/work/case-alternating/styles.css +0 -7
- package/blocks/work/case-alternating/template.html +0 -1
- package/blocks/work/case-carousel/README.md +0 -26
- package/blocks/work/case-carousel/styles.css +0 -7
- package/blocks/work/case-carousel/template.html +0 -1
- package/blocks/work/case-header/README.md +0 -38
- package/blocks/work/case-header/styles.css +0 -18
- package/blocks/work/case-header/template.html +0 -1
- package/blocks/work/project-evidence/README.md +0 -35
- package/blocks/work/project-evidence/block.meta.json +0 -87
- package/blocks/work/project-evidence/styles.css +0 -12
- package/blocks/work/project-evidence/template.html +0 -1
- package/blocks/work/project-grid/README.md +0 -38
- package/blocks/work/project-grid/styles.css +0 -9
- package/blocks/work/project-grid/template.html +0 -1
package/docs/DISTRIBUTION.md
CHANGED
|
@@ -27,7 +27,7 @@ At the same configuration level, current names take precedence. CLI build overri
|
|
|
27
27
|
Stop its workflow first. From the harness checkout, preview changes:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
node bin/vitris-migrate-site.js --site ../acme --harness ../vitris-harness/tryvitris-website-harness-0.1.0-beta.
|
|
30
|
+
node bin/vitris-migrate-site.js --site ../acme --harness ../vitris-harness/tryvitris-website-harness-0.1.0-beta.7.tgz
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Add `--apply` to perform the displayed changes. The command backs up affected files under the client's `agent-backups/`, renames the package dependency and known script paths, and converts the backend origin key. Conflicting old/new origins fail before writes. Client pages, components, media, secrets, existing lockfile, and workflow state are preserved. Repeating it makes no further edits.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvitris/website-harness",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.7",
|
|
4
4
|
"description": "Vitris agent harness for building and verifying customer websites, with a static compiler, media tools, and optional Cloudflare backend.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
"vitris-go": "bin/vitris-go.js",
|
|
81
81
|
"vitris-launch-preflight": "bin/vitris-launch-preflight.js",
|
|
82
82
|
"vitris-knowledge": "bin/vitris-knowledge.js",
|
|
83
|
-
"vitris-blocks": "bin/vitris-blocks.js",
|
|
84
83
|
"vitris-sign-publish-bundle": "bin/vitris-sign-publish-bundle.js",
|
|
85
84
|
"vitris-preview": "bin/vitris-preview.js",
|
|
86
85
|
"vitris-refresh": "bin/vitris-refresh.js",
|
|
@@ -104,7 +103,6 @@
|
|
|
104
103
|
"bin/types/**/*.d.ts",
|
|
105
104
|
"templates/site",
|
|
106
105
|
"agent",
|
|
107
|
-
"blocks",
|
|
108
106
|
"design-system/MASTER.md",
|
|
109
107
|
"design-system/knowledge",
|
|
110
108
|
"docs/CLI.md",
|
|
@@ -142,9 +140,6 @@
|
|
|
142
140
|
"harvest": "node --experimental-strip-types scripts/harvest.ts",
|
|
143
141
|
"eval-refine": "node --experimental-strip-types scripts/eval-refine.ts",
|
|
144
142
|
"go": "node --experimental-strip-types scripts/workflow.ts",
|
|
145
|
-
"blocks:index": "node --experimental-strip-types scripts/write-blocks-index.ts",
|
|
146
|
-
"blocks:preview": "node --experimental-strip-types scripts/blocks-preview.ts",
|
|
147
|
-
"blocks:serve": "node --experimental-strip-types scripts/blocks-preview.ts --serve",
|
|
148
143
|
"dev": "npm run catalog && wrangler d1 migrations apply vitris --local --persist-to .wrangler/state && wrangler dev --local --persist-to .wrangler/state",
|
|
149
144
|
"db:migrate": "wrangler d1 migrations apply vitris --local --persist-to .wrangler/state",
|
|
150
145
|
"db:seed": "wrangler d1 execute vitris --local --persist-to .wrangler/state --file=migrations/0002_seed.sql",
|
|
@@ -152,7 +147,7 @@
|
|
|
152
147
|
"preview:prepare": "node scripts/prepare-worker-preview.mjs",
|
|
153
148
|
"preview:worker": "wrangler preview --config .wrangler-preview.jsonc --ignore-base-config",
|
|
154
149
|
"typecheck": "tsc --noEmit",
|
|
155
|
-
"test": "node --experimental-strip-types --test --test-concurrency=4 src/icons.test.ts src/template-icon-migration.test.ts src/engine.test.ts src/upgrade.test.ts src/hosting.test.ts src/render.test.ts src/analytics.test.ts src/cookie-compliance.test.ts src/schema.test.ts src/patch.test.ts src/jobs.test.ts src/onboard.test.ts src/github-preview.test.ts src/agent.test.ts src/
|
|
150
|
+
"test": "node --experimental-strip-types --test --test-concurrency=4 src/icons.test.ts src/template-icon-migration.test.ts src/engine.test.ts src/upgrade.test.ts src/hosting.test.ts src/render.test.ts src/analytics.test.ts src/cookie-compliance.test.ts src/schema.test.ts src/patch.test.ts src/jobs.test.ts src/onboard.test.ts src/github-preview.test.ts src/agent.test.ts src/workflow.test.ts src/design-run.test.ts src/creative-profile.test.ts src/creative-efficiency.test.ts src/refine.test.ts src/critic-calibration.test.ts src/cli.test.ts src/jev.test.ts src/lifecycle.test.ts src/theme-lifecycle-policy.test.ts src/template-adaptation.test.ts src/adaptation-checkpoint.test.ts src/template-motion.test.ts src/template-motion-browser.test.ts src/experience-browser.test.ts src/jev-capabilities.test.ts src/jev-phase8.test.ts src/jev-prepilot.test.ts src/jev-phase0.test.ts src/jev-sept20.test.ts src/trace.test.ts src/cursor-hook.test.ts src/design-intelligence.test.ts src/design-context-integration.test.ts src/package-bin.test.ts src/knowledge-layers.test.ts src/launch-preflight.test.ts src/page-transfer.test.ts src/worker-publish.test.ts src/worker-preview.test.ts src/worker-security.test.ts src/harness-upgrades.test.ts src/stock-media.test.ts src/harness-distribution.test.ts src/storyboard-media.test.ts src/added-media.test.ts src/lead-forms.test.ts src/composition.test.ts src/reference-library.test.ts src/art-direction.test.ts src/scroll-motion.test.ts src/scroll-motion-browser.test.ts src/artistic-motion-browser.test.ts src/page-composition.test.ts src/reference-quality.test.ts src/production-quality.test.ts src/browser-focus.test.ts src/browser-work-queue.test.ts src/quality-subject.test.ts src/preview-cli.test.ts src/theme-selection.test.ts src/site-inputs.test.ts src/fieldwell.test.ts src/still-field.test.ts src/current-craft.test.ts src/copper-chair.test.ts src/clearline.test.ts src/template-cloud.test.ts src/contact-forms.test.ts src/contact-forms-operations.test.ts src/contact-forms-browser.test.ts src/preserve.test.ts src/release-safety.test.ts src/performance-media.test.ts src/lighthouse-browser.test.ts src/browser-timeout.test.ts src/browser-output-contract.test.ts src/template-motion-snapshot.test.ts",
|
|
156
151
|
"eval:jev": "node --experimental-strip-types scripts/eval-jev.ts",
|
|
157
152
|
"benchmark": "node --experimental-strip-types scripts/benchmark.ts",
|
|
158
153
|
"refresh-agent": "node --experimental-strip-types scripts/refresh-agent.ts",
|
package/templates/site/README.md
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
This is the starting directory for this customer website. Open this directory in your coding agent. The versioned `@tryvitris/website-harness` dependency supplies the tools; this repository owns the customer content, components, brand, and workflow progress.
|
|
4
4
|
|
|
5
5
|
Vitris site repo. The harness compiles `pages/` + `components/` to static `dist/`.
|
|
6
|
+
|
|
7
|
+
When a new `dist/` replaces a prior build, Vitris keeps up to three unmodified managed archives under `.vitris/build-archives/`. Existing `dist.previous-*` folders and modified or unrecognized archives are preserved. The current `dist/` is not included in the archive limit.
|
|
6
8
|
|
|
7
9
|
## Layout
|
|
8
10
|
|
package/templates/site/gitignore
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// src/agent/composition-authoring.ts
|
|
2
|
-
import { createHash } from "node:crypto";
|
|
3
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
var COMPOSITION_LESSON_RELEASE = "2026-09-28.1";
|
|
6
|
-
function resolveDesignAuthoring(root) {
|
|
7
|
-
const path = join(root, "launch.json");
|
|
8
|
-
const launch = existsSync(path) ? JSON.parse(readFileSync(path, "utf8")) : {};
|
|
9
|
-
const raw = launch.designAuthoring;
|
|
10
|
-
if (raw === void 0) return policy("blocks-v0", null);
|
|
11
|
-
if (!raw || typeof raw !== "object" || Array.isArray(raw)) throw new Error("launch.json designAuthoring must be an object");
|
|
12
|
-
const config = raw;
|
|
13
|
-
if (config.mode === "blocks-v0" && (config.lessonRelease === void 0 || config.lessonRelease === null)) return policy("blocks-v0", null);
|
|
14
|
-
if (config.mode === "composition-v1" && config.lessonRelease === COMPOSITION_LESSON_RELEASE) return policy("composition-v1", COMPOSITION_LESSON_RELEASE);
|
|
15
|
-
throw new Error(`Unsupported launch.json designAuthoring mode/release: ${String(config.mode)}/${String(config.lessonRelease)}. Use blocks-v0, or composition-v1 with ${COMPOSITION_LESSON_RELEASE}.`);
|
|
16
|
-
}
|
|
17
|
-
function policy(mode, lessonRelease) {
|
|
18
|
-
const hash = createHash("sha256").update(JSON.stringify({ mode, lessonRelease })).digest("hex");
|
|
19
|
-
return { mode, lessonRelease, hash };
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
COMPOSITION_LESSON_RELEASE,
|
|
24
|
-
resolveDesignAuthoring
|
|
25
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// src/compile/frontmatter.ts
|
|
2
|
-
function parseFrontmatter(raw) {
|
|
3
|
-
const text = raw.replace(/^\uFEFF/, "");
|
|
4
|
-
if (!text.startsWith("---")) {
|
|
5
|
-
return { meta: {}, body: text.trim() };
|
|
6
|
-
}
|
|
7
|
-
const end = text.indexOf("\n---", 3);
|
|
8
|
-
if (end === -1) {
|
|
9
|
-
return { meta: {}, body: text.trim() };
|
|
10
|
-
}
|
|
11
|
-
const block = text.slice(3, end).trim();
|
|
12
|
-
const body = text.slice(end + 4).replace(/^\r?\n/, "");
|
|
13
|
-
const meta = {};
|
|
14
|
-
for (const line of block.split(/\r?\n/)) {
|
|
15
|
-
const trimmed = line.trim();
|
|
16
|
-
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
17
|
-
const colon = trimmed.indexOf(":");
|
|
18
|
-
if (colon === -1) continue;
|
|
19
|
-
const key = trimmed.slice(0, colon).trim();
|
|
20
|
-
let value = trimmed.slice(colon + 1).trim();
|
|
21
|
-
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
22
|
-
value = value.slice(1, -1);
|
|
23
|
-
}
|
|
24
|
-
if (key) meta[key] = value;
|
|
25
|
-
}
|
|
26
|
-
return { meta, body: body.trim() };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
parseFrontmatter
|
|
31
|
-
};
|
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
findHarnessRoot
|
|
3
|
-
} from "./chunk-HNORQ74T.js";
|
|
4
|
-
|
|
5
|
-
// src/blocks/metadata.ts
|
|
6
|
-
import { createHash } from "node:crypto";
|
|
7
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
8
|
-
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
9
|
-
var hash = (parts) => createHash("sha256").update(parts.join("\n---vitris-block-source---\n")).digest("hex");
|
|
10
|
-
function blockSourceHash(dir) {
|
|
11
|
-
return hash(["README.md", "template.html", "styles.css", "island.js"].map((name) => existsSync(join(dir, name)) ? readFileSync(join(dir, name), "utf8") : ""));
|
|
12
|
-
}
|
|
13
|
-
function blockPreviewRendererHash(root) {
|
|
14
|
-
return hash(["scripts/blocks-preview.ts", "src/compile/flatten.ts", "src/compile/site.ts", "src/compile/primitives.ts", "src/theme.ts", "src/types.ts"].map((name) => readFileSync(join(root, name), "utf8")));
|
|
15
|
-
}
|
|
16
|
-
function readBlockMeta(dir, id, slots) {
|
|
17
|
-
const file = join(dir, "block.meta.json");
|
|
18
|
-
if (!existsSync(file)) return void 0;
|
|
19
|
-
let m;
|
|
20
|
-
try {
|
|
21
|
-
m = JSON.parse(readFileSync(file, "utf8"));
|
|
22
|
-
} catch (e) {
|
|
23
|
-
throw new Error(`${id} metadata is not valid JSON: ${String(e)}`);
|
|
24
|
-
}
|
|
25
|
-
const errors = [];
|
|
26
|
-
const obj = (value) => value && typeof value === "object" && !Array.isArray(value);
|
|
27
|
-
const str = (value) => typeof value === "string" && value.trim().length > 0;
|
|
28
|
-
const strings = (value) => Array.isArray(value) && value.every(str);
|
|
29
|
-
if (m?.schemaVersion !== 1) errors.push("schemaVersion must be 1");
|
|
30
|
-
if (m?.id !== id) errors.push(`id must be ${id}`);
|
|
31
|
-
if (!Number.isInteger(m?.revision) || m.revision < 1) errors.push("revision must be a positive integer");
|
|
32
|
-
if (!["draft", "inspected", "pilot", "stable", "deprecated"].includes(m?.status)) errors.push("invalid status");
|
|
33
|
-
if (!str(m?.owner)) errors.push("owner is required");
|
|
34
|
-
if (m?.sourceHash !== blockSourceHash(dir)) errors.push("sourceHash is stale");
|
|
35
|
-
for (const [group, fields] of Object.entries({
|
|
36
|
-
fit: ["visitorJobs", "pageRoles", "useWhen", "avoidWhen"],
|
|
37
|
-
content: ["requiredSlots", "optionalSlots"],
|
|
38
|
-
composition: ["geometry"],
|
|
39
|
-
adaptation: ["flexible", "invariants", "customWhen"],
|
|
40
|
-
interaction: ["islands"],
|
|
41
|
-
evidence: ["provenance", "testedContexts", "accessibility"]
|
|
42
|
-
})) {
|
|
43
|
-
if (!obj(m?.[group])) {
|
|
44
|
-
errors.push(`${group} is required`);
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
for (const field of fields) if (!strings(m[group][field])) errors.push(`${group}.${field} must be a string array`);
|
|
48
|
-
}
|
|
49
|
-
if (!obj(m?.media) || !Number.isInteger(m.media.min) || !Number.isInteger(m.media.max) || m.media.min < 0 || m.media.max < m.media.min || !str(m.media.optionalBehavior) || !strings(m.media.aspect)) errors.push("invalid media contract");
|
|
50
|
-
if (!Array.isArray(m?.content?.testedItemCounts) || !m.content.testedItemCounts.every((n) => Number.isInteger(n) && n >= 0)) errors.push("invalid testedItemCounts");
|
|
51
|
-
for (const field of ["hierarchy", "alignment", "density", "mediaProminence", "boundary"]) if (!str(m?.composition?.[field])) errors.push(`composition.${field} is required`);
|
|
52
|
-
for (const field of ["readingOrder", "reflow", "crop"]) if (!str(m?.responsive?.[field])) errors.push(`responsive.${field} is required`);
|
|
53
|
-
if (!str(m?.interaction?.behavior)) errors.push("interaction.behavior is required");
|
|
54
|
-
if (m?.evidence?.previewManifest !== void 0) {
|
|
55
|
-
const manifest = m.evidence.previewManifest;
|
|
56
|
-
const target = str(manifest) ? resolve(dir, manifest) : "";
|
|
57
|
-
const rel = target ? relative(resolve(dir, "../../.."), target) : "";
|
|
58
|
-
const withinLibrary = target && !rel.startsWith("..") && !isAbsolute(rel);
|
|
59
|
-
if (!withinLibrary) errors.push("evidence.previewManifest must name a file in the kernel");
|
|
60
|
-
else if (!existsSync(target) && m.status !== "draft") errors.push("previewManifest is missing");
|
|
61
|
-
}
|
|
62
|
-
if (errors.length) throw new Error(`${id} metadata: ${errors.join("; ")}`);
|
|
63
|
-
const expectedRequired = slots.filter((s) => s.required).map((s) => s.name).sort();
|
|
64
|
-
const expectedOptional = slots.filter((s) => !s.required).map((s) => s.name).sort();
|
|
65
|
-
if (JSON.stringify([...m.content.requiredSlots].sort()) !== JSON.stringify(expectedRequired) || JSON.stringify([...m.content.optionalSlots].sort()) !== JSON.stringify(expectedOptional)) {
|
|
66
|
-
throw new Error(`${id} metadata slots disagree with template/README`);
|
|
67
|
-
}
|
|
68
|
-
return m;
|
|
69
|
-
}
|
|
70
|
-
function blockPreviewEvidence(dir, meta) {
|
|
71
|
-
if (!meta?.evidence.previewManifest) return { status: "unavailable" };
|
|
72
|
-
const file = join(dir, meta.evidence.previewManifest);
|
|
73
|
-
if (!existsSync(file)) return { status: "unavailable" };
|
|
74
|
-
try {
|
|
75
|
-
const manifest = JSON.parse(readFileSync(file, "utf8"));
|
|
76
|
-
const images = manifest.images;
|
|
77
|
-
const valid = manifest.blockId === meta.id && manifest.blockRevision === meta.revision && manifest.sourceHash === blockSourceHash(dir) && manifest.rendererHash === blockPreviewRendererHash(join(dir, "../../..")) && ["mobile", "desktop"].every((kind) => {
|
|
78
|
-
const image = images?.[kind];
|
|
79
|
-
const path = image?.file && join(dirname(file), image.file);
|
|
80
|
-
return path && existsSync(path) && createHash("sha256").update(readFileSync(path)).digest("hex") === image.hash;
|
|
81
|
-
});
|
|
82
|
-
return {
|
|
83
|
-
status: valid ? "current" : "stale",
|
|
84
|
-
mobile: images?.mobile?.file && join(dirname(file), images.mobile.file),
|
|
85
|
-
desktop: images?.desktop?.file && join(dirname(file), images.desktop.file),
|
|
86
|
-
hashes: { mobile: images?.mobile?.hash, desktop: images?.desktop?.hash }
|
|
87
|
-
};
|
|
88
|
-
} catch {
|
|
89
|
-
return { status: "stale" };
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// src/agent/jev/block-catalog.ts
|
|
94
|
-
import { createHash as createHash2 } from "node:crypto";
|
|
95
|
-
import { existsSync as existsSync2, readdirSync, readFileSync as readFileSync2 } from "node:fs";
|
|
96
|
-
import { join as join2 } from "node:path";
|
|
97
|
-
function sha(text) {
|
|
98
|
-
return createHash2("sha256").update(text).digest("hex");
|
|
99
|
-
}
|
|
100
|
-
function kernelBlocksRoot(kernel = findHarnessRoot()) {
|
|
101
|
-
return join2(kernel, "blocks");
|
|
102
|
-
}
|
|
103
|
-
function parseSlots(readme, template) {
|
|
104
|
-
const table = readme.match(/## Slots\s*\n([\s\S]*?)\n\n## /)?.[1] ?? "";
|
|
105
|
-
const documented = /* @__PURE__ */ new Map();
|
|
106
|
-
for (const row of table.matchAll(/^\|\s*`([^`]+)`\s*\|\s*(.+?)\s*\|\s*$/gm)) {
|
|
107
|
-
documented.set(row[1] === "(default)" ? "default" : row[1], row[2]);
|
|
108
|
-
}
|
|
109
|
-
const names = [...template.matchAll(/<slot(?:\s+name="([^"]+)")?[^>]*>/g)].map((m) => m[1] || "default");
|
|
110
|
-
const unique = [...new Set(names)];
|
|
111
|
-
return unique.map((name) => {
|
|
112
|
-
const desc = documented.get(name) || "";
|
|
113
|
-
const required = !/optional/i.test(desc);
|
|
114
|
-
return { name, required, description: desc };
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
function geometryFrom(html, css) {
|
|
118
|
-
const g = [];
|
|
119
|
-
if (/\bsplit\b/.test(html) || /\bsplit\b/.test(css)) g.push("split");
|
|
120
|
-
if (/\bgrid\b/.test(html)) g.push("grid");
|
|
121
|
-
if (/ratio-/.test(html) || /aspect-ratio/.test(css)) g.push("media-frame");
|
|
122
|
-
if (/section--roomy/.test(html)) g.push("roomy");
|
|
123
|
-
if (/sticky/.test(html) || /position:\s*sticky/.test(css)) g.push("sticky");
|
|
124
|
-
return g;
|
|
125
|
-
}
|
|
126
|
-
function loadBlockLibrary(kernel) {
|
|
127
|
-
const blocksRoot = kernel ? join2(kernel, "blocks") : kernelBlocksRoot();
|
|
128
|
-
const blocks = [];
|
|
129
|
-
if (!existsSync2(blocksRoot)) return { generatedFrom: "readme+index+template", blocks };
|
|
130
|
-
for (const cat of readdirSync(blocksRoot, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort()) {
|
|
131
|
-
for (const name of readdirSync(join2(blocksRoot, cat), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort()) {
|
|
132
|
-
const dir = join2(blocksRoot, cat, name);
|
|
133
|
-
const readmePath = join2(dir, "README.md");
|
|
134
|
-
const templatePath = join2(dir, "template.html");
|
|
135
|
-
if (!existsSync2(readmePath) || !existsSync2(templatePath)) continue;
|
|
136
|
-
const readme = readFileSync2(readmePath, "utf8");
|
|
137
|
-
const template = readFileSync2(templatePath, "utf8");
|
|
138
|
-
const css = existsSync2(join2(dir, "styles.css")) ? readFileSync2(join2(dir, "styles.css"), "utf8") : "";
|
|
139
|
-
const look = readme.split("\n").map((l) => l.trim()).find((l) => l && !l.startsWith("#") && !l.startsWith("-") && !l.startsWith("```")) || "";
|
|
140
|
-
const media = (readme.match(/\*\*Media:\*\*\s*(.+)/) || [])[1] || "";
|
|
141
|
-
const registers = ((readme.match(/\*\*Registers:\*\*\s*(.+)/) || [])[1] || "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
142
|
-
const variantLine = (readme.match(/\*\*Variants:\*\*\s*(.+)/) || [])[1] || "";
|
|
143
|
-
const variants = !variantLine || variantLine.startsWith("(none)") ? [] : variantLine.split(",").map((s) => s.trim()).filter(Boolean);
|
|
144
|
-
const example = (readme.match(/## Example\s*```html\s*([\s\S]*?)```/) || [])[1]?.trim() || "";
|
|
145
|
-
const slots = parseSlots(readme, template);
|
|
146
|
-
const meta = readBlockMeta(dir, `${cat}/${name}`, slots);
|
|
147
|
-
const previewPath = `dist/blocks/${cat}/${name}.html`;
|
|
148
|
-
blocks.push({
|
|
149
|
-
id: `${cat}/${name}`,
|
|
150
|
-
category: cat,
|
|
151
|
-
name,
|
|
152
|
-
look,
|
|
153
|
-
media,
|
|
154
|
-
mediaRequired: meta ? meta.media.min > 0 : /required|one |photo|portrait|cover|map/i.test(media) && !/optional|none/i.test(media),
|
|
155
|
-
registers,
|
|
156
|
-
variants,
|
|
157
|
-
slots,
|
|
158
|
-
interaction: meta ? meta.interaction.islands.length ? "island" : "static" : existsSync2(join2(dir, "island.js")) ? "island" : "static",
|
|
159
|
-
mobile: { hasMediaQuery: /@media/.test(css), notes: /@media/.test(css) ? "has-breakpoint" : "no-breakpoint" },
|
|
160
|
-
geometry: meta?.composition.geometry ?? geometryFrom(template, css),
|
|
161
|
-
example,
|
|
162
|
-
examplePath: `${cat}/${name}/README.md#example`,
|
|
163
|
-
previewPath,
|
|
164
|
-
previewHash: example ? sha(example + "\n" + readme + "\n" + template + "\n" + css) : sha(readme + "\n" + template + "\n" + css),
|
|
165
|
-
seesImages: false,
|
|
166
|
-
dir,
|
|
167
|
-
meta,
|
|
168
|
-
metadataSource: meta ? "block.meta.json" : "legacy-readme",
|
|
169
|
-
previewEvidence: blockPreviewEvidence(dir, meta)
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return { generatedFrom: "readme+index+template", blocks };
|
|
174
|
-
}
|
|
175
|
-
function libraryContentHash(lib) {
|
|
176
|
-
return sha(lib.blocks.map((b) => JSON.stringify({
|
|
177
|
-
id: b.id,
|
|
178
|
-
look: b.look,
|
|
179
|
-
media: b.media,
|
|
180
|
-
slots: b.slots,
|
|
181
|
-
interaction: b.interaction,
|
|
182
|
-
geometry: b.geometry,
|
|
183
|
-
example: b.example,
|
|
184
|
-
registers: b.registers,
|
|
185
|
-
variants: b.variants,
|
|
186
|
-
mobile: b.mobile,
|
|
187
|
-
previewHash: b.previewHash,
|
|
188
|
-
meta: b.meta,
|
|
189
|
-
previewEvidence: { status: b.previewEvidence?.status, hashes: b.previewEvidence?.hashes }
|
|
190
|
-
})).join("\n"));
|
|
191
|
-
}
|
|
192
|
-
function hardFilterBlocks(lib, state) {
|
|
193
|
-
return lib.blocks.filter((b) => !b.meta || state.mediaCount >= b.meta.media.min);
|
|
194
|
-
}
|
|
195
|
-
function lexicalShortlist(lib, state, limit = 8) {
|
|
196
|
-
const role = (state.sectionRole || state.pageRole || state.sectionId || "").toLowerCase();
|
|
197
|
-
const aliases = {
|
|
198
|
-
header: ["navbar"],
|
|
199
|
-
navbar: ["navbar"],
|
|
200
|
-
proof: ["testimonial", "trust-strip", "about", "stats"],
|
|
201
|
-
testimonial: ["testimonial", "trust-strip"],
|
|
202
|
-
service: ["services"],
|
|
203
|
-
services: ["services"],
|
|
204
|
-
project: ["work", "gallery"],
|
|
205
|
-
work: ["work", "gallery"]
|
|
206
|
-
};
|
|
207
|
-
const matchingCategories = /* @__PURE__ */ new Set([role, ...aliases[role] || []]);
|
|
208
|
-
const terms = `${state.visitorJob} ${state.sectionPurpose || ""}`.toLowerCase().match(/[a-z]{4,}/g) || [];
|
|
209
|
-
const synonym = { licenses: "credential", licensed: "credential", qualifications: "credential", trust: "proof", compare: "comparison" };
|
|
210
|
-
const jobTerms = [...new Set(terms.flatMap((term) => [term, synonym[term]].filter((value) => !!value)))];
|
|
211
|
-
const scored = lib.blocks.map((b) => {
|
|
212
|
-
let score = 0;
|
|
213
|
-
if (matchingCategories.has(b.category) || b.id.includes(role) || b.name.includes(role)) score += 5;
|
|
214
|
-
const searchable = `${b.look} ${b.meta?.fit.visitorJobs.join(" ") || ""} ${b.meta?.fit.pageRoles.join(" ") || ""}`.toLowerCase();
|
|
215
|
-
score += Math.min(4, jobTerms.filter((term) => searchable.includes(term)).length * 2);
|
|
216
|
-
if (state.mediaCount === 0 && (b.meta?.media.min === 0 || /none|optional/i.test(b.media))) score += 2;
|
|
217
|
-
if (state.mediaCount > 0 && b.mediaRequired) score += 2;
|
|
218
|
-
if (state.interaction === "island" && b.interaction === "island") score += 2;
|
|
219
|
-
if (state.interaction === "accordion" && /faq|accordion/.test(b.id)) score += 3;
|
|
220
|
-
if (state.emphasis && b.look.toLowerCase().includes(state.emphasis.toLowerCase())) score += 1;
|
|
221
|
-
return { b, score };
|
|
222
|
-
}).filter((s) => s.score > 0).sort((a, c) => c.score - a.score || a.b.id.localeCompare(c.b.id));
|
|
223
|
-
const selected = [];
|
|
224
|
-
while (selected.length < Math.max(0, limit - 1) && scored.length) {
|
|
225
|
-
const bestScore = scored[0].score;
|
|
226
|
-
const tied = scored.filter((s) => s.score === bestScore);
|
|
227
|
-
const seen = new Set(selected.flatMap((b) => b.geometry));
|
|
228
|
-
tied.sort((a, b) => {
|
|
229
|
-
const novelty = (item) => item.b.geometry.filter((tag) => !seen.has(tag)).length;
|
|
230
|
-
return novelty(b) - novelty(a) || a.b.id.localeCompare(b.b.id);
|
|
231
|
-
});
|
|
232
|
-
const choice = tied[0];
|
|
233
|
-
selected.push(choice.b);
|
|
234
|
-
scored.splice(scored.indexOf(choice), 1);
|
|
235
|
-
}
|
|
236
|
-
return selected;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// src/blocks/library-profile.ts
|
|
240
|
-
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
241
|
-
import { join as join3 } from "node:path";
|
|
242
|
-
import { createHash as createHash3 } from "node:crypto";
|
|
243
|
-
function readLibraryProfile(siteRoot) {
|
|
244
|
-
const file = join3(siteRoot, "launch.json");
|
|
245
|
-
if (!existsSync3(file)) return "legacy-v0";
|
|
246
|
-
const value = JSON.parse(readFileSync3(file, "utf8")).designLibraryProfile;
|
|
247
|
-
if (value === void 0 || value === null) return "legacy-v0";
|
|
248
|
-
if (value === "legacy-v0" || value === "slice-v1") return value;
|
|
249
|
-
throw new Error(`Unknown designLibraryProfile: ${String(value)}`);
|
|
250
|
-
}
|
|
251
|
-
function loadProfiledBlockLibrary(kernel, siteRoot) {
|
|
252
|
-
const profile = readLibraryProfile(siteRoot);
|
|
253
|
-
const library = loadBlockLibrary(kernel);
|
|
254
|
-
const legacyFile = join3(kernel, "design-system/library-releases/legacy-v0.json");
|
|
255
|
-
if (profile === "legacy-v0" && existsSync3(legacyFile)) {
|
|
256
|
-
const release = JSON.parse(readFileSync3(legacyFile, "utf8"));
|
|
257
|
-
const ids = new Set(release.blockIds);
|
|
258
|
-
library.blocks = library.blocks.filter((block) => ids.has(block.id)).map((block) => ({
|
|
259
|
-
...block,
|
|
260
|
-
meta: void 0,
|
|
261
|
-
metadataSource: "legacy-readme",
|
|
262
|
-
previewEvidence: { status: "unavailable" }
|
|
263
|
-
}));
|
|
264
|
-
}
|
|
265
|
-
const releaseIdentity = createHash3("sha256").update(`${profile}
|
|
266
|
-
${libraryContentHash(library)}`).digest("hex");
|
|
267
|
-
return { profile, releaseIdentity, library };
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export {
|
|
271
|
-
blockSourceHash,
|
|
272
|
-
blockPreviewRendererHash,
|
|
273
|
-
loadBlockLibrary,
|
|
274
|
-
libraryContentHash,
|
|
275
|
-
hardFilterBlocks,
|
|
276
|
-
lexicalShortlist,
|
|
277
|
-
loadProfiledBlockLibrary
|
|
278
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// src/cli/root.ts
|
|
2
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
-
import { dirname, join, resolve } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
function findHarnessRoot(startDir) {
|
|
6
|
-
if ((process.env.VITRIS_HARNESS || process.env.VITRIS_KERNEL) && existsSync(process.env.VITRIS_HARNESS || process.env.VITRIS_KERNEL)) {
|
|
7
|
-
return resolve(process.env.VITRIS_HARNESS || process.env.VITRIS_KERNEL);
|
|
8
|
-
}
|
|
9
|
-
let curr = resolve(startDir || dirname(fileURLToPath(import.meta.url)));
|
|
10
|
-
for (let i = 0; i < 6; i++) {
|
|
11
|
-
const candidateTmpl = join(curr, "templates/site");
|
|
12
|
-
const candidatePkg = join(curr, "package.json");
|
|
13
|
-
if (existsSync(candidateTmpl) && existsSync(candidatePkg)) {
|
|
14
|
-
try {
|
|
15
|
-
const pkg = JSON.parse(readFileSync(candidatePkg, "utf8"));
|
|
16
|
-
if (["@tryvitris/website-harness", "@tryvitris/harness", "@vitris/harness", "@vitris/kernel"].includes(pkg.name)) {
|
|
17
|
-
return curr;
|
|
18
|
-
}
|
|
19
|
-
} catch {
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const parent = dirname(curr);
|
|
23
|
-
if (parent === curr) break;
|
|
24
|
-
curr = parent;
|
|
25
|
-
}
|
|
26
|
-
const moduleDir = dirname(fileURLToPath(import.meta.url));
|
|
27
|
-
for (const rel of [".", "..", "../.."]) {
|
|
28
|
-
const target = resolve(moduleDir, rel);
|
|
29
|
-
if (existsSync(join(target, "templates/site"))) {
|
|
30
|
-
return target;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
throw new Error("Could not locate @tryvitris/website-harness root directory containing templates/site");
|
|
34
|
-
}
|
|
35
|
-
var findKernelRoot = findHarnessRoot;
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
findHarnessRoot,
|
|
39
|
-
findKernelRoot
|
|
40
|
-
};
|