@editframe/create 0.6.0-beta.17 → 0.6.0-beta.18
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/dist/templates/card-poetry/package.json +4 -4
- package/dist/templates/react-demo/index.html +13 -0
- package/dist/templates/react-demo/package.json +28 -0
- package/dist/templates/react-demo/postcss.config.cjs +5 -0
- package/dist/templates/react-demo/src/Video.tsx +62 -0
- package/dist/templates/react-demo/src/assets/.gitkeep +0 -0
- package/dist/templates/react-demo/src/assets/cards/card-9-spades.json +362 -0
- package/dist/templates/react-demo/src/assets/cards/card-9-spades.mp3 +0 -0
- package/dist/templates/react-demo/src/assets/cards/card-9-spades.png +0 -0
- package/dist/templates/react-demo/src/assets/cards/card-joker.json +326 -0
- package/dist/templates/react-demo/src/assets/cards/card-joker.mp3 +0 -0
- package/dist/templates/react-demo/src/assets/cards/card-joker.png +0 -0
- package/dist/templates/react-demo/src/assets/cards/card-king-clubs.json +344 -0
- package/dist/templates/react-demo/src/assets/cards/card-king-clubs.mp3 +0 -0
- package/dist/templates/react-demo/src/assets/cards/card-king-clubs.png +0 -0
- package/dist/templates/react-demo/src/assets/cards/card-queen-spades.json +338 -0
- package/dist/templates/react-demo/src/assets/cards/card-queen-spades.mp3 +0 -0
- package/dist/templates/react-demo/src/assets/cards/card-queen-spades.png +0 -0
- package/dist/templates/react-demo/src/main.tsx +10 -0
- package/dist/templates/react-demo/src/styles.css +3 -0
- package/dist/templates/react-demo/tailwind.config.js +8 -0
- package/dist/templates/react-demo/vite.config.ts +16 -0
- package/dist/templates/simple-demo/package.json +5 -5
- package/package.json +1 -1
- package/vite.config.ts.timestamp-1720899052384-0abb0e6a326c2.mjs +0 -94
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"
|
|
8
|
+
"start": "editframe preview"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [],
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@editframe/cli": "0.6.0-beta.
|
|
15
|
-
"@editframe/elements": "0.6.0-beta.
|
|
16
|
-
"@editframe/vite-plugin": "0.6.0-beta.
|
|
14
|
+
"@editframe/cli": "0.6.0-beta.18",
|
|
15
|
+
"@editframe/elements": "0.6.0-beta.18",
|
|
16
|
+
"@editframe/vite-plugin": "0.6.0-beta.18",
|
|
17
17
|
"tailwindcss": "^3.4.3",
|
|
18
18
|
"vite": "^5.2.11",
|
|
19
19
|
"vite-plugin-singlefile": "^2.0.1"
|
|
@@ -0,0 +1,13 @@
|
|
|
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>Card Poetry</title>
|
|
7
|
+
<script type="module" src="./src/main.tsx"></script>
|
|
8
|
+
<link rel="stylesheet" href="./src/styles.css" />
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "card-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.6.0-beta.18",
|
|
15
|
+
"@editframe/react": "0.6.0-beta.18",
|
|
16
|
+
"@editframe/vite-plugin": "0.6.0-beta.18",
|
|
17
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
18
|
+
"tailwindcss": "^3.4.3",
|
|
19
|
+
"vite": "^5.2.11",
|
|
20
|
+
"vite-plugin-singlefile": "^2.0.1",
|
|
21
|
+
"react": "^18.3.0",
|
|
22
|
+
"react-dom": "^18.3.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/react": "^18.3.0",
|
|
26
|
+
"@types/react-dom": "^18.3.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { EFTimegroup, EFAudio, EFImage, useTimingInfo } from "@editframe/react";
|
|
2
|
+
|
|
3
|
+
interface CardInfo {
|
|
4
|
+
title: string;
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const cards: CardInfo[] = [
|
|
9
|
+
{
|
|
10
|
+
title: "9 Of Spades",
|
|
11
|
+
id: "card-9-spades",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: "King of Clubs",
|
|
15
|
+
id: "card-king-clubs",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: "Queen of Spades",
|
|
19
|
+
id: "card-queen-spades",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
title: "The Joker",
|
|
23
|
+
id: "card-joker",
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const CardSegment = ({ title, id }: CardInfo) => {
|
|
28
|
+
const { ownCurrentTimeMs, durationMs, percentComplete, ref } =
|
|
29
|
+
useTimingInfo();
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<EFTimegroup mode="contain" ref={ref}>
|
|
33
|
+
<div className="absolute flex flex-col items-center justify-center z-10">
|
|
34
|
+
<h1 className="text-4xl p-4">{title}</h1>
|
|
35
|
+
<EFAudio id={id} src={`/assets/cards/${id}.mp3`} />
|
|
36
|
+
<EFImage src={`/assets/cards/${id}.png`} className="w-1/4" />
|
|
37
|
+
<code>
|
|
38
|
+
{(ownCurrentTimeMs / 1000).toFixed(2)}s /{" "}
|
|
39
|
+
{(durationMs / 1000).toFixed(2)}s
|
|
40
|
+
</code>
|
|
41
|
+
<progress max="1" value={percentComplete} className="h-[10px]" />
|
|
42
|
+
</div>
|
|
43
|
+
<EFImage
|
|
44
|
+
src={`/assets/cards/${id}.png`}
|
|
45
|
+
className="absolute z-0 blur-lg opacity-20 "
|
|
46
|
+
/>
|
|
47
|
+
</EFTimegroup>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const Video = () => {
|
|
52
|
+
return (
|
|
53
|
+
<EFTimegroup
|
|
54
|
+
className="w-[500px] h-[500px] bg-slate-200 flex items-center justify-center relative overflow-hidden"
|
|
55
|
+
mode="sequence"
|
|
56
|
+
>
|
|
57
|
+
{cards.map((card) => (
|
|
58
|
+
<CardSegment key={card.id} {...card} />
|
|
59
|
+
))}
|
|
60
|
+
</EFTimegroup>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
{
|
|
2
|
+
"text": " Behold the unassuming Nine of Spades, a shadowy envoy in the deck, its presence subtle yet commanding. This card, with its sleek black design, whispers tales of mystery and strategy. A strategic companion in the realm of poker and beyond, the Nine of Spades wields influence from the sidelines, a silent architect of fate.",
|
|
3
|
+
"segments": [
|
|
4
|
+
{
|
|
5
|
+
"start": 0.1,
|
|
6
|
+
"end": 6.1,
|
|
7
|
+
"text": " Behold the unassuming Nine of Spades, a shadowy envoy in the deck, its presence subtle yet commanding.",
|
|
8
|
+
"confidence": 0.94,
|
|
9
|
+
"words": [
|
|
10
|
+
{
|
|
11
|
+
"text": "Behold",
|
|
12
|
+
"start": 0.1,
|
|
13
|
+
"end": 0.38,
|
|
14
|
+
"confidence": 0.92
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"text": "the",
|
|
18
|
+
"start": 0.38,
|
|
19
|
+
"end": 0.54,
|
|
20
|
+
"confidence": 0.99
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"text": "unassuming",
|
|
24
|
+
"start": 0.54,
|
|
25
|
+
"end": 1.06,
|
|
26
|
+
"confidence": 0.99
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"text": "Nine",
|
|
30
|
+
"start": 1.06,
|
|
31
|
+
"end": 1.32,
|
|
32
|
+
"confidence": 0.91
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"text": "of",
|
|
36
|
+
"start": 1.32,
|
|
37
|
+
"end": 1.48,
|
|
38
|
+
"confidence": 0.99
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"text": "Spades,",
|
|
42
|
+
"start": 1.48,
|
|
43
|
+
"end": 1.98,
|
|
44
|
+
"confidence": 0.98
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"text": "a",
|
|
48
|
+
"start": 2.18,
|
|
49
|
+
"end": 2.26,
|
|
50
|
+
"confidence": 0.98
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"text": "shadowy",
|
|
54
|
+
"start": 2.26,
|
|
55
|
+
"end": 2.74,
|
|
56
|
+
"confidence": 0.99
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"text": "envoy",
|
|
60
|
+
"start": 2.74,
|
|
61
|
+
"end": 3.02,
|
|
62
|
+
"confidence": 0.65
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"text": "in",
|
|
66
|
+
"start": 3.02,
|
|
67
|
+
"end": 3.32,
|
|
68
|
+
"confidence": 0.99
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"text": "the",
|
|
72
|
+
"start": 3.32,
|
|
73
|
+
"end": 3.42,
|
|
74
|
+
"confidence": 0.99
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"text": "deck,",
|
|
78
|
+
"start": 3.42,
|
|
79
|
+
"end": 3.72,
|
|
80
|
+
"confidence": 0.91
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"text": "its",
|
|
84
|
+
"start": 4.04,
|
|
85
|
+
"end": 4.18,
|
|
86
|
+
"confidence": 0.88
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"text": "presence",
|
|
90
|
+
"start": 4.18,
|
|
91
|
+
"end": 4.58,
|
|
92
|
+
"confidence": 0.98
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"text": "subtle",
|
|
96
|
+
"start": 4.58,
|
|
97
|
+
"end": 5.08,
|
|
98
|
+
"confidence": 0.92
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"text": "yet",
|
|
102
|
+
"start": 5.08,
|
|
103
|
+
"end": 5.44,
|
|
104
|
+
"confidence": 0.87
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"text": "commanding.",
|
|
108
|
+
"start": 5.44,
|
|
109
|
+
"end": 6.1,
|
|
110
|
+
"confidence": 0.89
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"start": 7.12,
|
|
116
|
+
"end": 11.46,
|
|
117
|
+
"text": " This card, with its sleek black design, whispers tales of mystery and strategy.",
|
|
118
|
+
"confidence": 0.99,
|
|
119
|
+
"words": [
|
|
120
|
+
{
|
|
121
|
+
"text": "This",
|
|
122
|
+
"start": 7.12,
|
|
123
|
+
"end": 7.28,
|
|
124
|
+
"confidence": 0.99
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"text": "card,",
|
|
128
|
+
"start": 7.28,
|
|
129
|
+
"end": 7.62,
|
|
130
|
+
"confidence": 1.0
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"text": "with",
|
|
134
|
+
"start": 7.9,
|
|
135
|
+
"end": 8.0,
|
|
136
|
+
"confidence": 1.0
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"text": "its",
|
|
140
|
+
"start": 8.0,
|
|
141
|
+
"end": 8.16,
|
|
142
|
+
"confidence": 0.98
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"text": "sleek",
|
|
146
|
+
"start": 8.16,
|
|
147
|
+
"end": 8.4,
|
|
148
|
+
"confidence": 1.0
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"text": "black",
|
|
152
|
+
"start": 8.4,
|
|
153
|
+
"end": 8.68,
|
|
154
|
+
"confidence": 0.98
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"text": "design,",
|
|
158
|
+
"start": 8.68,
|
|
159
|
+
"end": 9.12,
|
|
160
|
+
"confidence": 1.0
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"text": "whispers",
|
|
164
|
+
"start": 9.48,
|
|
165
|
+
"end": 9.76,
|
|
166
|
+
"confidence": 0.99
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"text": "tales",
|
|
170
|
+
"start": 9.76,
|
|
171
|
+
"end": 10.08,
|
|
172
|
+
"confidence": 0.99
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"text": "of",
|
|
176
|
+
"start": 10.08,
|
|
177
|
+
"end": 10.32,
|
|
178
|
+
"confidence": 1.0
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"text": "mystery",
|
|
182
|
+
"start": 10.32,
|
|
183
|
+
"end": 10.68,
|
|
184
|
+
"confidence": 1.0
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"text": "and",
|
|
188
|
+
"start": 10.68,
|
|
189
|
+
"end": 11.04,
|
|
190
|
+
"confidence": 0.98
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"text": "strategy.",
|
|
194
|
+
"start": 11.04,
|
|
195
|
+
"end": 11.46,
|
|
196
|
+
"confidence": 1.0
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"start": 12.68,
|
|
202
|
+
"end": 15.74,
|
|
203
|
+
"text": " A strategic companion in the realm of poker and beyond,",
|
|
204
|
+
"confidence": 0.97,
|
|
205
|
+
"words": [
|
|
206
|
+
{
|
|
207
|
+
"text": "A",
|
|
208
|
+
"start": 12.68,
|
|
209
|
+
"end": 12.8,
|
|
210
|
+
"confidence": 0.99
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"text": "strategic",
|
|
214
|
+
"start": 12.8,
|
|
215
|
+
"end": 13.22,
|
|
216
|
+
"confidence": 0.99
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"text": "companion",
|
|
220
|
+
"start": 13.22,
|
|
221
|
+
"end": 13.84,
|
|
222
|
+
"confidence": 1.0
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"text": "in",
|
|
226
|
+
"start": 13.84,
|
|
227
|
+
"end": 14.18,
|
|
228
|
+
"confidence": 1.0
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"text": "the",
|
|
232
|
+
"start": 14.18,
|
|
233
|
+
"end": 14.28,
|
|
234
|
+
"confidence": 1.0
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"text": "realm",
|
|
238
|
+
"start": 14.28,
|
|
239
|
+
"end": 14.48,
|
|
240
|
+
"confidence": 0.98
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"text": "of",
|
|
244
|
+
"start": 14.48,
|
|
245
|
+
"end": 14.64,
|
|
246
|
+
"confidence": 1.0
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"text": "poker",
|
|
250
|
+
"start": 14.64,
|
|
251
|
+
"end": 14.96,
|
|
252
|
+
"confidence": 0.9
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"text": "and",
|
|
256
|
+
"start": 14.96,
|
|
257
|
+
"end": 15.34,
|
|
258
|
+
"confidence": 0.86
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"text": "beyond,",
|
|
262
|
+
"start": 15.34,
|
|
263
|
+
"end": 15.74,
|
|
264
|
+
"confidence": 1.0
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"start": 16.02,
|
|
270
|
+
"end": 20.32,
|
|
271
|
+
"text": " the Nine of Spades wields influence from the sidelines, a silent architect of fate.",
|
|
272
|
+
"confidence": 0.98,
|
|
273
|
+
"words": [
|
|
274
|
+
{
|
|
275
|
+
"text": "the",
|
|
276
|
+
"start": 16.02,
|
|
277
|
+
"end": 16.18,
|
|
278
|
+
"confidence": 0.91
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"text": "Nine",
|
|
282
|
+
"start": 16.18,
|
|
283
|
+
"end": 16.38,
|
|
284
|
+
"confidence": 0.97
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"text": "of",
|
|
288
|
+
"start": 16.38,
|
|
289
|
+
"end": 16.54,
|
|
290
|
+
"confidence": 1.0
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"text": "Spades",
|
|
294
|
+
"start": 16.54,
|
|
295
|
+
"end": 16.86,
|
|
296
|
+
"confidence": 0.97
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"text": "wields",
|
|
300
|
+
"start": 16.86,
|
|
301
|
+
"end": 17.28,
|
|
302
|
+
"confidence": 0.99
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"text": "influence",
|
|
306
|
+
"start": 17.28,
|
|
307
|
+
"end": 17.66,
|
|
308
|
+
"confidence": 0.99
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"text": "from",
|
|
312
|
+
"start": 17.66,
|
|
313
|
+
"end": 17.92,
|
|
314
|
+
"confidence": 1.0
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"text": "the",
|
|
318
|
+
"start": 17.92,
|
|
319
|
+
"end": 18.08,
|
|
320
|
+
"confidence": 1.0
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"text": "sidelines,",
|
|
324
|
+
"start": 18.08,
|
|
325
|
+
"end": 18.7,
|
|
326
|
+
"confidence": 0.94
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"text": "a",
|
|
330
|
+
"start": 19.0,
|
|
331
|
+
"end": 19.08,
|
|
332
|
+
"confidence": 0.98
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"text": "silent",
|
|
336
|
+
"start": 19.08,
|
|
337
|
+
"end": 19.36,
|
|
338
|
+
"confidence": 1.0
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"text": "architect",
|
|
342
|
+
"start": 19.36,
|
|
343
|
+
"end": 19.8,
|
|
344
|
+
"confidence": 0.98
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"text": "of",
|
|
348
|
+
"start": 19.8,
|
|
349
|
+
"end": 20.06,
|
|
350
|
+
"confidence": 0.99
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"text": "fate.",
|
|
354
|
+
"start": 20.06,
|
|
355
|
+
"end": 20.32,
|
|
356
|
+
"confidence": 0.98
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"language": "en"
|
|
362
|
+
}
|
|
Binary file
|
|
Binary file
|