smoodly 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +318 -74
- package/dist/admin/client-ops.js +3 -2
- package/dist/admin/editor/EditorView.js +229 -30
- package/dist/admin/editor/PageSettings.d.ts +8 -4
- package/dist/admin/editor/PageSettings.js +25 -25
- package/dist/admin/fixed-nodes.d.ts +16 -10
- package/dist/admin/fixed-nodes.js +55 -41
- package/dist/admin/index.d.ts +3 -2
- package/dist/admin/index.js +1 -0
- package/dist/admin/ops-impl.js +218 -36
- package/dist/admin/ops.d.ts +73 -12
- package/dist/admin/serialize.d.ts +11 -0
- package/dist/admin/serialize.js +8 -0
- package/dist/admin/shared-items.d.ts +9 -0
- package/dist/admin/shared-items.js +61 -0
- package/dist/admin/shell/AdminApp.js +11 -34
- package/dist/admin/shell/EntriesList.d.ts +7 -0
- package/dist/admin/shell/EntriesList.js +95 -0
- package/dist/admin/shell/EntryForm.js +167 -49
- package/dist/admin/shell/PagesList.js +86 -26
- package/dist/admin/shell/SharedForm.d.ts +7 -0
- package/dist/admin/shell/SharedForm.js +146 -0
- package/dist/admin/shell/SharedList.d.ts +6 -0
- package/dist/admin/shell/SharedList.js +62 -0
- package/dist/admin/shell/entries-list.d.ts +21 -0
- package/dist/admin/shell/entries-list.js +36 -0
- package/dist/admin/shell/pages-tree.d.ts +30 -12
- package/dist/admin/shell/pages-tree.js +48 -14
- package/dist/admin/shell/shared-list.d.ts +14 -0
- package/dist/admin/shell/shared-list.js +17 -0
- package/dist/admin/tree-ops.d.ts +12 -5
- package/dist/admin/tree-ops.js +39 -8
- package/dist/admin/ui/LocaleSwitcher.d.ts +11 -0
- package/dist/admin/ui/LocaleSwitcher.js +15 -0
- package/dist/collections.d.ts +10 -1
- package/dist/collections.js +16 -0
- package/dist/config.d.ts +3 -0
- package/dist/config.js +58 -4
- package/dist/entry-store.d.ts +141 -55
- package/dist/entry-store.js +317 -87
- package/dist/index.d.ts +11 -7
- package/dist/index.js +8 -5
- package/dist/localize.d.ts +0 -11
- package/dist/localize.js +11 -29
- package/dist/next/page-renderer.d.ts +4 -0
- package/dist/next/page-renderer.js +14 -1
- package/dist/page.js +5 -1
- package/dist/paths.d.ts +46 -27
- package/dist/paths.js +62 -29
- package/dist/refs.js +8 -0
- package/dist/resolve.d.ts +3 -0
- package/dist/resolve.js +38 -0
- package/dist/revalidate.d.ts +4 -0
- package/dist/revalidate.js +6 -1
- package/dist/shared.d.ts +46 -0
- package/dist/shared.js +36 -0
- package/dist/site.d.ts +16 -2
- package/dist/site.js +92 -39
- package/dist/sql-space.d.ts +1 -1
- package/dist/sql-space.js +16 -13
- package/dist/sql.js +95 -70
- package/dist/store.d.ts +66 -32
- package/dist/store.js +205 -90
- package/dist/supabase-entry-store.d.ts +30 -9
- package/dist/supabase-entry-store.js +360 -178
- package/dist/supabase-store.d.ts +21 -9
- package/dist/supabase-store.js +202 -111
- package/dist/zones.d.ts +6 -2
- package/dist/zones.js +8 -2
- package/package.json +1 -1
|
@@ -1,29 +1,50 @@
|
|
|
1
1
|
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
2
2
|
import type { CollectionSchema } from "./collections.ts";
|
|
3
|
-
import type { CreateEntryOptions, EntryRecord, EntryStore, EntryStoreOptions, EntryUsage, ListOptions } from "./entry-store.ts";
|
|
3
|
+
import type { AddEntryLocaleOptions, CreateEntryOptions, EntryRecord, EntryStore, EntryStoreOptions, EntryUsage, EntryVersion, ListOptions } from "./entry-store.ts";
|
|
4
4
|
export declare class SupabaseEntryStore implements EntryStore {
|
|
5
5
|
private db;
|
|
6
|
-
private collections;
|
|
7
6
|
private paths;
|
|
8
7
|
private locales;
|
|
8
|
+
private schemas;
|
|
9
9
|
constructor(db: SupabaseClient, collections: CollectionSchema<any>[], options?: EntryStoreOptions);
|
|
10
10
|
private fail;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
11
|
+
private schema;
|
|
12
|
+
private fetch;
|
|
13
|
+
private must;
|
|
14
|
+
private siblings;
|
|
13
15
|
private byIdMap;
|
|
14
16
|
private chain;
|
|
15
17
|
private subtree;
|
|
18
|
+
private versionFields;
|
|
16
19
|
private writePaths;
|
|
20
|
+
/** Every field set the site can render: each locale's live view, plus a
|
|
21
|
+
* published snapshot the draft has moved past (see entryRefEdges). */
|
|
22
|
+
private liveFieldSets;
|
|
23
|
+
private writeRefs;
|
|
24
|
+
/** The friendly pre-check per locale (spec 2026-09-06 §11); the paths
|
|
25
|
+
* primary key is the invariant. */
|
|
26
|
+
private assertSiblingSlug;
|
|
17
27
|
private assertParent;
|
|
18
|
-
|
|
28
|
+
private assertParentHasLocale;
|
|
29
|
+
private updateNode;
|
|
30
|
+
private insertLocale;
|
|
31
|
+
private updateLocale;
|
|
32
|
+
/** The row goes first (it is what makes the entry exist in the locale), then its versions. */
|
|
33
|
+
private deleteLocale;
|
|
34
|
+
/** A versioned collection snapshots the merged fields and points the
|
|
35
|
+
* locale's draft at the new row; others do nothing here. */
|
|
36
|
+
private recordVersion;
|
|
37
|
+
create(collection: string, fields: Record<string, unknown>, options: CreateEntryOptions): Promise<EntryRecord>;
|
|
19
38
|
get(collection: string, id: string): Promise<EntryRecord | null>;
|
|
20
39
|
list(collection: string, options?: ListOptions): Promise<EntryRecord[]>;
|
|
21
|
-
getMany(collection: string, ids: string[], options?: {
|
|
40
|
+
getMany(collection: string, ids: string[], locale: string, options?: {
|
|
22
41
|
status?: "published";
|
|
23
42
|
}): Promise<Record<string, Record<string, unknown>>>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
update(collection: string, id: string, locale: string, fields: Record<string, unknown>): Promise<EntryRecord>;
|
|
44
|
+
setStatus(collection: string, id: string, locale: string, status: "draft" | "published"): Promise<EntryRecord>;
|
|
45
|
+
addLocale(collection: string, id: string, locale: string, options: AddEntryLocaleOptions): Promise<EntryRecord>;
|
|
46
|
+
removeLocale(collection: string, id: string, locale: string): Promise<EntryRecord>;
|
|
47
|
+
listVersions(collection: string, id: string, locale: string): Promise<EntryVersion[]>;
|
|
27
48
|
move(collection: string, id: string, to: {
|
|
28
49
|
parentId: string | null;
|
|
29
50
|
index?: number;
|