Skip to content

Commit

Permalink
Merge branch 'main' into history-queue-context
Browse files Browse the repository at this point in the history
  • Loading branch information
orionmiz committed Oct 31, 2023
2 parents 9fded7d + ca553aa commit fd09426
Show file tree
Hide file tree
Showing 28 changed files with 305 additions and 219 deletions.
4 changes: 2 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/core",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",
"exports": {
".": {
Expand Down Expand Up @@ -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",
Expand Down
26 changes: 13 additions & 13 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/demo",
"version": "1.2.14",
"version": "1.2.16",
"private": true,
"license": "MIT",
"exports": {
Expand Down Expand Up @@ -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.13",
"@stackflow/plugin-basic-ui": "^1.4.0",
"@stackflow/plugin-devtools": "^0.1.6",
"@stackflow/plugin-history-sync": "^1.3.12",
"@stackflow/plugin-map-initial-activity": "^1.0.3",
"@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",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.20.0",
"eslint": "^8.13.0",
Expand Down
4 changes: 2 additions & 2 deletions demo/src/activities/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ const Main: ActivityComponentType = () => {
return (
<Layout
appBar={{
appendLeft: appBarLeft,
appendRight: appBarRight,
renderLeft: appBarLeft,
renderRight: appBarRight,
}}
>
<div className={css.wrapper}>
Expand Down
16 changes: 8 additions & 8 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/docs",
"version": "1.2.15",
"version": "1.2.17",
"private": true,
"description": "Mobile-first stack navigator framework with Composable Plugin System",
"license": "MIT",
Expand All @@ -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.16",
"@stackflow/eslint-config": "^1.0.1",
"@stackflow/plugin-basic-ui": "^1.4.0",
"@stackflow/plugin-history-sync": "^1.3.12",
"@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",
Expand Down
8 changes: 4 additions & 4 deletions extensions/compat-await-push/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/compat-await-push",
"version": "1.1.4",
"version": "1.1.5",
"license": "MIT",
"exports": {
".": {
Expand All @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions extensions/link/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/link",
"version": "1.3.11",
"version": "1.3.13",
"license": "MIT",
"exports": {
".": {
Expand All @@ -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.12",
"@stackflow/plugin-preload": "^1.2.12",
"@stackflow/react": "^1.1.5",
"@types/react": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.20.0",
Expand Down
8 changes: 4 additions & 4 deletions extensions/plugin-basic-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/plugin-basic-ui",
"version": "1.3.4",
"version": "1.4.0",
"license": "MIT",
"exports": {
".": {
Expand Down Expand Up @@ -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",
Expand Down
21 changes: 19 additions & 2 deletions extensions/plugin-basic-ui/src/components/AppBar.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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",
}),
},
},
},
},
},
});

Expand Down
23 changes: 12 additions & 11 deletions extensions/plugin-basic-ui/src/components/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -52,19 +52,21 @@ type AppBarProps = Partial<
closeButtonLocation?: "left" | "right";
border?: boolean;
modalPresentationStyle?: "fullScreen";
activityEnterStyle?: "slideInLeft";
onTopClick?: (e: React.MouseEvent) => void;
};
const AppBar = forwardRef<HTMLDivElement, AppBarProps>(
(
{
title,
appendLeft,
appendRight,
renderLeft,
renderRight,
backButton,
closeButton,
closeButtonLocation = "left",
border = true,
modalPresentationStyle,
activityEnterStyle,
iconColor,
iconColorTransitionDuration,
textColor,
Expand Down Expand Up @@ -96,8 +98,6 @@ const AppBar = forwardRef<HTMLDivElement, AppBarProps>(
enable: globalOptions.theme === "cupertino",
});

const presentModalFullScreen = modalPresentationStyle === "fullScreen";

const onBackClick = (e: React.MouseEvent<HTMLButtonElement>) => {
if (backButton && "onClick" in backButton && backButton.onClick) {
backButton.onClick(e);
Expand Down Expand Up @@ -168,7 +168,7 @@ const AppBar = forwardRef<HTMLDivElement, AppBarProps>(
return globalBackButton.renderIcon();
}

if (presentModalFullScreen) {
if (modalPresentationStyle === "fullScreen") {
return <IconClose />;
}

Expand Down Expand Up @@ -260,15 +260,16 @@ const AppBar = forwardRef<HTMLDivElement, AppBarProps>(
const hasLeft = !!(
(closeButtonLocation === "left" && closeButton) ||
backButton ||
appendLeft
renderLeft
);

return (
<div
ref={ref}
className={css.appBar({
border,
presentModalFullScreen,
modalPresentationStyle,
activityEnterStyle,
})}
style={assignInlineVars(
compactMap({
Expand Down Expand Up @@ -299,7 +300,7 @@ const AppBar = forwardRef<HTMLDivElement, AppBarProps>(
<div className={css.left}>
{closeButtonLocation === "left" && renderCloseButton()}
{renderBackButton()}
{appendLeft?.()}
{renderLeft?.()}
</div>
<div ref={centerRef} className={css.center}>
<div
Expand All @@ -321,7 +322,7 @@ const AppBar = forwardRef<HTMLDivElement, AppBarProps>(
</div>
</div>
<div className={css.right}>
{appendRight?.()}
{renderRight?.()}
{closeButtonLocation === "right" && renderCloseButton()}
</div>
</div>
Expand Down
13 changes: 11 additions & 2 deletions extensions/plugin-basic-ui/src/components/AppScreen.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,24 @@ export const paper = recipe({
},
],
},
presentModalFullScreen: {
true: {
modalPresentationStyle: {
fullScreen: {
selectors: {
[`${cupertino} &`]: {
transform: "translate3d(0, 100%, 0)",
},
},
},
},
activityEnterStyle: {
slideInLeft: {
selectors: {
[`${android} &`]: {
transform: "translate3d(50%, 0, 0)",
},
},
},
},
},
});

Expand Down
Loading

0 comments on commit fd09426

Please sign in to comment.