@aphexcms/cms-core 0.1.0 → 0.1.1
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/package.json +1 -1
- package/src/auth/auth-hooks.ts +1 -1
- package/src/components/AdminApp.svelte +3 -3
- package/src/components/admin/DocumentEditor.svelte +2 -2
- package/src/components/admin/DocumentTypesList.svelte +2 -2
- package/src/components/admin/ObjectModal.svelte +2 -2
- package/src/components/admin/SchemaField.svelte +3 -3
- package/src/components/admin/fields/ArrayField.svelte +2 -2
- package/src/components/admin/fields/BooleanField.svelte +1 -1
- package/src/components/admin/fields/ImageField.svelte +1 -1
- package/src/components/admin/fields/NumberField.svelte +1 -1
- package/src/components/admin/fields/ReferenceField.svelte +4 -4
- package/src/components/admin/fields/SlugField.svelte +2 -2
- package/src/components/admin/fields/StringField.svelte +1 -1
- package/src/components/admin/fields/TextareaField.svelte +1 -1
- package/src/components/layout/OrganizationSwitcher.svelte +2 -2
- package/src/components/layout/Sidebar.svelte +3 -3
- package/src/components/layout/sidebar/AppSidebar.svelte +1 -1
- package/src/components/layout/sidebar/NavMain.svelte +2 -2
- package/src/components/layout/sidebar/NavSecondary.svelte +1 -1
- package/src/components/layout/sidebar/NavUser.svelte +2 -2
- package/src/db/adapters/index.ts +1 -1
- package/src/index.ts +1 -1
- package/src/plugins/README.md +1 -1
- package/src/storage/providers/storage.ts +2 -2
package/package.json
CHANGED
package/src/auth/auth-hooks.ts
CHANGED
|
@@ -68,7 +68,7 @@ export async function handleAuthHook(
|
|
|
68
68
|
|
|
69
69
|
// Dynamically find the GraphQL endpoint from plugins
|
|
70
70
|
let graphqlEndpoint: string | undefined;
|
|
71
|
-
const graphqlPlugin = config.plugins?.find((p) => p.name === '@
|
|
71
|
+
const graphqlPlugin = config.plugins?.find((p) => p.name === '@aphexcms/graphql-plugin');
|
|
72
72
|
if (graphqlPlugin && graphqlPlugin.routes) {
|
|
73
73
|
graphqlEndpoint = Object.keys(graphqlPlugin.routes)[0];
|
|
74
74
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* AdminApp - Complete CMS Admin Interface
|
|
4
4
|
* A packaged, reusable Sanity-style admin UI
|
|
5
5
|
*/
|
|
6
|
-
import { Alert, AlertDescription, AlertTitle } from '@
|
|
7
|
-
import { Button } from '@
|
|
8
|
-
import * as Tabs from '@
|
|
6
|
+
import { Alert, AlertDescription, AlertTitle } from '@aphexcms/ui/shadcn/alert';
|
|
7
|
+
import { Button } from '@aphexcms/ui/shadcn/button';
|
|
8
|
+
import * as Tabs from '@aphexcms/ui/shadcn/tabs';
|
|
9
9
|
import { page } from '$app/state';
|
|
10
10
|
import { goto } from '$app/navigation';
|
|
11
11
|
import { SvelteURLSearchParams } from 'svelte/reactivity';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Button } from '@
|
|
3
|
-
import { Badge } from '@
|
|
2
|
+
import { Button } from '@aphexcms/ui/shadcn/button';
|
|
3
|
+
import { Badge } from '@aphexcms/ui/shadcn/badge';
|
|
4
4
|
import { documents } from '../../api/documents.js';
|
|
5
5
|
import { ApiError } from '../../api/client.js';
|
|
6
6
|
import SchemaField from './SchemaField.svelte';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Badge } from '@
|
|
2
|
+
import { Badge } from '@aphexcms/ui/shadcn/badge';
|
|
3
3
|
import {
|
|
4
4
|
SidebarGroup,
|
|
5
5
|
SidebarGroupLabel,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
SidebarMenu,
|
|
8
8
|
SidebarMenuItem,
|
|
9
9
|
SidebarMenuButton
|
|
10
|
-
} from '@
|
|
10
|
+
} from '@aphexcms/ui/shadcn/sidebar';
|
|
11
11
|
import { page } from '$app/state';
|
|
12
12
|
|
|
13
13
|
interface DocumentType {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Button } from '@
|
|
3
|
-
import * as Card from '@
|
|
2
|
+
import { Button } from '@aphexcms/ui/shadcn/button';
|
|
3
|
+
import * as Card from '@aphexcms/ui/shadcn/card';
|
|
4
4
|
import type { SchemaType } from 'src/types/schemas.js';
|
|
5
5
|
import SchemaField from './SchemaField.svelte';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Label } from '@
|
|
3
|
-
import { Badge } from '@
|
|
4
|
-
import * as Alert from '@
|
|
2
|
+
import { Label } from '@aphexcms/ui/shadcn/label';
|
|
3
|
+
import { Badge } from '@aphexcms/ui/shadcn/badge';
|
|
4
|
+
import * as Alert from '@aphexcms/ui/shadcn/alert';
|
|
5
5
|
import type { Field } from 'src/types/schemas.js';
|
|
6
6
|
import {
|
|
7
7
|
isFieldRequired,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Button } from '@
|
|
3
|
-
import * as DropdownMenu from '@
|
|
2
|
+
import { Button } from '@aphexcms/ui/shadcn/button';
|
|
3
|
+
import * as DropdownMenu from '@aphexcms/ui/shadcn/dropdown-menu';
|
|
4
4
|
import type { ArrayField as ArrayFieldType, SchemaType } from '../../../types/schemas.js';
|
|
5
5
|
import { getArrayTypes, getSchemaByName } from '../../../schema-utils/utils.js';
|
|
6
6
|
import { getSchemaContext } from '../../../schema-context.svelte.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Button } from '@
|
|
2
|
+
import { Button } from '@aphexcms/ui/shadcn/button';
|
|
3
3
|
import { Trash2, Upload, Image as ImageIcon, FileImage } from 'lucide-svelte';
|
|
4
4
|
import type { ImageValue } from '../../../types/asset.js';
|
|
5
5
|
import type { ImageField as ImageFieldType } from '../../../types/schemas.js';
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import PlusIcon from '@lucide/svelte/icons/plus';
|
|
5
5
|
import XIcon from '@lucide/svelte/icons/x';
|
|
6
6
|
import { tick } from 'svelte';
|
|
7
|
-
import * as Command from '@
|
|
8
|
-
import * as Popover from '@
|
|
9
|
-
import { Button } from '@
|
|
10
|
-
import { cn } from '@
|
|
7
|
+
import * as Command from '@aphexcms/ui/shadcn/command';
|
|
8
|
+
import * as Popover from '@aphexcms/ui/shadcn/popover';
|
|
9
|
+
import { Button } from '@aphexcms/ui/shadcn/button';
|
|
10
|
+
import { cn } from '@aphexcms/ui/utils';
|
|
11
11
|
import type { Field, ReferenceField as ReferenceFieldType } from '../../../types/schemas.js';
|
|
12
12
|
import { documents } from '../../../api/documents.js';
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Input } from '@
|
|
3
|
-
import { Button } from '@
|
|
2
|
+
import { Input } from '@aphexcms/ui/shadcn/input';
|
|
3
|
+
import { Button } from '@aphexcms/ui/shadcn/button';
|
|
4
4
|
import type { Field } from '../../../types/schemas.js';
|
|
5
5
|
import { generateSlug } from '../../../utils/index.js';
|
|
6
6
|
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
DropdownMenuLabel,
|
|
11
11
|
DropdownMenuSeparator,
|
|
12
12
|
DropdownMenuTrigger
|
|
13
|
-
} from '@
|
|
13
|
+
} from '@aphexcms/ui/shadcn/dropdown-menu';
|
|
14
14
|
import {
|
|
15
15
|
SidebarMenu,
|
|
16
16
|
SidebarMenuItem,
|
|
17
17
|
SidebarMenuButton,
|
|
18
18
|
useSidebar
|
|
19
|
-
} from '@
|
|
19
|
+
} from '@aphexcms/ui/shadcn/sidebar';
|
|
20
20
|
import type { SidebarOrganization } from '../../types/sidebar.js';
|
|
21
21
|
|
|
22
22
|
type Props = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { SidebarProvider, SidebarInset, SidebarTrigger } from '@
|
|
3
|
-
import { Separator } from '@
|
|
4
|
-
import { Button } from '@
|
|
2
|
+
import { SidebarProvider, SidebarInset, SidebarTrigger } from '@aphexcms/ui/shadcn/sidebar';
|
|
3
|
+
import { Separator } from '@aphexcms/ui/shadcn/separator';
|
|
4
|
+
import { Button } from '@aphexcms/ui/shadcn/button';
|
|
5
5
|
import { ModeWatcher } from 'mode-watcher';
|
|
6
6
|
import { Sun, Moon } from 'lucide-svelte';
|
|
7
7
|
import { toggleMode } from 'mode-watcher';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
SidebarFooter,
|
|
6
6
|
SidebarHeader,
|
|
7
7
|
SidebarRail
|
|
8
|
-
} from '@
|
|
8
|
+
} from '@aphexcms/ui/shadcn/sidebar';
|
|
9
9
|
import OrganizationSwitcher from '../OrganizationSwitcher.svelte';
|
|
10
10
|
import NavMain from './NavMain.svelte';
|
|
11
11
|
import NavUser from './NavUser.svelte';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { goto } from '$app/navigation';
|
|
3
3
|
import { page } from '$app/state';
|
|
4
|
-
import * as Collapsible from '@
|
|
4
|
+
import * as Collapsible from '@aphexcms/ui/shadcn/collapsible';
|
|
5
5
|
import {
|
|
6
6
|
SidebarGroup,
|
|
7
7
|
SidebarGroupLabel,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
SidebarMenuSub,
|
|
12
12
|
SidebarMenuSubItem,
|
|
13
13
|
SidebarMenuSubButton
|
|
14
|
-
} from '@
|
|
14
|
+
} from '@aphexcms/ui/shadcn/sidebar';
|
|
15
15
|
import { ChevronRight, type Icon as IconType } from 'lucide-svelte';
|
|
16
16
|
|
|
17
17
|
type NavItem = {
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
SidebarMenuItem,
|
|
6
6
|
SidebarMenuButton,
|
|
7
7
|
useSidebar
|
|
8
|
-
} from '@
|
|
8
|
+
} from '@aphexcms/ui/shadcn/sidebar';
|
|
9
9
|
import {
|
|
10
10
|
DropdownMenu,
|
|
11
11
|
DropdownMenuContent,
|
|
12
12
|
DropdownMenuItem,
|
|
13
13
|
DropdownMenuSeparator,
|
|
14
14
|
DropdownMenuTrigger
|
|
15
|
-
} from '@
|
|
15
|
+
} from '@aphexcms/ui/shadcn/dropdown-menu';
|
|
16
16
|
import { ChevronsUpDown, Settings, LogOut } from 'lucide-svelte';
|
|
17
17
|
import type { AuthUser } from '../../../types/user.js';
|
|
18
18
|
|
package/src/db/adapters/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Database adapters are now in separate packages
|
|
2
|
-
// e.g., @
|
|
2
|
+
// e.g., @aphexcms/postgresql-adapter, @aphexcms/mongodb-adapter
|
|
3
3
|
// This file is kept for backwards compatibility but exports nothing - and potentially default adapters or something. maybe sqlite?
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Aphex CMS Core - Main exports (client-safe only)
|
|
2
|
-
// For server-side functionality, import from '@
|
|
2
|
+
// For server-side functionality, import from '@aphexcms/cms-core/server'
|
|
3
3
|
|
|
4
4
|
// Re-export all client-safe functionality
|
|
5
5
|
export * from './client/index.js';
|
package/src/plugins/README.md
CHANGED
|
@@ -131,7 +131,7 @@ export function createGraphQLPlugin(config: GraphQLPluginConfig = {}): CMSPlugin
|
|
|
131
131
|
const yogaApp = /* ... create yoga instance ... */;
|
|
132
132
|
|
|
133
133
|
return {
|
|
134
|
-
name: '@
|
|
134
|
+
name: '@aphexcms/graphql-plugin',
|
|
135
135
|
parts: [
|
|
136
136
|
// Part 1: The API endpoint
|
|
137
137
|
{
|
|
@@ -44,8 +44,8 @@ class StorageProviderRegistry {
|
|
|
44
44
|
*
|
|
45
45
|
* @example
|
|
46
46
|
* ```typescript
|
|
47
|
-
* import { storageProviders } from '@
|
|
48
|
-
* import { R2StorageProvider } from '@
|
|
47
|
+
* import { storageProviders } from '@aphexcms/cms-core/server';
|
|
48
|
+
* import { R2StorageProvider } from '@aphexcms/storage-r2';
|
|
49
49
|
*
|
|
50
50
|
* // Register before creating config
|
|
51
51
|
* storageProviders.register(new R2StorageProvider());
|