admin-lib-cms 1.2.1 → 1.2.3
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/chunk-Y6FXYEAI.mjs +10 -0
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +647 -183
- package/dist/index.mjs +697 -232
- package/dist/types.d.mts +10 -1
- package/dist/types.d.ts +10 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
__require
|
|
10
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -55,8 +55,9 @@ interface EditableTextProps extends BaseProps {
|
|
|
55
55
|
children: string;
|
|
56
56
|
as?: "span" | "p" | "h1" | "h2" | "h3" | "h4" | "div";
|
|
57
57
|
className?: string;
|
|
58
|
+
type?: "text" | "textarea" | "richtext";
|
|
58
59
|
}
|
|
59
|
-
declare function EditableText({ id, label, section, pageId, children, as, className, }: EditableTextProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
60
|
+
declare function EditableText({ id, label, section, pageId, children, as, className, type, }: EditableTextProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
60
61
|
interface EditableImageProps extends BaseProps {
|
|
61
62
|
src: string;
|
|
62
63
|
alt?: string;
|
|
@@ -96,6 +97,14 @@ interface EditableListProps<T = any> extends BaseProps {
|
|
|
96
97
|
search?: boolean;
|
|
97
98
|
}
|
|
98
99
|
declare function EditableList<T = any>({ id, label, section, pageId, initialItems, renderItem, renderList, itemSchema, fixedLength, className, listClassName, search, }: EditableListProps<T>): react.JSX.Element;
|
|
100
|
+
interface EditableReferenceProps extends BaseProps {
|
|
101
|
+
collection: string;
|
|
102
|
+
max?: number;
|
|
103
|
+
displayField?: string;
|
|
104
|
+
className?: string;
|
|
105
|
+
children?: React.ReactNode | ((items: any[]) => React.ReactNode);
|
|
106
|
+
}
|
|
107
|
+
declare function EditableReference({ id, label, section, pageId, collection, max, displayField, className, children, }: EditableReferenceProps): react.JSX.Element;
|
|
99
108
|
|
|
100
109
|
declare function AdminApp({ apiUrl, projectId, email }: {
|
|
101
110
|
apiUrl?: string;
|
|
@@ -142,4 +151,4 @@ declare function SubscriptionProvider({ children, apiUrl, projectId, email, vali
|
|
|
142
151
|
|
|
143
152
|
declare function SubscriptionPage(): react.JSX.Element;
|
|
144
153
|
|
|
145
|
-
export { AdminApp, AdminLogin, type AdminLoginProps, CmsConfig, CmsProvider, EditableFile, EditableImage, EditableLink, EditableList, EditableMeta, EditableText, OverridesMap, StorageAdapter, type SubscriptionContextValue, type SubscriptionData, SubscriptionPage, SubscriptionProvider, useCmsContext, useCmsOptional, useSubmit, useSubscription, useSubscriptionContext };
|
|
154
|
+
export { AdminApp, AdminLogin, type AdminLoginProps, CmsConfig, CmsProvider, EditableFile, EditableImage, EditableLink, EditableList, EditableMeta, EditableReference, EditableText, OverridesMap, StorageAdapter, type SubscriptionContextValue, type SubscriptionData, SubscriptionPage, SubscriptionProvider, useCmsContext, useCmsOptional, useSubmit, useSubscription, useSubscriptionContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -55,8 +55,9 @@ interface EditableTextProps extends BaseProps {
|
|
|
55
55
|
children: string;
|
|
56
56
|
as?: "span" | "p" | "h1" | "h2" | "h3" | "h4" | "div";
|
|
57
57
|
className?: string;
|
|
58
|
+
type?: "text" | "textarea" | "richtext";
|
|
58
59
|
}
|
|
59
|
-
declare function EditableText({ id, label, section, pageId, children, as, className, }: EditableTextProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
60
|
+
declare function EditableText({ id, label, section, pageId, children, as, className, type, }: EditableTextProps): react.ReactElement<any, string | react.JSXElementConstructor<any>>;
|
|
60
61
|
interface EditableImageProps extends BaseProps {
|
|
61
62
|
src: string;
|
|
62
63
|
alt?: string;
|
|
@@ -96,6 +97,14 @@ interface EditableListProps<T = any> extends BaseProps {
|
|
|
96
97
|
search?: boolean;
|
|
97
98
|
}
|
|
98
99
|
declare function EditableList<T = any>({ id, label, section, pageId, initialItems, renderItem, renderList, itemSchema, fixedLength, className, listClassName, search, }: EditableListProps<T>): react.JSX.Element;
|
|
100
|
+
interface EditableReferenceProps extends BaseProps {
|
|
101
|
+
collection: string;
|
|
102
|
+
max?: number;
|
|
103
|
+
displayField?: string;
|
|
104
|
+
className?: string;
|
|
105
|
+
children?: React.ReactNode | ((items: any[]) => React.ReactNode);
|
|
106
|
+
}
|
|
107
|
+
declare function EditableReference({ id, label, section, pageId, collection, max, displayField, className, children, }: EditableReferenceProps): react.JSX.Element;
|
|
99
108
|
|
|
100
109
|
declare function AdminApp({ apiUrl, projectId, email }: {
|
|
101
110
|
apiUrl?: string;
|
|
@@ -142,4 +151,4 @@ declare function SubscriptionProvider({ children, apiUrl, projectId, email, vali
|
|
|
142
151
|
|
|
143
152
|
declare function SubscriptionPage(): react.JSX.Element;
|
|
144
153
|
|
|
145
|
-
export { AdminApp, AdminLogin, type AdminLoginProps, CmsConfig, CmsProvider, EditableFile, EditableImage, EditableLink, EditableList, EditableMeta, EditableText, OverridesMap, StorageAdapter, type SubscriptionContextValue, type SubscriptionData, SubscriptionPage, SubscriptionProvider, useCmsContext, useCmsOptional, useSubmit, useSubscription, useSubscriptionContext };
|
|
154
|
+
export { AdminApp, AdminLogin, type AdminLoginProps, CmsConfig, CmsProvider, EditableFile, EditableImage, EditableLink, EditableList, EditableMeta, EditableReference, EditableText, OverridesMap, StorageAdapter, type SubscriptionContextValue, type SubscriptionData, SubscriptionPage, SubscriptionProvider, useCmsContext, useCmsOptional, useSubmit, useSubscription, useSubscriptionContext };
|