@editframe/create 0.6.0-beta.12 → 0.6.0-beta.14

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.
Files changed (29) hide show
  1. package/dist/index.cjs +27 -8
  2. package/dist/index.js +28 -9
  3. package/dist/templates/card-poetry/index.html +63 -0
  4. package/dist/{project-template → templates/card-poetry}/package.json +3 -3
  5. package/dist/templates/card-poetry/src/assets/cards/card-9-spades.json +362 -0
  6. package/dist/templates/card-poetry/src/assets/cards/card-9-spades.mp3 +0 -0
  7. package/dist/templates/card-poetry/src/assets/cards/card-9-spades.png +0 -0
  8. package/dist/templates/card-poetry/src/assets/cards/card-joker.json +326 -0
  9. package/dist/templates/card-poetry/src/assets/cards/card-joker.mp3 +0 -0
  10. package/dist/templates/card-poetry/src/assets/cards/card-joker.png +0 -0
  11. package/dist/templates/card-poetry/src/assets/cards/card-king-clubs.json +344 -0
  12. package/dist/templates/card-poetry/src/assets/cards/card-king-clubs.mp3 +0 -0
  13. package/dist/templates/card-poetry/src/assets/cards/card-king-clubs.png +0 -0
  14. package/dist/templates/card-poetry/src/assets/cards/card-queen-spades.json +338 -0
  15. package/dist/templates/card-poetry/src/assets/cards/card-queen-spades.mp3 +0 -0
  16. package/dist/templates/card-poetry/src/assets/cards/card-queen-spades.png +0 -0
  17. package/dist/templates/simple-demo/package.json +21 -0
  18. package/dist/templates/simple-demo/src/assets/.gitkeep +0 -0
  19. package/dist/templates/simple-demo/src/index.js +2 -0
  20. package/dist/templates/simple-demo/src/styles.css +30 -0
  21. package/dist/templates/simple-demo/tailwind.config.js +8 -0
  22. package/package.json +4 -2
  23. /package/dist/{project-template → templates/card-poetry}/src/assets/.gitkeep +0 -0
  24. /package/dist/{project-template → templates/card-poetry}/src/index.js +0 -0
  25. /package/dist/{project-template → templates/card-poetry}/src/styles.css +0 -0
  26. /package/dist/{project-template → templates/card-poetry}/tailwind.config.js +0 -0
  27. /package/dist/{project-template → templates/simple-demo}/index.html +0 -0
  28. /package/dist/{project-template → templates/simple-demo}/src/assets/bars-n-tone.mp4 +0 -0
  29. /package/dist/{project-template → templates/simple-demo}/src/assets/editframe.png +0 -0
package/dist/index.cjs CHANGED
@@ -2,15 +2,34 @@
2
2
  "use strict";
3
3
  const promises = require("node:fs/promises");
4
4
  const path = require("node:path");
5
+ const node_url = require("node:url");
6
+ const prompts = require("prompts");
5
7
  var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
6
8
  async function main() {
7
- console.log("Creating elements project...");
8
- console.log(
9
- "Copying template files into current directory...",
10
- process.cwd()
11
- );
12
- const __dirname = path.dirname(new URL(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.src || new URL("index.cjs", document.baseURI).href).pathname);
13
- const templateDir = path.join(__dirname, "project-template");
14
- await promises.cp(templateDir, process.cwd(), { recursive: true });
9
+ const __dirname = path.dirname(node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.src || new URL("index.cjs", document.baseURI).href));
10
+ const templates = await promises.readdir(path.join(__dirname, "templates"));
11
+ const answers = await prompts([
12
+ {
13
+ type: "text",
14
+ name: "directoryName",
15
+ message: "Enter the name of the directory to generate into:",
16
+ initial: "my-project"
17
+ },
18
+ {
19
+ type: "select",
20
+ name: "templateName",
21
+ message: "Choose a starter template:",
22
+ choices: templates.map((template) => ({
23
+ title: template,
24
+ value: template
25
+ }))
26
+ }
27
+ ]);
28
+ const targetDir = path.join(process.cwd(), answers.directoryName);
29
+ const templateDir = path.join(__dirname, "templates", answers.templateName);
30
+ console.log(`Creating project in directory: ${targetDir}`);
31
+ console.log(`Using template: ${answers.templateName}`);
32
+ await promises.cp(templateDir, targetDir, { recursive: true });
33
+ console.log("Project created successfully.");
15
34
  }
16
35
  main();
package/dist/index.js CHANGED
@@ -1,14 +1,33 @@
1
1
  #!/usr/bin/env node
2
- import { cp } from "node:fs/promises";
2
+ import { readdir, cp } from "node:fs/promises";
3
3
  import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import prompts from "prompts";
4
6
  async function main() {
5
- console.log("Creating elements project...");
6
- console.log(
7
- "Copying template files into current directory...",
8
- process.cwd()
9
- );
10
- const __dirname = path.dirname(new URL(import.meta.url).pathname);
11
- const templateDir = path.join(__dirname, "project-template");
12
- await cp(templateDir, process.cwd(), { recursive: true });
7
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
+ const templates = await readdir(path.join(__dirname, "templates"));
9
+ const answers = await prompts([
10
+ {
11
+ type: "text",
12
+ name: "directoryName",
13
+ message: "Enter the name of the directory to generate into:",
14
+ initial: "my-project"
15
+ },
16
+ {
17
+ type: "select",
18
+ name: "templateName",
19
+ message: "Choose a starter template:",
20
+ choices: templates.map((template) => ({
21
+ title: template,
22
+ value: template
23
+ }))
24
+ }
25
+ ]);
26
+ const targetDir = path.join(process.cwd(), answers.directoryName);
27
+ const templateDir = path.join(__dirname, "templates", answers.templateName);
28
+ console.log(`Creating project in directory: ${targetDir}`);
29
+ console.log(`Using template: ${answers.templateName}`);
30
+ await cp(templateDir, targetDir, { recursive: true });
31
+ console.log("Project created successfully.");
13
32
  }
14
33
  main();
@@ -0,0 +1,63 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <script type="module" src="./src/index.js"></script>
6
+ <link rel="stylesheet" href="./src/styles.css" />
7
+ <link rel="stylesheet" href="./src/keyframes.css" />
8
+ <meta name="version" content="169" />
9
+ </head>
10
+ <body>
11
+ <ef-timegroup
12
+ mode="sequence"
13
+ class="h-[500px] w-[500px] overflow-scroll bg-slate-400"
14
+ >
15
+ <ef-timegroup
16
+ mode="contain"
17
+ class="absolute"
18
+ style="
19
+ animation:
20
+ fadein 1250ms backwards,
21
+ fadeout 50ms calc(var(--ef-duration) - 50ms) forwards,
22
+ 250ms slide-out-right calc(var(--ef-duration) - 250ms) forwards;
23
+ "
24
+ >
25
+ <ef-audio id="joker-poem" src="/assets/cards/card-joker.mp3"></ef-audio>
26
+ <div
27
+ class="absolute z-10 flex h-full w-full flex-col items-center justify-center"
28
+ >
29
+ <h1
30
+ class="mb-3 inline-block font-serif text-7xl font-extralight underline"
31
+ style="animation: 1s slide-in-left ease-out"
32
+ >
33
+ The Joker
34
+ </h1>
35
+ <ef-image
36
+ class="w-1/4"
37
+ src="/assets/cards/card-joker.png"
38
+ style="
39
+ animation-composition: add;
40
+ animation:
41
+ 4s rotate 4s,
42
+ 1s slide-in-left 0.25s ease-out backwards;
43
+ "
44
+ ></ef-image>
45
+ <ef-waveform
46
+ class="h-4 w-1/2 self-center"
47
+ target="#joker-poem"
48
+ ></ef-waveform>
49
+ <ef-captions
50
+ class="h-24 p-2 text-center text-4xl"
51
+ target="#joker-poem"
52
+ ><ef-captions-active-word></ef-captions-active-word
53
+ ></ef-captions>
54
+ </div>
55
+ <ef-image
56
+ class="absolute z-0 h-full opacity-20 blur-md"
57
+ src="/assets/cards/card-joker.png"
58
+ style="animation: 1.25s slide-in-left 0.25s ease-out backwards"
59
+ ></ef-image>
60
+ </ef-timegroup>
61
+ </ef-timegroup>
62
+ </body>
63
+ </html>
@@ -11,9 +11,9 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@editframe/cli": "0.6.0-beta.12",
15
- "@editframe/elements": "0.6.0-beta.12",
16
- "@editframe/vite-plugin": "0.6.0-beta.12",
14
+ "@editframe/cli": "0.6.0-beta.14",
15
+ "@editframe/elements": "0.6.0-beta.14",
16
+ "@editframe/vite-plugin": "0.6.0-beta.14",
17
17
  "tailwindcss": "^3.4.3",
18
18
  "vite": "^5.2.11",
19
19
  "vite-plugin-singlefile": "^2.0.1"
@@ -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
+ }