@solidxai/core-ui 0.1.5-beta.9 → 0.1.7-beta.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/dist/components/auth/AuthTabs.d.ts +14 -0
- package/dist/components/auth/AuthTabs.d.ts.map +1 -0
- package/dist/components/auth/AuthTabs.js +19 -0
- package/dist/components/auth/AuthTabs.js.map +1 -0
- package/dist/components/auth/AuthTabs.tsx +38 -0
- package/dist/components/auth/GoogleAuthChecking.d.ts.map +1 -1
- package/dist/components/auth/GoogleAuthChecking.js +10 -10
- package/dist/components/auth/GoogleAuthChecking.js.map +1 -1
- package/dist/components/auth/GoogleAuthChecking.tsx +8 -9
- package/dist/components/auth/SolidChangeForcePassword.d.ts.map +1 -1
- package/dist/components/auth/SolidChangeForcePassword.js +9 -10
- package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
- package/dist/components/auth/SolidChangeForcePassword.tsx +6 -9
- package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidForgotPassword.js +8 -8
- package/dist/components/auth/SolidForgotPassword.js.map +1 -1
- package/dist/components/auth/SolidForgotPassword.tsx +6 -8
- package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.js +57 -57
- package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.tsx +10 -11
- package/dist/components/auth/SolidInitiateRegisterOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.js +57 -57
- package/dist/components/auth/SolidInitiateRegisterOtp.js.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.tsx +10 -11
- package/dist/components/auth/SolidLogin.d.ts.map +1 -1
- package/dist/components/auth/SolidLogin.js +12 -12
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/auth/SolidLogin.tsx +11 -16
- package/dist/components/auth/SolidRegister.d.ts.map +1 -1
- package/dist/components/auth/SolidRegister.js +19 -19
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/auth/SolidRegister.tsx +18 -23
- package/dist/components/auth/SolidResetPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidResetPassword.js +15 -15
- package/dist/components/auth/SolidResetPassword.js.map +1 -1
- package/dist/components/auth/SolidResetPassword.tsx +7 -8
- package/dist/components/common/GeneralSettings.d.ts.map +1 -1
- package/dist/components/common/GeneralSettings.js +87 -120
- package/dist/components/common/GeneralSettings.js.map +1 -1
- package/dist/components/common/GeneralSettings.tsx +12 -42
- package/dist/components/common/GlobalToast.d.ts +2 -0
- package/dist/components/common/GlobalToast.d.ts.map +1 -0
- package/dist/components/common/GlobalToast.js +25 -0
- package/dist/components/common/GlobalToast.js.map +1 -0
- package/dist/components/common/GlobalToast.tsx +25 -0
- package/dist/components/common/SolidErrorStatePage.d.ts +12 -0
- package/dist/components/common/SolidErrorStatePage.d.ts.map +1 -0
- package/dist/components/common/SolidErrorStatePage.js +16 -0
- package/dist/components/common/SolidErrorStatePage.js.map +1 -0
- package/dist/components/common/SolidErrorStatePage.tsx +55 -0
- package/dist/components/common/SolidExport.d.ts.map +1 -1
- package/dist/components/common/SolidExport.js +19 -31
- package/dist/components/common/SolidExport.js.map +1 -1
- package/dist/components/common/SolidExport.tsx +7 -19
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +41 -41
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/SolidFormStepper.tsx +5 -6
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.js +9 -9
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidChangePassword.tsx +8 -9
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js +8 -8
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidNotifications.tsx +7 -9
- package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.js +11 -11
- package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidPersonalInfo.tsx +10 -11
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.d.ts.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.js +9 -9
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportDropzone.tsx +8 -9
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.d.ts.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js +7 -7
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.js.map +1 -1
- package/dist/components/core/common/SolidGenericImport/SolidImportTransaction.tsx +6 -7
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +78 -21
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +65 -10
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.js +6 -8
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/DeleteModelRowAction.tsx +5 -9
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js +9 -11
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/modelMetadata/list/GenerateModelCodeRowAction.tsx +5 -10
- package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.js +5 -6
- package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/DeleteModuleRowAction.tsx +5 -8
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.js +10 -12
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.js.map +1 -1
- package/dist/components/core/extension/solid-core/moduleMetadata/list/GenerateModuleCodeRowAction.tsx +6 -11
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js +11 -6
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.js.map +1 -1
- package/dist/components/core/extension/solid-core/roleMetadata/RolePermissionsManyToManyFieldWidget.tsx +13 -1
- package/dist/components/core/form/SolidFormUserViewLayout.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormUserViewLayout.js +7 -8
- package/dist/components/core/form/SolidFormUserViewLayout.js.map +1 -1
- package/dist/components/core/form/SolidFormUserViewLayout.tsx +5 -7
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +12 -21
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +11 -33
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +22 -15
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +14 -2
- package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js +4 -2
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.tsx +5 -5
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +37 -26
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +38 -5
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +11 -11
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +9 -11
- package/dist/components/core/kanban/KanbanUserViewLayout.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanUserViewLayout.js +7 -8
- package/dist/components/core/kanban/KanbanUserViewLayout.js.map +1 -1
- package/dist/components/core/kanban/KanbanUserViewLayout.tsx +4 -6
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +5 -7
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +4 -9
- package/dist/components/core/list/PLAN.md +92 -0
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.d.ts.map +1 -1
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.js +13 -13
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.js.map +1 -1
- package/dist/components/core/list/SolidColumnSelector/SolidListColumnSelector.tsx +5 -6
- package/dist/components/core/list/SolidDataTable.d.ts +58 -0
- package/dist/components/core/list/SolidDataTable.d.ts.map +1 -0
- package/dist/components/core/list/SolidDataTable.js +141 -0
- package/dist/components/core/list/SolidDataTable.js.map +1 -0
- package/dist/components/core/list/SolidDataTable.tsx +314 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +20 -67
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +9 -76
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +15 -25
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/CreateModel.tsx +12 -32
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +6 -17
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.tsx +5 -26
- package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
- package/dist/components/core/model/ModelMetaData.js +48 -55
- package/dist/components/core/model/ModelMetaData.js.map +1 -1
- package/dist/components/core/model/ModelMetaData.tsx +4 -22
- package/dist/components/core/module/CreateModule.d.ts.map +1 -1
- package/dist/components/core/module/CreateModule.js +42 -44
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/components/core/module/CreateModule.tsx +13 -27
- package/dist/components/core/module/ModuleListViewData.d.ts.map +1 -1
- package/dist/components/core/module/ModuleListViewData.js +11 -7
- package/dist/components/core/module/ModuleListViewData.js.map +1 -1
- package/dist/components/core/module/ModuleListViewData.tsx +10 -8
- package/dist/components/core/solid-ai/SolidAiChat.d.ts +3 -0
- package/dist/components/core/solid-ai/SolidAiChat.d.ts.map +1 -0
- package/dist/components/core/solid-ai/SolidAiChat.js +1043 -0
- package/dist/components/core/solid-ai/SolidAiChat.js.map +1 -0
- package/dist/components/core/solid-ai/SolidAiChat.module.css +1339 -0
- package/dist/components/core/solid-ai/SolidAiChat.tsx +1237 -0
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +32 -69
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +8 -47
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +24 -37
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/components/core/users/CreateUser.tsx +8 -46
- package/dist/components/core/users/UserListView.d.ts.map +1 -1
- package/dist/components/core/users/UserListView.js +9 -16
- package/dist/components/core/users/UserListView.js.map +1 -1
- package/dist/components/core/users/UserListView.tsx +5 -21
- package/dist/components/layout/AdminLayout.d.ts.map +1 -1
- package/dist/components/layout/AdminLayout.js +4 -2
- package/dist/components/layout/AdminLayout.js.map +1 -1
- package/dist/components/layout/AdminLayout.tsx +4 -2
- package/dist/components/layout/AdminTopHeader.d.ts +2 -0
- package/dist/components/layout/AdminTopHeader.d.ts.map +1 -0
- package/dist/components/layout/AdminTopHeader.js +80 -0
- package/dist/components/layout/AdminTopHeader.js.map +1 -0
- package/dist/components/layout/AdminTopHeader.tsx +165 -0
- package/dist/components/layout/AppSidebar.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.js +1 -2
- package/dist/components/layout/AppSidebar.js.map +1 -1
- package/dist/components/layout/AppSidebar.tsx +0 -2
- package/dist/components/layout/Layout.d.ts.map +1 -1
- package/dist/components/layout/Layout.js +2 -1
- package/dist/components/layout/Layout.js.map +1 -1
- package/dist/components/layout/Layout.tsx +2 -0
- package/dist/components/layout/SolidAiStudioLayout.d.ts +10 -0
- package/dist/components/layout/SolidAiStudioLayout.d.ts.map +1 -0
- package/dist/components/layout/SolidAiStudioLayout.js +159 -0
- package/dist/components/layout/SolidAiStudioLayout.js.map +1 -0
- package/dist/components/layout/SolidAiStudioLayout.tsx +333 -0
- package/dist/components/layout/navbar-one.d.ts.map +1 -1
- package/dist/components/layout/navbar-one.js +1 -2
- package/dist/components/layout/navbar-one.js.map +1 -1
- package/dist/components/layout/navbar-one.tsx +0 -2
- package/dist/components/layout/navbar-two-menu.d.ts.map +1 -1
- package/dist/components/layout/navbar-two-menu.js +50 -24
- package/dist/components/layout/navbar-two-menu.js.map +1 -1
- package/dist/components/layout/navbar-two-menu.tsx +48 -30
- package/dist/components/shad-cn-ui/SolidAutocomplete.d.ts +24 -0
- package/dist/components/shad-cn-ui/SolidAutocomplete.d.ts.map +1 -0
- package/dist/components/shad-cn-ui/SolidAutocomplete.js +224 -0
- package/dist/components/shad-cn-ui/SolidAutocomplete.js.map +1 -0
- package/dist/components/shad-cn-ui/SolidAutocomplete.tsx +339 -0
- package/dist/components/shad-cn-ui/SolidButton.d.ts +14 -0
- package/dist/components/shad-cn-ui/SolidButton.d.ts.map +1 -0
- package/dist/components/shad-cn-ui/SolidButton.js +36 -0
- package/dist/components/shad-cn-ui/SolidButton.js.map +1 -0
- package/dist/components/shad-cn-ui/SolidButton.tsx +54 -0
- package/dist/components/shad-cn-ui/SolidInput.d.ts +5 -0
- package/dist/components/shad-cn-ui/SolidInput.d.ts.map +1 -0
- package/dist/components/shad-cn-ui/SolidInput.js +35 -0
- package/dist/components/shad-cn-ui/SolidInput.js.map +1 -0
- package/dist/components/shad-cn-ui/SolidInput.tsx +12 -0
- package/dist/components/shad-cn-ui/SolidNumberInput.d.ts +10 -0
- package/dist/components/shad-cn-ui/SolidNumberInput.d.ts.map +1 -0
- package/dist/components/shad-cn-ui/SolidNumberInput.js +33 -0
- package/dist/components/shad-cn-ui/SolidNumberInput.js.map +1 -0
- package/dist/components/shad-cn-ui/SolidNumberInput.tsx +24 -0
- package/dist/components/shad-cn-ui/SolidSelect.d.ts +16 -0
- package/dist/components/shad-cn-ui/SolidSelect.d.ts.map +1 -0
- package/dist/components/shad-cn-ui/SolidSelect.js +26 -0
- package/dist/components/shad-cn-ui/SolidSelect.js.map +1 -0
- package/dist/components/shad-cn-ui/SolidSelect.tsx +65 -0
- package/dist/components/shad-cn-ui/SolidTabs.d.ts +18 -0
- package/dist/components/shad-cn-ui/SolidTabs.d.ts.map +1 -0
- package/dist/components/shad-cn-ui/SolidTabs.js +22 -0
- package/dist/components/shad-cn-ui/SolidTabs.js.map +1 -0
- package/dist/components/shad-cn-ui/SolidTabs.tsx +73 -0
- package/dist/components/shad-cn-ui/index.d.ts +7 -0
- package/dist/components/shad-cn-ui/index.d.ts.map +1 -0
- package/dist/components/shad-cn-ui/index.js +7 -0
- package/dist/components/shad-cn-ui/index.js.map +1 -0
- package/dist/components/shad-cn-ui/index.ts +6 -0
- package/dist/helpers/studioSandbox.d.ts +31 -0
- package/dist/helpers/studioSandbox.d.ts.map +1 -0
- package/dist/helpers/studioSandbox.js +104 -0
- package/dist/helpers/studioSandbox.js.map +1 -0
- package/dist/helpers/studioSandbox.ts +117 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.ts +4 -0
- package/dist/redux/features/solidStudioSlice.d.ts +9 -0
- package/dist/redux/features/solidStudioSlice.d.ts.map +1 -0
- package/dist/redux/features/solidStudioSlice.js +72 -0
- package/dist/redux/features/solidStudioSlice.js.map +1 -0
- package/dist/redux/features/solidStudioSlice.ts +78 -0
- package/dist/redux/features/toastSlice.d.ts +15 -0
- package/dist/redux/features/toastSlice.d.ts.map +1 -0
- package/dist/redux/features/toastSlice.js +20 -0
- package/dist/redux/features/toastSlice.js.map +1 -0
- package/dist/redux/features/toastSlice.ts +35 -0
- package/dist/redux/store/defaultStoreConfig.d.ts +1 -0
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/redux/store/defaultStoreConfig.js +2 -1
- package/dist/redux/store/defaultStoreConfig.js.map +1 -1
- package/dist/redux/store/defaultStoreConfig.ts +2 -0
- package/dist/resources/images/errors/error-astronaut-404.png +0 -0
- package/dist/resources/shadcn-base.css +4171 -0
- package/dist/routes/SolidLayoutRegistry.d.ts +51 -0
- package/dist/routes/SolidLayoutRegistry.d.ts.map +1 -0
- package/dist/routes/SolidLayoutRegistry.js +108 -0
- package/dist/routes/SolidLayoutRegistry.js.map +1 -0
- package/dist/routes/SolidLayoutRegistry.tsx +157 -0
- package/dist/routes/guards/AdminGuard.d.ts +2 -0
- package/dist/routes/guards/AdminGuard.d.ts.map +1 -0
- package/dist/routes/guards/AdminGuard.js +16 -0
- package/dist/routes/guards/AdminGuard.js.map +1 -0
- package/dist/routes/guards/AdminGuard.tsx +17 -0
- package/dist/routes/pages/studio/StudioHomePage.d.ts +2 -0
- package/dist/routes/pages/studio/StudioHomePage.d.ts.map +1 -0
- package/dist/routes/pages/studio/StudioHomePage.js +22 -0
- package/dist/routes/pages/studio/StudioHomePage.js.map +1 -0
- package/dist/routes/pages/studio/StudioHomePage.tsx +106 -0
- package/dist/routes/pages/studio/StudioLandingPage.d.ts +2 -0
- package/dist/routes/pages/studio/StudioLandingPage.d.ts.map +1 -0
- package/dist/routes/pages/studio/StudioLandingPage.js +78 -0
- package/dist/routes/pages/studio/StudioLandingPage.js.map +1 -0
- package/dist/routes/pages/studio/StudioLandingPage.tsx +320 -0
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useNavigate } from "react-router-dom";
|
|
4
|
+
import { useSolidLayoutRegistry } from "../../SolidLayoutRegistry";
|
|
5
|
+
import { ChatIcon } from "../../../components/layout/SolidAiStudioLayout";
|
|
6
|
+
import { env } from "../../../adapters/env";
|
|
7
|
+
// ── Icons ──────────────────────────────────────────────────────────────────────
|
|
8
|
+
var ArrowIcon = function () { return (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M2.5 7h9M8 3.5l3.5 3.5L8 10.5", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })); };
|
|
9
|
+
var LayoutPlaceholderIcon = function () { return (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true", children: [_jsx("rect", { x: "1", y: "1", width: "16", height: "16", rx: "2.5", stroke: "currentColor", strokeWidth: "1.3" }), _jsx("path", { d: "M1 6h16", stroke: "currentColor", strokeWidth: "1.1" }), _jsx("path", { d: "M6 6v11", stroke: "currentColor", strokeWidth: "1.1" })] })); };
|
|
10
|
+
var NoLayoutIcon = function () { return (_jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", "aria-hidden": "true", children: [_jsx("rect", { x: "2", y: "2", width: "28", height: "28", rx: "4", stroke: "currentColor", strokeWidth: "1.5", opacity: "0.4", strokeDasharray: "4 3" }), _jsx("path", { d: "M11 16h10M16 11v10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", opacity: "0.5" })] })); };
|
|
11
|
+
var GridViewIcon = function () { return (_jsxs("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", "aria-hidden": "true", children: [_jsx("rect", { x: "1", y: "1", width: "5.5", height: "5.5", rx: "1.2", stroke: "currentColor", strokeWidth: "1.3" }), _jsx("rect", { x: "8.5", y: "1", width: "5.5", height: "5.5", rx: "1.2", stroke: "currentColor", strokeWidth: "1.3" }), _jsx("rect", { x: "1", y: "8.5", width: "5.5", height: "5.5", rx: "1.2", stroke: "currentColor", strokeWidth: "1.3" }), _jsx("rect", { x: "8.5", y: "8.5", width: "5.5", height: "5.5", rx: "1.2", stroke: "currentColor", strokeWidth: "1.3" })] })); };
|
|
12
|
+
var ListViewIcon = function () { return (_jsxs("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", "aria-hidden": "true", children: [_jsx("rect", { x: "1", y: "2.5", width: "13", height: "2.5", rx: "1.2", stroke: "currentColor", strokeWidth: "1.3" }), _jsx("rect", { x: "1", y: "6.25", width: "13", height: "2.5", rx: "1.2", stroke: "currentColor", strokeWidth: "1.3" }), _jsx("rect", { x: "1", y: "10", width: "13", height: "2.5", rx: "1.2", stroke: "currentColor", strokeWidth: "1.3" })] })); };
|
|
13
|
+
// ── Per-card accent colours (cycles by index) ──────────────────────────────────
|
|
14
|
+
var CARD_ACCENTS = [
|
|
15
|
+
{ bg: "hsl(224 70% 54%)", cls: "solid-studio-home-card-icon--backend" },
|
|
16
|
+
{ bg: "hsl(158 64% 42%)", cls: "solid-studio-home-card-icon--list" },
|
|
17
|
+
{ bg: "hsl(32 95% 48%)", cls: "solid-studio-home-card-icon--kanban" },
|
|
18
|
+
{ bg: "hsl(270 65% 58%)", cls: "solid-studio-home-card-icon--form" },
|
|
19
|
+
{ bg: "hsl(199 89% 48%)", cls: "solid-studio-home-card-icon--tree" },
|
|
20
|
+
{ bg: "hsl(215 25% 52%)", cls: "solid-studio-home-card-icon--settings" },
|
|
21
|
+
];
|
|
22
|
+
// ── Generic layout wireframe thumbnail ────────────────────────────────────────
|
|
23
|
+
function LayoutThumb(_a) {
|
|
24
|
+
var accentColor = _a.accentColor, title = _a.title;
|
|
25
|
+
var initials = title
|
|
26
|
+
.split(/\s+/)
|
|
27
|
+
.slice(0, 2)
|
|
28
|
+
.map(function (w) { var _a, _b; return (_b = (_a = w[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) !== null && _b !== void 0 ? _b : ""; })
|
|
29
|
+
.join("");
|
|
30
|
+
return (_jsxs("svg", { className: "solid-studio-home-card-thumb", viewBox: "0 0 280 122", fill: "none", "aria-hidden": "true", children: [_jsx("rect", { width: "280", height: "122", fill: "var(--sidebar-background)" }), _jsx("rect", { width: "40", height: "122", fill: "var(--border)", opacity: "0.7" }), _jsx("rect", { x: "7", y: "14", width: "26", height: "4", rx: "2", fill: "var(--muted)", opacity: "0.45" }), _jsx("rect", { x: "7", y: "26", width: "26", height: "4", rx: "2", fill: "var(--muted)", opacity: "0.28" }), _jsx("rect", { x: "7", y: "38", width: "26", height: "4", rx: "2", fill: "var(--muted)", opacity: "0.28" }), _jsx("rect", { x: "7", y: "50", width: "26", height: "4", rx: "2", fill: "var(--muted)", opacity: "0.28" }), _jsx("rect", { x: "40", y: "0", width: "240", height: "18", fill: "var(--border)", opacity: "0.5" }), _jsx("rect", { x: "48", y: "22", width: "224", height: "28", rx: "3", fill: accentColor, opacity: "0.12" }), _jsx("rect", { x: "56", y: "30", width: "80", height: "7", rx: "2", fill: accentColor, opacity: "0.45" }), _jsx("rect", { x: "56", y: "40", width: "50", height: "4", rx: "2", fill: "var(--muted)", opacity: "0.3" }), _jsx("rect", { x: "48", y: "58", width: "70", height: "58", rx: "3", fill: "var(--card)", stroke: "var(--border)", strokeWidth: "0.8" }), _jsx("rect", { x: "126", y: "58", width: "70", height: "58", rx: "3", fill: "var(--card)", stroke: "var(--border)", strokeWidth: "0.8" }), _jsx("rect", { x: "204", y: "58", width: "68", height: "26", rx: "3", fill: "var(--card)", stroke: "var(--border)", strokeWidth: "0.8" }), _jsx("rect", { x: "204", y: "90", width: "68", height: "26", rx: "3", fill: "var(--card)", stroke: "var(--border)", strokeWidth: "0.8" }), _jsx("rect", { x: "54", y: "65", width: "48", height: "4", rx: "2", fill: "var(--muted)", opacity: "0.28" }), _jsx("rect", { x: "54", y: "73", width: "36", height: "3", rx: "2", fill: "var(--muted)", opacity: "0.2" }), _jsx("rect", { x: "132", y: "65", width: "48", height: "4", rx: "2", fill: "var(--muted)", opacity: "0.28" }), _jsx("rect", { x: "132", y: "73", width: "36", height: "3", rx: "2", fill: "var(--muted)", opacity: "0.2" }), _jsx("circle", { cx: "60", cy: "98", r: "9", fill: accentColor, opacity: "0.18" }), _jsx("text", { x: "60", y: "102", textAnchor: "middle", fontSize: "7", fontWeight: "700", fill: accentColor, opacity: "0.8", fontFamily: "system-ui, sans-serif", children: initials })] }));
|
|
31
|
+
}
|
|
32
|
+
// ── Card Components (shadcn-inspired) ────────────────────────────────────────
|
|
33
|
+
function Card(_a) {
|
|
34
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
35
|
+
return (_jsx("div", { className: "solid-studio-card ".concat(className), children: children }));
|
|
36
|
+
}
|
|
37
|
+
function CardHeader(_a) {
|
|
38
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
39
|
+
return _jsx("div", { className: "solid-studio-card-header ".concat(className), children: children });
|
|
40
|
+
}
|
|
41
|
+
function CardTitle(_a) {
|
|
42
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
43
|
+
return _jsx("h3", { className: "solid-studio-card-title ".concat(className), children: children });
|
|
44
|
+
}
|
|
45
|
+
function CardDescription(_a) {
|
|
46
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
47
|
+
return _jsx("p", { className: "solid-studio-card-description ".concat(className), children: children });
|
|
48
|
+
}
|
|
49
|
+
function CardContent(_a) {
|
|
50
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
51
|
+
return _jsx("div", { className: "solid-studio-card-content ".concat(className), children: children });
|
|
52
|
+
}
|
|
53
|
+
function CardFooter(_a) {
|
|
54
|
+
var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
55
|
+
return _jsx("div", { className: "solid-studio-card-footer ".concat(className), children: children });
|
|
56
|
+
}
|
|
57
|
+
// ── Empty state ───────────────────────────────────────────────────────────────
|
|
58
|
+
function EmptyState() {
|
|
59
|
+
return (_jsx("div", { className: "solid-studio-landing-empty-container", children: _jsxs(Card, { className: "solid-studio-landing-empty-card", children: [_jsxs(CardHeader, { className: "solid-studio-landing-empty-header", children: [_jsx("div", { className: "solid-studio-home-badge", style: { marginBottom: '12px' }, children: "Frontend Studio" }), _jsx(CardTitle, { children: "Frontend layout will appear here" }), _jsx(CardDescription, { children: "Register your app layouts to explore and customize them in the Studio." })] }), _jsxs(CardContent, { className: "solid-studio-landing-empty-body", children: [_jsxs("div", { className: "solid-studio-landing-empty-primary-action", children: [_jsxs("p", { children: ["To get started, use the ", _jsx("strong", { children: "SolidX AI Agent" }), " to add a new custom layout."] }), _jsxs("button", { type: "button", className: "solid-studio-empty-cta-button", onClick: function () {
|
|
60
|
+
var aiUrl = env("VITE_SOLIDX_AI_URL");
|
|
61
|
+
if (aiUrl)
|
|
62
|
+
window.open(aiUrl, "_blank");
|
|
63
|
+
}, children: [_jsx(ChatIcon, {}), _jsx("span", { children: "Open AI Chat" }), _jsx(ArrowIcon, {})] })] }), _jsx("div", { className: "solid-studio-landing-empty-divider" }), _jsxs("div", { className: "solid-studio-landing-empty-details", children: [_jsxs("p", { className: "solid-studio-landing-empty-instruction", children: ["Any route with a ", _jsx("code", { children: "path" }), " and ", _jsx("code", { children: "children" }), " passed to", " ", _jsx("code", { children: "getSolidRoutes()" }), " will automatically appear as a card."] }), _jsx("div", { className: "solid-studio-landing-snippet", children: _jsx("pre", { children: _jsx("code", { children: "// AppRoutes.tsx\nconst extraRoutes = [\n {\n path: \"/my-layout\",\n element: <MyLayout />,\n children: [{ index: true, element: <MyPage /> }],\n },\n];\n\ngetSolidRoutes({ extraRoutes });" }) }) }), _jsxs("p", { className: "solid-studio-landing-hint", children: [_jsx("strong", { children: "Pro Tip:" }), " Add ", _jsxs("code", { children: ["handle: ", "{ title, description }"] }), " to a route to customize its appearance."] })] })] })] }) }));
|
|
64
|
+
}
|
|
65
|
+
// ── Card ──────────────────────────────────────────────────────────────────────
|
|
66
|
+
function LayoutCard(_a) {
|
|
67
|
+
var entry = _a.entry, index = _a.index, listView = _a.listView;
|
|
68
|
+
var navigate = useNavigate();
|
|
69
|
+
var accent = CARD_ACCENTS[index % CARD_ACCENTS.length];
|
|
70
|
+
return (_jsxs("button", { type: "button", className: "solid-studio-home-card".concat(listView ? " solid-studio-home-card--list" : ""), onClick: function () { return navigate(entry.to); }, "aria-label": "Open ".concat(entry.title), children: [!listView && (_jsxs("div", { className: "solid-studio-home-card-image-wrap", children: [_jsx(LayoutThumb, { accentColor: accent.bg, title: entry.title }), _jsx("div", { className: "solid-studio-home-card-image-overlay" })] })), _jsxs("div", { className: "solid-studio-home-card-body", children: [_jsx("div", { className: "solid-studio-home-card-icon ".concat(accent.cls), children: _jsx(LayoutPlaceholderIcon, {}) }), _jsxs("div", { className: "solid-studio-home-card-content", children: [_jsx("span", { className: "solid-studio-home-card-title", children: entry.title }), entry.description && (_jsx("span", { className: "solid-studio-home-card-desc", children: entry.description })), _jsx("span", { className: "solid-studio-home-card-desc", style: { opacity: 0.6, fontSize: 11 }, children: entry.to })] }), _jsxs("div", { className: "solid-studio-home-card-cta", children: [_jsx("span", { children: "Open" }), _jsx(ArrowIcon, {})] })] })] }));
|
|
71
|
+
}
|
|
72
|
+
// ── Page ──────────────────────────────────────────────────────────────────────
|
|
73
|
+
export function StudioLandingPage() {
|
|
74
|
+
var layouts = useSolidLayoutRegistry();
|
|
75
|
+
var _a = useState(false), listView = _a[0], setListView = _a[1];
|
|
76
|
+
return (_jsx("div", { className: "solid-studio-home solid-studio-home--top", children: _jsxs("div", { className: "solid-studio-home-inner solid-studio-home-inner--fluid", children: [_jsx("div", { className: "solid-studio-home-toolbar", children: layouts.length > 0 && (_jsxs("div", { className: "solid-studio-home-toolbar-right", children: [_jsx("button", { type: "button", className: "solid-studio-home-view-btn".concat(!listView ? " solid-studio-home-view-btn--active" : ""), onClick: function () { return setListView(false); }, "aria-label": "Grid view", title: "Grid view", children: _jsx(GridViewIcon, {}) }), _jsx("button", { type: "button", className: "solid-studio-home-view-btn".concat(listView ? " solid-studio-home-view-btn--active" : ""), onClick: function () { return setListView(true); }, "aria-label": "List view", title: "List view", children: _jsx(ListViewIcon, {}) })] })) }), layouts.length === 0 ? (_jsx(EmptyState, {})) : listView ? (_jsx("div", { className: "solid-studio-home-cards--list", children: layouts.map(function (entry, i) { return (_jsx(LayoutCard, { entry: entry, index: i, listView: true }, entry.path)); }) })) : (_jsx("div", { className: "solid-studio-home-cards solid-studio-home-cards--fluid", children: layouts.map(function (entry, i) { return (_jsx(LayoutCard, { entry: entry, index: i, listView: false }, entry.path)); }) }))] }) }));
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=StudioLandingPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StudioLandingPage.js","sourceRoot":"","sources":["../../../../src/routes/pages/studio/StudioLandingPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,kFAAkF;AAElF,IAAM,SAAS,GAAG,cAAM,OAAA,CACtB,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,YAC5E,eAAM,CAAC,EAAC,+BAA+B,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK,EAAC,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,GAAG,GAC3H,CACP,EAJuB,CAIvB,CAAC;AAEF,IAAM,qBAAqB,GAAG,cAAM,OAAA,CAClC,eAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,aAC5E,eAAM,CAAC,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAC,KAAK,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK,GAAG,EAC5F,eAAM,CAAC,EAAC,SAAS,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK,GAAG,EAC5D,eAAM,CAAC,EAAC,SAAS,EA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CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACtB,KAAC,UAAU,KAAG,CACf,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CACb,cAAK,SAAS,EAAC,+BAA+B,YAC3C,OAAO,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,CAAC,IAAK,OAAA,CACzB,KAAC,UAAU,IAAkB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,UAA5C,KAAK,CAAC,IAAI,CAAqC,CACjE,EAF0B,CAE1B,CAAC,GACE,CACP,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,wDAAwD,YACpE,OAAO,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,CAAC,IAAK,OAAA,CACzB,KAAC,UAAU,IAAkB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,IAAnD,KAAK,CAAC,IAAI,CAA6C,CACzE,EAF0B,CAE1B,CAAC,GACE,CACP,IACG,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useSolidLayoutRegistry } from \"../../SolidLayoutRegistry\";\nimport type { SolidLayoutEntry } from \"../../SolidLayoutRegistry\";\nimport { ChatIcon } from \"@/components/layout/SolidAiStudioLayout\";\nimport { env } from \"../../../adapters/env\";\n\n// ── Icons ──────────────────────────────────────────────────────────────────────\n\nconst ArrowIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M2.5 7h9M8 3.5l3.5 3.5L8 10.5\" stroke=\"currentColor\" strokeWidth=\"1.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nconst LayoutPlaceholderIcon = () => (\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"16\" height=\"16\" rx=\"2.5\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <path d=\"M1 6h16\" stroke=\"currentColor\" strokeWidth=\"1.1\" />\n <path d=\"M6 6v11\" stroke=\"currentColor\" strokeWidth=\"1.1\" />\n </svg>\n);\n\nconst NoLayoutIcon = () => (\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"2\" y=\"2\" width=\"28\" height=\"28\" rx=\"4\" stroke=\"currentColor\" strokeWidth=\"1.5\" opacity=\"0.4\" strokeDasharray=\"4 3\" />\n <path d=\"M11 16h10M16 11v10\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" opacity=\"0.5\" />\n </svg>\n);\n\nconst GridViewIcon = () => (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"8.5\" y=\"1\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"8.5\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"8.5\" y=\"8.5\" width=\"5.5\" height=\"5.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n </svg>\n);\n\nconst ListViewIcon = () => (\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"2.5\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"6.25\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n <rect x=\"1\" y=\"10\" width=\"13\" height=\"2.5\" rx=\"1.2\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n </svg>\n);\n\n// ── Per-card accent colours (cycles by index) ──────────────────────────────────\n\nconst CARD_ACCENTS = [\n { bg: \"hsl(224 70% 54%)\", cls: \"solid-studio-home-card-icon--backend\" },\n { bg: \"hsl(158 64% 42%)\", cls: \"solid-studio-home-card-icon--list\" },\n { bg: \"hsl(32 95% 48%)\", cls: \"solid-studio-home-card-icon--kanban\" },\n { bg: \"hsl(270 65% 58%)\", cls: \"solid-studio-home-card-icon--form\" },\n { bg: \"hsl(199 89% 48%)\", cls: \"solid-studio-home-card-icon--tree\" },\n { bg: \"hsl(215 25% 52%)\", cls: \"solid-studio-home-card-icon--settings\" },\n];\n\n// ── Generic layout wireframe thumbnail ────────────────────────────────────────\n\nfunction LayoutThumb({ accentColor, title }: { accentColor: string; title: string }) {\n const initials = title\n .split(/\\s+/)\n .slice(0, 2)\n .map((w) => w[0]?.toUpperCase() ?? \"\")\n .join(\"\");\n\n return (\n <svg\n className=\"solid-studio-home-card-thumb\"\n viewBox=\"0 0 280 122\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n {/* background */}\n <rect width=\"280\" height=\"122\" fill=\"var(--sidebar-background)\" />\n\n {/* sidebar */}\n <rect width=\"40\" height=\"122\" fill=\"var(--border)\" opacity=\"0.7\" />\n <rect x=\"7\" y=\"14\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.45\" />\n <rect x=\"7\" y=\"26\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"7\" y=\"38\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"7\" y=\"50\" width=\"26\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n\n {/* top bar */}\n <rect x=\"40\" y=\"0\" width=\"240\" height=\"18\" fill=\"var(--border)\" opacity=\"0.5\" />\n\n {/* accent header band */}\n <rect x=\"48\" y=\"22\" width=\"224\" height=\"28\" rx=\"3\" fill={accentColor} opacity=\"0.12\" />\n <rect x=\"56\" y=\"30\" width=\"80\" height=\"7\" rx=\"2\" fill={accentColor} opacity=\"0.45\" />\n <rect x=\"56\" y=\"40\" width=\"50\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.3\" />\n\n {/* content blocks */}\n <rect x=\"48\" y=\"58\" width=\"70\" height=\"58\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"126\" y=\"58\" width=\"70\" height=\"58\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"204\" y=\"58\" width=\"68\" height=\"26\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n <rect x=\"204\" y=\"90\" width=\"68\" height=\"26\" rx=\"3\" fill=\"var(--card)\" stroke=\"var(--border)\" strokeWidth=\"0.8\" />\n\n {/* inner muted lines */}\n <rect x=\"54\" y=\"65\" width=\"48\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"54\" y=\"73\" width=\"36\" height=\"3\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.2\" />\n <rect x=\"132\" y=\"65\" width=\"48\" height=\"4\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.28\" />\n <rect x=\"132\" y=\"73\" width=\"36\" height=\"3\" rx=\"2\" fill=\"var(--muted)\" opacity=\"0.2\" />\n\n {/* initials badge */}\n <circle cx=\"60\" cy=\"98\" r=\"9\" fill={accentColor} opacity=\"0.18\" />\n <text\n x=\"60\"\n y=\"102\"\n textAnchor=\"middle\"\n fontSize=\"7\"\n fontWeight=\"700\"\n fill={accentColor}\n opacity=\"0.8\"\n fontFamily=\"system-ui, sans-serif\"\n >\n {initials}\n </text>\n </svg>\n );\n}\n\n// ── Card Components (shadcn-inspired) ────────────────────────────────────────\n\nfunction Card({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return (\n <div className={`solid-studio-card ${className}`}>\n {children}\n </div>\n );\n}\n\nfunction CardHeader({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-header ${className}`}>{children}</div>;\n}\n\nfunction CardTitle({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <h3 className={`solid-studio-card-title ${className}`}>{children}</h3>;\n}\n\nfunction CardDescription({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <p className={`solid-studio-card-description ${className}`}>{children}</p>;\n}\n\nfunction CardContent({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-content ${className}`}>{children}</div>;\n}\n\nfunction CardFooter({ children, className = \"\" }: { children: React.ReactNode; className?: string }) {\n return <div className={`solid-studio-card-footer ${className}`}>{children}</div>;\n}\n\n// ── Empty state ───────────────────────────────────────────────────────────────\n\nfunction EmptyState() {\n return (\n <div className=\"solid-studio-landing-empty-container\">\n <Card className=\"solid-studio-landing-empty-card\">\n <CardHeader className=\"solid-studio-landing-empty-header\">\n <div className=\"solid-studio-home-badge\" style={{ marginBottom: '12px' }}>Frontend Studio</div>\n <CardTitle>Frontend layout will appear here</CardTitle>\n <CardDescription>\n Register your app layouts to explore and customize them in the Studio.\n </CardDescription>\n </CardHeader>\n\n <CardContent className=\"solid-studio-landing-empty-body\">\n <div className=\"solid-studio-landing-empty-primary-action\">\n <p>To get started, use the <strong>SolidX AI Agent</strong> to add a new custom layout.</p>\n <button\n type=\"button\"\n className=\"solid-studio-empty-cta-button\"\n onClick={() => {\n const aiUrl = env(\"VITE_SOLIDX_AI_URL\");\n if (aiUrl) window.open(aiUrl, \"_blank\");\n }}\n >\n <ChatIcon />\n <span>Open AI Chat</span>\n <ArrowIcon />\n </button>\n </div>\n\n <div className=\"solid-studio-landing-empty-divider\" />\n\n <div className=\"solid-studio-landing-empty-details\">\n <p className=\"solid-studio-landing-empty-instruction\">\n Any route with a <code>path</code> and <code>children</code> passed to{\" \"}\n <code>getSolidRoutes()</code> will automatically appear as a card.\n </p>\n <div className=\"solid-studio-landing-snippet\">\n <pre>\n <code>{`// AppRoutes.tsx\\nconst extraRoutes = [\\n {\\n path: \"/my-layout\",\\n element: <MyLayout />,\\n children: [{ index: true, element: <MyPage /> }],\\n },\\n];\\n\\ngetSolidRoutes({ extraRoutes });`}</code>\n </pre>\n </div>\n <p className=\"solid-studio-landing-hint\">\n <strong>Pro Tip:</strong> Add <code>handle: {`{ title, description }`}</code> to a route to customize its appearance.\n </p>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n\n// ── Card ──────────────────────────────────────────────────────────────────────\n\nfunction LayoutCard({\n entry,\n index,\n listView,\n}: {\n entry: SolidLayoutEntry;\n index: number;\n listView: boolean;\n}) {\n const navigate = useNavigate();\n const accent = CARD_ACCENTS[index % CARD_ACCENTS.length];\n\n return (\n <button\n type=\"button\"\n className={`solid-studio-home-card${listView ? \" solid-studio-home-card--list\" : \"\"}`}\n onClick={() => navigate(entry.to)}\n aria-label={`Open ${entry.title}`}\n >\n {!listView && (\n <div className=\"solid-studio-home-card-image-wrap\">\n <LayoutThumb accentColor={accent.bg} title={entry.title} />\n <div className=\"solid-studio-home-card-image-overlay\" />\n </div>\n )}\n <div className=\"solid-studio-home-card-body\">\n <div className={`solid-studio-home-card-icon ${accent.cls}`}>\n <LayoutPlaceholderIcon />\n </div>\n <div className=\"solid-studio-home-card-content\">\n <span className=\"solid-studio-home-card-title\">{entry.title}</span>\n {entry.description && (\n <span className=\"solid-studio-home-card-desc\">{entry.description}</span>\n )}\n <span className=\"solid-studio-home-card-desc\" style={{ opacity: 0.6, fontSize: 11 }}>\n {entry.to}\n </span>\n </div>\n <div className=\"solid-studio-home-card-cta\">\n <span>Open</span>\n <ArrowIcon />\n </div>\n </div>\n </button>\n );\n}\n\n// ── Page ──────────────────────────────────────────────────────────────────────\n\nexport function StudioLandingPage() {\n const layouts = useSolidLayoutRegistry();\n const [listView, setListView] = useState(false);\n\n return (\n <div className=\"solid-studio-home solid-studio-home--top\">\n <div className=\"solid-studio-home-inner solid-studio-home-inner--fluid\">\n\n {/* Toolbar: title left, view toggle right */}\n <div className=\"solid-studio-home-toolbar\">\n {/* <div className=\"solid-studio-home-toolbar-left\">\n <div className=\"solid-studio-home-heading\">\n <div className=\"solid-studio-home-badge\">Frontend Studio</div>\n <h1>Frontend Layouts</h1>\n <p>\n {layouts.length > 0\n ? `${layouts.length} layout${layouts.length === 1 ? \"\" : \"s\"} registered in your app.`\n : \"Register your app layouts to explore them here.\"}\n </p>\n </div>\n </div> */}\n {layouts.length > 0 && (\n <div className=\"solid-studio-home-toolbar-right\">\n <button\n type=\"button\"\n className={`solid-studio-home-view-btn${!listView ? \" solid-studio-home-view-btn--active\" : \"\"}`}\n onClick={() => setListView(false)}\n aria-label=\"Grid view\"\n title=\"Grid view\"\n >\n <GridViewIcon />\n </button>\n <button\n type=\"button\"\n className={`solid-studio-home-view-btn${listView ? \" solid-studio-home-view-btn--active\" : \"\"}`}\n onClick={() => setListView(true)}\n aria-label=\"List view\"\n title=\"List view\"\n >\n <ListViewIcon />\n </button>\n </div>\n )}\n </div>\n\n {layouts.length === 0 ? (\n <EmptyState />\n ) : listView ? (\n <div className=\"solid-studio-home-cards--list\">\n {layouts.map((entry, i) => (\n <LayoutCard key={entry.path} entry={entry} index={i} listView />\n ))}\n </div>\n ) : (\n <div className=\"solid-studio-home-cards solid-studio-home-cards--fluid\">\n {layouts.map((entry, i) => (\n <LayoutCard key={entry.path} entry={entry} index={i} listView={false} />\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { useNavigate } from "react-router-dom";
|
|
3
|
+
import { useSolidLayoutRegistry } from "../../SolidLayoutRegistry";
|
|
4
|
+
import type { SolidLayoutEntry } from "../../SolidLayoutRegistry";
|
|
5
|
+
import { ChatIcon } from "@/components/layout/SolidAiStudioLayout";
|
|
6
|
+
import { env } from "../../../adapters/env";
|
|
7
|
+
|
|
8
|
+
// ── Icons ──────────────────────────────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
const ArrowIcon = () => (
|
|
11
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
|
|
12
|
+
<path d="M2.5 7h9M8 3.5l3.5 3.5L8 10.5" stroke="currentColor" strokeWidth="1.4" strokeLinecap="round" strokeLinejoin="round" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const LayoutPlaceholderIcon = () => (
|
|
17
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" aria-hidden="true">
|
|
18
|
+
<rect x="1" y="1" width="16" height="16" rx="2.5" stroke="currentColor" strokeWidth="1.3" />
|
|
19
|
+
<path d="M1 6h16" stroke="currentColor" strokeWidth="1.1" />
|
|
20
|
+
<path d="M6 6v11" stroke="currentColor" strokeWidth="1.1" />
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const NoLayoutIcon = () => (
|
|
25
|
+
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" aria-hidden="true">
|
|
26
|
+
<rect x="2" y="2" width="28" height="28" rx="4" stroke="currentColor" strokeWidth="1.5" opacity="0.4" strokeDasharray="4 3" />
|
|
27
|
+
<path d="M11 16h10M16 11v10" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" opacity="0.5" />
|
|
28
|
+
</svg>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const GridViewIcon = () => (
|
|
32
|
+
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" aria-hidden="true">
|
|
33
|
+
<rect x="1" y="1" width="5.5" height="5.5" rx="1.2" stroke="currentColor" strokeWidth="1.3" />
|
|
34
|
+
<rect x="8.5" y="1" width="5.5" height="5.5" rx="1.2" stroke="currentColor" strokeWidth="1.3" />
|
|
35
|
+
<rect x="1" y="8.5" width="5.5" height="5.5" rx="1.2" stroke="currentColor" strokeWidth="1.3" />
|
|
36
|
+
<rect x="8.5" y="8.5" width="5.5" height="5.5" rx="1.2" stroke="currentColor" strokeWidth="1.3" />
|
|
37
|
+
</svg>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const ListViewIcon = () => (
|
|
41
|
+
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" aria-hidden="true">
|
|
42
|
+
<rect x="1" y="2.5" width="13" height="2.5" rx="1.2" stroke="currentColor" strokeWidth="1.3" />
|
|
43
|
+
<rect x="1" y="6.25" width="13" height="2.5" rx="1.2" stroke="currentColor" strokeWidth="1.3" />
|
|
44
|
+
<rect x="1" y="10" width="13" height="2.5" rx="1.2" stroke="currentColor" strokeWidth="1.3" />
|
|
45
|
+
</svg>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
// ── Per-card accent colours (cycles by index) ──────────────────────────────────
|
|
49
|
+
|
|
50
|
+
const CARD_ACCENTS = [
|
|
51
|
+
{ bg: "hsl(224 70% 54%)", cls: "solid-studio-home-card-icon--backend" },
|
|
52
|
+
{ bg: "hsl(158 64% 42%)", cls: "solid-studio-home-card-icon--list" },
|
|
53
|
+
{ bg: "hsl(32 95% 48%)", cls: "solid-studio-home-card-icon--kanban" },
|
|
54
|
+
{ bg: "hsl(270 65% 58%)", cls: "solid-studio-home-card-icon--form" },
|
|
55
|
+
{ bg: "hsl(199 89% 48%)", cls: "solid-studio-home-card-icon--tree" },
|
|
56
|
+
{ bg: "hsl(215 25% 52%)", cls: "solid-studio-home-card-icon--settings" },
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
// ── Generic layout wireframe thumbnail ────────────────────────────────────────
|
|
60
|
+
|
|
61
|
+
function LayoutThumb({ accentColor, title }: { accentColor: string; title: string }) {
|
|
62
|
+
const initials = title
|
|
63
|
+
.split(/\s+/)
|
|
64
|
+
.slice(0, 2)
|
|
65
|
+
.map((w) => w[0]?.toUpperCase() ?? "")
|
|
66
|
+
.join("");
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<svg
|
|
70
|
+
className="solid-studio-home-card-thumb"
|
|
71
|
+
viewBox="0 0 280 122"
|
|
72
|
+
fill="none"
|
|
73
|
+
aria-hidden="true"
|
|
74
|
+
>
|
|
75
|
+
{/* background */}
|
|
76
|
+
<rect width="280" height="122" fill="var(--sidebar-background)" />
|
|
77
|
+
|
|
78
|
+
{/* sidebar */}
|
|
79
|
+
<rect width="40" height="122" fill="var(--border)" opacity="0.7" />
|
|
80
|
+
<rect x="7" y="14" width="26" height="4" rx="2" fill="var(--muted)" opacity="0.45" />
|
|
81
|
+
<rect x="7" y="26" width="26" height="4" rx="2" fill="var(--muted)" opacity="0.28" />
|
|
82
|
+
<rect x="7" y="38" width="26" height="4" rx="2" fill="var(--muted)" opacity="0.28" />
|
|
83
|
+
<rect x="7" y="50" width="26" height="4" rx="2" fill="var(--muted)" opacity="0.28" />
|
|
84
|
+
|
|
85
|
+
{/* top bar */}
|
|
86
|
+
<rect x="40" y="0" width="240" height="18" fill="var(--border)" opacity="0.5" />
|
|
87
|
+
|
|
88
|
+
{/* accent header band */}
|
|
89
|
+
<rect x="48" y="22" width="224" height="28" rx="3" fill={accentColor} opacity="0.12" />
|
|
90
|
+
<rect x="56" y="30" width="80" height="7" rx="2" fill={accentColor} opacity="0.45" />
|
|
91
|
+
<rect x="56" y="40" width="50" height="4" rx="2" fill="var(--muted)" opacity="0.3" />
|
|
92
|
+
|
|
93
|
+
{/* content blocks */}
|
|
94
|
+
<rect x="48" y="58" width="70" height="58" rx="3" fill="var(--card)" stroke="var(--border)" strokeWidth="0.8" />
|
|
95
|
+
<rect x="126" y="58" width="70" height="58" rx="3" fill="var(--card)" stroke="var(--border)" strokeWidth="0.8" />
|
|
96
|
+
<rect x="204" y="58" width="68" height="26" rx="3" fill="var(--card)" stroke="var(--border)" strokeWidth="0.8" />
|
|
97
|
+
<rect x="204" y="90" width="68" height="26" rx="3" fill="var(--card)" stroke="var(--border)" strokeWidth="0.8" />
|
|
98
|
+
|
|
99
|
+
{/* inner muted lines */}
|
|
100
|
+
<rect x="54" y="65" width="48" height="4" rx="2" fill="var(--muted)" opacity="0.28" />
|
|
101
|
+
<rect x="54" y="73" width="36" height="3" rx="2" fill="var(--muted)" opacity="0.2" />
|
|
102
|
+
<rect x="132" y="65" width="48" height="4" rx="2" fill="var(--muted)" opacity="0.28" />
|
|
103
|
+
<rect x="132" y="73" width="36" height="3" rx="2" fill="var(--muted)" opacity="0.2" />
|
|
104
|
+
|
|
105
|
+
{/* initials badge */}
|
|
106
|
+
<circle cx="60" cy="98" r="9" fill={accentColor} opacity="0.18" />
|
|
107
|
+
<text
|
|
108
|
+
x="60"
|
|
109
|
+
y="102"
|
|
110
|
+
textAnchor="middle"
|
|
111
|
+
fontSize="7"
|
|
112
|
+
fontWeight="700"
|
|
113
|
+
fill={accentColor}
|
|
114
|
+
opacity="0.8"
|
|
115
|
+
fontFamily="system-ui, sans-serif"
|
|
116
|
+
>
|
|
117
|
+
{initials}
|
|
118
|
+
</text>
|
|
119
|
+
</svg>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ── Card Components (shadcn-inspired) ────────────────────────────────────────
|
|
124
|
+
|
|
125
|
+
function Card({ children, className = "" }: { children: React.ReactNode; className?: string }) {
|
|
126
|
+
return (
|
|
127
|
+
<div className={`solid-studio-card ${className}`}>
|
|
128
|
+
{children}
|
|
129
|
+
</div>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function CardHeader({ children, className = "" }: { children: React.ReactNode; className?: string }) {
|
|
134
|
+
return <div className={`solid-studio-card-header ${className}`}>{children}</div>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function CardTitle({ children, className = "" }: { children: React.ReactNode; className?: string }) {
|
|
138
|
+
return <h3 className={`solid-studio-card-title ${className}`}>{children}</h3>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function CardDescription({ children, className = "" }: { children: React.ReactNode; className?: string }) {
|
|
142
|
+
return <p className={`solid-studio-card-description ${className}`}>{children}</p>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function CardContent({ children, className = "" }: { children: React.ReactNode; className?: string }) {
|
|
146
|
+
return <div className={`solid-studio-card-content ${className}`}>{children}</div>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function CardFooter({ children, className = "" }: { children: React.ReactNode; className?: string }) {
|
|
150
|
+
return <div className={`solid-studio-card-footer ${className}`}>{children}</div>;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// ── Empty state ───────────────────────────────────────────────────────────────
|
|
154
|
+
|
|
155
|
+
function EmptyState() {
|
|
156
|
+
return (
|
|
157
|
+
<div className="solid-studio-landing-empty-container">
|
|
158
|
+
<Card className="solid-studio-landing-empty-card">
|
|
159
|
+
<CardHeader className="solid-studio-landing-empty-header">
|
|
160
|
+
<div className="solid-studio-home-badge" style={{ marginBottom: '12px' }}>Frontend Studio</div>
|
|
161
|
+
<CardTitle>Frontend layout will appear here</CardTitle>
|
|
162
|
+
<CardDescription>
|
|
163
|
+
Register your app layouts to explore and customize them in the Studio.
|
|
164
|
+
</CardDescription>
|
|
165
|
+
</CardHeader>
|
|
166
|
+
|
|
167
|
+
<CardContent className="solid-studio-landing-empty-body">
|
|
168
|
+
<div className="solid-studio-landing-empty-primary-action">
|
|
169
|
+
<p>To get started, use the <strong>SolidX AI Agent</strong> to add a new custom layout.</p>
|
|
170
|
+
<button
|
|
171
|
+
type="button"
|
|
172
|
+
className="solid-studio-empty-cta-button"
|
|
173
|
+
onClick={() => {
|
|
174
|
+
const aiUrl = env("VITE_SOLIDX_AI_URL");
|
|
175
|
+
if (aiUrl) window.open(aiUrl, "_blank");
|
|
176
|
+
}}
|
|
177
|
+
>
|
|
178
|
+
<ChatIcon />
|
|
179
|
+
<span>Open AI Chat</span>
|
|
180
|
+
<ArrowIcon />
|
|
181
|
+
</button>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<div className="solid-studio-landing-empty-divider" />
|
|
185
|
+
|
|
186
|
+
<div className="solid-studio-landing-empty-details">
|
|
187
|
+
<p className="solid-studio-landing-empty-instruction">
|
|
188
|
+
Any route with a <code>path</code> and <code>children</code> passed to{" "}
|
|
189
|
+
<code>getSolidRoutes()</code> will automatically appear as a card.
|
|
190
|
+
</p>
|
|
191
|
+
<div className="solid-studio-landing-snippet">
|
|
192
|
+
<pre>
|
|
193
|
+
<code>{`// AppRoutes.tsx\nconst extraRoutes = [\n {\n path: "/my-layout",\n element: <MyLayout />,\n children: [{ index: true, element: <MyPage /> }],\n },\n];\n\ngetSolidRoutes({ extraRoutes });`}</code>
|
|
194
|
+
</pre>
|
|
195
|
+
</div>
|
|
196
|
+
<p className="solid-studio-landing-hint">
|
|
197
|
+
<strong>Pro Tip:</strong> Add <code>handle: {`{ title, description }`}</code> to a route to customize its appearance.
|
|
198
|
+
</p>
|
|
199
|
+
</div>
|
|
200
|
+
</CardContent>
|
|
201
|
+
</Card>
|
|
202
|
+
</div>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// ── Card ──────────────────────────────────────────────────────────────────────
|
|
207
|
+
|
|
208
|
+
function LayoutCard({
|
|
209
|
+
entry,
|
|
210
|
+
index,
|
|
211
|
+
listView,
|
|
212
|
+
}: {
|
|
213
|
+
entry: SolidLayoutEntry;
|
|
214
|
+
index: number;
|
|
215
|
+
listView: boolean;
|
|
216
|
+
}) {
|
|
217
|
+
const navigate = useNavigate();
|
|
218
|
+
const accent = CARD_ACCENTS[index % CARD_ACCENTS.length];
|
|
219
|
+
|
|
220
|
+
return (
|
|
221
|
+
<button
|
|
222
|
+
type="button"
|
|
223
|
+
className={`solid-studio-home-card${listView ? " solid-studio-home-card--list" : ""}`}
|
|
224
|
+
onClick={() => navigate(entry.to)}
|
|
225
|
+
aria-label={`Open ${entry.title}`}
|
|
226
|
+
>
|
|
227
|
+
{!listView && (
|
|
228
|
+
<div className="solid-studio-home-card-image-wrap">
|
|
229
|
+
<LayoutThumb accentColor={accent.bg} title={entry.title} />
|
|
230
|
+
<div className="solid-studio-home-card-image-overlay" />
|
|
231
|
+
</div>
|
|
232
|
+
)}
|
|
233
|
+
<div className="solid-studio-home-card-body">
|
|
234
|
+
<div className={`solid-studio-home-card-icon ${accent.cls}`}>
|
|
235
|
+
<LayoutPlaceholderIcon />
|
|
236
|
+
</div>
|
|
237
|
+
<div className="solid-studio-home-card-content">
|
|
238
|
+
<span className="solid-studio-home-card-title">{entry.title}</span>
|
|
239
|
+
{entry.description && (
|
|
240
|
+
<span className="solid-studio-home-card-desc">{entry.description}</span>
|
|
241
|
+
)}
|
|
242
|
+
<span className="solid-studio-home-card-desc" style={{ opacity: 0.6, fontSize: 11 }}>
|
|
243
|
+
{entry.to}
|
|
244
|
+
</span>
|
|
245
|
+
</div>
|
|
246
|
+
<div className="solid-studio-home-card-cta">
|
|
247
|
+
<span>Open</span>
|
|
248
|
+
<ArrowIcon />
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
</button>
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// ── Page ──────────────────────────────────────────────────────────────────────
|
|
256
|
+
|
|
257
|
+
export function StudioLandingPage() {
|
|
258
|
+
const layouts = useSolidLayoutRegistry();
|
|
259
|
+
const [listView, setListView] = useState(false);
|
|
260
|
+
|
|
261
|
+
return (
|
|
262
|
+
<div className="solid-studio-home solid-studio-home--top">
|
|
263
|
+
<div className="solid-studio-home-inner solid-studio-home-inner--fluid">
|
|
264
|
+
|
|
265
|
+
{/* Toolbar: title left, view toggle right */}
|
|
266
|
+
<div className="solid-studio-home-toolbar">
|
|
267
|
+
{/* <div className="solid-studio-home-toolbar-left">
|
|
268
|
+
<div className="solid-studio-home-heading">
|
|
269
|
+
<div className="solid-studio-home-badge">Frontend Studio</div>
|
|
270
|
+
<h1>Frontend Layouts</h1>
|
|
271
|
+
<p>
|
|
272
|
+
{layouts.length > 0
|
|
273
|
+
? `${layouts.length} layout${layouts.length === 1 ? "" : "s"} registered in your app.`
|
|
274
|
+
: "Register your app layouts to explore them here."}
|
|
275
|
+
</p>
|
|
276
|
+
</div>
|
|
277
|
+
</div> */}
|
|
278
|
+
{layouts.length > 0 && (
|
|
279
|
+
<div className="solid-studio-home-toolbar-right">
|
|
280
|
+
<button
|
|
281
|
+
type="button"
|
|
282
|
+
className={`solid-studio-home-view-btn${!listView ? " solid-studio-home-view-btn--active" : ""}`}
|
|
283
|
+
onClick={() => setListView(false)}
|
|
284
|
+
aria-label="Grid view"
|
|
285
|
+
title="Grid view"
|
|
286
|
+
>
|
|
287
|
+
<GridViewIcon />
|
|
288
|
+
</button>
|
|
289
|
+
<button
|
|
290
|
+
type="button"
|
|
291
|
+
className={`solid-studio-home-view-btn${listView ? " solid-studio-home-view-btn--active" : ""}`}
|
|
292
|
+
onClick={() => setListView(true)}
|
|
293
|
+
aria-label="List view"
|
|
294
|
+
title="List view"
|
|
295
|
+
>
|
|
296
|
+
<ListViewIcon />
|
|
297
|
+
</button>
|
|
298
|
+
</div>
|
|
299
|
+
)}
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
{layouts.length === 0 ? (
|
|
303
|
+
<EmptyState />
|
|
304
|
+
) : listView ? (
|
|
305
|
+
<div className="solid-studio-home-cards--list">
|
|
306
|
+
{layouts.map((entry, i) => (
|
|
307
|
+
<LayoutCard key={entry.path} entry={entry} index={i} listView />
|
|
308
|
+
))}
|
|
309
|
+
</div>
|
|
310
|
+
) : (
|
|
311
|
+
<div className="solid-studio-home-cards solid-studio-home-cards--fluid">
|
|
312
|
+
{layouts.map((entry, i) => (
|
|
313
|
+
<LayoutCard key={entry.path} entry={entry} index={i} listView={false} />
|
|
314
|
+
))}
|
|
315
|
+
</div>
|
|
316
|
+
)}
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
);
|
|
320
|
+
}
|