@intlayer/design-system 9.3.2 → 9.4.0-canary.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/README.md +1 -1
- package/dist/esm/api/hooks/analytics.mjs +6 -5
- package/dist/esm/api/hooks/analytics.mjs.map +1 -1
- package/dist/esm/api/hooks/auth.mjs +2 -0
- package/dist/esm/api/hooks/auth.mjs.map +1 -1
- package/dist/esm/api/index.mjs +2 -2
- package/dist/esm/api/useAuth/useOAuth2.mjs +1 -1
- package/dist/esm/api/useAuth/useSession.mjs +1 -1
- package/dist/esm/components/Accordion/Accordion.mjs +2 -2
- package/dist/esm/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/esm/components/Browser/Browser.mjs +1 -1
- package/dist/esm/components/Browser/Browser.mjs.map +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs +1 -1
- package/dist/esm/components/CopyButton/index.mjs +2 -1
- package/dist/esm/components/CopyButton/index.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditor.mjs +4 -5
- package/dist/esm/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +6 -10
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +6 -6
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +3 -7
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +2 -2
- package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -1
- package/dist/esm/components/ExpandCollapse/ExpandCollapse.mjs +19 -12
- package/dist/esm/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -1
- package/dist/esm/components/Form/elements/OTPElement.mjs +4 -4
- package/dist/esm/components/Form/elements/OTPElement.mjs.map +1 -1
- package/dist/esm/components/HTMLRender/HTMLRender.mjs +2 -2
- package/dist/esm/components/HTMLRender/HTMLRender.mjs.map +1 -1
- package/dist/esm/components/IDE/Code.mjs +3 -3
- package/dist/esm/components/IDE/Code.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockClient.mjs +16 -4
- package/dist/esm/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockHighlight.mjs +14 -5
- package/dist/esm/components/IDE/CodeBlockHighlight.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockServer.mjs +5 -3
- package/dist/esm/components/IDE/CodeBlockServer.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockShiki.mjs +18 -18
- package/dist/esm/components/IDE/CodeBlockShiki.mjs.map +1 -1
- package/dist/esm/components/IDE/IDE.mjs +2 -5
- package/dist/esm/components/IDE/IDE.mjs.map +1 -1
- package/dist/esm/components/IDE/MarkDownRender.mjs +1 -2
- package/dist/esm/components/IDE/MarkDownRender.mjs.map +1 -1
- package/dist/esm/components/IDE/index.mjs +2 -2
- package/dist/esm/components/IDE/shikiThemes.mjs +18 -0
- package/dist/esm/components/IDE/shikiThemes.mjs.map +1 -0
- package/dist/esm/components/Link/Link.mjs +10 -5
- package/dist/esm/components/Link/Link.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -1
- package/dist/esm/components/MarkDownRender/MarkDownIframe.mjs +105 -4
- package/dist/esm/components/MarkDownRender/MarkDownIframe.mjs.map +1 -1
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs +16 -16
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs.map +1 -1
- package/dist/esm/components/MaxHeightSmoother/index.mjs +1 -1
- package/dist/esm/components/MaxHeightSmoother/index.mjs.map +1 -1
- package/dist/esm/components/MaxWidthSmoother/index.mjs +1 -1
- package/dist/esm/components/MaxWidthSmoother/index.mjs.map +1 -1
- package/dist/esm/components/Modal/Modal.mjs +2 -2
- package/dist/esm/components/Navbar/MobileNavbar.mjs +1 -1
- package/dist/esm/components/Pagination/Pagination.mjs +4 -4
- package/dist/esm/components/Pagination/Pagination.mjs.map +1 -1
- package/dist/esm/components/Pattern/GridDistortionPattern.mjs +103 -17
- package/dist/esm/components/Pattern/GridDistortionPattern.mjs.map +1 -1
- package/dist/esm/components/Popover/dynamic.mjs +73 -28
- package/dist/esm/components/Popover/dynamic.mjs.map +1 -1
- package/dist/esm/components/Popover/index.mjs +2 -2
- package/dist/esm/components/Popover/static.mjs +47 -18
- package/dist/esm/components/Popover/static.mjs.map +1 -1
- package/dist/esm/components/RightDrawer/RightDrawer.mjs +5 -4
- package/dist/esm/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/esm/components/SwitchSelector/useSwitchSelector.mjs +2 -2
- package/dist/esm/components/SwitchSelector/useSwitchSelector.mjs.map +1 -1
- package/dist/esm/components/Tab/Tab.mjs +38 -17
- package/dist/esm/components/Tab/Tab.mjs.map +1 -1
- package/dist/esm/components/TabSelector/TabSelector.mjs +2 -2
- package/dist/esm/components/TabSelector/TabSelector.mjs.map +1 -1
- package/dist/esm/components/TextArea/AutoSizeTextArea.mjs +3 -2
- package/dist/esm/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +10 -18
- package/dist/esm/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs +14 -13
- package/dist/esm/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
- package/dist/esm/components/index.mjs +3 -3
- package/dist/esm/hooks/index.mjs +9 -9
- package/dist/esm/hooks/useDevice.mjs +16 -6
- package/dist/esm/hooks/useDevice.mjs.map +1 -1
- package/dist/esm/hooks/useItemSelector.mjs +110 -112
- package/dist/esm/hooks/useItemSelector.mjs.map +1 -1
- package/dist/esm/hooks/useScrollY.mjs +64 -45
- package/dist/esm/hooks/useScrollY.mjs.map +1 -1
- package/dist/esm/hooks/useStickToBottom.mjs +69 -0
- package/dist/esm/hooks/useStickToBottom.mjs.map +1 -0
- package/dist/esm/libs/auth.mjs +16 -3
- package/dist/esm/libs/auth.mjs.map +1 -1
- package/dist/esm/providers/ThemeProvider.mjs +143 -0
- package/dist/esm/providers/ThemeProvider.mjs.map +1 -0
- package/dist/esm/providers/index.mjs +2 -1
- package/dist/esm/routes.mjs +2 -1
- package/dist/esm/routes.mjs.map +1 -1
- package/dist/esm/structured-data/buildCreativeWorkJsonLd.mjs +1 -1
- package/dist/esm/structured-data/buildCreativeWorkJsonLd.mjs.map +1 -1
- package/dist/esm/utils/index.mjs +3 -1
- package/dist/esm/utils/observeScrollExtent.mjs +39 -0
- package/dist/esm/utils/observeScrollExtent.mjs.map +1 -0
- package/dist/esm/utils/scheduleFrameTask.mjs +44 -0
- package/dist/esm/utils/scheduleFrameTask.mjs.map +1 -0
- package/dist/types/api/hooks/analytics.d.ts +5 -3
- package/dist/types/api/hooks/analytics.d.ts.map +1 -1
- package/dist/types/api/hooks/auth.d.ts.map +1 -1
- package/dist/types/components/Browser/Browser.d.ts +7 -1
- package/dist/types/components/Browser/Browser.d.ts.map +1 -1
- package/dist/types/components/CopyButton/index.d.ts +9 -3
- package/dist/types/components/CopyButton/index.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/ContentEditor.d.ts +0 -1
- package/dist/types/components/DictionaryFieldEditor/ContentEditor.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts +0 -1
- package/dist/types/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts +0 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/types/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
- package/dist/types/components/HTMLRender/HTMLRender.d.ts +1 -2
- package/dist/types/components/HTMLRender/HTMLRender.d.ts.map +1 -1
- package/dist/types/components/IDE/Code.d.ts +6 -1
- package/dist/types/components/IDE/Code.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeBlockClient.d.ts +18 -2
- package/dist/types/components/IDE/CodeBlockClient.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeBlockHighlight.d.ts +3 -2
- package/dist/types/components/IDE/CodeBlockHighlight.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeBlockServer.d.ts +0 -1
- package/dist/types/components/IDE/CodeBlockServer.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeBlockShiki.d.ts +0 -1
- package/dist/types/components/IDE/CodeBlockShiki.d.ts.map +1 -1
- package/dist/types/components/IDE/IDE.d.ts +0 -1
- package/dist/types/components/IDE/IDE.d.ts.map +1 -1
- package/dist/types/components/IDE/MarkDownRender.d.ts +0 -1
- package/dist/types/components/IDE/MarkDownRender.d.ts.map +1 -1
- package/dist/types/components/IDE/index.d.ts +2 -2
- package/dist/types/components/IDE/shikiThemes.d.ts +18 -0
- package/dist/types/components/IDE/shikiThemes.d.ts.map +1 -0
- package/dist/types/components/MarkDownRender/MarkDownIframe.d.ts.map +1 -1
- package/dist/types/components/MarkDownRender/MarkDownRender.d.ts +1 -2
- package/dist/types/components/MarkDownRender/MarkDownRender.d.ts.map +1 -1
- package/dist/types/components/Pattern/GridDistortionPattern.d.ts.map +1 -1
- package/dist/types/components/Popover/dynamic.d.ts.map +1 -1
- package/dist/types/components/Popover/index.d.ts +2 -2
- package/dist/types/components/Popover/static.d.ts +6 -1
- package/dist/types/components/Popover/static.d.ts.map +1 -1
- package/dist/types/components/Tab/Tab.d.ts +2 -2
- package/dist/types/components/Tab/Tab.d.ts.map +1 -1
- package/dist/types/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.d.ts +1 -1
- package/dist/types/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.d.ts.map +1 -1
- package/dist/types/components/ThemeSwitcherDropDown/MobileThemeSwitcher.d.ts +1 -1
- package/dist/types/components/ThemeSwitcherDropDown/MobileThemeSwitcher.d.ts.map +1 -1
- package/dist/types/components/ThemeSwitcherDropDown/types.d.ts +3 -1
- package/dist/types/components/ThemeSwitcherDropDown/types.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +3 -3
- package/dist/types/hooks/index.d.ts +2 -2
- package/dist/types/hooks/useItemSelector.d.ts +2 -0
- package/dist/types/hooks/useItemSelector.d.ts.map +1 -1
- package/dist/types/hooks/useScrollY.d.ts +10 -0
- package/dist/types/hooks/useScrollY.d.ts.map +1 -1
- package/dist/types/hooks/useStickToBottom.d.ts +41 -0
- package/dist/types/hooks/useStickToBottom.d.ts.map +1 -0
- package/dist/types/libs/auth.d.ts +3 -0
- package/dist/types/libs/auth.d.ts.map +1 -1
- package/dist/types/providers/ThemeProvider.d.ts +41 -0
- package/dist/types/providers/ThemeProvider.d.ts.map +1 -0
- package/dist/types/providers/index.d.ts +2 -1
- package/dist/types/routes.d.ts +2 -1
- package/dist/types/routes.d.ts.map +1 -1
- package/dist/types/structured-data/buildCreativeWorkJsonLd.d.ts +9 -3
- package/dist/types/structured-data/buildCreativeWorkJsonLd.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/utils/observeScrollExtent.d.ts +22 -0
- package/dist/types/utils/observeScrollExtent.d.ts.map +1 -0
- package/dist/types/utils/scheduleFrameTask.d.ts +25 -0
- package/dist/types/utils/scheduleFrameTask.d.ts.map +1 -0
- package/package.json +46 -41
- package/tailwind.css +27 -1
- package/dist/esm/hooks/useIsDarkMode.mjs +0 -17
- package/dist/esm/hooks/useIsDarkMode.mjs.map +0 -1
- package/dist/types/hooks/useIsDarkMode.d.ts +0 -5
- package/dist/types/hooks/useIsDarkMode.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.mjs","names":[],"sources":["../../../src/libs/auth.ts"],"sourcesContent":["import { passkeyClient } from '@better-auth/passkey/client';\nimport { ssoClient } from '@better-auth/sso/client';\nimport { editor } from '@intlayer/config/built';\nimport { BACKEND_URL } from '@intlayer/config/defaultValues';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { createAuthClient } from 'better-auth/client';\nimport { magicLinkClient, twoFactorClient } from 'better-auth/client/plugins';\n\nconst getAuthClient = (backendURL: string) =>\n createAuthClient({\n baseURL: backendURL,\n withCredentials: true, // makes fetch forward cookies\n plugins: [\n twoFactorClient({\n onTwoFactorRedirect: () => {\n // Preserve redirect_url when redirecting to 2FA\n const searchParams = new URLSearchParams(window.location.search);\n const redirectUrl = searchParams.get('redirect_url');\n const twoFaUrl = redirectUrl\n ? `/auth/2fa?redirect_url=${encodeURIComponent(redirectUrl)}`\n : '/auth/2fa';\n window.location.href = twoFaUrl;\n },\n }),\n passkeyClient(),\n magicLinkClient() as never,\n ssoClient(),\n ],\n });\n\ntype AuthClient = ReturnType<typeof getAuthClient>;\n\nexport interface AuthAPI {\n getAuthClient: () => AuthClient;\n signInEmail: AuthClient['signIn']['email'];\n signUpEmail: AuthClient['signUp']['email'];\n signOut: AuthClient['signOut'];\n signInSocial: AuthClient['signIn']['social'];\n linkSocial: AuthClient['linkSocial'];\n changePasswordSession: AuthClient['changePassword'];\n requestPasswordResetSession: AuthClient['requestPasswordReset'];\n resetPassword: AuthClient['resetPassword'];\n verifyEmailSession: AuthClient['verifyEmail'];\n getSession: AuthClient['getSession'];\n forgetPassword: AuthClient['requestPasswordReset'];\n sendVerificationEmail: AuthClient['sendVerificationEmail'];\n changeEmail: AuthClient['changeEmail'];\n deleteUser: AuthClient['deleteUser'];\n revokeSession: AuthClient['revokeSession'];\n revokeSessions: AuthClient['revokeSessions'];\n revokeOtherSessions: AuthClient['revokeOtherSessions'];\n listAccounts: AuthClient['listAccounts'];\n unlinkAccount: AuthClient['unlinkAccount'];\n refreshToken: AuthClient['refreshToken'];\n getAccessToken: AuthClient['getAccessToken'];\n accountInfo: AuthClient['accountInfo'];\n updateUser: AuthClient['updateUser'];\n listSessions: AuthClient['listSessions'];\n enableTwoFactor: AuthClient['twoFactor']['enable'];\n disableTwoFactor: AuthClient['twoFactor']['disable'];\n verifyTotp: AuthClient['twoFactor']['verifyTotp'];\n verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode'];\n addPasskey: AuthClient['passkey']['addPasskey'];\n signInPasskey: AuthClient['signIn']['passkey'];\n deletePasskey: AuthClient['passkey']['deletePasskey'];\n listPasskeys: () => Promise<any>;\n signInMagicLink: (\n // Redeclare it because of type inference issues\n input: { email: string; callbackURL: string }\n ) => any;\n registerSSO: AuthClient['sso']['register'];\n listSSOProviders: () => Promise<any>;\n deleteSSOProvider: (args: { providerId: string }) => Promise<any>;\n signInSSO: AuthClient['signIn']['sso'];\n}\n\nexport const getAuthAPI = (\n intlayerConfig?: Pick<IntlayerConfig, 'editor'>\n): AuthAPI => {\n let backendURL = intlayerConfig?.editor?.backendURL ?? editor?.backendURL;\n\n if (!backendURL) {\n backendURL = BACKEND_URL;\n console.error('Backend URL is not defined in the Intlayer configuration.');\n }\n\n const client = getAuthClient(backendURL);\n\n const signInEmail: AuthClient['signIn']['email'] = async (...args) => {\n return client.signIn.email(...args);\n };\n\n const signInSocial: AuthClient['signIn']['social'] = async (...args) => {\n return client.signIn.social(...args);\n };\n\n const signUpEmail: AuthClient['signUp']['email'] = async (...args) => {\n return client.signUp.email(...args);\n };\n\n const signOut: AuthClient['signOut'] = async (...args) => {\n return client.signOut(...args);\n };\n\n const changePasswordSession: AuthClient['changePassword'] = async (\n ...args\n ) => {\n return client.changePassword(...args);\n };\n\n const requestPasswordResetSession: AuthClient['requestPasswordReset'] =\n async (...args) => {\n return client.requestPasswordReset(...args);\n };\n\n // @ts-ignore - resetPassword is not typed\n const resetPassword: AuthClient['resetPassword'] = async (...args) => {\n return client.resetPassword(...args);\n };\n\n const verifyEmailSession: AuthClient['verifyEmail'] = async (...args) => {\n return client.verifyEmail(...args);\n };\n\n const getSession: AuthClient['getSession'] = async (...args) => {\n return client.getSession(...args);\n };\n\n const forgetPassword: AuthClient['requestPasswordReset'] = async (\n ...args\n ) => {\n return client.requestPasswordReset(...args);\n };\n\n const sendVerificationEmail: AuthClient['sendVerificationEmail'] = async (\n ...args\n ) => {\n return client.sendVerificationEmail(...args);\n };\n\n const changeEmail: AuthClient['changeEmail'] = async (...args) => {\n return client.changeEmail(...args);\n };\n\n // @ts-ignore - deleteUser is not typed\n const deleteUser: AuthClient['deleteUser'] = async (...args) => {\n return client.deleteUser(...args);\n };\n\n const revokeSession: AuthClient['revokeSession'] = async (...args) => {\n return client.revokeSession(...args);\n };\n\n const revokeSessions: AuthClient['revokeSessions'] = async (...args) => {\n return client.revokeSessions(...args);\n };\n\n const revokeOtherSessions: AuthClient['revokeOtherSessions'] = async (\n ...args\n ) => {\n return client.revokeOtherSessions(...args);\n };\n\n const linkSocial: AuthClient['linkSocial'] = async (...args) => {\n return client.linkSocial(...args);\n };\n\n const listAccounts: AuthClient['listAccounts'] = async (...args) => {\n return client.listAccounts(...args);\n };\n\n const unlinkAccount: AuthClient['unlinkAccount'] = async (...args) => {\n return client.unlinkAccount(...args);\n };\n\n const refreshToken: AuthClient['refreshToken'] = async (...args) => {\n return client.refreshToken(...args);\n };\n\n const getAccessToken: AuthClient['getAccessToken'] = async (...args) => {\n return client.getAccessToken(...args);\n };\n\n const accountInfo: AuthClient['accountInfo'] = async (...args) => {\n return client.accountInfo(...args);\n };\n\n const updateUser: AuthClient['updateUser'] = async (...args) => {\n return client.updateUser(...args);\n };\n\n const listSessions: AuthClient['listSessions'] = async (...args) => {\n return client.listSessions(...args);\n };\n\n const enableTwoFactor: AuthClient['twoFactor']['enable'] = async (\n ...args\n ) => {\n return client.twoFactor.enable(...args) as ReturnType<\n AuthClient['twoFactor']['enable']\n >;\n };\n\n const disableTwoFactor: AuthClient['twoFactor']['disable'] = async (\n ...args\n ) => {\n return client.twoFactor.disable(...args) as ReturnType<\n AuthClient['twoFactor']['disable']\n >;\n };\n\n const verifyTotp: AuthClient['twoFactor']['verifyTotp'] = async (...args) => {\n return client.twoFactor.verifyTotp(...args) as ReturnType<\n AuthClient['twoFactor']['verifyTotp']\n >;\n };\n\n const verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode'] = async (\n ...args\n ) => {\n return client.twoFactor.verifyBackupCode(...args) as ReturnType<\n AuthClient['twoFactor']['verifyBackupCode']\n >;\n };\n\n const addPasskey: AuthClient['passkey']['addPasskey'] = async (...args) => {\n return client.passkey.addPasskey(...args);\n };\n\n const signInPasskey: AuthClient['signIn']['passkey'] = async (...args) => {\n return client.signIn.passkey(...args);\n };\n\n const deletePasskey: AuthClient['passkey']['deletePasskey'] = async (\n ...args\n ) => {\n return client.passkey.deletePasskey(...args);\n };\n\n const listPasskeys = async () => {\n // @ts-ignore - listPasskeys may not be typed yet\n return client.$fetch('/passkey/list-user-passkeys', {\n method: 'GET',\n });\n };\n\n const signInMagicLink: any = async (...args: any[]) => {\n return (client.signIn as any).magicLink(...args);\n };\n\n const signInSSO: AuthClient['signIn']['sso'] = async (...args) => {\n return client.signIn.sso(...args);\n };\n\n const registerSSO: AuthClient['sso']['register'] = async (...args) => {\n return client.sso.register(...args);\n };\n\n const listSSOProviders = async () => {\n const response = await (client.sso as any).providers();\n return { data: response?.data?.providers ?? [] };\n };\n\n const deleteSSOProvider = async (args: { providerId: string }) => {\n return (client.sso as any).deleteProvider({ providerId: args.providerId });\n };\n\n return {\n getAuthClient: () => client,\n signInEmail,\n signUpEmail,\n signOut,\n signInSocial,\n linkSocial,\n changePasswordSession,\n requestPasswordResetSession,\n resetPassword,\n verifyEmailSession,\n getSession,\n forgetPassword,\n sendVerificationEmail,\n changeEmail,\n deleteUser,\n revokeSession,\n revokeSessions,\n revokeOtherSessions,\n listAccounts,\n unlinkAccount,\n refreshToken,\n getAccessToken,\n accountInfo,\n updateUser,\n listSessions,\n enableTwoFactor,\n disableTwoFactor,\n verifyTotp,\n verifyBackupCode,\n addPasskey,\n signInPasskey,\n deletePasskey,\n listPasskeys,\n signInMagicLink,\n signInSSO,\n registerSSO,\n listSSOProviders,\n deleteSSOProvider,\n };\n};\n"],"mappings":";;;;;;;;AAQA,MAAM,iBAAiB,eACrB,iBAAiB;CACf,SAAS;CACT,iBAAiB;CACjB,SAAS;EACP,gBAAgB,EACd,2BAA2B;GAGzB,MAAM,cAAc,IADK,gBAAgB,OAAO,SAAS,MAC1B,CAAC,CAAC,IAAI,cAAc;GACnD,MAAM,WAAW,cACb,0BAA0B,mBAAmB,WAAW,MACxD;GACJ,OAAO,SAAS,OAAO;EACzB,EACF,CAAC;EACD,cAAc;EACd,gBAAgB;EAChB,UAAU;CACZ;AACF,CAAC;AAgDH,MAAa,cACX,mBACY;CACZ,IAAI,aAAa,gBAAgB,QAAQ,cAAc,QAAQ;CAE/D,IAAI,CAAC,YAAY;EACf,aAAa;EACb,QAAQ,MAAM,2DAA2D;CAC3E;CAEA,MAAM,SAAS,cAAc,UAAU;CAEvC,MAAM,cAA6C,OAAO,GAAG,SAAS;EACpE,OAAO,OAAO,OAAO,MAAM,GAAG,IAAI;CACpC;CAEA,MAAM,eAA+C,OAAO,GAAG,SAAS;EACtE,OAAO,OAAO,OAAO,OAAO,GAAG,IAAI;CACrC;CAEA,MAAM,cAA6C,OAAO,GAAG,SAAS;EACpE,OAAO,OAAO,OAAO,MAAM,GAAG,IAAI;CACpC;CAEA,MAAM,UAAiC,OAAO,GAAG,SAAS;EACxD,OAAO,OAAO,QAAQ,GAAG,IAAI;CAC/B;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AI,GAAG,IAAI;CAClC;CAEA,MAAM,cAA6C,OAAO,GAAG,SAAS;EACpE,OAAO,OAAO,IAAI,SAAS,GAAG,IAAI;CACpC;CAEA,MAAM,mBAAmB,YAAY;EAEnC,OAAO,EAAE,OAAM,MADS,OAAO,IAAY,UAAU,EAC9B,EAAE,MAAM,aAAa,CAAC,EAAE;CACjD;CAEA,MAAM,oBAAoB,OAAO,SAAiC;EAChE,OAAQ,OAAO,IAAY,eAAe,EAAE,YAAY,KAAK,WAAW,CAAC;CAC3E;CAEA,OAAO;EACL,qBAAqB;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"auth.mjs","names":[],"sources":["../../../src/libs/auth.ts"],"sourcesContent":["import { passkeyClient } from '@better-auth/passkey/client';\nimport { ssoClient } from '@better-auth/sso/client';\nimport { editor } from '@intlayer/config/built';\nimport { BACKEND_URL } from '@intlayer/config/defaultValues';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { createAuthClient } from 'better-auth/client';\nimport {\n magicLinkClient,\n multiSessionClient,\n twoFactorClient,\n} from 'better-auth/client/plugins';\n\nconst getAuthClient = (backendURL: string) =>\n createAuthClient({\n baseURL: backendURL,\n withCredentials: true, // makes fetch forward cookies\n plugins: [\n twoFactorClient({\n onTwoFactorRedirect: () => {\n // Preserve redirect_url when redirecting to 2FA\n const searchParams = new URLSearchParams(window.location.search);\n const redirectUrl = searchParams.get('redirect_url');\n const twoFaUrl = redirectUrl\n ? `/auth/2fa?redirect_url=${encodeURIComponent(redirectUrl)}`\n : '/auth/2fa';\n window.location.href = twoFaUrl;\n },\n }),\n passkeyClient(),\n magicLinkClient() as never,\n ssoClient(),\n multiSessionClient(),\n ],\n });\n\ntype AuthClient = ReturnType<typeof getAuthClient>;\n\nexport interface AuthAPI {\n getAuthClient: () => AuthClient;\n signInEmail: AuthClient['signIn']['email'];\n signUpEmail: AuthClient['signUp']['email'];\n signOut: AuthClient['signOut'];\n signInSocial: AuthClient['signIn']['social'];\n linkSocial: AuthClient['linkSocial'];\n changePasswordSession: AuthClient['changePassword'];\n requestPasswordResetSession: AuthClient['requestPasswordReset'];\n resetPassword: AuthClient['resetPassword'];\n verifyEmailSession: AuthClient['verifyEmail'];\n getSession: AuthClient['getSession'];\n forgetPassword: AuthClient['requestPasswordReset'];\n sendVerificationEmail: AuthClient['sendVerificationEmail'];\n changeEmail: AuthClient['changeEmail'];\n deleteUser: AuthClient['deleteUser'];\n revokeSession: AuthClient['revokeSession'];\n revokeSessions: AuthClient['revokeSessions'];\n revokeOtherSessions: AuthClient['revokeOtherSessions'];\n listAccounts: AuthClient['listAccounts'];\n unlinkAccount: AuthClient['unlinkAccount'];\n refreshToken: AuthClient['refreshToken'];\n getAccessToken: AuthClient['getAccessToken'];\n accountInfo: AuthClient['accountInfo'];\n updateUser: AuthClient['updateUser'];\n listSessions: AuthClient['listSessions'];\n enableTwoFactor: AuthClient['twoFactor']['enable'];\n disableTwoFactor: AuthClient['twoFactor']['disable'];\n verifyTotp: AuthClient['twoFactor']['verifyTotp'];\n verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode'];\n addPasskey: AuthClient['passkey']['addPasskey'];\n signInPasskey: AuthClient['signIn']['passkey'];\n deletePasskey: AuthClient['passkey']['deletePasskey'];\n listPasskeys: () => Promise<any>;\n signInMagicLink: (\n // Redeclare it because of type inference issues\n input: { email: string; callbackURL: string }\n ) => any;\n registerSSO: AuthClient['sso']['register'];\n listSSOProviders: () => Promise<any>;\n deleteSSOProvider: (args: { providerId: string }) => Promise<any>;\n signInSSO: AuthClient['signIn']['sso'];\n listDeviceSessions: AuthClient['multiSession']['listDeviceSessions'];\n setActiveSession: AuthClient['multiSession']['setActive'];\n revokeDeviceSession: AuthClient['multiSession']['revoke'];\n}\n\nexport const getAuthAPI = (\n intlayerConfig?: Pick<IntlayerConfig, 'editor'>\n): AuthAPI => {\n let backendURL = intlayerConfig?.editor?.backendURL ?? editor?.backendURL;\n\n if (!backendURL) {\n backendURL = BACKEND_URL;\n console.error('Backend URL is not defined in the Intlayer configuration.');\n }\n\n const client = getAuthClient(backendURL);\n\n const signInEmail: AuthClient['signIn']['email'] = async (...args) => {\n return client.signIn.email(...args);\n };\n\n const signInSocial: AuthClient['signIn']['social'] = async (...args) => {\n return client.signIn.social(...args);\n };\n\n const signUpEmail: AuthClient['signUp']['email'] = async (...args) => {\n return client.signUp.email(...args);\n };\n\n const signOut: AuthClient['signOut'] = async (...args) => {\n return client.signOut(...args);\n };\n\n const changePasswordSession: AuthClient['changePassword'] = async (\n ...args\n ) => {\n return client.changePassword(...args);\n };\n\n const requestPasswordResetSession: AuthClient['requestPasswordReset'] =\n async (...args) => {\n return client.requestPasswordReset(...args);\n };\n\n // @ts-ignore - resetPassword is not typed\n const resetPassword: AuthClient['resetPassword'] = async (...args) => {\n return client.resetPassword(...args);\n };\n\n const verifyEmailSession: AuthClient['verifyEmail'] = async (...args) => {\n return client.verifyEmail(...args);\n };\n\n const getSession: AuthClient['getSession'] = async (...args) => {\n return client.getSession(...args);\n };\n\n const forgetPassword: AuthClient['requestPasswordReset'] = async (\n ...args\n ) => {\n return client.requestPasswordReset(...args);\n };\n\n const sendVerificationEmail: AuthClient['sendVerificationEmail'] = async (\n ...args\n ) => {\n return client.sendVerificationEmail(...args);\n };\n\n const changeEmail: AuthClient['changeEmail'] = async (...args) => {\n return client.changeEmail(...args);\n };\n\n // @ts-ignore - deleteUser is not typed\n const deleteUser: AuthClient['deleteUser'] = async (...args) => {\n return client.deleteUser(...args);\n };\n\n const revokeSession: AuthClient['revokeSession'] = async (...args) => {\n return client.revokeSession(...args);\n };\n\n const revokeSessions: AuthClient['revokeSessions'] = async (...args) => {\n return client.revokeSessions(...args);\n };\n\n const revokeOtherSessions: AuthClient['revokeOtherSessions'] = async (\n ...args\n ) => {\n return client.revokeOtherSessions(...args);\n };\n\n const linkSocial: AuthClient['linkSocial'] = async (...args) => {\n return client.linkSocial(...args);\n };\n\n const listAccounts: AuthClient['listAccounts'] = async (...args) => {\n return client.listAccounts(...args);\n };\n\n const unlinkAccount: AuthClient['unlinkAccount'] = async (...args) => {\n return client.unlinkAccount(...args);\n };\n\n const refreshToken: AuthClient['refreshToken'] = async (...args) => {\n return client.refreshToken(...args);\n };\n\n const getAccessToken: AuthClient['getAccessToken'] = async (...args) => {\n return client.getAccessToken(...args);\n };\n\n const accountInfo: AuthClient['accountInfo'] = async (...args) => {\n return client.accountInfo(...args);\n };\n\n const updateUser: AuthClient['updateUser'] = async (...args) => {\n return client.updateUser(...args);\n };\n\n const listSessions: AuthClient['listSessions'] = async (...args) => {\n return client.listSessions(...args);\n };\n\n const enableTwoFactor: AuthClient['twoFactor']['enable'] = async (\n ...args\n ) => {\n return client.twoFactor.enable(...args) as ReturnType<\n AuthClient['twoFactor']['enable']\n >;\n };\n\n const disableTwoFactor: AuthClient['twoFactor']['disable'] = async (\n ...args\n ) => {\n return client.twoFactor.disable(...args) as ReturnType<\n AuthClient['twoFactor']['disable']\n >;\n };\n\n const verifyTotp: AuthClient['twoFactor']['verifyTotp'] = async (...args) => {\n return client.twoFactor.verifyTotp(...args) as ReturnType<\n AuthClient['twoFactor']['verifyTotp']\n >;\n };\n\n const verifyBackupCode: AuthClient['twoFactor']['verifyBackupCode'] = async (\n ...args\n ) => {\n return client.twoFactor.verifyBackupCode(...args) as ReturnType<\n AuthClient['twoFactor']['verifyBackupCode']\n >;\n };\n\n const addPasskey: AuthClient['passkey']['addPasskey'] = async (...args) => {\n return client.passkey.addPasskey(...args);\n };\n\n const signInPasskey: AuthClient['signIn']['passkey'] = async (...args) => {\n return client.signIn.passkey(...args);\n };\n\n const deletePasskey: AuthClient['passkey']['deletePasskey'] = async (\n ...args\n ) => {\n return client.passkey.deletePasskey(...args);\n };\n\n const listPasskeys = async () => {\n // @ts-ignore - listPasskeys may not be typed yet\n return client.$fetch('/passkey/list-user-passkeys', {\n method: 'GET',\n });\n };\n\n const signInMagicLink: any = async (...args: any[]) => {\n return (client.signIn as any).magicLink(...args);\n };\n\n const signInSSO: AuthClient['signIn']['sso'] = async (...args) => {\n return client.signIn.sso(...args);\n };\n\n const registerSSO: AuthClient['sso']['register'] = async (...args) => {\n return client.sso.register(...args);\n };\n\n const listSSOProviders = async () => {\n const response = await (client.sso as any).providers();\n return { data: response?.data?.providers ?? [] };\n };\n\n const deleteSSOProvider = async (args: { providerId: string }) => {\n return (client.sso as any).deleteProvider({ providerId: args.providerId });\n };\n\n const listDeviceSessions: AuthClient['multiSession']['listDeviceSessions'] =\n async (...args) => {\n return client.multiSession.listDeviceSessions(...args);\n };\n\n const setActiveSession: AuthClient['multiSession']['setActive'] = async (\n ...args\n ) => {\n return client.multiSession.setActive(...args);\n };\n\n const revokeDeviceSession: AuthClient['multiSession']['revoke'] = async (\n ...args\n ) => {\n return client.multiSession.revoke(...args);\n };\n\n return {\n getAuthClient: () => client,\n signInEmail,\n signUpEmail,\n signOut,\n signInSocial,\n linkSocial,\n changePasswordSession,\n requestPasswordResetSession,\n resetPassword,\n verifyEmailSession,\n getSession,\n forgetPassword,\n sendVerificationEmail,\n changeEmail,\n deleteUser,\n revokeSession,\n revokeSessions,\n revokeOtherSessions,\n listAccounts,\n unlinkAccount,\n refreshToken,\n getAccessToken,\n accountInfo,\n updateUser,\n listSessions,\n enableTwoFactor,\n disableTwoFactor,\n verifyTotp,\n verifyBackupCode,\n addPasskey,\n signInPasskey,\n deletePasskey,\n listPasskeys,\n signInMagicLink,\n signInSSO,\n registerSSO,\n listSSOProviders,\n deleteSSOProvider,\n listDeviceSessions,\n revokeDeviceSession,\n setActiveSession,\n };\n};\n"],"mappings":";;;;;;;;AAYA,MAAM,iBAAiB,eACrB,iBAAiB;CACf,SAAS;CACT,iBAAiB;CACjB,SAAS;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O,OAAO,aAAa,UAAU,GAAG,IAAI;CAC9C;CAEA,MAAM,sBAA4D,OAChE,GAAG,SACA;EACH,OAAO,OAAO,aAAa,OAAO,GAAG,IAAI;CAC3C;CAEA,OAAO;EACL,qBAAqB;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useState } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/providers/ThemeProvider.tsx
|
|
7
|
+
/** Attribute mirrored on `<html>`; the Tailwind dark variant keys on it. */
|
|
8
|
+
const THEME_ATTRIBUTE = "data-theme";
|
|
9
|
+
/** Media query resolving the OS colour scheme. */
|
|
10
|
+
const DARK_MEDIA_QUERY = "(prefers-color-scheme: dark)";
|
|
11
|
+
const isServer = typeof window === "undefined";
|
|
12
|
+
/**
|
|
13
|
+
* Inline bootstrap applying the persisted theme before the first paint.
|
|
14
|
+
*
|
|
15
|
+
* Serialized through `Function.prototype.toString()` and injected as an inline
|
|
16
|
+
* `<script>`, so it must stay self-contained: no import, no module-scope
|
|
17
|
+
* binding, no reference the bundler could rewrite into a helper call. Every
|
|
18
|
+
* value it needs is passed as an argument.
|
|
19
|
+
*/
|
|
20
|
+
const themeScript = (storageKey, themeAttribute, darkMediaQuery) => {
|
|
21
|
+
let storedTheme = null;
|
|
22
|
+
try {
|
|
23
|
+
storedTheme = localStorage.getItem(storageKey);
|
|
24
|
+
} catch {}
|
|
25
|
+
const theme = storedTheme === "light" || storedTheme === "dark" ? storedTheme : window.matchMedia(darkMediaQuery).matches ? "dark" : "light";
|
|
26
|
+
const element = document.documentElement;
|
|
27
|
+
element.setAttribute(themeAttribute, theme);
|
|
28
|
+
element.style.colorScheme = theme;
|
|
29
|
+
};
|
|
30
|
+
/** Serializes the bootstrap and its arguments into inline script source. */
|
|
31
|
+
const buildBootstrap = (storageKey) => `(${themeScript})(${JSON.stringify(storageKey)},${JSON.stringify(THEME_ATTRIBUTE)},${JSON.stringify(DARK_MEDIA_QUERY)})`;
|
|
32
|
+
/** Reads the persisted preference, discarding unknown values. */
|
|
33
|
+
const getStoredTheme = (storageKey) => {
|
|
34
|
+
try {
|
|
35
|
+
const storedTheme = localStorage.getItem(storageKey);
|
|
36
|
+
if (storedTheme === "light" || storedTheme === "dark" || storedTheme === "system") return storedTheme;
|
|
37
|
+
} catch {}
|
|
38
|
+
return "system";
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Suppresses CSS transitions while the theme attribute flips, so every themed
|
|
42
|
+
* element repaints at once instead of animating between palettes.
|
|
43
|
+
*
|
|
44
|
+
* @returns Callback restoring transitions, to call once the theme is applied.
|
|
45
|
+
*/
|
|
46
|
+
const suppressTransitions = (nonce) => {
|
|
47
|
+
const style = document.createElement("style");
|
|
48
|
+
if (nonce) style.setAttribute("nonce", nonce);
|
|
49
|
+
style.appendChild(document.createTextNode("*,*::before,*::after{transition:none!important}"));
|
|
50
|
+
document.head.appendChild(style);
|
|
51
|
+
return () => {
|
|
52
|
+
getComputedStyle(document.body).getPropertyValue("transition");
|
|
53
|
+
style.remove();
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect;
|
|
57
|
+
const ThemeContext = createContext(void 0);
|
|
58
|
+
/** Served outside of a provider, so consumers render light instead of crashing. */
|
|
59
|
+
const fallbackThemeContext = {
|
|
60
|
+
theme: "system",
|
|
61
|
+
resolvedTheme: void 0,
|
|
62
|
+
setTheme: () => void 0
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Reads and updates the current theme.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* const { resolvedTheme, setTheme } = useTheme();
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
const useTheme = () => useContext(ThemeContext) ?? fallbackThemeContext;
|
|
73
|
+
const Theme = ({ storageKey = "theme", nonce, children }) => {
|
|
74
|
+
const [theme, setThemeState] = useState("system");
|
|
75
|
+
const [systemTheme, setSystemTheme] = useState(void 0);
|
|
76
|
+
const resolvedTheme = theme === "system" ? systemTheme : theme;
|
|
77
|
+
useIsomorphicLayoutEffect(() => {
|
|
78
|
+
const media = window.matchMedia(DARK_MEDIA_QUERY);
|
|
79
|
+
setThemeState(getStoredTheme(storageKey));
|
|
80
|
+
setSystemTheme(media.matches ? "dark" : "light");
|
|
81
|
+
const handleSystemChange = (event) => setSystemTheme(event.matches ? "dark" : "light");
|
|
82
|
+
const handleStorageChange = (event) => {
|
|
83
|
+
if (event.key !== storageKey) return;
|
|
84
|
+
setThemeState(getStoredTheme(storageKey));
|
|
85
|
+
};
|
|
86
|
+
media.addEventListener("change", handleSystemChange);
|
|
87
|
+
window.addEventListener("storage", handleStorageChange);
|
|
88
|
+
return () => {
|
|
89
|
+
media.removeEventListener("change", handleSystemChange);
|
|
90
|
+
window.removeEventListener("storage", handleStorageChange);
|
|
91
|
+
};
|
|
92
|
+
}, [storageKey]);
|
|
93
|
+
useIsomorphicLayoutEffect(() => {
|
|
94
|
+
if (!resolvedTheme) return;
|
|
95
|
+
const element = document.documentElement;
|
|
96
|
+
if (element.getAttribute(THEME_ATTRIBUTE) === resolvedTheme) return;
|
|
97
|
+
const restoreTransitions = suppressTransitions(nonce);
|
|
98
|
+
element.setAttribute(THEME_ATTRIBUTE, resolvedTheme);
|
|
99
|
+
element.style.colorScheme = resolvedTheme;
|
|
100
|
+
restoreTransitions();
|
|
101
|
+
}, [resolvedTheme, nonce]);
|
|
102
|
+
const setTheme = useCallback((nextTheme) => {
|
|
103
|
+
setThemeState(nextTheme);
|
|
104
|
+
try {
|
|
105
|
+
localStorage.setItem(storageKey, nextTheme);
|
|
106
|
+
} catch {}
|
|
107
|
+
}, [storageKey]);
|
|
108
|
+
const value = useMemo(() => ({
|
|
109
|
+
theme,
|
|
110
|
+
resolvedTheme,
|
|
111
|
+
setTheme
|
|
112
|
+
}), [
|
|
113
|
+
theme,
|
|
114
|
+
resolvedTheme,
|
|
115
|
+
setTheme
|
|
116
|
+
]);
|
|
117
|
+
return /* @__PURE__ */ jsxs(ThemeContext.Provider, {
|
|
118
|
+
value,
|
|
119
|
+
children: [/* @__PURE__ */ jsx("script", {
|
|
120
|
+
nonce: isServer ? nonce : "",
|
|
121
|
+
dangerouslySetInnerHTML: { __html: buildBootstrap(storageKey) }
|
|
122
|
+
}), children]
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Applies the persisted theme to `<html>` before the first paint, keeps it in
|
|
127
|
+
* sync with the OS preference and with the other tabs, and exposes it through
|
|
128
|
+
* {@link useTheme}.
|
|
129
|
+
*
|
|
130
|
+
* Nested providers pass through, so a layout can mount one without fighting an
|
|
131
|
+
* outer provider over the `<html>` attribute.
|
|
132
|
+
*/
|
|
133
|
+
const ThemeProvider = ({ children, ...props }) => {
|
|
134
|
+
if (useContext(ThemeContext)) return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
135
|
+
return /* @__PURE__ */ jsx(Theme, {
|
|
136
|
+
...props,
|
|
137
|
+
children
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
export { ThemeProvider, useTheme };
|
|
143
|
+
//# sourceMappingURL=ThemeProvider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.mjs","names":[],"sources":["../../../src/providers/ThemeProvider.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type FC,\n type PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useLayoutEffect,\n useMemo,\n useState,\n} from 'react';\n\n/** Theme actually painted — the OS preference once `system` is resolved. */\nexport type ResolvedTheme = 'light' | 'dark';\n\n/** Theme stored as the user preference. `system` follows the OS setting. */\nexport type Theme = ResolvedTheme | 'system';\n\n/** Attribute mirrored on `<html>`; the Tailwind dark variant keys on it. */\nconst THEME_ATTRIBUTE = 'data-theme';\n\n/** Media query resolving the OS colour scheme. */\nconst DARK_MEDIA_QUERY = '(prefers-color-scheme: dark)';\n\nconst isServer = typeof window === 'undefined';\n\n/**\n * Inline bootstrap applying the persisted theme before the first paint.\n *\n * Serialized through `Function.prototype.toString()` and injected as an inline\n * `<script>`, so it must stay self-contained: no import, no module-scope\n * binding, no reference the bundler could rewrite into a helper call. Every\n * value it needs is passed as an argument.\n */\nconst themeScript = (\n storageKey: string,\n themeAttribute: string,\n darkMediaQuery: string\n): void => {\n let storedTheme: string | null = null;\n\n try {\n storedTheme = localStorage.getItem(storageKey);\n } catch {\n // Storage can throw (private mode, blocked cookies) — fall back to the OS.\n }\n\n const theme =\n storedTheme === 'light' || storedTheme === 'dark'\n ? storedTheme\n : window.matchMedia(darkMediaQuery).matches\n ? 'dark'\n : 'light';\n\n const element = document.documentElement;\n\n element.setAttribute(themeAttribute, theme);\n element.style.colorScheme = theme;\n};\n\n/** Serializes the bootstrap and its arguments into inline script source. */\nconst buildBootstrap = (storageKey: string): string =>\n `(${themeScript})(${JSON.stringify(storageKey)},${JSON.stringify(THEME_ATTRIBUTE)},${JSON.stringify(DARK_MEDIA_QUERY)})`;\n\n/** Reads the persisted preference, discarding unknown values. */\nconst getStoredTheme = (storageKey: string): Theme => {\n try {\n const storedTheme = localStorage.getItem(storageKey);\n\n if (\n storedTheme === 'light' ||\n storedTheme === 'dark' ||\n storedTheme === 'system'\n ) {\n return storedTheme;\n }\n } catch {\n // Storage can throw (private mode, blocked cookies).\n }\n\n return 'system';\n};\n\n/**\n * Suppresses CSS transitions while the theme attribute flips, so every themed\n * element repaints at once instead of animating between palettes.\n *\n * @returns Callback restoring transitions, to call once the theme is applied.\n */\nconst suppressTransitions = (nonce?: string): (() => void) => {\n const style = document.createElement('style');\n\n if (nonce) style.setAttribute('nonce', nonce);\n\n style.appendChild(\n document.createTextNode('*,*::before,*::after{transition:none!important}')\n );\n document.head.appendChild(style);\n\n return () => {\n // Reading a computed value forces a synchronous style recalculation, so\n // the new theme is committed while transitions are still suppressed.\n getComputedStyle(document.body).getPropertyValue('transition');\n style.remove();\n };\n};\n\nconst useIsomorphicLayoutEffect = isServer ? useEffect : useLayoutEffect;\n\ntype ThemeContextValue = {\n /** Persisted preference — `system` while following the OS. */\n theme: Theme;\n /** Theme applied to `<html>`. `undefined` until the client resolves it. */\n resolvedTheme: ResolvedTheme | undefined;\n /** Persists a preference and applies it. */\n setTheme: (theme: Theme) => void;\n};\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined);\n\n/** Served outside of a provider, so consumers render light instead of crashing. */\nconst fallbackThemeContext: ThemeContextValue = {\n theme: 'system',\n resolvedTheme: undefined,\n setTheme: () => undefined,\n};\n\n/**\n * Reads and updates the current theme.\n *\n * @example\n * ```tsx\n * const { resolvedTheme, setTheme } = useTheme();\n * ```\n */\nexport const useTheme = (): ThemeContextValue =>\n useContext(ThemeContext) ?? fallbackThemeContext;\n\nexport type ThemeProviderProps = {\n /** `localStorage` key holding the preference. Defaults to `theme`. */\n storageKey?: string;\n /** CSP nonce, required when the page forbids unsafe inline scripts. */\n nonce?: string;\n};\n\nconst Theme: FC<PropsWithChildren<ThemeProviderProps>> = ({\n storageKey = 'theme',\n nonce,\n children,\n}) => {\n // Both the server render and the first client one start from `system`, so\n // the hydrated markup matches; the browser state is read back before paint.\n const [theme, setThemeState] = useState<Theme>('system');\n const [systemTheme, setSystemTheme] = useState<ResolvedTheme | undefined>(\n undefined\n );\n\n const resolvedTheme = theme === 'system' ? systemTheme : theme;\n\n // Read the browser state back before the first paint, then keep following\n // the OS preference and the other tabs.\n useIsomorphicLayoutEffect(() => {\n const media = window.matchMedia(DARK_MEDIA_QUERY);\n\n setThemeState(getStoredTheme(storageKey));\n setSystemTheme(media.matches ? 'dark' : 'light');\n\n const handleSystemChange = (event: MediaQueryListEvent) =>\n setSystemTheme(event.matches ? 'dark' : 'light');\n\n const handleStorageChange = (event: StorageEvent) => {\n if (event.key !== storageKey) return;\n\n setThemeState(getStoredTheme(storageKey));\n };\n\n media.addEventListener('change', handleSystemChange);\n window.addEventListener('storage', handleStorageChange);\n\n return () => {\n media.removeEventListener('change', handleSystemChange);\n window.removeEventListener('storage', handleStorageChange);\n };\n }, [storageKey]);\n\n // Mirror the resolved theme onto `<html>`.\n useIsomorphicLayoutEffect(() => {\n if (!resolvedTheme) return;\n\n const element = document.documentElement;\n\n // The inline bootstrap already applied it on the initial load.\n if (element.getAttribute(THEME_ATTRIBUTE) === resolvedTheme) return;\n\n const restoreTransitions = suppressTransitions(nonce);\n\n element.setAttribute(THEME_ATTRIBUTE, resolvedTheme);\n element.style.colorScheme = resolvedTheme;\n\n restoreTransitions();\n }, [resolvedTheme, nonce]);\n\n const setTheme = useCallback(\n (nextTheme: Theme) => {\n setThemeState(nextTheme);\n\n try {\n localStorage.setItem(storageKey, nextTheme);\n } catch {\n // Storage can throw — the choice then only lasts for this page.\n }\n },\n [storageKey]\n );\n\n const value = useMemo<ThemeContextValue>(\n () => ({ theme, resolvedTheme, setTheme }),\n [theme, resolvedTheme, setTheme]\n );\n\n return (\n <ThemeContext.Provider value={value}>\n <script\n // Browsers hide the nonce value from the DOM API, so echoing it while\n // hydrating would mismatch the server markup.\n nonce={isServer ? nonce : ''}\n // biome-ignore lint/security/noDangerouslySetInnerHtml: the bootstrap has to run before hydration, and its content is built from literals\n dangerouslySetInnerHTML={{ __html: buildBootstrap(storageKey) }}\n />\n {children}\n </ThemeContext.Provider>\n );\n};\n\n/**\n * Applies the persisted theme to `<html>` before the first paint, keeps it in\n * sync with the OS preference and with the other tabs, and exposes it through\n * {@link useTheme}.\n *\n * Nested providers pass through, so a layout can mount one without fighting an\n * outer provider over the `<html>` attribute.\n */\nexport const ThemeProvider: FC<PropsWithChildren<ThemeProviderProps>> = ({\n children,\n ...props\n}) => {\n const parentTheme = useContext(ThemeContext);\n\n if (parentTheme) return <>{children}</>;\n\n return <Theme {...props}>{children}</Theme>;\n};\n"],"mappings":";;;;;;;AAqBA,MAAM,kBAAkB;;AAGxB,MAAM,mBAAmB;AAEzB,MAAM,WAAW,OAAO,WAAW;;;;;;;;;AAUnC,MAAM,eACJ,YACA,gBACA,mBACS;CACT,IAAI,cAA6B;CAEjC,IAAI;EACF,cAAc,aAAa,QAAQ,UAAU;CAC/C,QAAQ,CAER;CAEA,MAAM,QACJ,gBAAgB,WAAW,gBAAgB,SACvC,cACA,OAAO,WAAW,cAAc,CAAC,CAAC,UAChC,SACA;CAER,MAAM,UAAU,SAAS;CAEzB,QAAQ,aAAa,gBAAgB,KAAK;CAC1C,QAAQ,MAAM,cAAc;AAC9B;;AAGA,MAAM,kBAAkB,eACtB,IAAI,YAAY,IAAI,KAAK,UAAU,UAAU,EAAE,GAAG,KAAK,UAAU,eAAe,EAAE,GAAG,KAAK,UAAU,gBAAgB,EAAE;;AAGxH,MAAM,kBAAkB,eAA8B;CACpD,IAAI;EACF,MAAM,cAAc,aAAa,QAAQ,UAAU;EAEnD,IACE,gBAAgB,WAChB,gBAAgB,UAChB,gBAAgB,UAEhB,OAAO;CAEX,QAAQ,CAER;CAEA,OAAO;AACT;;;;;;;AAQA,MAAM,uBAAuB,UAAiC;CAC5D,MAAM,QAAQ,SAAS,cAAc,OAAO;CAE5C,IAAI,OAAO,MAAM,aAAa,SAAS,KAAK;CAE5C,MAAM,YACJ,SAAS,eAAe,iDAAiD,CAC3E;CACA,SAAS,KAAK,YAAY,KAAK;CAE/B,aAAa;EAGX,iBAAiB,SAAS,IAAI,CAAC,CAAC,iBAAiB,YAAY;EAC7D,MAAM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ACb;CAEA,MAAM,QAAQ,eACL;EAAE;EAAO;EAAe;CAAS,IACxC;EAAC;EAAO;EAAe;CAAQ,CACjC;CAEA,OACE,qBAAC,aAAa,UAAd;EAA8B;YAA9B,CACE,oBAAC,UAAD;GAGE,OAAO,WAAW,QAAQ;GAE1B,yBAAyB,EAAE,QAAQ,eAAe,UAAU,EAAE;EAC/D,IACA,QACoB;;AAE3B;;;;;;;;;AAUA,MAAa,iBAA4D,EACvE,UACA,GAAG,YACC;CAGJ,IAFoB,WAAW,YAEjB,GAAG,OAAO,kCAAG,SAAW;CAEtC,OAAO,oBAAC,OAAD;EAAO,GAAI;EAAQ;CAAgB;AAC5C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DeferredAuthProvider, useIsAuthFetchEnabled } from "./DeferredAuthProvider.mjs";
|
|
2
|
+
import { ThemeProvider, useTheme } from "./ThemeProvider.mjs";
|
|
2
3
|
import { ReactQueryProvider, getQueryClient } from "./ReactQueryProvider.mjs";
|
|
3
4
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
|
4
5
|
|
|
5
|
-
export { DeferredAuthProvider, ReactQueryDevtools, ReactQueryProvider, getQueryClient, useIsAuthFetchEnabled };
|
|
6
|
+
export { DeferredAuthProvider, ReactQueryDevtools, ReactQueryProvider, ThemeProvider, getQueryClient, useIsAuthFetchEnabled, useTheme };
|
package/dist/esm/routes.mjs
CHANGED
|
@@ -274,6 +274,7 @@ const Backend_OAuth2_Token = `https://${Backend_Domain}/oauth2/token`;
|
|
|
274
274
|
const Mcp_Root = `https://${Mcp_Domain}`;
|
|
275
275
|
const Mcp_Sse = `https://${Mcp_Domain}/sse`;
|
|
276
276
|
const WellKnown_ApiCatalog_Path = "/.well-known/api-catalog";
|
|
277
|
+
const WellKnown_AiCatalog_Path = "/.well-known/ai-catalog.json";
|
|
277
278
|
const WellKnown_OAuthProtectedResource_Path = "/.well-known/oauth-protected-resource";
|
|
278
279
|
const WellKnown_OAuthAuthorizationServer_Path = "/.well-known/oauth-authorization-server";
|
|
279
280
|
const WellKnown_McpServerCard_Path = "/.well-known/mcp/server-card.json";
|
|
@@ -300,5 +301,5 @@ const External_ExampleIntlayerWithReactNative = "https://github.com/aymericzip/i
|
|
|
300
301
|
const External_ExampleIntlayerWithExpress = "https://github.com/aymericzip/intlayer/tree/main/examples/express-app";
|
|
301
302
|
|
|
302
303
|
//#endregion
|
|
303
|
-
export { App_Admin, App_Admin_Affiliate, App_Admin_Affiliate_Path, App_Admin_Dashboard, App_Admin_Dashboard_Path, App_Admin_Discussions, App_Admin_Discussions_Path, App_Admin_Management, App_Admin_Management_Path, App_Admin_Organizations, App_Admin_Organizations_Path, App_Admin_Path, App_Admin_Projects, App_Admin_Projects_Path, App_Admin_PromoCodes, App_Admin_PromoCodes_Path, App_Admin_Reviewers, App_Admin_Reviewers_Path, App_Admin_Users, App_Admin_Users_Path, App_Affiliation, App_Affiliation_Path, App_Auth_AskResetPassword, App_Auth_AskResetPassword_Path, App_Auth_ChangePassword, App_Auth_ChangePassword_Path, App_Auth_Demo_Path, App_Auth_ResetPassword, App_Auth_ResetPassword_Path, App_Auth_SignIn, App_Auth_SignIn_Path, App_Auth_SignUp, App_Auth_SignUp_Path, App_Auth_TwoFactor, App_Auth_TwoFactor_Path, App_Dashboard, App_Dashboard_Analytics, App_Dashboard_Analytics_Path, App_Dashboard_Assets_Path, App_Dashboard_Dictionaries, App_Dashboard_Dictionaries_Path, App_Dashboard_Editor, App_Dashboard_Editor_Path, App_Dashboard_IDE, App_Dashboard_IDE_Path, App_Dashboard_Organization, App_Dashboard_Organization_Path, App_Dashboard_Profile, App_Dashboard_Profile_Path, App_Dashboard_Projects, App_Dashboard_Projects_Path, App_Dashboard_Scanner, App_Dashboard_Scanner_Path, App_Dashboard_Tags, App_Dashboard_Tags_Path, App_Dashboard_Translate, App_Dashboard_Translate_Path, App_Demo, App_Demo_Path, App_Domain, App_Home_Path, App_Init_Path, App_NotFound_Path, App_Onboarding, App_Onboarding_Path, App_Pricing, App_Pricing_Path, App_ReviewerMarketplace, App_ReviewerMarketplace_Dashboard, App_ReviewerMarketplace_Dashboard_Mission_Path, App_ReviewerMarketplace_Dashboard_Path, App_ReviewerMarketplace_Path, App_ReviewerMarketplace_Reviewer_Path, AuthMd_Path, Backend_Domain, Backend_Health, Backend_OAuth2_Token, Backend_Root, Doc_Blog_Path, Doc_Blog_Root_Path, Doc_Blog_Search_Path, Doc_Blog_What_is_i18n_Path, Doc_CLI_Fill_Path, Doc_CLI_Review_Path, Doc_CLI_Translate_Path, Doc_Chat_Path, Doc_Contributors_Path, Doc_Environment_Adonis_Path, Doc_Environment_Angular_Path, Doc_Environment_Astro_Path, Doc_Environment_CRA_Path, Doc_Environment_Express_Path, Doc_Environment_Fastify_Path, Doc_Environment_Hono_Path, Doc_Environment_Lit_Path, Doc_Environment_Lynx_Path, Doc_Environment_NestJS_Path, Doc_Environment_NextJS_14_Path, Doc_Environment_NextJS_15_Path, Doc_Environment_NextJS_16_Path, Doc_Environment_NextJS_Path, Doc_Environment_Nodejs_Path, Doc_Environment_NuxtAndVue_Path, Doc_Environment_ReactNativeAndExpo_Path, Doc_Environment_Tanstack_Path, Doc_Environment_ViteAndPreact_Path, Doc_Environment_ViteAndReact_Path, Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path, Doc_Environment_ViteAndReact_ReactRouterV7_Path, Doc_Environment_ViteAndSolid_Path, Doc_Environment_ViteAndSvelte_Path, Doc_Environment_ViteAndVue_Path, Doc_FrequentQuestions_Path, Doc_IntlayerCMS_Path, Doc_IntlayerVisualEditor_Path, Doc_Intlayer_with_Lynx_and_React_Path, Doc_MCP_Path, Doc_Path, Doc_PrivacyPolicy_Path, Doc_ReleasesV6_Path, Doc_ReleasesV7_Path, Doc_ReleasesV8_Path, Doc_Root_Path, Doc_Search_Path, Doc_ShowcaseSubmit_Path, Doc_Showcase_Path, Doc_TermsOfService_Path, Doc_Why_Path, External_AI_Landing_Page, External_Discord, External_DockerHub_SelfHost, External_ExampleIntlayerWithExpress, External_ExampleIntlayerWithNextjs, External_ExampleIntlayerWithReactJS, External_ExampleIntlayerWithReactNative, External_ExampleIntlayerWithViteAndPreact, External_ExampleIntlayerWithViteAndReact, External_ExampleIntlayerWithViteAndSolid, External_ExampleIntlayerWithViteAndSvelte, External_ExampleIntlayerWithViteAndVue, External_Examples, External_Github, External_Github_i18n_benchmark, External_LinkedIn, External_ShowcaseApp, LlmsTxt_Path, Mcp_Domain, Mcp_Root, Mcp_Sse, Showcase_Domain, Showcase_Root, Showcase_Root_Path, Showcase_Submit, Showcase_Submit_Path, Website_Benchmark, Website_Benchmark_NextJS, Website_Benchmark_NextJS_Path, Website_Benchmark_Path, Website_Benchmark_Tanstack, Website_Benchmark_Tanstack_Path, Website_Blog, Website_Blog_Path, Website_Blog_Root, Website_Blog_Root_Path, Website_Blog_Search, Website_Blog_Search_Path, Website_Blog_What_is_i18n, Website_Blog_What_is_i18n_Path, Website_CMS, Website_CMS_Path, Website_Changelog, Website_Changelog_Path, Website_Contributors, Website_Contributors_Path, Website_Demo, Website_Demo_Path, Website_Doc, Website_Doc_CLI_Fill, Website_Doc_CLI_Fill_Path, Website_Doc_CLI_Review, Website_Doc_CLI_Review_Path, Website_Doc_CLI_Translate, Website_Doc_CLI_Translate_Path, Website_Doc_Chat, Website_Doc_Chat_Path, Website_Doc_Environment_Adonis, Website_Doc_Environment_Adonis_Path, Website_Doc_Environment_Angular, Website_Doc_Environment_Angular_Path, Website_Doc_Environment_Astro, Website_Doc_Environment_Astro_Path, Website_Doc_Environment_CRA, Website_Doc_Environment_CRA_Path, Website_Doc_Environment_Express, Website_Doc_Environment_Express_Path, Website_Doc_Environment_Fastify, Website_Doc_Environment_Fastify_Path, Website_Doc_Environment_Hono, Website_Doc_Environment_Hono_Path, Website_Doc_Environment_Lit, Website_Doc_Environment_Lit_Path, Website_Doc_Environment_Lynx, Website_Doc_Environment_Lynx_Path, Website_Doc_Environment_NestJS, Website_Doc_Environment_NestJS_Path, Website_Doc_Environment_NextJS, Website_Doc_Environment_NextJS_14, Website_Doc_Environment_NextJS_14_Path, Website_Doc_Environment_NextJS_15, Website_Doc_Environment_NextJS_15_Path, Website_Doc_Environment_NextJS_16, Website_Doc_Environment_NextJS_16_Path, Website_Doc_Environment_NextJS_Path, Website_Doc_Environment_Nodejs, Website_Doc_Environment_Nodejs_Path, Website_Doc_Environment_NuxtAndVue, Website_Doc_Environment_NuxtAndVue_Path, Website_Doc_Environment_ReactNativeAndExpo, Website_Doc_Environment_ReactNativeAndExpo_Path, Website_Doc_Environment_Tanstack, Website_Doc_Environment_Tanstack_Path, Website_Doc_Environment_ViteAndPreact, Website_Doc_Environment_ViteAndPreact_Path, Website_Doc_Environment_ViteAndReact, Website_Doc_Environment_ViteAndReact_Path, Website_Doc_Environment_ViteAndReact_ReactRouterV7, Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes, Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path, Website_Doc_Environment_ViteAndReact_ReactRouterV7_Path, Website_Doc_Environment_ViteAndSolid, Website_Doc_Environment_ViteAndSolid_Path, Website_Doc_Environment_ViteAndSvelte, Website_Doc_Environment_ViteAndSvelte_Path, Website_Doc_Environment_ViteAndVue, Website_Doc_Environment_ViteAndVue_Path, Website_Doc_IntlayerCMS, Website_Doc_IntlayerCMS_Path, Website_Doc_IntlayerVisualEditor, Website_Doc_IntlayerVisualEditor_Path, Website_Doc_Intlayer_with_Lynx_and_React, Website_Doc_Intlayer_with_Lynx_and_React_Path, Website_Doc_MCP, Website_Doc_MCP_Path, Website_Doc_Path, Website_Doc_Root, Website_Doc_Root_Path, Website_Doc_Search, Website_Doc_Search_Path, Website_Doc_SelfHosting, Website_Doc_SelfHosting_Path, Website_Doc_Why, Website_Doc_Why_Path, Website_Domain, Website_FrequentQuestions, Website_FrequentQuestions_Path, Website_Home, Website_Home_Path, Website_Markdown_Preview, Website_Markdown_Preview_Path, Website_NotFound, Website_NotFound_Path, Website_Playground, Website_Playground_Path, Website_PrivacyPolicy, Website_PrivacyPolicy_Path, Website_ReleasesV6, Website_ReleasesV6_Path, Website_ReleasesV7, Website_ReleasesV7_Path, Website_ReleasesV8, Website_ReleasesV8_Path, Website_ReleasesV9_Path, Website_Scanner, Website_Scanner_Path, Website_TMS, Website_TMS_Path, Website_TermsOfService, Website_TermsOfService_Path, Website_Translate, Website_Translate_Path, WellKnown_AgentSkillsIndex_Path, WellKnown_AgentSkills_Path, WellKnown_ApiCatalog_Path, WellKnown_McpServerCard_Path, WellKnown_OAuthAuthorizationServer_Path, WellKnown_OAuthProtectedResource_Path, getAppAdminAffiliateRoute, getAppAdminOrganizationAbsoluteRoute, getAppAdminOrganizationRoute, getAppAdminProjectAbsoluteRoute, getAppAdminProjectRoute, getAppAdminPromoCodeRoute, getAppAdminReviewerRoute, getAppAdminUserAbsoluteRoute, getAppAdminUserRoute, getAppOnboardingFlowAbsoluteRoute, getAppOnboardingFlowRoute, getAppReviewerMissionRoute, getAppReviewerProfileRoute };
|
|
304
|
+
export { App_Admin, App_Admin_Affiliate, App_Admin_Affiliate_Path, App_Admin_Dashboard, App_Admin_Dashboard_Path, App_Admin_Discussions, App_Admin_Discussions_Path, App_Admin_Management, App_Admin_Management_Path, App_Admin_Organizations, App_Admin_Organizations_Path, App_Admin_Path, App_Admin_Projects, App_Admin_Projects_Path, App_Admin_PromoCodes, App_Admin_PromoCodes_Path, App_Admin_Reviewers, App_Admin_Reviewers_Path, App_Admin_Users, App_Admin_Users_Path, App_Affiliation, App_Affiliation_Path, App_Auth_AskResetPassword, App_Auth_AskResetPassword_Path, App_Auth_ChangePassword, App_Auth_ChangePassword_Path, App_Auth_Demo_Path, App_Auth_ResetPassword, App_Auth_ResetPassword_Path, App_Auth_SignIn, App_Auth_SignIn_Path, App_Auth_SignUp, App_Auth_SignUp_Path, App_Auth_TwoFactor, App_Auth_TwoFactor_Path, App_Dashboard, App_Dashboard_Analytics, App_Dashboard_Analytics_Path, App_Dashboard_Assets_Path, App_Dashboard_Dictionaries, App_Dashboard_Dictionaries_Path, App_Dashboard_Editor, App_Dashboard_Editor_Path, App_Dashboard_IDE, App_Dashboard_IDE_Path, App_Dashboard_Organization, App_Dashboard_Organization_Path, App_Dashboard_Profile, App_Dashboard_Profile_Path, App_Dashboard_Projects, App_Dashboard_Projects_Path, App_Dashboard_Scanner, App_Dashboard_Scanner_Path, App_Dashboard_Tags, App_Dashboard_Tags_Path, App_Dashboard_Translate, App_Dashboard_Translate_Path, App_Demo, App_Demo_Path, App_Domain, App_Home_Path, App_Init_Path, App_NotFound_Path, App_Onboarding, App_Onboarding_Path, App_Pricing, App_Pricing_Path, App_ReviewerMarketplace, App_ReviewerMarketplace_Dashboard, App_ReviewerMarketplace_Dashboard_Mission_Path, App_ReviewerMarketplace_Dashboard_Path, App_ReviewerMarketplace_Path, App_ReviewerMarketplace_Reviewer_Path, AuthMd_Path, Backend_Domain, Backend_Health, Backend_OAuth2_Token, Backend_Root, Doc_Blog_Path, Doc_Blog_Root_Path, Doc_Blog_Search_Path, Doc_Blog_What_is_i18n_Path, Doc_CLI_Fill_Path, Doc_CLI_Review_Path, Doc_CLI_Translate_Path, Doc_Chat_Path, Doc_Contributors_Path, Doc_Environment_Adonis_Path, Doc_Environment_Angular_Path, Doc_Environment_Astro_Path, Doc_Environment_CRA_Path, Doc_Environment_Express_Path, Doc_Environment_Fastify_Path, Doc_Environment_Hono_Path, Doc_Environment_Lit_Path, Doc_Environment_Lynx_Path, Doc_Environment_NestJS_Path, Doc_Environment_NextJS_14_Path, Doc_Environment_NextJS_15_Path, Doc_Environment_NextJS_16_Path, Doc_Environment_NextJS_Path, Doc_Environment_Nodejs_Path, Doc_Environment_NuxtAndVue_Path, Doc_Environment_ReactNativeAndExpo_Path, Doc_Environment_Tanstack_Path, Doc_Environment_ViteAndPreact_Path, Doc_Environment_ViteAndReact_Path, Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path, Doc_Environment_ViteAndReact_ReactRouterV7_Path, Doc_Environment_ViteAndSolid_Path, Doc_Environment_ViteAndSvelte_Path, Doc_Environment_ViteAndVue_Path, Doc_FrequentQuestions_Path, Doc_IntlayerCMS_Path, Doc_IntlayerVisualEditor_Path, Doc_Intlayer_with_Lynx_and_React_Path, Doc_MCP_Path, Doc_Path, Doc_PrivacyPolicy_Path, Doc_ReleasesV6_Path, Doc_ReleasesV7_Path, Doc_ReleasesV8_Path, Doc_Root_Path, Doc_Search_Path, Doc_ShowcaseSubmit_Path, Doc_Showcase_Path, Doc_TermsOfService_Path, Doc_Why_Path, External_AI_Landing_Page, External_Discord, External_DockerHub_SelfHost, External_ExampleIntlayerWithExpress, External_ExampleIntlayerWithNextjs, External_ExampleIntlayerWithReactJS, External_ExampleIntlayerWithReactNative, External_ExampleIntlayerWithViteAndPreact, External_ExampleIntlayerWithViteAndReact, External_ExampleIntlayerWithViteAndSolid, External_ExampleIntlayerWithViteAndSvelte, External_ExampleIntlayerWithViteAndVue, External_Examples, External_Github, External_Github_i18n_benchmark, External_LinkedIn, External_ShowcaseApp, LlmsTxt_Path, Mcp_Domain, Mcp_Root, Mcp_Sse, Showcase_Domain, Showcase_Root, Showcase_Root_Path, Showcase_Submit, Showcase_Submit_Path, Website_Benchmark, Website_Benchmark_NextJS, Website_Benchmark_NextJS_Path, Website_Benchmark_Path, Website_Benchmark_Tanstack, Website_Benchmark_Tanstack_Path, Website_Blog, Website_Blog_Path, Website_Blog_Root, Website_Blog_Root_Path, Website_Blog_Search, Website_Blog_Search_Path, Website_Blog_What_is_i18n, Website_Blog_What_is_i18n_Path, Website_CMS, Website_CMS_Path, Website_Changelog, Website_Changelog_Path, Website_Contributors, Website_Contributors_Path, Website_Demo, Website_Demo_Path, Website_Doc, Website_Doc_CLI_Fill, Website_Doc_CLI_Fill_Path, Website_Doc_CLI_Review, Website_Doc_CLI_Review_Path, Website_Doc_CLI_Translate, Website_Doc_CLI_Translate_Path, Website_Doc_Chat, Website_Doc_Chat_Path, Website_Doc_Environment_Adonis, Website_Doc_Environment_Adonis_Path, Website_Doc_Environment_Angular, Website_Doc_Environment_Angular_Path, Website_Doc_Environment_Astro, Website_Doc_Environment_Astro_Path, Website_Doc_Environment_CRA, Website_Doc_Environment_CRA_Path, Website_Doc_Environment_Express, Website_Doc_Environment_Express_Path, Website_Doc_Environment_Fastify, Website_Doc_Environment_Fastify_Path, Website_Doc_Environment_Hono, Website_Doc_Environment_Hono_Path, Website_Doc_Environment_Lit, Website_Doc_Environment_Lit_Path, Website_Doc_Environment_Lynx, Website_Doc_Environment_Lynx_Path, Website_Doc_Environment_NestJS, Website_Doc_Environment_NestJS_Path, Website_Doc_Environment_NextJS, Website_Doc_Environment_NextJS_14, Website_Doc_Environment_NextJS_14_Path, Website_Doc_Environment_NextJS_15, Website_Doc_Environment_NextJS_15_Path, Website_Doc_Environment_NextJS_16, Website_Doc_Environment_NextJS_16_Path, Website_Doc_Environment_NextJS_Path, Website_Doc_Environment_Nodejs, Website_Doc_Environment_Nodejs_Path, Website_Doc_Environment_NuxtAndVue, Website_Doc_Environment_NuxtAndVue_Path, Website_Doc_Environment_ReactNativeAndExpo, Website_Doc_Environment_ReactNativeAndExpo_Path, Website_Doc_Environment_Tanstack, Website_Doc_Environment_Tanstack_Path, Website_Doc_Environment_ViteAndPreact, Website_Doc_Environment_ViteAndPreact_Path, Website_Doc_Environment_ViteAndReact, Website_Doc_Environment_ViteAndReact_Path, Website_Doc_Environment_ViteAndReact_ReactRouterV7, Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes, Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path, Website_Doc_Environment_ViteAndReact_ReactRouterV7_Path, Website_Doc_Environment_ViteAndSolid, Website_Doc_Environment_ViteAndSolid_Path, Website_Doc_Environment_ViteAndSvelte, Website_Doc_Environment_ViteAndSvelte_Path, Website_Doc_Environment_ViteAndVue, Website_Doc_Environment_ViteAndVue_Path, Website_Doc_IntlayerCMS, Website_Doc_IntlayerCMS_Path, Website_Doc_IntlayerVisualEditor, Website_Doc_IntlayerVisualEditor_Path, Website_Doc_Intlayer_with_Lynx_and_React, Website_Doc_Intlayer_with_Lynx_and_React_Path, Website_Doc_MCP, Website_Doc_MCP_Path, Website_Doc_Path, Website_Doc_Root, Website_Doc_Root_Path, Website_Doc_Search, Website_Doc_Search_Path, Website_Doc_SelfHosting, Website_Doc_SelfHosting_Path, Website_Doc_Why, Website_Doc_Why_Path, Website_Domain, Website_FrequentQuestions, Website_FrequentQuestions_Path, Website_Home, Website_Home_Path, Website_Markdown_Preview, Website_Markdown_Preview_Path, Website_NotFound, Website_NotFound_Path, Website_Playground, Website_Playground_Path, Website_PrivacyPolicy, Website_PrivacyPolicy_Path, Website_ReleasesV6, Website_ReleasesV6_Path, Website_ReleasesV7, Website_ReleasesV7_Path, Website_ReleasesV8, Website_ReleasesV8_Path, Website_ReleasesV9_Path, Website_Scanner, Website_Scanner_Path, Website_TMS, Website_TMS_Path, Website_TermsOfService, Website_TermsOfService_Path, Website_Translate, Website_Translate_Path, WellKnown_AgentSkillsIndex_Path, WellKnown_AgentSkills_Path, WellKnown_AiCatalog_Path, WellKnown_ApiCatalog_Path, WellKnown_McpServerCard_Path, WellKnown_OAuthAuthorizationServer_Path, WellKnown_OAuthProtectedResource_Path, getAppAdminAffiliateRoute, getAppAdminOrganizationAbsoluteRoute, getAppAdminOrganizationRoute, getAppAdminProjectAbsoluteRoute, getAppAdminProjectRoute, getAppAdminPromoCodeRoute, getAppAdminReviewerRoute, getAppAdminUserAbsoluteRoute, getAppAdminUserRoute, getAppOnboardingFlowAbsoluteRoute, getAppOnboardingFlowRoute, getAppReviewerMissionRoute, getAppReviewerProfileRoute };
|
|
304
305
|
//# sourceMappingURL=routes.mjs.map
|
package/dist/esm/routes.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.mjs","names":[],"sources":["../../src/routes.ts"],"sourcesContent":["// ============================================================\n// Domains\n// ============================================================\nexport const App_Domain = 'app.intlayer.org' as const;\nexport const Website_Domain = 'intlayer.org' as const;\nexport const Showcase_Domain = 'showcase.intlayer.org' as const;\nexport const Backend_Domain = 'back.intlayer.org' as const;\nexport const Mcp_Domain = 'mcp.intlayer.org' as const;\n\n// ============================================================\n// App paths — relative (app.intlayer.org)\n// ============================================================\nexport const App_Home_Path = '/' as const;\nexport const App_NotFound_Path = '/404' as const;\n\nexport const App_Dashboard_Editor_Path = '/editor' as const;\nexport const App_Dashboard_Translate_Path = '/translate' as const;\nexport const App_Dashboard_Dictionaries_Path = '/dictionary' as const;\nexport const App_Dashboard_Projects_Path = '/projects' as const;\nexport const App_Dashboard_Tags_Path = '/tags' as const;\nexport const App_Dashboard_Organization_Path = '/organization' as const;\nexport const App_Dashboard_Profile_Path = '/profile' as const;\nexport const App_Dashboard_IDE_Path = '/ide' as const;\nexport const App_Dashboard_Scanner_Path = '/scanner' as const;\nexport const App_Dashboard_Assets_Path = '/assets' as const;\nexport const App_Dashboard_Analytics_Path = '/analytics' as const;\n\nexport const App_Pricing_Path = '/pricing' as const;\nexport const App_Affiliation_Path = '/affiliation' as const;\n\nexport const App_Demo_Path = '/demo' as const;\nexport const App_Init_Path = '/init' as const;\n\nexport const App_ReviewerMarketplace_Path = '/find-reviewer' as const;\nexport const App_ReviewerMarketplace_Dashboard_Path =\n '/find-reviewer/dashboard' as const;\nexport const App_ReviewerMarketplace_Reviewer_Path =\n '/find-reviewer/$reviewerId' as const;\nexport const App_ReviewerMarketplace_Dashboard_Mission_Path =\n '/find-reviewer/dashboard/mission/$missionId' as const;\n\nexport const getAppReviewerProfileRoute = (reviewerId: string) =>\n `/find-reviewer/${reviewerId}` as const;\nexport const getAppReviewerMissionRoute = (missionId: string) =>\n `/find-reviewer/dashboard/mission/${missionId}` as const;\n\nexport const App_Auth_SignIn_Path = '/auth/login' as const;\nexport const App_Auth_SignUp_Path = '/auth/register' as const;\nexport const App_Auth_TwoFactor_Path = '/auth/2fa' as const;\nexport const App_Auth_Demo_Path = '/auth/demo' as const;\nexport const App_Auth_AskResetPassword_Path =\n '/auth/password/ask-reset' as const;\nexport const App_Auth_ResetPassword_Path = '/auth/password/reset' as const;\nexport const App_Auth_ChangePassword_Path = '/auth/password/change' as const;\n\nexport const App_Admin_Path = '/admin' as const;\nexport const App_Admin_Users_Path = '/admin/users' as const;\nexport const App_Admin_Organizations_Path = '/admin/organizations' as const;\nexport const App_Admin_Projects_Path = '/admin/projects' as const;\nexport const App_Admin_Dashboard_Path = '/admin/dashboard' as const;\nexport const App_Admin_Management_Path = '/admin/management' as const;\nexport const App_Admin_Discussions_Path = '/admin/discussions' as const;\nexport const App_Admin_Affiliate_Path = '/admin/affiliate' as const;\nexport const getAppAdminAffiliateRoute = (id: string) =>\n `${App_Admin_Affiliate_Path}/${id}` as const;\nexport const App_Admin_PromoCodes_Path = '/admin/promo-code' as const;\nexport const getAppAdminPromoCodeRoute = (id: string) =>\n `${App_Admin_PromoCodes_Path}/${id}` as const;\n\nexport const App_Admin_Reviewers_Path = '/admin/reviewers' as const;\nexport const getAppAdminReviewerRoute = (id: string) =>\n `${App_Admin_Reviewers_Path}/${id}` as const;\n\nexport const App_Onboarding_Path = '/onboarding' as const;\n\nexport const getAppAdminUserRoute = (id: string) =>\n `${App_Admin_Users_Path}/${id}` as const;\nexport const getAppAdminOrganizationRoute = (id: string) =>\n `${App_Admin_Organizations_Path}/${id}` as const;\nexport const getAppAdminProjectRoute = (id: string) =>\n `${App_Admin_Projects_Path}/${id}` as const;\nexport const getAppOnboardingFlowRoute = (step: string) =>\n `${App_Onboarding_Path}/${step}` as const;\n\n// ============================================================\n// App absolute URLs — https://app.intlayer.org\n// ============================================================\nexport const App_Dashboard = `https://${App_Domain}` as const;\nexport const App_Dashboard_Editor =\n `https://${App_Domain}${App_Dashboard_Editor_Path}` as const;\nexport const App_Dashboard_Translate =\n `https://${App_Domain}${App_Dashboard_Translate_Path}` as const;\nexport const App_Dashboard_Dictionaries =\n `https://${App_Domain}${App_Dashboard_Dictionaries_Path}` as const;\nexport const App_Dashboard_Projects =\n `https://${App_Domain}${App_Dashboard_Projects_Path}` as const;\nexport const App_Dashboard_Tags =\n `https://${App_Domain}${App_Dashboard_Tags_Path}` as const;\nexport const App_Dashboard_Organization =\n `https://${App_Domain}${App_Dashboard_Organization_Path}` as const;\nexport const App_Dashboard_Profile =\n `https://${App_Domain}${App_Dashboard_Profile_Path}` as const;\nexport const App_Dashboard_IDE =\n `https://${App_Domain}${App_Dashboard_IDE_Path}` as const;\nexport const App_Dashboard_Scanner =\n `https://${App_Domain}${App_Dashboard_Scanner_Path}` as const;\nexport const App_Dashboard_Analytics =\n `https://${App_Domain}${App_Dashboard_Analytics_Path}` as const;\n\nexport const App_Pricing = `https://${App_Domain}${App_Pricing_Path}` as const;\nexport const App_Affiliation =\n `https://${App_Domain}${App_Affiliation_Path}` as const;\nexport const App_Demo = `https://${App_Domain}${App_Demo_Path}` as const;\n\nexport const App_ReviewerMarketplace =\n `https://${App_Domain}${App_ReviewerMarketplace_Path}` as const;\nexport const App_ReviewerMarketplace_Dashboard =\n `https://${App_Domain}${App_ReviewerMarketplace_Dashboard_Path}` as const;\n\nexport const App_Auth_SignIn =\n `https://${App_Domain}${App_Auth_SignIn_Path}` as const;\nexport const App_Auth_SignUp =\n `https://${App_Domain}${App_Auth_SignUp_Path}` as const;\nexport const App_Auth_TwoFactor =\n `https://${App_Domain}${App_Auth_TwoFactor_Path}` as const;\nexport const App_Auth_AskResetPassword =\n `https://${App_Domain}${App_Auth_AskResetPassword_Path}` as const;\nexport const App_Auth_ResetPassword =\n `https://${App_Domain}${App_Auth_ResetPassword_Path}` as const;\nexport const App_Auth_ChangePassword =\n `https://${App_Domain}${App_Auth_ChangePassword_Path}` as const;\n\nexport const App_Admin = `https://${App_Domain}${App_Admin_Path}` as const;\nexport const App_Admin_Users =\n `https://${App_Domain}${App_Admin_Users_Path}` as const;\nexport const App_Admin_Organizations =\n `https://${App_Domain}${App_Admin_Organizations_Path}` as const;\nexport const App_Admin_Projects =\n `https://${App_Domain}${App_Admin_Projects_Path}` as const;\nexport const App_Admin_Dashboard =\n `https://${App_Domain}${App_Admin_Dashboard_Path}` as const;\nexport const App_Admin_Management =\n `https://${App_Domain}${App_Admin_Management_Path}` as const;\nexport const App_Admin_Discussions =\n `https://${App_Domain}${App_Admin_Discussions_Path}` as const;\nexport const App_Admin_Affiliate =\n `https://${App_Domain}${App_Admin_Affiliate_Path}` as const;\nexport const App_Admin_PromoCodes =\n `https://${App_Domain}${App_Admin_PromoCodes_Path}` as const;\nexport const App_Admin_Reviewers =\n `https://${App_Domain}${App_Admin_Reviewers_Path}` as const;\n\nexport const App_Onboarding =\n `https://${App_Domain}${App_Onboarding_Path}` as const;\n\nexport const getAppAdminUserAbsoluteRoute = (id: string) =>\n `https://${App_Domain}${App_Admin_Users_Path}/${id}` as const;\nexport const getAppAdminOrganizationAbsoluteRoute = (id: string) =>\n `https://${App_Domain}${App_Admin_Organizations_Path}/${id}` as const;\nexport const getAppAdminProjectAbsoluteRoute = (id: string) =>\n `https://${App_Domain}${App_Admin_Projects_Path}/${id}` as const;\nexport const getAppOnboardingFlowAbsoluteRoute = (\n step: string,\n plan: string,\n period?: string\n) =>\n period\n ? `https://${App_Domain}${App_Onboarding_Path}/${step}/${plan}/${period}`\n : (`https://${App_Domain}${App_Onboarding_Path}/${step}/${plan}` as const);\n\n// ============================================================\n// Website paths — relative (intlayer.org)\n// ============================================================\nexport const Website_Home_Path = '/' as const;\nexport const Website_CMS_Path = '/cms' as const;\nexport const Website_TMS_Path = '/tms' as const;\nexport const Website_Translate_Path = '/translate' as const;\nexport const Website_Markdown_Preview_Path = '/markdown' as const;\nexport const Website_Demo_Path = '/demo' as const;\nexport const Website_Playground_Path = '/playground' as const;\nexport const Website_NotFound_Path = '/404' as const;\nexport const Website_Changelog_Path = '/changelog' as const;\nexport const Website_Scanner_Path = '/i18n-seo-scanner' as const;\n\nexport const Website_Doc_Root_Path = '/doc' as const;\nexport const Website_Doc_Path = '/doc/get-started' as const;\nexport const Website_Doc_Why_Path = '/doc/why' as const;\nexport const Website_Doc_Search_Path = '/doc/search' as const;\nexport const Website_Doc_Chat_Path = '/doc/chat' as const;\nexport const Website_Doc_IntlayerVisualEditor_Path =\n '/doc/concept/editor' as const;\nexport const Website_Doc_IntlayerCMS_Path = '/doc/concept/cms' as const;\nexport const Website_Doc_SelfHosting_Path = '/doc/self-hosting' as const;\n\nexport const Website_ReleasesV6_Path = '/doc/releases/v6' as const;\nexport const Website_ReleasesV7_Path = '/doc/releases/v7' as const;\nexport const Website_ReleasesV8_Path = '/doc/releases/v8' as const;\nexport const Website_ReleasesV9_Path = '/doc/releases/v9' as const;\nexport const Website_Doc_Environment_NextJS_Path =\n '/doc/environment/nextjs' as const;\nexport const Website_Doc_Environment_NextJS_16_Path =\n '/doc/environment/nextjs' as const;\nexport const Website_Doc_Environment_NextJS_15_Path =\n '/doc/environment/nextjs/15' as const;\nexport const Website_Doc_Environment_NextJS_14_Path =\n '/doc/environment/nextjs/14' as const;\nexport const Website_Doc_Environment_CRA_Path =\n '/doc/environment/create-react-app' as const;\nexport const Website_Doc_Environment_Astro_Path =\n '/doc/environment/astro' as const;\nexport const Website_Doc_Environment_ViteAndReact_Path =\n '/doc/environment/vite-and-react' as const;\nexport const Website_Doc_Environment_ViteAndReact_ReactRouterV7_Path =\n '/doc/environment/vite-and-react/react-router-v7' as const;\nexport const Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path =\n '/doc/environment/vite-and-react/react-router-v7-fs-routes' as const;\nexport const Website_Doc_Environment_Tanstack_Path =\n '/doc/environment/tanstack-start' as const;\nexport const Website_Doc_Environment_Lit_Path =\n '/doc/environment/vite-and-lit' as const;\nexport const Website_Doc_Environment_Nodejs_Path = '/doc/concept/cli' as const;\nexport const Website_Doc_Environment_Adonis_Path =\n '/doc/environment/adonisjs' as const;\nexport const Website_Doc_Environment_ViteAndVue_Path =\n '/doc/environment/vite-and-vue' as const;\nexport const Website_Doc_Environment_ViteAndSolid_Path =\n '/doc/environment/vite-and-solid' as const;\nexport const Website_Doc_Environment_ViteAndSvelte_Path =\n '/doc/environment/vite-and-svelte' as const;\nexport const Website_Doc_Environment_ViteAndPreact_Path =\n '/doc/environment/vite-and-preact' as const;\nexport const Website_Doc_Environment_NuxtAndVue_Path =\n '/doc/environment/nuxt-and-vue' as const;\nexport const Website_Doc_Intlayer_with_Lynx_and_React_Path =\n '/doc/environment/lynx-and-react' as const;\nexport const Website_Doc_Environment_Angular_Path =\n '/doc/environment/angular' as const;\nexport const Website_Doc_Environment_ReactNativeAndExpo_Path =\n '/doc/environment/react-native-and-expo' as const;\nexport const Website_Doc_Environment_Lynx_Path =\n '/doc/environment/lynx-and-react' as const;\nexport const Website_Doc_Environment_Express_Path =\n '/doc/environment/express' as const;\nexport const Website_Doc_Environment_NestJS_Path =\n '/doc/environment/nest' as const;\nexport const Website_Doc_Environment_Fastify_Path =\n '/doc/environment/fastify' as const;\nexport const Website_Doc_Environment_Hono_Path =\n '/doc/environment/hono' as const;\n\nexport const Website_Doc_CLI_Fill_Path = '/doc/concept/cli/fill' as const;\nexport const Website_Doc_CLI_Translate_Path =\n '/doc/concept/cli/doc-translate' as const;\nexport const Website_Doc_CLI_Review_Path =\n '/doc/concept/cli/doc-review' as const;\n\nexport const Website_Benchmark_Path = '/doc/benchmark' as const;\nexport const Website_Benchmark_NextJS_Path = '/doc/benchmark/nextjs' as const;\nexport const Website_Benchmark_Tanstack_Path =\n '/doc/benchmark/tanstack' as const;\n\nexport const Website_Doc_MCP_Path = '/doc/mcp-server' as const;\n\nexport const Website_Blog_Root_Path = '/blog' as const;\nexport const Website_Blog_Path = '/blog' as const;\nexport const Website_Blog_Search_Path = '/blog' as const;\nexport const Website_Blog_What_is_i18n_Path =\n '/blog/what-is-internationalization' as const;\n\nexport const Website_FrequentQuestions_Path = '/frequent-questions' as const;\nexport const Website_PrivacyPolicy_Path = '/privacy-notice' as const;\nexport const Website_TermsOfService_Path = '/terms-of-service' as const;\nexport const Website_Contributors_Path = '/contributors' as const;\n\n// ============================================================\n// Website absolute URLs — https://intlayer.org\n// ============================================================\nexport const Website_Home =\n `https://${Website_Domain}${Website_Home_Path}` as const;\nexport const Website_CMS =\n `https://${Website_Domain}${Website_CMS_Path}` as const;\nexport const Website_TMS =\n `https://${Website_Domain}${Website_TMS_Path}` as const;\nexport const Website_Translate =\n `https://${Website_Domain}${Website_Translate_Path}` as const;\nexport const Website_Markdown_Preview =\n `https://${Website_Domain}${Website_Markdown_Preview_Path}` as const;\nexport const Website_Demo =\n `https://${Website_Domain}${Website_Demo_Path}` as const;\nexport const Website_Playground =\n `https://${Website_Domain}${Website_Playground_Path}` as const;\nexport const Website_NotFound =\n `https://${Website_Domain}${Website_NotFound_Path}` as const;\nexport const Website_Changelog =\n `https://${Website_Domain}${Website_Changelog_Path}` as const;\nexport const Website_Scanner =\n `https://${Website_Domain}${Website_Scanner_Path}` as const;\nexport const Website_Benchmark =\n `https://${Website_Domain}${Website_Benchmark_Path}` as const;\nexport const Website_Benchmark_NextJS =\n `https://${Website_Domain}${Website_Benchmark_NextJS_Path}` as const;\nexport const Website_Benchmark_Tanstack =\n `https://${Website_Domain}${Website_Benchmark_Tanstack_Path}` as const;\n\nexport const Website_Doc_Root =\n `https://${Website_Domain}${Website_Doc_Root_Path}` as const;\nexport const Website_Doc =\n `https://${Website_Domain}${Website_Doc_Path}` as const;\nexport const Website_Doc_Why =\n `https://${Website_Domain}${Website_Doc_Why_Path}` as const;\nexport const Website_Doc_Search =\n `https://${Website_Domain}${Website_Doc_Search_Path}` as const;\nexport const Website_Doc_Chat =\n `https://${Website_Domain}${Website_Doc_Chat_Path}` as const;\nexport const Website_Doc_IntlayerVisualEditor =\n `https://${Website_Domain}${Website_Doc_IntlayerVisualEditor_Path}` as const;\nexport const Website_Doc_IntlayerCMS =\n `https://${Website_Domain}${Website_Doc_IntlayerCMS_Path}` as const;\nexport const Website_Doc_SelfHosting =\n `https://${Website_Domain}${Website_Doc_SelfHosting_Path}` as const;\n\nexport const Website_ReleasesV6 =\n `https://${Website_Domain}${Website_ReleasesV6_Path}` as const;\nexport const Website_ReleasesV7 =\n `https://${Website_Domain}${Website_ReleasesV7_Path}` as const;\nexport const Website_ReleasesV8 =\n `https://${Website_Domain}${Website_ReleasesV8_Path}` as const;\nexport const Website_Doc_Environment_NextJS =\n `https://${Website_Domain}${Website_Doc_Environment_NextJS_Path}` as const;\nexport const Website_Doc_Environment_NextJS_16 =\n `https://${Website_Domain}${Website_Doc_Environment_NextJS_16_Path}` as const;\nexport const Website_Doc_Environment_NextJS_15 =\n `https://${Website_Domain}${Website_Doc_Environment_NextJS_15_Path}` as const;\nexport const Website_Doc_Environment_NextJS_14 =\n `https://${Website_Domain}${Website_Doc_Environment_NextJS_14_Path}` as const;\nexport const Website_Doc_Environment_CRA =\n `https://${Website_Domain}${Website_Doc_Environment_CRA_Path}` as const;\nexport const Website_Doc_Environment_Astro =\n `https://${Website_Domain}${Website_Doc_Environment_Astro_Path}` as const;\nexport const Website_Doc_Environment_ViteAndReact =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndReact_Path}` as const;\nexport const Website_Doc_Environment_ViteAndReact_ReactRouterV7 =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndReact_ReactRouterV7_Path}` as const;\nexport const Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path}` as const;\nexport const Website_Doc_Environment_Tanstack =\n `https://${Website_Domain}${Website_Doc_Environment_Tanstack_Path}` as const;\nexport const Website_Doc_Environment_Lit =\n `https://${Website_Domain}${Website_Doc_Environment_Lit_Path}` as const;\nexport const Website_Doc_Environment_Nodejs =\n `https://${Website_Domain}${Website_Doc_Environment_Nodejs_Path}` as const;\nexport const Website_Doc_Environment_Adonis =\n `https://${Website_Domain}${Website_Doc_Environment_Adonis_Path}` as const;\nexport const Website_Doc_Environment_ViteAndVue =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndVue_Path}` as const;\nexport const Website_Doc_Environment_ViteAndSolid =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndSolid_Path}` as const;\nexport const Website_Doc_Environment_ViteAndSvelte =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndSvelte_Path}` as const;\nexport const Website_Doc_Environment_ViteAndPreact =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndPreact_Path}` as const;\nexport const Website_Doc_Environment_NuxtAndVue =\n `https://${Website_Domain}${Website_Doc_Environment_NuxtAndVue_Path}` as const;\nexport const Website_Doc_Intlayer_with_Lynx_and_React =\n `https://${Website_Domain}${Website_Doc_Intlayer_with_Lynx_and_React_Path}` as const;\nexport const Website_Doc_Environment_Angular =\n `https://${Website_Domain}${Website_Doc_Environment_Angular_Path}` as const;\nexport const Website_Doc_Environment_ReactNativeAndExpo =\n `https://${Website_Domain}${Website_Doc_Environment_ReactNativeAndExpo_Path}` as const;\nexport const Website_Doc_Environment_Lynx =\n `https://${Website_Domain}${Website_Doc_Environment_Lynx_Path}` as const;\nexport const Website_Doc_Environment_Express =\n `https://${Website_Domain}${Website_Doc_Environment_Express_Path}` as const;\nexport const Website_Doc_Environment_NestJS =\n `https://${Website_Domain}${Website_Doc_Environment_NestJS_Path}` as const;\nexport const Website_Doc_Environment_Fastify =\n `https://${Website_Domain}${Website_Doc_Environment_Fastify_Path}` as const;\nexport const Website_Doc_Environment_Hono =\n `https://${Website_Domain}${Website_Doc_Environment_Hono_Path}` as const;\n\nexport const Website_Doc_CLI_Fill =\n `https://${Website_Domain}${Website_Doc_CLI_Fill_Path}` as const;\nexport const Website_Doc_CLI_Translate =\n `https://${Website_Domain}${Website_Doc_CLI_Translate_Path}` as const;\nexport const Website_Doc_CLI_Review =\n `https://${Website_Domain}${Website_Doc_CLI_Review_Path}` as const;\n\nexport const Website_Doc_MCP =\n `https://${Website_Domain}${Website_Doc_MCP_Path}` as const;\n\nexport const Website_Blog_Root =\n `https://${Website_Domain}${Website_Blog_Root_Path}` as const;\nexport const Website_Blog =\n `https://${Website_Domain}${Website_Blog_Path}` as const;\nexport const Website_Blog_Search =\n `https://${Website_Domain}${Website_Blog_Search_Path}` as const;\nexport const Website_Blog_What_is_i18n =\n `https://${Website_Domain}${Website_Blog_What_is_i18n_Path}` as const;\n\nexport const Website_FrequentQuestions =\n `https://${Website_Domain}${Website_FrequentQuestions_Path}` as const;\nexport const Website_PrivacyPolicy =\n `https://${Website_Domain}${Website_PrivacyPolicy_Path}` as const;\nexport const Website_TermsOfService =\n `https://${Website_Domain}${Website_TermsOfService_Path}` as const;\nexport const Website_Contributors =\n `https://${Website_Domain}${Website_Contributors_Path}` as const;\n\n// ============================================================\n// Doc app paths — relative (served under intlayer.org/doc/*)\n// ============================================================\nexport const Doc_Root_Path = '/doc' as const;\nexport const Doc_Path = '/get-started' as const;\nexport const Doc_Why_Path = '/why' as const;\nexport const Doc_Search_Path = '/search' as const;\nexport const Doc_Chat_Path = '/chat' as const;\nexport const Doc_IntlayerVisualEditor_Path = '/concept/editor' as const;\nexport const Doc_IntlayerCMS_Path = '/concept/cms' as const;\n\nexport const Doc_ReleasesV6_Path = '/releases/v6' as const;\nexport const Doc_ReleasesV7_Path = '/releases/v7' as const;\nexport const Doc_ReleasesV8_Path = '/releases/v8' as const;\nexport const Doc_Environment_NextJS_Path = '/environment/nextjs' as const;\nexport const Doc_Environment_NextJS_16_Path = '/environment/nextjs' as const;\nexport const Doc_Environment_NextJS_15_Path = '/environment/nextjs/15' as const;\nexport const Doc_Environment_NextJS_14_Path = '/environment/nextjs/14' as const;\nexport const Doc_Environment_CRA_Path =\n '/environment/create-react-app' as const;\nexport const Doc_Environment_Astro_Path = '/environment/astro' as const;\nexport const Doc_Environment_ViteAndReact_Path =\n '/environment/vite-and-react' as const;\nexport const Doc_Environment_ViteAndReact_ReactRouterV7_Path =\n '/environment/vite-and-react/react-router-v7' as const;\nexport const Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path =\n '/environment/vite-and-react/react-router-v7-fs-routes' as const;\nexport const Doc_Environment_Tanstack_Path =\n '/environment/tanstack-start' as const;\nexport const Doc_Environment_Lit_Path = '/environment/vite-and-lit' as const;\nexport const Doc_Environment_Nodejs_Path = '/concept/cli' as const;\nexport const Doc_Environment_Adonis_Path = '/environment/adonisjs' as const;\nexport const Doc_Environment_ViteAndVue_Path =\n '/environment/vite-and-vue' as const;\nexport const Doc_Environment_ViteAndSolid_Path =\n '/environment/vite-and-solid' as const;\nexport const Doc_Environment_ViteAndSvelte_Path =\n '/environment/vite-and-svelte' as const;\nexport const Doc_Environment_ViteAndPreact_Path =\n '/environment/vite-and-preact' as const;\nexport const Doc_Environment_NuxtAndVue_Path =\n '/environment/nuxt-and-vue' as const;\nexport const Doc_Intlayer_with_Lynx_and_React_Path =\n '/environment/lynx-and-react' as const;\nexport const Doc_Environment_Angular_Path = '/environment/angular' as const;\nexport const Doc_Environment_ReactNativeAndExpo_Path =\n '/environment/react-native-and-expo' as const;\nexport const Doc_Environment_Lynx_Path = '/environment/lynx-and-react' as const;\nexport const Doc_Environment_Express_Path = '/environment/express' as const;\nexport const Doc_Environment_NestJS_Path = '/environment/nest' as const;\nexport const Doc_Environment_Fastify_Path = '/environment/fastify' as const;\nexport const Doc_Environment_Hono_Path = '/environment/hono' as const;\n\nexport const Doc_CLI_Fill_Path = '/concept/cli/fill' as const;\nexport const Doc_CLI_Translate_Path = '/concept/cli/doc-translate' as const;\nexport const Doc_CLI_Review_Path = '/concept/cli/doc-review' as const;\n\nexport const Doc_MCP_Path = '/mcp-server' as const;\n\nexport const Doc_Blog_Root_Path = '/blog' as const;\nexport const Doc_Blog_Path = '/blog' as const;\nexport const Doc_Blog_Search_Path = '/blog' as const;\nexport const Doc_Blog_What_is_i18n_Path =\n '/blog/what-is-internationalization' as const;\n\nexport const Doc_FrequentQuestions_Path = '/frequent-questions' as const;\nexport const Doc_PrivacyPolicy_Path = '/privacy-notice' as const;\nexport const Doc_TermsOfService_Path = '/terms-of-service' as const;\nexport const Doc_Contributors_Path = '/contributors' as const;\nexport const Doc_Showcase_Path = '/' as const;\nexport const Doc_ShowcaseSubmit_Path = '/submit' as const;\n\n// ============================================================\n// Showcase paths — relative (showcase.intlayer.org)\n// ============================================================\nexport const Showcase_Root_Path = '/' as const;\nexport const Showcase_Submit_Path = '/submit' as const;\n\n// ============================================================\n// Showcase absolute URLs — https://showcase.intlayer.org\n// ============================================================\nexport const Showcase_Root = `https://${Showcase_Domain}` as const;\nexport const Showcase_Submit =\n `https://${Showcase_Domain}${Showcase_Submit_Path}` as const;\n\n// ============================================================\n// Backend absolute URLs — https://back.intlayer.org\n// ============================================================\nexport const Backend_Root = `https://${Backend_Domain}` as const;\nexport const Backend_Health = `https://${Backend_Domain}/health` as const;\nexport const Backend_OAuth2_Token =\n `https://${Backend_Domain}/oauth2/token` as const;\n\n// ============================================================\n// MCP absolute URLs — https://mcp.intlayer.org\n// ============================================================\nexport const Mcp_Root = `https://${Mcp_Domain}` as const;\nexport const Mcp_Sse = `https://${Mcp_Domain}/sse` as const;\n\n// ============================================================\n// Agent discovery paths — relative\n//\n// Well-known documents that let AI agents discover the site's APIs,\n// skills and authentication without scraping HTML.\n// ============================================================\nexport const WellKnown_ApiCatalog_Path = '/.well-known/api-catalog' as const;\nexport const WellKnown_OAuthProtectedResource_Path =\n '/.well-known/oauth-protected-resource' as const;\nexport const WellKnown_OAuthAuthorizationServer_Path =\n '/.well-known/oauth-authorization-server' as const;\nexport const WellKnown_McpServerCard_Path =\n '/.well-known/mcp/server-card.json' as const;\nexport const WellKnown_AgentSkills_Path = '/.well-known/agent-skills' as const;\nexport const WellKnown_AgentSkillsIndex_Path =\n `${WellKnown_AgentSkills_Path}/index.json` as const;\nexport const AuthMd_Path = '/auth.md' as const;\nexport const LlmsTxt_Path = '/llms.txt' as const;\n\n// ============================================================\n// External links\n// ============================================================\nexport const External_Github =\n 'https://github.com/aymericzip/intlayer' as const;\n\nexport const External_DockerHub_SelfHost =\n 'https://hub.docker.com/r/aymericzip/intlayer-selfhost' as const;\n\nexport const External_Github_i18n_benchmark =\n 'https://github.com/intlayer-org/benchmark-i18n' as const;\n\nexport const External_Discord = 'https://discord.gg/7uxamYVeCk' as const;\nexport const External_LinkedIn =\n 'https://www.linkedin.com/company/intlayerorg/' as const;\nexport const External_AI_Landing_Page = 'https://ai.intlayer.org' as const;\nexport const External_ShowcaseApp = `https://${Showcase_Domain}` as const;\nexport const External_Examples =\n 'https://github.com/aymericzip/intlayer/tree/main/examples' as const;\nexport const External_ExampleIntlayerWithNextjs =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/nextjs-15-app' as const;\nexport const External_ExampleIntlayerWithReactJS =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/react-app' as const;\nexport const External_ExampleIntlayerWithViteAndReact =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-react-app' as const;\nexport const External_ExampleIntlayerWithViteAndVue =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-vue-app' as const;\nexport const External_ExampleIntlayerWithViteAndSvelte =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-svelte-app' as const;\nexport const External_ExampleIntlayerWithViteAndSolid =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-solid-app' as const;\nexport const External_ExampleIntlayerWithViteAndPreact =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-preact-app' as const;\nexport const External_ExampleIntlayerWithReactNative =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/react-native-app' as const;\nexport const External_ExampleIntlayerWithExpress =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/express-app' as const;\n"],"mappings":";AAGA,MAAa,aAAa;AAC1B,MAAa,iBAAiB;AAC9B,MAAa,kBAAkB;AAC/B,MAAa,iBAAiB;AAC9B,MAAa,aAAa;AAK1B,MAAa,gBAAgB;AAC7B,MAAa,oBAAoB;AAEjC,MAAa,4BAA4B;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,MAAa,2CACX;AACF,MAAa,4CACX;AACF,MAAa,0CACX;AACF,MAAa,sCACX"}
|
|
1
|
+
{"version":3,"file":"routes.mjs","names":[],"sources":["../../src/routes.ts"],"sourcesContent":["// ============================================================\n// Domains\n// ============================================================\nexport const App_Domain = 'app.intlayer.org' as const;\nexport const Website_Domain = 'intlayer.org' as const;\nexport const Showcase_Domain = 'showcase.intlayer.org' as const;\nexport const Backend_Domain = 'back.intlayer.org' as const;\nexport const Mcp_Domain = 'mcp.intlayer.org' as const;\n\n// ============================================================\n// App paths — relative (app.intlayer.org)\n// ============================================================\nexport const App_Home_Path = '/' as const;\nexport const App_NotFound_Path = '/404' as const;\n\nexport const App_Dashboard_Editor_Path = '/editor' as const;\nexport const App_Dashboard_Translate_Path = '/translate' as const;\nexport const App_Dashboard_Dictionaries_Path = '/dictionary' as const;\nexport const App_Dashboard_Projects_Path = '/projects' as const;\nexport const App_Dashboard_Tags_Path = '/tags' as const;\nexport const App_Dashboard_Organization_Path = '/organization' as const;\nexport const App_Dashboard_Profile_Path = '/profile' as const;\nexport const App_Dashboard_IDE_Path = '/ide' as const;\nexport const App_Dashboard_Scanner_Path = '/scanner' as const;\nexport const App_Dashboard_Assets_Path = '/assets' as const;\nexport const App_Dashboard_Analytics_Path = '/analytics' as const;\n\nexport const App_Pricing_Path = '/pricing' as const;\nexport const App_Affiliation_Path = '/affiliation' as const;\n\nexport const App_Demo_Path = '/demo' as const;\nexport const App_Init_Path = '/init' as const;\n\nexport const App_ReviewerMarketplace_Path = '/find-reviewer' as const;\nexport const App_ReviewerMarketplace_Dashboard_Path =\n '/find-reviewer/dashboard' as const;\nexport const App_ReviewerMarketplace_Reviewer_Path =\n '/find-reviewer/$reviewerId' as const;\nexport const App_ReviewerMarketplace_Dashboard_Mission_Path =\n '/find-reviewer/dashboard/mission/$missionId' as const;\n\nexport const getAppReviewerProfileRoute = (reviewerId: string) =>\n `/find-reviewer/${reviewerId}` as const;\nexport const getAppReviewerMissionRoute = (missionId: string) =>\n `/find-reviewer/dashboard/mission/${missionId}` as const;\n\nexport const App_Auth_SignIn_Path = '/auth/login' as const;\nexport const App_Auth_SignUp_Path = '/auth/register' as const;\nexport const App_Auth_TwoFactor_Path = '/auth/2fa' as const;\nexport const App_Auth_Demo_Path = '/auth/demo' as const;\nexport const App_Auth_AskResetPassword_Path =\n '/auth/password/ask-reset' as const;\nexport const App_Auth_ResetPassword_Path = '/auth/password/reset' as const;\nexport const App_Auth_ChangePassword_Path = '/auth/password/change' as const;\n\nexport const App_Admin_Path = '/admin' as const;\nexport const App_Admin_Users_Path = '/admin/users' as const;\nexport const App_Admin_Organizations_Path = '/admin/organizations' as const;\nexport const App_Admin_Projects_Path = '/admin/projects' as const;\nexport const App_Admin_Dashboard_Path = '/admin/dashboard' as const;\nexport const App_Admin_Management_Path = '/admin/management' as const;\nexport const App_Admin_Discussions_Path = '/admin/discussions' as const;\nexport const App_Admin_Affiliate_Path = '/admin/affiliate' as const;\nexport const getAppAdminAffiliateRoute = (id: string) =>\n `${App_Admin_Affiliate_Path}/${id}` as const;\nexport const App_Admin_PromoCodes_Path = '/admin/promo-code' as const;\nexport const getAppAdminPromoCodeRoute = (id: string) =>\n `${App_Admin_PromoCodes_Path}/${id}` as const;\n\nexport const App_Admin_Reviewers_Path = '/admin/reviewers' as const;\nexport const getAppAdminReviewerRoute = (id: string) =>\n `${App_Admin_Reviewers_Path}/${id}` as const;\n\nexport const App_Onboarding_Path = '/onboarding' as const;\n\nexport const getAppAdminUserRoute = (id: string) =>\n `${App_Admin_Users_Path}/${id}` as const;\nexport const getAppAdminOrganizationRoute = (id: string) =>\n `${App_Admin_Organizations_Path}/${id}` as const;\nexport const getAppAdminProjectRoute = (id: string) =>\n `${App_Admin_Projects_Path}/${id}` as const;\nexport const getAppOnboardingFlowRoute = (step: string) =>\n `${App_Onboarding_Path}/${step}` as const;\n\n// ============================================================\n// App absolute URLs — https://app.intlayer.org\n// ============================================================\nexport const App_Dashboard = `https://${App_Domain}` as const;\nexport const App_Dashboard_Editor =\n `https://${App_Domain}${App_Dashboard_Editor_Path}` as const;\nexport const App_Dashboard_Translate =\n `https://${App_Domain}${App_Dashboard_Translate_Path}` as const;\nexport const App_Dashboard_Dictionaries =\n `https://${App_Domain}${App_Dashboard_Dictionaries_Path}` as const;\nexport const App_Dashboard_Projects =\n `https://${App_Domain}${App_Dashboard_Projects_Path}` as const;\nexport const App_Dashboard_Tags =\n `https://${App_Domain}${App_Dashboard_Tags_Path}` as const;\nexport const App_Dashboard_Organization =\n `https://${App_Domain}${App_Dashboard_Organization_Path}` as const;\nexport const App_Dashboard_Profile =\n `https://${App_Domain}${App_Dashboard_Profile_Path}` as const;\nexport const App_Dashboard_IDE =\n `https://${App_Domain}${App_Dashboard_IDE_Path}` as const;\nexport const App_Dashboard_Scanner =\n `https://${App_Domain}${App_Dashboard_Scanner_Path}` as const;\nexport const App_Dashboard_Analytics =\n `https://${App_Domain}${App_Dashboard_Analytics_Path}` as const;\n\nexport const App_Pricing = `https://${App_Domain}${App_Pricing_Path}` as const;\nexport const App_Affiliation =\n `https://${App_Domain}${App_Affiliation_Path}` as const;\nexport const App_Demo = `https://${App_Domain}${App_Demo_Path}` as const;\n\nexport const App_ReviewerMarketplace =\n `https://${App_Domain}${App_ReviewerMarketplace_Path}` as const;\nexport const App_ReviewerMarketplace_Dashboard =\n `https://${App_Domain}${App_ReviewerMarketplace_Dashboard_Path}` as const;\n\nexport const App_Auth_SignIn =\n `https://${App_Domain}${App_Auth_SignIn_Path}` as const;\nexport const App_Auth_SignUp =\n `https://${App_Domain}${App_Auth_SignUp_Path}` as const;\nexport const App_Auth_TwoFactor =\n `https://${App_Domain}${App_Auth_TwoFactor_Path}` as const;\nexport const App_Auth_AskResetPassword =\n `https://${App_Domain}${App_Auth_AskResetPassword_Path}` as const;\nexport const App_Auth_ResetPassword =\n `https://${App_Domain}${App_Auth_ResetPassword_Path}` as const;\nexport const App_Auth_ChangePassword =\n `https://${App_Domain}${App_Auth_ChangePassword_Path}` as const;\n\nexport const App_Admin = `https://${App_Domain}${App_Admin_Path}` as const;\nexport const App_Admin_Users =\n `https://${App_Domain}${App_Admin_Users_Path}` as const;\nexport const App_Admin_Organizations =\n `https://${App_Domain}${App_Admin_Organizations_Path}` as const;\nexport const App_Admin_Projects =\n `https://${App_Domain}${App_Admin_Projects_Path}` as const;\nexport const App_Admin_Dashboard =\n `https://${App_Domain}${App_Admin_Dashboard_Path}` as const;\nexport const App_Admin_Management =\n `https://${App_Domain}${App_Admin_Management_Path}` as const;\nexport const App_Admin_Discussions =\n `https://${App_Domain}${App_Admin_Discussions_Path}` as const;\nexport const App_Admin_Affiliate =\n `https://${App_Domain}${App_Admin_Affiliate_Path}` as const;\nexport const App_Admin_PromoCodes =\n `https://${App_Domain}${App_Admin_PromoCodes_Path}` as const;\nexport const App_Admin_Reviewers =\n `https://${App_Domain}${App_Admin_Reviewers_Path}` as const;\n\nexport const App_Onboarding =\n `https://${App_Domain}${App_Onboarding_Path}` as const;\n\nexport const getAppAdminUserAbsoluteRoute = (id: string) =>\n `https://${App_Domain}${App_Admin_Users_Path}/${id}` as const;\nexport const getAppAdminOrganizationAbsoluteRoute = (id: string) =>\n `https://${App_Domain}${App_Admin_Organizations_Path}/${id}` as const;\nexport const getAppAdminProjectAbsoluteRoute = (id: string) =>\n `https://${App_Domain}${App_Admin_Projects_Path}/${id}` as const;\nexport const getAppOnboardingFlowAbsoluteRoute = (\n step: string,\n plan: string,\n period?: string\n) =>\n period\n ? `https://${App_Domain}${App_Onboarding_Path}/${step}/${plan}/${period}`\n : (`https://${App_Domain}${App_Onboarding_Path}/${step}/${plan}` as const);\n\n// ============================================================\n// Website paths — relative (intlayer.org)\n// ============================================================\nexport const Website_Home_Path = '/' as const;\nexport const Website_CMS_Path = '/cms' as const;\nexport const Website_TMS_Path = '/tms' as const;\nexport const Website_Translate_Path = '/translate' as const;\nexport const Website_Markdown_Preview_Path = '/markdown' as const;\nexport const Website_Demo_Path = '/demo' as const;\nexport const Website_Playground_Path = '/playground' as const;\nexport const Website_NotFound_Path = '/404' as const;\nexport const Website_Changelog_Path = '/changelog' as const;\nexport const Website_Scanner_Path = '/i18n-seo-scanner' as const;\n\nexport const Website_Doc_Root_Path = '/doc' as const;\nexport const Website_Doc_Path = '/doc/get-started' as const;\nexport const Website_Doc_Why_Path = '/doc/why' as const;\nexport const Website_Doc_Search_Path = '/doc/search' as const;\nexport const Website_Doc_Chat_Path = '/doc/chat' as const;\nexport const Website_Doc_IntlayerVisualEditor_Path =\n '/doc/concept/editor' as const;\nexport const Website_Doc_IntlayerCMS_Path = '/doc/concept/cms' as const;\nexport const Website_Doc_SelfHosting_Path = '/doc/self-hosting' as const;\n\nexport const Website_ReleasesV6_Path = '/doc/releases/v6' as const;\nexport const Website_ReleasesV7_Path = '/doc/releases/v7' as const;\nexport const Website_ReleasesV8_Path = '/doc/releases/v8' as const;\nexport const Website_ReleasesV9_Path = '/doc/releases/v9' as const;\nexport const Website_Doc_Environment_NextJS_Path =\n '/doc/environment/nextjs' as const;\nexport const Website_Doc_Environment_NextJS_16_Path =\n '/doc/environment/nextjs' as const;\nexport const Website_Doc_Environment_NextJS_15_Path =\n '/doc/environment/nextjs/15' as const;\nexport const Website_Doc_Environment_NextJS_14_Path =\n '/doc/environment/nextjs/14' as const;\nexport const Website_Doc_Environment_CRA_Path =\n '/doc/environment/create-react-app' as const;\nexport const Website_Doc_Environment_Astro_Path =\n '/doc/environment/astro' as const;\nexport const Website_Doc_Environment_ViteAndReact_Path =\n '/doc/environment/vite-and-react' as const;\nexport const Website_Doc_Environment_ViteAndReact_ReactRouterV7_Path =\n '/doc/environment/vite-and-react/react-router-v7' as const;\nexport const Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path =\n '/doc/environment/vite-and-react/react-router-v7-fs-routes' as const;\nexport const Website_Doc_Environment_Tanstack_Path =\n '/doc/environment/tanstack-start' as const;\nexport const Website_Doc_Environment_Lit_Path =\n '/doc/environment/vite-and-lit' as const;\nexport const Website_Doc_Environment_Nodejs_Path = '/doc/concept/cli' as const;\nexport const Website_Doc_Environment_Adonis_Path =\n '/doc/environment/adonisjs' as const;\nexport const Website_Doc_Environment_ViteAndVue_Path =\n '/doc/environment/vite-and-vue' as const;\nexport const Website_Doc_Environment_ViteAndSolid_Path =\n '/doc/environment/vite-and-solid' as const;\nexport const Website_Doc_Environment_ViteAndSvelte_Path =\n '/doc/environment/vite-and-svelte' as const;\nexport const Website_Doc_Environment_ViteAndPreact_Path =\n '/doc/environment/vite-and-preact' as const;\nexport const Website_Doc_Environment_NuxtAndVue_Path =\n '/doc/environment/nuxt-and-vue' as const;\nexport const Website_Doc_Intlayer_with_Lynx_and_React_Path =\n '/doc/environment/lynx-and-react' as const;\nexport const Website_Doc_Environment_Angular_Path =\n '/doc/environment/angular' as const;\nexport const Website_Doc_Environment_ReactNativeAndExpo_Path =\n '/doc/environment/react-native-and-expo' as const;\nexport const Website_Doc_Environment_Lynx_Path =\n '/doc/environment/lynx-and-react' as const;\nexport const Website_Doc_Environment_Express_Path =\n '/doc/environment/express' as const;\nexport const Website_Doc_Environment_NestJS_Path =\n '/doc/environment/nest' as const;\nexport const Website_Doc_Environment_Fastify_Path =\n '/doc/environment/fastify' as const;\nexport const Website_Doc_Environment_Hono_Path =\n '/doc/environment/hono' as const;\n\nexport const Website_Doc_CLI_Fill_Path = '/doc/concept/cli/fill' as const;\nexport const Website_Doc_CLI_Translate_Path =\n '/doc/concept/cli/doc-translate' as const;\nexport const Website_Doc_CLI_Review_Path =\n '/doc/concept/cli/doc-review' as const;\n\nexport const Website_Benchmark_Path = '/doc/benchmark' as const;\nexport const Website_Benchmark_NextJS_Path = '/doc/benchmark/nextjs' as const;\nexport const Website_Benchmark_Tanstack_Path =\n '/doc/benchmark/tanstack' as const;\n\nexport const Website_Doc_MCP_Path = '/doc/mcp-server' as const;\n\nexport const Website_Blog_Root_Path = '/blog' as const;\nexport const Website_Blog_Path = '/blog' as const;\nexport const Website_Blog_Search_Path = '/blog' as const;\nexport const Website_Blog_What_is_i18n_Path =\n '/blog/what-is-internationalization' as const;\n\nexport const Website_FrequentQuestions_Path = '/frequent-questions' as const;\nexport const Website_PrivacyPolicy_Path = '/privacy-notice' as const;\nexport const Website_TermsOfService_Path = '/terms-of-service' as const;\nexport const Website_Contributors_Path = '/contributors' as const;\n\n// ============================================================\n// Website absolute URLs — https://intlayer.org\n// ============================================================\nexport const Website_Home =\n `https://${Website_Domain}${Website_Home_Path}` as const;\nexport const Website_CMS =\n `https://${Website_Domain}${Website_CMS_Path}` as const;\nexport const Website_TMS =\n `https://${Website_Domain}${Website_TMS_Path}` as const;\nexport const Website_Translate =\n `https://${Website_Domain}${Website_Translate_Path}` as const;\nexport const Website_Markdown_Preview =\n `https://${Website_Domain}${Website_Markdown_Preview_Path}` as const;\nexport const Website_Demo =\n `https://${Website_Domain}${Website_Demo_Path}` as const;\nexport const Website_Playground =\n `https://${Website_Domain}${Website_Playground_Path}` as const;\nexport const Website_NotFound =\n `https://${Website_Domain}${Website_NotFound_Path}` as const;\nexport const Website_Changelog =\n `https://${Website_Domain}${Website_Changelog_Path}` as const;\nexport const Website_Scanner =\n `https://${Website_Domain}${Website_Scanner_Path}` as const;\nexport const Website_Benchmark =\n `https://${Website_Domain}${Website_Benchmark_Path}` as const;\nexport const Website_Benchmark_NextJS =\n `https://${Website_Domain}${Website_Benchmark_NextJS_Path}` as const;\nexport const Website_Benchmark_Tanstack =\n `https://${Website_Domain}${Website_Benchmark_Tanstack_Path}` as const;\n\nexport const Website_Doc_Root =\n `https://${Website_Domain}${Website_Doc_Root_Path}` as const;\nexport const Website_Doc =\n `https://${Website_Domain}${Website_Doc_Path}` as const;\nexport const Website_Doc_Why =\n `https://${Website_Domain}${Website_Doc_Why_Path}` as const;\nexport const Website_Doc_Search =\n `https://${Website_Domain}${Website_Doc_Search_Path}` as const;\nexport const Website_Doc_Chat =\n `https://${Website_Domain}${Website_Doc_Chat_Path}` as const;\nexport const Website_Doc_IntlayerVisualEditor =\n `https://${Website_Domain}${Website_Doc_IntlayerVisualEditor_Path}` as const;\nexport const Website_Doc_IntlayerCMS =\n `https://${Website_Domain}${Website_Doc_IntlayerCMS_Path}` as const;\nexport const Website_Doc_SelfHosting =\n `https://${Website_Domain}${Website_Doc_SelfHosting_Path}` as const;\n\nexport const Website_ReleasesV6 =\n `https://${Website_Domain}${Website_ReleasesV6_Path}` as const;\nexport const Website_ReleasesV7 =\n `https://${Website_Domain}${Website_ReleasesV7_Path}` as const;\nexport const Website_ReleasesV8 =\n `https://${Website_Domain}${Website_ReleasesV8_Path}` as const;\nexport const Website_Doc_Environment_NextJS =\n `https://${Website_Domain}${Website_Doc_Environment_NextJS_Path}` as const;\nexport const Website_Doc_Environment_NextJS_16 =\n `https://${Website_Domain}${Website_Doc_Environment_NextJS_16_Path}` as const;\nexport const Website_Doc_Environment_NextJS_15 =\n `https://${Website_Domain}${Website_Doc_Environment_NextJS_15_Path}` as const;\nexport const Website_Doc_Environment_NextJS_14 =\n `https://${Website_Domain}${Website_Doc_Environment_NextJS_14_Path}` as const;\nexport const Website_Doc_Environment_CRA =\n `https://${Website_Domain}${Website_Doc_Environment_CRA_Path}` as const;\nexport const Website_Doc_Environment_Astro =\n `https://${Website_Domain}${Website_Doc_Environment_Astro_Path}` as const;\nexport const Website_Doc_Environment_ViteAndReact =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndReact_Path}` as const;\nexport const Website_Doc_Environment_ViteAndReact_ReactRouterV7 =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndReact_ReactRouterV7_Path}` as const;\nexport const Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path}` as const;\nexport const Website_Doc_Environment_Tanstack =\n `https://${Website_Domain}${Website_Doc_Environment_Tanstack_Path}` as const;\nexport const Website_Doc_Environment_Lit =\n `https://${Website_Domain}${Website_Doc_Environment_Lit_Path}` as const;\nexport const Website_Doc_Environment_Nodejs =\n `https://${Website_Domain}${Website_Doc_Environment_Nodejs_Path}` as const;\nexport const Website_Doc_Environment_Adonis =\n `https://${Website_Domain}${Website_Doc_Environment_Adonis_Path}` as const;\nexport const Website_Doc_Environment_ViteAndVue =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndVue_Path}` as const;\nexport const Website_Doc_Environment_ViteAndSolid =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndSolid_Path}` as const;\nexport const Website_Doc_Environment_ViteAndSvelte =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndSvelte_Path}` as const;\nexport const Website_Doc_Environment_ViteAndPreact =\n `https://${Website_Domain}${Website_Doc_Environment_ViteAndPreact_Path}` as const;\nexport const Website_Doc_Environment_NuxtAndVue =\n `https://${Website_Domain}${Website_Doc_Environment_NuxtAndVue_Path}` as const;\nexport const Website_Doc_Intlayer_with_Lynx_and_React =\n `https://${Website_Domain}${Website_Doc_Intlayer_with_Lynx_and_React_Path}` as const;\nexport const Website_Doc_Environment_Angular =\n `https://${Website_Domain}${Website_Doc_Environment_Angular_Path}` as const;\nexport const Website_Doc_Environment_ReactNativeAndExpo =\n `https://${Website_Domain}${Website_Doc_Environment_ReactNativeAndExpo_Path}` as const;\nexport const Website_Doc_Environment_Lynx =\n `https://${Website_Domain}${Website_Doc_Environment_Lynx_Path}` as const;\nexport const Website_Doc_Environment_Express =\n `https://${Website_Domain}${Website_Doc_Environment_Express_Path}` as const;\nexport const Website_Doc_Environment_NestJS =\n `https://${Website_Domain}${Website_Doc_Environment_NestJS_Path}` as const;\nexport const Website_Doc_Environment_Fastify =\n `https://${Website_Domain}${Website_Doc_Environment_Fastify_Path}` as const;\nexport const Website_Doc_Environment_Hono =\n `https://${Website_Domain}${Website_Doc_Environment_Hono_Path}` as const;\n\nexport const Website_Doc_CLI_Fill =\n `https://${Website_Domain}${Website_Doc_CLI_Fill_Path}` as const;\nexport const Website_Doc_CLI_Translate =\n `https://${Website_Domain}${Website_Doc_CLI_Translate_Path}` as const;\nexport const Website_Doc_CLI_Review =\n `https://${Website_Domain}${Website_Doc_CLI_Review_Path}` as const;\n\nexport const Website_Doc_MCP =\n `https://${Website_Domain}${Website_Doc_MCP_Path}` as const;\n\nexport const Website_Blog_Root =\n `https://${Website_Domain}${Website_Blog_Root_Path}` as const;\nexport const Website_Blog =\n `https://${Website_Domain}${Website_Blog_Path}` as const;\nexport const Website_Blog_Search =\n `https://${Website_Domain}${Website_Blog_Search_Path}` as const;\nexport const Website_Blog_What_is_i18n =\n `https://${Website_Domain}${Website_Blog_What_is_i18n_Path}` as const;\n\nexport const Website_FrequentQuestions =\n `https://${Website_Domain}${Website_FrequentQuestions_Path}` as const;\nexport const Website_PrivacyPolicy =\n `https://${Website_Domain}${Website_PrivacyPolicy_Path}` as const;\nexport const Website_TermsOfService =\n `https://${Website_Domain}${Website_TermsOfService_Path}` as const;\nexport const Website_Contributors =\n `https://${Website_Domain}${Website_Contributors_Path}` as const;\n\n// ============================================================\n// Doc app paths — relative (served under intlayer.org/doc/*)\n// ============================================================\nexport const Doc_Root_Path = '/doc' as const;\nexport const Doc_Path = '/get-started' as const;\nexport const Doc_Why_Path = '/why' as const;\nexport const Doc_Search_Path = '/search' as const;\nexport const Doc_Chat_Path = '/chat' as const;\nexport const Doc_IntlayerVisualEditor_Path = '/concept/editor' as const;\nexport const Doc_IntlayerCMS_Path = '/concept/cms' as const;\n\nexport const Doc_ReleasesV6_Path = '/releases/v6' as const;\nexport const Doc_ReleasesV7_Path = '/releases/v7' as const;\nexport const Doc_ReleasesV8_Path = '/releases/v8' as const;\nexport const Doc_Environment_NextJS_Path = '/environment/nextjs' as const;\nexport const Doc_Environment_NextJS_16_Path = '/environment/nextjs' as const;\nexport const Doc_Environment_NextJS_15_Path = '/environment/nextjs/15' as const;\nexport const Doc_Environment_NextJS_14_Path = '/environment/nextjs/14' as const;\nexport const Doc_Environment_CRA_Path =\n '/environment/create-react-app' as const;\nexport const Doc_Environment_Astro_Path = '/environment/astro' as const;\nexport const Doc_Environment_ViteAndReact_Path =\n '/environment/vite-and-react' as const;\nexport const Doc_Environment_ViteAndReact_ReactRouterV7_Path =\n '/environment/vite-and-react/react-router-v7' as const;\nexport const Doc_Environment_ViteAndReact_ReactRouterV7_FSRoutes_Path =\n '/environment/vite-and-react/react-router-v7-fs-routes' as const;\nexport const Doc_Environment_Tanstack_Path =\n '/environment/tanstack-start' as const;\nexport const Doc_Environment_Lit_Path = '/environment/vite-and-lit' as const;\nexport const Doc_Environment_Nodejs_Path = '/concept/cli' as const;\nexport const Doc_Environment_Adonis_Path = '/environment/adonisjs' as const;\nexport const Doc_Environment_ViteAndVue_Path =\n '/environment/vite-and-vue' as const;\nexport const Doc_Environment_ViteAndSolid_Path =\n '/environment/vite-and-solid' as const;\nexport const Doc_Environment_ViteAndSvelte_Path =\n '/environment/vite-and-svelte' as const;\nexport const Doc_Environment_ViteAndPreact_Path =\n '/environment/vite-and-preact' as const;\nexport const Doc_Environment_NuxtAndVue_Path =\n '/environment/nuxt-and-vue' as const;\nexport const Doc_Intlayer_with_Lynx_and_React_Path =\n '/environment/lynx-and-react' as const;\nexport const Doc_Environment_Angular_Path = '/environment/angular' as const;\nexport const Doc_Environment_ReactNativeAndExpo_Path =\n '/environment/react-native-and-expo' as const;\nexport const Doc_Environment_Lynx_Path = '/environment/lynx-and-react' as const;\nexport const Doc_Environment_Express_Path = '/environment/express' as const;\nexport const Doc_Environment_NestJS_Path = '/environment/nest' as const;\nexport const Doc_Environment_Fastify_Path = '/environment/fastify' as const;\nexport const Doc_Environment_Hono_Path = '/environment/hono' as const;\n\nexport const Doc_CLI_Fill_Path = '/concept/cli/fill' as const;\nexport const Doc_CLI_Translate_Path = '/concept/cli/doc-translate' as const;\nexport const Doc_CLI_Review_Path = '/concept/cli/doc-review' as const;\n\nexport const Doc_MCP_Path = '/mcp-server' as const;\n\nexport const Doc_Blog_Root_Path = '/blog' as const;\nexport const Doc_Blog_Path = '/blog' as const;\nexport const Doc_Blog_Search_Path = '/blog' as const;\nexport const Doc_Blog_What_is_i18n_Path =\n '/blog/what-is-internationalization' as const;\n\nexport const Doc_FrequentQuestions_Path = '/frequent-questions' as const;\nexport const Doc_PrivacyPolicy_Path = '/privacy-notice' as const;\nexport const Doc_TermsOfService_Path = '/terms-of-service' as const;\nexport const Doc_Contributors_Path = '/contributors' as const;\nexport const Doc_Showcase_Path = '/' as const;\nexport const Doc_ShowcaseSubmit_Path = '/submit' as const;\n\n// ============================================================\n// Showcase paths — relative (showcase.intlayer.org)\n// ============================================================\nexport const Showcase_Root_Path = '/' as const;\nexport const Showcase_Submit_Path = '/submit' as const;\n\n// ============================================================\n// Showcase absolute URLs — https://showcase.intlayer.org\n// ============================================================\nexport const Showcase_Root = `https://${Showcase_Domain}` as const;\nexport const Showcase_Submit =\n `https://${Showcase_Domain}${Showcase_Submit_Path}` as const;\n\n// ============================================================\n// Backend absolute URLs — https://back.intlayer.org\n// ============================================================\nexport const Backend_Root = `https://${Backend_Domain}` as const;\nexport const Backend_Health = `https://${Backend_Domain}/health` as const;\nexport const Backend_OAuth2_Token =\n `https://${Backend_Domain}/oauth2/token` as const;\n\n// ============================================================\n// MCP absolute URLs — https://mcp.intlayer.org\n// ============================================================\nexport const Mcp_Root = `https://${Mcp_Domain}` as const;\nexport const Mcp_Sse = `https://${Mcp_Domain}/sse` as const;\n\n// ============================================================\n// Agent discovery paths — relative\n//\n// Well-known documents that let AI agents discover the site's APIs,\n// skills and authentication without scraping HTML.\n// ============================================================\nexport const WellKnown_ApiCatalog_Path = '/.well-known/api-catalog' as const;\nexport const WellKnown_AiCatalog_Path = '/.well-known/ai-catalog.json' as const;\nexport const WellKnown_OAuthProtectedResource_Path =\n '/.well-known/oauth-protected-resource' as const;\nexport const WellKnown_OAuthAuthorizationServer_Path =\n '/.well-known/oauth-authorization-server' as const;\nexport const WellKnown_McpServerCard_Path =\n '/.well-known/mcp/server-card.json' as const;\nexport const WellKnown_AgentSkills_Path = '/.well-known/agent-skills' as const;\nexport const WellKnown_AgentSkillsIndex_Path =\n `${WellKnown_AgentSkills_Path}/index.json` as const;\nexport const AuthMd_Path = '/auth.md' as const;\nexport const LlmsTxt_Path = '/llms.txt' as const;\n\n// ============================================================\n// External links\n// ============================================================\nexport const External_Github =\n 'https://github.com/aymericzip/intlayer' as const;\n\nexport const External_DockerHub_SelfHost =\n 'https://hub.docker.com/r/aymericzip/intlayer-selfhost' as const;\n\nexport const External_Github_i18n_benchmark =\n 'https://github.com/intlayer-org/benchmark-i18n' as const;\n\nexport const External_Discord = 'https://discord.gg/7uxamYVeCk' as const;\nexport const External_LinkedIn =\n 'https://www.linkedin.com/company/intlayerorg/' as const;\nexport const External_AI_Landing_Page = 'https://ai.intlayer.org' as const;\nexport const External_ShowcaseApp = `https://${Showcase_Domain}` as const;\nexport const External_Examples =\n 'https://github.com/aymericzip/intlayer/tree/main/examples' as const;\nexport const External_ExampleIntlayerWithNextjs =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/nextjs-15-app' as const;\nexport const External_ExampleIntlayerWithReactJS =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/react-app' as const;\nexport const External_ExampleIntlayerWithViteAndReact =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-react-app' as const;\nexport const External_ExampleIntlayerWithViteAndVue =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-vue-app' as const;\nexport const External_ExampleIntlayerWithViteAndSvelte =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-svelte-app' as const;\nexport const External_ExampleIntlayerWithViteAndSolid =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-solid-app' as const;\nexport const External_ExampleIntlayerWithViteAndPreact =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/vite-preact-app' as const;\nexport const External_ExampleIntlayerWithReactNative =\n 'https://github.com/aymericzip/intlayer/tree/main/examples/react-native-app' as const;\nexport const External_ExampleIntlayerWithExpress =\n 'https://github.com/aymericz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AEF,MAAa,8BACX;AAEF,MAAa,iCACX;AAEF,MAAa,mBAAmB;AAChC,MAAa,oBACX;AACF,MAAa,2BAA2B;AACxC,MAAa,uBAAuB,WAAW;AAC/C,MAAa,oBACX;AACF,MAAa,qCACX;AACF,MAAa,sCACX;AACF,MAAa,2CACX;AACF,MAAa,yCACX;AACF,MAAa,4CACX;AACF,MAAa,2CACX;AACF,MAAa,4CACX;AACF,MAAa,0CACX;AACF,MAAa,sCACX"}
|
|
@@ -39,7 +39,7 @@ const buildCreativeWorkJsonLd = ({ type = "CreativeWork", name, description, con
|
|
|
39
39
|
name,
|
|
40
40
|
headline: name,
|
|
41
41
|
...ogImageUrl ? { image: normalizeJsonLdUrl(ogImageUrl) } : {},
|
|
42
|
-
text: content,
|
|
42
|
+
...content ? { text: content } : {},
|
|
43
43
|
description,
|
|
44
44
|
url: normalizeJsonLdUrl(url),
|
|
45
45
|
datePublished: datePublished ? formatDate(datePublished) : void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildCreativeWorkJsonLd.mjs","names":[],"sources":["../../../src/structured-data/buildCreativeWorkJsonLd.ts"],"sourcesContent":["/** @module buildCreativeWorkJsonLd */\n\nimport { normalizeJsonLdUrl } from './normalizeJsonLdUrl';\n\n
|
|
1
|
+
{"version":3,"file":"buildCreativeWorkJsonLd.mjs","names":[],"sources":["../../../src/structured-data/buildCreativeWorkJsonLd.ts"],"sourcesContent":["/** @module buildCreativeWorkJsonLd */\n\nimport { normalizeJsonLdUrl } from './normalizeJsonLdUrl';\n\n/**\n * Formats a date as ISO 8601 `YYYY-MM-DD`, the shape Schema.org expects.\n *\n * Dates originate from markdown frontmatter, so a typo (`2024-24-12`) yields an\n * `Invalid Date` whose `toISOString()` throws. A structured-data field is never\n * worth failing a page render — let alone a whole static export — so an\n * unusable date is simply omitted from the JSON-LD.\n *\n * @param date - Date to format, possibly invalid.\n * @returns The `YYYY-MM-DD` representation, or `undefined` when unusable.\n */\nconst formatDate = (date?: Date): string | undefined => {\n if (!(date instanceof Date) || Number.isNaN(date.getTime())) {\n return undefined;\n }\n return date.toISOString().split('T')[0]!;\n};\n\nexport type CreativeWorkType =\n | 'CreativeWork'\n | 'TechArticle'\n | 'Article'\n | 'BlogPosting'\n | 'WebPage';\n\n/** Minimal Schema.org Person node accepted as author / creator. */\nexport type SchemaOrgPersonNode = {\n '@type': 'Person';\n '@id'?: string;\n name: string;\n url?: string;\n [key: string]: unknown;\n};\n\nexport type BuildCreativeWorkJsonLdParams = {\n type?: CreativeWorkType;\n name: string;\n description: string;\n /**\n * Full text / markdown body of the document, emitted as `text`.\n *\n * Omit it for long documents: `text` duplicates the whole page inside the\n * `<head>`, which is bytes every reader downloads and parses before the\n * article itself can paint.\n */\n content?: string;\n keywords: string;\n datePublished?: Date;\n dateModified?: Date;\n url?: string;\n /** Pre-resolved Schema.org Person node (output of `buildAuthorJsonLd`). */\n author?: SchemaOrgPersonNode;\n /** Version string from the document revision history. */\n version?: string;\n /** Schema.org Audience `audienceType` value. */\n audienceType: string;\n /** Publisher organization name (defaults to \"Intlayer\"). */\n publisherName?: string;\n /** Absolute URL of the publisher logo. */\n publisherLogoUrl?: string;\n /** Absolute URL of the OG image. */\n ogImageUrl?: string;\n};\n\n/**\n * Builds a Schema.org CreativeWork (or subtype) JSON-LD object.\n *\n * @param params - Document / article metadata.\n * @returns A JSON-LD CreativeWork object ready for serialization.\n */\nexport const buildCreativeWorkJsonLd = ({\n type = 'CreativeWork',\n name,\n description,\n content,\n keywords,\n datePublished,\n dateModified,\n url,\n author,\n version,\n audienceType,\n publisherName = 'Intlayer',\n publisherLogoUrl,\n ogImageUrl,\n}: BuildCreativeWorkJsonLdParams) => ({\n '@context': 'https://schema.org' as const,\n '@type': type,\n author,\n creator: author,\n ...(publisherLogoUrl\n ? {\n publisher: {\n '@type': 'Organization' as const,\n name: publisherName,\n logo: {\n '@type': 'ImageObject' as const,\n url: normalizeJsonLdUrl(publisherLogoUrl),\n },\n },\n }\n : {}),\n name,\n headline: name,\n ...(ogImageUrl ? { image: normalizeJsonLdUrl(ogImageUrl) } : {}),\n ...(content ? { text: content } : {}),\n description,\n url: normalizeJsonLdUrl(url),\n datePublished: datePublished ? formatDate(datePublished) : undefined,\n dateModified: dateModified ? formatDate(dateModified) : undefined,\n version,\n keywords,\n license:\n 'https://raw.githubusercontent.com/aymericzip/intlayer/refs/heads/main/LICENSE',\n audience: {\n '@type': 'Audience' as const,\n audienceType,\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,cAAc,SAAoC;CACtD,IAAI,EAAE,gBAAgB,SAAS,OAAO,MAAM,KAAK,QAAQ,CAAC,GACxD;CAEF,OAAO,KAAK,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AACvC;;;;;;;AAsDA,MAAa,2BAA2B,EACtC,OAAO,gBACP,MACA,aACA,SACA,UACA,eACA,cACA,KACA,QACA,SACA,cACA,gBAAgB,YAChB,kBACA,kBACoC;CACpC,YAAY;CACZ,SAAS;CACT;CACA,SAAS;CACT,GAAI,mBACA,EACE,WAAW;EACT,SAAS;EACT,MAAM;EACN,MAAM;GACJ,SAAS;GACT,KAAK,mBAAmB,gBAAgB;EAC1C;CACF,EACF,IACA,CAAC;CACL;CACA,UAAU;CACV,GAAI,aAAa,EAAE,OAAO,mBAAmB,UAAU,EAAE,IAAI,CAAC;CAC9D,GAAI,UAAU,EAAE,MAAM,QAAQ,IAAI,CAAC;CACnC;CACA,KAAK,mBAAmB,GAAG;CAC3B,eAAe,gBAAgB,WAAW,aAAa,IAAI;CAC3D,cAAc,eAAe,WAAW,YAAY,IAAI;CACxD;CACA;CACA,SACE;CACF,UAAU;EACR,SAAS;EACT;CACF;AACF"}
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//#region src/utils/observeScrollExtent.ts
|
|
2
|
+
/**
|
|
3
|
+
* Watches everything that changes how far an element can scroll: its own box,
|
|
4
|
+
* and the boxes of the content it scrolls over.
|
|
5
|
+
*
|
|
6
|
+
* A `ResizeObserver` on the scroll container alone stays silent while its
|
|
7
|
+
* content grows — a container with a capped height keeps that height whatever
|
|
8
|
+
* it contains. Observing its children covers the content side, which is the
|
|
9
|
+
* half that actually moves the scroll extent.
|
|
10
|
+
*
|
|
11
|
+
* @param container - The scrolling element.
|
|
12
|
+
* @param onResize - Called when the container or its content is resized, and
|
|
13
|
+
* when children are added to or removed from the container.
|
|
14
|
+
* @returns A function disconnecting the observers.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const stopObserving = observeScrollExtent(contentElement, invalidateOffsets);
|
|
18
|
+
*/
|
|
19
|
+
const observeScrollExtent = (container, onResize) => {
|
|
20
|
+
const resizeObserver = new ResizeObserver(onResize);
|
|
21
|
+
const observeContent = () => {
|
|
22
|
+
resizeObserver.observe(container);
|
|
23
|
+
for (const child of Array.from(container.children)) resizeObserver.observe(child);
|
|
24
|
+
};
|
|
25
|
+
observeContent();
|
|
26
|
+
const mutationObserver = new MutationObserver(() => {
|
|
27
|
+
observeContent();
|
|
28
|
+
onResize();
|
|
29
|
+
});
|
|
30
|
+
mutationObserver.observe(container, { childList: true });
|
|
31
|
+
return () => {
|
|
32
|
+
resizeObserver.disconnect();
|
|
33
|
+
mutationObserver.disconnect();
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { observeScrollExtent };
|
|
39
|
+
//# sourceMappingURL=observeScrollExtent.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observeScrollExtent.mjs","names":[],"sources":["../../../src/utils/observeScrollExtent.ts"],"sourcesContent":["/**\n * Watches everything that changes how far an element can scroll: its own box,\n * and the boxes of the content it scrolls over.\n *\n * A `ResizeObserver` on the scroll container alone stays silent while its\n * content grows — a container with a capped height keeps that height whatever\n * it contains. Observing its children covers the content side, which is the\n * half that actually moves the scroll extent.\n *\n * @param container - The scrolling element.\n * @param onResize - Called when the container or its content is resized, and\n * when children are added to or removed from the container.\n * @returns A function disconnecting the observers.\n *\n * @example\n * const stopObserving = observeScrollExtent(contentElement, invalidateOffsets);\n */\nexport const observeScrollExtent = (\n container: HTMLElement,\n onResize: () => void\n): (() => void) => {\n const resizeObserver = new ResizeObserver(onResize);\n\n const observeContent = () => {\n resizeObserver.observe(container);\n\n for (const child of Array.from(container.children)) {\n resizeObserver.observe(child);\n }\n };\n\n observeContent();\n\n // Children come and go as the page renders, so the observer follows them.\n const mutationObserver = new MutationObserver(() => {\n observeContent();\n onResize();\n });\n mutationObserver.observe(container, { childList: true });\n\n return () => {\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,MAAa,uBACX,WACA,aACiB;CACjB,MAAM,iBAAiB,IAAI,eAAe,QAAQ;CAElD,MAAM,uBAAuB;EAC3B,eAAe,QAAQ,SAAS;EAEhC,KAAK,MAAM,SAAS,MAAM,KAAK,UAAU,QAAQ,GAC/C,eAAe,QAAQ,KAAK;CAEhC;CAEA,eAAe;CAGf,MAAM,mBAAmB,IAAI,uBAAuB;EAClD,eAAe;EACf,SAAS;CACX,CAAC;CACD,iBAAiB,QAAQ,WAAW,EAAE,WAAW,KAAK,CAAC;CAEvD,aAAa;EACX,eAAe,WAAW;EAC1B,iBAAiB,WAAW;CAC9B;AACF"}
|