Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2fc6e8
commit ab38fcb
Showing
112 changed files
with
4,983 additions
and
1,369 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--[[ | ||
Packages up the internals of Roact and exposes a public API for it. | ||
]] | ||
|
||
local Change = require(script.Change) | ||
local Component = require(script.Component) | ||
local Core = require(script.Core) | ||
local createElement = require(script.createElement) | ||
local createRef = require(script.createRef) | ||
local Event = require(script.Event) | ||
local GlobalConfig = require(script.GlobalConfig) | ||
local Instrumentation = require(script.Instrumentation) | ||
local oneChild = require(script.oneChild) | ||
local PureComponent = require(script.PureComponent) | ||
local Reconciler = require(script.Reconciler) | ||
local ReconcilerCompat = require(script.ReconcilerCompat) | ||
|
||
--[[ | ||
A utility to copy one module into another, erroring if there are | ||
overlapping keys. | ||
Any keys that begin with an underscore are considered private. | ||
]] | ||
local function apply(target, source) | ||
for key, value in pairs(source) do | ||
if target[key] ~= nil then | ||
error(("Roact: key %q was overridden!"):format(key), 2) | ||
end | ||
|
||
-- Don't add internal values | ||
if not key:find("^_") then | ||
target[key] = value | ||
end | ||
end | ||
end | ||
|
||
local Roact = {} | ||
|
||
apply(Roact, Core) | ||
apply(Roact, Reconciler) | ||
apply(Roact, ReconcilerCompat) | ||
|
||
apply(Roact, { | ||
Change = Change, | ||
Component = Component, | ||
createElement = createElement, | ||
createRef = createRef, | ||
Event = Event, | ||
oneChild = oneChild, | ||
PureComponent = PureComponent, | ||
}) | ||
|
||
apply(Roact, { | ||
setGlobalConfig = GlobalConfig.set, | ||
getGlobalConfigValue = GlobalConfig.getValue, | ||
}) | ||
|
||
apply(Roact, { | ||
-- APIs that may change in the future | ||
UNSTABLE = { | ||
getCollectedStats = Instrumentation.getCollectedStats, | ||
clearCollectedStats = Instrumentation.clearCollectedStats, | ||
} | ||
}) | ||
|
||
return Roact |
Oops, something went wrong.