Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/fluffy-squids-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@clerk/astro": patch
---

Move `@clerk/astro/components/*` to `@clerk/astro/components`

```diff
- import { UserProfile } from "@clerk/astro/components/interactive"
+ import { UserProfile } from "@clerk/astro/components"

- import { Protect } from "@clerk/astro/components/control"
+ import { Protect } from "@clerk/astro/components"

- import { SignInButton } from "@clerk/astro/components/unstyled"
+ import { SignInButton } from "@clerk/astro/components"
```
3 changes: 1 addition & 2 deletions integration/templates/astro-node/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ interface Props {

const { title } = Astro.props;

import { SignedIn, SignedOut } from "@clerk/astro/components/control";
import { UserButton } from "@clerk/astro/components/interactive";
import { SignedIn, SignedOut, UserButton } from "@clerk/astro/components";
import { LanguagePicker } from "../components/LanguagePicker";
---

Expand Down
2 changes: 1 addition & 1 deletion integration/templates/astro-node/src/pages/discover.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { OrganizationList } from "@clerk/astro/components/interactive";
import { OrganizationList } from "@clerk/astro/components";
import Layout from "../layouts/Layout.astro";
---

Expand Down
3 changes: 1 addition & 2 deletions integration/templates/astro-node/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
import SignOutButton from "../lib/astro-components/SignOutButton.astro";

import { SignedIn, SignedOut } from "@clerk/astro/components/control";
import { OrganizationSwitcher } from "@clerk/astro/components/interactive";
import { SignedIn, SignedOut, OrganizationSwitcher } from "@clerk/astro/components";
---

<Layout title="Welcome to Astro.">
Expand Down
19 changes: 0 additions & 19 deletions integration/templates/astro-node/src/pages/only-admins-react.astro

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { Protect } from "@clerk/astro/components/control";
import { Protect } from "@clerk/astro/components";
import Layout from "../layouts/Layout.astro";
---

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { Protect } from "@clerk/astro/components/control";
import { Protect } from "@clerk/astro/components";
import Layout from "../layouts/Layout.astro";
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {
OrganizationSwitcher,
OrganizationProfile,
} from "@clerk/astro/components/interactive";
} from "@clerk/astro/components";
import Layout from "../layouts/Layout.astro";
import Streaming from "../layouts/Streaming.astro";
---
Expand Down
2 changes: 1 addition & 1 deletion integration/templates/astro-node/src/pages/sign-in.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { SignIn } from "@clerk/astro/components/interactive";
import { SignIn } from "@clerk/astro/components";
import Layout from "../layouts/Layout.astro";
---

Expand Down
2 changes: 1 addition & 1 deletion integration/templates/astro-node/src/pages/user.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { UserProfile } from "@clerk/astro/components/interactive";
import { UserProfile } from "@clerk/astro/components";
import Layout from "../layouts/Layout.astro";
import StreamUser from "../components/StreamUser.astro";
---
Expand Down
1 change: 1 addition & 0 deletions packages/astro/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
rules: {
'import/no-unresolved': ['error', { ignore: ['^#'] }],
},
ignorePatterns: ['src/astro-components/index.ts'],
overrides: [
{
files: ['./env.d.ts'],
Expand Down
8 changes: 1 addition & 7 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,7 @@
"import": "./dist/server/index.js"
},
"./env": "./env.d.ts",
"./components/control": "./components/control/index.ts",
"./components/control/*": "./components/control/*",
"./components/interactive": "./components/interactive/index.ts",
"./components/interactive/*": "./components/interactive/*",
"./components/unstyled": "./components/unstyled/index.ts",
"./components/unstyled/*": "./components/unstyled/*",
"./components/*": "./components/*",
"./components": "./components/index.ts",

@wobsoriano wobsoriano Jul 12, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh this is so much easier to grasp <3

"./package.json": "./package.json"
},
"imports": {
Expand Down
9 changes: 0 additions & 9 deletions packages/astro/src/astro-components/control/index.ts

This file was deleted.

25 changes: 25 additions & 0 deletions packages/astro/src/astro-components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Control Components
*/
export { default as SignedIn } from './control/SignedIn.astro';
export { default as SignedOut } from './control/SignedOut.astro';
export { default as Protect } from './control/Protect.astro';

/**
* Unstyled Components
*/
export { default as SignInButton } from './unstyled/SignInButton.astro';
export { default as SignUpButton } from './unstyled/SignUpButton.astro';
export { default as SignOutButton } from './unstyled/SignOutButton.astro';

/**
* UI Components
*/
export { default as SignIn } from './interactive/SignIn.astro';
export { default as SignUp } from './interactive/SignUp.astro';
export { default as UserButton } from './interactive/UserButton.astro';
export { default as UserProfile } from './interactive/UserProfile.astro';
export { default as OrganizationProfile } from './interactive/OrganizationProfile.astro';
export { default as OrganizationSwitcher } from './interactive/OrganizationSwitcher.astro';
export { default as OrganizationList } from './interactive/OrganizationList.astro';
export { default as GoogleOneTap } from './interactive/GoogleOneTap.astro';
18 changes: 0 additions & 18 deletions packages/astro/src/astro-components/interactive/index.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/astro/src/astro-components/unstyled/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/astro/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
"declarationDir": "dist/types",
"noUncheckedIndexedAccess": true
},
"exclude": ["dist", "build", "node_modules"]
"exclude": ["dist", "build", "node_modules", "src/astro-components"]
}