@editframe/elements 0.25.0-beta.0 → 0.26.0-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.
- package/dist/elements/EFMedia/AssetMediaEngine.js +2 -1
- package/dist/elements/EFMedia/AssetMediaEngine.js.map +1 -1
- package/dist/elements/EFMedia/BaseMediaEngine.js +13 -0
- package/dist/elements/EFMedia/BaseMediaEngine.js.map +1 -1
- package/dist/elements/EFMedia/JitMediaEngine.js +2 -1
- package/dist/elements/EFMedia/JitMediaEngine.js.map +1 -1
- package/dist/elements/EFMedia/audioTasks/makeAudioBufferTask.js +11 -4
- package/dist/elements/EFMedia/audioTasks/makeAudioBufferTask.js.map +1 -1
- package/dist/elements/EFMedia/shared/BufferUtils.js +16 -1
- package/dist/elements/EFMedia/shared/BufferUtils.js.map +1 -1
- package/dist/elements/EFMedia/videoTasks/makeVideoBufferTask.js +11 -4
- package/dist/elements/EFMedia/videoTasks/makeVideoBufferTask.js.map +1 -1
- package/dist/elements/EFSurface.d.ts +4 -4
- package/dist/elements/EFTemporal.js +16 -2
- package/dist/elements/EFTemporal.js.map +1 -1
- package/dist/elements/EFThumbnailStrip.d.ts +4 -4
- package/dist/elements/EFTimegroup.d.ts +22 -0
- package/dist/elements/EFTimegroup.js +35 -0
- package/dist/elements/EFTimegroup.js.map +1 -1
- package/dist/elements/updateAnimations.js +3 -1
- package/dist/elements/updateAnimations.js.map +1 -1
- package/dist/gui/EFControls.d.ts +2 -2
- package/dist/gui/EFDial.d.ts +4 -4
- package/dist/gui/EFFocusOverlay.d.ts +4 -4
- package/dist/gui/EFPause.d.ts +4 -4
- package/dist/gui/EFPlay.d.ts +4 -4
- package/dist/gui/EFResizableBox.d.ts +4 -4
- package/dist/gui/EFScrubber.d.ts +4 -4
- package/dist/gui/EFTimeDisplay.d.ts +4 -4
- package/dist/gui/EFToggleLoop.d.ts +4 -4
- package/dist/gui/TWMixin.js +1 -1
- package/dist/gui/TWMixin.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/style.css +877 -0
- package/dist/transcoding/types/index.d.ts +1 -0
- package/package.json +30 -8
- package/scripts/build-css.js +41 -0
- package/src/elements/EFMedia/AssetMediaEngine.ts +1 -0
- package/src/elements/EFMedia/BaseMediaEngine.ts +20 -0
- package/src/elements/EFMedia/JitMediaEngine.browsertest.ts +68 -0
- package/src/elements/EFMedia/JitMediaEngine.ts +1 -0
- package/src/elements/EFMedia/audioTasks/makeAudioBufferTask.ts +12 -0
- package/src/elements/EFMedia/shared/BufferUtils.ts +42 -0
- package/src/elements/EFMedia/videoTasks/makeVideoBufferTask.ts +12 -0
- package/src/elements/EFTemporal.ts +20 -4
- package/src/elements/EFTimegroup.browsertest.ts +198 -0
- package/src/elements/EFTimegroup.ts +57 -0
- package/src/elements/updateAnimations.browsertest.ts +801 -0
- package/src/elements/updateAnimations.ts +12 -1
- package/src/transcoding/types/index.ts +1 -0
- package/tsdown.config.ts +24 -3
- package/types.json +1 -1
- package/dist/elements-ZhsB7B5N.css +0 -9
- package/dist/elements-ZhsB7B5N.css.map +0 -1
- package/dist/elements.js +0 -0
|
@@ -156,7 +156,18 @@ const coordinateAnimationsForSingleElement = (
|
|
|
156
156
|
|
|
157
157
|
const adjustedTime = currentTime - delay;
|
|
158
158
|
const currentIteration = Math.floor(adjustedTime / duration);
|
|
159
|
-
|
|
159
|
+
let currentIterationTime = adjustedTime % duration;
|
|
160
|
+
|
|
161
|
+
// Handle animation-direction
|
|
162
|
+
const direction = timing.direction || "normal";
|
|
163
|
+
const shouldReverse =
|
|
164
|
+
direction === "reverse" ||
|
|
165
|
+
(direction === "alternate" && currentIteration % 2 === 1) ||
|
|
166
|
+
(direction === "alternate-reverse" && currentIteration % 2 === 0);
|
|
167
|
+
|
|
168
|
+
if (shouldReverse) {
|
|
169
|
+
currentIterationTime = duration - currentIterationTime;
|
|
170
|
+
}
|
|
160
171
|
|
|
161
172
|
// Calculate the total animation timeline length (delay + duration * iterations)
|
|
162
173
|
const totalAnimationLength = delay + duration * iterations;
|
package/tsdown.config.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
|
|
3
|
+
import autoprefixer from "autoprefixer";
|
|
4
|
+
import postcss from "postcss";
|
|
5
|
+
import tailwindcss from "tailwindcss";
|
|
4
6
|
import { defineConfig, type Plugin } from "tsdown";
|
|
5
7
|
|
|
6
8
|
import { createTsdownConfig } from "../tsdown.config.base.ts";
|
|
7
9
|
|
|
8
|
-
// Plugin to handle CSS ?inline imports
|
|
10
|
+
// Plugin to handle CSS ?inline imports with Tailwind processing
|
|
9
11
|
const inlineCssPlugin = (): Plugin => ({
|
|
10
12
|
name: "inline-css",
|
|
11
13
|
resolveId(source, importer) {
|
|
@@ -18,10 +20,24 @@ const inlineCssPlugin = (): Plugin => ({
|
|
|
18
20
|
}
|
|
19
21
|
return null;
|
|
20
22
|
},
|
|
21
|
-
load(id) {
|
|
23
|
+
async load(id) {
|
|
22
24
|
if (id.endsWith("?inline")) {
|
|
23
25
|
const filePath = id.replace("?inline", "");
|
|
24
26
|
const css = readFileSync(filePath, "utf-8");
|
|
27
|
+
|
|
28
|
+
// Process through Tailwind if it contains @tailwind directives
|
|
29
|
+
if (css.includes("@tailwind")) {
|
|
30
|
+
const srcDir = path.resolve(path.dirname(filePath));
|
|
31
|
+
const result = await postcss([
|
|
32
|
+
tailwindcss({
|
|
33
|
+
content: [path.join(srcDir, "**/*.ts")],
|
|
34
|
+
}),
|
|
35
|
+
autoprefixer(),
|
|
36
|
+
]).process(css, { from: filePath });
|
|
37
|
+
|
|
38
|
+
return `export default ${JSON.stringify(result.css)}`;
|
|
39
|
+
}
|
|
40
|
+
|
|
25
41
|
return `export default ${JSON.stringify(css)}`;
|
|
26
42
|
}
|
|
27
43
|
return null;
|
|
@@ -32,5 +48,10 @@ export default defineConfig(
|
|
|
32
48
|
createTsdownConfig({
|
|
33
49
|
plugins: [inlineCssPlugin()],
|
|
34
50
|
external: [/@editframe\/assets/],
|
|
51
|
+
publint: false, // Disabled because CSS is built after tsdown
|
|
52
|
+
additionalExports: {
|
|
53
|
+
"./styles.css": "./dist/style.css",
|
|
54
|
+
"./types.json": "./types.json",
|
|
55
|
+
},
|
|
35
56
|
}),
|
|
36
57
|
);
|