winter-super-cli 2026.6.26 → 2026.6.28
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/CHANGELOG.md +28 -5
- package/README.md +66 -0
- package/package.json +5 -1
- package/resources/local/gsap-skills/.claude-plugin/marketplace.json +20 -0
- package/resources/local/gsap-skills/.claude-plugin/plugin.json +6 -0
- package/resources/local/gsap-skills/.cursor-plugin/marketplace.json +13 -0
- package/resources/local/gsap-skills/.cursor-plugin/plugin.json +22 -0
- package/resources/local/gsap-skills/.github/copilot-instructions.md +17 -0
- package/resources/local/gsap-skills/.github/instructions/react.instructions.md +15 -0
- package/resources/local/gsap-skills/.github/instructions/scrolltrigger.instructions.md +18 -0
- package/resources/local/gsap-skills/AGENTS.md +27 -0
- package/resources/local/gsap-skills/CLAUDE.md +1 -0
- package/resources/local/gsap-skills/GEMINI.md +1 -0
- package/resources/local/gsap-skills/LICENSE +21 -0
- package/resources/local/gsap-skills/README.md +163 -0
- package/resources/local/gsap-skills/assets/gsap-green.svg +7 -0
- package/resources/local/gsap-skills/assets/gsap-icon-inverted.svg +15 -0
- package/resources/local/gsap-skills/assets/gsap-icon-square.svg +1 -0
- package/resources/local/gsap-skills/assets/gsap-white.svg +7 -0
- package/resources/local/gsap-skills/examples/README.md +29 -0
- package/resources/local/gsap-skills/examples/nuxt/app/app.vue +3 -0
- package/resources/local/gsap-skills/examples/nuxt/app/composables/useGSAP.ts +91 -0
- package/resources/local/gsap-skills/examples/nuxt/app/pages/index.vue +55 -0
- package/resources/local/gsap-skills/examples/nuxt/nuxt.config.ts +4 -0
- package/resources/local/gsap-skills/examples/nuxt/package.json +18 -0
- package/resources/local/gsap-skills/examples/react/App.jsx +46 -0
- package/resources/local/gsap-skills/examples/react/index.html +12 -0
- package/resources/local/gsap-skills/examples/react/main.jsx +9 -0
- package/resources/local/gsap-skills/examples/react/package.json +21 -0
- package/resources/local/gsap-skills/examples/react/vite.config.js +7 -0
- package/resources/local/gsap-skills/examples/vanilla/index.html +33 -0
- package/resources/local/gsap-skills/examples/vanilla/main.js +36 -0
- package/resources/local/gsap-skills/examples/vue/app.vue +47 -0
- package/resources/local/gsap-skills/examples/vue/index.html +15 -0
- package/resources/local/gsap-skills/examples/vue/main.js +9 -0
- package/resources/local/gsap-skills/examples/vue/package.json +19 -0
- package/resources/local/gsap-skills/examples/vue/vite.config.js +7 -0
- package/resources/local/gsap-skills/skills/gsap-core/SKILL.md +254 -0
- package/resources/local/gsap-skills/skills/gsap-frameworks/SKILL.md +266 -0
- package/resources/local/gsap-skills/skills/gsap-performance/SKILL.md +79 -0
- package/resources/local/gsap-skills/skills/gsap-plugins/SKILL.md +433 -0
- package/resources/local/gsap-skills/skills/gsap-react/SKILL.md +136 -0
- package/resources/local/gsap-skills/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/resources/local/gsap-skills/skills/gsap-timeline/SKILL.md +107 -0
- package/resources/local/gsap-skills/skills/gsap-utils/SKILL.md +284 -0
- package/resources/local/gsap-skills/skills/llms.txt +39 -0
- package/resources/local/hermes-agent-core/AGENTS.md +1132 -0
- package/resources/local/hermes-agent-core/LICENSE +21 -0
- package/resources/local/hermes-agent-core/README.md +215 -0
- package/resources/local/hermes-agent-core/docs/2026-05-07-s6-overlay-dynamic-subagent-gateways.md +434 -0
- package/resources/local/hermes-agent-core/hermes-already-has-routines.md +160 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/claude-code/SKILL.md +745 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/codex/SKILL.md +130 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/hermes-agent/SKILL.md +1021 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/kanban-codex-lane/SKILL.md +277 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/kanban-codex-lane/templates/pmb-codex-lane-prompt.md +57 -0
- package/resources/local/hermes-agent-core/skills/autonomous-ai-agents/opencode/SKILL.md +219 -0
- package/resources/local/hermes-agent-core/skills/github/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/github/codebase-inspection/SKILL.md +116 -0
- package/resources/local/hermes-agent-core/skills/github/github-auth/SKILL.md +247 -0
- package/resources/local/hermes-agent-core/skills/github/github-auth/scripts/gh-env.sh +66 -0
- package/resources/local/hermes-agent-core/skills/github/github-code-review/SKILL.md +481 -0
- package/resources/local/hermes-agent-core/skills/github/github-code-review/references/review-output-template.md +74 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/SKILL.md +370 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/templates/bug-report.md +35 -0
- package/resources/local/hermes-agent-core/skills/github/github-issues/templates/feature-request.md +31 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/SKILL.md +367 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/references/conventional-commits.md +71 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/resources/local/hermes-agent-core/skills/github/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/resources/local/hermes-agent-core/skills/github/github-repo-management/SKILL.md +516 -0
- package/resources/local/hermes-agent-core/skills/github/github-repo-management/references/github-api-cheatsheet.md +161 -0
- package/resources/local/hermes-agent-core/skills/mcp/DESCRIPTION.md +3 -0
- package/resources/local/hermes-agent-core/skills/mcp/native-mcp/SKILL.md +357 -0
- package/resources/local/hermes-agent-core/skills/software-development/debugging-hermes-tui-commands/SKILL.md +152 -0
- package/resources/local/hermes-agent-core/skills/software-development/hermes-agent-skill-authoring/SKILL.md +165 -0
- package/resources/local/hermes-agent-core/skills/software-development/hermes-s6-container-supervision/SKILL.md +176 -0
- package/resources/local/hermes-agent-core/skills/software-development/node-inspect-debugger/SKILL.md +319 -0
- package/resources/local/hermes-agent-core/skills/software-development/plan/SKILL.md +58 -0
- package/resources/local/hermes-agent-core/skills/software-development/python-debugpy/SKILL.md +375 -0
- package/resources/local/hermes-agent-core/skills/software-development/requesting-code-review/SKILL.md +280 -0
- package/resources/local/hermes-agent-core/skills/software-development/spike/SKILL.md +197 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/SKILL.md +352 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/resources/local/hermes-agent-core/skills/software-development/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/resources/local/hermes-agent-core/skills/software-development/systematic-debugging/SKILL.md +367 -0
- package/resources/local/hermes-agent-core/skills/software-development/test-driven-development/SKILL.md +343 -0
- package/resources/local/hermes-agent-core/skills/software-development/writing-plans/SKILL.md +297 -0
- package/resources/local/manifest.json +12 -0
- package/rule.md +2 -0
- package/scripts/audit-pack.js +5 -0
- package/scripts/smoke-browser.js +53 -0
- package/scripts/smoke-package.js +38 -4
- package/skill.md +36 -4
- package/skills/gsap.md +26 -0
- package/skills/hermes-agent.md +17 -0
- package/src/agent/agent-definitions.js +4 -4
- package/src/agent/runtime.js +206 -5
- package/src/agent/subagent-child.js +44 -0
- package/src/ai/capability-scorecard.js +193 -14
- package/src/ai/hermes-core.js +77 -0
- package/src/ai/model-capabilities.js +42 -2
- package/src/ai/prompts/system-prompt.js +16 -2
- package/src/ai/small-model-amplifier.js +35 -7
- package/src/ai/workflow-selector.js +22 -1
- package/src/cli/commands.js +21 -1
- package/src/cli/config.js +42 -4
- package/src/cli/context-loader.js +253 -9
- package/src/cli/conversation-format.js +5 -0
- package/src/cli/input-controller.js +79 -10
- package/src/cli/prompt-builder.js +45 -8
- package/src/cli/repl-commands.js +123 -2
- package/src/cli/repl.js +183 -87
- package/src/cli/slash-commands.js +3 -1
- package/src/cli/tui.js +133 -37
- package/src/mcp/client.js +46 -5
- package/src/tools/agent.js +316 -25
- package/src/tools/executor.js +314 -11
- package/src/tools/permission.js +20 -17
- package/winter.d.ts +112 -10
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import gsap from "gsap";
|
|
2
|
+
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
|
3
|
+
|
|
4
|
+
const PLUGINS = [
|
|
5
|
+
"CSSRulePlugin",
|
|
6
|
+
"CustomBounce",
|
|
7
|
+
"CustomEase",
|
|
8
|
+
"CustomWiggle",
|
|
9
|
+
"Draggable",
|
|
10
|
+
"DrawSVGPlugin",
|
|
11
|
+
"EaselPlugin",
|
|
12
|
+
"EasePack",
|
|
13
|
+
"Flip",
|
|
14
|
+
"GSDevTools",
|
|
15
|
+
"InertiaPlugin",
|
|
16
|
+
"MorphSVGPlugin",
|
|
17
|
+
"MotionPathHelper",
|
|
18
|
+
"MotionPathPlugin",
|
|
19
|
+
"Observer",
|
|
20
|
+
"Physics2DPlugin",
|
|
21
|
+
"PhysicsPropsPlugin",
|
|
22
|
+
"PixiPlugin",
|
|
23
|
+
"ScrambleTextPlugin",
|
|
24
|
+
"ScrollSmoother",
|
|
25
|
+
"ScrollToPlugin",
|
|
26
|
+
"ScrollTrigger",
|
|
27
|
+
"SplitText",
|
|
28
|
+
"TextPlugin",
|
|
29
|
+
] as const;
|
|
30
|
+
|
|
31
|
+
type Plugins = typeof PLUGINS[number];
|
|
32
|
+
|
|
33
|
+
// In order to dynamically load all the GSAP plugins
|
|
34
|
+
const pluginMap = {
|
|
35
|
+
CustomEase: () => import("gsap/CustomEase"),
|
|
36
|
+
Draggable: () => import("gsap/Draggable"),
|
|
37
|
+
CSSRulePlugin: () => import("gsap/CSSRulePlugin"),
|
|
38
|
+
EaselPlugin: () => import("gsap/EaselPlugin"),
|
|
39
|
+
EasePack: () => import("gsap/EasePack"),
|
|
40
|
+
Flip: () => import("gsap/Flip"),
|
|
41
|
+
MotionPathPlugin: () => import("gsap/MotionPathPlugin"),
|
|
42
|
+
Observer: () => import("gsap/Observer"),
|
|
43
|
+
PixiPlugin: () => import("gsap/PixiPlugin"),
|
|
44
|
+
ScrollToPlugin: () => import("gsap/ScrollToPlugin"),
|
|
45
|
+
ScrollTrigger: () => import("gsap/ScrollTrigger"),
|
|
46
|
+
TextPlugin: () => import("gsap/TextPlugin"),
|
|
47
|
+
DrawSVGPlugin: () => import("gsap/DrawSVGPlugin"),
|
|
48
|
+
Physics2DPlugin: () => import("gsap/Physics2DPlugin"),
|
|
49
|
+
PhysicsPropsPlugin: () => import("gsap/PhysicsPropsPlugin"),
|
|
50
|
+
ScrambleTextPlugin: () => import("gsap/ScrambleTextPlugin"),
|
|
51
|
+
CustomBounce: () => import("gsap/CustomBounce"),
|
|
52
|
+
CustomWiggle: () => import("gsap/CustomWiggle"),
|
|
53
|
+
GSDevTools: () => import("gsap/GSDevTools"),
|
|
54
|
+
InertiaPlugin: () => import("gsap/InertiaPlugin"),
|
|
55
|
+
MorphSVGPlugin: () => import("gsap/MorphSVGPlugin"),
|
|
56
|
+
MotionPathHelper: () => import("gsap/MotionPathHelper"),
|
|
57
|
+
ScrollSmoother: () => import("gsap/ScrollSmoother"),
|
|
58
|
+
SplitText: () => import("gsap/SplitText"),
|
|
59
|
+
} as const;
|
|
60
|
+
|
|
61
|
+
type PluginMap = typeof pluginMap;
|
|
62
|
+
type Plugins = keyof PluginMap;
|
|
63
|
+
|
|
64
|
+
// Resolves the module type for a given key, then picks the named export matching the key
|
|
65
|
+
// this allows to have the type definitions for autocomplete in your code editor
|
|
66
|
+
type PluginModule<K extends Plugins> = Awaited<ReturnType<PluginMap[K]>>;
|
|
67
|
+
type PluginExport<K extends Plugins> = PluginModule<K>[K & keyof PluginModule<K>];
|
|
68
|
+
|
|
69
|
+
export default function() {
|
|
70
|
+
// Register all the GSAP Plugins you want at this point
|
|
71
|
+
gsap.registerPlugin(ScrollTrigger);
|
|
72
|
+
|
|
73
|
+
/*
|
|
74
|
+
If you want to lazy load some of the plugins that are
|
|
75
|
+
not widely used in your app (for example in just a couple
|
|
76
|
+
of components or a single route), you can use this method
|
|
77
|
+
*/
|
|
78
|
+
async function lazyLoadPlugin<K extends Plugins>(plugin: K): Promise<PluginExport<K>> {
|
|
79
|
+
const loader = pluginMap[plugin];
|
|
80
|
+
const m = await loader();
|
|
81
|
+
const p = (m as any)[plugin];
|
|
82
|
+
gsap.registerPlugin(p);
|
|
83
|
+
return p;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
gsap,
|
|
88
|
+
ScrollTrigger,
|
|
89
|
+
lazyLoadPlugin,
|
|
90
|
+
};
|
|
91
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { onMounted, onUnmounted } from "vue";
|
|
3
|
+
|
|
4
|
+
const { gsap, ScrollTrigger, lazyLoadPlugin } = useGSAP();
|
|
5
|
+
|
|
6
|
+
let ctx;
|
|
7
|
+
onMounted(async () => {
|
|
8
|
+
const SplitText = await lazyLoadPlugin("SplitText");
|
|
9
|
+
|
|
10
|
+
ctx = gsap.context(() => {
|
|
11
|
+
const split = SplitText.create("h1", {
|
|
12
|
+
type: "chars",
|
|
13
|
+
});
|
|
14
|
+
gsap.from(split.chars, {
|
|
15
|
+
autoAlpha: 0,
|
|
16
|
+
y: -50,
|
|
17
|
+
xPercent: -100,
|
|
18
|
+
rotation: -45,
|
|
19
|
+
ease: "power1.inOut",
|
|
20
|
+
stagger: {
|
|
21
|
+
amount: 0.3,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
gsap.set("h1", { autoAlpha: 1 });
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
onMounted(() => {
|
|
30
|
+
ctx && ctx.revert();
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<main>
|
|
36
|
+
<h1>GSAP SplitText</h1>
|
|
37
|
+
</main>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<style scoped>
|
|
41
|
+
main {
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100vh;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
align-items: center;
|
|
47
|
+
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
|
|
48
|
+
font-size: 18px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
main h1 {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
visibility: hidden;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gsap-nuxt-example",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "nuxt build",
|
|
7
|
+
"dev": "nuxt dev",
|
|
8
|
+
"generate": "nuxt generate",
|
|
9
|
+
"preview": "nuxt preview",
|
|
10
|
+
"postinstall": "nuxt prepare"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"gsap": "^3.15.0",
|
|
14
|
+
"nuxt": "^4.4.2",
|
|
15
|
+
"vue": "^3.5.30",
|
|
16
|
+
"vue-router": "^5.0.4"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal GSAP React example — follows gsap-react skill: useGSAP, scope, cleanup.
|
|
3
|
+
* No selector without scope; refs for targets; automatic revert on unmount.
|
|
4
|
+
*/
|
|
5
|
+
import { useRef } from "react";
|
|
6
|
+
import { useGSAP } from "@gsap/react";
|
|
7
|
+
import { gsap } from "gsap";
|
|
8
|
+
|
|
9
|
+
// Register useGSAP once (could be in main.jsx for app-level)
|
|
10
|
+
gsap.registerPlugin(useGSAP);
|
|
11
|
+
|
|
12
|
+
function App() {
|
|
13
|
+
const containerRef = useRef(null);
|
|
14
|
+
const boxRef = useRef(null);
|
|
15
|
+
|
|
16
|
+
useGSAP(
|
|
17
|
+
() => {
|
|
18
|
+
// Scoped to containerRef — selectors only match inside container
|
|
19
|
+
gsap.to(boxRef.current, { x: 100, duration: 0.6, ease: "power2" });
|
|
20
|
+
gsap.from(".item", { autoAlpha: 0, y: 20, stagger: 0.1 });
|
|
21
|
+
},
|
|
22
|
+
{ scope: containerRef }
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div ref={containerRef} style={{ padding: "2rem" }}>
|
|
27
|
+
<h1>GSAP React — useGSAP + scope + cleanup</h1>
|
|
28
|
+
<div
|
|
29
|
+
ref={boxRef}
|
|
30
|
+
className="box"
|
|
31
|
+
style={{
|
|
32
|
+
width: 80,
|
|
33
|
+
height: 80,
|
|
34
|
+
background: "#0fa",
|
|
35
|
+
borderRadius: 8,
|
|
36
|
+
marginBottom: "1rem",
|
|
37
|
+
}}
|
|
38
|
+
/>
|
|
39
|
+
<div className="item" style={{ margin: "0.5rem 0" }}>Item 1</div>
|
|
40
|
+
<div className="item" style={{ margin: "0.5rem 0" }}>Item 2</div>
|
|
41
|
+
<div className="item" style={{ margin: "0.5rem 0" }}>Item 3</div>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default App;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>GSAP React — useGSAP + scope + cleanup</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/main.jsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gsap-skills-example-react",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@gsap/react": "^2.1.2",
|
|
13
|
+
"gsap": "^3.15.0",
|
|
14
|
+
"react": "^18.3.1",
|
|
15
|
+
"react-dom": "^18.3.1"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
19
|
+
"vite": "^5.4.10"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>GSAP vanilla — canonical patterns</title>
|
|
7
|
+
<style>
|
|
8
|
+
body { font-family: system-ui, sans-serif; padding: 2rem; }
|
|
9
|
+
.box { width: 80px; height: 80px; background: #0fa; border-radius: 8px; margin: 1rem 0; }
|
|
10
|
+
.item { margin: 0.5rem 0; opacity: 0; }
|
|
11
|
+
.section { min-height: 120vh; padding: 2rem 0; }
|
|
12
|
+
.panel { width: 100px; height: 60px; background: #9cf; border-radius: 8px; }
|
|
13
|
+
</style>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<h1>GSAP vanilla — transforms, autoAlpha, timeline, ScrollTrigger</h1>
|
|
17
|
+
|
|
18
|
+
<h2>1. Single tween (transform + autoAlpha)</h2>
|
|
19
|
+
<div class="box" id="single" style="opacity: 0;"></div>
|
|
20
|
+
|
|
21
|
+
<h2>2. Timeline (sequencing)</h2>
|
|
22
|
+
<div class="box a">A</div>
|
|
23
|
+
<div class="box b">B</div>
|
|
24
|
+
<div class="box c">C</div>
|
|
25
|
+
|
|
26
|
+
<h2>3. ScrollTrigger (timeline + scrub)</h2>
|
|
27
|
+
<section class="section" id="scroll-section">
|
|
28
|
+
<div class="panel">Panel</div>
|
|
29
|
+
</section>
|
|
30
|
+
|
|
31
|
+
<script type="module" src="main.js"></script>
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal GSAP vanilla example — follows skills: transforms, autoAlpha, timeline, ScrollTrigger.
|
|
3
|
+
* Run from repo root: npx serve examples/vanilla (or open index.html with a local server that supports ES modules).
|
|
4
|
+
*/
|
|
5
|
+
import { gsap } from "https://cdn.jsdelivr.net/npm/gsap@3.15.0/index.js";
|
|
6
|
+
import { ScrollTrigger } from "https://cdn.jsdelivr.net/npm/gsap@3.15.0/ScrollTrigger.js";
|
|
7
|
+
|
|
8
|
+
gsap.registerPlugin(ScrollTrigger);
|
|
9
|
+
|
|
10
|
+
// 1. Single tween — transform alias x, autoAlpha (opacity + visibility)
|
|
11
|
+
gsap.to("#single", {
|
|
12
|
+
x: 120,
|
|
13
|
+
autoAlpha: 1,
|
|
14
|
+
duration: 0.6,
|
|
15
|
+
ease: "power2"
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// 2. Timeline for sequencing (defaults, position parameter)
|
|
19
|
+
const tl = gsap.timeline({ defaults: { duration: 0.5, ease: "power2" } });
|
|
20
|
+
tl.to(".a", { x: 100 })
|
|
21
|
+
.to(".b", { y: 40 }, "+=0.2")
|
|
22
|
+
.to(".c", { autoAlpha: 0 }, "-=0.1");
|
|
23
|
+
|
|
24
|
+
// 3. ScrollTrigger on timeline (not on child tween)
|
|
25
|
+
const tl2 = gsap.timeline({
|
|
26
|
+
scrollTrigger: {
|
|
27
|
+
trigger: "#scroll-section",
|
|
28
|
+
start: "top center",
|
|
29
|
+
end: "bottom center",
|
|
30
|
+
scrub: true
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
tl2.to(".panel", { x: 100 })
|
|
34
|
+
.to(".panel", { rotation: 5, duration: 0.7 });
|
|
35
|
+
|
|
36
|
+
// After dynamic layout changes you would call: ScrollTrigger.refresh();
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal GSAP Vue 3 example — follows gsap-frameworks skill: gsap.context, scope, cleanup.
|
|
3
|
+
* Scoped selectors via context; automatic revert on unmount.
|
|
4
|
+
*/
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, onMounted, onUnmounted } from "vue";
|
|
7
|
+
import { gsap } from "gsap";
|
|
8
|
+
|
|
9
|
+
const container = ref(null);
|
|
10
|
+
let ctx;
|
|
11
|
+
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
ctx = gsap.context(() => {
|
|
14
|
+
// Simple tween — moves the box right and fades it in
|
|
15
|
+
gsap.to(".box", { x: 100, autoAlpha: 1, duration: 0.6, ease: "power2" });
|
|
16
|
+
|
|
17
|
+
// Stagger animation on .item elements (scoped to container)
|
|
18
|
+
gsap.from(".item", { autoAlpha: 0, y: 20, stagger: 0.1 });
|
|
19
|
+
|
|
20
|
+
// ScrollTrigger timeline on the tall section
|
|
21
|
+
gsap.timeline({
|
|
22
|
+
scrollTrigger: { trigger: ".scroll-section", start: "top center", end: "bottom center", scrub: true },
|
|
23
|
+
}).to(".scroll-box", { x: 200, rotation: 360 });
|
|
24
|
+
}, container.value); // scope — all selectors resolve inside container
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
onUnmounted(() => {
|
|
28
|
+
ctx?.revert(); // cleanup: reverts all GSAP animations created in this context
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<div ref="container" :style="{ padding: '2rem' }">
|
|
34
|
+
<h1>GSAP Vue 3 — gsap.context + scope + cleanup</h1>
|
|
35
|
+
|
|
36
|
+
<div class="box" :style="{ width: '80px', height: '80px', background: '#0fa', borderRadius: '8px', marginBottom: '1rem', visibility: 'hidden' }" />
|
|
37
|
+
|
|
38
|
+
<div class="item" :style="{ margin: '0.5rem 0' }">Item 1</div>
|
|
39
|
+
<div class="item" :style="{ margin: '0.5rem 0' }">Item 2</div>
|
|
40
|
+
<div class="item" :style="{ margin: '0.5rem 0' }">Item 3</div>
|
|
41
|
+
|
|
42
|
+
<div class="scroll-section" :style="{ height: '150vh', marginTop: '2rem', background: '#f0f0f0', padding: '1rem' }">
|
|
43
|
+
<p>Scroll down to trigger the timeline</p>
|
|
44
|
+
<div class="scroll-box" :style="{ width: '60px', height: '60px', background: '#f0a', borderRadius: '8px', marginTop: '1rem' }" />
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>GSAP Vue 3 — gsap.context + scope + cleanup</title>
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
<script type="module" src="/main.js"></script>
|
|
13
|
+
</body>
|
|
14
|
+
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import { gsap } from "gsap";
|
|
3
|
+
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
|
4
|
+
import App from "./App.vue";
|
|
5
|
+
|
|
6
|
+
// Register all the GSAP Plugins you want only once at this top level file
|
|
7
|
+
gsap.registerPlugin(ScrollTrigger);
|
|
8
|
+
|
|
9
|
+
createApp(App).mount("#app");
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gsap-vue-example",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"gsap": "^3.15.0",
|
|
13
|
+
"vue": "^3.5.32"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
17
|
+
"vite": "^8.0.4"
|
|
18
|
+
}
|
|
19
|
+
}
|