sera-code 0.1.3 → 0.1.4
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 +9 -1
- package/bin/sera.mjs +31 -0
- package/dist/bundle/chunks/{chunk-OXMPCU7P.js → chunk-DFRGGJWV.js} +1 -1
- package/dist/bundle/chunks/{chunk-KO3Z5BTR.js → chunk-EMXTNOOJ.js} +5 -5
- package/dist/bundle/chunks/{chunk-KXU77PUU.js → chunk-ET2ARYK4.js} +1 -1
- package/dist/bundle/chunks/{chunk-ZNCN2NGY.js → chunk-G5BGS7HZ.js} +2 -2
- package/dist/bundle/chunks/{chunk-HODJBMOY.js → chunk-GSGPISRE.js} +3 -4
- package/dist/bundle/chunks/{chunk-46WGNYIE.js → chunk-NMUS7OCP.js} +1 -1
- package/dist/bundle/chunks/{chunk-HQBQWHLD.js → chunk-RCQXVPCE.js} +1 -1
- package/dist/bundle/chunks/{cli-MML2DU4A.js → cli-NOCFT7AL.js} +1 -1
- package/dist/bundle/chunks/{execute-HXDNZ26B.js → execute-S2O3RL6V.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{runtime-JAH75CB5.js → runtime-BRT7AUXY.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-OE2CSJ4W.js → virtual-modules-QR2XYBMY.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/lib/postinstall.js +16 -0
- package/lib/update.js +85 -0
- package/lib/win-setup.js +96 -0
- package/package.json +4 -1
- package/sera-core/skills/ambalaj-tasarim/NOTICE +1 -0
- package/sera-core/skills/ambalaj-tasarim/SKILL.md +34 -0
- package/sera-core/skills/ambalaj-tasarim/dieline.mjs +17 -0
- package/sera-core/skills/ambalaj-tasarim/sera-pack.js +535 -0
- package/sera-core/skills/animasyonlu-site/NOTICE +1 -0
- package/sera-core/skills/animasyonlu-site/SKILL.md +26 -0
- package/sera-core/skills/animasyonlu-site/sera-motion.js +310 -0
- package/sera-core/skills/animate/LICENSE +21 -0
- package/sera-core/skills/animate/NOTICE +2 -0
- package/sera-core/skills/animate/RECIPES.md +324 -0
- package/sera-core/skills/animate/SKILL.md +209 -0
- package/sera-core/skills/astryx-ui/SKILL.md +37 -0
- package/sera-core/skills/awwwards/LICENSE +21 -0
- package/sera-core/skills/awwwards/NOTICE +5 -0
- package/sera-core/skills/awwwards/SKILL.md +357 -0
- package/sera-core/skills/awwwards/references/anatomy.md +103 -0
- package/sera-core/skills/awwwards/references/art-direction.md +114 -0
- package/sera-core/skills/awwwards/references/astro.md +235 -0
- package/sera-core/skills/awwwards/references/concepts.md +110 -0
- package/sera-core/skills/awwwards/references/content.md +88 -0
- package/sera-core/skills/awwwards/references/engine.md +751 -0
- package/sera-core/skills/awwwards/references/layout.md +81 -0
- package/sera-core/skills/awwwards/references/motion.md +463 -0
- package/sera-core/skills/awwwards/references/nextjs.md +386 -0
- package/sera-core/skills/awwwards/references/patterns.md +123 -0
- package/sera-core/skills/awwwards/references/quality-bar.md +151 -0
- package/sera-core/skills/awwwards/references/quality.md +91 -0
- package/sera-core/skills/awwwards/references/ship.md +36 -0
- package/sera-core/skills/awwwards/references/typography.md +135 -0
- package/sera-core/skills/awwwards/references/webgl.md +430 -0
- package/sera-core/skills/awwwards/scripts/audit.mjs +243 -0
- package/sera-core/skills/awwwards/scripts/browser.mjs +54 -0
- package/sera-core/skills/awwwards/scripts/font.mjs +87 -0
- package/sera-core/skills/awwwards/scripts/og.mjs +20 -0
- package/sera-core/skills/awwwards/scripts/photos.mjs +65 -0
- package/sera-core/skills/awwwards/scripts/serve.mjs +48 -0
- package/sera-core/skills/awwwards/scripts/shoot.mjs +675 -0
- package/sera-core/skills/beceri-yaz/SKILL.md +39 -0
- package/sera-core/skills/brag-slim/LICENSE +21 -0
- package/sera-core/skills/brag-slim/NOTICE +2 -0
- package/sera-core/skills/brag-slim/SKILL.md +108 -0
- package/sera-core/skills/brainstorming/LICENSE +21 -0
- package/sera-core/skills/brainstorming/NOTICE +5 -0
- package/sera-core/skills/brainstorming/SKILL.md +298 -0
- package/sera-core/skills/brainstorming/builder-check-prompt.md +23 -0
- package/sera-core/skills/copywriting/LICENSE +21 -0
- package/sera-core/skills/copywriting/NOTICE +5 -0
- package/sera-core/skills/copywriting/SKILL.md +343 -0
- package/sera-core/skills/copywriting/references/ai-tells.md +309 -0
- package/sera-core/skills/copywriting/references/copy-frameworks.md +432 -0
- package/sera-core/skills/copywriting/references/natural-transitions.md +256 -0
- package/sera-core/skills/cro/LICENSE +21 -0
- package/sera-core/skills/cro/NOTICE +5 -0
- package/sera-core/skills/cro/SKILL.md +198 -0
- package/sera-core/skills/cro/references/experiments.md +248 -0
- package/sera-core/skills/cro/references/form.md +422 -0
- package/sera-core/skills/derin-arastirma/referanslar/arastirma-yontem.md +11 -0
- package/sera-core/skills/emil-design-eng/LICENSE +21 -0
- package/sera-core/skills/emil-design-eng/NOTICE +2 -0
- package/sera-core/skills/emil-design-eng/SKILL.md +684 -0
- package/sera-core/skills/frontend-design/LICENSE.txt +177 -0
- package/sera-core/skills/frontend-design/NOTICE +2 -0
- package/sera-core/skills/frontend-design/SKILL.md +71 -0
- package/sera-core/skills/gorsel-denetim/SKILL.md +30 -0
- package/sera-core/skills/hallmark/LICENSE +21 -0
- package/sera-core/skills/hallmark/NOTICE +5 -0
- package/sera-core/skills/hallmark/SKILL.md +154 -0
- package/sera-core/skills/hallmark/references/anatomy.md +71 -0
- package/sera-core/skills/hallmark/references/brand-truth.md +40 -0
- package/sera-core/skills/hallmark/references/comp.md +104 -0
- package/sera-core/skills/hallmark/references/craft.md +116 -0
- package/sera-core/skills/hallmark/references/dark-mode.md +49 -0
- package/sera-core/skills/hallmark/references/data-viz.md +48 -0
- package/sera-core/skills/hallmark/references/design-md.md +53 -0
- package/sera-core/skills/hallmark/references/direction.md +52 -0
- package/sera-core/skills/hallmark/references/export-formats.md +80 -0
- package/sera-core/skills/hallmark/references/flow.md +131 -0
- package/sera-core/skills/hallmark/references/fonts.md +58 -0
- package/sera-core/skills/hallmark/references/gates.md +243 -0
- package/sera-core/skills/hallmark/references/genres/atmospheric.md +24 -0
- package/sera-core/skills/hallmark/references/genres/editorial.md +24 -0
- package/sera-core/skills/hallmark/references/genres/modern-minimal.md +24 -0
- package/sera-core/skills/hallmark/references/genres/playful.md +24 -0
- package/sera-core/skills/hallmark/references/imagery.md +99 -0
- package/sera-core/skills/hallmark/references/interaction-and-states.md +89 -0
- package/sera-core/skills/hallmark/references/layout.md +104 -0
- package/sera-core/skills/hallmark/references/macrostructures/01-bento-grid.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/02-long-document.md +35 -0
- package/sera-core/skills/hallmark/references/macrostructures/03-marquee-hero.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/04-stat-led.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/05-workbench.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/06-conversational-faq.md +28 -0
- package/sera-core/skills/hallmark/references/macrostructures/07-manifesto.md +28 -0
- package/sera-core/skills/hallmark/references/macrostructures/08-photographic.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/09-quote-led.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/10-specimen.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/11-catalogue.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/12-letter.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/13-index-first.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/14-narrative-workflow.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/15-split-studio.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -0
- package/sera-core/skills/hallmark/references/macrostructures/17-type-specimen.md +19 -0
- package/sera-core/skills/hallmark/references/macrostructures/18-portfolio-grid.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/19-map-diagram.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures/20-ecosystem-index.md +19 -0
- package/sera-core/skills/hallmark/references/macrostructures/21-component-playground.md +21 -0
- package/sera-core/skills/hallmark/references/macrostructures.md +119 -0
- package/sera-core/skills/hallmark/references/microinteractions.md +80 -0
- package/sera-core/skills/hallmark/references/patterns.md +202 -0
- package/sera-core/skills/hallmark/references/redesign.md +88 -0
- package/sera-core/skills/hallmark/references/responsive.md +46 -0
- package/sera-core/skills/hallmark/references/review-finish.md +19 -0
- package/sera-core/skills/hallmark/references/review-hero.md +20 -0
- package/sera-core/skills/hallmark/references/scroll-choreography.md +110 -0
- package/sera-core/skills/hallmark/references/texture.md +90 -0
- package/sera-core/skills/hallmark/references/themes/README.md +58 -0
- package/sera-core/skills/hallmark/references/themes/almanac.md +103 -0
- package/sera-core/skills/hallmark/references/themes/arcade.md +102 -0
- package/sera-core/skills/hallmark/references/themes/atelier.md +98 -0
- package/sera-core/skills/hallmark/references/themes/bloom.md +102 -0
- package/sera-core/skills/hallmark/references/themes/blueprint.md +103 -0
- package/sera-core/skills/hallmark/references/themes/broadside.md +108 -0
- package/sera-core/skills/hallmark/references/themes/brutal.md +95 -0
- package/sera-core/skills/hallmark/references/themes/carnival.md +104 -0
- package/sera-core/skills/hallmark/references/themes/cobalt.md +101 -0
- package/sera-core/skills/hallmark/references/themes/console.md +99 -0
- package/sera-core/skills/hallmark/references/themes/coral.md +102 -0
- package/sera-core/skills/hallmark/references/themes/darkroom.md +99 -0
- package/sera-core/skills/hallmark/references/themes/dose.md +98 -0
- package/sera-core/skills/hallmark/references/themes/dusk.md +105 -0
- package/sera-core/skills/hallmark/references/themes/editorial.md +97 -0
- package/sera-core/skills/hallmark/references/themes/formwork.md +107 -0
- package/sera-core/skills/hallmark/references/themes/furrow.md +98 -0
- package/sera-core/skills/hallmark/references/themes/garden.md +97 -0
- package/sera-core/skills/hallmark/references/themes/grid.md +101 -0
- package/sera-core/skills/hallmark/references/themes/halftone.md +106 -0
- package/sera-core/skills/hallmark/references/themes/hedgerow.md +104 -0
- package/sera-core/skills/hallmark/references/themes/hum.md +99 -0
- package/sera-core/skills/hallmark/references/themes/ink.md +106 -0
- package/sera-core/skills/hallmark/references/themes/kiln.md +108 -0
- package/sera-core/skills/hallmark/references/themes/loom.md +106 -0
- package/sera-core/skills/hallmark/references/themes/lumen.md +103 -0
- package/sera-core/skills/hallmark/references/themes/manifesto.md +101 -0
- package/sera-core/skills/hallmark/references/themes/midnight.md +97 -0
- package/sera-core/skills/hallmark/references/themes/newsprint.md +102 -0
- package/sera-core/skills/hallmark/references/themes/overprint.md +101 -0
- package/sera-core/skills/hallmark/references/themes/pasteup.md +100 -0
- package/sera-core/skills/hallmark/references/themes/piste.md +99 -0
- package/sera-core/skills/hallmark/references/themes/refract.md +101 -0
- package/sera-core/skills/hallmark/references/themes/ribbon.md +106 -0
- package/sera-core/skills/hallmark/references/themes/rim.md +96 -0
- package/sera-core/skills/hallmark/references/themes/riso.md +98 -0
- package/sera-core/skills/hallmark/references/themes/solstice.md +104 -0
- package/sera-core/skills/hallmark/references/themes/specimen.md +100 -0
- package/sera-core/skills/hallmark/references/themes/spore.md +104 -0
- package/sera-core/skills/hallmark/references/themes/sport.md +101 -0
- package/sera-core/skills/hallmark/references/themes/squeeze.md +99 -0
- package/sera-core/skills/hallmark/references/themes/sticker.md +106 -0
- package/sera-core/skills/hallmark/references/themes/studio.md +99 -0
- package/sera-core/skills/hallmark/references/themes/terminal.md +96 -0
- package/sera-core/skills/hallmark/references/themes/terrazzo.md +106 -0
- package/sera-core/skills/hallmark/references/themes/ultraviolet.md +106 -0
- package/sera-core/skills/hallmark/references/themes/vantage.md +99 -0
- package/sera-core/skills/hallmark/references/themes/vellum.md +105 -0
- package/sera-core/skills/hallmark/references/themes/wayfind.md +105 -0
- package/sera-core/skills/hallmark/references/themes/werkstatt.md +105 -0
- package/sera-core/skills/hallmark/scripts/capture.mjs +132 -0
- package/sera-core/skills/hallmark/scripts/refcheck.mjs +405 -0
- package/sera-core/skills/hallmark/scripts/sloplint-render.mjs +1283 -0
- package/sera-core/skills/hallmark/scripts/sloplint.mjs +4426 -0
- package/sera-core/skills/hallmark/scripts/theme.mjs +660 -0
- package/sera-core/skills/kurum-ici-iletisim/SKILL.md +40 -0
- package/sera-core/skills/launch/LICENSE +21 -0
- package/sera-core/skills/launch/NOTICE +5 -0
- package/sera-core/skills/launch/SKILL.md +385 -0
- package/sera-core/skills/launch/references/shipped-changes.md +84 -0
- package/sera-core/skills/launch/references/site-launch-qa.md +57 -0
- package/sera-core/skills/marka-kimligi/SKILL.md +30 -0
- package/sera-core/skills/mcp-yaz/SKILL.md +41 -0
- package/sera-core/skills/mobil-arayuz/SKILL.md +12 -0
- package/sera-core/skills/mvp-scoping/LICENSE +21 -0
- package/sera-core/skills/mvp-scoping/NOTICE +5 -0
- package/sera-core/skills/mvp-scoping/SKILL.md +95 -0
- package/sera-core/skills/ortak-yazarlik/SKILL.md +32 -0
- package/sera-core/skills/oyun-turleri/SKILL.md +176 -0
- package/sera-core/skills/paralel-sadelestirme/SKILL.md +33 -0
- package/sera-core/skills/phaser-core/LICENSE +201 -0
- package/sera-core/skills/phaser-core/NOTICE +5 -0
- package/sera-core/skills/phaser-core/NOTICE-UPSTREAM +15 -0
- package/sera-core/skills/phaser-core/SKILL.md +245 -0
- package/sera-core/skills/phaser-core/references/scene-flow.md +177 -0
- package/sera-core/skills/pitch-deck/LICENSE +21 -0
- package/sera-core/skills/pitch-deck/NOTICE +5 -0
- package/sera-core/skills/pitch-deck/SKILL.md +103 -0
- package/sera-core/skills/sera-3d-oyun/NOTICE +1 -0
- package/sera-core/skills/sera-3d-oyun/SKILL.md +12 -0
- package/sera-core/skills/sera-3d-oyun/sera-3d.js +3697 -0
- package/sera-core/skills/sera-diyagram/SKILL.md +43 -0
- package/sera-core/skills/sera-ofis-dosya/SKILL.md +3 -0
- package/sera-core/skills/sera-ofis-dosya/referanslar/ofis-ileri.md +46 -0
- package/sera-core/skills/sera-ui-site/NOTICE +1 -0
- package/sera-core/skills/sera-ui-site/SKILL.md +10 -0
- package/sera-core/skills/sera-ui-site/sera-ui.js +83 -0
- package/sera-core/skills/sera-veri-gorsel/SKILL.md +3 -0
- package/sera-core/skills/sera-veri-gorsel/referanslar/palet-dogrula.mjs +80 -0
- package/sera-core/skills/sistem-tarama/SKILL.md +49 -0
- package/sera-core/skills/sistem-tarama/referanslar/komutlar.md +78 -0
- package/sera-core/skills/tasarim-stilleri/SKILL.md +113 -0
- package/sera-core/skills/teardown/LICENSE +22 -0
- package/sera-core/skills/teardown/NOTICE +3 -0
- package/sera-core/skills/teardown/SKILL.md +144 -0
- package/sera-core/skills/teardown/package-lock.json +545 -0
- package/sera-core/skills/teardown/package.json +18 -0
- package/sera-core/skills/teardown/paths.mjs +30 -0
- package/sera-core/skills/teardown/run_sfx.py +10 -0
- package/sera-core/skills/teardown/sfx/__init__.py +10 -0
- package/sera-core/skills/teardown/sfx/__main__.py +64 -0
- package/sera-core/skills/teardown/sfx/dsp.py +453 -0
- package/sera-core/skills/teardown/sfx/loudness.py +72 -0
- package/sera-core/skills/teardown/sfx/mix.py +111 -0
- package/sera-core/skills/teardown/sfx/samples/SOURCES.md +23 -0
- package/sera-core/skills/teardown/sfx/samples/fs-258269-mouth-pop.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-323432-typing.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-329533-room-tone-in-an-apartment-livi.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-329569-roomtone-bedroom-yew.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-339521-vhs-rewind-forward-and-eject.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-349504-triangle-open-04.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-416777-digital-typing-wav.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-426767-apartment-room-tone-wav.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-447909-keyboard-typing.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-447910-plop.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-79388-keyboard-typing-wav.ogg +0 -0
- package/sera-core/skills/teardown/sfx/samples/fs-824189-pop-in-sfx.ogg +0 -0
- package/sera-core/skills/teardown/sfx/score_kit.py +206 -0
- package/sera-core/skills/teardown/sfx/synth.py +294 -0
- package/sera-core/skills/teardown/sheet.mjs +127 -0
- package/sera-core/skills/teardown/sims/beats.py +212 -0
- package/sera-core/skills/teardown/sims/build.mjs +141 -0
- package/sera-core/skills/teardown/sims/capture.mjs +211 -0
- package/sera-core/skills/teardown/sims/cessna-film/main.js +4 -0
- package/sera-core/skills/teardown/sims/cessna-film/timeline.json +1 -0
- package/sera-core/skills/teardown/sims/cessna-live/main.js +5 -0
- package/sera-core/skills/teardown/sims/cessna-shared/console.js +288 -0
- package/sera-core/skills/teardown/sims/cessna-shared/film.js +254 -0
- package/sera-core/skills/teardown/sims/cessna-shared/flight.js +53 -0
- package/sera-core/skills/teardown/sims/cessna-shared/gear.js +364 -0
- package/sera-core/skills/teardown/sims/cessna-shared/live.js +351 -0
- package/sera-core/skills/teardown/sims/cessna-shared/score.py +41 -0
- package/sera-core/skills/teardown/sims/cessna-shared/stage.js +248 -0
- package/sera-core/skills/teardown/sims/kit/director.js +300 -0
- package/sera-core/skills/teardown/sims/kit/hud.js +194 -0
- package/sera-core/skills/teardown/sims/kit/runtime.js +168 -0
- package/sera-core/skills/teardown/sims/kit/stage3d.js +114 -0
- package/sera-core/skills/teardown/sims/kit/style.css +137 -0
- package/sera-core/skills/teardown/sims/kit/util.js +79 -0
- package/sera-core/skills/teardown/sims/kit/warm.js +66 -0
- package/sera-core/skills/teardown/sims/strandbeest-film/main.js +4 -0
- package/sera-core/skills/teardown/sims/strandbeest-film/timeline.json +1 -0
- package/sera-core/skills/teardown/sims/strandbeest-live/main.js +5 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/beast.js +419 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/console.js +375 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/film.js +352 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/jansen.js +67 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/live.js +420 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/score.py +85 -0
- package/sera-core/skills/teardown/sims/strandbeest-shared/stage.js +463 -0
- package/sera-core/skills/teardown/sims/v8-film/main.js +4 -0
- package/sera-core/skills/teardown/sims/v8-film/timeline.json +1 -0
- package/sera-core/skills/teardown/sims/v8-live/main.js +5 -0
- package/sera-core/skills/teardown/sims/v8-shared/console.js +339 -0
- package/sera-core/skills/teardown/sims/v8-shared/engine.js +624 -0
- package/sera-core/skills/teardown/sims/v8-shared/film.js +239 -0
- package/sera-core/skills/teardown/sims/v8-shared/kin.js +86 -0
- package/sera-core/skills/teardown/sims/v8-shared/live.js +374 -0
- package/sera-core/skills/teardown/sims/v8-shared/score.py +60 -0
- package/sera-core/skills/teardown/sims/v8-shared/stage.js +173 -0
- package/sera-core/skills/teardown/wave.mjs +67 -0
- package/sera-core/skills/toplu-degisiklik/SKILL.md +39 -0
- package/sera-core/skills/ui-ux-pro-max/LICENSE +21 -0
- package/sera-core/skills/ui-ux-pro-max/NOTICE +5 -0
- package/sera-core/skills/ui-ux-pro-max/SKILL.md +13 -0
- package/sera-core/skills/ui-ux-pro-max/references/pro-rules.md +117 -0
- package/sera-core/skills/ui-ux-pro-max/references/quick-reference.md +266 -0
- package/sera-core/skills/unslop/LICENSE.md +410 -0
- package/sera-core/skills/unslop/SKILL.md +217 -0
- package/sera-core/skills/unslop/references/effects.md +113 -0
- package/sera-core/skills/unslop/references/refs/unslop-dashboard-after.webp +0 -0
- package/sera-core/skills/unslop/references/refs/unslop-hero-after.webp +0 -0
- package/sera-core/skills/unslop/references/refs.md +16 -0
- package/sera-core/skills/unslop/references/rtl.md +72 -0
- package/sera-core/skills/unslop/references/signs.md +125 -0
- package/sera-core/skills/unslop/references/tokens.md +137 -0
- package/sera-core/skills/unslop/references/visuals.md +84 -0
- package/sera-core/skills/unslop/scripts/snapshot.mjs +197 -0
- package/sera-core/skills/uretken-sanat/SKILL.md +42 -0
- package/sera-core/skills/verification-before-completion/LICENSE +21 -0
- package/sera-core/skills/verification-before-completion/NOTICE +5 -0
- package/sera-core/skills/verification-before-completion/SKILL.md +120 -0
- package/sera-core/skills/web-yayin-listesi/SKILL.md +3 -0
- package/sera-core/src/app-master.ts +2 -2
- package/sera-core/src/app-verify.ts +33 -0
- package/sera-core/src/extension.ts +16 -2
- package/sera-core/src/generated/build-rules.ts +81 -17
- package/sera-core/src/generated/quality-probe.ts +2 -0
- package/sera-core/src/generated/zero-knowledge.ts +36 -9
- package/sera-core/src/image-tool.ts +12 -2
- package/sera-core/src/link-data-tools.ts +411 -0
- package/sera-core/src/skills.ts +54 -18
- package/sera-core/src/video-tool.ts +51 -0
- package/sera-core/src/zk.ts +7 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Layout and composition
|
|
2
|
+
|
|
3
|
+
## Grid
|
|
4
|
+
|
|
5
|
+
- 12 columns with a fluid gutter (`--gutter`) for desktop, 4 or 6 on phones. Use CSS Grid with
|
|
6
|
+
`grid-template-columns: repeat(12, minmax(0, 1fr))` and place by column lines; subgrid for
|
|
7
|
+
aligned card internals.
|
|
8
|
+
- A visible logic beats symmetry: hang everything from 2 or 3 strong vertical lines (e.g. col 1,
|
|
9
|
+
col 5, col 9). Text blocks start on those lines across the whole site.
|
|
10
|
+
- Outer margin = gutter. Corners are real estate: the four-corner frame (name, nav, context,
|
|
11
|
+
action) is the genre's standard header/footer system.
|
|
12
|
+
- Vertical rhythm: section padding is not constant. Use 3 or 4 spacing "moods" (tight: 8u, normal:
|
|
13
|
+
16u, airy: 28u, full viewport) and assign deliberately per section.
|
|
14
|
+
|
|
15
|
+
## Section layout families (each family at most once per page)
|
|
16
|
+
|
|
17
|
+
1. **Poster:** one display line or word fills the viewport width; minimal meta in corners.
|
|
18
|
+
2. **Index list:** full-width rows (title, discipline, year) with hover preview image. Obys-style.
|
|
19
|
+
3. **Asymmetric pair:** large image on 7 to 8 columns, text on 3 to 4 offset columns, staggered vertically.
|
|
20
|
+
4. **Gallery wall:** images of different sizes hung on the grid with deliberate empty cells.
|
|
21
|
+
5. **Filmstrip / horizontal pan:** pinned section scrolling horizontally (only if the content is a sequence).
|
|
22
|
+
6. **Sticky narrative:** sticky media on one side, chapters scroll on the other.
|
|
23
|
+
7. **Statement:** a paragraph set large (t-l) across 8 to 10 columns, manifesto voice.
|
|
24
|
+
8. **Data / facts:** big numerals in tabular figures with small labels (only real facts).
|
|
25
|
+
9. **Full-bleed media:** one image or GL scene edge to edge, type over it.
|
|
26
|
+
10. **Footer as finale:** giant name or call to action, real links, small print.
|
|
27
|
+
|
|
28
|
+
## Hero patterns (choose by concept, not by habit)
|
|
29
|
+
|
|
30
|
+
- **Name as image:** the person's name at mega size, one line or broken intentionally across the
|
|
31
|
+
grid, with one meta line (what they do) and the four-corner frame.
|
|
32
|
+
- **Work-first:** the hero IS the work (a strip, a carousel, a 3D wall of projects) with tiny type.
|
|
33
|
+
- **Statement:** a sentence at t-xl that says what they do in plain words, no image.
|
|
34
|
+
- **Scene:** a fullscreen GL scene or video that embodies the concept, type minimal.
|
|
35
|
+
- **Split frame:** viewport divided by a strong line; type one side, media the other (Noho).
|
|
36
|
+
|
|
37
|
+
Hero must show what this is within 3 seconds: name/brand, what they do, where to go.
|
|
38
|
+
|
|
39
|
+
## Portfolio information architecture
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
/ hero → selected work (3 to 6) → short about → contact/footer
|
|
43
|
+
/work/<slug> case: title + meta (client, year, role) → hero media → context → idea → craft details
|
|
44
|
+
(media sequence with captions) → outcome → next project (continuous transition)
|
|
45
|
+
/about optional if home covers it: portrait or work-in-progress image, bio, services, clients
|
|
46
|
+
(real only), recognition (real only), contact
|
|
47
|
+
/404 designed, carries the concept
|
|
48
|
+
```
|
|
49
|
+
Navigation: 2 to 4 items max (Work, About, Contact) plus the name linking home. An index of all
|
|
50
|
+
projects can live in a menu overlay if there are more than 6.
|
|
51
|
+
|
|
52
|
+
## Presenting work (pick one primary pattern)
|
|
53
|
+
|
|
54
|
+
| Pattern | Works when |
|
|
55
|
+
|---|---|
|
|
56
|
+
| Index list + cursor preview | many projects, type-led identity |
|
|
57
|
+
| Large staggered pairs | 3 to 6 strong visual projects |
|
|
58
|
+
| Grid wall of real screens | prolific web designers (Gil Huybrecht) |
|
|
59
|
+
| Horizontal filmstrip | sequential or photographic work |
|
|
60
|
+
| 3D carousel / curved wall | when the concept supports space (Jesper Landberg) |
|
|
61
|
+
| Stacked full-viewport cases | few, very strong projects |
|
|
62
|
+
|
|
63
|
+
## Menus
|
|
64
|
+
|
|
65
|
+
- Small corner nav on desktop; on phones a single "Menu" text button opening a full-screen
|
|
66
|
+
overlay with large links that reveal with the system's motion. Focus trapped inside, Escape
|
|
67
|
+
closes, `aria-expanded` on the button.
|
|
68
|
+
|
|
69
|
+
## Mobile composition (390 px)
|
|
70
|
+
|
|
71
|
+
- Redesign, do not shrink: mega type re-tuned (`clamp` minimums), grids to 1 or 2 columns with
|
|
72
|
+
intentional offsets, corner frame collapses to top bar + menu.
|
|
73
|
+
- Replace hover-dependent interactions: hover preview list → inline thumbnails; cursor effects →
|
|
74
|
+
tap/scroll-driven equivalents; horizontal pans → native horizontal scroll-snap.
|
|
75
|
+
- Keep the signature moment in an adapted form.
|
|
76
|
+
- Test: no horizontal overflow, nothing hidden behind the browser UI (`100svh`/`100dvh`), tap
|
|
77
|
+
targets ≥ 24 px (44 px for primary actions).
|
|
78
|
+
- Desktop hero grids that use `1fr` rows to push content down leave a huge hole on tall phones:
|
|
79
|
+
set explicit `auto` rows on mobile and center or end-align the stack deliberately.
|
|
80
|
+
- Horizontal strips (film strips, galleries) become native `overflow-x: auto` + `scroll-snap` rows
|
|
81
|
+
on phones instead of shrinking to unreadable thumbnails.
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
# Motion: choreography and recipes
|
|
2
|
+
|
|
3
|
+
## Principles
|
|
4
|
+
|
|
5
|
+
- **Motion verb.** The concept defines one verb ("slide and lock", "settle like paper",
|
|
6
|
+
"compile"). Every animation is a variation of it: same ease family, related durations.
|
|
7
|
+
- **Choreography, not decoration.** Each animation answers: what happened, what matters, where
|
|
8
|
+
to look next. Sequence elements in reading order; lead with the largest element.
|
|
9
|
+
- **Continuity.** Loader hands into the hero; pages hand into pages; a clicked thumbnail becomes
|
|
10
|
+
the next hero. Never a hard cut; a plain fade is the minimum, not the goal.
|
|
11
|
+
- **Restraint.** One orchestrated intro per page. Scroll reveals for content that benefits from
|
|
12
|
+
pacing, not for every paragraph. Restraint limits choreography and decoration, never feedback.
|
|
13
|
+
- **Alive, not busy.** The site answers the visitor: every primary target (CTA, nav, project
|
|
14
|
+
link, work image) reacts in the motion verb, not with a color swap alone. And the system that
|
|
15
|
+
carries the concept has an idle state: it keeps a slow, small motion going while nobody
|
|
16
|
+
touches anything, and pauses off screen. Busy means many unrelated effects; alive means one
|
|
17
|
+
system that responds everywhere. Scale it to the brief: a quiet site can be alive through its
|
|
18
|
+
hovers and its signature alone.
|
|
19
|
+
- **Interruptible and fast.** Hovers respond within 100 ms; transitions never wait on themselves
|
|
20
|
+
(the engine runs leave in parallel with fetch).
|
|
21
|
+
|
|
22
|
+
## Timing
|
|
23
|
+
|
|
24
|
+
| Thing | Duration | Ease (engine `ease`) |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| Hover / press feedback | 0.25 to 0.5 s | `soft` (power3.out) |
|
|
27
|
+
| Text line reveal | 1.0 to 1.3 s, stagger 0.06 to 0.1 | `out` (expo.out) |
|
|
28
|
+
| Image reveal / clip | 1.2 to 1.6 s | `out` |
|
|
29
|
+
| Curtain / page transition | 0.8 to 1.1 s each way | `inOut` (expo.inOut) |
|
|
30
|
+
| Loader total | 1.1 to 2.6 s | real progress |
|
|
31
|
+
| Scroll-linked | scrub `true` or 0.5 to 1 | `none` on the tween |
|
|
32
|
+
|
|
33
|
+
Custom curves: `CustomEase.create('frame', 'M0,0 C0.7,0 0.2,1 1,1')` (GSAP's CustomEase is free)
|
|
34
|
+
when the motion verb needs its own feel; register once and use the name everywhere.
|
|
35
|
+
|
|
36
|
+
## Engine-first
|
|
37
|
+
|
|
38
|
+
Most reveals need no code: `data-split`, `data-reveal`, `data-intro`, `data-parallax`, `data-gl`,
|
|
39
|
+
`data-magnetic`, `data-cursor` (engine.md). Write code for the signature moment, the
|
|
40
|
+
continuity moments and the micro-interactions below. Put all page code inside `onPage()` (or
|
|
41
|
+
`usePage()` in React components); register global behavior once in `setupMotion`.
|
|
42
|
+
|
|
43
|
+
## Micro-interactions (one treatment per role, chosen from the verb)
|
|
44
|
+
|
|
45
|
+
A site with a great intro and dead hovers feels like a video. The rule is an outcome, not a set
|
|
46
|
+
of effects: every primary target answers in the concept's motion verb, utility links may only
|
|
47
|
+
change color, and every state works on touch, keyboard and reduced motion. Pick **one treatment
|
|
48
|
+
per role** from the menu below, or invent one from the verb (a frame that tightens, a sheet that
|
|
49
|
+
lifts, a diff that resolves), and reuse it wherever that role appears. Two or three treatments
|
|
50
|
+
for the whole site is typical. Shipping all of them (magnetic button, letter roll, pointer fill,
|
|
51
|
+
cursor dot) is the generic answer and fails the genericness test.
|
|
52
|
+
|
|
53
|
+
`references/art-direction.md` lists what current winners do on hover, probed live. Read it as a
|
|
54
|
+
vocabulary of mechanisms, not as signatures to copy.
|
|
55
|
+
|
|
56
|
+
| Role | Treatments to choose from (fine pointer) | Touch |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| Primary buttons, CTAs | fill from the pointer's side, label roll, arrow travel, an outline that floods; magnetic pull (`data-magnetic`) only when the verb is about attraction or weight | `:active` press: scale 0.97 or the fill |
|
|
59
|
+
| Project links, cards, work images | a `webgl.md` hover variant, a media reveal, a scale inside a clipped frame; a `data-cursor` label if the site has a follower | press state; the scroll reveal does the work |
|
|
60
|
+
| Nav links | letter roll, underline draw, a variable-font axis shift, a marker that slides to the hovered item | current page marked |
|
|
61
|
+
| Inline links in body text | underline at rest that rises, thickens or redraws | underline at rest |
|
|
62
|
+
| Utility links (legal, cookie, social) | a color or underline change is enough | same |
|
|
63
|
+
| Arrows and icons | nudge along their direction (4 to 6 px) | none |
|
|
64
|
+
|
|
65
|
+
Rules for every treatment:
|
|
66
|
+
- `:hover` styles go inside `@media (hover: hover)`, so touch never gets stuck hover states.
|
|
67
|
+
- Every hover state is also reachable on `:focus-visible` (in CSS, or with `focus` and `blur`
|
|
68
|
+
handlers next to the pointer ones).
|
|
69
|
+
- Under reduced motion, keep a visible state change (color, underline, fill) and drop the
|
|
70
|
+
movement. A roll or slide that ends where it started is invisible without its motion, so give
|
|
71
|
+
it a color or underline state there.
|
|
72
|
+
- Inline links in text are recognisable without color (WCAG 1.4.1): they keep an underline at
|
|
73
|
+
rest.
|
|
74
|
+
|
|
75
|
+
`shoot.mjs` checks the result: each pointer target is saved as `h-NN-rest.png` and
|
|
76
|
+
`h-NN-hover.png`, and `report.hover.colorOnly` lists primary targets whose hover only changed
|
|
77
|
+
color properties. That list is for review, not a failure: a fill that floods or inverts the
|
|
78
|
+
whole button is a treatment, while a primary link whose text only changes color is not.
|
|
79
|
+
|
|
80
|
+
### Letter roll (nav, button labels)
|
|
81
|
+
```html
|
|
82
|
+
<a class="roll" href="/work/"><span>Work</span><span aria-hidden="true">Work</span></a>
|
|
83
|
+
```
|
|
84
|
+
```css
|
|
85
|
+
.roll { display: inline-grid; overflow: clip; }
|
|
86
|
+
.roll > span { grid-area: 1 / 1; transition: translate 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); }
|
|
87
|
+
.roll > span + span { translate: 0 105%; }
|
|
88
|
+
@media (hover: hover) { .roll:hover > span { translate: 0 -105%; } .roll:hover > span + span { translate: 0 0; } }
|
|
89
|
+
.roll:focus-visible > span { translate: 0 -105%; } .roll:focus-visible > span + span { translate: 0 0; }
|
|
90
|
+
/* Reduced motion: no roll (its end state looks like rest), an underline instead. */
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
.roll > span { transition: none; translate: none !important; }
|
|
93
|
+
.roll > span + span { visibility: hidden; }
|
|
94
|
+
.roll:focus-visible { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
95
|
+
}
|
|
96
|
+
@media (prefers-reduced-motion: reduce) and (hover: hover) {
|
|
97
|
+
.roll:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
For a per-letter stagger, add `transition-delay: calc(var(--i) * 20ms)` to letter spans
|
|
101
|
+
(`style="--i:0"` and so on); the duplicate stays `aria-hidden`.
|
|
102
|
+
|
|
103
|
+
### Underline draw (nav) and underline rise (inline links)
|
|
104
|
+
```css
|
|
105
|
+
/* Nav: no line at rest, it draws on hover; the current page keeps it (touch sees that). */
|
|
106
|
+
.draw { background: linear-gradient(currentColor 0 0) left bottom / 0% 1px no-repeat;
|
|
107
|
+
transition: background-size 0.45s cubic-bezier(0.165, 0.84, 0.44, 1); }
|
|
108
|
+
@media (hover: hover) { .draw:hover { background-size: 100% 1px; } }
|
|
109
|
+
.draw:focus-visible, .draw[aria-current="page"] { background-size: 100% 1px; }
|
|
110
|
+
|
|
111
|
+
/* Inline links in text: underline at rest, it rises into a highlight band on hover. */
|
|
112
|
+
.link { text-decoration: none; background: linear-gradient(var(--accent) 0 0) left bottom / 100% 1px no-repeat;
|
|
113
|
+
transition: background-size 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }
|
|
114
|
+
@media (hover: hover) { .link:hover { background-size: 100% 0.4em; } }
|
|
115
|
+
.link:focus-visible { background-size: 100% 0.4em; }
|
|
116
|
+
|
|
117
|
+
@media (prefers-reduced-motion: reduce) { .draw, .link { transition: none; } }
|
|
118
|
+
```
|
|
119
|
+
Check the ink's contrast over the accent band, and that a 1 px accent line is visible on the
|
|
120
|
+
ground (raise it to 2 px or use `currentColor` if not).
|
|
121
|
+
|
|
122
|
+
### Button fill from the pointer's side
|
|
123
|
+
```html
|
|
124
|
+
<a class="btn" href="/contact/" data-fill><span class="btn__fill" aria-hidden="true"></span>Start a project</a>
|
|
125
|
+
```
|
|
126
|
+
```css
|
|
127
|
+
.btn { position: relative; isolation: isolate; overflow: clip; transition: color 0.3s; }
|
|
128
|
+
.btn__fill { position: absolute; inset: 0; z-index: -1; background: var(--ink); clip-path: circle(0% at 50% 50%); }
|
|
129
|
+
.btn.is-filled, .btn:active { color: var(--ground); } /* check AA in both states */
|
|
130
|
+
.btn:active .btn__fill { clip-path: circle(150% at 50% 50%); } /* touch, and no JS */
|
|
131
|
+
@media (prefers-reduced-motion: reduce) {
|
|
132
|
+
.btn:focus-visible { color: var(--ground); }
|
|
133
|
+
.btn:focus-visible .btn__fill { clip-path: none; }
|
|
134
|
+
}
|
|
135
|
+
@media (prefers-reduced-motion: reduce) and (hover: hover) {
|
|
136
|
+
.btn:hover { color: var(--ground); }
|
|
137
|
+
.btn:hover .btn__fill { clip-path: none; }
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
```ts
|
|
141
|
+
import { gsap } from 'gsap';
|
|
142
|
+
import { onPage, isTouch, prefersReducedMotion, ease } from '@/engine';
|
|
143
|
+
|
|
144
|
+
export const buttonFill = () => onPage(() => {
|
|
145
|
+
if (isTouch() || prefersReducedMotion()) return; // CSS above covers these
|
|
146
|
+
const off: (() => void)[] = [];
|
|
147
|
+
document.querySelectorAll<HTMLElement>('[data-fill]').forEach((btn) => {
|
|
148
|
+
const fill = btn.querySelector<HTMLElement>('.btn__fill');
|
|
149
|
+
if (!fill) return;
|
|
150
|
+
const from = (e: PointerEvent) => { const r = btn.getBoundingClientRect(); return `${e.clientX - r.left}px ${e.clientY - r.top}px`; };
|
|
151
|
+
let closed = true;
|
|
152
|
+
const open = (at: string) => {
|
|
153
|
+
if (closed) gsap.set(fill, { clipPath: `circle(0% at ${at})` }); // start at the entry point
|
|
154
|
+
closed = false;
|
|
155
|
+
btn.classList.add('is-filled');
|
|
156
|
+
gsap.to(fill, { clipPath: `circle(150% at ${at})`, duration: 0.6, ease: ease.soft, overwrite: true });
|
|
157
|
+
};
|
|
158
|
+
const close = (at: string) => {
|
|
159
|
+
btn.classList.remove('is-filled');
|
|
160
|
+
gsap.to(fill, { clipPath: `circle(0% at ${at})`, duration: 0.5, ease: ease.soft, overwrite: true, onComplete: () => { closed = true; } });
|
|
161
|
+
};
|
|
162
|
+
const enter = (e: PointerEvent) => open(from(e));
|
|
163
|
+
const leave = (e: PointerEvent) => close(from(e));
|
|
164
|
+
const focus = () => btn.matches(':focus-visible') && open('50% 50%');
|
|
165
|
+
const blur = () => close('50% 50%');
|
|
166
|
+
btn.addEventListener('pointerenter', enter); btn.addEventListener('pointerleave', leave);
|
|
167
|
+
btn.addEventListener('focus', focus); btn.addEventListener('blur', blur);
|
|
168
|
+
off.push(() => {
|
|
169
|
+
btn.removeEventListener('pointerenter', enter); btn.removeEventListener('pointerleave', leave);
|
|
170
|
+
btn.removeEventListener('focus', focus); btn.removeEventListener('blur', blur);
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
return () => off.forEach((f) => f());
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
A quick re-enter tweens on from wherever the fill is, so it never snaps back to empty.
|
|
177
|
+
|
|
178
|
+
### Idle state (the concept keeps breathing)
|
|
179
|
+
Most winners that move at rest do it with the concept itself: a GL scene's `uTime`, video,
|
|
180
|
+
Lando's drifting topographic lines. Do the same. Give the driver module (`references/patterns.md`)
|
|
181
|
+
an idle input so the thing that carries the concept keeps a slow, small motion going. In GL
|
|
182
|
+
scenes that is usually just `uTime` and `uMouse`. Never add a floating shape with no meaning to
|
|
183
|
+
pass a check: a gently bobbing blob is the generic version of this.
|
|
184
|
+
|
|
185
|
+
- Drive it from `gsap.ticker`, never your own `requestAnimationFrame`.
|
|
186
|
+
- Keep it small: a few pixels or degrees, or a slow drift in the driver's state.
|
|
187
|
+
- Move the concept's object, not blocks of text (rotated text shimmers).
|
|
188
|
+
- If the idle terms move an element, give that element its own wrapper. Never share it with a
|
|
189
|
+
reveal, parallax or `data-magnetic`, because the tweens fight.
|
|
190
|
+
- Pause the consumer off screen and leave the idle input at zero under reduced motion. On
|
|
191
|
+
touch, feed scroll velocity instead of the pointer.
|
|
192
|
+
- A strict reading of WCAG 2.2.2 asks for a pause control on motion that starts by itself,
|
|
193
|
+
lasts over 5 s and runs beside other content. Keep idle motion subtle enough to be ambient.
|
|
194
|
+
A prominent loop (a large hero video or scene) gets a visible pause toggle.
|
|
195
|
+
- Quiet briefs (a restaurant, a product page) can stay still at rest if the hovers and the
|
|
196
|
+
signature carry the life. Write that decision in `DESIGN.md`. `shoot.mjs` reports it as
|
|
197
|
+
`idleMotion: false`; that is a note to review, not a failure.
|
|
198
|
+
|
|
199
|
+
The recipe publishes numbers and moves nothing by itself. What a slow clock and a lagged
|
|
200
|
+
pointer mean (a light that drifts, a hand that ticks, an exposure that breathes) is the
|
|
201
|
+
concept's decision, made in the driver.
|
|
202
|
+
```ts
|
|
203
|
+
// src/motion/idle.ts: the idle input. t in seconds; x and y in -0.5..0.5, lagged.
|
|
204
|
+
import { gsap } from 'gsap';
|
|
205
|
+
import { onScroll, prefersReducedMotion, isTouch } from '@/engine';
|
|
206
|
+
|
|
207
|
+
export const idle = { t: 0, x: 0, y: 0 };
|
|
208
|
+
|
|
209
|
+
export function startIdle() { // once, from setupMotion
|
|
210
|
+
if (prefersReducedMotion()) return; // idle stays at zero: the concept holds still
|
|
211
|
+
const touch = isTouch();
|
|
212
|
+
const aim = { x: 0, y: 0 };
|
|
213
|
+
if (touch) onScroll(({ velocity }) => { aim.y = gsap.utils.clamp(-0.5, 0.5, velocity / 40); });
|
|
214
|
+
else addEventListener('pointermove', (e) => { aim.x = e.clientX / innerWidth - 0.5; aim.y = e.clientY / innerHeight - 0.5; }, { passive: true });
|
|
215
|
+
gsap.ticker.add((t) => {
|
|
216
|
+
const r = gsap.ticker.deltaRatio(); // same feel at 60 and 120 Hz
|
|
217
|
+
if (touch) aim.y *= Math.pow(0.9, r); // velocity fades back to rest
|
|
218
|
+
const k = 1 - Math.pow(0.95, r);
|
|
219
|
+
idle.t = t; idle.x += (aim.x - idle.x) * k; idle.y += (aim.y - idle.y) * k;
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
Consume it in the driver (`references/patterns.md`). A GL background already moves at rest
|
|
224
|
+
through its built-in `uTime` and `uMouse`, so it needs nothing more. A DOM driver re-applies
|
|
225
|
+
its state on the ticker while the concept is on screen, with the idle terms added on top:
|
|
226
|
+
```ts
|
|
227
|
+
// In startConcept(), after the onScroll feed; `current` holds the latest scroll-driven state.
|
|
228
|
+
// Imports: gsap, ScrollTrigger, onPage from '@/engine', idle from './idle'; call startIdle() in setupMotion.
|
|
229
|
+
const tick = () => apply(current, Math.sin(idle.t * 0.3) * 0.01 + idle.x * 0.03); // a drift of a few %
|
|
230
|
+
onPage(() => {
|
|
231
|
+
const el = document.querySelector('[data-concept]');
|
|
232
|
+
if (!el) return;
|
|
233
|
+
const st = ScrollTrigger.create({ trigger: el, onToggle: (s) => (s.isActive ? gsap.ticker.add(tick) : gsap.ticker.remove(tick)) });
|
|
234
|
+
return () => { gsap.ticker.remove(tick); st.kill(); };
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Recipes
|
|
239
|
+
|
|
240
|
+
Imports use the Next alias `@/engine`; in Astro, use a relative path (`../engine`).
|
|
241
|
+
|
|
242
|
+
### Loader handoff (counter becomes the hero)
|
|
243
|
+
Make the loader's last frame identical to the hero's first frame, then remove the loader: the
|
|
244
|
+
visitor perceives one continuous motion. Example: the loader shows the name at hero size in the
|
|
245
|
+
hero position; the exit timeline only moves the counter and wipes the background, and the hero's
|
|
246
|
+
`data-intro` name is set to start visible.
|
|
247
|
+
```ts
|
|
248
|
+
// in setupMotion:
|
|
249
|
+
setLoaderExit((root) => gsap.timeline()
|
|
250
|
+
.to(root.querySelector('[data-loader-count]'), { yPercent: -110, duration: 0.6, ease: ease.inOut })
|
|
251
|
+
.to(root, { backgroundColor: 'transparent', duration: 0.8, ease: ease.inOut }, '<0.1')
|
|
252
|
+
.to(root.querySelector('.loader__name'), { autoAlpha: 0, duration: 0.01 })); // hero name now visible underneath
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Custom page transition: clip-path iris from the click point
|
|
256
|
+
```ts
|
|
257
|
+
import { gsap } from 'gsap';
|
|
258
|
+
import { setTransition, ease } from '@/engine';
|
|
259
|
+
let point = { x: innerWidth / 2, y: innerHeight / 2 };
|
|
260
|
+
addEventListener('pointerdown', (e) => { point = { x: e.clientX, y: e.clientY }; });
|
|
261
|
+
setTransition({
|
|
262
|
+
leave: (c) => gsap.timeline()
|
|
263
|
+
.set(c, { autoAlpha: 1 })
|
|
264
|
+
.fromTo(c.querySelector('.curtain__panel'),
|
|
265
|
+
{ clipPath: `circle(0% at ${point.x}px ${point.y}px)` },
|
|
266
|
+
{ clipPath: `circle(150% at ${point.x}px ${point.y}px)`, duration: 0.9, ease: ease.inOut }),
|
|
267
|
+
enter: (c) => gsap.timeline()
|
|
268
|
+
.to(c.querySelector('.curtain__panel'), { clipPath: `circle(0% at 50% 50%)`, duration: 0.9, ease: ease.inOut })
|
|
269
|
+
.set(c, { autoAlpha: 0 }),
|
|
270
|
+
});
|
|
271
|
+
```
|
|
272
|
+
Call `setTransition` from `setupMotion` (it is global, registered once).
|
|
273
|
+
Variants: N vertical columns wiping with stagger (add N panels in the curtain), the panel carrying
|
|
274
|
+
the next page's title (read `document.title` in `enter` or the link text in `leave`).
|
|
275
|
+
|
|
276
|
+
### Shared-element transition: thumbnail grows into the case hero
|
|
277
|
+
```ts
|
|
278
|
+
import { gsap } from 'gsap';
|
|
279
|
+
import { setTransition, ease } from '@/engine';
|
|
280
|
+
let source: HTMLElement | null = null;
|
|
281
|
+
document.addEventListener('click', (e) => {
|
|
282
|
+
source = (e.target as HTMLElement).closest('a')?.querySelector<HTMLElement>('[data-flip-src]') ?? null;
|
|
283
|
+
}, true);
|
|
284
|
+
setTransition({
|
|
285
|
+
leave: (c) => {
|
|
286
|
+
const panel = c.querySelector<HTMLElement>('.curtain__panel')!;
|
|
287
|
+
if (!source) return gsap.timeline().set(c, { autoAlpha: 1 }).fromTo(panel, { yPercent: 100 }, { yPercent: 0, duration: 0.8, ease: ease.inOut });
|
|
288
|
+
const r = source.getBoundingClientRect();
|
|
289
|
+
const ghost = source.cloneNode(true) as HTMLElement;
|
|
290
|
+
ghost.classList.add('flip-ghost'); // CSS: .flip-ghost img { opacity: 1 !important } (GL hides imgs)
|
|
291
|
+
Object.assign(ghost.style, { position: 'fixed', left: `${r.left}px`, top: `${r.top}px`, width: `${r.width}px`, height: `${r.height}px`, margin: '0', zIndex: '1' });
|
|
292
|
+
c.appendChild(ghost);
|
|
293
|
+
gsap.set(panel, { yPercent: 100 });
|
|
294
|
+
// Target = where the case hero media sits (keep these in sync with the case page CSS).
|
|
295
|
+
return gsap.timeline().set(c, { autoAlpha: 1 })
|
|
296
|
+
.to(ghost, { left: 0, top: 0, width: innerWidth, height: innerHeight, duration: 1, ease: ease.inOut });
|
|
297
|
+
},
|
|
298
|
+
enter: (c) => {
|
|
299
|
+
const ghost = c.querySelector('.flip-ghost');
|
|
300
|
+
return gsap.timeline()
|
|
301
|
+
.to(ghost, { autoAlpha: 0, duration: 0.5, delay: 0.15 })
|
|
302
|
+
.add(() => { ghost?.remove(); source = null; })
|
|
303
|
+
.set(c, { autoAlpha: 0 });
|
|
304
|
+
},
|
|
305
|
+
});
|
|
306
|
+
```
|
|
307
|
+
The case page hero media must start at exactly the ghost's final rect and be visible immediately
|
|
308
|
+
(`data-gl-instant` if it is a GL plane, no reveal). Procedural covers have no `<img>`: give the
|
|
309
|
+
ghost the project's color (`ghost.style.background = ...`) or render the cover into an image.
|
|
310
|
+
|
|
311
|
+
### Index list with cursor-following preview (desktop) and inline thumbnails (touch)
|
|
312
|
+
Markup (render it from `projects` in JSX or Astro; shown as HTML):
|
|
313
|
+
```html
|
|
314
|
+
<ul class="index" data-index>
|
|
315
|
+
<li><a href="/work/harbor-lights/" data-preview="/photos/harbor.jpg" data-cursor="Open">
|
|
316
|
+
<span class="index__title">Harbor Lights</span><span>Art direction</span><span>2026</span>
|
|
317
|
+
</a></li>
|
|
318
|
+
</ul>
|
|
319
|
+
<div class="preview" aria-hidden="true"><img alt="" /></div>
|
|
320
|
+
```
|
|
321
|
+
Behavior, registered once from `setupMotion` (it checks for the list on every page):
|
|
322
|
+
```ts
|
|
323
|
+
import { gsap } from 'gsap';
|
|
324
|
+
import { onPage, onScroll, isTouch } from '@/engine';
|
|
325
|
+
|
|
326
|
+
export const indexPreview = () => onPage(() => {
|
|
327
|
+
const list = document.querySelector('[data-index]');
|
|
328
|
+
const box = document.querySelector<HTMLElement>('.preview');
|
|
329
|
+
if (!list || !box || isTouch()) return;
|
|
330
|
+
const img = box.querySelector('img')!;
|
|
331
|
+
const x = gsap.quickTo(box, 'x', { duration: 0.6, ease: 'power3.out' });
|
|
332
|
+
const y = gsap.quickTo(box, 'y', { duration: 0.6, ease: 'power3.out' });
|
|
333
|
+
const rot = gsap.quickTo(box, 'rotate', { duration: 0.8, ease: 'power3.out' });
|
|
334
|
+
let lastX = 0, px = 0, py = 0;
|
|
335
|
+
const move = (e: PointerEvent) => {
|
|
336
|
+
px = e.clientX; py = e.clientY;
|
|
337
|
+
x(px); y(py); rot(gsap.utils.clamp(-12, 12, (px - lastX) * 0.6)); lastX = px;
|
|
338
|
+
};
|
|
339
|
+
const show = (e: Event) => { img.src = (e.currentTarget as HTMLElement).dataset.preview!; gsap.to(box, { autoAlpha: 1, scale: 1, duration: 0.5, ease: 'expo.out' }); };
|
|
340
|
+
const hide = () => gsap.to(box, { autoAlpha: 0, scale: 0.85, duration: 0.4, ease: 'expo.out' });
|
|
341
|
+
list.querySelectorAll<HTMLAnchorElement>('a[data-preview]').forEach((a) => { a.addEventListener('pointerenter', show); a.addEventListener('focus', show); });
|
|
342
|
+
list.addEventListener('pointerleave', hide);
|
|
343
|
+
addEventListener('pointermove', move);
|
|
344
|
+
// pointerleave never fires when the page scrolls out from under a still pointer: check on scroll.
|
|
345
|
+
const off = onScroll(() => { if (!list.contains(document.elementFromPoint(px, py))) hide(); });
|
|
346
|
+
return () => { removeEventListener('pointermove', move); off(); };
|
|
347
|
+
});
|
|
348
|
+
```
|
|
349
|
+
```css
|
|
350
|
+
.preview { position: fixed; left: 0; top: 0; width: 22vw; aspect-ratio: 4/5; pointer-events: none;
|
|
351
|
+
translate: -50% -50%; opacity: 0; visibility: hidden; z-index: 5; } /* translate (not transform) so GSAP owns transform */
|
|
352
|
+
.preview img { width: 100%; height: 100%; object-fit: cover; }
|
|
353
|
+
.index a { display: grid; grid-template-columns: 6fr 3fr 1fr; padding-block: 1.2rem; }
|
|
354
|
+
```
|
|
355
|
+
Preload preview images (`<link rel="preload" as="image">` for the first few or create Image objects).
|
|
356
|
+
On touch, render the thumbnail inline in each row instead.
|
|
357
|
+
|
|
358
|
+
### Velocity marquee (one per page, max)
|
|
359
|
+
```ts
|
|
360
|
+
onPage(() => {
|
|
361
|
+
const track = document.querySelector<HTMLElement>('[data-marquee] [data-track]');
|
|
362
|
+
if (!track) return; // track holds the content twice for a seamless loop
|
|
363
|
+
const loop = gsap.to(track, { xPercent: -50, ease: 'none', duration: 28, repeat: -1 });
|
|
364
|
+
const off = onScroll(({ velocity }) => {
|
|
365
|
+
const dir = velocity < 0 ? -1 : 1;
|
|
366
|
+
gsap.to(loop, { timeScale: dir * (1 + Math.min(Math.abs(velocity) / 8, 5)), duration: 0.4, overwrite: true });
|
|
367
|
+
});
|
|
368
|
+
return () => { off(); };
|
|
369
|
+
});
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### Pinned horizontal pan (only for real sequences)
|
|
373
|
+
```ts
|
|
374
|
+
onPage(() => {
|
|
375
|
+
const wrap = document.querySelector<HTMLElement>('[data-hpan]');
|
|
376
|
+
const track = wrap?.querySelector<HTMLElement>('[data-track]');
|
|
377
|
+
if (!wrap || !track || isMobile()) return; // phones: native overflow-x scroll-snap instead
|
|
378
|
+
const dist = () => track.scrollWidth - innerWidth;
|
|
379
|
+
gsap.to(track, { x: () => -dist(), ease: 'none', scrollTrigger: {
|
|
380
|
+
trigger: wrap, start: 'top top', end: () => `+=${dist()}`, pin: true, scrub: 0.8, invalidateOnRefresh: true } });
|
|
381
|
+
});
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Pinned chapters (sticky media, changing state)
|
|
385
|
+
```ts
|
|
386
|
+
onPage(() => {
|
|
387
|
+
const chapters = gsap.utils.toArray<HTMLElement>('[data-chapter]');
|
|
388
|
+
const stage = document.querySelector<HTMLElement>('[data-stage]');
|
|
389
|
+
if (!chapters.length || !stage) return;
|
|
390
|
+
chapters.forEach((ch, i) => ScrollTrigger.create({
|
|
391
|
+
trigger: ch, start: 'top center', end: 'bottom center',
|
|
392
|
+
onToggle: (self) => self.isActive && stage.setAttribute('data-state', String(i)), // CSS/GSAP reacts to state
|
|
393
|
+
}));
|
|
394
|
+
});
|
|
395
|
+
```
|
|
396
|
+
Use CSS `position: sticky` for the stage (cheaper than pinning) and animate between states with GSAP.
|
|
397
|
+
|
|
398
|
+
### Scroll-scrubbed timeline (one object transforms across a section)
|
|
399
|
+
```ts
|
|
400
|
+
const tl = gsap.timeline({ scrollTrigger: { trigger: '[data-story]', start: 'top top', end: '+=250%', pin: true, scrub: 1 } });
|
|
401
|
+
tl.to('.obj', { rotate: 90, scale: 0.6 }).to('.obj', { xPercent: 80 }).to('.caption-2', { autoAlpha: 1 }, '<');
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### Kinetic type: variable axis on scroll
|
|
405
|
+
```ts
|
|
406
|
+
onPage(() => {
|
|
407
|
+
const el = document.querySelector<HTMLElement>('[data-wdth]');
|
|
408
|
+
if (!el) return;
|
|
409
|
+
gsap.fromTo(el, { fontVariationSettings: '"wght" 200, "wdth" 62' }, { fontVariationSettings: '"wght" 900, "wdth" 125',
|
|
410
|
+
ease: 'none', scrollTrigger: { trigger: el, start: 'top bottom', end: 'bottom top', scrub: true } });
|
|
411
|
+
});
|
|
412
|
+
```
|
|
413
|
+
Requires a variable font that has the axes (Archivo, Mona Sans, Bricolage Grotesque).
|
|
414
|
+
|
|
415
|
+
### Text scramble (tech concepts; final text stays in the DOM)
|
|
416
|
+
```ts
|
|
417
|
+
export function scramble(el: HTMLElement, duration = 0.9) {
|
|
418
|
+
const final = el.textContent || ''; const glyphs = '!<>-_\\/[]{}=+*^?#';
|
|
419
|
+
el.setAttribute('aria-label', final);
|
|
420
|
+
const o = { p: 0 };
|
|
421
|
+
return gsap.to(o, { p: 1, duration, ease: 'none', onUpdate: () => {
|
|
422
|
+
const n = Math.floor(o.p * final.length);
|
|
423
|
+
el.textContent = final.slice(0, n) + [...final.slice(n)].map((c) => (c === ' ' ? ' ' : glyphs[(Math.random() * glyphs.length) | 0])).join('');
|
|
424
|
+
}, onComplete: () => { el.textContent = final; } });
|
|
425
|
+
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### Counter (real numbers only)
|
|
429
|
+
```ts
|
|
430
|
+
const o = { v: 0 };
|
|
431
|
+
gsap.to(o, { v: 214, duration: 1.6, ease: 'expo.out', scrollTrigger: { trigger: el, start: 'top 85%', once: true },
|
|
432
|
+
onUpdate: () => (el.textContent = Math.round(o.v).toString()) });
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### Full-screen menu overlay (accessible)
|
|
436
|
+
- Button: `<button aria-expanded="false" aria-controls="menu">Menu</button>`; overlay `<nav id="menu" hidden>`.
|
|
437
|
+
- Open: remove `hidden`, `stopScroll()`, animate panel clip-path and stagger link lines (`yPercent: 110 → 0`),
|
|
438
|
+
move focus to the first link, trap Tab inside, Escape closes, restore focus to the button,
|
|
439
|
+
`startScroll()`. Close the menu when a navigation starts (in your transition's `leave`, or on route change).
|
|
440
|
+
|
|
441
|
+
### Image trail (playful portfolios)
|
|
442
|
+
On pointermove beyond a distance threshold (e.g. 80 px), place the next image from a pool of
|
|
443
|
+
6 to 8 `<img>` at the pointer, `gsap.fromTo(scale 0.6 → 1, autoAlpha 1)` then fade/drop after 0.8 s.
|
|
444
|
+
Recycle elements; never create DOM per event.
|
|
445
|
+
|
|
446
|
+
### Drag canvas (big archives)
|
|
447
|
+
Absolutely positioned grid inside a container; pointer drag sets target x/y, a ticker lerps the
|
|
448
|
+
current position (`gsap.ticker`), wrap positions with `gsap.utils.wrap` for infinity. Provide a
|
|
449
|
+
list view toggle for accessibility.
|
|
450
|
+
|
|
451
|
+
### Sound (only when the concept is about sound)
|
|
452
|
+
Off by default, a visible toggle with state ("Sound off/on"), Web Audio with a user gesture,
|
|
453
|
+
short UI sounds under 30 KB each, respect reduced motion as a hint to keep it off.
|
|
454
|
+
|
|
455
|
+
## Pitfalls
|
|
456
|
+
|
|
457
|
+
- Never set CSS `transform` on something GSAP moves; use `translate`/`rotate`/`scale` individual
|
|
458
|
+
CSS properties or `gsap.set`.
|
|
459
|
+
- `ScrollTrigger.refresh()` after images/fonts change layout (the engine refreshes on page init).
|
|
460
|
+
- Pin + Lenis: works through the engine's ScrollTrigger sync; never add `pinType` hacks.
|
|
461
|
+
- Do not animate `filter: blur()` on large areas or `box-shadow` on scroll.
|
|
462
|
+
- `will-change` only during an animation, never globally.
|
|
463
|
+
- Check the reduced-motion screenshot: content must be visible and complete.
|