studiocms 0.1.0-beta.10
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/CHANGELOG.md +501 -0
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/custom-renderers/index.ts +4 -0
- package/custom-renderers/markdocRenderers/markdocReact-components/MarkDocReactRenderer.tsx +8 -0
- package/custom-renderers/markdocRenderers/markdocReact-components/MarkDocReactWrapper.astro +13 -0
- package/custom-renderers/markdocRenderers/markdocReact.ts +56 -0
- package/dist/auth.d.js +0 -0
- package/dist/auth.d.ts +397 -0
- package/dist/cli/cmds/get-turso.d.ts +1 -0
- package/dist/cli/cmds/get-turso.js +10 -0
- package/dist/cli/cmds/init/index.d.ts +4 -0
- package/dist/cli/cmds/init/index.js +52 -0
- package/dist/cli/cmds/init/steps/data/studiocmsEnv.d.ts +3 -0
- package/dist/cli/cmds/init/steps/data/studiocmsEnv.js +71 -0
- package/dist/cli/cmds/init/steps/envBuilder.d.ts +21 -0
- package/dist/cli/cmds/init/steps/envBuilder.js +368 -0
- package/dist/cli/cmds/init/steps/nextSteps.d.ts +2 -0
- package/dist/cli/cmds/init/steps/nextSteps.js +38 -0
- package/dist/cli/cmds/init.d.ts +1 -0
- package/dist/cli/cmds/init.js +4 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +9 -0
- package/dist/cli/lib/commander.d.ts +39 -0
- package/dist/cli/lib/commander.js +87 -0
- package/dist/cli/lib/context.d.ts +28 -0
- package/dist/cli/lib/context.js +55 -0
- package/dist/cli/lib/pathUtil.d.ts +5 -0
- package/dist/cli/lib/pathUtil.js +14 -0
- package/dist/cli/lib/runExternal.d.ts +20 -0
- package/dist/cli/lib/runExternal.js +40 -0
- package/dist/cli/lib/seasonal.d.ts +5 -0
- package/dist/cli/lib/seasonal.js +88 -0
- package/dist/cli/lib/utils.d.ts +55 -0
- package/dist/cli/lib/utils.js +310 -0
- package/dist/cli/shared/intro.d.ts +2 -0
- package/dist/cli/shared/intro.js +24 -0
- package/dist/components/DefaultEditor.astro +138 -0
- package/dist/components/FormattedDate.astro +12 -0
- package/dist/components/Generator.astro +7 -0
- package/dist/components/Renderer.astro +13 -0
- package/dist/components/auth/OAuthButton.astro +21 -0
- package/dist/components/auth/OAuthButtonStack.astro +36 -0
- package/dist/components/auth/StaticAuthCheck.astro +20 -0
- package/dist/components/auth/StudioCMSLogoSVG.astro +13 -0
- package/dist/components/auth/oAuthButtonProviders.d.ts +8 -0
- package/dist/components/auth/oAuthButtonProviders.js +35 -0
- package/dist/components/dashboard/AstroCodeDiffsScript.astro +25 -0
- package/dist/components/dashboard/BaseHead.astro +41 -0
- package/dist/components/dashboard/Code.astro +23 -0
- package/dist/components/dashboard/DashboardPageHeader.astro +77 -0
- package/dist/components/dashboard/DoubleSidebar.astro +26 -0
- package/dist/components/dashboard/Footer.astro +16 -0
- package/dist/components/dashboard/MainSidebarContent.astro +317 -0
- package/dist/components/dashboard/PageHeader.astro +52 -0
- package/dist/components/dashboard/SidebarLink.astro +61 -0
- package/dist/components/dashboard/SidebarModals.astro +6 -0
- package/dist/components/dashboard/SidebarPluginLink.astro +45 -0
- package/dist/components/dashboard/SingleSidebar.astro +23 -0
- package/dist/components/dashboard/StudioCMSLogo.astro +12 -0
- package/dist/components/dashboard/ThemeManager.astro +53 -0
- package/dist/components/dashboard/component-scripts/TinyMDE.astro +6 -0
- package/dist/components/dashboard/component-scripts/dateTimeListener.d.ts +1 -0
- package/dist/components/dashboard/component-scripts/dateTimeListener.js +14 -0
- package/dist/components/dashboard/component-scripts/dateWithTimeAndZone.d.ts +1 -0
- package/dist/components/dashboard/component-scripts/dateWithTimeAndZone.js +12 -0
- package/dist/components/dashboard/component-scripts/makeClientRoutable.d.ts +1 -0
- package/dist/components/dashboard/component-scripts/makeClientRoutable.js +9 -0
- package/dist/components/dashboard/component-scripts/timeAgo.d.ts +1 -0
- package/dist/components/dashboard/component-scripts/timeAgo.js +21 -0
- package/dist/components/dashboard/islands/LoginChecker.astro +52 -0
- package/dist/components/dashboard/islands/configuration/ConfigForm.astro +317 -0
- package/dist/components/dashboard/islands/configuration/LightVsDark.astro +67 -0
- package/dist/components/dashboard/islands/content-mgmt/CreateFolder.astro +118 -0
- package/dist/components/dashboard/islands/content-mgmt/CreatePage.astro +380 -0
- package/dist/components/dashboard/islands/content-mgmt/EditFolder.astro +138 -0
- package/dist/components/dashboard/islands/content-mgmt/EditPage.astro +432 -0
- package/dist/components/dashboard/islands/content-mgmt/InnerSidebarElement.astro +299 -0
- package/dist/components/dashboard/islands/content-mgmt/PageHeader.astro +455 -0
- package/dist/components/dashboard/islands/content-mgmt/PageList.astro +49 -0
- package/dist/components/dashboard/islands/content-mgmt/PluginFields.astro +29 -0
- package/dist/components/dashboard/islands/content-mgmt/TreeRenderer.astro +75 -0
- package/dist/components/dashboard/islands/content-mgmt/TreeSidebarFolder.astro +53 -0
- package/dist/components/dashboard/islands/content-mgmt/TreeSidebarLink.astro +51 -0
- package/dist/components/dashboard/islands/content-mgmt/runtime.d.ts +10 -0
- package/dist/components/dashboard/islands/content-mgmt/runtime.js +33 -0
- package/dist/components/dashboard/islands/content-mgmt/shared.d.ts +27 -0
- package/dist/components/dashboard/islands/content-mgmt/shared.js +31 -0
- package/dist/components/dashboard/islands/dashboard/DashboardGrid.astro +39 -0
- package/dist/components/dashboard/islands/dashboard/DashboardGridItem.astro +34 -0
- package/dist/components/dashboard/islands/dashboard/Test.astro +5 -0
- package/dist/components/dashboard/islands/dashboard/UserName.astro +6 -0
- package/dist/components/dashboard/islands/dashboard/shared.d.ts +2 -0
- package/dist/components/dashboard/islands/dashboard/shared.js +0 -0
- package/dist/components/dashboard/islands/plugins/SettingsRenderer.astro +29 -0
- package/dist/components/dashboard/islands/profile/APITokens.astro +306 -0
- package/dist/components/dashboard/islands/profile/BasicInfo.astro +140 -0
- package/dist/components/dashboard/islands/profile/BasicInfoFallback.astro +43 -0
- package/dist/components/dashboard/islands/profile/SocialSignin.astro +181 -0
- package/dist/components/dashboard/islands/profile/SocialSigninFallback.astro +83 -0
- package/dist/components/dashboard/islands/profile/UpdatePassword.astro +166 -0
- package/dist/components/dashboard/islands/profile/UpdatePasswordFallback.astro +47 -0
- package/dist/components/dashboard/islands/profile/oAuthButtonProviders.d.ts +8 -0
- package/dist/components/dashboard/islands/profile/oAuthButtonProviders.js +35 -0
- package/dist/components/dashboard/islands/sidebar/UserAccount.astro +23 -0
- package/dist/components/dashboard/islands/sidebar/VersionCheck.astro +127 -0
- package/dist/components/dashboard/islands/sidebar/VersionCheckChangelog.astro +107 -0
- package/dist/components/dashboard/islands/user-mgmt/InnerSidebarElement.astro +348 -0
- package/dist/components/dashboard/islands/user-mgmt/RankCheck.astro +49 -0
- package/dist/components/dashboard/islands/user-mgmt/SocialSignin.astro +109 -0
- package/dist/components/dashboard/islands/user-mgmt/UserListItem.astro +60 -0
- package/dist/components/dashboard/sidebar-modals/UserManagementModals.astro +103 -0
- package/dist/components/dashboard/sidebar-modals/VersionModal.astro +267 -0
- package/dist/components/dashboard/sidebarConfig.d.ts +32 -0
- package/dist/components/dashboard/sidebarConfig.js +88 -0
- package/dist/components/default-grid-items/Recently-created-pages.astro +91 -0
- package/dist/components/default-grid-items/Recently-signed-up.astro +71 -0
- package/dist/components/default-grid-items/Recently-updated-pages.astro +96 -0
- package/dist/components/default-grid-items/Totals.astro +107 -0
- package/dist/components/default-grid-items/utils.d.ts +17 -0
- package/dist/components/default-grid-items/utils.js +26 -0
- package/dist/components/image/CustomImage.astro +90 -0
- package/dist/components/user-quick-tools.d.ts +42 -0
- package/dist/components/user-quick-tools.js +312 -0
- package/dist/config.d.ts +3 -0
- package/dist/config.js +4 -0
- package/dist/consts.d.ts +61 -0
- package/dist/consts.js +39 -0
- package/dist/core.d.js +0 -0
- package/dist/core.d.ts +226 -0
- package/dist/db/config.d.ts +4 -0
- package/dist/db/config.js +6 -0
- package/dist/db/tables.js +168 -0
- package/dist/errors.d.ts +19 -0
- package/dist/errors.js +11 -0
- package/dist/index.d.ts +152 -0
- package/dist/index.js +1179 -0
- package/dist/layouts/auth/AuthLayout.astro +74 -0
- package/dist/layouts/auth/FallbackCanvas.astro +123 -0
- package/dist/layouts/auth/ThemeManager.astro +53 -0
- package/dist/layouts/auth/ThreeCanvasLoader.astro +18 -0
- package/dist/layouts/dashboard/Layout.astro +64 -0
- package/dist/lib/auth/encryption.d.ts +30 -0
- package/dist/lib/auth/encryption.js +39 -0
- package/dist/lib/auth/password.d.ts +27 -0
- package/dist/lib/auth/password.js +42 -0
- package/dist/lib/auth/rate-limit.d.ts +136 -0
- package/dist/lib/auth/rate-limit.js +214 -0
- package/dist/lib/auth/session.d.ts +85 -0
- package/dist/lib/auth/session.js +93 -0
- package/dist/lib/auth/types.d.ts +83 -0
- package/dist/lib/auth/types.js +0 -0
- package/dist/lib/auth/user.d.ts +148 -0
- package/dist/lib/auth/user.js +133 -0
- package/dist/lib/dashboardGrid.d.ts +119 -0
- package/dist/lib/dashboardGrid.js +0 -0
- package/dist/lib/dynamic-sitemap/index.d.ts +42 -0
- package/dist/lib/dynamic-sitemap/index.js +45 -0
- package/dist/lib/dynamic-sitemap/sitemap-index.xml.d.ts +8 -0
- package/dist/lib/dynamic-sitemap/sitemap-index.xml.js +20 -0
- package/dist/lib/dynamic-sitemap/sitemap-index.xml.ts +45 -0
- package/dist/lib/head.d.ts +9 -0
- package/dist/lib/head.js +65 -0
- package/dist/lib/headDefaults.d.ts +18 -0
- package/dist/lib/headDefaults.js +75 -0
- package/dist/lib/i18n/LanguageSelector.astro +114 -0
- package/dist/lib/i18n/client.d.ts +591 -0
- package/dist/lib/i18n/client.js +83 -0
- package/dist/lib/i18n/config.d.ts +16 -0
- package/dist/lib/i18n/config.js +8 -0
- package/dist/lib/i18n/index.d.ts +578 -0
- package/dist/lib/i18n/index.js +63 -0
- package/dist/lib/i18n/translations/de.json +64 -0
- package/dist/lib/i18n/translations/en-us.json +238 -0
- package/dist/lib/i18n/translations/es.json +64 -0
- package/dist/lib/i18n/translations/fr.json +64 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/index.js +7 -0
- package/dist/lib/jsonUtils.d.ts +2 -0
- package/dist/lib/jsonUtils.js +11 -0
- package/dist/lib/makeAPIRoute.d.ts +45 -0
- package/dist/lib/makeAPIRoute.js +16 -0
- package/dist/lib/makePublicRoute.d.ts +7 -0
- package/dist/lib/makePublicRoute.js +6 -0
- package/dist/lib/pathGenerators.d.ts +20 -0
- package/dist/lib/pathGenerators.js +66 -0
- package/dist/lib/plugins/dashboard-pages.d.ts +71 -0
- package/dist/lib/plugins/dashboard-pages.js +11 -0
- package/dist/lib/plugins/frontend-navigation.d.ts +18 -0
- package/dist/lib/plugins/frontend-navigation.js +39 -0
- package/dist/lib/plugins/index.d.ts +2 -0
- package/dist/lib/plugins/index.js +2 -0
- package/dist/lib/removeLeadingTrailingSlashes.d.ts +7 -0
- package/dist/lib/removeLeadingTrailingSlashes.js +13 -0
- package/dist/lib/renderer/astro-remark.d.ts +13 -0
- package/dist/lib/renderer/astro-remark.js +11 -0
- package/dist/lib/renderer/contentRenderer.d.ts +13 -0
- package/dist/lib/renderer/contentRenderer.js +31 -0
- package/dist/lib/renderer/errors.d.ts +5 -0
- package/dist/lib/renderer/errors.js +25 -0
- package/dist/lib/renderer/markdoc-renderers/markdocHTML.d.ts +3 -0
- package/dist/lib/renderer/markdoc-renderers/markdocHTML.js +14 -0
- package/dist/lib/renderer/markdoc-renderers/markdocReactStatic.d.ts +3 -0
- package/dist/lib/renderer/markdoc-renderers/markdocReactStatic.js +14 -0
- package/dist/lib/renderer/markdoc.d.ts +11 -0
- package/dist/lib/renderer/markdoc.js +28 -0
- package/dist/lib/renderer/mdx.d.ts +10 -0
- package/dist/lib/renderer/mdx.js +37 -0
- package/dist/lib/renderer/runtime.d.ts +8 -0
- package/dist/lib/renderer/runtime.js +30 -0
- package/dist/lib/renderer/shared.d.ts +15 -0
- package/dist/lib/renderer/shared.js +13 -0
- package/dist/lib/renderer/studiocms.d.ts +11 -0
- package/dist/lib/renderer/studiocms.js +22 -0
- package/dist/lib/renderer/types.d.ts +12 -0
- package/dist/lib/renderer/types.js +0 -0
- package/dist/lib/robots/core.d.ts +24 -0
- package/dist/lib/robots/core.js +187 -0
- package/dist/lib/robots/index.d.ts +11 -0
- package/dist/lib/robots/index.js +47 -0
- package/dist/lib/robots/types.d.ts +185 -0
- package/dist/lib/robots/types.js +0 -0
- package/dist/lib/robots/utils.d.ts +22 -0
- package/dist/lib/robots/utils.js +22 -0
- package/dist/lib/routeMap.d.ts +257 -0
- package/dist/lib/routeMap.js +249 -0
- package/dist/lib/urlGen.d.ts +11 -0
- package/dist/lib/urlGen.js +26 -0
- package/dist/lib/webVitals/checkForWebVitalsPlugin.d.ts +18 -0
- package/dist/lib/webVitals/checkForWebVitalsPlugin.js +82 -0
- package/dist/lib/webVitals/consts.d.ts +240 -0
- package/dist/lib/webVitals/consts.js +40 -0
- package/dist/lib/webVitals/dashboard-grid-items/CoreVitals.astro +66 -0
- package/dist/lib/webVitals/dashboard-grid-items/MetricCard.astro +24 -0
- package/dist/lib/webVitals/dashboard-grid-items/SummaryCard.astro +56 -0
- package/dist/lib/webVitals/dashboard-grid-items/metric.css +103 -0
- package/dist/lib/webVitals/dashboard-grid-items/shared.d.ts +29 -0
- package/dist/lib/webVitals/dashboard-grid-items/shared.js +35 -0
- package/dist/lib/webVitals/pages/analytics/body.astro +186 -0
- package/dist/lib/webVitals/pages/analytics/header.astro +42 -0
- package/dist/lib/webVitals/schemas.d.ts +78 -0
- package/dist/lib/webVitals/schemas.js +37 -0
- package/dist/lib/webVitals/types.d.ts +156 -0
- package/dist/lib/webVitals/types.js +0 -0
- package/dist/lib/webVitals/utils/buildDataObject.d.ts +8 -0
- package/dist/lib/webVitals/utils/buildDataObject.js +28 -0
- package/dist/lib/webVitals/utils/buildPageRouteDataObject.d.ts +15 -0
- package/dist/lib/webVitals/utils/buildPageRouteDataObject.js +70 -0
- package/dist/lib/webVitals/utils/buildPerPageDataObject.d.ts +23 -0
- package/dist/lib/webVitals/utils/buildPerPageDataObject.js +209 -0
- package/dist/lib/webVitals/utils/checkDate.d.ts +5 -0
- package/dist/lib/webVitals/utils/checkDate.js +19 -0
- package/dist/lib/webVitals/utils/webVitalsUtils.d.ts +24 -0
- package/dist/lib/webVitals/utils/webVitalsUtils.js +234 -0
- package/dist/lib/webVitals/webVital.d.ts +20 -0
- package/dist/lib/webVitals/webVital.js +40 -0
- package/dist/lib/webVitals/webVitalsRouteSummary.d.ts +19 -0
- package/dist/lib/webVitals/webVitalsRouteSummary.js +59 -0
- package/dist/lib/webVitals/webVitalsSummary.d.ts +19 -0
- package/dist/lib/webVitals/webVitalsSummary.js +49 -0
- package/dist/plugins.d.ts +2 -0
- package/dist/plugins.js +6 -0
- package/dist/renderer.d.js +0 -0
- package/dist/renderer.d.ts +23 -0
- package/dist/routes/api/render.astro +25 -0
- package/dist/routes/auth/api/auth0/callback.d.ts +4 -0
- package/dist/routes/auth/api/auth0/callback.js +117 -0
- package/dist/routes/auth/api/auth0/index.d.ts +4 -0
- package/dist/routes/auth/api/auth0/index.js +36 -0
- package/dist/routes/auth/api/auth0/shared.d.ts +13 -0
- package/dist/routes/auth/api/auth0/shared.js +24 -0
- package/dist/routes/auth/api/discord/callback.d.ts +4 -0
- package/dist/routes/auth/api/discord/callback.js +112 -0
- package/dist/routes/auth/api/discord/index.d.ts +4 -0
- package/dist/routes/auth/api/discord/index.js +36 -0
- package/dist/routes/auth/api/discord/shared.d.ts +12 -0
- package/dist/routes/auth/api/discord/shared.js +17 -0
- package/dist/routes/auth/api/github/callback.d.ts +4 -0
- package/dist/routes/auth/api/github/callback.js +112 -0
- package/dist/routes/auth/api/github/index.d.ts +4 -0
- package/dist/routes/auth/api/github/index.js +36 -0
- package/dist/routes/auth/api/github/shared.d.ts +13 -0
- package/dist/routes/auth/api/github/shared.js +14 -0
- package/dist/routes/auth/api/google/callback.d.ts +4 -0
- package/dist/routes/auth/api/google/callback.js +115 -0
- package/dist/routes/auth/api/google/index.d.ts +4 -0
- package/dist/routes/auth/api/google/index.js +38 -0
- package/dist/routes/auth/api/google/shared.d.ts +12 -0
- package/dist/routes/auth/api/google/shared.js +19 -0
- package/dist/routes/auth/api/login.d.ts +4 -0
- package/dist/routes/auth/api/login.js +46 -0
- package/dist/routes/auth/api/logout.d.ts +5 -0
- package/dist/routes/auth/api/logout.js +55 -0
- package/dist/routes/auth/api/register.d.ts +4 -0
- package/dist/routes/auth/api/register.js +64 -0
- package/dist/routes/auth/api/shared.d.ts +2 -0
- package/dist/routes/auth/api/shared.js +21 -0
- package/dist/routes/auth/login.astro +118 -0
- package/dist/routes/auth/logout.astro +28 -0
- package/dist/routes/auth/signup.astro +124 -0
- package/dist/routes/dashboard/[...pluginPage].astro +88 -0
- package/dist/routes/dashboard/configuration.astro +61 -0
- package/dist/routes/dashboard/content-management/createfolder.astro +83 -0
- package/dist/routes/dashboard/content-management/createpage.astro +86 -0
- package/dist/routes/dashboard/content-management/diff.astro +135 -0
- package/dist/routes/dashboard/content-management/editfolder.astro +67 -0
- package/dist/routes/dashboard/content-management/editpage.astro +71 -0
- package/dist/routes/dashboard/content-management/index.astro +91 -0
- package/dist/routes/dashboard/index.astro +56 -0
- package/dist/routes/dashboard/password-reset.astro +206 -0
- package/dist/routes/dashboard/plugins/[plugin].astro +104 -0
- package/dist/routes/dashboard/profile.astro +87 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/api-tokens.d.ts +5 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/api-tokens.js +90 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/config.d.ts +4 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/config.js +63 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/content/folder.d.ts +6 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/content/folder.js +121 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/content/page.d.ts +6 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/content/page.js +258 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/create-reset-link.d.ts +4 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/create-reset-link.js +59 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/create-user-invite.d.ts +4 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/create-user-invite.js +105 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/create-user.d.ts +4 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/create-user.js +100 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/partials/Editor.astro +61 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/partials/LiveRender.astro +30 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/partials/UserListItems.astro +39 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/plugins/[plugin].d.ts +2 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/plugins/[plugin].js +32 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/profile.d.ts +4 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/profile.js +130 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/reset-password.d.ts +4 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/reset-password.js +105 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/search-list.d.ts +4 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/search-list.js +55 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/users.d.ts +5 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/users.js +92 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/verify-session.d.ts +2 -0
- package/dist/routes/dashboard/studiocms_api/dashboard/verify-session.js +72 -0
- package/dist/routes/dashboard/user-management/edit.astro +631 -0
- package/dist/routes/dashboard/user-management/index.astro +103 -0
- package/dist/routes/error-pages/404.astro +66 -0
- package/dist/routes/firstTimeSetupRoutes/1-start.astro +253 -0
- package/dist/routes/firstTimeSetupRoutes/2-next.astro +208 -0
- package/dist/routes/firstTimeSetupRoutes/3-done.astro +95 -0
- package/dist/routes/firstTimeSetupRoutes/api/step-1.d.ts +2 -0
- package/dist/routes/firstTimeSetupRoutes/api/step-1.js +126 -0
- package/dist/routes/firstTimeSetupRoutes/api/step-2.d.ts +2 -0
- package/dist/routes/firstTimeSetupRoutes/api/step-2.js +110 -0
- package/dist/routes/firstTimeSetupRoutes/components/Layout.astro +41 -0
- package/dist/routes/firstTimeSetupRoutes/components/PageHeader.astro +60 -0
- package/dist/routes/firstTimeSetupRoutes/components/TabItem.astro +44 -0
- package/dist/routes/firstTimeSetupRoutes/components/Tabs.astro +170 -0
- package/dist/routes/firstTimeSetupRoutes/snippets/opt1-astro.config.diff +14 -0
- package/dist/routes/firstTimeSetupRoutes/snippets/opt2-astro.config.diff +9 -0
- package/dist/routes/firstTimeSetupRoutes/snippets/opt2-studiocms.config.diff +5 -0
- package/dist/routes/rest/utils/auth-token.d.ts +17 -0
- package/dist/routes/rest/utils/auth-token.js +31 -0
- package/dist/routes/rest/v1/folders/[id].d.ts +6 -0
- package/dist/routes/rest/v1/folders/[id].js +106 -0
- package/dist/routes/rest/v1/folders/index.d.ts +5 -0
- package/dist/routes/rest/v1/folders/index.js +88 -0
- package/dist/routes/rest/v1/pages/[id]/history/[diffid].d.ts +4 -0
- package/dist/routes/rest/v1/pages/[id]/history/[diffid].js +55 -0
- package/dist/routes/rest/v1/pages/[id]/history/index.d.ts +4 -0
- package/dist/routes/rest/v1/pages/[id]/history/index.js +61 -0
- package/dist/routes/rest/v1/pages/[id]/index.d.ts +6 -0
- package/dist/routes/rest/v1/pages/[id]/index.js +165 -0
- package/dist/routes/rest/v1/pages/index.d.ts +5 -0
- package/dist/routes/rest/v1/pages/index.js +113 -0
- package/dist/routes/rest/v1/public/folders/[id].d.ts +4 -0
- package/dist/routes/rest/v1/public/folders/[id].js +43 -0
- package/dist/routes/rest/v1/public/folders/index.d.ts +4 -0
- package/dist/routes/rest/v1/public/folders/index.js +49 -0
- package/dist/routes/rest/v1/public/pages/[id].d.ts +4 -0
- package/dist/routes/rest/v1/public/pages/[id].js +46 -0
- package/dist/routes/rest/v1/public/pages/index.d.ts +4 -0
- package/dist/routes/rest/v1/public/pages/index.js +61 -0
- package/dist/routes/rest/v1/settings/index.d.ts +5 -0
- package/dist/routes/rest/v1/settings/index.js +75 -0
- package/dist/routes/rest/v1/users/[id].d.ts +6 -0
- package/dist/routes/rest/v1/users/[id].js +212 -0
- package/dist/routes/rest/v1/users/index.d.ts +5 -0
- package/dist/routes/rest/v1/users/index.js +138 -0
- package/dist/routes/sdk/fallback-list-pages.json.d.ts +2 -0
- package/dist/routes/sdk/fallback-list-pages.json.js +19 -0
- package/dist/routes/sdk/fallback-list-pages.json.ts +22 -0
- package/dist/routes/sdk/full-changelog.json.d.ts +16 -0
- package/dist/routes/sdk/full-changelog.json.js +170 -0
- package/dist/routes/sdk/full-changelog.json.ts +224 -0
- package/dist/routes/sdk/list-pages.d.ts +4 -0
- package/dist/routes/sdk/list-pages.js +34 -0
- package/dist/routes/sdk/update-latest-version-cache.d.ts +4 -0
- package/dist/routes/sdk/update-latest-version-cache.js +41 -0
- package/dist/runtime/AstroComponentProxy.d.ts +29 -0
- package/dist/runtime/AstroComponentProxy.js +47 -0
- package/dist/runtime/decoder/decode-codepoint.d.ts +18 -0
- package/dist/runtime/decoder/decode-codepoint.js +58 -0
- package/dist/runtime/decoder/decode-data-html.d.ts +1 -0
- package/dist/runtime/decoder/decode-data-html.js +7 -0
- package/dist/runtime/decoder/decode-data-xml.d.ts +1 -0
- package/dist/runtime/decoder/decode-data-xml.js +7 -0
- package/dist/runtime/decoder/index.d.ts +34 -0
- package/dist/runtime/decoder/index.js +18 -0
- package/dist/runtime/decoder/util.d.ts +208 -0
- package/dist/runtime/decoder/util.js +415 -0
- package/dist/schemas/config/auth.d.ts +175 -0
- package/dist/schemas/config/auth.js +65 -0
- package/dist/schemas/config/componentoverrides.d.ts +17 -0
- package/dist/schemas/config/componentoverrides.js +14 -0
- package/dist/schemas/config/dashboard.d.ts +154 -0
- package/dist/schemas/config/dashboard.js +59 -0
- package/dist/schemas/config/defaultFrontend.d.ts +125 -0
- package/dist/schemas/config/defaultFrontend.js +57 -0
- package/dist/schemas/config/developer.d.ts +15 -0
- package/dist/schemas/config/developer.js +14 -0
- package/dist/schemas/config/imageService.d.ts +13 -0
- package/dist/schemas/config/imageService.js +12 -0
- package/dist/schemas/config/index.d.ts +1153 -0
- package/dist/schemas/config/index.js +95 -0
- package/dist/schemas/config/integrations.d.ts +14 -0
- package/dist/schemas/config/integrations.js +12 -0
- package/dist/schemas/config/markdoc.d.ts +172 -0
- package/dist/schemas/config/markdoc.js +68 -0
- package/dist/schemas/config/mdx.d.ts +455 -0
- package/dist/schemas/config/mdx.js +71 -0
- package/dist/schemas/config/rendererConfig.d.ts +659 -0
- package/dist/schemas/config/rendererConfig.js +51 -0
- package/dist/schemas/config/sdk.d.ts +167 -0
- package/dist/schemas/config/sdk.js +85 -0
- package/dist/schemas/config/studiocms-markdown-remark.d.ts +292 -0
- package/dist/schemas/config/studiocms-markdown-remark.js +63 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/plugins/index.d.ts +7373 -0
- package/dist/schemas/plugins/index.js +192 -0
- package/dist/schemas/plugins/shared.d.ts +1752 -0
- package/dist/schemas/plugins/shared.js +221 -0
- package/dist/scripts/formListener.d.ts +16 -0
- package/dist/scripts/formListener.js +46 -0
- package/dist/scripts/three.d.ts +1 -0
- package/dist/scripts/three.js +278 -0
- package/dist/scripts/utils/fitModelToViewport.d.ts +8 -0
- package/dist/scripts/utils/fitModelToViewport.js +19 -0
- package/dist/sdk/StudioCMSVirtualCache.d.ts +283 -0
- package/dist/sdk/StudioCMSVirtualCache.js +685 -0
- package/dist/sdk/cache.d.ts +11 -0
- package/dist/sdk/cache.js +12 -0
- package/dist/sdk/core.d.ts +865 -0
- package/dist/sdk/core.js +1966 -0
- package/dist/sdk/errors.d.ts +21 -0
- package/dist/sdk/errors.js +11 -0
- package/dist/sdk/index.d.ts +371 -0
- package/dist/sdk/index.js +8 -0
- package/dist/sdk/lib/foldertree.d.ts +50 -0
- package/dist/sdk/lib/foldertree.js +123 -0
- package/dist/sdk/lib/generators.d.ts +30 -0
- package/dist/sdk/lib/generators.js +25 -0
- package/dist/sdk/lib/packages.d.ts +8 -0
- package/dist/sdk/lib/packages.js +14 -0
- package/dist/sdk/lib/parsers.d.ts +14 -0
- package/dist/sdk/lib/parsers.js +10 -0
- package/dist/sdk/lib/users.d.ts +19 -0
- package/dist/sdk/lib/users.js +26 -0
- package/dist/sdk/tables.d.ts +1198 -0
- package/dist/sdk/tables.js +55 -0
- package/dist/sdk/types/index.d.ts +175 -0
- package/dist/sdk/types/index.js +0 -0
- package/dist/sdk/types/tableDefs.d.ts +75 -0
- package/dist/sdk/types/tableDefs.js +0 -0
- package/dist/sdk/types/tsAlias.d.ts +155 -0
- package/dist/sdk/types/tsAlias.js +0 -0
- package/dist/sdk/utils/db.d.ts +5 -0
- package/dist/sdk/utils/db.js +15 -0
- package/dist/stubs/auth-lib.d.ts +2 -0
- package/dist/stubs/auth-lib.js +519 -0
- package/dist/stubs/auth-scripts.d.ts +2 -0
- package/dist/stubs/auth-scripts.js +29 -0
- package/dist/stubs/auth-utils.d.ts +2 -0
- package/dist/stubs/auth-utils.js +36 -0
- package/dist/stubs/changelog.d.ts +2 -0
- package/dist/stubs/changelog.js +16 -0
- package/dist/stubs/components.d.ts +2 -0
- package/dist/stubs/components.js +67 -0
- package/dist/stubs/core.d.ts +2 -0
- package/dist/stubs/core.js +49 -0
- package/dist/stubs/i18n-dts.d.ts +2 -0
- package/dist/stubs/i18n-dts.js +117 -0
- package/dist/stubs/images.d.ts +1 -0
- package/dist/stubs/images.js +30 -0
- package/dist/stubs/index.d.ts +1 -0
- package/dist/stubs/index.js +40 -0
- package/dist/stubs/lib.d.ts +2 -0
- package/dist/stubs/lib.js +123 -0
- package/dist/stubs/plugins.d.ts +2 -0
- package/dist/stubs/plugins.js +60 -0
- package/dist/stubs/proxy.d.ts +2 -0
- package/dist/stubs/proxy.js +40 -0
- package/dist/stubs/renderer-config.d.ts +2 -0
- package/dist/stubs/renderer-config.js +18 -0
- package/dist/stubs/renderer-markdownConfig.d.ts +2 -0
- package/dist/stubs/renderer-markdownConfig.js +17 -0
- package/dist/stubs/renderer.d.ts +2 -0
- package/dist/stubs/renderer.js +44 -0
- package/dist/stubs/sdk.d.ts +2 -0
- package/dist/stubs/sdk.js +202 -0
- package/dist/stubs/webVitals.d.ts +2 -0
- package/dist/stubs/webVitals.js +40 -0
- package/dist/styles/404.css +47 -0
- package/dist/styles/SyntaxFont.woff2 +0 -0
- package/dist/styles/authlayout.css +138 -0
- package/dist/styles/dashboard-base.css +493 -0
- package/dist/styles/dashboard-code.css +33 -0
- package/dist/styles/dashboard-diff.css +389 -0
- package/dist/styles/dashboard-tiny-mde.css +224 -0
- package/dist/styles/md-remark-callouts/github.css +56 -0
- package/dist/styles/md-remark-callouts/obsidian.css +66 -0
- package/dist/styles/md-remark-callouts/vitepress.css +58 -0
- package/dist/styles/md-remark-headings.css +48 -0
- package/dist/types.d.ts +43 -0
- package/dist/types.js +0 -0
- package/dist/utils/addAPIRoutes.d.ts +9 -0
- package/dist/utils/addAPIRoutes.js +33 -0
- package/dist/utils/addIntegrationArray.d.ts +24 -0
- package/dist/utils/addIntegrationArray.js +11 -0
- package/dist/utils/addIntegrationArrayWithCheck.d.ts +11 -0
- package/dist/utils/addIntegrationArrayWithCheck.js +24 -0
- package/dist/utils/astroConfigCheck.d.ts +8 -0
- package/dist/utils/astroConfigCheck.js +31 -0
- package/dist/utils/astroEnvConfig.d.ts +45 -0
- package/dist/utils/astroEnvConfig.js +9 -0
- package/dist/utils/authEnvCheck.d.ts +38 -0
- package/dist/utils/authEnvCheck.js +82 -0
- package/dist/utils/changelog.d.ts +1 -0
- package/dist/utils/changelog.js +53 -0
- package/dist/utils/changelogLoader.d.ts +15 -0
- package/dist/utils/changelogLoader.js +104 -0
- package/dist/utils/checkENV.d.ts +27 -0
- package/dist/utils/checkENV.js +115 -0
- package/dist/utils/configManager.d.ts +22 -0
- package/dist/utils/configManager.js +98 -0
- package/dist/utils/configResolver.d.ts +283 -0
- package/dist/utils/configResolver.js +105 -0
- package/dist/utils/defineStudioCMSConfig.d.ts +165 -0
- package/dist/utils/defineStudioCMSConfig.js +6 -0
- package/dist/utils/getLabelForPermissionLevel.d.ts +2 -0
- package/dist/utils/getLabelForPermissionLevel.js +17 -0
- package/dist/utils/injectRouteArray.d.ts +19 -0
- package/dist/utils/injectRouteArray.js +75 -0
- package/dist/utils/integrationLogger.d.ts +7 -0
- package/dist/utils/integrationLogger.js +18 -0
- package/dist/utils/integrations.d.ts +4 -0
- package/dist/utils/integrations.js +32 -0
- package/dist/utils/isDashboardRoute.d.ts +7 -0
- package/dist/utils/isDashboardRoute.js +10 -0
- package/dist/utils/loginBackgrounds/studiocms-blobs-dark.png +0 -0
- package/dist/utils/loginBackgrounds/studiocms-blobs-light.png +0 -0
- package/dist/utils/loginBackgrounds/studiocms-blocks-dark.png +0 -0
- package/dist/utils/loginBackgrounds/studiocms-blocks-light.png +0 -0
- package/dist/utils/loginBackgrounds/studiocms-curves-dark.png +0 -0
- package/dist/utils/loginBackgrounds/studiocms-curves-light.png +0 -0
- package/dist/utils/makePageTitle.d.ts +3 -0
- package/dist/utils/makePageTitle.js +7 -0
- package/dist/utils/pageListPackageLabel.d.ts +4 -0
- package/dist/utils/pageListPackageLabel.js +12 -0
- package/dist/utils/readJson.d.ts +1 -0
- package/dist/utils/readJson.js +7 -0
- package/dist/utils/routeBuilder.d.ts +18 -0
- package/dist/utils/routeBuilder.js +96 -0
- package/dist/utils/safeString.d.ts +1 -0
- package/dist/utils/safeString.js +6 -0
- package/dist/utils/simpleResponse.d.ts +1 -0
- package/dist/utils/simpleResponse.js +29 -0
- package/dist/utils/validImages.d.ts +13 -0
- package/dist/utils/validImages.js +39 -0
- package/dist/virtual.d.js +0 -0
- package/dist/virtual.d.ts +9 -0
- package/package.json +219 -0
- package/studiocms-cli.mjs +13 -0
- package/ui.d.ts +291 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
content?: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const { content } = Astro.props;
|
|
7
|
+
---
|
|
8
|
+
<div id="editor-toolbar"></div>
|
|
9
|
+
<div class="editor-container">
|
|
10
|
+
<textarea id="page-content" name="page-content">{content}</textarea>
|
|
11
|
+
</div>
|
|
12
|
+
<script>
|
|
13
|
+
function listener() {
|
|
14
|
+
const pageContentTextarea = document.querySelector('#page-content');
|
|
15
|
+
const editorToolbar = document.querySelector('#editor-toolbar');
|
|
16
|
+
// Setup the TinyMDE editor
|
|
17
|
+
// See https://github.com/jefago/tiny-markdown-editor/tree/main for more details
|
|
18
|
+
// @ts-expect-error - Added TinyMDE to the window object
|
|
19
|
+
var tinyMDE = new TinyMDE.Editor({ textarea: pageContentTextarea });
|
|
20
|
+
// @ts-expect-error - Added TinyMDE to the window object
|
|
21
|
+
var commandBar = new TinyMDE.CommandBar({
|
|
22
|
+
element: editorToolbar,
|
|
23
|
+
editor: tinyMDE,
|
|
24
|
+
commands: [
|
|
25
|
+
{
|
|
26
|
+
name: 'bold',
|
|
27
|
+
action: 'bold',
|
|
28
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linejoin="round" d="M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z" /> </svg> ',
|
|
29
|
+
title: 'Bold',
|
|
30
|
+
hotkey: 'Mod-B',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'italic',
|
|
34
|
+
action: 'italic',
|
|
35
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803" /> </svg> ',
|
|
36
|
+
title: 'Italic',
|
|
37
|
+
hotkey: 'Mod-I',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'strikethrough',
|
|
41
|
+
action: 'strikethrough',
|
|
42
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 12a8.912 8.912 0 0 1-.318-.079c-1.585-.424-2.904-1.247-3.76-2.236-.873-1.009-1.265-2.19-.968-3.301.59-2.2 3.663-3.29 6.863-2.432A8.186 8.186 0 0 1 16.5 5.21M6.42 17.81c.857.99 2.176 1.812 3.761 2.237 3.2.858 6.274-.23 6.863-2.431.233-.868.044-1.779-.465-2.617M3.75 12h16.5" /> </svg> ',
|
|
43
|
+
title: 'Strikethrough',
|
|
44
|
+
hotkey: 'Mod2-Shift-5',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'h1',
|
|
48
|
+
action: 'h1',
|
|
49
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M2.243 4.493v7.5m0 0v7.502m0-7.501h10.5m0-7.5v7.5m0 0v7.501m4.501-8.627 2.25-1.5v10.126m0 0h-2.25m2.25 0h2.25" /> </svg> ',
|
|
50
|
+
title: 'Level 1 heading',
|
|
51
|
+
hotkey: 'Mod-Shift-1',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'h2',
|
|
55
|
+
action: 'h2',
|
|
56
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M21.75 19.5H16.5v-1.609a2.25 2.25 0 0 1 1.244-2.012l2.89-1.445c.651-.326 1.116-.955 1.116-1.683 0-.498-.04-.987-.118-1.463-.135-.825-.835-1.422-1.668-1.489a15.202 15.202 0 0 0-3.464.12M2.243 4.492v7.5m0 0v7.502m0-7.501h10.5m0-7.5v7.5m0 0v7.501" /> </svg> ',
|
|
57
|
+
title: 'Level 2 heading',
|
|
58
|
+
hotkey: 'Mod-Shift-2',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'h3',
|
|
62
|
+
action: 'h3',
|
|
63
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M20.905 14.626a4.52 4.52 0 0 1 .738 3.603c-.154.695-.794 1.143-1.504 1.208a15.194 15.194 0 0 1-3.639-.104m4.405-4.707a4.52 4.52 0 0 0 .738-3.603c-.154-.696-.794-1.144-1.504-1.209a15.19 15.19 0 0 0-3.639.104m4.405 4.708H18M2.243 4.493v7.5m0 0v7.502m0-7.501h10.5m0-7.5v7.5m0 0v7.501" /> </svg> ',
|
|
64
|
+
title: 'Level 3 heading',
|
|
65
|
+
},
|
|
66
|
+
'|',
|
|
67
|
+
{
|
|
68
|
+
name: 'ul',
|
|
69
|
+
action: 'ul',
|
|
70
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" /> </svg> ',
|
|
71
|
+
title: 'Bulleted list',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'ol',
|
|
75
|
+
action: 'ol',
|
|
76
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.242 5.992h12m-12 6.003H20.24m-12 5.999h12M4.117 7.495v-3.75H2.99m1.125 3.75H2.99m1.125 0H5.24m-1.92 2.577a1.125 1.125 0 1 1 1.591 1.59l-1.83 1.83h2.16M2.99 15.745h1.125a1.125 1.125 0 0 1 0 2.25H3.74m0-.002h.375a1.125 1.125 0 0 1 0 2.25H2.99" /> </svg> ',
|
|
77
|
+
title: 'Numbered list',
|
|
78
|
+
},
|
|
79
|
+
'|',
|
|
80
|
+
'blockquote',
|
|
81
|
+
{
|
|
82
|
+
name: 'code',
|
|
83
|
+
action: 'code',
|
|
84
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5" /> </svg> ',
|
|
85
|
+
title: 'Format as code',
|
|
86
|
+
},
|
|
87
|
+
'|',
|
|
88
|
+
{
|
|
89
|
+
name: 'insertLink',
|
|
90
|
+
// @ts-expect-error - Added TinyMDE to the window object
|
|
91
|
+
action: (editor) => {if (editor.isInlineFormattingAllowed()) editor.wrapSelection('[', ']()')},
|
|
92
|
+
// @ts-expect-error - Added TinyMDE to the window object
|
|
93
|
+
enabled: (editor, focus, anchor) => editor.isInlineFormattingAllowed(focus, anchor) ? false : null,
|
|
94
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" /> </svg> ',
|
|
95
|
+
title: 'Insert link',
|
|
96
|
+
hotkey: 'Mod-K',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'insertImage',
|
|
100
|
+
// @ts-expect-error - Added TinyMDE to the window object
|
|
101
|
+
action: (editor) => {if (editor.isInlineFormattingAllowed()) editor.wrapSelection('![', ']()')},
|
|
102
|
+
// @ts-expect-error - Added TinyMDE to the window object
|
|
103
|
+
enabled: (editor, focus, anchor) => editor.isInlineFormattingAllowed(focus, anchor) ? false : null,
|
|
104
|
+
innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" width="18px" height="18px" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> <path stroke-linecap="round" stroke-linejoin="round" d="m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" /> </svg> ',
|
|
105
|
+
title: 'Insert image',
|
|
106
|
+
hotkey: 'Mod2-Shift-I',
|
|
107
|
+
},
|
|
108
|
+
]
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// @ts-expect-error - Added TinyMDE to the window object
|
|
112
|
+
tinyMDE.addEventListener('change', e => {
|
|
113
|
+
pageContentTextarea!.textContent = e.content;
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// @ts-expect-error - Added TinyMDE to the window object
|
|
117
|
+
tinyMDE.addEventListener("drop", function (event) {
|
|
118
|
+
let formData = new FormData();
|
|
119
|
+
|
|
120
|
+
// You can add use event.dataTransfer.items or event.dataTransfer.files
|
|
121
|
+
// to build the form data object:
|
|
122
|
+
for (let i = 0; i < event.dataTransfer.items.length; i++) {
|
|
123
|
+
if (event.dataTransfer.items[i].kind === "file") {
|
|
124
|
+
let file = event.dataTransfer.items[i].getAsFile();
|
|
125
|
+
formData.append("image", file);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Call your API endpoint that accepts "Content-Type": "multipart/form-data"
|
|
130
|
+
// requests and responds with the image names and URL-s.
|
|
131
|
+
//
|
|
132
|
+
// Now you can add Markdown images like so:
|
|
133
|
+
// editor.paste(``);
|
|
134
|
+
alert("Image upload coming soon!");
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
listener();
|
|
138
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
import config from 'studiocms:config';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
date: Date;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const datetime = Astro.props.date.toISOString();
|
|
9
|
+
const formattedDate = Astro.props.date.toLocaleDateString(config.dateLocale, config.dateTimeFormat);
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<time {datetime}>{formattedDate}</time>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
import uiVersion from 'studiocms:ui/version';
|
|
3
|
+
import version from 'studiocms:version';
|
|
4
|
+
---
|
|
5
|
+
<meta name="generator" content={Astro.generator} />
|
|
6
|
+
<meta name="generator" content=`StudioCMS v${version}` />
|
|
7
|
+
<meta name="generator" content=`StudioCMS UI v${uiVersion}` />
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
import contentRenderer from 'studiocms:renderer/current';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
content: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const { content } = Astro.props;
|
|
9
|
+
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
const renderedContent = await contentRenderer(content, $$result);
|
|
12
|
+
---
|
|
13
|
+
<Fragment set:html={renderedContent}></Fragment>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Button } from 'studiocms:ui/components';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
href: string;
|
|
6
|
+
label: string;
|
|
7
|
+
image: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { href, label, image } = Astro.props;
|
|
11
|
+
---
|
|
12
|
+
<Button fullWidth as="a" href={href} variant="solid" size="lg">
|
|
13
|
+
<Fragment set:html={image} />
|
|
14
|
+
<span>{label}</span>
|
|
15
|
+
</Button>
|
|
16
|
+
|
|
17
|
+
<style>
|
|
18
|
+
.button {
|
|
19
|
+
color: var(--text-inverted) !important;
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { useTranslations } from 'studiocms:i18n';
|
|
3
|
+
import { Divider } from 'studiocms:ui/components';
|
|
4
|
+
import OAuthButton from './OAuthButton.astro';
|
|
5
|
+
import { providerData, showOAuth } from './oAuthButtonProviders.js';
|
|
6
|
+
|
|
7
|
+
const lang = 'en-us';
|
|
8
|
+
const t = useTranslations(lang, '@studiocms/auth:oauth-stack');
|
|
9
|
+
|
|
10
|
+
const shouldShowOAuth = showOAuth && providerData.some(({ enabled }) => enabled);
|
|
11
|
+
---
|
|
12
|
+
{ shouldShowOAuth && (
|
|
13
|
+
<Divider>
|
|
14
|
+
<t-comp-oauth key="or-login-with">{t('or-login-with')}</t-comp-oauth>
|
|
15
|
+
</Divider>
|
|
16
|
+
<div class="button-stack">
|
|
17
|
+
{
|
|
18
|
+
providerData.map(({enabled, ...props}) => enabled && <OAuthButton {...props} />)
|
|
19
|
+
}
|
|
20
|
+
</div>
|
|
21
|
+
)}
|
|
22
|
+
<script>
|
|
23
|
+
import {
|
|
24
|
+
$i18n,
|
|
25
|
+
baseTranslation,
|
|
26
|
+
makeTranslation,
|
|
27
|
+
} from 'studiocms:i18n/client';
|
|
28
|
+
|
|
29
|
+
const currentPage = '@studiocms/auth:oauth-stack';
|
|
30
|
+
|
|
31
|
+
const i18n = $i18n(currentPage, baseTranslation[currentPage]);
|
|
32
|
+
|
|
33
|
+
if (!customElements.get('t-comp-oauth')) {
|
|
34
|
+
customElements.define('t-comp-oauth', makeTranslation(currentPage, i18n));
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { getUserData } from 'studiocms:auth/lib/user';
|
|
3
|
+
import { StudioCMSRoutes } from 'studiocms:lib';
|
|
4
|
+
|
|
5
|
+
const { isLoggedIn } = await getUserData(Astro);
|
|
6
|
+
---
|
|
7
|
+
<div
|
|
8
|
+
id="login-check"
|
|
9
|
+
style="display: none;"
|
|
10
|
+
data-is_logged_in={`${isLoggedIn}`}
|
|
11
|
+
data-redirect_route={StudioCMSRoutes.mainLinks.dashboardIndex}
|
|
12
|
+
></div>
|
|
13
|
+
|
|
14
|
+
<script is:inline>
|
|
15
|
+
const loginCheck = document.getElementById('login-check');
|
|
16
|
+
|
|
17
|
+
if (loginCheck.dataset.is_logged_in === 'true') {
|
|
18
|
+
window.location.href = loginCheck.dataset.redirect_route;
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types';
|
|
3
|
+
|
|
4
|
+
interface Props extends HTMLAttributes<'svg'> {}
|
|
5
|
+
|
|
6
|
+
const { class: className } = Astro.props;
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<svg class:list={[className]} width="755" height="792" viewBox="0 0 755 792" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
+
<rect x="295" width="460" height="466" rx="32" fill="currentColor"/>
|
|
11
|
+
<path d="M272 434V166H180C162.327 166 148 180.327 148 198V597C148 614.673 162.327 629 180 629H577.5C595.173 629 609.5 614.673 609.5 597V490H328C297.072 490 272 464.928 272 434Z" fill="currentColor"/>
|
|
12
|
+
<path d="M124 597V329H32C14.3269 329 0 343.327 0 361V760C0 777.673 14.3269 792 32 792H429.5C447.173 792 461.5 777.673 461.5 760V653H180C149.072 653 124 627.928 124 597Z" fill="currentColor"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { authEnvCheck } from "studiocms:auth/utils/authEnvCheck";
|
|
2
|
+
import { AuthConfig } from "studiocms:config";
|
|
3
|
+
import { StudioCMSRoutes } from "studiocms:lib";
|
|
4
|
+
const authEnv = await authEnvCheck(AuthConfig.providers);
|
|
5
|
+
const showOAuth = authEnv.SHOW_OAUTH;
|
|
6
|
+
const providerData = [
|
|
7
|
+
{
|
|
8
|
+
enabled: authEnv.GITHUB.ENABLED,
|
|
9
|
+
href: StudioCMSRoutes.authLinks.githubIndex,
|
|
10
|
+
label: "GitHub",
|
|
11
|
+
image: `<svg width="24px" height="24px" viewBox="0 0 98 96" xmlns="http://www.w3.org/2000/svg" class="oauth-logo"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="currentColor"/></svg>`
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
enabled: authEnv.DISCORD.ENABLED,
|
|
15
|
+
href: StudioCMSRoutes.authLinks.discordIndex,
|
|
16
|
+
label: "Discord",
|
|
17
|
+
image: `<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 256 199" class="oauth-logo"><path fill="currentColor" d="M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18"/></svg>`
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
enabled: authEnv.GOOGLE.ENABLED,
|
|
21
|
+
href: StudioCMSRoutes.authLinks.googleIndex,
|
|
22
|
+
label: "Google",
|
|
23
|
+
image: `<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 256 262" class="oauth-logo"><path fill="#4285f4" d="M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"/><path fill="#34a853" d="M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"/><path fill="#fbbc05" d="M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z"/><path fill="#eb4335" d="M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"/></svg>`
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
enabled: authEnv.AUTH0.ENABLED,
|
|
27
|
+
href: StudioCMSRoutes.authLinks.auth0Index,
|
|
28
|
+
label: "Auth0",
|
|
29
|
+
image: `<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 32 32" class="oauth-logo"><path fill="currentColor" d="M29.307 9.932L26.161 0H5.796L2.692 9.932c-1.802 5.75.042 12.271 5.089 16.021L16.01 32l8.208-6.068c5.005-3.75 6.911-10.25 5.089-16.021l-8.214 6.104l3.12 9.938l-8.208-6.13l-8.208 6.104l3.141-9.911l-8.25-6.063l10.177-.063l3.146-9.891l3.141 9.87z"/></svg>`
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
export {
|
|
33
|
+
providerData,
|
|
34
|
+
showOAuth
|
|
35
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
const codesWithDiff = document.querySelectorAll('.custom-code.diff');
|
|
3
|
+
|
|
4
|
+
for (const code of codesWithDiff) {
|
|
5
|
+
const linesInserted = code.getAttribute('data-lines-inserted');
|
|
6
|
+
const linesDeleted = code.getAttribute('data-lines-deleted');
|
|
7
|
+
|
|
8
|
+
if (!linesInserted && !linesDeleted) continue;
|
|
9
|
+
|
|
10
|
+
const parsedInsertedLines = linesInserted?.split(',').map((line) => parseInt(line, 10)) || [];
|
|
11
|
+
const parsedDeletedLines = linesDeleted?.split(',').map((line) => parseInt(line, 10)) || [];
|
|
12
|
+
|
|
13
|
+
const codeLines = code.querySelectorAll('.line');
|
|
14
|
+
|
|
15
|
+
codeLines.forEach((line, index) => {
|
|
16
|
+
if (parsedInsertedLines.includes(index + 1)) {
|
|
17
|
+
line.classList.add('diff', 'ins');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (parsedDeletedLines.includes(index + 1)) {
|
|
21
|
+
line.classList.add('diff', 'del');
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
import 'studiocms:ui/global-css';
|
|
3
|
+
import '../../styles/dashboard-base.css';
|
|
4
|
+
import '../../styles/dashboard-diff.css';
|
|
5
|
+
import '../../styles/dashboard-code.css';
|
|
6
|
+
import '@fontsource-variable/onest/index.css';
|
|
7
|
+
import { Generator } from 'studiocms:components';
|
|
8
|
+
import onestWoff2 from '@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url';
|
|
9
|
+
import ThemeManager from './ThemeManager.astro';
|
|
10
|
+
|
|
11
|
+
export interface Props {
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const { title, description } = Astro.props;
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<head>
|
|
20
|
+
{/* Global Metadata */}
|
|
21
|
+
<meta charset="utf-8" />
|
|
22
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
23
|
+
<Generator />
|
|
24
|
+
|
|
25
|
+
{/* Favicon */}
|
|
26
|
+
<link rel="icon" href="https://cdn.studiocms.dev/favicon.svg" type="image/svg+xml" />
|
|
27
|
+
<link rel="icon" href="https://cdn.studiocms.dev/favicon-light.png" type="image/svg+xml" media="(prefers-color-scheme: dark)" />
|
|
28
|
+
<link rel="icon" href="https://cdn.studiocms.dev/favicon-dark.png" type="image/png" media="(prefers-color-scheme: light)" />
|
|
29
|
+
|
|
30
|
+
{/* Primary Meta Tags */}
|
|
31
|
+
<title>{title}</title>
|
|
32
|
+
<meta name="title" content={title} />
|
|
33
|
+
<meta name="description" content={description} />
|
|
34
|
+
<meta name="theme-color" content="#a581f3" />
|
|
35
|
+
|
|
36
|
+
{/* Theme Manager */}
|
|
37
|
+
<ThemeManager />
|
|
38
|
+
|
|
39
|
+
{/* Fonts */}
|
|
40
|
+
<link rel="preload" as="font" type="font/woff2" crossorigin="anonymous" href={onestWoff2} />
|
|
41
|
+
</head>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
code: string;
|
|
5
|
+
ins?: string;
|
|
6
|
+
del?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { code, del, ins } = Astro.props;
|
|
10
|
+
|
|
11
|
+
const htmlCode = code.split('\n').map((line) => `<span class="line">${line}</span>\n`);
|
|
12
|
+
|
|
13
|
+
const props: Record<string, string> = {};
|
|
14
|
+
|
|
15
|
+
if (del) {
|
|
16
|
+
props['data-lines-deleted'] = del;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (ins) {
|
|
20
|
+
props['data-lines-inserted'] = ins;
|
|
21
|
+
}
|
|
22
|
+
---
|
|
23
|
+
<pre class="code-container scrollbar"><code class="custom-code" class:list={[(del || ins) && 'diff']} {...props} set:html={htmlCode}></code></pre>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { useTranslations } from 'studiocms:i18n';
|
|
3
|
+
import { Button, Icon } from 'studiocms:ui/components';
|
|
4
|
+
import UserName from './islands/dashboard/UserName.astro';
|
|
5
|
+
|
|
6
|
+
const lang = 'en-us';
|
|
7
|
+
const t = useTranslations(lang, '@studiocms/dashboard:index');
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<header class="index-page-header">
|
|
11
|
+
<div class="page-title-container">
|
|
12
|
+
<Button color='primary' id='nav-open' class='mobile-btn'>
|
|
13
|
+
<Icon name="bars-3" height={24} width={24} />
|
|
14
|
+
</Button>
|
|
15
|
+
<h1 class="page-title">
|
|
16
|
+
<t-dashboard-header key="welcome-title">{t("welcome-title")}</t-dashboard-header>, <UserName />.
|
|
17
|
+
</h1>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="page-actions-container">
|
|
20
|
+
<Button color='primary' variant='flat' as="a" href={'https://chat.studiocms.dev'} target='_blank' rel='noreferrer,noopener'>
|
|
21
|
+
<Fragment set:html={`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"><path fill="currentColor" d="M13.545 2.907a13.2 13.2 0 0 0-3.257-1.011a.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.2 12.2 0 0 0-3.658 0a8 8 0 0 0-.412-.833a.05.05 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.04.04 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032q.003.022.021.037a13.3 13.3 0 0 0 3.995 2.02a.05.05 0 0 0 .056-.019q.463-.63.818-1.329a.05.05 0 0 0-.01-.059l-.018-.011a9 9 0 0 1-1.248-.595a.05.05 0 0 1-.02-.066l.015-.019q.127-.095.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.05.05 0 0 1 .053.007q.121.1.248.195a.05.05 0 0 1-.004.085a8 8 0 0 1-1.249.594a.05.05 0 0 0-.03.03a.05.05 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019a13.2 13.2 0 0 0 4.001-2.02a.05.05 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.03.03 0 0 0-.02-.019m-8.198 7.307c-.789 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.45.73 1.438 1.613c0 .888-.637 1.612-1.438 1.612m5.316 0c-.788 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.451.73 1.438 1.613c0 .888-.631 1.612-1.438 1.612"/></svg>`} slot='start-content' />
|
|
22
|
+
<t-dashboard-header key="title-button:discord">{t("title-button:discord")}</t-dashboard-header>
|
|
23
|
+
</Button>
|
|
24
|
+
<Button color='success' variant='flat' as="a" href={'https://github.com/withstudiocms/studiocms/discussions/new?category=feedback'} target='_blank' rel='noreferrer,noopener'>
|
|
25
|
+
<Icon name='chat-bubble-oval-left-ellipsis' width={24} height={24} />
|
|
26
|
+
<t-dashboard-header key="title-button:feedback">{t("title-button:feedback")}</t-dashboard-header>
|
|
27
|
+
</Button>
|
|
28
|
+
</div>
|
|
29
|
+
</header>
|
|
30
|
+
<script>
|
|
31
|
+
import {
|
|
32
|
+
$i18n,
|
|
33
|
+
baseTranslation,
|
|
34
|
+
makeTranslation,
|
|
35
|
+
} from 'studiocms:i18n/client';
|
|
36
|
+
|
|
37
|
+
const currentPage = '@studiocms/dashboard:index';
|
|
38
|
+
|
|
39
|
+
const i18n = $i18n(currentPage, baseTranslation[currentPage]);
|
|
40
|
+
|
|
41
|
+
if (!customElements.get('t-dashboard-header')) {
|
|
42
|
+
customElements.define('t-dashboard-header', makeTranslation(currentPage, i18n));
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
<style>
|
|
46
|
+
.index-page-header {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: row;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
align-items: center;
|
|
51
|
+
margin-bottom: .5rem;
|
|
52
|
+
width: 100%;
|
|
53
|
+
flex-wrap: wrap;
|
|
54
|
+
gap: 1rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.page-title-container {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
gap: 1rem;
|
|
61
|
+
width: fit-content;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.page-title {
|
|
65
|
+
display: block;
|
|
66
|
+
width: fit-content;
|
|
67
|
+
margin: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.page-actions-container {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: row;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: 1rem;
|
|
75
|
+
margin-left: auto;
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { DoubleSidebar as SuiDoubleSidebar } from 'studiocms:ui/components';
|
|
3
|
+
import MainSidebarContent from './MainSidebarContent.astro';
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<SuiDoubleSidebar class='sidebar'>
|
|
7
|
+
<div slot="outer" class="outer-sidebar-container">
|
|
8
|
+
<MainSidebarContent transition:persist transition:persist-props />
|
|
9
|
+
</div>
|
|
10
|
+
<div slot="inner">
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
</SuiDoubleSidebar>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { DoubleSidebarHelper } from "studiocms:ui/components";
|
|
17
|
+
|
|
18
|
+
if (document.getElementById('sui-sidebars')) {
|
|
19
|
+
const sidebar = new DoubleSidebarHelper();
|
|
20
|
+
|
|
21
|
+
sidebar.showInnerOnClick('nav-open');
|
|
22
|
+
sidebar.showInnerOnClick('nav-close');
|
|
23
|
+
sidebar.showOuterOnClick('back-to-outer');
|
|
24
|
+
sidebar.hideSidebarOnClick('show-page');
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
const year = new Date().getFullYear();
|
|
4
|
+
|
|
5
|
+
const footerYear = year === 2024 ? year : `2024 - ${year}`;
|
|
6
|
+
|
|
7
|
+
const repoLink = 'https://github.com/withstudiocms/studiocms/';
|
|
8
|
+
const licenseLink =
|
|
9
|
+
'https://github.com/withstudiocms/studiocms/blob/main/packages/studiocms/LICENSE';
|
|
10
|
+
---
|
|
11
|
+
<footer class="dashboard-footer">
|
|
12
|
+
|
|
13
|
+
<span>© {footerYear} <a href={licenseLink}><strong>MIT Licensed</strong></a></span>
|
|
14
|
+
|
|
15
|
+
<span><a href={repoLink}>withstudiocms/studiocms</a></span>
|
|
16
|
+
</footer>
|