From 766ed71f546b2d604f3db918283ca0a22cdd6311 Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 27 Oct 2023 11:48:57 +0900 Subject: [PATCH 1/6] feat(plugin-basic-ui): `ANDROID_ONLY_activityEnterStyle` (#406) --- .../src/components/AppBar.css.ts | 21 ++++- .../plugin-basic-ui/src/components/AppBar.tsx | 9 +- .../src/components/AppScreen.css.ts | 13 ++- .../src/components/AppScreen.tsx | 90 +++++++++++++------ .../src/hooks/useStyleEffectOffset.ts | 29 ++++-- packages/eslint-config/index.js | 1 + 6 files changed, 124 insertions(+), 39 deletions(-) diff --git a/extensions/plugin-basic-ui/src/components/AppBar.css.ts b/extensions/plugin-basic-ui/src/components/AppBar.css.ts index 436d70fe..64166d0e 100644 --- a/extensions/plugin-basic-ui/src/components/AppBar.css.ts +++ b/extensions/plugin-basic-ui/src/components/AppBar.css.ts @@ -76,8 +76,8 @@ export const appBar = recipe({ boxShadow: `inset 0px calc(-1 * ${globalVars.appBar.borderSize}) 0 ${globalVars.appBar.borderColor}`, }, }, - presentModalFullScreen: { - true: { + modalPresentationStyle: { + fullScreen: { selectors: { [`${cupertino} &`]: { transform: "translate3d(0, 100vh, 0)", @@ -104,6 +104,23 @@ export const appBar = recipe({ }, }, }, + activityEnterStyle: { + slideInLeft: { + selectors: { + [`${android} &`]: { + opacity: 1, + transform: "translate3d(0, 0, 0)", + }, + [`${android} ${exitActive} &`]: { + transform: "translate3d(100%, 0, 0)", + transition: transitions({ + ...appBarCommonTransition, + transform: "0s", + }), + }, + }, + }, + }, }, }); diff --git a/extensions/plugin-basic-ui/src/components/AppBar.tsx b/extensions/plugin-basic-ui/src/components/AppBar.tsx index 0c6dd8a9..a928c88c 100644 --- a/extensions/plugin-basic-ui/src/components/AppBar.tsx +++ b/extensions/plugin-basic-ui/src/components/AppBar.tsx @@ -52,6 +52,7 @@ type AppBarProps = Partial< closeButtonLocation?: "left" | "right"; border?: boolean; modalPresentationStyle?: "fullScreen"; + activityEnterStyle?: "slideInLeft"; onTopClick?: (e: React.MouseEvent) => void; }; const AppBar = forwardRef( @@ -65,6 +66,7 @@ const AppBar = forwardRef( closeButtonLocation = "left", border = true, modalPresentationStyle, + activityEnterStyle, iconColor, iconColorTransitionDuration, textColor, @@ -96,8 +98,6 @@ const AppBar = forwardRef( enable: globalOptions.theme === "cupertino", }); - const presentModalFullScreen = modalPresentationStyle === "fullScreen"; - const onBackClick = (e: React.MouseEvent) => { if (backButton && "onClick" in backButton && backButton.onClick) { backButton.onClick(e); @@ -168,7 +168,7 @@ const AppBar = forwardRef( return globalBackButton.renderIcon(); } - if (presentModalFullScreen) { + if (modalPresentationStyle === "fullScreen") { return ; } @@ -268,7 +268,8 @@ const AppBar = forwardRef( ref={ref} className={css.appBar({ border, - presentModalFullScreen, + modalPresentationStyle, + activityEnterStyle, })} style={assignInlineVars( compactMap({ diff --git a/extensions/plugin-basic-ui/src/components/AppScreen.css.ts b/extensions/plugin-basic-ui/src/components/AppScreen.css.ts index c6930030..fdbe2518 100644 --- a/extensions/plugin-basic-ui/src/components/AppScreen.css.ts +++ b/extensions/plugin-basic-ui/src/components/AppScreen.css.ts @@ -134,8 +134,8 @@ export const paper = recipe({ }, ], }, - presentModalFullScreen: { - true: { + modalPresentationStyle: { + fullScreen: { selectors: { [`${cupertino} &`]: { transform: "translate3d(0, 100%, 0)", @@ -143,6 +143,15 @@ export const paper = recipe({ }, }, }, + activityEnterStyle: { + slideInLeft: { + selectors: { + [`${android} &`]: { + transform: "translate3d(50%, 0, 0)", + }, + }, + }, + }, }, }); diff --git a/extensions/plugin-basic-ui/src/components/AppScreen.tsx b/extensions/plugin-basic-ui/src/components/AppScreen.tsx index ed4e6ed5..47f540bd 100644 --- a/extensions/plugin-basic-ui/src/components/AppScreen.tsx +++ b/extensions/plugin-basic-ui/src/components/AppScreen.tsx @@ -1,5 +1,3 @@ -/* eslint-disable no-param-reassign */ - import { useActions } from "@stackflow/react"; import { assignInlineVars } from "@vanilla-extract/dynamic"; import { createContext, useContext, useMemo, useRef } from "react"; @@ -36,7 +34,8 @@ export type AppScreenProps = Partial< "theme" | "modalPresentationStyle" | "ref" | "key" >; preventSwipeBack?: boolean; - modalPresentationStyle?: "fullScreen"; + CUPERTINO_ONLY_modalPresentationStyle?: "fullScreen"; + ANDROID_ONLY_activityEnterStyle?: "slideInLeft"; children: React.ReactNode; }; const AppScreen: React.FC = ({ @@ -44,7 +43,8 @@ const AppScreen: React.FC = ({ dimBackgroundColor, appBar, preventSwipeBack, - modalPresentationStyle, + CUPERTINO_ONLY_modalPresentationStyle, + ANDROID_ONLY_activityEnterStyle, children, }) => { const globalOptions = useGlobalOptions(); @@ -58,44 +58,78 @@ const AppScreen: React.FC = ({ const edgeRef = useRef(null); const appBarRef = useRef(null); - const presentModalFullScreen = modalPresentationStyle === "fullScreen"; - const swipeBackPrevented = preventSwipeBack || presentModalFullScreen; + const modalPresentationStyle = + globalOptions.theme === "cupertino" + ? CUPERTINO_ONLY_modalPresentationStyle + : undefined; + const activityEnterStyle = + globalOptions.theme === "android" + ? ANDROID_ONLY_activityEnterStyle + : undefined; + + const swipeBackPrevented = + preventSwipeBack || modalPresentationStyle === "fullScreen"; + + const hasAppBar = !!appBar; + + const zIndexBase = (activity?.zIndex ?? 0) * 5; + + let zIndexDim: number; + let zIndexPaper: number; + let zIndexEdge: number; + let zIndexAppBar: number; + + switch (globalOptions.theme) { + case "cupertino": { + zIndexDim = + zIndexBase + (modalPresentationStyle === "fullScreen" ? 2 : 0); + zIndexPaper = + zIndexBase + + (hasAppBar && modalPresentationStyle !== "fullScreen" ? 1 : 3); + zIndexEdge = zIndexBase + 4; + zIndexAppBar = zIndexBase + 7; + break; + } + case "android": + default: { + zIndexDim = zIndexBase; + zIndexPaper = zIndexBase + (activityEnterStyle === "slideInLeft" ? 1 : 3); + zIndexEdge = zIndexBase + 4; + zIndexAppBar = + zIndexBase + (activityEnterStyle === "slideInLeft" ? 7 : 4); + break; + } + } + + const transitionState = activity?.transitionState ?? "enter-done"; + const lazyTransitionState = useLazy(transitionState); useStyleEffectHide({ refs: [appScreenRef], hasEffect: true, }); useStyleEffectOffset({ - theme: globalOptions.theme, refs: - globalOptions.theme === "cupertino" ? [paperRef] : [paperRef, appBarRef], - hasEffect: !presentModalFullScreen, + globalOptions.theme === "cupertino" || + activityEnterStyle === "slideInLeft" + ? [paperRef] + : [paperRef, appBarRef], + theme: globalOptions.theme, + activityEnterStyle, + hasEffect: modalPresentationStyle !== "fullScreen", }); useStyleEffectSwipeBack({ - theme: globalOptions.theme, dimRef, edgeRef, paperRef, - hasEffect: true, + theme: globalOptions.theme, prevented: swipeBackPrevented, onSwiped() { pop(); }, + hasEffect: true, }); - const hasAppBar = !!appBar; - - const zIndexBase = (activity?.zIndex ?? 0) * 5; - const zIndexDim = zIndexBase; - const zIndexPaper = - zIndexBase + (globalOptions.theme === "cupertino" && hasAppBar ? 1 : 3); - const zIndexEdge = zIndexBase + 4; - const zIndexAppBar = - globalOptions.theme === "cupertino" ? zIndexBase + 7 : zIndexBase + 4; - - const transitionState = activity?.transitionState ?? "enter-done"; - const lazyTransitionState = useLazy(transitionState); - const onAppBarTopClick: React.MouseEventHandler = (e) => { appBar?.onTopClick?.(e); @@ -148,12 +182,15 @@ const AppScreen: React.FC = ({ }), )} > -
+ {activityEnterStyle !== "slideInLeft" && ( +
+ )} {appBar && ( )} @@ -161,7 +198,8 @@ const AppScreen: React.FC = ({ key={activity?.id} className={css.paper({ hasAppBar, - presentModalFullScreen, + modalPresentationStyle, + activityEnterStyle, })} ref={paperRef} > diff --git a/extensions/plugin-basic-ui/src/hooks/useStyleEffectOffset.ts b/extensions/plugin-basic-ui/src/hooks/useStyleEffectOffset.ts index 548ec7ce..11162ee7 100644 --- a/extensions/plugin-basic-ui/src/hooks/useStyleEffectOffset.ts +++ b/extensions/plugin-basic-ui/src/hooks/useStyleEffectOffset.ts @@ -10,10 +10,12 @@ export const OFFSET_PX_CUPERTINO = 80; export function useStyleEffectOffset({ refs, theme, - hasEffect, + activityEnterStyle, + hasEffect = false, }: { refs: Array>; theme: "android" | "cupertino"; + activityEnterStyle?: "slideInLeft"; hasEffect?: boolean; }) { useStyleEffect({ @@ -21,10 +23,25 @@ export function useStyleEffectOffset({ refs, effect: hasEffect ? ({ activityTransitionState, refs }) => { - const transform = - theme === "cupertino" - ? `translate3d(-${OFFSET_PX_CUPERTINO / 16}rem, 0, 0)` - : `translate3d(0, -${OFFSET_PX_ANDROID / 16}rem, 0)`; + let transform: string; + let opacity: string; + + switch (theme) { + case "cupertino": { + transform = `translate3d(-${OFFSET_PX_CUPERTINO / 16}rem, 0, 0)`; + opacity = "1"; + break; + } + case "android": + default: { + transform = + activityEnterStyle === "slideInLeft" + ? `translate3d(-50%, 0, 0)` + : `translate3d(0, -${OFFSET_PX_ANDROID / 16}rem, 0)`; + opacity = activityEnterStyle === "slideInLeft" ? "0" : "1"; + break; + } + } const cleanup = () => { requestNextFrame(() => { @@ -36,6 +53,7 @@ export function useStyleEffectOffset({ const $el = ref.current; $el.style.transform = ""; + $el.style.opacity = ""; listenOnce($el, "transitionend", () => { $el.style.transition = ""; @@ -55,6 +73,7 @@ export function useStyleEffectOffset({ ref.current.style.transition = globalVars.computedTransitionDuration; ref.current.style.transform = transform; + ref.current.style.opacity = opacity; }); switch (activityTransitionState) { diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index ce7074ec..bc545372 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -43,6 +43,7 @@ module.exports = { disallowTypeAnnotations: false, }, ], + camelcase: "off", }, ignorePatterns: ["**/__generated__/**/*", "**/lib/**/*", "**/dist/**/*"], }; From 4ca110f47f0e689ff41d90303938039ed8fe32a3 Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 27 Oct 2023 11:49:08 +0900 Subject: [PATCH 2/6] feat(plugin-basic-ui): add `data-*` attributes to AppScreen, BottomSheet, Modal components (#408) --- extensions/plugin-basic-ui/src/components/AppScreen.tsx | 3 +++ extensions/plugin-basic-ui/src/components/BottomSheet.tsx | 3 +++ extensions/plugin-basic-ui/src/components/Modal.tsx | 3 +++ 3 files changed, 9 insertions(+) diff --git a/extensions/plugin-basic-ui/src/components/AppScreen.tsx b/extensions/plugin-basic-ui/src/components/AppScreen.tsx index 47f540bd..6940bf12 100644 --- a/extensions/plugin-basic-ui/src/components/AppScreen.tsx +++ b/extensions/plugin-basic-ui/src/components/AppScreen.tsx @@ -181,6 +181,9 @@ const AppScreen: React.FC = ({ : "0ms", }), )} + data-stackflow-component-name="AppScreen" + data-stackflow-activity-id={activity?.id} + data-stackflow-activity-is-active={activity?.isActive} > {activityEnterStyle !== "slideInLeft" && (
diff --git a/extensions/plugin-basic-ui/src/components/BottomSheet.tsx b/extensions/plugin-basic-ui/src/components/BottomSheet.tsx index 8a3567fa..3b8d6a45 100644 --- a/extensions/plugin-basic-ui/src/components/BottomSheet.tsx +++ b/extensions/plugin-basic-ui/src/components/BottomSheet.tsx @@ -87,6 +87,9 @@ const BottomSheet: React.FC = ({ : "0ms", }), )} + data-stackflow-component-name="BottomSheet" + data-stackflow-activity-id={activity?.id} + data-stackflow-activity-is-active={activity?.isActive} >
diff --git a/extensions/plugin-basic-ui/src/components/Modal.tsx b/extensions/plugin-basic-ui/src/components/Modal.tsx index 6572651b..1c372099 100644 --- a/extensions/plugin-basic-ui/src/components/Modal.tsx +++ b/extensions/plugin-basic-ui/src/components/Modal.tsx @@ -87,6 +87,9 @@ const Modal: React.FC = ({ : "0ms", }), )} + data-stackflow-component-name="Modal" + data-stackflow-activity-id={activity?.id} + data-stackflow-activity-is-active={activity?.isActive} >
From b6e4c1cd0957361fd8357bc88600682ca66959ce Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 27 Oct 2023 11:49:27 +0900 Subject: [PATCH 3/6] refactor(plugin-basic-ui): rename `appendLeft`, `appendRight` to `renderLeft`, `renderRight` (#411) --- demo/src/activities/Main.tsx | 4 ++-- .../plugin-basic-ui/src/components/AppBar.tsx | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/demo/src/activities/Main.tsx b/demo/src/activities/Main.tsx index 58cafe4f..4e777400 100644 --- a/demo/src/activities/Main.tsx +++ b/demo/src/activities/Main.tsx @@ -103,8 +103,8 @@ const Main: ActivityComponentType = () => { return (
diff --git a/extensions/plugin-basic-ui/src/components/AppBar.tsx b/extensions/plugin-basic-ui/src/components/AppBar.tsx index a928c88c..ba8a0123 100644 --- a/extensions/plugin-basic-ui/src/components/AppBar.tsx +++ b/extensions/plugin-basic-ui/src/components/AppBar.tsx @@ -29,8 +29,8 @@ type AppBarProps = Partial< > > & { title?: React.ReactNode; - appendLeft?: () => React.ReactNode; - appendRight?: () => React.ReactNode; + renderLeft?: () => React.ReactNode; + renderRight?: () => React.ReactNode; backButton?: | { renderIcon?: () => React.ReactNode; @@ -59,8 +59,8 @@ const AppBar = forwardRef( ( { title, - appendLeft, - appendRight, + renderLeft, + renderRight, backButton, closeButton, closeButtonLocation = "left", @@ -260,7 +260,7 @@ const AppBar = forwardRef( const hasLeft = !!( (closeButtonLocation === "left" && closeButton) || backButton || - appendLeft + renderLeft ); return ( @@ -300,7 +300,7 @@ const AppBar = forwardRef(
{closeButtonLocation === "left" && renderCloseButton()} {renderBackButton()} - {appendLeft?.()} + {renderLeft?.()}
(
- {appendRight?.()} + {renderRight?.()} {closeButtonLocation === "right" && renderCloseButton()}
From 75874e478057c53fa4d5ae82fb5dd64a7c43c603 Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 27 Oct 2023 12:12:28 +0900 Subject: [PATCH 4/6] Publish - @stackflow/core@1.0.8 - @stackflow/demo@1.2.15 - @stackflow/docs@1.2.16 - @stackflow/compat-await-push@1.1.5 - @stackflow/link@1.3.12 - @stackflow/plugin-basic-ui@1.4.0 - @stackflow/plugin-devtools@0.1.6 - @stackflow/plugin-google-analytics-4@1.1.7 - @stackflow/plugin-history-sync@1.3.11 - @stackflow/plugin-map-initial-activity@1.0.3 - @stackflow/plugin-preload@1.2.11 - @stackflow/plugin-renderer-basic@1.1.5 - @stackflow/plugin-renderer-web@1.1.5 - @stackflow/plugin-stack-depth-change@1.0.9 - @stackflow/react@1.1.5 - @stackflow/eslint-config@1.0.1 --- core/package.json | 4 +- demo/package.json | 26 ++-- docs/package.json | 16 +- extensions/compat-await-push/package.json | 8 +- extensions/link/package.json | 12 +- extensions/plugin-basic-ui/package.json | 8 +- extensions/plugin-devtools/package.json | 6 +- .../plugin-google-analytics-4/package.json | 8 +- extensions/plugin-history-sync/package.json | 8 +- .../plugin-map-initial-activity/package.json | 8 +- extensions/plugin-preload/package.json | 10 +- extensions/plugin-renderer-basic/package.json | 8 +- extensions/plugin-renderer-web/package.json | 8 +- .../plugin-stack-depth-change/package.json | 6 +- integrations/react/package.json | 6 +- packages/eslint-config/package.json | 2 +- yarn.lock | 138 +++++++++--------- 17 files changed, 141 insertions(+), 141 deletions(-) diff --git a/core/package.json b/core/package.json index 465b85ad..49146366 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/core", - "version": "1.0.7", + "version": "1.0.8", "license": "MIT", "exports": { ".": { @@ -40,7 +40,7 @@ }, "devDependencies": { "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", + "@stackflow/eslint-config": "^1.0.1", "@swc/core": "^1.2.182", "@swc/jest": "^0.2.21", "@types/jest": "^28.1.6", diff --git a/demo/package.json b/demo/package.json index 362ad8ba..8b0c9c70 100644 --- a/demo/package.json +++ b/demo/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/demo", - "version": "1.2.14", + "version": "1.2.15", "private": true, "license": "MIT", "exports": { @@ -31,18 +31,18 @@ "dependencies": { "@seed-design/design-token": "^1.0.0-alpha.0", "@seed-design/stylesheet": "^1.0.0-alpha.0", - "@stackflow/compat-await-push": "^1.1.4", - "@stackflow/core": "^1.0.7", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/link": "^1.3.11", - "@stackflow/plugin-basic-ui": "^1.3.4", - "@stackflow/plugin-devtools": "^0.1.5", - "@stackflow/plugin-history-sync": "^1.3.10", - "@stackflow/plugin-map-initial-activity": "^1.0.2", - "@stackflow/plugin-preload": "^1.2.10", - "@stackflow/plugin-renderer-basic": "^1.1.4", - "@stackflow/plugin-stack-depth-change": "^1.0.8", - "@stackflow/react": "^1.1.4", + "@stackflow/compat-await-push": "^1.1.5", + "@stackflow/core": "^1.0.8", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/link": "^1.3.12", + "@stackflow/plugin-basic-ui": "^1.4.0", + "@stackflow/plugin-devtools": "^0.1.6", + "@stackflow/plugin-history-sync": "^1.3.11", + "@stackflow/plugin-map-initial-activity": "^1.0.3", + "@stackflow/plugin-preload": "^1.2.11", + "@stackflow/plugin-renderer-basic": "^1.1.5", + "@stackflow/plugin-stack-depth-change": "^1.0.9", + "@stackflow/react": "^1.1.5", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", "eslint": "^8.13.0", diff --git a/docs/package.json b/docs/package.json index 58fb9c08..4f48145e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/docs", - "version": "1.2.15", + "version": "1.2.16", "private": true, "description": "Mobile-first stack navigator framework with Composable Plugin System", "license": "MIT", @@ -11,13 +11,13 @@ }, "dependencies": { "@mdx-js/react": "^2.1.1", - "@stackflow/core": "^1.0.7", - "@stackflow/demo": "^1.2.14", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/plugin-basic-ui": "^1.3.4", - "@stackflow/plugin-history-sync": "^1.3.10", - "@stackflow/plugin-renderer-basic": "^1.1.4", - "@stackflow/react": "^1.1.4", + "@stackflow/core": "^1.0.8", + "@stackflow/demo": "^1.2.15", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/plugin-basic-ui": "^1.4.0", + "@stackflow/plugin-history-sync": "^1.3.11", + "@stackflow/plugin-renderer-basic": "^1.1.5", + "@stackflow/react": "^1.1.5", "@types/react": "^18.0.15", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/compat-await-push/package.json b/extensions/compat-await-push/package.json index d470fca9..5587acc6 100644 --- a/extensions/compat-await-push/package.json +++ b/extensions/compat-await-push/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/compat-await-push", - "version": "1.1.4", + "version": "1.1.5", "license": "MIT", "exports": { ".": { @@ -26,10 +26,10 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/react": "^1.1.5", "@types/react": "^18.0.10", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/link/package.json b/extensions/link/package.json index 727d06bd..2b60432d 100644 --- a/extensions/link/package.json +++ b/extensions/link/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/link", - "version": "1.3.11", + "version": "1.3.12", "license": "MIT", "exports": { ".": { @@ -26,12 +26,12 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/plugin-history-sync": "^1.3.10", - "@stackflow/plugin-preload": "^1.2.10", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/plugin-history-sync": "^1.3.11", + "@stackflow/plugin-preload": "^1.2.11", + "@stackflow/react": "^1.1.5", "@types/react": "^18.0.10", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/plugin-basic-ui/package.json b/extensions/plugin-basic-ui/package.json index ed07a2ef..83ead454 100644 --- a/extensions/plugin-basic-ui/package.json +++ b/extensions/plugin-basic-ui/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-basic-ui", - "version": "1.3.4", + "version": "1.4.0", "license": "MIT", "exports": { ".": { @@ -34,10 +34,10 @@ "ts-pattern": "^4.0.5" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/react": "^1.1.5", "@types/react": "^18.0.10", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/plugin-devtools/package.json b/extensions/plugin-devtools/package.json index 0e733763..75b1c907 100644 --- a/extensions/plugin-devtools/package.json +++ b/extensions/plugin-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-devtools", - "version": "0.1.5", + "version": "0.1.6", "license": "MIT", "exports": { ".": { @@ -25,9 +25,9 @@ "dev": "yarn build:js --watch && yarn build:dts --watch" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", + "@stackflow/eslint-config": "^1.0.1", "@types/node": "^18.6.3", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/plugin-google-analytics-4/package.json b/extensions/plugin-google-analytics-4/package.json index 20b709a9..0c844d97 100644 --- a/extensions/plugin-google-analytics-4/package.json +++ b/extensions/plugin-google-analytics-4/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-google-analytics-4", - "version": "1.1.6", + "version": "1.1.7", "license": "MIT", "author": "Aaron K ", "exports": { @@ -30,10 +30,10 @@ "react-ga4": "^1.4.1" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/react": "^1.1.5", "@types/react": "^18.0.10", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/plugin-history-sync/package.json b/extensions/plugin-history-sync/package.json index cb800f37..2cbdb5a1 100644 --- a/extensions/plugin-history-sync/package.json +++ b/extensions/plugin-history-sync/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-history-sync", - "version": "1.3.10", + "version": "1.3.11", "license": "MIT", "exports": { ".": { @@ -40,10 +40,10 @@ "url-pattern": "^1.0.3" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/react": "^1.1.5", "@swc/core": "^1.3.35", "@swc/jest": "^0.2.24", "@types/jest": "^29.4.0", diff --git a/extensions/plugin-map-initial-activity/package.json b/extensions/plugin-map-initial-activity/package.json index 7dbc0ccf..06b6118b 100644 --- a/extensions/plugin-map-initial-activity/package.json +++ b/extensions/plugin-map-initial-activity/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-map-initial-activity", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "exports": { ".": { @@ -26,10 +26,10 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/react": "^1.1.5", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", "esbuild": "^0.14.51", diff --git a/extensions/plugin-preload/package.json b/extensions/plugin-preload/package.json index 1ef0bc36..1b54ec7c 100644 --- a/extensions/plugin-preload/package.json +++ b/extensions/plugin-preload/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-preload", - "version": "1.2.10", + "version": "1.2.11", "license": "MIT", "exports": { ".": { @@ -26,13 +26,13 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@stackflow/plugin-history-sync": "^1.3.10" + "@stackflow/plugin-history-sync": "^1.3.11" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/react": "^1.1.5", "@types/react": "^18.0.10", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/plugin-renderer-basic/package.json b/extensions/plugin-renderer-basic/package.json index 03e2dc05..5cc1cde8 100644 --- a/extensions/plugin-renderer-basic/package.json +++ b/extensions/plugin-renderer-basic/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-renderer-basic", - "version": "1.1.4", + "version": "1.1.5", "license": "MIT", "exports": { ".": { @@ -26,10 +26,10 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/react": "^1.1.5", "@types/react": "^18.0.10", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/plugin-renderer-web/package.json b/extensions/plugin-renderer-web/package.json index cf6803e4..dadc0d14 100644 --- a/extensions/plugin-renderer-web/package.json +++ b/extensions/plugin-renderer-web/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-renderer-web", - "version": "1.1.4", + "version": "1.1.5", "license": "MIT", "exports": { ".": { @@ -26,10 +26,10 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", - "@stackflow/react": "^1.1.4", + "@stackflow/eslint-config": "^1.0.1", + "@stackflow/react": "^1.1.5", "@types/react": "^18.0.10", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/extensions/plugin-stack-depth-change/package.json b/extensions/plugin-stack-depth-change/package.json index e941ca6e..48d7f10a 100644 --- a/extensions/plugin-stack-depth-change/package.json +++ b/extensions/plugin-stack-depth-change/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-stack-depth-change", - "version": "1.0.8", + "version": "1.0.9", "license": "MIT", "exports": { ".": { @@ -26,9 +26,9 @@ "typecheck": "tsc --noEmit" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", + "@stackflow/eslint-config": "^1.0.1", "@types/node": "^18.6.3", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/integrations/react/package.json b/integrations/react/package.json index c85ca3c8..22a3ed15 100644 --- a/integrations/react/package.json +++ b/integrations/react/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/react", - "version": "1.1.4", + "version": "1.1.5", "license": "MIT", "exports": { ".": { @@ -29,9 +29,9 @@ "react-fast-compare": "^3.2.0" }, "devDependencies": { - "@stackflow/core": "^1.0.7", + "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", - "@stackflow/eslint-config": "^1.0.0", + "@stackflow/eslint-config": "^1.0.1", "@types/react": "^18.0.9", "@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/parser": "^5.20.0", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index abed4543..3f527e66 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/eslint-config", - "version": "1.0.0", + "version": "1.0.1", "license": "MIT", "main": "index.js", "exports": { diff --git a/yarn.lock b/yarn.lock index 851dc098..5338c935 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2608,14 +2608,14 @@ __metadata: languageName: node linkType: hard -"@stackflow/compat-await-push@^1.1.4, @stackflow/compat-await-push@workspace:extensions/compat-await-push": +"@stackflow/compat-await-push@^1.1.5, @stackflow/compat-await-push@workspace:extensions/compat-await-push": version: 0.0.0-use.local resolution: "@stackflow/compat-await-push@workspace:extensions/compat-await-push" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -2637,12 +2637,12 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/core@^1.0.7, @stackflow/core@workspace:core": +"@stackflow/core@^1.0.8, @stackflow/core@workspace:core": version: 0.0.0-use.local resolution: "@stackflow/core@workspace:core" dependencies: "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 + "@stackflow/eslint-config": ^1.0.1 "@swc/core": ^1.2.182 "@swc/jest": ^0.2.21 "@types/jest": ^28.1.6 @@ -2664,25 +2664,25 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/demo@^1.2.14, @stackflow/demo@workspace:demo": +"@stackflow/demo@^1.2.15, @stackflow/demo@workspace:demo": version: 0.0.0-use.local resolution: "@stackflow/demo@workspace:demo" dependencies: "@seed-design/design-token": ^1.0.0-alpha.0 "@seed-design/stylesheet": ^1.0.0-alpha.0 - "@stackflow/compat-await-push": ^1.1.4 - "@stackflow/core": ^1.0.7 + "@stackflow/compat-await-push": ^1.1.5 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/link": ^1.3.11 - "@stackflow/plugin-basic-ui": ^1.3.4 - "@stackflow/plugin-devtools": ^0.1.5 - "@stackflow/plugin-history-sync": ^1.3.10 - "@stackflow/plugin-map-initial-activity": ^1.0.2 - "@stackflow/plugin-preload": ^1.2.10 - "@stackflow/plugin-renderer-basic": ^1.1.4 - "@stackflow/plugin-stack-depth-change": ^1.0.8 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/link": ^1.3.12 + "@stackflow/plugin-basic-ui": ^1.4.0 + "@stackflow/plugin-devtools": ^0.1.6 + "@stackflow/plugin-history-sync": ^1.3.11 + "@stackflow/plugin-map-initial-activity": ^1.0.3 + "@stackflow/plugin-preload": ^1.2.11 + "@stackflow/plugin-renderer-basic": ^1.1.5 + "@stackflow/plugin-stack-depth-change": ^1.0.9 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@types/react-dom": ^18.0.5 "@types/react-lazy-load-image-component": ^1.5.2 @@ -2720,13 +2720,13 @@ __metadata: dependencies: "@mdx-js/react": ^2.1.1 "@seed-design/stylesheet": ^1.0.0-alpha.0 - "@stackflow/core": ^1.0.7 - "@stackflow/demo": ^1.2.14 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/plugin-basic-ui": ^1.3.4 - "@stackflow/plugin-history-sync": ^1.3.10 - "@stackflow/plugin-renderer-basic": ^1.1.4 - "@stackflow/react": ^1.1.4 + "@stackflow/core": ^1.0.8 + "@stackflow/demo": ^1.2.15 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/plugin-basic-ui": ^1.4.0 + "@stackflow/plugin-history-sync": ^1.3.11 + "@stackflow/plugin-renderer-basic": ^1.1.5 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.15 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -2757,7 +2757,7 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/eslint-config@^1.0.0, @stackflow/eslint-config@workspace:packages/eslint-config": +"@stackflow/eslint-config@^1.0.1, @stackflow/eslint-config@workspace:packages/eslint-config": version: 0.0.0-use.local resolution: "@stackflow/eslint-config@workspace:packages/eslint-config" dependencies: @@ -2776,16 +2776,16 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/link@^1.3.11, @stackflow/link@workspace:extensions/link": +"@stackflow/link@^1.3.12, @stackflow/link@workspace:extensions/link": version: 0.0.0-use.local resolution: "@stackflow/link@workspace:extensions/link" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/plugin-history-sync": ^1.3.10 - "@stackflow/plugin-preload": ^1.2.10 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/plugin-history-sync": ^1.3.11 + "@stackflow/plugin-preload": ^1.2.11 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -2827,14 +2827,14 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-basic-ui@^1.3.4, @stackflow/plugin-basic-ui@workspace:extensions/plugin-basic-ui": +"@stackflow/plugin-basic-ui@^1.4.0, @stackflow/plugin-basic-ui@workspace:extensions/plugin-basic-ui": version: 0.0.0-use.local resolution: "@stackflow/plugin-basic-ui@workspace:extensions/plugin-basic-ui" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -2864,13 +2864,13 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-devtools@^0.1.5, @stackflow/plugin-devtools@workspace:extensions/plugin-devtools": +"@stackflow/plugin-devtools@^0.1.6, @stackflow/plugin-devtools@workspace:extensions/plugin-devtools": version: 0.0.0-use.local resolution: "@stackflow/plugin-devtools@workspace:extensions/plugin-devtools" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 + "@stackflow/eslint-config": ^1.0.1 "@types/node": ^18.6.3 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -2895,10 +2895,10 @@ __metadata: version: 0.0.0-use.local resolution: "@stackflow/plugin-google-analytics-4@workspace:extensions/plugin-google-analytics-4" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -2924,14 +2924,14 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-history-sync@^1.3.10, @stackflow/plugin-history-sync@workspace:extensions/plugin-history-sync": +"@stackflow/plugin-history-sync@^1.3.11, @stackflow/plugin-history-sync@workspace:extensions/plugin-history-sync": version: 0.0.0-use.local resolution: "@stackflow/plugin-history-sync@workspace:extensions/plugin-history-sync" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/react": ^1.1.5 "@swc/core": ^1.3.35 "@swc/jest": ^0.2.24 "@types/jest": ^29.4.0 @@ -2963,14 +2963,14 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-map-initial-activity@^1.0.2, @stackflow/plugin-map-initial-activity@workspace:extensions/plugin-map-initial-activity": +"@stackflow/plugin-map-initial-activity@^1.0.3, @stackflow/plugin-map-initial-activity@workspace:extensions/plugin-map-initial-activity": version: 0.0.0-use.local resolution: "@stackflow/plugin-map-initial-activity@workspace:extensions/plugin-map-initial-activity" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/react": ^1.1.5 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 esbuild: ^0.14.51 @@ -2988,15 +2988,15 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-preload@^1.2.10, @stackflow/plugin-preload@workspace:extensions/plugin-preload": +"@stackflow/plugin-preload@^1.2.11, @stackflow/plugin-preload@workspace:extensions/plugin-preload": version: 0.0.0-use.local resolution: "@stackflow/plugin-preload@workspace:extensions/plugin-preload" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/plugin-history-sync": ^1.3.10 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/plugin-history-sync": ^1.3.11 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -3021,14 +3021,14 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-renderer-basic@^1.1.4, @stackflow/plugin-renderer-basic@workspace:extensions/plugin-renderer-basic": +"@stackflow/plugin-renderer-basic@^1.1.5, @stackflow/plugin-renderer-basic@workspace:extensions/plugin-renderer-basic": version: 0.0.0-use.local resolution: "@stackflow/plugin-renderer-basic@workspace:extensions/plugin-renderer-basic" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -3057,10 +3057,10 @@ __metadata: version: 0.0.0-use.local resolution: "@stackflow/plugin-renderer-web@workspace:extensions/plugin-renderer-web" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 - "@stackflow/react": ^1.1.4 + "@stackflow/eslint-config": ^1.0.1 + "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -3085,13 +3085,13 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-stack-depth-change@^1.0.8, @stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change": +"@stackflow/plugin-stack-depth-change@^1.0.9, @stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change": version: 0.0.0-use.local resolution: "@stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 + "@stackflow/eslint-config": ^1.0.1 "@types/node": ^18.6.3 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 @@ -3112,13 +3112,13 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/react@^1.1.4, @stackflow/react@workspace:integrations/react": +"@stackflow/react@^1.1.5, @stackflow/react@workspace:integrations/react": version: 0.0.0-use.local resolution: "@stackflow/react@workspace:integrations/react" dependencies: - "@stackflow/core": ^1.0.7 + "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 - "@stackflow/eslint-config": ^1.0.0 + "@stackflow/eslint-config": ^1.0.1 "@types/react": ^18.0.9 "@typescript-eslint/eslint-plugin": ^5.32.0 "@typescript-eslint/parser": ^5.20.0 From abd670caec0bc356dd8bc8aa95f27cd0041d1801 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Mon, 30 Oct 2023 23:42:29 +0900 Subject: [PATCH 5/6] fix(plugin-history-sync): replace silent state into flags (#422) --- .../plugin-history-sync/src/historyState.ts | 2 - .../src/historySyncPlugin.tsx | 50 ++++++++----------- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/extensions/plugin-history-sync/src/historyState.ts b/extensions/plugin-history-sync/src/historyState.ts index ae57b68e..1c7342ce 100644 --- a/extensions/plugin-history-sync/src/historyState.ts +++ b/extensions/plugin-history-sync/src/historyState.ts @@ -6,7 +6,6 @@ const STATE_TAG = `@stackflow/plugin-history-sync`; interface State { activity: Activity; step?: ActivityStep; - silent?: boolean; } interface SerializedState extends State { @@ -45,7 +44,6 @@ function serializeState(state: State): SerializedState { _TAG: STATE_TAG, activity: serializeActivity(state.activity), step: state.step ? serializeStep(state.step) : undefined, - silent: state.silent, }; } diff --git a/extensions/plugin-history-sync/src/historySyncPlugin.tsx b/extensions/plugin-history-sync/src/historySyncPlugin.tsx index 63e8de75..cf3d22b0 100644 --- a/extensions/plugin-history-sync/src/historySyncPlugin.tsx +++ b/extensions/plugin-history-sync/src/historySyncPlugin.tsx @@ -47,7 +47,7 @@ export function historySyncPlugin< return () => { let pushFlag = 0; - let popFlag = 0; + let silentFlag = false; const { enqueue } = makeHistoryTaskQueue(history); @@ -174,8 +174,8 @@ export function historySyncPlugin< ); const onPopState: Listener = (e) => { - if (popFlag) { - popFlag -= 1; + if (silentFlag) { + silentFlag = false; return; } @@ -188,12 +188,6 @@ export function historySyncPlugin< const targetActivity = historyState.activity; const targetActivityId = historyState.activity.id; const targetStep = historyState.step; - const { silent } = historyState; - - if (silent) { - historyState.silent = false; - return; - } const { activities } = getStack(); const currentActivity = activities.find( @@ -321,17 +315,17 @@ export function historySyncPlugin< options.urlPatternOptions, ); - enqueue(() => + enqueue(() => { + silentFlag = true; pushState({ history, pathname: template.fill(activity.params), state: { activity, - silent: true, }, useHash: options.useHash, - }), - ); + }); + }); }, onStepPushed({ effect: { activity, step } }) { if (pushFlag) { @@ -344,18 +338,18 @@ export function historySyncPlugin< options.urlPatternOptions, ); - enqueue(() => + enqueue(() => { + silentFlag = true; pushState({ history, pathname: template.fill(activity.params), state: { activity, step, - silent: true, }, useHash: options.useHash, - }), - ); + }); + }); }, onReplaced({ effect: { activity } }) { if (!activity.isActive) { @@ -367,17 +361,17 @@ export function historySyncPlugin< options.urlPatternOptions, ); - enqueue(() => + enqueue(() => { + silentFlag = true; replaceState({ history, pathname: template.fill(activity.params), state: { activity, - silent: true, }, useHash: options.useHash, - }), - ); + }); + }); }, onStepReplaced({ effect: { activity, step } }) { if (!activity.isActive) { @@ -389,18 +383,18 @@ export function historySyncPlugin< options.urlPatternOptions, ); - enqueue(() => + enqueue(() => { + silentFlag = true; replaceState({ history, pathname: template.fill(activity.params), state: { activity, step, - silent: true, }, useHash: options.useHash, - }), - ); + }); + }); }, onBeforePush({ actionParams, actions: { overrideActionParams } }) { const template = makeTemplate( @@ -451,7 +445,7 @@ export function historySyncPlugin< for (let i = 0; i < previousActivity.steps.length - 1; i += 1) { // eslint-disable-next-line no-loop-func enqueue(() => { - popFlag += 1; + silentFlag = true; history.back(); }); } @@ -466,7 +460,7 @@ export function historySyncPlugin< if ((currentActivity?.steps.length ?? 0) > 1) { enqueue(() => { - popFlag += 1; + silentFlag = true; history.back(); }); } @@ -486,7 +480,7 @@ export function historySyncPlugin< for (let i = 0; i < popCount; i += 1) { // eslint-disable-next-line no-loop-func enqueue(() => { - popFlag += 1; + silentFlag = true; history.back(); }); } From ca553aaf72fda9721c4b1777df1e2fb988aa2a85 Mon Sep 17 00:00:00 2001 From: "JH.Lee" Date: Mon, 30 Oct 2023 23:44:30 +0900 Subject: [PATCH 6/6] Publish - @stackflow/demo@1.2.16 - @stackflow/docs@1.2.17 - @stackflow/link@1.3.13 - @stackflow/plugin-history-sync@1.3.12 - @stackflow/plugin-preload@1.2.12 --- demo/package.json | 8 +++---- docs/package.json | 6 +++--- extensions/link/package.json | 6 +++--- extensions/plugin-history-sync/package.json | 2 +- extensions/plugin-preload/package.json | 4 ++-- yarn.lock | 24 ++++++++++----------- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/demo/package.json b/demo/package.json index 8b0c9c70..a7e9e179 100644 --- a/demo/package.json +++ b/demo/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/demo", - "version": "1.2.15", + "version": "1.2.16", "private": true, "license": "MIT", "exports": { @@ -34,12 +34,12 @@ "@stackflow/compat-await-push": "^1.1.5", "@stackflow/core": "^1.0.8", "@stackflow/eslint-config": "^1.0.1", - "@stackflow/link": "^1.3.12", + "@stackflow/link": "^1.3.13", "@stackflow/plugin-basic-ui": "^1.4.0", "@stackflow/plugin-devtools": "^0.1.6", - "@stackflow/plugin-history-sync": "^1.3.11", + "@stackflow/plugin-history-sync": "^1.3.12", "@stackflow/plugin-map-initial-activity": "^1.0.3", - "@stackflow/plugin-preload": "^1.2.11", + "@stackflow/plugin-preload": "^1.2.12", "@stackflow/plugin-renderer-basic": "^1.1.5", "@stackflow/plugin-stack-depth-change": "^1.0.9", "@stackflow/react": "^1.1.5", diff --git a/docs/package.json b/docs/package.json index 4f48145e..56f6a67d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/docs", - "version": "1.2.16", + "version": "1.2.17", "private": true, "description": "Mobile-first stack navigator framework with Composable Plugin System", "license": "MIT", @@ -12,10 +12,10 @@ "dependencies": { "@mdx-js/react": "^2.1.1", "@stackflow/core": "^1.0.8", - "@stackflow/demo": "^1.2.15", + "@stackflow/demo": "^1.2.16", "@stackflow/eslint-config": "^1.0.1", "@stackflow/plugin-basic-ui": "^1.4.0", - "@stackflow/plugin-history-sync": "^1.3.11", + "@stackflow/plugin-history-sync": "^1.3.12", "@stackflow/plugin-renderer-basic": "^1.1.5", "@stackflow/react": "^1.1.5", "@types/react": "^18.0.15", diff --git a/extensions/link/package.json b/extensions/link/package.json index 2b60432d..42581bcb 100644 --- a/extensions/link/package.json +++ b/extensions/link/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/link", - "version": "1.3.12", + "version": "1.3.13", "license": "MIT", "exports": { ".": { @@ -29,8 +29,8 @@ "@stackflow/core": "^1.0.8", "@stackflow/esbuild-config": "^1.0.0", "@stackflow/eslint-config": "^1.0.1", - "@stackflow/plugin-history-sync": "^1.3.11", - "@stackflow/plugin-preload": "^1.2.11", + "@stackflow/plugin-history-sync": "^1.3.12", + "@stackflow/plugin-preload": "^1.2.12", "@stackflow/react": "^1.1.5", "@types/react": "^18.0.10", "@typescript-eslint/eslint-plugin": "^5.32.0", diff --git a/extensions/plugin-history-sync/package.json b/extensions/plugin-history-sync/package.json index 2cbdb5a1..23822df4 100644 --- a/extensions/plugin-history-sync/package.json +++ b/extensions/plugin-history-sync/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-history-sync", - "version": "1.3.11", + "version": "1.3.12", "license": "MIT", "exports": { ".": { diff --git a/extensions/plugin-preload/package.json b/extensions/plugin-preload/package.json index 1b54ec7c..83442974 100644 --- a/extensions/plugin-preload/package.json +++ b/extensions/plugin-preload/package.json @@ -1,6 +1,6 @@ { "name": "@stackflow/plugin-preload", - "version": "1.2.11", + "version": "1.2.12", "license": "MIT", "exports": { ".": { @@ -26,7 +26,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@stackflow/plugin-history-sync": "^1.3.11" + "@stackflow/plugin-history-sync": "^1.3.12" }, "devDependencies": { "@stackflow/core": "^1.0.8", diff --git a/yarn.lock b/yarn.lock index 5338c935..ade26b9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2664,7 +2664,7 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/demo@^1.2.15, @stackflow/demo@workspace:demo": +"@stackflow/demo@^1.2.16, @stackflow/demo@workspace:demo": version: 0.0.0-use.local resolution: "@stackflow/demo@workspace:demo" dependencies: @@ -2674,12 +2674,12 @@ __metadata: "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 "@stackflow/eslint-config": ^1.0.1 - "@stackflow/link": ^1.3.12 + "@stackflow/link": ^1.3.13 "@stackflow/plugin-basic-ui": ^1.4.0 "@stackflow/plugin-devtools": ^0.1.6 - "@stackflow/plugin-history-sync": ^1.3.11 + "@stackflow/plugin-history-sync": ^1.3.12 "@stackflow/plugin-map-initial-activity": ^1.0.3 - "@stackflow/plugin-preload": ^1.2.11 + "@stackflow/plugin-preload": ^1.2.12 "@stackflow/plugin-renderer-basic": ^1.1.5 "@stackflow/plugin-stack-depth-change": ^1.0.9 "@stackflow/react": ^1.1.5 @@ -2721,10 +2721,10 @@ __metadata: "@mdx-js/react": ^2.1.1 "@seed-design/stylesheet": ^1.0.0-alpha.0 "@stackflow/core": ^1.0.8 - "@stackflow/demo": ^1.2.15 + "@stackflow/demo": ^1.2.16 "@stackflow/eslint-config": ^1.0.1 "@stackflow/plugin-basic-ui": ^1.4.0 - "@stackflow/plugin-history-sync": ^1.3.11 + "@stackflow/plugin-history-sync": ^1.3.12 "@stackflow/plugin-renderer-basic": ^1.1.5 "@stackflow/react": ^1.1.5 "@types/react": ^18.0.15 @@ -2776,15 +2776,15 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/link@^1.3.12, @stackflow/link@workspace:extensions/link": +"@stackflow/link@^1.3.13, @stackflow/link@workspace:extensions/link": version: 0.0.0-use.local resolution: "@stackflow/link@workspace:extensions/link" dependencies: "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 "@stackflow/eslint-config": ^1.0.1 - "@stackflow/plugin-history-sync": ^1.3.11 - "@stackflow/plugin-preload": ^1.2.11 + "@stackflow/plugin-history-sync": ^1.3.12 + "@stackflow/plugin-preload": ^1.2.12 "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0 @@ -2924,7 +2924,7 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-history-sync@^1.3.11, @stackflow/plugin-history-sync@workspace:extensions/plugin-history-sync": +"@stackflow/plugin-history-sync@^1.3.12, @stackflow/plugin-history-sync@workspace:extensions/plugin-history-sync": version: 0.0.0-use.local resolution: "@stackflow/plugin-history-sync@workspace:extensions/plugin-history-sync" dependencies: @@ -2988,14 +2988,14 @@ __metadata: languageName: unknown linkType: soft -"@stackflow/plugin-preload@^1.2.11, @stackflow/plugin-preload@workspace:extensions/plugin-preload": +"@stackflow/plugin-preload@^1.2.12, @stackflow/plugin-preload@workspace:extensions/plugin-preload": version: 0.0.0-use.local resolution: "@stackflow/plugin-preload@workspace:extensions/plugin-preload" dependencies: "@stackflow/core": ^1.0.8 "@stackflow/esbuild-config": ^1.0.0 "@stackflow/eslint-config": ^1.0.1 - "@stackflow/plugin-history-sync": ^1.3.11 + "@stackflow/plugin-history-sync": ^1.3.12 "@stackflow/react": ^1.1.5 "@types/react": ^18.0.10 "@typescript-eslint/eslint-plugin": ^5.32.0