@wasp.sh/wasp-cli-darwin-x64-unknown 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/Cli/starters/README.md +2 -0
- package/data/Cli/starters/basic/README.md +3 -3
- package/data/Cli/starters/basic/src/tags/components/CreateTagForm.tsx +2 -3
- package/data/Cli/starters/basic/vite.config.ts +0 -3
- package/data/Cli/starters/minimal/package.json +4 -1
- package/data/Cli/starters/minimal/vite.config.ts +0 -3
- package/data/Cli/starters/skeleton/AGENTS.md +6 -0
- package/data/Cli/starters/skeleton/CLAUDE.md +6 -0
- package/data/Cli/starters/skeleton/tsconfig.src.json +1 -11
- package/data/Generator/libs/auth/wasp.sh-lib-auth-0.26.0.tgz +0 -0
- package/data/Generator/libs/sdk-core/node_modules/@wasp.sh/lib-auth/wasp.sh-lib-auth-0.26.0.tgz +0 -0
- package/data/Generator/libs/sdk-core/wasp.sh-lib-sdk-core-0.26.0.tgz +0 -0
- package/data/Generator/libs/vite-ssr/{wasp.sh-lib-vite-ssr-0.25.0.tgz → wasp.sh-lib-vite-ssr-0.26.0.tgz} +0 -0
- package/data/Generator/templates/Dockerfile +1 -0
- package/data/Generator/templates/sdk/wasp/api/index.ts +5 -86
- package/data/Generator/templates/sdk/wasp/auth/email/actions/login.ts +2 -2
- package/data/Generator/templates/sdk/wasp/auth/email/actions/passwordReset.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/email/actions/signup.ts +7 -6
- package/data/Generator/templates/sdk/wasp/auth/email/actions/verifyEmail.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/Auth.tsx +12 -6
- package/data/Generator/templates/sdk/wasp/auth/forms/ForgotPassword.tsx +2 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/Login.tsx +2 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/ResetPassword.tsx +2 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/Signup.tsx +5 -5
- package/data/Generator/templates/sdk/wasp/auth/forms/VerifyEmail.tsx +2 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/common/LoginSignupForm.tsx +34 -33
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/DummyEmailSenderNotice.module.css +11 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/DummyEmailSenderNotice.tsx +17 -0
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/ForgotPasswordForm.tsx +9 -13
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/ResetPasswordForm.tsx +8 -9
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/VerifyEmailForm.tsx +4 -8
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/email/useEmail.ts +5 -5
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/usernameAndPassword/useUsernameAndPassword.ts +6 -5
- package/data/Generator/templates/sdk/wasp/auth/forms/types.ts +0 -59
- package/data/Generator/templates/sdk/wasp/auth/helpers/_Provider.tsx +2 -2
- package/data/Generator/templates/sdk/wasp/auth/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/logout.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/providers/index.ts +4 -4
- package/data/Generator/templates/sdk/wasp/auth/providers/types.ts +20 -24
- package/data/Generator/templates/sdk/wasp/auth/useAuth.ts +5 -5
- package/data/Generator/templates/sdk/wasp/auth/user.ts +147 -14
- package/data/Generator/templates/sdk/wasp/auth/username/actions/login.ts +2 -2
- package/data/Generator/templates/sdk/wasp/auth/username/actions/signup.ts +6 -5
- package/data/Generator/templates/sdk/wasp/auth/validation.ts +1 -83
- package/data/Generator/templates/sdk/wasp/client/app/pages/OAuthCallback.tsx +8 -5
- package/data/Generator/templates/sdk/wasp/client/app/pages/createAuthRequiredPage.jsx +6 -4
- package/data/Generator/templates/sdk/wasp/client/app/router.tsx +2 -2
- package/data/Generator/templates/sdk/wasp/client/auth/ui.ts +2 -2
- package/data/Generator/templates/sdk/wasp/client/auth/username.ts +2 -2
- package/data/Generator/templates/sdk/wasp/client/config.ts +1 -6
- package/data/Generator/templates/sdk/wasp/client/crud/_crud.ts +129 -75
- package/data/Generator/templates/sdk/wasp/client/env/schema.ts +14 -7
- package/data/Generator/templates/sdk/wasp/client/env.ts +4 -3
- package/data/Generator/templates/sdk/wasp/client/index.ts +3 -12
- package/data/Generator/templates/sdk/wasp/client/operations/actions/core.ts +14 -10
- package/data/Generator/templates/sdk/wasp/client/operations/actions/index.ts +7 -4
- package/data/Generator/templates/sdk/wasp/client/operations/index.ts +5 -5
- package/data/Generator/templates/sdk/wasp/client/operations/internal/index.ts +1 -8
- package/data/Generator/templates/sdk/wasp/client/operations/queries/core.ts +13 -55
- package/data/Generator/templates/sdk/wasp/client/operations/queries/index.ts +7 -7
- package/data/Generator/templates/sdk/wasp/client/router/Link.tsx +8 -8
- package/data/Generator/templates/sdk/wasp/client/router/NavLink.tsx +8 -8
- package/data/Generator/templates/sdk/wasp/client/router/index.ts +15 -15
- package/data/Generator/templates/sdk/wasp/client/test/index.ts +2 -1
- package/data/Generator/templates/sdk/wasp/client/test/vitest/helpers.tsx +5 -36
- package/data/Generator/templates/sdk/wasp/client/vite/index.ts +2 -1
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/virtualUserModules.ts +43 -0
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/{virtualModules.ts → virtualWaspModules.ts} +4 -4
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/wasp.ts +17 -14
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/waspConfig.ts +60 -18
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/client-entry.tsx +1 -1
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/routes.tsx +1 -1
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/ssr-entry.tsx +1 -1
- package/data/Generator/templates/sdk/wasp/client/webSocket/WebSocketProvider.tsx +3 -3
- package/data/Generator/templates/sdk/wasp/client/webSocket/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/core/serialization/index.ts +2 -47
- package/data/Generator/templates/sdk/wasp/core/serialization/prisma.ts +0 -1
- package/data/Generator/templates/sdk/wasp/entities/index.ts +6 -6
- package/data/Generator/templates/sdk/wasp/env/index.ts +1 -9
- package/data/Generator/templates/sdk/wasp/package.json +150 -104
- package/data/Generator/templates/sdk/wasp/server/_types/index.ts +8 -10
- package/data/Generator/templates/sdk/wasp/server/_types/taggedEntities.ts +4 -4
- package/data/Generator/templates/sdk/wasp/server/api/index.ts +5 -5
- package/data/Generator/templates/sdk/wasp/server/auth/email/index.ts +2 -12
- package/data/Generator/templates/sdk/wasp/server/auth/email/utils.ts +8 -30
- package/data/Generator/templates/sdk/wasp/server/auth/hooks.ts +5 -2
- package/data/Generator/templates/sdk/wasp/server/auth/index.ts +3 -3
- package/data/Generator/templates/sdk/wasp/{auth → server/auth}/jwt.ts +1 -1
- package/data/Generator/templates/sdk/wasp/{auth → server/auth}/lucia.ts +4 -4
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/oneTimeCode.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/discord.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/github.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/google.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/keycloak.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/microsoft.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/providers/slack.ts +1 -1
- package/data/Generator/templates/sdk/wasp/{auth → server/auth}/session.ts +17 -6
- package/data/Generator/templates/sdk/wasp/{auth → server/auth}/utils.ts +40 -183
- package/data/Generator/templates/sdk/wasp/server/config.ts +1 -1
- package/data/Generator/templates/sdk/wasp/{core → server/core}/auth.ts +3 -3
- package/data/Generator/templates/sdk/wasp/server/crud/_operationTypes.ts +16 -63
- package/data/Generator/templates/sdk/wasp/server/dbClient.ts +15 -17
- package/data/Generator/templates/sdk/wasp/server/email/core/helpers.ts +3 -20
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/dummy.ts +2 -2
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/resend.ts +2 -1
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/smtp.ts +2 -1
- package/data/Generator/templates/sdk/wasp/server/email/core/types.ts +2 -45
- package/data/Generator/templates/sdk/wasp/server/email/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/env.ts +20 -11
- package/data/Generator/templates/sdk/wasp/server/index.ts +3 -3
- package/data/Generator/templates/sdk/wasp/server/jobs/_job.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/pgBossJob.ts +4 -4
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/types.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/middleware/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/operations/actions/index.ts +14 -8
- package/data/Generator/templates/sdk/wasp/server/operations/actions/types.ts +5 -5
- package/data/Generator/templates/sdk/wasp/server/operations/queries/index.ts +14 -8
- package/data/Generator/templates/sdk/wasp/server/operations/queries/types.ts +5 -5
- package/data/Generator/templates/sdk/wasp/server/operations/wrappers.ts +40 -14
- package/data/Generator/templates/sdk/wasp/server/types/index.ts +1 -11
- package/data/Generator/templates/sdk/wasp/server/utils.ts +5 -20
- package/data/Generator/templates/sdk/wasp/server/webSocket/index.ts +7 -7
- package/data/Generator/templates/sdk/wasp/tsconfig.json +20 -46
- package/data/Generator/templates/sdk/wasp/types/index.ts +8 -0
- package/data/Generator/templates/sdk/wasp/types/register.ts +21 -0
- package/data/Generator/templates/sdk/wasp/vite-env.d.ts +0 -9
- package/data/Generator/templates/sdk/wasp/wasp-ssr.d.ts +8 -0
- package/data/Generator/templates/sdk/wasp/wasp-user-virtual-modules.d.ts +20 -0
- package/data/Generator/templates/server/package.json +2 -1
- package/data/Generator/templates/server/rollup.config.js +2 -43
- package/data/Generator/templates/server/rollup.dbSeed.config.js +3 -0
- package/data/Generator/templates/server/src/app.js +2 -2
- package/data/Generator/templates/server/src/auth/providers/config/email.ts +5 -5
- package/data/Generator/templates/server/src/auth/providers/email/login.ts +4 -4
- package/data/Generator/templates/server/src/auth/providers/email/requestPasswordReset.ts +4 -4
- package/data/Generator/templates/server/src/auth/providers/email/resetPassword.ts +13 -5
- package/data/Generator/templates/server/src/auth/providers/email/signup.ts +29 -18
- package/data/Generator/templates/server/src/auth/providers/email/verifyEmail.ts +7 -2
- package/data/Generator/templates/server/src/auth/providers/oauth/cookies.ts +5 -1
- package/data/Generator/templates/server/src/auth/providers/oauth/handler.ts +1 -1
- package/data/Generator/templates/server/src/auth/providers/oauth/oneTimeCode.ts +2 -2
- package/data/Generator/templates/server/src/auth/providers/oauth/state.ts +55 -13
- package/data/Generator/templates/server/src/auth/providers/oauth/user.ts +6 -3
- package/data/Generator/templates/server/src/auth/providers/username/login.ts +4 -4
- package/data/Generator/templates/server/src/auth/providers/username/signup.ts +12 -4
- package/data/Generator/templates/server/src/createRollupBundle.js +47 -0
- package/data/Generator/templates/server/src/crud/_operations.ts +16 -16
- package/data/Generator/templates/server/src/plugins/virtualUserModules.js +40 -0
- package/data/Generator/templates/server/src/routes/apis/index.ts +3 -3
- package/data/Generator/templates/server/src/routes/auth/index.js +1 -1
- package/data/Generator/templates/server/src/routes/auth/logout.ts +2 -2
- package/data/Generator/templates/server/src/routes/crud/_crud.ts +1 -1
- package/data/Generator/templates/server/src/routes/index.js +18 -18
- package/data/Generator/templates/server/src/routes/operations/index.js +1 -1
- package/data/Generator/templates/server/src/webSocket/initialization.ts +1 -1
- package/data/Generator/templates/server/tsconfig.json +7 -13
- package/data/Generator/templates/types/app/sdk/register.ts +57 -0
- package/data/packages/deploy/dist/common/cliVersion.js +17 -0
- package/data/packages/deploy/dist/common/waspProject.js +1 -1
- package/data/packages/deploy/dist/common/zx.js +24 -6
- package/data/packages/deploy/dist/providers/fly/commands/createDb/createDb.js +13 -5
- package/data/packages/deploy/dist/providers/fly/flyCli.js +29 -17
- package/data/packages/deploy/dist/providers/fly/index.js +16 -8
- package/data/packages/deploy/dist/providers/railway/commands/setup/setup.js +19 -31
- package/data/packages/deploy/dist/providers/railway/index.js +11 -2
- package/data/packages/deploy/dist/providers/railway/jsonOutputSchemas.js +19 -34
- package/data/packages/deploy/dist/providers/railway/railwayCli.js +11 -20
- package/data/packages/deploy/dist/providers/railway/railwayEnvironment/cli.js +20 -0
- package/data/packages/deploy/dist/providers/railway/railwayProject/RailwayProject.js +4 -1
- package/data/packages/deploy/dist/providers/railway/railwayProject/cli.js +6 -14
- package/data/packages/deploy/dist/providers/railway/railwayService/database.js +88 -0
- package/data/packages/deploy/dist/providers/railway/railwayService/deployment.js +12 -25
- package/data/packages/deploy/dist/providers/railway/railwayService/nameGenerator.js +5 -4
- package/data/packages/deploy/dist/providers/railway/railwayService/serviceInstance.js +48 -0
- package/data/packages/deploy/dist/providers/railway/railwayService/url.js +9 -30
- package/data/packages/deploy/package-lock.json +2 -2
- package/data/packages/deploy/package.json +1 -1
- package/data/packages/prisma/package-lock.json +2 -2
- package/data/packages/prisma/package.json +1 -1
- package/data/packages/spec/dist/__tests__/spec/mapApp.unit.test.js +19 -15
- package/data/packages/spec/dist/__tests__/spec/tsAppSpec.test-d.js +6 -0
- package/data/packages/spec/dist/src/appSpec.d.ts +15 -2
- package/data/packages/spec/dist/src/appSpec.d.ts.map +1 -1
- package/data/packages/spec/dist/src/spec/mapper/app.d.ts +1 -0
- package/data/packages/spec/dist/src/spec/mapper/app.d.ts.map +1 -1
- package/data/packages/spec/dist/src/spec/mapper/app.js +8 -2
- package/data/packages/spec/dist/src/spec/mapper/context.js +4 -4
- package/data/packages/spec/dist/src/spec/mapper/specElements.js +9 -9
- package/data/packages/spec/dist/src/spec/publicApi/constructors.d.ts +11 -11
- package/data/packages/spec/dist/src/spec/publicApi/constructors.js +11 -11
- package/data/packages/spec/dist/src/spec/publicApi/register.d.ts +1 -1
- package/data/packages/spec/dist/src/spec/publicApi/waspSpec.d.ts +58 -38
- package/data/packages/spec/dist/src/spec/publicApi/waspSpec.d.ts.map +1 -1
- package/data/packages/spec/package-lock.json +2 -2
- package/data/packages/spec/package.json +1 -1
- package/data/packages/studio/package-lock.json +15 -23
- package/data/packages/studio/package.json +2 -2
- package/package.json +1 -1
- package/wasp-bin +0 -0
- package/data/Generator/libs/auth/wasp.sh-lib-auth-0.25.0.tgz +0 -0
- package/data/Generator/templates/sdk/wasp/api/events.ts +0 -11
- package/data/Generator/templates/sdk/wasp/auth/email/index.ts +0 -5
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Form.module.css +0 -99
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Form.tsx +0 -74
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Message.module.css +0 -22
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/Message.tsx +0 -34
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/auth-styles.css +0 -30
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialButton.module.css +0 -33
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialButton.tsx +0 -14
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialIcons.module.css +0 -4
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialIcons.tsx +0 -85
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/util.ts +0 -16
- package/data/Generator/templates/sdk/wasp/auth/helpers/user.ts +0 -15
- package/data/Generator/templates/sdk/wasp/auth/responseSchemas.ts +0 -10
- package/data/Generator/templates/sdk/wasp/auth/types.ts +0 -2
- package/data/Generator/templates/sdk/wasp/auth/username/index.ts +0 -2
- package/data/Generator/templates/sdk/wasp/client/app/components/DefaultRootErrorBoundary.tsx +0 -16
- package/data/Generator/templates/sdk/wasp/client/app/components/FullPageWrapper.tsx +0 -21
- package/data/Generator/templates/sdk/wasp/client/app/components/Loader.module.css +0 -37
- package/data/Generator/templates/sdk/wasp/client/app/components/Loader.tsx +0 -12
- package/data/Generator/templates/sdk/wasp/client/app/components/Message.tsx +0 -86
- package/data/Generator/templates/sdk/wasp/client/crud/operationsHelpers.ts +0 -21
- package/data/Generator/templates/sdk/wasp/client/hooks.ts +0 -19
- package/data/Generator/templates/sdk/wasp/client/operations/hooks.ts +0 -347
- package/data/Generator/templates/sdk/wasp/client/operations/internal/resources.js +0 -85
- package/data/Generator/templates/sdk/wasp/client/operations/internal/updateHandlersMap.js +0 -37
- package/data/Generator/templates/sdk/wasp/client/operations/queryClient.ts +0 -34
- package/data/Generator/templates/sdk/wasp/client/operations/rpc.ts +0 -96
- package/data/Generator/templates/sdk/wasp/client/router/linkHelpers.ts +0 -48
- package/data/Generator/templates/sdk/wasp/client/router/types.ts +0 -98
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/detectServerImports.ts +0 -50
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/envFile.ts +0 -112
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/typescriptCheck.ts +0 -36
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/validateEnv.ts +0 -88
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/resolver.ts +0 -35
- package/data/Generator/templates/sdk/wasp/core/serialization/custom-register.ts +0 -21
- package/data/Generator/templates/sdk/wasp/core/storage.ts +0 -73
- package/data/Generator/templates/sdk/wasp/env/validation.ts +0 -44
- package/data/Generator/templates/sdk/wasp/server/HttpError.ts +0 -30
- package/data/Generator/templates/sdk/wasp/server/auth/oauth/provider.ts +0 -20
- package/data/Generator/templates/sdk/wasp/server/auth/user.ts +0 -154
- package/data/Generator/templates/sdk/wasp/server/auth/username.ts +0 -1
- package/data/Generator/templates/sdk/wasp/server/jobs/core/job.ts +0 -28
- package/data/Generator/templates/sdk/wasp/server/middleware/globalMiddleware.ts +0 -8
- package/data/Generator/templates/sdk/wasp/universal/ansiColors.ts +0 -58
- package/data/Generator/templates/sdk/wasp/universal/predicates.ts +0 -3
- package/data/Generator/templates/sdk/wasp/universal/types.ts +0 -74
- package/data/Generator/templates/sdk/wasp/universal/url.ts +0 -9
- package/data/Generator/templates/sdk/wasp/universal/validators.ts +0 -21
- package/data/packages/ts-inspect/dist/exports.js +0 -82
- package/data/packages/ts-inspect/dist/index.js +0 -28
- package/data/packages/ts-inspect/package-lock.json +0 -4724
- package/data/packages/ts-inspect/package.json +0 -31
- /package/data/Generator/templates/sdk/wasp/{auth → server/auth}/password.ts +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ComponentRef, forwardRef } from "react";
|
|
2
|
-
import styles from "./Form.module.css";
|
|
3
|
-
import "./auth-styles.css";
|
|
4
|
-
import { clsx } from "./util";
|
|
5
|
-
|
|
6
|
-
// PRIVATE API
|
|
7
|
-
export const Form = forwardRef<
|
|
8
|
-
ComponentRef<"form">,
|
|
9
|
-
ComponentPropsWithoutRef<"form">
|
|
10
|
-
>(({ children, className, ...props }, ref) => (
|
|
11
|
-
<form className={clsx(styles.form, className)} {...props} ref={ref}>
|
|
12
|
-
{children}
|
|
13
|
-
</form>
|
|
14
|
-
));
|
|
15
|
-
|
|
16
|
-
// PUBLIC API
|
|
17
|
-
export const FormItemGroup = forwardRef<
|
|
18
|
-
ComponentRef<"div">,
|
|
19
|
-
ComponentPropsWithoutRef<"div">
|
|
20
|
-
>(({ children, className, ...props }, ref) => (
|
|
21
|
-
<div className={clsx(styles.formItemGroup, className)} {...props} ref={ref}>
|
|
22
|
-
{children}
|
|
23
|
-
</div>
|
|
24
|
-
));
|
|
25
|
-
|
|
26
|
-
// PUBLIC API
|
|
27
|
-
export const FormLabel = forwardRef<
|
|
28
|
-
ComponentRef<"label">,
|
|
29
|
-
ComponentPropsWithoutRef<"label">
|
|
30
|
-
>(({ children, className, ...props }, ref) => (
|
|
31
|
-
<label className={clsx(styles.formLabel, className)} {...props} ref={ref}>
|
|
32
|
-
{children}
|
|
33
|
-
</label>
|
|
34
|
-
));
|
|
35
|
-
|
|
36
|
-
// PUBLIC API
|
|
37
|
-
export const FormInput = forwardRef<
|
|
38
|
-
ComponentRef<"input">,
|
|
39
|
-
ComponentPropsWithoutRef<"input">
|
|
40
|
-
>(({ className, ...props }, ref) => (
|
|
41
|
-
<input className={clsx(styles.formInput, className)} {...props} ref={ref} />
|
|
42
|
-
));
|
|
43
|
-
|
|
44
|
-
// PUBLIC API)
|
|
45
|
-
export const FormTextarea = forwardRef<
|
|
46
|
-
ComponentRef<"textarea">,
|
|
47
|
-
ComponentPropsWithoutRef<"textarea">
|
|
48
|
-
>(({ className, ...props }, ref) => (
|
|
49
|
-
<textarea
|
|
50
|
-
className={clsx(styles.formTextarea, className)}
|
|
51
|
-
{...props}
|
|
52
|
-
ref={ref}
|
|
53
|
-
/>
|
|
54
|
-
));
|
|
55
|
-
|
|
56
|
-
// PUBLIC API)
|
|
57
|
-
export const FormError = forwardRef<
|
|
58
|
-
ComponentRef<"div">,
|
|
59
|
-
ComponentPropsWithoutRef<"div">
|
|
60
|
-
>(({ children, className, ...props }, ref) => (
|
|
61
|
-
<div className={clsx(styles.formError, className)} {...props} ref={ref}>
|
|
62
|
-
{children}
|
|
63
|
-
</div>
|
|
64
|
-
));
|
|
65
|
-
|
|
66
|
-
// PRIVATE API
|
|
67
|
-
export const SubmitButton = forwardRef<
|
|
68
|
-
ComponentRef<"button">,
|
|
69
|
-
ComponentPropsWithoutRef<"button">
|
|
70
|
-
>(({ children, className, ...props }, ref) => (
|
|
71
|
-
<button className={clsx(styles.submitButton, className)} {...props} ref={ref}>
|
|
72
|
-
{children}
|
|
73
|
-
</button>
|
|
74
|
-
));
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.message {
|
|
2
|
-
padding: 0.5rem 0.75rem;
|
|
3
|
-
border-radius: 0.375rem;
|
|
4
|
-
margin-top: 1rem;
|
|
5
|
-
background: var(--color-gray400);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.messageError {
|
|
9
|
-
padding: 0.5rem 0.75rem;
|
|
10
|
-
border-radius: 0.375rem;
|
|
11
|
-
margin-top: 1rem;
|
|
12
|
-
background: var(--color-errorBackground);
|
|
13
|
-
color: var(--color-errorText);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.messageSuccess {
|
|
17
|
-
padding: 0.5rem 0.75rem;
|
|
18
|
-
border-radius: 0.375rem;
|
|
19
|
-
margin-top: 1rem;
|
|
20
|
-
background: var(--color-successBackground);
|
|
21
|
-
color: var(--color-successText);
|
|
22
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ComponentRef, forwardRef } from "react";
|
|
2
|
-
import styles from "./Message.module.css";
|
|
3
|
-
import "./auth-styles.css";
|
|
4
|
-
import { clsx } from "./util";
|
|
5
|
-
|
|
6
|
-
// PRIVATE API
|
|
7
|
-
export const Message = forwardRef<
|
|
8
|
-
ComponentRef<"div">,
|
|
9
|
-
ComponentPropsWithoutRef<"div">
|
|
10
|
-
>(({ children, className, ...props }, ref) => (
|
|
11
|
-
<div className={clsx(styles.message, className)} {...props} ref={ref}>
|
|
12
|
-
{children}
|
|
13
|
-
</div>
|
|
14
|
-
));
|
|
15
|
-
|
|
16
|
-
// PRIVATE API
|
|
17
|
-
export const MessageError = forwardRef<
|
|
18
|
-
ComponentRef<"div">,
|
|
19
|
-
ComponentPropsWithoutRef<"div">
|
|
20
|
-
>(({ children, className, ...props }, ref) => (
|
|
21
|
-
<div className={clsx(styles.messageError, className)} {...props} ref={ref}>
|
|
22
|
-
{children}
|
|
23
|
-
</div>
|
|
24
|
-
));
|
|
25
|
-
|
|
26
|
-
// PRIVATE API
|
|
27
|
-
export const MessageSuccess = forwardRef<
|
|
28
|
-
ComponentRef<"div">,
|
|
29
|
-
ComponentPropsWithoutRef<"div">
|
|
30
|
-
>(({ children, className, ...props }, ref) => (
|
|
31
|
-
<div className={clsx(styles.messageSuccess, className)} {...props} ref={ref}>
|
|
32
|
-
{children}
|
|
33
|
-
</div>
|
|
34
|
-
));
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* ATTENTION: Keep this list in sync with the one at ../types.ts */
|
|
3
|
-
/*
|
|
4
|
-
This is the list of CSS variables that are used in the auth forms, and that
|
|
5
|
-
the user can override.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/* Colors */
|
|
9
|
-
--color-waspYellow: #f5c842;
|
|
10
|
-
--color-gray700: #a1a5ab;
|
|
11
|
-
--color-gray600: #d1d5db;
|
|
12
|
-
--color-gray500: gainsboro;
|
|
13
|
-
--color-gray400: #f0f0f0;
|
|
14
|
-
--color-red: #FED7D7;
|
|
15
|
-
--color-darkRed: #fa3838;
|
|
16
|
-
--color-green: #C6F6D5;
|
|
17
|
-
|
|
18
|
-
/* Semantic colors */
|
|
19
|
-
--color-brand: var(--color-waspYellow);
|
|
20
|
-
--color-brandAccent: #fccf49;
|
|
21
|
-
--color-errorBackground: var(--color-red);
|
|
22
|
-
--color-errorText: #2D3748;
|
|
23
|
-
--color-successBackground: var(--color-green);
|
|
24
|
-
--color-successText: #2D3748;
|
|
25
|
-
--color-submitButtonText: black;
|
|
26
|
-
--color-formErrorText: var(--color-darkRed);
|
|
27
|
-
|
|
28
|
-
/* Font sizes */
|
|
29
|
-
--font-size-sm: 1rem;
|
|
30
|
-
}
|
package/data/Generator/templates/sdk/wasp/auth/forms/internal/social/SocialButton.module.css
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Using !important with some of the components is a workaround for Tailwind
|
|
3
|
-
CSS's having too much precedence.
|
|
4
|
-
https://github.com/wasp-lang/wasp/issues/1764
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
.socialButton {
|
|
8
|
-
display: flex !important;
|
|
9
|
-
justify-content: center !important;
|
|
10
|
-
cursor: pointer !important;
|
|
11
|
-
/* NOTE(matija): icon is otherwise blue, since that
|
|
12
|
-
is link's default font color. */
|
|
13
|
-
color: inherit !important;
|
|
14
|
-
background-color: #f0f0f0 !important;
|
|
15
|
-
border-radius: 0.375rem !important;
|
|
16
|
-
border-width: 1px !important;
|
|
17
|
-
border-color: var(--color-gray600) !important;
|
|
18
|
-
font-size: 13px !important;
|
|
19
|
-
padding: 0.5rem 0.75rem !important;
|
|
20
|
-
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
|
|
21
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
|
22
|
-
transition-duration: 100ms !important;
|
|
23
|
-
text-decoration: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.socialButton:visited {
|
|
27
|
-
color: inherit !important;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.socialButton:hover {
|
|
31
|
-
background-color: var(--color-gray500) !important;
|
|
32
|
-
color: inherit !important;
|
|
33
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ComponentRef, forwardRef } from "react";
|
|
2
|
-
import "../auth-styles.css";
|
|
3
|
-
import { clsx } from "../util";
|
|
4
|
-
import styles from "./SocialButton.module.css";
|
|
5
|
-
|
|
6
|
-
// PRIVATE API
|
|
7
|
-
export const SocialButton = forwardRef<
|
|
8
|
-
ComponentRef<"a">,
|
|
9
|
-
ComponentPropsWithoutRef<"a">
|
|
10
|
-
>(({ children, className, ...props }, ref) => (
|
|
11
|
-
<a className={clsx(styles.socialButton, className)} {...props} ref={ref}>
|
|
12
|
-
{children}
|
|
13
|
-
</a>
|
|
14
|
-
));
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import '../auth-styles.css'
|
|
2
|
-
import styles from './SocialIcons.module.css'
|
|
3
|
-
|
|
4
|
-
// PRIVATE API
|
|
5
|
-
export const Google = () => (
|
|
6
|
-
<svg
|
|
7
|
-
className={styles.icon}
|
|
8
|
-
aria-hidden="true"
|
|
9
|
-
fill="currentColor"
|
|
10
|
-
viewBox="0 0 24 24"
|
|
11
|
-
>
|
|
12
|
-
<g id="brand" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
13
|
-
<g id="google" fill="#000000" fillRule="nonzero">
|
|
14
|
-
<path
|
|
15
|
-
d="M11.99,13.9 L11.99,10.18 L21.35,10.18 C21.49,10.81 21.6,11.4 21.6,12.23 C21.6,17.94 17.77,22 12,22 C6.48,22 2,17.52 2,12 C2,6.48 6.48,2 12,2 C14.7,2 16.96,2.99 18.69,4.61 L15.85,7.37 C15.13,6.69 13.87,5.89 12,5.89 C8.69,5.89 5.99,8.64 5.99,12.01 C5.99,15.38 8.69,18.13 12,18.13 C15.83,18.13 17.24,15.48 17.5,13.91 L11.99,13.91 L11.99,13.9 Z"
|
|
16
|
-
id="Shape"
|
|
17
|
-
></path>
|
|
18
|
-
</g>
|
|
19
|
-
</g>
|
|
20
|
-
</svg>
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
export const Keycloak = () => (
|
|
24
|
-
<svg
|
|
25
|
-
className={styles.icon}
|
|
26
|
-
aria-hidden="true"
|
|
27
|
-
fill="currentColor"
|
|
28
|
-
viewBox="0 0 559 466"
|
|
29
|
-
>
|
|
30
|
-
<g id="brand" transform="matrix(1,0,0,1,-233.075,-279.1)" fill="#000000" fillRule="nonzero">
|
|
31
|
-
<path
|
|
32
|
-
d="M786.2,395.5L705.6,395.5C704.1,395.5 702.6,394.7 701.9,393.4L637.2,281.2C636.4,279.9 635,279.1 633.4,279.1L369.4,279.1C367.9,279.1 366.4,279.9 365.7,281.2L298.4,397.6L233.6,509.8C232.9,511.1 232.9,512.7 233.6,514.1L298.4,626.3L365.6,742.8C366.3,744.1 367.8,745 369.3,744.9L633.4,744.9C634.9,744.9 636.4,744.1 637.2,742.8L702,630.6C702.7,629.3 704.2,628.4 705.7,628.5L786.3,628.5C789,628.5 791.1,626.3 791.1,623.7L791.1,400.4C791,397.7 788.8,395.5 786.2,395.5ZM477.5,630.6L457.2,665.6C456.9,666.1 456.4,666.6 455.9,666.9C455.3,667.2 454.7,667.4 454,667.4L413.7,667.4C412.3,667.4 411,666.7 410.4,665.4L350.3,561.1L344.4,550.8L322.8,513.9C322.5,513.4 322.3,512.8 322.4,512.1C322.4,511.5 322.6,510.8 322.9,510.3L344.6,472.7L410.5,358.7C411.2,357.5 412.5,356.7 413.8,356.7L454,356.7C454.7,356.7 455.4,356.9 456.1,357.2C456.6,357.5 457.1,357.9 457.4,358.5L477.7,393.7C478.3,394.9 478.2,396.4 477.5,397.5L412.4,510.3C412.1,510.8 412,511.4 412,511.9C412,512.5 412.2,513 412.4,513.5L477.5,626.2C478.4,627.7 478.3,629.3 477.5,630.6ZM679.6,513.9L658,550.8L652.1,561.1L592,665.4C591.3,666.6 590.1,667.4 588.7,667.4L548.4,667.4C547.7,667.4 547.1,667.2 546.5,666.9C546,666.6 545.5,666.2 545.2,665.6L524.9,630.6C524,629.3 524,627.7 524.8,626.4L589.9,513.7C590.2,513.2 590.3,512.6 590.3,512.1C590.3,511.5 590.1,511 589.9,510.5L524.8,397.7C524.1,396.5 524,395.1 524.6,393.9L544.9,358.7C545.2,358.2 545.7,357.7 546.2,357.4C546.8,357 547.5,356.9 548.3,356.9L588.7,356.9C590.1,356.9 591.4,357.6 592,358.9L657.9,472.9L679.6,510.5C679.9,511.1 680.1,511.7 680.1,512.3C680.1,512.7 679.9,513.3 679.6,513.9Z"
|
|
33
|
-
/>
|
|
34
|
-
</g>
|
|
35
|
-
</svg>
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
// PRIVATE API
|
|
39
|
-
export const GitHub = () => (
|
|
40
|
-
<svg
|
|
41
|
-
className={styles.icon}
|
|
42
|
-
aria-hidden="true"
|
|
43
|
-
fill="currentColor"
|
|
44
|
-
viewBox="0 0 20 20"
|
|
45
|
-
>
|
|
46
|
-
<path
|
|
47
|
-
fillRule="evenodd"
|
|
48
|
-
d="M10 0C4.477 0 0 4.484 0 10.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0110 4.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.203 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.942.359.31.678.921.678 1.856 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0020 10.017C20 4.484 15.522 0 10 0z"
|
|
49
|
-
clipRule="evenodd"
|
|
50
|
-
/>
|
|
51
|
-
</svg>
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
export const Discord = () => (
|
|
55
|
-
<svg
|
|
56
|
-
className={styles.icon}
|
|
57
|
-
aria-hidden="true"
|
|
58
|
-
fill="currentColor"
|
|
59
|
-
viewBox="0 0 16 16"
|
|
60
|
-
>
|
|
61
|
-
<path d="M13.545 2.907a13.227 13.227 0 00-3.257-1.011.05.05 0 00-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 00-3.658 0 8.258 8.258 0 00-.412-.833.051.051 0 00-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 00-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 003.995 2.02.05.05 0 00.056-.019c.308-.42.582-.863.818-1.329a.05.05 0 00-.01-.059.051.051 0 00-.018-.011 8.875 8.875 0 01-1.248-.595.05.05 0 01-.02-.066.051.051 0 01.015-.019c.084-.063.168-.129.248-.195a.05.05 0 01.051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 01.053.007c.08.066.164.132.248.195a.051.051 0 01-.004.085 8.254 8.254 0 01-1.249.594.05.05 0 00-.03.03.052.052 0 00.003.041c.24.465.515.909.817 1.329a.05.05 0 00.056.019 13.235 13.235 0 004.001-2.02.049.049 0 00.021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 00-.02-.019zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612z" />
|
|
62
|
-
</svg>
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
export const Slack = () => (
|
|
66
|
-
<svg
|
|
67
|
-
className={styles.icon}
|
|
68
|
-
aria-hidden="true"
|
|
69
|
-
fill="currentColor"
|
|
70
|
-
viewBox="0 0 24 24"
|
|
71
|
-
>
|
|
72
|
-
<path d="M13 10C13 11.1046 13.8954 12 15 12C16.1046 12 17 11.1046 17 10V5C17 3.89543 16.1046 3 15 3C13.8954 3 13 3.89543 13 5V10ZM5 8C3.89543 8 3 8.89543 3 10C3 11.1046 3.89543 12 5 12H10C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8H5ZM15 13C13.8954 13 13 13.8954 13 15C13 16.1046 13.8954 17 15 17H20C21.1046 17 22 16.1046 22 15C22 13.8954 21.1046 13 20 13H15ZM10 22C8.89543 22 8 21.1046 8 20L8 15C8 13.8954 8.89543 13 10 13C11.1046 13 12 13.8954 12 15V20C12 21.1046 11.1046 22 10 22ZM8 5C8 3.89543 8.89543 3 10 3C11.1046 3 12 3.89543 12 5V7H10C8.89543 7 8 6.10457 8 5ZM3 15C3 16.1046 3.89543 17 5 17C6.10457 17 7 16.1046 7 15V13H5C3.89543 13 3 13.8954 3 15ZM17 20C17 21.1046 16.1046 22 15 22C13.8954 22 13 21.1046 13 20V18H15C16.1046 18 17 18.8954 17 20ZM22 10C22 8.89543 21.1046 8 20 8C18.8954 8 18 8.89543 18 10V12H20C21.1046 12 22 11.1046 22 10Z" />
|
|
73
|
-
</svg>
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
export const Microsoft = () => (
|
|
77
|
-
<svg
|
|
78
|
-
className={styles.icon}
|
|
79
|
-
aria-hidden="true"
|
|
80
|
-
fill="currentColor"
|
|
81
|
-
viewBox="0 0 24 24"
|
|
82
|
-
>
|
|
83
|
-
<path d="M2 3h9v9H2zm9 19H2v-9h9zM21 3v9h-9V3zm0 19h-9v-9h9z" />
|
|
84
|
-
</svg>
|
|
85
|
-
)
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from "react"
|
|
2
|
-
|
|
3
|
-
export const clsx = (...classes: (string | undefined)[]) => {
|
|
4
|
-
return classes.filter(Boolean).join(" ");
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const tokenObjToCSSVars = (
|
|
8
|
-
prefix: string,
|
|
9
|
-
tokenObj: Record<string, string | number>,
|
|
10
|
-
): CSSProperties =>
|
|
11
|
-
Object.fromEntries(
|
|
12
|
-
Object.entries(tokenObj).map(([key, value]) => [
|
|
13
|
-
`--${prefix}-${key}`,
|
|
14
|
-
value,
|
|
15
|
-
]),
|
|
16
|
-
);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { setSessionId } from '../../api/index.js'
|
|
2
|
-
import { invalidateAndRemoveQueries } from '../../client/operations/internal/resources.js'
|
|
3
|
-
|
|
4
|
-
// PRIVATE API
|
|
5
|
-
export async function initSession(sessionId: string): Promise<void> {
|
|
6
|
-
setSessionId(sessionId)
|
|
7
|
-
// We need to invalidate queries after login in order to get the correct user
|
|
8
|
-
// data in the React components (using `useAuth`).
|
|
9
|
-
// Redirects after login won't work properly without this.
|
|
10
|
-
|
|
11
|
-
// TODO(filip): We are currently removing all the queries, but we should
|
|
12
|
-
// remove only non-public, user-dependent queries - public queries are
|
|
13
|
-
// expected not to change in respect to the currently logged in user.
|
|
14
|
-
await invalidateAndRemoveQueries()
|
|
15
|
-
}
|
package/data/Generator/templates/sdk/wasp/client/app/components/DefaultRootErrorBoundary.tsx
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useRouteError } from 'react-router'
|
|
2
|
-
|
|
3
|
-
import { FullPageWrapper } from './FullPageWrapper'
|
|
4
|
-
|
|
5
|
-
export function DefaultRootErrorBoundary() {
|
|
6
|
-
const error = useRouteError()
|
|
7
|
-
console.error(error)
|
|
8
|
-
return (
|
|
9
|
-
<FullPageWrapper>
|
|
10
|
-
<div>
|
|
11
|
-
There was an error rendering this page. Check the browser console for
|
|
12
|
-
more information.
|
|
13
|
-
</div>
|
|
14
|
-
</FullPageWrapper>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const wrapperStyles = {
|
|
2
|
-
display: 'flex',
|
|
3
|
-
minHeight: '80vh',
|
|
4
|
-
justifyContent: 'center',
|
|
5
|
-
alignItems: 'center',
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function FullPageWrapper({
|
|
9
|
-
children,
|
|
10
|
-
className,
|
|
11
|
-
}: {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
className?: string;
|
|
14
|
-
}) {
|
|
15
|
-
const classNameWithDefaults = ['wasp-full-page-wrapper', className].filter(Boolean).join(' ');
|
|
16
|
-
return (
|
|
17
|
-
<div className={classNameWithDefaults} style={wrapperStyles}>
|
|
18
|
-
{children}
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.loader {
|
|
2
|
-
color: var(--loader-color, #1a202c);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.loaderCircle {
|
|
6
|
-
display: inline-block;
|
|
7
|
-
border-top: 2px solid currentcolor;
|
|
8
|
-
border-right: 2px solid currentcolor;
|
|
9
|
-
border-bottom: 2px solid transparent;
|
|
10
|
-
border-left: 2px solid transparent;
|
|
11
|
-
border-radius: 99999px;
|
|
12
|
-
animation: fullRotation 0.45s linear infinite;
|
|
13
|
-
width: var(--spinner-size);
|
|
14
|
-
height: var(--spinner-size);
|
|
15
|
-
--spinner-size: var(--loader-spinner-size, 2rem);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.loaderAccessibilityText {
|
|
19
|
-
border: 0px;
|
|
20
|
-
clip: rect(0px, 0px, 0px, 0px);
|
|
21
|
-
width: 1px;
|
|
22
|
-
height: 1px;
|
|
23
|
-
margin: -1px;
|
|
24
|
-
padding: 0px;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
white-space: nowrap;
|
|
27
|
-
position: absolute;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@keyframes fullRotation {
|
|
31
|
-
0% {
|
|
32
|
-
transform: rotate(0deg);
|
|
33
|
-
}
|
|
34
|
-
100% {
|
|
35
|
-
transform: rotate(360deg);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import styles from './Loader.module.css'
|
|
2
|
-
|
|
3
|
-
// Spans a accross the whole screen and displays a spinner in the very middle.
|
|
4
|
-
export function Loader() {
|
|
5
|
-
const loaderClassName = ['wasp-loader', styles.loader].join(' ')
|
|
6
|
-
return (
|
|
7
|
-
<div className={loaderClassName}>
|
|
8
|
-
<div className={styles.loaderCircle} />
|
|
9
|
-
<div className={styles.loaderAccessibilityText}>Loading...</div>
|
|
10
|
-
</div>
|
|
11
|
-
)
|
|
12
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
const commonMessageStyles = {
|
|
2
|
-
borderRadius: '.5rem',
|
|
3
|
-
padding: '1rem',
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const errorMessageStyles = {
|
|
7
|
-
...commonMessageStyles,
|
|
8
|
-
borderColor: 'rgb(240 82 82)',
|
|
9
|
-
backgroundColor: 'rgb(253 232 232)',
|
|
10
|
-
color: 'rgb(200 30 30)',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const loadingMessageStyles = {
|
|
14
|
-
...commonMessageStyles,
|
|
15
|
-
borderColor: 'rgb(107 114 128)',
|
|
16
|
-
backgroundColor: 'rgb(243 244 246)',
|
|
17
|
-
color: 'rgb(55 65 81)',
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const titleStyles = {
|
|
21
|
-
display: 'flex',
|
|
22
|
-
alignItems: 'center',
|
|
23
|
-
gap: '.5rem',
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const subtitleStyles = {
|
|
27
|
-
marginLeft: '1.75rem',
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function MessageError({
|
|
31
|
-
children,
|
|
32
|
-
subtitle,
|
|
33
|
-
}: {
|
|
34
|
-
children: React.ReactNode;
|
|
35
|
-
subtitle?: React.ReactNode;
|
|
36
|
-
}) {
|
|
37
|
-
return (
|
|
38
|
-
<div style={errorMessageStyles}>
|
|
39
|
-
<div>
|
|
40
|
-
<div style={titleStyles}>
|
|
41
|
-
<MessageIcon /> {children}
|
|
42
|
-
</div>
|
|
43
|
-
{subtitle && <div style={subtitleStyles}>{subtitle}</div>}
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function MessageLoading({
|
|
50
|
-
children,
|
|
51
|
-
subtitle,
|
|
52
|
-
}: {
|
|
53
|
-
children: React.ReactNode;
|
|
54
|
-
subtitle?: React.ReactNode;
|
|
55
|
-
}) {
|
|
56
|
-
return (
|
|
57
|
-
<div style={loadingMessageStyles}>
|
|
58
|
-
<div>
|
|
59
|
-
<div style={titleStyles}>
|
|
60
|
-
<MessageIcon /> {children}
|
|
61
|
-
</div>
|
|
62
|
-
{subtitle && <div style={subtitleStyles}>{subtitle}</div>}
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const MessageIcon = () => (
|
|
69
|
-
<svg
|
|
70
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
71
|
-
width="1.25rem"
|
|
72
|
-
height="1.25rem"
|
|
73
|
-
fill="currentColor"
|
|
74
|
-
stroke="currentColor"
|
|
75
|
-
strokeWidth={0}
|
|
76
|
-
aria-hidden="true"
|
|
77
|
-
viewBox="0 0 20 20"
|
|
78
|
-
>
|
|
79
|
-
<path
|
|
80
|
-
fillRule="evenodd"
|
|
81
|
-
stroke="none"
|
|
82
|
-
d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM9 9a1 1 0 0 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2v-3a1 1 0 0 0-1-1H9z"
|
|
83
|
-
clipRule="evenodd"
|
|
84
|
-
/>
|
|
85
|
-
</svg>
|
|
86
|
-
)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useAction, useQuery } from "../operations"
|
|
2
|
-
import type { Query, Action } from "../operations/rpc"
|
|
3
|
-
import type { Tail } from "../../universal/types"
|
|
4
|
-
|
|
5
|
-
// PRIVATE API
|
|
6
|
-
export function makeUseQueryFor<Input, Output>(
|
|
7
|
-
query: Query<Input, Output>
|
|
8
|
-
) {
|
|
9
|
-
return (
|
|
10
|
-
...rest: Tail<Parameters<typeof useQuery<Input, Output>>>
|
|
11
|
-
) => useQuery<Input, Output>(query, ...rest);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// PRIVATE API
|
|
15
|
-
export function makeUseActionFor<Input = unknown, Output = unknown>(
|
|
16
|
-
action: Action<Input, Output>
|
|
17
|
-
) {
|
|
18
|
-
return (
|
|
19
|
-
...rest: Tail<Parameters<typeof useAction<Input, Output>>>
|
|
20
|
-
) => useAction<Input, Output>(action, ...rest);
|
|
21
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
// PRIVATE API (sdk, web-app)
|
|
4
|
-
/**
|
|
5
|
-
* Hook to avoid running effect twice when using React's `StrictMode` in development mode.
|
|
6
|
-
* React renders each component twice in development mode to detect potential effect clean up
|
|
7
|
-
* issues. Wasp relies on some effects triggering only once, for example, OAuth token exchange
|
|
8
|
-
* or e-mail verification.
|
|
9
|
-
*/
|
|
10
|
-
export function useEffectOnce(callback: () => void) {
|
|
11
|
-
const hasRun = useRef(false);
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
if (!hasRun.current) {
|
|
15
|
-
callback();
|
|
16
|
-
hasRun.current = true;
|
|
17
|
-
}
|
|
18
|
-
}, [callback]);
|
|
19
|
-
}
|