@editframe/create 0.26.0-beta.0 → 0.26.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "simple-demo",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "start": "editframe preview"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "dependencies": {
14
+ "@editframe/cli": "0.26.2-beta.0",
15
+ "@editframe/elements": "0.26.2-beta.0",
16
+ "@editframe/vite-plugin": "0.26.2-beta.0",
17
+ "animejs": "^4.2.2",
18
+ "prismjs": "^1.30.0",
19
+ "tailwindcss": "^3.4.3",
20
+ "vite": "^6.3.5",
21
+ "vite-plugin-singlefile": "^2.0.1"
22
+ }
23
+ }
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ },
5
+ };
File without changes
@@ -0,0 +1,148 @@
1
+ import "@editframe/elements";
2
+ import "@editframe/elements/styles.css";
3
+ import { animate, svg, splitText, stagger, createTimeline, waapi } from "animejs";
4
+ import Prism from "prismjs";
5
+ import "prismjs/themes/prism-tomorrow.css";
6
+ import "prismjs/components/prism-javascript";
7
+
8
+ // ============================================================================
9
+ // Section 1: Text intro animation
10
+ // ============================================================================
11
+ const { chars } = splitText("#text-intro h2", { words: false, chars: true });
12
+
13
+ const textAnimation = animate(chars, {
14
+ y: [
15
+ { to: "-2.75rem", ease: "outExpo", duration: 600 },
16
+ { to: 0, ease: "outBounce", duration: 800, delay: 100 },
17
+ ],
18
+ rotate: {
19
+ from: "-1turn",
20
+ delay: 0,
21
+ },
22
+ delay: stagger(50),
23
+ ease: "inOutCirc",
24
+ autoplay: false,
25
+ });
26
+
27
+ const textIntroTimegroup = document.querySelector("#text-intro")!;
28
+ textIntroTimegroup.addFrameTask(({ ownCurrentTimeMs }) => {
29
+ textAnimation.currentTime = ownCurrentTimeMs;
30
+ });
31
+
32
+ // ============================================================================
33
+ // Section 2: Timeline animation with pyramid shapes
34
+ // ============================================================================
35
+ const timeline = createTimeline({
36
+ defaults: { duration: 750 },
37
+ autoplay: false,
38
+ });
39
+
40
+ timeline
41
+ .label("start")
42
+ .add(".square", { x: "15rem" }, 500)
43
+ .add(".circle", { x: "15rem" }, "start")
44
+ .add(".triangle", { x: "15rem", rotate: "1turn" }, "<-=500");
45
+
46
+ const pyramidTimegroup = document.querySelector("#pyramid")!;
47
+ pyramidTimegroup.addFrameTask(({ ownCurrentTimeMs }) => {
48
+ timeline.currentTime = ownCurrentTimeMs;
49
+ });
50
+
51
+ // ============================================================================
52
+ // Section 3: WAAPI animation
53
+ // ============================================================================
54
+ const { chars: waapiChars } = splitText("#waapi-demo h2", { words: false, chars: true });
55
+
56
+ const waapiAnimation = waapi.animate(waapiChars, {
57
+ translate: `0 -2rem`,
58
+ delay: stagger(100),
59
+ duration: 600,
60
+ alternate: true,
61
+ loop: true,
62
+ ease: "inOut(2)",
63
+ autoplay: false,
64
+ });
65
+
66
+ const waapiTimegroup = document.querySelector("#waapi-demo")!;
67
+ waapiTimegroup.addFrameTask(({ ownCurrentTimeMs }) => {
68
+ waapiAnimation.currentTime = ownCurrentTimeMs;
69
+ });
70
+
71
+ // ============================================================================
72
+ // Section 4: Motion path and line drawing animations
73
+ // ============================================================================
74
+ const carAnimation = animate(".car", {
75
+ ease: "linear",
76
+ duration: 5000,
77
+ autoplay: false,
78
+ ...svg.createMotionPath("#suzuka"),
79
+ });
80
+
81
+ const lineAnimation = animate(svg.createDrawable("#suzuka"), {
82
+ draw: "0 1",
83
+ ease: "linear",
84
+ duration: 5000,
85
+ autoplay: false,
86
+ });
87
+
88
+ const racetrackTimegroup = document.querySelector("#racetrack")!;
89
+ racetrackTimegroup.addFrameTask(({ ownCurrentTimeMs }) => {
90
+ carAnimation.currentTime = ownCurrentTimeMs;
91
+ lineAnimation.currentTime = ownCurrentTimeMs;
92
+ });
93
+
94
+ // ============================================================================
95
+ // Transitions timeline controlling all section slide animations
96
+ // ============================================================================
97
+ const transitionsTimeline = createTimeline({
98
+ autoplay: false,
99
+ defaults: {
100
+ ease: "linear"
101
+ }
102
+ });
103
+
104
+ // Add all transitions to the timeline with proper timing
105
+ // text-intro: starts at 0, stays until 2750ms, slides out
106
+ transitionsTimeline
107
+ .add("#text-intro", {
108
+ keyframes: [
109
+ { x: "0%", duration: 2750 },
110
+ { x: "-100%", duration: 250 }
111
+ ]
112
+ }, 0)
113
+ // pyramid: starts at 2500ms (0.5s overlap), slides in, stays, slides out
114
+ .add("#pyramid", {
115
+ keyframes: [
116
+ { x: "100%", duration: 0 },
117
+ { x: "0%", duration: 250 },
118
+ { x: "0%", duration: 2500 },
119
+ { x: "-100%", duration: 250 }
120
+ ]
121
+ }, 2500)
122
+ // waapi-demo: starts at 5000ms, slides in, stays, slides out
123
+ .add("#waapi-demo", {
124
+ keyframes: [
125
+ { x: "100%", duration: 0 },
126
+ { x: "0%", duration: 250 },
127
+ { x: "0%", duration: 2500 },
128
+ { x: "-100%", duration: 250 }
129
+ ]
130
+ }, 5000)
131
+ // racetrack: starts at 7500ms, slides in, stays
132
+ .add("#racetrack", {
133
+ keyframes: [
134
+ { x: "100%", duration: 0 },
135
+ { x: "0%", duration: 250 },
136
+ { x: "0%", duration: 5750 }
137
+ ]
138
+ }, 7500);
139
+
140
+ const rootTimegroup = document.querySelector('ef-timegroup[mode="sequence"]')!;
141
+ rootTimegroup.addFrameTask(({ currentTimeMs }) => {
142
+ transitionsTimeline.currentTime = currentTimeMs;
143
+ });
144
+
145
+ // ============================================================================
146
+ // Highlight all code snippets with Prism
147
+ // ============================================================================
148
+ Prism.highlightAll();
@@ -0,0 +1,30 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @keyframes slide-up {
6
+ from {
7
+ transform: translateY(100%);
8
+ }
9
+ to {
10
+ transform: translateY(0);
11
+ }
12
+ }
13
+
14
+ @keyframes fade-in {
15
+ from {
16
+ opacity: 0;
17
+ }
18
+ to {
19
+ opacity: 1;
20
+ }
21
+ }
22
+
23
+ @keyframes spin {
24
+ from {
25
+ transform: rotate(0deg);
26
+ }
27
+ to {
28
+ transform: rotate(360deg);
29
+ }
30
+ }
@@ -0,0 +1,8 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx,css}"],
4
+ theme: {
5
+ extend: {},
6
+ },
7
+ plugins: [],
8
+ };
@@ -0,0 +1,17 @@
1
+ import path from "node:path";
2
+ import { vitePluginEditframe } from "@editframe/vite-plugin";
3
+ import { defineConfig } from "vite";
4
+ import { viteSingleFile } from "vite-plugin-singlefile";
5
+
6
+ export default defineConfig({
7
+ define: {
8
+ 'globalThis.EF_DEV_WORKBENCH': 'true',
9
+ },
10
+ plugins: [
11
+ vitePluginEditframe({
12
+ root: path.join(__dirname, "src"),
13
+ cacheRoot: path.join(__dirname, "src", "assets"),
14
+ }),
15
+ viteSingleFile(),
16
+ ],
17
+ });
@@ -11,9 +11,9 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@editframe/cli": "0.26.0-beta.0",
15
- "@editframe/elements": "0.26.0-beta.0",
16
- "@editframe/vite-plugin": "0.26.0-beta.0",
14
+ "@editframe/cli": "0.26.2-beta.0",
15
+ "@editframe/elements": "0.26.2-beta.0",
16
+ "@editframe/vite-plugin": "0.26.2-beta.0",
17
17
  "tailwindcss": "^3.4.3",
18
18
  "vite": "^6.3.5",
19
19
  "vite-plugin-singlefile": "^2.0.1"
@@ -11,9 +11,9 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@editframe/cli": "0.26.0-beta.0",
15
- "@editframe/react": "0.26.0-beta.0",
16
- "@editframe/vite-plugin": "0.26.0-beta.0",
14
+ "@editframe/cli": "0.26.2-beta.0",
15
+ "@editframe/react": "0.26.2-beta.0",
16
+ "@editframe/vite-plugin": "0.26.2-beta.0",
17
17
  "@vitejs/plugin-react": "^4.3.1",
18
18
  "tailwindcss": "^3.4.3",
19
19
  "vite": "^6.3.5",
@@ -11,9 +11,9 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@editframe/cli": "0.26.0-beta.0",
15
- "@editframe/elements": "0.26.0-beta.0",
16
- "@editframe/vite-plugin": "0.26.0-beta.0",
14
+ "@editframe/cli": "0.26.2-beta.0",
15
+ "@editframe/elements": "0.26.2-beta.0",
16
+ "@editframe/vite-plugin": "0.26.2-beta.0",
17
17
  "tailwindcss": "^3.4.3",
18
18
  "vite": "^6.3.5",
19
19
  "vite-plugin-singlefile": "^2.0.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editframe/create",
3
- "version": "0.26.0-beta.0",
3
+ "version": "0.26.2-beta.0",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "create-editframe": "dist/index.js"