diff --git a/code-samples/src/ReactStoryteller/ReactButtonControls.story.luau b/code-samples/src/ReactStoryteller/ReactButtonControls.story.luau index ade3f333..4fefbc8b 100644 --- a/code-samples/src/ReactStoryteller/ReactButtonControls.story.luau +++ b/code-samples/src/ReactStoryteller/ReactButtonControls.story.luau @@ -15,7 +15,9 @@ type Controls = { isDisabled: boolean, } -type Props = Storyteller.StoryProps +type Props = { + controls: typeof(controls), +} local story: Storyteller.Story = { controls = controls, diff --git a/code-samples/wally.toml b/code-samples/wally.toml index 0ae80ae0..0dea602a 100644 --- a/code-samples/wally.toml +++ b/code-samples/wally.toml @@ -11,4 +11,4 @@ Fusion = "elttob/fusion@0.2.0" React = "jsdotlua/react@17.0.2" ReactRoblox = "jsdotlua/react-roblox@17.0.2" Roact = "roblox/roact@1.4.4" -Storyteller = "flipbook-labs/storyteller@0.4.2" +Storyteller = "flipbook-labs/storyteller@0.4.3" diff --git a/src/Explorer/types.luau b/src/Explorer/types.luau index 9b49b05b..df60bf5c 100644 --- a/src/Explorer/types.luau +++ b/src/Explorer/types.luau @@ -1,13 +1,13 @@ local Storyteller = require("@pkg/Storyteller") -type Storybook = Storyteller.Storybook +type LoadedStorybook = Storyteller.LoadedStorybook export type ComponentTreeNode = { name: string, children: { ComponentTreeNode }, icon: ("folder" | "story" | "storybook")?, instance: Instance?, - storybook: Storybook?, + storybook: LoadedStorybook?, } return nil diff --git a/src/Panels/Sidebar.luau b/src/Panels/Sidebar.luau index 6e8930d9..2a5db8a2 100644 --- a/src/Panels/Sidebar.luau +++ b/src/Panels/Sidebar.luau @@ -10,7 +10,7 @@ local createStoryNodes = require("@root/Storybook/createStoryNodes") local explorerTypes = require("@root/Explorer/types") local useTheme = require("@root/Common/useTheme") -type Storybook = Storyteller.Storybook +type LoadedStorybook = Storyteller.LoadedStorybook type ComponentTreeNode = explorerTypes.ComponentTreeNode local e = React.createElement @@ -18,8 +18,8 @@ local e = React.createElement type Props = { layoutOrder: number?, selectStory: (ModuleScript) -> (), - selectStorybook: (Storybook) -> (), - storybooks: { Storybook }, + selectStorybook: (LoadedStorybook) -> (), + storybooks: { LoadedStorybook }, } local function Sidebar(props: Props) diff --git a/src/Storybook/createStoryNodes.luau b/src/Storybook/createStoryNodes.luau index a4741ccb..042d6d41 100644 --- a/src/Storybook/createStoryNodes.luau +++ b/src/Storybook/createStoryNodes.luau @@ -2,7 +2,7 @@ local Storyteller = require("@pkg/Storyteller") local explorerTypes = require("@root/Explorer/types") -type Storybook = Storyteller.Storybook +type LoadedStorybook = Storyteller.LoadedStorybook type ComponentTreeNode = explorerTypes.ComponentTreeNode local function hasStories(instance: Instance): boolean @@ -14,7 +14,7 @@ local function hasStories(instance: Instance): boolean return false end -local function createChildNodes(parent: ComponentTreeNode, instance: Instance, storybook: Storybook) +local function createChildNodes(parent: ComponentTreeNode, instance: Instance, storybook: LoadedStorybook) for _, child in ipairs(instance:GetChildren()) do local isStory = Storyteller.isStoryModule(child) local isContainer = hasStories(child) @@ -38,7 +38,7 @@ local function createChildNodes(parent: ComponentTreeNode, instance: Instance, s end end -local function createStoryNodes(storybooks: { Storybook }): { ComponentTreeNode } +local function createStoryNodes(storybooks: { LoadedStorybook }): { ComponentTreeNode } local nodes: { ComponentTreeNode } = {} for _, storybook in ipairs(storybooks) do diff --git a/src/Storybook/createStoryNodes.spec.luau b/src/Storybook/createStoryNodes.spec.luau index fd6f6092..66c3ca90 100644 --- a/src/Storybook/createStoryNodes.spec.luau +++ b/src/Storybook/createStoryNodes.spec.luau @@ -16,7 +16,7 @@ local mockStoryRoot = newFolder({ }), }) -local mockStorybook: Storyteller.Storybook = { +local mockStorybook: Storyteller.LoadedStorybook = { name = "MockStorybook", storyRoots = { mockStoryRoot }, } diff --git a/wally.toml b/wally.toml index 6e08dd51..901accb4 100644 --- a/wally.toml +++ b/wally.toml @@ -8,7 +8,7 @@ exclude = ["*"] [dependencies] ModuleLoader = "flipbook-labs/module-loader@0.6.2" -Storyteller = "flipbook-labs/storyteller@0.4.2" +Storyteller = "flipbook-labs/storyteller@0.4.3" React = "jsdotlua/react@17.0.2" ReactRoblox = "jsdotlua/react-roblox@17.0.2" ReactSpring = "chriscerie/react-spring@2.0.0"