@rbxts/app-forge 0.6.0-alpha.18 → 0.6.0-alpha.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/out/index.d.ts +4 -0
- package/out/init.luau +4 -0
- package/out/react/context.d.ts +7 -0
- package/out/react/context.luau +12 -0
- package/out/react/hooks/useAppContext.d.ts +5 -0
- package/out/react/hooks/useAppContext.luau +16 -0
- package/out/vide/context.d.ts +7 -0
- package/out/vide/context.luau +12 -0
- package/out/vide/hooks/useAppContext.d.ts +5 -0
- package/out/vide/hooks/useAppContext.luau +14 -0
- package/package.json +1 -1
package/out/index.d.ts
CHANGED
|
@@ -6,3 +6,7 @@ export { Render as RenderReact } from "./react/helpers";
|
|
|
6
6
|
export { Render as RenderVide } from "./vide/helpers";
|
|
7
7
|
export type { MainProps as VideProps, ClassProps as VideClassProps } from "./vide/types";
|
|
8
8
|
export type { MainProps as ReactProps, ClassProps as ReactClassProps, NameProps, } from "./react/types";
|
|
9
|
+
export { default as useReactAppContext } from "./react/hooks/useAppContext";
|
|
10
|
+
export { default as ReactContexts } from "./react/context";
|
|
11
|
+
export { default as useVideAppContext } from "./vide/hooks/useAppContext";
|
|
12
|
+
export { default as VideContexts } from "./vide/context";
|
package/out/init.luau
CHANGED
|
@@ -15,4 +15,8 @@ exports.CreateVideForge = TS.import(script, script, "vide").default
|
|
|
15
15
|
exports.RenderReact = TS.import(script, script, "react", "helpers").Render
|
|
16
16
|
exports.RenderVide = TS.import(script, script, "vide", "helpers").Render
|
|
17
17
|
-- Types
|
|
18
|
+
exports.useReactAppContext = TS.import(script, script, "react", "hooks", "useAppContext").default
|
|
19
|
+
exports.ReactContexts = TS.import(script, script, "react", "context").default
|
|
20
|
+
exports.useVideAppContext = TS.import(script, script, "vide", "hooks", "useAppContext").default
|
|
21
|
+
exports.VideContexts = TS.import(script, script, "vide", "context").default
|
|
18
22
|
return exports
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
-- Packages
|
|
4
|
+
local createContext = TS.import(script, TS.getModule(script, "@rbxts", "react")).createContext
|
|
5
|
+
-- Types
|
|
6
|
+
local Contexts = {
|
|
7
|
+
App = createContext(nil),
|
|
8
|
+
}
|
|
9
|
+
local default = Contexts
|
|
10
|
+
return {
|
|
11
|
+
default = default,
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
-- Packages
|
|
4
|
+
local useContext = TS.import(script, TS.getModule(script, "@rbxts", "react")).useContext
|
|
5
|
+
-- Components
|
|
6
|
+
local Contexts = TS.import(script, script.Parent.Parent, "context").default
|
|
7
|
+
local default = function()
|
|
8
|
+
local context = useContext(Contexts.App)
|
|
9
|
+
if not context then
|
|
10
|
+
error(`Failed to retrieve App Props for Vide {debug.traceback()}`)
|
|
11
|
+
end
|
|
12
|
+
return context
|
|
13
|
+
end
|
|
14
|
+
return {
|
|
15
|
+
default = default,
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
-- Packages
|
|
4
|
+
local context = TS.import(script, TS.getModule(script, "@rbxts", "vide").src).context
|
|
5
|
+
-- Types
|
|
6
|
+
local Contexts = {
|
|
7
|
+
App = context(nil),
|
|
8
|
+
}
|
|
9
|
+
local default = Contexts
|
|
10
|
+
return {
|
|
11
|
+
default = default,
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Compiled with roblox-ts v3.0.0
|
|
2
|
+
local TS = _G[script]
|
|
3
|
+
-- Components
|
|
4
|
+
local Contexts = TS.import(script, script.Parent.Parent, "context").default
|
|
5
|
+
local default = function()
|
|
6
|
+
local context = Contexts.App()
|
|
7
|
+
if not context then
|
|
8
|
+
error(`Failed to retrieve App Props for Vide {debug.traceback()}`)
|
|
9
|
+
end
|
|
10
|
+
return context
|
|
11
|
+
end
|
|
12
|
+
return {
|
|
13
|
+
default = default,
|
|
14
|
+
}
|