@editframe/react 0.6.0-beta.18 → 0.6.0-beta.19

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/package.json CHANGED
@@ -1,14 +1,19 @@
1
1
  {
2
2
  "name": "@editframe/react",
3
- "version": "0.6.0-beta.18",
3
+ "version": "0.6.0-beta.19",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
7
- "import": "./dist/index.js",
8
- "require": "./dist/index.cjs"
7
+ "import": {
8
+ "default": "./dist/index.js",
9
+ "types": "./dist/packages/react/src/index.d.ts"
10
+ },
11
+ "require": {
12
+ "default": "./dist/index.cjs",
13
+ "types": "./dist/packages/react/src/index.d.ts"
14
+ }
9
15
  }
10
16
  },
11
- "types": "./dist/packages/react/dist/packages/react/src/index.d.ts",
12
17
  "type": "module",
13
18
  "scripts": {
14
19
  "typecheck": "tsc --noEmit --emitDeclarationOnly false",
@@ -18,7 +23,7 @@
18
23
  "author": "",
19
24
  "license": "UNLICENSED",
20
25
  "dependencies": {
21
- "@editframe/elements": "0.6.0-beta.18",
26
+ "@editframe/elements": "0.6.0-beta.19",
22
27
  "@lit/react": "^1.0.5",
23
28
  "react": "^18.3.0",
24
29
  "react-dom": "^18.3.0"
@@ -1,11 +0,0 @@
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;
@@ -1,11 +0,0 @@
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
- };
@@ -1,17 +0,0 @@
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;
@@ -1,17 +0,0 @@
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
- };
@@ -1,11 +0,0 @@
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;
@@ -1,11 +0,0 @@
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
- };
@@ -1,11 +0,0 @@
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;
@@ -1,11 +0,0 @@
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
- };
@@ -1,11 +0,0 @@
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;
@@ -1,11 +0,0 @@
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
- };
@@ -1,11 +0,0 @@
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;
@@ -1,11 +0,0 @@
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
- };
@@ -1,11 +0,0 @@
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;
@@ -1,11 +0,0 @@
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
- };
@@ -1,11 +0,0 @@
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;
@@ -1,11 +0,0 @@
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
- };
@@ -1,35 +0,0 @@
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;
@@ -1,35 +0,0 @@
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 DELETED
@@ -1,21 +0,0 @@
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 DELETED
@@ -1,21 +0,0 @@
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
- };
@@ -1,3 +0,0 @@
1
- import { EFAudio as EFAudioElement } from '../../../elements/src';
2
-
3
- export declare const EFAudio: import('@lit/react').ReactWebComponent<EFAudioElement, {}>;
@@ -1,4 +0,0 @@
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, {}>;
@@ -1,3 +0,0 @@
1
- import { EFImage as EFImageElement } from '../../../elements/src';
2
-
3
- export declare const EFImage: import('@lit/react').ReactWebComponent<EFImageElement, {}>;
@@ -1,3 +0,0 @@
1
- import { EFTimegroup as EFTimegroupElement } from '../../../elements/src';
2
-
3
- export declare const EFTimegroup: import('@lit/react').ReactWebComponent<EFTimegroupElement, {}>;
@@ -1,3 +0,0 @@
1
- import { EFVideo as EFVideoElement } from '../../../elements/src';
2
-
3
- export declare const EFVideo: import('@lit/react').ReactWebComponent<EFVideoElement, {}>;
@@ -1,3 +0,0 @@
1
- import { EFWaveform as EFWaveformElement } from '../../../elements/src';
2
-
3
- export declare const EFWaveform: import('@lit/react').ReactWebComponent<EFWaveformElement, {}>;
@@ -1,3 +0,0 @@
1
- import { EFFilmstrip as EFFilmstripElement } from '../../../elements/src';
2
-
3
- export declare const EFFilmstrip: import('@lit/react').ReactWebComponent<EFFilmstripElement, {}>;
@@ -1,3 +0,0 @@
1
- import { EFWorkbench as EFWorkbenchElement } from '../../../elements/src';
2
-
3
- export declare const EFWorkbench: import('@lit/react').ReactWebComponent<EFWorkbenchElement, {}>;
@@ -1,8 +0,0 @@
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
- };
@@ -1,9 +0,0 @@
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';