Skip to content

Commit c19bb3a

Browse files
authored
Revert "Demo floating window" (#692)
Reverts #678
1 parent c7137b6 commit c19bb3a

4 files changed

Lines changed: 14 additions & 163 deletions

File tree

examples/demo/src/app/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DemoFloatingWindow, StackProvider, StackTheme } from "@stackframe/stack";
1+
import { StackProvider, StackTheme } from "@stackframe/stack";
22
import { Metadata } from "next";
33
import React from "react";
44
import Header from "src/components/header";
@@ -23,7 +23,6 @@ export default function RootLayout({
2323
<StackProvider app={stackServerApp}>
2424
<StackTheme>
2525
<Provider>
26-
<DemoFloatingWindow />
2726
<div className="flex flex-col h-screen">
2827
<Header />
2928
<div className="flex flex-grow">

packages/init-stack/src/index.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ async function getUpdatedLayout(originalLayout: string): Promise<LayoutResult |
734734
const importInsertLocationM1 =
735735
firstImportLocationM1 ?? (hasStringAsFirstLine ? layout.indexOf("\n") : -1);
736736
const importInsertLocation = importInsertLocationM1 + 1;
737-
const importStatement = `import { StackProvider, StackTheme, DemoFloatingWindow } from "@stackframe/stack";\nimport { stackServerApp } from "../stack";\n`;
737+
const importStatement = `import { StackProvider, StackTheme } from "@stackframe/stack";\nimport { stackServerApp } from "../stack";\n`;
738738
layout =
739739
layout.slice(0, importInsertLocation) +
740740
importStatement +
@@ -751,7 +751,17 @@ async function getUpdatedLayout(originalLayout: string): Promise<LayoutResult |
751751
return undefined;
752752
}
753753

754-
const insertOpen = "<StackProvider app={stackServerApp}><StackTheme><DemoFloatingWindow />";
754+
const lines = layout.split("\n");
755+
const [bodyOpenEndLine, bodyOpenEndIndexInLine] = getLineIndex(
756+
lines,
757+
bodyOpenEndIndex
758+
);
759+
const [bodyCloseStartLine, bodyCloseStartIndexInLine] = getLineIndex(
760+
lines,
761+
bodyCloseStartIndex
762+
);
763+
764+
const insertOpen = "<StackProvider app={stackServerApp}><StackTheme>";
755765
const insertClose = "</StackTheme></StackProvider>";
756766

757767
layout =

packages/template/src/components/demo-floating-window.tsx

Lines changed: 0 additions & 156 deletions
This file was deleted.

packages/template/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export { StackTheme } from './providers/theme-provider';
88

99
export { AccountSettings } from "./components-page/account-settings";
1010
export { AuthPage } from "./components-page/auth-page";
11-
export { CliAuthConfirmation } from "./components-page/cli-auth-confirm";
1211
export { EmailVerification } from "./components-page/email-verification";
1312
export { ForgotPassword } from "./components-page/forgot-password";
1413
export { PasswordReset } from "./components-page/password-reset";
@@ -23,6 +22,5 @@ export { OAuthButton } from "./components/oauth-button";
2322
export { OAuthButtonGroup } from "./components/oauth-button-group";
2423
export { SelectedTeamSwitcher } from "./components/selected-team-switcher";
2524
export { UserButton } from "./components/user-button";
26-
27-
export { DemoFloatingWindow } from "./components/demo-floating-window";
25+
export { CliAuthConfirmation } from "./components-page/cli-auth-confirm";
2826
// END_PLATFORM

0 commit comments

Comments
 (0)