3 files changed, 0 insertions(+), 137 deletions(-)
D app/src/components/Log.lua
D app/src/components/LogLine.lua
D app/src/components/TestComponent.lua
D app/src/components/Log.lua => app/src/components/Log.lua +0 -77
@@ 1,77 0,0 @@
-local React = require("react")
-local _0_ = require("../react-helpers.lua")
-local use_ref = _0_["use-ref"]
-local get_children_as_array = _0_["get-children-as-array"]
-local use_effect = _0_["use-effect"]
-local LogLine = require("./LogLine.lua")
-local Log
-do
- local _6_0
- local function _9_(_, _, _10_0)
- local _11_ = _10_0
- local maybe_children = _11_["children"]
- do
- local children = get_children_as_array(maybe_children)
- local container_ref = use_ref(nil)
- local function _12_()
- if (container_ref.current and not (container_ref.current == js.null) and container_ref.current.lastChild and not (container_ref.current.lastChild == js.null)) then
- local function _14_()
- local _13_0 = js.new(js.global.Object)
- return _13_0
- end
- return container_ref.current.lastChild:scrollIntoView(_14_())
- end
- end
- local function _14_()
- local _13_0 = js.new(js.global.Array)
- _13_0[0] = children.length
- return _13_0
- end
- use_effect(_12_, _14_())
- do
- local _15_0
- do
- local _17_0 = js.new(js.global.Object)
- _17_0["ref"] = container_ref
- local _19_
- do
- local _18_0 = js.new(js.global.Object)
- _18_0["color"] = "#EEEEEE"
- _18_0["height"] = "calc(100vh - 200px)"
- _18_0["backgroundColor"] = "#222222"
- _18_0["overflowY"] = "scroll"
- _18_0["width"] = "100%"
- _19_ = _18_0
- end
- _17_0["style"] = _19_
- _15_0 = _17_0
- end
- local function _19_(_, child, i)
- local _20_0
- do
- local _22_0 = js.new(js.global.Object)
- _22_0["key"] = i
- _20_0 = _22_0
- end
- return React:createElement(LogLine, _20_0, child)
- end
- return React:createElement("div", _15_0, children:map(_19_))
- end
- end
- end
- _6_0 = _9_
- local _1_0 = {displayName = "Log", length = 1, name = "Log"}
- local _7_0
- local function _11_(_, _4_0)
- return rawget(_1_0, _4_0)
- end
- _7_0 = _11_
- local _8_0
- local function _12_(_, _4_0, _5_0)
- return rawset(_1_0, _4_0, _5_0)
- end
- _8_0 = _12_
- setmetatable(_1_0, {__call = _6_0, __index = _7_0, __newindex = _8_0})
- Log = js.createproxy(_1_0, "arrow_function")
-end
-return Log
D app/src/components/LogLine.lua => app/src/components/LogLine.lua +0 -33
@@ 1,33 0,0 @@
-local React = require("react")
-local LogLine
-do
- local _5_0
- local function _8_(_, _, _9_0)
- local _10_ = _9_0
- local message = _10_["children"]
- do
- local _11_0
- do
- local _13_0 = js.new(js.global.Object)
- _13_0["className"] = "log-message"
- _11_0 = _13_0
- end
- return React:createElement("pre", _11_0, message)
- end
- end
- _5_0 = _8_
- local _0_0 = {displayName = "LogLine", length = 1, name = "LogLine"}
- local _6_0
- local function _10_(_, _3_0)
- return rawget(_0_0, _3_0)
- end
- _6_0 = _10_
- local _7_0
- local function _11_(_, _3_0, _4_0)
- return rawset(_0_0, _3_0, _4_0)
- end
- _7_0 = _11_
- setmetatable(_0_0, {__call = _5_0, __index = _6_0, __newindex = _7_0})
- LogLine = js.createproxy(_0_0, "arrow_function")
-end
-return LogLine
D app/src/components/TestComponent.lua => app/src/components/TestComponent.lua +0 -27
@@ 1,27 0,0 @@
-local TestComponent
-do
- local _5_0
- local function _8_(_, _)
- local _9_0
- do
- local _11_0 = js.new(js.global.Object)
- _9_0 = _11_0
- end
- return React:createElement("div", _9_0, "Hello, world!")
- end
- _5_0 = _8_
- local _0_0 = {displayName = "TestComponent", length = 0, name = "TestComponent"}
- local _6_0
- local function _9_(_, _3_0)
- return rawget(_0_0, _3_0)
- end
- _6_0 = _9_
- local _7_0
- local function _10_(_, _3_0, _4_0)
- return rawset(_0_0, _3_0, _4_0)
- end
- _7_0 = _10_
- setmetatable(_0_0, {__call = _5_0, __index = _6_0, __newindex = _7_0})
- TestComponent = js.createproxy(_0_0, "arrow_function")
-end
-return nil