@webmaster-droid/web 0.1.0-alpha.1 → 0.1.0-alpha.2
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/index.d.ts +7 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,14 +3,15 @@ import React, { ImgHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
|
3
3
|
import { CmsDocument, SelectedElementKind, SelectedElementContext, PublishRequest, RollbackRequest } from '@webmaster-droid/contracts';
|
|
4
4
|
import { Session, SupabaseClient } from '@supabase/supabase-js';
|
|
5
5
|
|
|
6
|
+
type AnyCmsDocument$1 = CmsDocument<object, object, string>;
|
|
6
7
|
type EditableMode = "live" | "draft";
|
|
7
8
|
interface EditableContextValue {
|
|
8
|
-
document:
|
|
9
|
+
document: AnyCmsDocument$1;
|
|
9
10
|
mode: EditableMode;
|
|
10
11
|
enabled: boolean;
|
|
11
12
|
}
|
|
12
13
|
declare function EditableProvider(props: {
|
|
13
|
-
document:
|
|
14
|
+
document: AnyCmsDocument$1;
|
|
14
15
|
mode?: EditableMode;
|
|
15
16
|
enabled?: boolean;
|
|
16
17
|
children: ReactNode;
|
|
@@ -678,20 +679,21 @@ declare function useWebmasterDroid(): WebmasterDroidContextValue;
|
|
|
678
679
|
|
|
679
680
|
declare function WebmasterDroidOverlay(): react_jsx_runtime.JSX.Element | null;
|
|
680
681
|
|
|
681
|
-
type
|
|
682
|
+
type AnyCmsDocument = CmsDocument<object, object, string>;
|
|
683
|
+
type WebmasterDroidCmsContextValue<TDocument extends AnyCmsDocument = AnyCmsDocument> = {
|
|
682
684
|
document: TDocument;
|
|
683
685
|
stage: "live" | "draft";
|
|
684
686
|
loading: boolean;
|
|
685
687
|
error: string | null;
|
|
686
688
|
};
|
|
687
|
-
declare function WebmasterDroidRuntime<TDocument extends
|
|
689
|
+
declare function WebmasterDroidRuntime<TDocument extends AnyCmsDocument>(props: {
|
|
688
690
|
children: ReactNode;
|
|
689
691
|
fallbackDocument: TDocument;
|
|
690
692
|
config?: WebmasterDroidConfig;
|
|
691
693
|
includeOverlay?: boolean;
|
|
692
694
|
applyThemeTokens?: boolean;
|
|
693
695
|
}): react_jsx_runtime.JSX.Element;
|
|
694
|
-
declare function useWebmasterDroidCmsDocument<TDocument extends
|
|
696
|
+
declare function useWebmasterDroidCmsDocument<TDocument extends AnyCmsDocument = AnyCmsDocument>(): WebmasterDroidCmsContextValue<TDocument>;
|
|
695
697
|
|
|
696
698
|
declare function getSupabaseBrowserClient(config: ResolvedWebmasterDroidConfig): SupabaseClient | null;
|
|
697
699
|
|