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
5 changes: 5 additions & 0 deletions .changeset/fresh-turkeys-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Resolve type issues when importing `@clerk/clerk-js` directly
3 changes: 1 addition & 2 deletions packages/clerk-js/src/core/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ import type {
UserResource,
} from '@clerk/types';

import type { MountComponentRenderer } from '~ui/Components';

import type { MountComponentRenderer } from '../ui/Components';
import {
appendAsQueryParams,
buildURL,
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/emotion.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line no-restricted-imports
import '@emotion/react';

import type { InternalTheme } from '~ui/foundations';
import type { InternalTheme } from './ui/foundations';

declare module '@emotion/react' {
export interface Theme extends InternalTheme {}
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/index.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'regenerator-runtime/runtime';

import { Clerk } from './core/clerk';

import { mountComponentRenderer } from '~ui/Components';
import { mountComponentRenderer } from './ui/Components';

Clerk.mountComponentRenderer = mountComponentRenderer;

Expand Down
3 changes: 1 addition & 2 deletions packages/clerk-js/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'regenerator-runtime/runtime';

import { mountComponentRenderer } from '~ui/Components';

import { Clerk } from './core/clerk';
import { mountComponentRenderer } from './ui/Components';

export * from './core/resources/Error';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import type { ActiveSessionResource } from '@clerk/types';

import type { ThemableCssProp } from '~ui/styledSystem/types';

import type { ElementDescriptor, ElementId } from '../../../ui/customizables/elementDescriptors';
import type { LocalizationKey } from '../../customizables';
import { descriptors, Flex, localizationKeys } from '../../customizables';
import { Action, Actions, PreviewButton, SmallAction, SmallActions, UserPreview } from '../../elements';
import { Add, CogFilled, SignOut, SwitchArrowRight } from '../../icons';
import type { ThemableCssProp } from '../../styledSystem';

type SingleSessionActionsProps = {
handleManageAccountClicked: () => Promise<unknown> | void;
Expand Down
5 changes: 1 addition & 4 deletions packages/clerk-js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
"useUnknownInCatchVariables": false,
"declaration": false,
"jsx": "react-jsx",
"jsxImportSource": "@emotion/react",
"paths": {
"~ui/*": ["./ui/*"]
}
"jsxImportSource": "@emotion/react"
},
"include": [
"src/index.ts",
Expand Down
3 changes: 0 additions & 3 deletions packages/clerk-js/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ const common = ({ mode }) => {
// Attempt to resolve these extensions in order
// @see https://webpack.js.org/configuration/resolve/#resolveextensions
extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx'],
alias: {
'~ui': './ui',
},
},
plugins: [
new webpack.DefinePlugin({
Expand Down