@editframe/react 0.6.0-beta.19 → 0.6.0-beta.22
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/EFAudio.cjs +11 -0
- package/dist/elements/EFAudio.js +11 -0
- package/dist/elements/EFCaptions.cjs +17 -0
- package/dist/elements/EFCaptions.js +17 -0
- package/dist/elements/EFImage.cjs +11 -0
- package/dist/elements/EFImage.js +11 -0
- package/dist/elements/EFTimegroup.cjs +11 -0
- package/dist/elements/EFTimegroup.js +11 -0
- package/dist/elements/EFVideo.cjs +11 -0
- package/dist/elements/EFVideo.js +11 -0
- package/dist/elements/EFWaveform.cjs +11 -0
- package/dist/elements/EFWaveform.js +11 -0
- package/dist/gui/EFFilmstrip.cjs +11 -0
- package/dist/gui/EFFilmstrip.js +11 -0
- package/dist/gui/EFWorkbench.cjs +11 -0
- package/dist/gui/EFWorkbench.js +11 -0
- package/dist/hooks/useTimingInfo.cjs +35 -0
- package/dist/hooks/useTimingInfo.js +35 -0
- package/dist/index.cjs +21 -0
- package/dist/index.js +21 -0
- package/dist/packages/react/src/elements/EFAudio.d.ts +3 -0
- package/dist/packages/react/src/elements/EFCaptions.d.ts +4 -0
- package/dist/packages/react/src/elements/EFImage.d.ts +3 -0
- package/dist/packages/react/src/elements/EFTimegroup.d.ts +3 -0
- package/dist/packages/react/src/elements/EFVideo.d.ts +3 -0
- package/dist/packages/react/src/elements/EFWaveform.d.ts +3 -0
- package/dist/packages/react/src/gui/EFFilmstrip.d.ts +3 -0
- package/dist/packages/react/src/gui/EFWorkbench.d.ts +3 -0
- package/dist/packages/react/src/hooks/useTimingInfo.d.ts +8 -0
- package/dist/packages/react/src/index.d.ts +9 -0
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const react = require("@lit/react");
|
|
5
|
+
const elements = require("@editframe/elements");
|
|
6
|
+
const EFAudio = react.createComponent({
|
|
7
|
+
tagName: "ef-audio",
|
|
8
|
+
elementClass: elements.EFAudio,
|
|
9
|
+
react: React
|
|
10
|
+
});
|
|
11
|
+
exports.EFAudio = EFAudio;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { EFAudio as EFAudio$1 } from "@editframe/elements";
|
|
4
|
+
const EFAudio = createComponent({
|
|
5
|
+
tagName: "ef-audio",
|
|
6
|
+
elementClass: EFAudio$1,
|
|
7
|
+
react: React
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
EFAudio
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const react = require("@lit/react");
|
|
5
|
+
const elements = require("@editframe/elements");
|
|
6
|
+
const EFCaptions = react.createComponent({
|
|
7
|
+
tagName: "ef-captions",
|
|
8
|
+
elementClass: elements.EFCaptions,
|
|
9
|
+
react: React
|
|
10
|
+
});
|
|
11
|
+
const EFCaptionsActiveWord = react.createComponent({
|
|
12
|
+
tagName: "ef-captions-active-word",
|
|
13
|
+
elementClass: elements.EFCaptionsActiveWord,
|
|
14
|
+
react: React
|
|
15
|
+
});
|
|
16
|
+
exports.EFCaptions = EFCaptions;
|
|
17
|
+
exports.EFCaptionsActiveWord = EFCaptionsActiveWord;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { EFCaptions as EFCaptions$1, EFCaptionsActiveWord as EFCaptionsActiveWord$1 } from "@editframe/elements";
|
|
4
|
+
const EFCaptions = createComponent({
|
|
5
|
+
tagName: "ef-captions",
|
|
6
|
+
elementClass: EFCaptions$1,
|
|
7
|
+
react: React
|
|
8
|
+
});
|
|
9
|
+
const EFCaptionsActiveWord = createComponent({
|
|
10
|
+
tagName: "ef-captions-active-word",
|
|
11
|
+
elementClass: EFCaptionsActiveWord$1,
|
|
12
|
+
react: React
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
EFCaptions,
|
|
16
|
+
EFCaptionsActiveWord
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const react = require("@lit/react");
|
|
5
|
+
const elements = require("@editframe/elements");
|
|
6
|
+
const EFImage = react.createComponent({
|
|
7
|
+
tagName: "ef-image",
|
|
8
|
+
elementClass: elements.EFImage,
|
|
9
|
+
react: React
|
|
10
|
+
});
|
|
11
|
+
exports.EFImage = EFImage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { EFImage as EFImage$1 } from "@editframe/elements";
|
|
4
|
+
const EFImage = createComponent({
|
|
5
|
+
tagName: "ef-image",
|
|
6
|
+
elementClass: EFImage$1,
|
|
7
|
+
react: React
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
EFImage
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const react = require("@lit/react");
|
|
5
|
+
const elements = require("@editframe/elements");
|
|
6
|
+
const EFTimegroup = react.createComponent({
|
|
7
|
+
tagName: "ef-timegroup",
|
|
8
|
+
elementClass: elements.EFTimegroup,
|
|
9
|
+
react: React
|
|
10
|
+
});
|
|
11
|
+
exports.EFTimegroup = EFTimegroup;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { EFTimegroup as EFTimegroup$1 } from "@editframe/elements";
|
|
4
|
+
const EFTimegroup = createComponent({
|
|
5
|
+
tagName: "ef-timegroup",
|
|
6
|
+
elementClass: EFTimegroup$1,
|
|
7
|
+
react: React
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
EFTimegroup
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const react = require("@lit/react");
|
|
5
|
+
const elements = require("@editframe/elements");
|
|
6
|
+
const EFVideo = react.createComponent({
|
|
7
|
+
tagName: "ef-video",
|
|
8
|
+
elementClass: elements.EFVideo,
|
|
9
|
+
react: React
|
|
10
|
+
});
|
|
11
|
+
exports.EFVideo = EFVideo;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { EFVideo as EFVideo$1 } from "@editframe/elements";
|
|
4
|
+
const EFVideo = createComponent({
|
|
5
|
+
tagName: "ef-video",
|
|
6
|
+
elementClass: EFVideo$1,
|
|
7
|
+
react: React
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
EFVideo
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const react = require("@lit/react");
|
|
5
|
+
const elements = require("@editframe/elements");
|
|
6
|
+
const EFWaveform = react.createComponent({
|
|
7
|
+
tagName: "ef-waveform",
|
|
8
|
+
elementClass: elements.EFWaveform,
|
|
9
|
+
react: React
|
|
10
|
+
});
|
|
11
|
+
exports.EFWaveform = EFWaveform;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { EFWaveform as EFWaveform$1 } from "@editframe/elements";
|
|
4
|
+
const EFWaveform = createComponent({
|
|
5
|
+
tagName: "ef-waveform",
|
|
6
|
+
elementClass: EFWaveform$1,
|
|
7
|
+
react: React
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
EFWaveform
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const react = require("@lit/react");
|
|
5
|
+
const elements = require("@editframe/elements");
|
|
6
|
+
const EFFilmstrip = react.createComponent({
|
|
7
|
+
tagName: "ef-filmstrip",
|
|
8
|
+
elementClass: elements.EFFilmstrip,
|
|
9
|
+
react: React
|
|
10
|
+
});
|
|
11
|
+
exports.EFFilmstrip = EFFilmstrip;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { EFFilmstrip as EFFilmstrip$1 } from "@editframe/elements";
|
|
4
|
+
const EFFilmstrip = createComponent({
|
|
5
|
+
tagName: "ef-filmstrip",
|
|
6
|
+
elementClass: EFFilmstrip$1,
|
|
7
|
+
react: React
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
EFFilmstrip
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const react = require("@lit/react");
|
|
5
|
+
const elements = require("@editframe/elements");
|
|
6
|
+
const EFWorkbench = react.createComponent({
|
|
7
|
+
tagName: "ef-workbench",
|
|
8
|
+
elementClass: elements.EFWorkbench,
|
|
9
|
+
react: React
|
|
10
|
+
});
|
|
11
|
+
exports.EFWorkbench = EFWorkbench;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { EFWorkbench as EFWorkbench$1 } from "@editframe/elements";
|
|
4
|
+
const EFWorkbench = createComponent({
|
|
5
|
+
tagName: "ef-workbench",
|
|
6
|
+
elementClass: EFWorkbench$1,
|
|
7
|
+
react: React
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
EFWorkbench
|
|
11
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
class CurrentTimeController {
|
|
5
|
+
constructor(host, setCurrentTime) {
|
|
6
|
+
this.host = host;
|
|
7
|
+
this.setCurrentTime = setCurrentTime;
|
|
8
|
+
this.host.addController(this);
|
|
9
|
+
}
|
|
10
|
+
hostDisconnected() {
|
|
11
|
+
this.host.removeController(this);
|
|
12
|
+
}
|
|
13
|
+
hostUpdated() {
|
|
14
|
+
this.setCurrentTime({
|
|
15
|
+
ownCurrentTimeMs: this.host.ownCurrentTimeMs,
|
|
16
|
+
durationMs: this.host.durationMs,
|
|
17
|
+
percentComplete: this.host.ownCurrentTimeMs / this.host.durationMs
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const useTimingInfo = (timegroupRef = React.useRef(null)) => {
|
|
22
|
+
const [timeInfo, setTimeInfo] = React.useState({
|
|
23
|
+
ownCurrentTimeMs: 0,
|
|
24
|
+
durationMs: 0,
|
|
25
|
+
percentComplete: 0
|
|
26
|
+
});
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
if (!timegroupRef.current) {
|
|
29
|
+
throw new Error("Timegroup ref not set");
|
|
30
|
+
}
|
|
31
|
+
new CurrentTimeController(timegroupRef.current, setTimeInfo);
|
|
32
|
+
}, [timegroupRef.current]);
|
|
33
|
+
return { ...timeInfo, ref: timegroupRef };
|
|
34
|
+
};
|
|
35
|
+
exports.useTimingInfo = useTimingInfo;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useState, useEffect, useRef } from "react";
|
|
2
|
+
class CurrentTimeController {
|
|
3
|
+
constructor(host, setCurrentTime) {
|
|
4
|
+
this.host = host;
|
|
5
|
+
this.setCurrentTime = setCurrentTime;
|
|
6
|
+
this.host.addController(this);
|
|
7
|
+
}
|
|
8
|
+
hostDisconnected() {
|
|
9
|
+
this.host.removeController(this);
|
|
10
|
+
}
|
|
11
|
+
hostUpdated() {
|
|
12
|
+
this.setCurrentTime({
|
|
13
|
+
ownCurrentTimeMs: this.host.ownCurrentTimeMs,
|
|
14
|
+
durationMs: this.host.durationMs,
|
|
15
|
+
percentComplete: this.host.ownCurrentTimeMs / this.host.durationMs
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const useTimingInfo = (timegroupRef = useRef(null)) => {
|
|
20
|
+
const [timeInfo, setTimeInfo] = useState({
|
|
21
|
+
ownCurrentTimeMs: 0,
|
|
22
|
+
durationMs: 0,
|
|
23
|
+
percentComplete: 0
|
|
24
|
+
});
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!timegroupRef.current) {
|
|
27
|
+
throw new Error("Timegroup ref not set");
|
|
28
|
+
}
|
|
29
|
+
new CurrentTimeController(timegroupRef.current, setTimeInfo);
|
|
30
|
+
}, [timegroupRef.current]);
|
|
31
|
+
return { ...timeInfo, ref: timegroupRef };
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
useTimingInfo
|
|
35
|
+
};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const EFAudio = require("./elements/EFAudio.cjs");
|
|
4
|
+
const EFCaptions = require("./elements/EFCaptions.cjs");
|
|
5
|
+
const EFImage = require("./elements/EFImage.cjs");
|
|
6
|
+
const EFTimegroup = require("./elements/EFTimegroup.cjs");
|
|
7
|
+
const EFVideo = require("./elements/EFVideo.cjs");
|
|
8
|
+
const EFWaveform = require("./elements/EFWaveform.cjs");
|
|
9
|
+
const EFWorkbench = require("./gui/EFWorkbench.cjs");
|
|
10
|
+
const EFFilmstrip = require("./gui/EFFilmstrip.cjs");
|
|
11
|
+
const useTimingInfo = require("./hooks/useTimingInfo.cjs");
|
|
12
|
+
exports.EFAudio = EFAudio.EFAudio;
|
|
13
|
+
exports.EFCaptions = EFCaptions.EFCaptions;
|
|
14
|
+
exports.EFCaptionsActiveWord = EFCaptions.EFCaptionsActiveWord;
|
|
15
|
+
exports.EFImage = EFImage.EFImage;
|
|
16
|
+
exports.EFTimegroup = EFTimegroup.EFTimegroup;
|
|
17
|
+
exports.EFVideo = EFVideo.EFVideo;
|
|
18
|
+
exports.EFWaveform = EFWaveform.EFWaveform;
|
|
19
|
+
exports.EFWorkbench = EFWorkbench.EFWorkbench;
|
|
20
|
+
exports.EFFilmstrip = EFFilmstrip.EFFilmstrip;
|
|
21
|
+
exports.useTimingInfo = useTimingInfo.useTimingInfo;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EFAudio } from "./elements/EFAudio.js";
|
|
2
|
+
import { EFCaptions, EFCaptionsActiveWord } from "./elements/EFCaptions.js";
|
|
3
|
+
import { EFImage } from "./elements/EFImage.js";
|
|
4
|
+
import { EFTimegroup } from "./elements/EFTimegroup.js";
|
|
5
|
+
import { EFVideo } from "./elements/EFVideo.js";
|
|
6
|
+
import { EFWaveform } from "./elements/EFWaveform.js";
|
|
7
|
+
import { EFWorkbench } from "./gui/EFWorkbench.js";
|
|
8
|
+
import { EFFilmstrip } from "./gui/EFFilmstrip.js";
|
|
9
|
+
import { useTimingInfo } from "./hooks/useTimingInfo.js";
|
|
10
|
+
export {
|
|
11
|
+
EFAudio,
|
|
12
|
+
EFCaptions,
|
|
13
|
+
EFCaptionsActiveWord,
|
|
14
|
+
EFFilmstrip,
|
|
15
|
+
EFImage,
|
|
16
|
+
EFTimegroup,
|
|
17
|
+
EFVideo,
|
|
18
|
+
EFWaveform,
|
|
19
|
+
EFWorkbench,
|
|
20
|
+
useTimingInfo
|
|
21
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EFCaptions as EFCaptionsElement, EFCaptionsActiveWord as EFCaptionsActiveWordElement } from '../../../elements/src';
|
|
2
|
+
|
|
3
|
+
export declare const EFCaptions: import('@lit/react').ReactWebComponent<EFCaptionsElement, {}>;
|
|
4
|
+
export declare const EFCaptionsActiveWord: import('@lit/react').ReactWebComponent<EFCaptionsActiveWordElement, {}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EFTimegroup } from '../../../elements/src';
|
|
2
|
+
|
|
3
|
+
export declare const useTimingInfo: (timegroupRef?: React.RefObject<EFTimegroup>) => {
|
|
4
|
+
ref: import('react').RefObject<EFTimegroup>;
|
|
5
|
+
ownCurrentTimeMs: number;
|
|
6
|
+
durationMs: number;
|
|
7
|
+
percentComplete: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { EFAudio } from './elements/EFAudio';
|
|
2
|
+
export { EFCaptions, EFCaptionsActiveWord } from './elements/EFCaptions';
|
|
3
|
+
export { EFImage } from './elements/EFImage';
|
|
4
|
+
export { EFTimegroup } from './elements/EFTimegroup';
|
|
5
|
+
export { EFVideo } from './elements/EFVideo';
|
|
6
|
+
export { EFWaveform } from './elements/EFWaveform';
|
|
7
|
+
export { EFWorkbench } from './gui/EFWorkbench';
|
|
8
|
+
export { EFFilmstrip } from './gui/EFFilmstrip';
|
|
9
|
+
export { useTimingInfo } from './hooks/useTimingInfo';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editframe/react",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.22",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"author": "",
|
|
24
24
|
"license": "UNLICENSED",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@editframe/elements": "0.6.0-beta.
|
|
26
|
+
"@editframe/elements": "0.6.0-beta.22",
|
|
27
27
|
"@lit/react": "^1.0.5",
|
|
28
28
|
"react": "^18.3.0",
|
|
29
29
|
"react-dom": "^18.3.0"
|