From 3c6ee3b59398037c4931c67cc2ca2fcdf8a7fc56 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Wed, 7 May 2025 16:52:23 +0900 Subject: [PATCH 01/15] fix(react): exclude lazy component types from stable --- .../react/src/__internal__/ActivityComponentType.ts | 4 +--- integrations/react/src/future/ActivityComponentType.tsx | 8 ++++++-- integrations/react/src/future/loader/loaderPlugin.tsx | 2 +- integrations/react/src/future/stackflow.tsx | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/integrations/react/src/__internal__/ActivityComponentType.ts b/integrations/react/src/__internal__/ActivityComponentType.ts index d325bcfde..c3429a4a0 100644 --- a/integrations/react/src/__internal__/ActivityComponentType.ts +++ b/integrations/react/src/__internal__/ActivityComponentType.ts @@ -1,6 +1,4 @@ -import type { LazyActivityComponentType } from "./LazyActivityComponentType"; import type { StaticActivityComponentType } from "./StaticActivityComponentType"; export type ActivityComponentType = - | StaticActivityComponentType - | LazyActivityComponentType; + StaticActivityComponentType; diff --git a/integrations/react/src/future/ActivityComponentType.tsx b/integrations/react/src/future/ActivityComponentType.tsx index 05fcf1259..dadc84775 100644 --- a/integrations/react/src/future/ActivityComponentType.tsx +++ b/integrations/react/src/future/ActivityComponentType.tsx @@ -2,7 +2,11 @@ import type { InferActivityParams, RegisteredActivityName, } from "@stackflow/config"; -import type React from "react"; +import type { LazyActivityComponentType } from "../__internal__/LazyActivityComponentType"; +import type { StaticActivityComponentType } from "../__internal__/StaticActivityComponentType"; export type ActivityComponentType = - React.ComponentType<{ params: InferActivityParams }>; + | StaticActivityComponentType> + | LazyActivityComponentType>; + +export type { StaticActivityComponentType, LazyActivityComponentType }; diff --git a/integrations/react/src/future/loader/loaderPlugin.tsx b/integrations/react/src/future/loader/loaderPlugin.tsx index 744768db8..43784c2e1 100644 --- a/integrations/react/src/future/loader/loaderPlugin.tsx +++ b/integrations/react/src/future/loader/loaderPlugin.tsx @@ -2,8 +2,8 @@ import type { ActivityDefinition, RegisteredActivityName, } from "@stackflow/config"; -import type { ActivityComponentType } from "../../__internal__/ActivityComponentType"; import type { StackflowReactPlugin } from "../../__internal__/StackflowReactPlugin"; +import type { ActivityComponentType } from "../ActivityComponentType"; import type { StackflowInput } from "../stackflow"; export function loaderPlugin< diff --git a/integrations/react/src/future/stackflow.tsx b/integrations/react/src/future/stackflow.tsx index a5807619d..0370bbc98 100644 --- a/integrations/react/src/future/stackflow.tsx +++ b/integrations/react/src/future/stackflow.tsx @@ -11,7 +11,6 @@ import { makeEvent, } from "@stackflow/core"; import React, { useMemo } from "react"; -import type { ActivityComponentType } from "../__internal__/ActivityComponentType"; import MainRenderer from "../__internal__/MainRenderer"; import { makeActivityId } from "../__internal__/activity"; import { CoreProvider } from "../__internal__/core"; @@ -19,6 +18,7 @@ import { PluginsProvider } from "../__internal__/plugins"; import { isBrowser, makeRef } from "../__internal__/utils"; import type { StackflowReactPlugin } from "../stable"; import type { Actions } from "./Actions"; +import type { ActivityComponentType } from "./ActivityComponentType"; import { ConfigProvider } from "./ConfigProvider"; import type { StackComponentType } from "./StackComponentType"; import type { StepActions } from "./StepActions"; From d69633aba9f1875d90f549d7db68234110bf8682 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Wed, 7 May 2025 16:56:40 +0900 Subject: [PATCH 02/15] fix type --- demo/src/activities/Article.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/demo/src/activities/Article.tsx b/demo/src/activities/Article.tsx index 27b3df957..74e793e68 100644 --- a/demo/src/activities/Article.tsx +++ b/demo/src/activities/Article.tsx @@ -1,3 +1,4 @@ +import type { InferActivityParams } from "@stackflow/config"; import { type ActivityComponentType, useActivityParams, @@ -19,7 +20,7 @@ declare module "@stackflow/config" { } } -const Article: ActivityComponentType<"Article"> = ({ params }) => { +const Article = ({ params }: { params: InferActivityParams<"Article"> }) => { const { title } = useActivityParams<"Article">(); const { imageUrl, recommenderCards } = useLoaderData(); From e431dfc7b19cc08be257305cb539e1d74f88a4ae Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 15:20:36 +0900 Subject: [PATCH 03/15] empty commit From 6117c966973e29256128e3e2e5a9b40565b9e1c1 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 15:26:34 +0900 Subject: [PATCH 04/15] test --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 30628d329..ad12418eb 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,5 @@ To contribute new features or options to **Stackflow**, please check [Contributi ## License MIT + +test \ No newline at end of file From 9755c8afdb8e454eacc639f065d54684324a9911 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 15:26:50 +0900 Subject: [PATCH 05/15] Revert "test" This reverts commit 6117c966973e29256128e3e2e5a9b40565b9e1c1. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ad12418eb..30628d329 100644 --- a/README.md +++ b/README.md @@ -75,5 +75,3 @@ To contribute new features or options to **Stackflow**, please check [Contributi ## License MIT - -test \ No newline at end of file From b236afa27037bebad172077732e763c4d541fa8a Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 16:16:09 +0900 Subject: [PATCH 06/15] rebase --- .../react/src/__internal__/ActivityComponentType.ts | 6 ------ integrations/react/src/future/ActivityComponentType.tsx | 6 ++++-- integrations/react/src/stable/ActivityComponentType.tsx | 8 ++++++++ 3 files changed, 12 insertions(+), 8 deletions(-) delete mode 100644 integrations/react/src/__internal__/ActivityComponentType.ts create mode 100644 integrations/react/src/stable/ActivityComponentType.tsx diff --git a/integrations/react/src/__internal__/ActivityComponentType.ts b/integrations/react/src/__internal__/ActivityComponentType.ts deleted file mode 100644 index 305fdd51d..000000000 --- a/integrations/react/src/__internal__/ActivityComponentType.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { MonolithicActivityComponentType } from "./MonolithicActivityComponentType"; -import type { StructuredActivityComponentType } from "./StructuredActivityComponentType"; - -export type ActivityComponentType = - | MonolithicActivityComponentType - | StructuredActivityComponentType; diff --git a/integrations/react/src/future/ActivityComponentType.tsx b/integrations/react/src/future/ActivityComponentType.tsx index 2b0efa1fa..5fe2ecec7 100644 --- a/integrations/react/src/future/ActivityComponentType.tsx +++ b/integrations/react/src/future/ActivityComponentType.tsx @@ -2,7 +2,9 @@ import type { InferActivityParams, RegisteredActivityName, } from "@stackflow/config"; -import type { ActivityComponentType as ActivityComponentTypeInternal } from "../__internal__/ActivityComponentType"; +import type { MonolithicActivityComponentType } from "../__internal__/MonolithicActivityComponentType"; +import type { StructuredActivityComponentType } from "../__internal__/StructuredActivityComponentType"; export type ActivityComponentType = - ActivityComponentTypeInternal>; + | MonolithicActivityComponentType> + | StructuredActivityComponentType>; diff --git a/integrations/react/src/stable/ActivityComponentType.tsx b/integrations/react/src/stable/ActivityComponentType.tsx new file mode 100644 index 000000000..3ed18a5a2 --- /dev/null +++ b/integrations/react/src/stable/ActivityComponentType.tsx @@ -0,0 +1,8 @@ +import type { + InferActivityParams, + RegisteredActivityName, +} from "@stackflow/config"; +import type { StaticActivityComponentType } from "../__internal__/StaticActivityComponentType"; + +export type ActivityComponentType = + StaticActivityComponentType>; From a9fe9b43fd6c725b9ea3c2a9a5af65d4a1c9343d Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 16:34:31 +0900 Subject: [PATCH 07/15] remove lazy from ActivityComponentType --- integrations/react/src/stable/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/react/src/stable/index.ts b/integrations/react/src/stable/index.ts index 960f32ec9..bb14fe690 100644 --- a/integrations/react/src/stable/index.ts +++ b/integrations/react/src/stable/index.ts @@ -1,8 +1,8 @@ export * from "../__internal__/activity/useActivity"; export * from "../__internal__/activity/useActivityParams"; -export type { MonolithicActivityComponentType as ActivityComponentType } from "../__internal__/MonolithicActivityComponentType"; export * from "../__internal__/StackflowReactPlugin"; export * from "../__internal__/stack/useStack"; +export type { ActivityComponentType } from "./ActivityComponentType"; export * from "./stackflow"; export * from "./useActions"; export * from "./useActiveEffect"; From 23e4f5148a9c13791853f474019a3fa070c982e0 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 16:35:34 +0900 Subject: [PATCH 08/15] restore --- .../react/src/__internal__/ActivityComponentType.tsx | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 integrations/react/src/__internal__/ActivityComponentType.tsx diff --git a/integrations/react/src/__internal__/ActivityComponentType.tsx b/integrations/react/src/__internal__/ActivityComponentType.tsx new file mode 100644 index 000000000..305fdd51d --- /dev/null +++ b/integrations/react/src/__internal__/ActivityComponentType.tsx @@ -0,0 +1,6 @@ +import type { MonolithicActivityComponentType } from "./MonolithicActivityComponentType"; +import type { StructuredActivityComponentType } from "./StructuredActivityComponentType"; + +export type ActivityComponentType = + | MonolithicActivityComponentType + | StructuredActivityComponentType; From 55c779822d362f6ec66640f3d0be07061d6c9087 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 16:37:53 +0900 Subject: [PATCH 09/15] rollback --- integrations/react/src/future/ActivityComponentType.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/integrations/react/src/future/ActivityComponentType.tsx b/integrations/react/src/future/ActivityComponentType.tsx index 5fe2ecec7..2b0efa1fa 100644 --- a/integrations/react/src/future/ActivityComponentType.tsx +++ b/integrations/react/src/future/ActivityComponentType.tsx @@ -2,9 +2,7 @@ import type { InferActivityParams, RegisteredActivityName, } from "@stackflow/config"; -import type { MonolithicActivityComponentType } from "../__internal__/MonolithicActivityComponentType"; -import type { StructuredActivityComponentType } from "../__internal__/StructuredActivityComponentType"; +import type { ActivityComponentType as ActivityComponentTypeInternal } from "../__internal__/ActivityComponentType"; export type ActivityComponentType = - | MonolithicActivityComponentType> - | StructuredActivityComponentType>; + ActivityComponentTypeInternal>; From a42a43a073d7fe04dc0df59438610dbff21ed75a Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 17:02:30 +0900 Subject: [PATCH 10/15] fix type --- integrations/react/src/stable/ActivityComponentType.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/integrations/react/src/stable/ActivityComponentType.tsx b/integrations/react/src/stable/ActivityComponentType.tsx index 3ed18a5a2..9421f131b 100644 --- a/integrations/react/src/stable/ActivityComponentType.tsx +++ b/integrations/react/src/stable/ActivityComponentType.tsx @@ -1,8 +1,4 @@ -import type { - InferActivityParams, - RegisteredActivityName, -} from "@stackflow/config"; import type { StaticActivityComponentType } from "../__internal__/StaticActivityComponentType"; -export type ActivityComponentType = - StaticActivityComponentType>; +export type ActivityComponentType = + StaticActivityComponentType; From 46779ee2a8b68b0aa69b7691eb8e082b351d283e Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 17:04:29 +0900 Subject: [PATCH 11/15] enhance --- integrations/react/src/stable/ActivityComponentType.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/react/src/stable/ActivityComponentType.tsx b/integrations/react/src/stable/ActivityComponentType.tsx index 9421f131b..af2dc3b58 100644 --- a/integrations/react/src/stable/ActivityComponentType.tsx +++ b/integrations/react/src/stable/ActivityComponentType.tsx @@ -1,4 +1,4 @@ import type { StaticActivityComponentType } from "../__internal__/StaticActivityComponentType"; -export type ActivityComponentType = +export type ActivityComponentType = StaticActivityComponentType; From d862ccc87e0477019cdd71dbb6228bbcbf3e44a6 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 17:10:32 +0900 Subject: [PATCH 12/15] rollback rename --- .../{ActivityComponentType.tsx => ActivityComponentType.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename integrations/react/src/__internal__/{ActivityComponentType.tsx => ActivityComponentType.ts} (100%) diff --git a/integrations/react/src/__internal__/ActivityComponentType.tsx b/integrations/react/src/__internal__/ActivityComponentType.ts similarity index 100% rename from integrations/react/src/__internal__/ActivityComponentType.tsx rename to integrations/react/src/__internal__/ActivityComponentType.ts From 24d0238075d3b1033f9bca10fc5a5aca4f31a044 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 17:24:23 +0900 Subject: [PATCH 13/15] Revert "enhance" This reverts commit 46779ee2a8b68b0aa69b7691eb8e082b351d283e. --- integrations/react/src/stable/ActivityComponentType.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/react/src/stable/ActivityComponentType.tsx b/integrations/react/src/stable/ActivityComponentType.tsx index af2dc3b58..9421f131b 100644 --- a/integrations/react/src/stable/ActivityComponentType.tsx +++ b/integrations/react/src/stable/ActivityComponentType.tsx @@ -1,4 +1,4 @@ import type { StaticActivityComponentType } from "../__internal__/StaticActivityComponentType"; -export type ActivityComponentType = +export type ActivityComponentType = StaticActivityComponentType; From a3239c42de1f5919f832c54ae4cd800402b5f03c Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 17:58:56 +0900 Subject: [PATCH 14/15] export `MonolithicActivityComponentType` --- integrations/react/src/future/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations/react/src/future/index.ts b/integrations/react/src/future/index.ts index 91ce06a66..2a14ee68a 100644 --- a/integrations/react/src/future/index.ts +++ b/integrations/react/src/future/index.ts @@ -1,5 +1,6 @@ export type { ActivityComponentType as ActivityComponentTypeByParams } from "../__internal__/ActivityComponentType"; export * from "../__internal__/activity/useActivity"; +export * from "../__internal__/MonolithicActivityComponentType"; export * from "../__internal__/StackflowReactPlugin"; export * from "../__internal__/StructuredActivityComponentType"; export * from "../__internal__/stack/useStack"; From 5765b1cec302f5cca279f4ecb5a6920fc4d2d0e4 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Fri, 16 Jan 2026 18:11:36 +0900 Subject: [PATCH 15/15] empty commit