@editframe/create 0.15.0-beta.9 → 0.16.0-beta.1

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.
@@ -11,9 +11,9 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@editframe/cli": "0.15.0-beta.9",
15
- "@editframe/elements": "0.15.0-beta.9",
16
- "@editframe/vite-plugin": "0.15.0-beta.9",
14
+ "@editframe/cli": "0.16.0-beta.1",
15
+ "@editframe/elements": "0.16.0-beta.1",
16
+ "@editframe/vite-plugin": "0.16.0-beta.1",
17
17
  "tailwindcss": "^3.4.3",
18
18
  "vite": "^5.2.11",
19
19
  "vite-plugin-singlefile": "^2.0.1"
@@ -0,0 +1,2 @@
1
+ import "@editframe/elements";
2
+ import "@editframe/elements/styles.css";
@@ -0,0 +1,163 @@
1
+ @keyframes fadein {
2
+ 0% {
3
+ opacity: 0;
4
+ }
5
+ 50% {
6
+ opacity: 0.5;
7
+ }
8
+ 100% {
9
+ opacity: 1;
10
+ }
11
+ }
12
+ @keyframes fadeout {
13
+ from {
14
+ opacity: 1;
15
+ }
16
+ to {
17
+ opacity: 0;
18
+ }
19
+ }
20
+ @keyframes disco {
21
+ from {
22
+ filter: hue-rotate(0deg);
23
+ }
24
+ to {
25
+ filter: hue-rotate(360deg);
26
+ }
27
+ }
28
+ @keyframes slide-in-left {
29
+ from {
30
+ left: -100%;
31
+ }
32
+ to {
33
+ left: 0%;
34
+ }
35
+ }
36
+ @keyframes slide-in-right {
37
+ from {
38
+ transform: translateX(150%);
39
+ }
40
+ to {
41
+ transform: translateX(0%);
42
+ }
43
+ }
44
+ @keyframes slide-out-right {
45
+ from {
46
+ transform: translateX(0%);
47
+ }
48
+ to {
49
+ transform: translateX(150%);
50
+ }
51
+ }
52
+ @keyframes flip {
53
+ from {
54
+ transform: rotateY(0deg);
55
+ }
56
+ to {
57
+ transform: rotateY(180deg);
58
+ }
59
+ }
60
+
61
+ @keyframes rotate {
62
+ from {
63
+ transform: rotate(0deg);
64
+ }
65
+ to {
66
+ transform: rotate(360deg);
67
+ }
68
+ }
69
+
70
+ @keyframes bounce-in {
71
+ 0% {
72
+ transform: scale(0.8);
73
+ }
74
+ 80% {
75
+ transform: scale(1.3);
76
+ }
77
+ 100% {
78
+ transform: scale(1);
79
+ }
80
+ }
81
+
82
+ @keyframes zoom-in {
83
+ from {
84
+ transform: scale(0);
85
+ }
86
+ to {
87
+ transform: scale(1);
88
+ }
89
+ }
90
+
91
+ @keyframes slide-in-left {
92
+ from {
93
+ transform: translateX(-150%);
94
+ }
95
+ to {
96
+ transform: translateX(0%);
97
+ }
98
+ }
99
+
100
+ @keyframes slide-up {
101
+ from {
102
+ transform: translateY(0%);
103
+ opacity: 1;
104
+ }
105
+ to {
106
+ transform: translateY(-100%);
107
+ opacity: 0;
108
+ }
109
+ }
110
+
111
+ @keyframes jiggle {
112
+ 0% {
113
+ transform: rotate(0deg);
114
+ }
115
+ 25% {
116
+ transform: rotate(5deg);
117
+ }
118
+ 50% {
119
+ transform: rotate(-5deg);
120
+ }
121
+ 75% {
122
+ transform: rotate(5deg);
123
+ }
124
+ 100% {
125
+ transform: rotate(0deg);
126
+ }
127
+ }
128
+
129
+ @keyframes barrel {
130
+ 0% {
131
+ transform: translate3d(0px, 0px, 0px) rotate3d(1, 0, 0, 0deg);
132
+ }
133
+ 10% {
134
+ transform: translate3d(30px, 10px, -30px) rotate3d(1, 0, 0, 36deg);
135
+ }
136
+ 20% {
137
+ transform: translate3d(60px, 20px, -60px) rotate3d(1, 0, 0, 72deg);
138
+ }
139
+ 30% {
140
+ transform: translate3d(90px, 40px, -90px) rotate3d(1, 1, 0, 108deg);
141
+ }
142
+ 40% {
143
+ transform: translate3d(120px, 60px, -120px) rotate3d(1, 1, 0, 144deg);
144
+ }
145
+ 50% {
146
+ transform: translate3d(150px, 80px, -150px) rotate3d(1, 1, 1, 180deg);
147
+ }
148
+ 60% {
149
+ transform: translate3d(120px, 100px, -120px) rotate3d(1, 1, 1, 216deg);
150
+ }
151
+ 70% {
152
+ transform: translate3d(90px, 120px, -90px) rotate3d(1, 1, 1, 252deg);
153
+ }
154
+ 80% {
155
+ transform: translate3d(60px, 140px, -60px) rotate3d(1, 1, 0, 288deg);
156
+ }
157
+ 90% {
158
+ transform: translate3d(30px, 160px, -30px) rotate3d(1, 0, 0, 324deg);
159
+ }
160
+ 100% {
161
+ transform: translate3d(0px, 180px, 0px) rotate3d(1, 0, 0, 360deg);
162
+ }
163
+ }
@@ -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
+ }
@@ -11,9 +11,9 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@editframe/cli": "0.15.0-beta.9",
15
- "@editframe/react": "0.15.0-beta.9",
16
- "@editframe/vite-plugin": "0.15.0-beta.9",
14
+ "@editframe/cli": "0.16.0-beta.1",
15
+ "@editframe/react": "0.16.0-beta.1",
16
+ "@editframe/vite-plugin": "0.16.0-beta.1",
17
17
  "@vitejs/plugin-react": "^4.3.1",
18
18
  "tailwindcss": "^3.4.3",
19
19
  "vite": "^5.2.11",
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import { Timegroup, Audio, Image, useTimingInfo } from "@editframe/react";
3
+
4
+ interface CardInfo {
5
+ title: string;
6
+ id: string;
7
+ }
8
+
9
+ const cards: CardInfo[] = [
10
+ {
11
+ title: "9 Of Spades",
12
+ id: "card-9-spades",
13
+ },
14
+ {
15
+ title: "King of Clubs",
16
+ id: "card-king-clubs",
17
+ },
18
+ {
19
+ title: "Queen of Spades",
20
+ id: "card-queen-spades",
21
+ },
22
+ {
23
+ title: "The Joker",
24
+ id: "card-joker",
25
+ },
26
+ ];
27
+
28
+ const CardSegment = ({ title, id }: CardInfo) => {
29
+ const { ownCurrentTimeMs, durationMs, percentComplete, ref } =
30
+ useTimingInfo();
31
+
32
+ return (
33
+ <Timegroup mode="contain" ref={ref}>
34
+ <div className="absolute flex flex-col items-center justify-center z-10">
35
+ <h1 className="text-4xl p-4">{title}</h1>
36
+ <Audio id={id} src={`/assets/cards/${id}.mp3`} />
37
+ <Image src={`/assets/cards/${id}.png`} className="w-1/4" />
38
+ <code>
39
+ {(ownCurrentTimeMs / 1000).toFixed(2)}s /{" "}
40
+ {(durationMs / 1000).toFixed(2)}s
41
+ </code>
42
+ <progress max="1" value={percentComplete} className="h-[10px]" />
43
+ </div>
44
+ <Image
45
+ src={`/assets/cards/${id}.png`}
46
+ className="absolute z-0 blur-lg opacity-20 "
47
+ />
48
+ </Timegroup>
49
+ );
50
+ };
51
+
52
+ export const Video = () => {
53
+ return (
54
+ <Timegroup
55
+ className="w-[500px] h-[500px] bg-slate-200 flex items-center justify-center relative overflow-hidden"
56
+ mode="sequence"
57
+ >
58
+ {cards.map((card) => (
59
+ <CardSegment key={card.id} {...card} />
60
+ ))}
61
+ </Timegroup>
62
+ );
63
+ };
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import ReactDOM from "react-dom/client";
3
+ import { Video } from "./Video";
4
+ import "@editframe/elements/styles.css";
5
+
6
+ const root = document.getElementById("root");
7
+ if (!root) {
8
+ throw new Error("Root element not found");
9
+ }
10
+
11
+ ReactDOM.createRoot(root).render(<Video />);
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -11,9 +11,9 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@editframe/cli": "0.15.0-beta.9",
15
- "@editframe/elements": "0.15.0-beta.9",
16
- "@editframe/vite-plugin": "0.15.0-beta.9",
14
+ "@editframe/cli": "0.16.0-beta.1",
15
+ "@editframe/elements": "0.16.0-beta.1",
16
+ "@editframe/vite-plugin": "0.16.0-beta.1",
17
17
  "tailwindcss": "^3.4.3",
18
18
  "vite": "^5.2.11",
19
19
  "vite-plugin-singlefile": "^2.0.1"
@@ -0,0 +1,2 @@
1
+ import "@editframe/elements";
2
+ import "@editframe/elements/styles.css";
@@ -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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editframe/create",
3
- "version": "0.15.0-beta.9",
3
+ "version": "0.16.0-beta.1",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "create-editframe": "dist/index.js"
@@ -1,15 +0,0 @@
1
- {
2
- "name": "@editframe/elements",
3
- "version": "0.5.0-beta.8",
4
- "description": "",
5
- "exports": {},
6
- "scripts": {},
7
- "author": "",
8
- "license": "UNLICENSED",
9
- "dependencies": {},
10
- "devDependencies": {
11
- "autoprefixer": "^10.4.19",
12
- "rollup-plugin-tsconfig-paths": "^1.5.2",
13
- "vite-tsconfig-paths": "^4.3.2"
14
- }
15
- }