diff --git a/app.js b/app.js index 2e6dae7..2380084 100644 --- a/app.js +++ b/app.js @@ -7,7 +7,8 @@ import { useReducer, useState, useEffect, useLayoutEffect, useMemo, useRef } fro import State01 from "./testdata-01.json" assert { type: "json" }; import State02 from "./testdata-02.json" assert { type: "json" }; -const Styles = { +const Styles = +{ Broadcast: { position: "relative", @@ -245,6 +246,7 @@ const DateParse = (inDateString) => Date: date.getDate(), Hours: date.getHours(), Minutes: date.getMinutes(), + Epoch: date.valueOf() }; obj.Zone = obj.Zone ? obj.Zone[1] : "local time"; @@ -255,4 +257,5 @@ const DateParse = (inDateString) => return obj; }; -export default App; \ No newline at end of file +/** @type {(inChannel:string, inSelector:string)=>void} */ +export default (inChannel, inSelector) => render(h(App, {channel:inChannel, interval:50000}), document.querySelector(inSelector)); \ No newline at end of file diff --git a/index.html b/index.html index 57d0184..f12fdb7 100644 --- a/index.html +++ b/index.html @@ -2,25 +2,15 @@ +
+
- \ No newline at end of file diff --git a/types.d.ts b/types.d.ts index 72c5f3f..0ba8850 100644 --- a/types.d.ts +++ b/types.d.ts @@ -25,7 +25,8 @@ namespace Boxcast Date: number Hours: number Minutes: string | number - M?: "AM" | "PM" + M?: "AM" | "PM", + Epoch: number } type StateBinding = [T, (item:T)=>void];