@aphexcms/cms-core 0.1.13 → 0.1.15
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/cli/generate-types.js +17 -1
- package/dist/cli/index.js +1 -1
- package/dist/components/AdminApp.svelte +43 -11
- package/dist/components/AdminApp.svelte.d.ts +5 -3
- package/dist/components/AdminApp.svelte.d.ts.map +1 -1
- package/dist/components/admin/fields/ImageField.svelte +22 -13
- package/dist/components/admin/fields/ImageField.svelte.d.ts.map +1 -1
- package/dist/types/schemas.d.ts +5 -0
- package/dist/types/schemas.d.ts.map +1 -1
- package/package.json +103 -101
- package/LICENSE +0 -21
|
@@ -185,7 +185,23 @@ export async function generateTypesFromConfig(schemaPath, outputPath) {
|
|
|
185
185
|
format: 'esm',
|
|
186
186
|
platform: 'node',
|
|
187
187
|
outfile: tempOutFile,
|
|
188
|
-
external: ['@aphexcms/*']
|
|
188
|
+
external: ['@aphexcms/*'],
|
|
189
|
+
plugins: [
|
|
190
|
+
{
|
|
191
|
+
name: 'stub-icons',
|
|
192
|
+
setup(build) {
|
|
193
|
+
// Stub out icon imports - they're not needed for type generation
|
|
194
|
+
build.onResolve({ filter: /^(lucide-svelte|@lucide\/svelte)/ }, (args) => ({
|
|
195
|
+
path: args.path,
|
|
196
|
+
namespace: 'stub-icons'
|
|
197
|
+
}));
|
|
198
|
+
build.onLoad({ filter: /.*/, namespace: 'stub-icons' }, () => ({
|
|
199
|
+
contents: 'export default {}',
|
|
200
|
+
loader: 'js'
|
|
201
|
+
}));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
]
|
|
189
205
|
});
|
|
190
206
|
schemaModulePath = tempOutFile;
|
|
191
207
|
tempFile = tempOutFile;
|
package/dist/cli/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import pc from 'picocolors';
|
|
|
9
9
|
import { generateTypesFromConfig } from './generate-types.js';
|
|
10
10
|
const cli = cac('aphex');
|
|
11
11
|
// Version from package.json
|
|
12
|
-
const version = '0.1.
|
|
12
|
+
const version = '0.1.14';
|
|
13
13
|
// ASCII Art Banner
|
|
14
14
|
function printBanner() {
|
|
15
15
|
console.log(pc.cyan(`${pc.bold('⚡ Aphex CMS')}\n${pc.dim('A modern headless CMS')}`));
|
|
@@ -13,12 +13,13 @@
|
|
|
13
13
|
import DocumentEditor from './admin/DocumentEditor.svelte';
|
|
14
14
|
import type { DocumentType } from '../types/index';
|
|
15
15
|
import { documents } from '../api/index';
|
|
16
|
+
import { FileText } from 'lucide-svelte';
|
|
16
17
|
|
|
17
|
-
type InitDocumentType = Pick<DocumentType, 'name' | 'title' | 'description'>;
|
|
18
|
+
type InitDocumentType = Pick<DocumentType, 'name' | 'title' | 'description' | 'icon'>;
|
|
18
19
|
|
|
19
20
|
interface Props {
|
|
20
21
|
schemas: SchemaType[];
|
|
21
|
-
documentTypes:
|
|
22
|
+
documentTypes: Array<{ name: string; title: string; description?: string }>;
|
|
22
23
|
schemaError?: { message: string } | null;
|
|
23
24
|
title?: string;
|
|
24
25
|
graphqlSettings?: { endpoint: string; enableGraphiQL: boolean } | null;
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
|
|
30
31
|
let {
|
|
31
32
|
schemas,
|
|
32
|
-
documentTypes,
|
|
33
|
+
documentTypes: documentTypesFromServer,
|
|
33
34
|
schemaError = null,
|
|
34
35
|
title = 'Aphex CMS',
|
|
35
36
|
graphqlSettings = null,
|
|
@@ -38,7 +39,16 @@
|
|
|
38
39
|
handleTabChange = () => {}
|
|
39
40
|
}: Props = $props();
|
|
40
41
|
|
|
41
|
-
//
|
|
42
|
+
// Merge document types with schema icons (schemas have icons, server data doesn't)
|
|
43
|
+
const documentTypes = $derived(
|
|
44
|
+
documentTypesFromServer.map((docType) => {
|
|
45
|
+
const schema = schemas.find((s) => s.name === docType.name);
|
|
46
|
+
return {
|
|
47
|
+
...docType,
|
|
48
|
+
icon: schema?.icon
|
|
49
|
+
};
|
|
50
|
+
})
|
|
51
|
+
);
|
|
42
52
|
|
|
43
53
|
const hasDocumentTypes = $derived(documentTypes.length > 0);
|
|
44
54
|
|
|
@@ -733,7 +743,12 @@
|
|
|
733
743
|
>
|
|
734
744
|
<div class="flex items-center gap-3">
|
|
735
745
|
<div class="flex h-6 w-6 items-center justify-center">
|
|
736
|
-
|
|
746
|
+
{#if docType.icon}
|
|
747
|
+
{@const Icon = docType.icon}
|
|
748
|
+
<Icon class="text-muted-foreground h-4 w-4" />
|
|
749
|
+
{:else}
|
|
750
|
+
<FileText class="text-muted-foreground h-4 w-4" />
|
|
751
|
+
{/if}
|
|
737
752
|
</div>
|
|
738
753
|
<div>
|
|
739
754
|
<h3 class="text-sm font-medium">{docType.title}s</h3>
|
|
@@ -766,7 +781,7 @@
|
|
|
766
781
|
<div
|
|
767
782
|
class="bg-muted/50 mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full"
|
|
768
783
|
>
|
|
769
|
-
<
|
|
784
|
+
<FileText class="text-muted-foreground h-8 w-8" />
|
|
770
785
|
</div>
|
|
771
786
|
<h3 class="mb-2 font-medium">No content types found</h3>
|
|
772
787
|
<p class="text-muted-foreground mb-4 text-sm">
|
|
@@ -809,19 +824,26 @@
|
|
|
809
824
|
</div>
|
|
810
825
|
</button>
|
|
811
826
|
{:else}
|
|
827
|
+
{@const currentDocType = documentTypes.find(
|
|
828
|
+
(t) => t.name === selectedDocumentType
|
|
829
|
+
)}
|
|
812
830
|
<div class="border-border bg-muted/20 border-b p-3">
|
|
813
831
|
<div class="flex items-center justify-between">
|
|
814
832
|
<div class="flex items-center gap-3">
|
|
815
833
|
{#if windowWidth > 620}
|
|
816
834
|
<!-- Desktop: Icon -->
|
|
817
835
|
<div class="flex h-6 w-6 items-center justify-center">
|
|
818
|
-
|
|
836
|
+
{#if currentDocType?.icon}
|
|
837
|
+
{@const Icon = currentDocType.icon}
|
|
838
|
+
<Icon class="text-muted-foreground h-4 w-4" />
|
|
839
|
+
{:else}
|
|
840
|
+
<FileText class="text-muted-foreground h-4 w-4" />
|
|
841
|
+
{/if}
|
|
819
842
|
</div>
|
|
820
843
|
{/if}
|
|
821
844
|
<div>
|
|
822
845
|
<h3 class="text-sm font-medium">
|
|
823
|
-
{(
|
|
824
|
-
selectedDocumentType) + 's'}
|
|
846
|
+
{(currentDocType?.title || selectedDocumentType) + 's'}
|
|
825
847
|
</h3>
|
|
826
848
|
<p class="text-muted-foreground text-xs">
|
|
827
849
|
{documentsList.length} document{documentsList.length !== 1 ? 's' : ''}
|
|
@@ -873,7 +895,12 @@
|
|
|
873
895
|
>
|
|
874
896
|
<div class="flex min-w-0 flex-1 items-center gap-3">
|
|
875
897
|
<div class="flex h-6 w-6 items-center justify-center">
|
|
876
|
-
|
|
898
|
+
{#if currentDocType?.icon}
|
|
899
|
+
{@const Icon = currentDocType.icon}
|
|
900
|
+
<Icon class="text-muted-foreground h-4 w-4" />
|
|
901
|
+
{:else}
|
|
902
|
+
<FileText class="text-muted-foreground h-4 w-4" />
|
|
903
|
+
{/if}
|
|
877
904
|
</div>
|
|
878
905
|
<div class="min-w-0 flex-1">
|
|
879
906
|
<h3 class="truncate text-sm font-medium">{doc.title}</h3>
|
|
@@ -898,7 +925,12 @@
|
|
|
898
925
|
<div
|
|
899
926
|
class="bg-muted/50 mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full"
|
|
900
927
|
>
|
|
901
|
-
|
|
928
|
+
{#if currentDocType?.icon}
|
|
929
|
+
{@const Icon = currentDocType.icon}
|
|
930
|
+
<Icon class="text-muted-foreground h-8 w-8" />
|
|
931
|
+
{:else}
|
|
932
|
+
<FileText class="text-muted-foreground h-8 w-8" />
|
|
933
|
+
{/if}
|
|
902
934
|
</div>
|
|
903
935
|
<h3 class="mb-2 font-medium">No documents found</h3>
|
|
904
936
|
<p class="text-muted-foreground text-sm">
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { SchemaType } from '../types/index.js';
|
|
2
|
-
import type { DocumentType } from '../types/index.js';
|
|
3
|
-
type InitDocumentType = Pick<DocumentType, 'name' | 'title' | 'description'>;
|
|
4
2
|
interface Props {
|
|
5
3
|
schemas: SchemaType[];
|
|
6
|
-
documentTypes:
|
|
4
|
+
documentTypes: Array<{
|
|
5
|
+
name: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}>;
|
|
7
9
|
schemaError?: {
|
|
8
10
|
message: string;
|
|
9
11
|
} | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminApp.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/AdminApp.svelte.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"AdminApp.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/AdminApp.svelte.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAShD,UAAU,KAAK;IACd,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,aAAa,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,WAAW,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,WAAW,GAAG,QAAQ,CAAA;KAAE,CAAC;IAC9C,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAm8BF,QAAA,MAAM,QAAQ,2CAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
|
@@ -131,28 +131,37 @@
|
|
|
131
131
|
// Asset data state
|
|
132
132
|
let assetData = $state<any>(null);
|
|
133
133
|
let loadingAsset = $state(false);
|
|
134
|
+
let lastAssetId = $state<string | null>(null);
|
|
134
135
|
|
|
135
136
|
// Fetch asset details when asset reference changes
|
|
136
137
|
$effect(() => {
|
|
137
138
|
async function loadAsset() {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
139
|
+
const assetId = value?.asset?._ref || null;
|
|
140
|
+
|
|
141
|
+
// Only fetch if asset ID has actually changed
|
|
142
|
+
if (assetId !== lastAssetId) {
|
|
143
|
+
lastAssetId = assetId;
|
|
144
|
+
|
|
145
|
+
if (assetId) {
|
|
146
|
+
loadingAsset = true;
|
|
147
|
+
try {
|
|
148
|
+
const result = await assets.getById(assetId);
|
|
149
|
+
if (result.success) {
|
|
150
|
+
assetData = result.data;
|
|
151
|
+
} else {
|
|
152
|
+
console.error('Failed to fetch asset details');
|
|
153
|
+
assetData = null;
|
|
154
|
+
}
|
|
155
|
+
} catch (error) {
|
|
156
|
+
console.error('Error fetching asset:', error);
|
|
146
157
|
assetData = null;
|
|
158
|
+
} finally {
|
|
159
|
+
loadingAsset = false;
|
|
147
160
|
}
|
|
148
|
-
}
|
|
149
|
-
console.error('Error fetching asset:', error);
|
|
161
|
+
} else {
|
|
150
162
|
assetData = null;
|
|
151
|
-
} finally {
|
|
152
163
|
loadingAsset = false;
|
|
153
164
|
}
|
|
154
|
-
} else {
|
|
155
|
-
assetData = null;
|
|
156
165
|
}
|
|
157
166
|
}
|
|
158
167
|
loadAsset();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageField.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/admin/fields/ImageField.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAY1E,UAAU,KAAK;IACd,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"ImageField.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/admin/fields/ImageField.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAY1E,UAAU,KAAK;IACd,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAyQF,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
package/dist/types/schemas.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Rule } from '../field-validation/rule.js';
|
|
2
|
+
import type { Icon as LucideIcon } from 'lucide-svelte';
|
|
2
3
|
export type FieldType = 'string' | 'text' | 'number' | 'boolean' | 'slug' | 'image' | 'array' | 'object' | 'reference';
|
|
3
4
|
export interface BaseField {
|
|
4
5
|
name: string;
|
|
@@ -73,6 +74,7 @@ export interface DocumentType {
|
|
|
73
74
|
name: string;
|
|
74
75
|
title: string;
|
|
75
76
|
description?: string;
|
|
77
|
+
icon?: typeof LucideIcon;
|
|
76
78
|
fields: Field[];
|
|
77
79
|
preview?: PreviewConfig;
|
|
78
80
|
createdAt: Date | null;
|
|
@@ -83,6 +85,7 @@ export interface ObjectType {
|
|
|
83
85
|
name: string;
|
|
84
86
|
title: string;
|
|
85
87
|
description?: string;
|
|
88
|
+
icon?: typeof LucideIcon;
|
|
86
89
|
fields: Field[];
|
|
87
90
|
preview?: PreviewConfig;
|
|
88
91
|
}
|
|
@@ -95,6 +98,7 @@ export interface SchemaType {
|
|
|
95
98
|
name: string;
|
|
96
99
|
title: string;
|
|
97
100
|
description?: string;
|
|
101
|
+
icon?: typeof LucideIcon;
|
|
98
102
|
fields: Field[];
|
|
99
103
|
preview?: PreviewConfig;
|
|
100
104
|
createdAt?: Date | null;
|
|
@@ -106,6 +110,7 @@ export interface NewSchemaType {
|
|
|
106
110
|
name: string;
|
|
107
111
|
title: string;
|
|
108
112
|
description?: string;
|
|
113
|
+
icon?: typeof LucideIcon;
|
|
109
114
|
fields: Field[];
|
|
110
115
|
preview?: PreviewConfig;
|
|
111
116
|
createdAt?: Date | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/lib/types/schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/lib/types/schemas.ts"],"names":[],"mappings":"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AAO,CAAC,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,102 +1,104 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
2
|
+
"name": "@aphexcms/cms-core",
|
|
3
|
+
"version": "0.1.15",
|
|
4
|
+
"description": "Aphex CMS Core - A Sanity-style CMS with ports and adapters architecture",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"svelte": "./dist/index.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"aphex": "./dist/cli/index.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"svelte": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./server": {
|
|
19
|
+
"types": "./dist/server/index.d.ts",
|
|
20
|
+
"default": "./dist/server/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./client": {
|
|
23
|
+
"types": "./dist/client/index.d.ts",
|
|
24
|
+
"default": "./dist/client/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./routes/*": {
|
|
27
|
+
"types": "./dist/routes/*.d.ts",
|
|
28
|
+
"default": "./dist/routes/*.js"
|
|
29
|
+
},
|
|
30
|
+
"./*": {
|
|
31
|
+
"types": "./dist/*.d.ts",
|
|
32
|
+
"default": "./dist/*.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"dist/cli"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "svelte-package && tsc src/cli/*.ts --outDir dist --module esnext --target esnext --moduleResolution bundler --skipLibCheck && node ../../scripts/fix-imports.js ./dist",
|
|
41
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
42
|
+
"format": "prettier --write .",
|
|
43
|
+
"lint": "prettier --check . && eslint .",
|
|
44
|
+
"package": "pnpm build && pnpm pack",
|
|
45
|
+
"dev:local": "node ../../scripts/swap-package-paths.js ./package.json src lib",
|
|
46
|
+
"prepack": "node ../../scripts/swap-package-paths.js ./package.json dist lib && pnpm build",
|
|
47
|
+
"postpack": "node ../../scripts/swap-package-paths.js ./package.json src lib"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"cms",
|
|
51
|
+
"svelte",
|
|
52
|
+
"sveltekit",
|
|
53
|
+
"content-management",
|
|
54
|
+
"sanity-style",
|
|
55
|
+
"typescript",
|
|
56
|
+
"aphex"
|
|
57
|
+
],
|
|
58
|
+
"author": "Benjamin Sinidol",
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@aphexcms/ui": "workspace:*",
|
|
62
|
+
"@lucide/svelte": "^0.544.0",
|
|
63
|
+
"@sveltejs/kit": "^2.22.0",
|
|
64
|
+
"bits-ui": "^2.11.1",
|
|
65
|
+
"clsx": "^2.1.1",
|
|
66
|
+
"lucide-svelte": "^0.544.0",
|
|
67
|
+
"mode-watcher": "^1.1.0",
|
|
68
|
+
"svelte": "^5.0.0",
|
|
69
|
+
"tailwind-merge": "^3.3.1",
|
|
70
|
+
"tailwind-variants": "^3.1.1"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@clack/prompts": "^0.11.0",
|
|
74
|
+
"cac": "^6.7.14",
|
|
75
|
+
"esbuild": "^0.24.0",
|
|
76
|
+
"picocolors": "^1.1.1",
|
|
77
|
+
"s3mini": "^0.5.0",
|
|
78
|
+
"sharp": "^0.34.4"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@eslint/compat": "^1.2.5",
|
|
82
|
+
"@eslint/js": "^9.22.0",
|
|
83
|
+
"@internationalized/date": "^3.9.0",
|
|
84
|
+
"@sveltejs/adapter-auto": "^6.0.0",
|
|
85
|
+
"@sveltejs/kit": "^2.22.0",
|
|
86
|
+
"@sveltejs/package": "^2.5.4",
|
|
87
|
+
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
|
88
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
89
|
+
"@types/node": "^22",
|
|
90
|
+
"eslint": "^9.22.0",
|
|
91
|
+
"eslint-config-prettier": "^10.0.1",
|
|
92
|
+
"eslint-plugin-svelte": "^3.0.0",
|
|
93
|
+
"globals": "^16.0.0",
|
|
94
|
+
"prettier": "^3.4.2",
|
|
95
|
+
"prettier-plugin-svelte": "^3.3.3",
|
|
96
|
+
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
97
|
+
"svelte": "^5.0.0",
|
|
98
|
+
"svelte-check": "^4.0.0",
|
|
99
|
+
"tailwindcss": "^4.0.0",
|
|
100
|
+
"typescript": "^5.0.0",
|
|
101
|
+
"typescript-eslint": "^8.20.0",
|
|
102
|
+
"vite": "^7.0.4"
|
|
103
|
+
}
|
|
104
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Benjamin Sinidol
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|