@cmssy/react 9.10.0 → 10.1.0
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/client.cjs +9 -727
- package/dist/client.d.cts +4 -82
- package/dist/client.d.ts +4 -82
- package/dist/client.js +4 -696
- package/dist/index.cjs +15 -222
- package/dist/index.d.cts +8 -38
- package/dist/index.d.ts +8 -38
- package/dist/index.js +4 -105
- package/dist/internal-server.cjs +166 -0
- package/dist/internal-server.d.cts +37 -0
- package/dist/internal-server.d.ts +37 -0
- package/dist/internal-server.js +161 -0
- package/dist/internal.cjs +19 -0
- package/dist/internal.d.cts +18 -0
- package/dist/internal.d.ts +18 -0
- package/dist/internal.js +16 -0
- package/dist/{registry-Bfq4Pq18.d.cts → registry-zeNh3t6y.d.cts} +2 -6
- package/dist/{registry-Bfq4Pq18.d.ts → registry-zeNh3t6y.d.ts} +2 -6
- package/package.json +12 -2
package/dist/client.d.cts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { BlockSchema, BlockMeta, CmssyPageData, CmssyFormDefinition, CmssyLayoutGroup
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
|
-
import { CmssyAuthUser, CmssyAuthActionResult, CmssyCart, CmssyAddToCartOptions, CmssyCheckoutInput, CmssyOrder, CmssyProduct, UseCmssyOrderOptions, UseCmssyOrdersOptions } from '@cmssy/types';
|
|
7
|
-
export { CmssyAddToCartOptions, CmssyAuthActionResult, CmssyAuthUser, CmssyCheckoutInput, UseCmssyOrderOptions, UseCmssyOrdersOptions } from '@cmssy/types';
|
|
2
|
+
import { BlockSchema, BlockMeta, CmssyPageData, CmssyFormDefinition, CmssyLayoutGroup } from '@cmssy/core';
|
|
3
|
+
import { B as BlockDefinition } from './registry-zeNh3t6y.cjs';
|
|
4
|
+
import 'react';
|
|
8
5
|
|
|
9
6
|
interface EditBridgeConfig {
|
|
10
7
|
editorOrigin: string | string[];
|
|
@@ -96,79 +93,4 @@ interface CmssyLazyLayoutProps {
|
|
|
96
93
|
}
|
|
97
94
|
declare function CmssyLazyLayout({ load, ...props }: CmssyLazyLayoutProps): react_jsx_runtime.JSX.Element | null;
|
|
98
95
|
|
|
99
|
-
|
|
100
|
-
value: CmssyLocaleContext;
|
|
101
|
-
children: ReactNode;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Exposes the active locale ({@link CmssyLocaleContext}) to client components
|
|
105
|
-
* below it (e.g. `CmssyLink`) so they can build locale-aware hrefs without
|
|
106
|
-
* prop-drilling. Wrap your root layout body with it.
|
|
107
|
-
*/
|
|
108
|
-
declare function CmssyLocaleProvider({ value, children, }: CmssyLocaleProviderProps): react_jsx_runtime.JSX.Element;
|
|
109
|
-
/** Reads the active locale; returns null when no provider is mounted. */
|
|
110
|
-
declare function useCmssyLocale(): CmssyLocaleContext | null;
|
|
111
|
-
|
|
112
|
-
interface CmssyAuthState {
|
|
113
|
-
user: CmssyAuthUser | null;
|
|
114
|
-
loading: boolean;
|
|
115
|
-
signIn(identity: string, password: string): Promise<CmssyAuthActionResult>;
|
|
116
|
-
register(identity: string, password: string, fields?: Record<string, unknown>): Promise<CmssyAuthActionResult>;
|
|
117
|
-
signOut(): Promise<void>;
|
|
118
|
-
refresh(): Promise<void>;
|
|
119
|
-
}
|
|
120
|
-
interface CmssyAuthProviderProps {
|
|
121
|
-
children: ReactNode;
|
|
122
|
-
basePath?: string;
|
|
123
|
-
initialUser?: CmssyAuthUser | null;
|
|
124
|
-
}
|
|
125
|
-
declare function CmssyAuthProvider({ children, basePath, initialUser, }: CmssyAuthProviderProps): react_jsx_runtime.JSX.Element;
|
|
126
|
-
declare function useCmssyUser(): CmssyAuthState;
|
|
127
|
-
|
|
128
|
-
interface CmssyCommerceState {
|
|
129
|
-
cart: CmssyCart | null;
|
|
130
|
-
loading: boolean;
|
|
131
|
-
error: string | null;
|
|
132
|
-
addToCart(recordId: string, quantity?: number, options?: CmssyAddToCartOptions): Promise<void>;
|
|
133
|
-
updateItem(itemId: string, quantity: number): Promise<void>;
|
|
134
|
-
removeItem(itemId: string): Promise<void>;
|
|
135
|
-
clearCart(): Promise<void>;
|
|
136
|
-
applyDiscount(code: string): Promise<void>;
|
|
137
|
-
removeDiscount(): Promise<void>;
|
|
138
|
-
setShippingMethod(shippingMethodId: string | null): Promise<void>;
|
|
139
|
-
merge(): Promise<void>;
|
|
140
|
-
checkout(input: CmssyCheckoutInput): Promise<CmssyOrder>;
|
|
141
|
-
refresh(): Promise<void>;
|
|
142
|
-
fetchProduct(modelSlug: string, filter: Record<string, unknown>): Promise<CmssyProduct | null>;
|
|
143
|
-
}
|
|
144
|
-
interface CmssyCommerceProviderProps {
|
|
145
|
-
children: ReactNode;
|
|
146
|
-
basePath?: string;
|
|
147
|
-
}
|
|
148
|
-
declare function CmssyCommerceProvider({ children, basePath, }: CmssyCommerceProviderProps): react_jsx_runtime.JSX.Element;
|
|
149
|
-
declare function useCart(): CmssyCommerceState;
|
|
150
|
-
|
|
151
|
-
declare const productBlock: BlockDefinition;
|
|
152
|
-
|
|
153
|
-
declare const cartBlock: BlockDefinition;
|
|
154
|
-
|
|
155
|
-
declare const checkoutBlock: BlockDefinition;
|
|
156
|
-
|
|
157
|
-
interface CmssyOrdersState {
|
|
158
|
-
orders: CmssyOrder[];
|
|
159
|
-
total: number;
|
|
160
|
-
hasMore: boolean;
|
|
161
|
-
loading: boolean;
|
|
162
|
-
error: string | null;
|
|
163
|
-
refresh(): Promise<void>;
|
|
164
|
-
}
|
|
165
|
-
declare function useCmssyOrders(options?: UseCmssyOrdersOptions): CmssyOrdersState;
|
|
166
|
-
interface CmssyOrderState {
|
|
167
|
-
order: CmssyOrder | null;
|
|
168
|
-
loading: boolean;
|
|
169
|
-
error: string | null;
|
|
170
|
-
refresh(): Promise<void>;
|
|
171
|
-
}
|
|
172
|
-
declare function useCmssyOrder(id: string | null | undefined, options?: UseCmssyOrderOptions): CmssyOrderState;
|
|
173
|
-
|
|
174
|
-
export { CmssyAuthProvider, type CmssyAuthProviderProps, type CmssyAuthState, CmssyCommerceProvider, type CmssyCommerceProviderProps, type CmssyCommerceState, CmssyEditableLayout, type CmssyEditableLayoutProps, CmssyEditablePage, type CmssyEditablePageProps, CmssyLazyEditor, type CmssyLazyEditorProps, CmssyLazyLayout, type CmssyLazyLayoutProps, CmssyLocaleProvider, type CmssyLocaleProviderProps, type CmssyOrderState, type CmssyOrdersState, type EditBridgeConfig, type EditBridgeState, type PatchMap, cartBlock, checkoutBlock, productBlock, useCart, useCmssyLocale, useCmssyOrder, useCmssyOrders, useCmssyUser, useEditBridge };
|
|
96
|
+
export { CmssyEditableLayout, type CmssyEditableLayoutProps, CmssyEditablePage, type CmssyEditablePageProps, CmssyLazyEditor, type CmssyLazyEditorProps, CmssyLazyLayout, type CmssyLazyLayoutProps, type EditBridgeConfig, type EditBridgeState, type PatchMap, useEditBridge };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { BlockSchema, BlockMeta, CmssyPageData, CmssyFormDefinition, CmssyLayoutGroup
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
|
-
import { CmssyAuthUser, CmssyAuthActionResult, CmssyCart, CmssyAddToCartOptions, CmssyCheckoutInput, CmssyOrder, CmssyProduct, UseCmssyOrderOptions, UseCmssyOrdersOptions } from '@cmssy/types';
|
|
7
|
-
export { CmssyAddToCartOptions, CmssyAuthActionResult, CmssyAuthUser, CmssyCheckoutInput, UseCmssyOrderOptions, UseCmssyOrdersOptions } from '@cmssy/types';
|
|
2
|
+
import { BlockSchema, BlockMeta, CmssyPageData, CmssyFormDefinition, CmssyLayoutGroup } from '@cmssy/core';
|
|
3
|
+
import { B as BlockDefinition } from './registry-zeNh3t6y.js';
|
|
4
|
+
import 'react';
|
|
8
5
|
|
|
9
6
|
interface EditBridgeConfig {
|
|
10
7
|
editorOrigin: string | string[];
|
|
@@ -96,79 +93,4 @@ interface CmssyLazyLayoutProps {
|
|
|
96
93
|
}
|
|
97
94
|
declare function CmssyLazyLayout({ load, ...props }: CmssyLazyLayoutProps): react_jsx_runtime.JSX.Element | null;
|
|
98
95
|
|
|
99
|
-
|
|
100
|
-
value: CmssyLocaleContext;
|
|
101
|
-
children: ReactNode;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Exposes the active locale ({@link CmssyLocaleContext}) to client components
|
|
105
|
-
* below it (e.g. `CmssyLink`) so they can build locale-aware hrefs without
|
|
106
|
-
* prop-drilling. Wrap your root layout body with it.
|
|
107
|
-
*/
|
|
108
|
-
declare function CmssyLocaleProvider({ value, children, }: CmssyLocaleProviderProps): react_jsx_runtime.JSX.Element;
|
|
109
|
-
/** Reads the active locale; returns null when no provider is mounted. */
|
|
110
|
-
declare function useCmssyLocale(): CmssyLocaleContext | null;
|
|
111
|
-
|
|
112
|
-
interface CmssyAuthState {
|
|
113
|
-
user: CmssyAuthUser | null;
|
|
114
|
-
loading: boolean;
|
|
115
|
-
signIn(identity: string, password: string): Promise<CmssyAuthActionResult>;
|
|
116
|
-
register(identity: string, password: string, fields?: Record<string, unknown>): Promise<CmssyAuthActionResult>;
|
|
117
|
-
signOut(): Promise<void>;
|
|
118
|
-
refresh(): Promise<void>;
|
|
119
|
-
}
|
|
120
|
-
interface CmssyAuthProviderProps {
|
|
121
|
-
children: ReactNode;
|
|
122
|
-
basePath?: string;
|
|
123
|
-
initialUser?: CmssyAuthUser | null;
|
|
124
|
-
}
|
|
125
|
-
declare function CmssyAuthProvider({ children, basePath, initialUser, }: CmssyAuthProviderProps): react_jsx_runtime.JSX.Element;
|
|
126
|
-
declare function useCmssyUser(): CmssyAuthState;
|
|
127
|
-
|
|
128
|
-
interface CmssyCommerceState {
|
|
129
|
-
cart: CmssyCart | null;
|
|
130
|
-
loading: boolean;
|
|
131
|
-
error: string | null;
|
|
132
|
-
addToCart(recordId: string, quantity?: number, options?: CmssyAddToCartOptions): Promise<void>;
|
|
133
|
-
updateItem(itemId: string, quantity: number): Promise<void>;
|
|
134
|
-
removeItem(itemId: string): Promise<void>;
|
|
135
|
-
clearCart(): Promise<void>;
|
|
136
|
-
applyDiscount(code: string): Promise<void>;
|
|
137
|
-
removeDiscount(): Promise<void>;
|
|
138
|
-
setShippingMethod(shippingMethodId: string | null): Promise<void>;
|
|
139
|
-
merge(): Promise<void>;
|
|
140
|
-
checkout(input: CmssyCheckoutInput): Promise<CmssyOrder>;
|
|
141
|
-
refresh(): Promise<void>;
|
|
142
|
-
fetchProduct(modelSlug: string, filter: Record<string, unknown>): Promise<CmssyProduct | null>;
|
|
143
|
-
}
|
|
144
|
-
interface CmssyCommerceProviderProps {
|
|
145
|
-
children: ReactNode;
|
|
146
|
-
basePath?: string;
|
|
147
|
-
}
|
|
148
|
-
declare function CmssyCommerceProvider({ children, basePath, }: CmssyCommerceProviderProps): react_jsx_runtime.JSX.Element;
|
|
149
|
-
declare function useCart(): CmssyCommerceState;
|
|
150
|
-
|
|
151
|
-
declare const productBlock: BlockDefinition;
|
|
152
|
-
|
|
153
|
-
declare const cartBlock: BlockDefinition;
|
|
154
|
-
|
|
155
|
-
declare const checkoutBlock: BlockDefinition;
|
|
156
|
-
|
|
157
|
-
interface CmssyOrdersState {
|
|
158
|
-
orders: CmssyOrder[];
|
|
159
|
-
total: number;
|
|
160
|
-
hasMore: boolean;
|
|
161
|
-
loading: boolean;
|
|
162
|
-
error: string | null;
|
|
163
|
-
refresh(): Promise<void>;
|
|
164
|
-
}
|
|
165
|
-
declare function useCmssyOrders(options?: UseCmssyOrdersOptions): CmssyOrdersState;
|
|
166
|
-
interface CmssyOrderState {
|
|
167
|
-
order: CmssyOrder | null;
|
|
168
|
-
loading: boolean;
|
|
169
|
-
error: string | null;
|
|
170
|
-
refresh(): Promise<void>;
|
|
171
|
-
}
|
|
172
|
-
declare function useCmssyOrder(id: string | null | undefined, options?: UseCmssyOrderOptions): CmssyOrderState;
|
|
173
|
-
|
|
174
|
-
export { CmssyAuthProvider, type CmssyAuthProviderProps, type CmssyAuthState, CmssyCommerceProvider, type CmssyCommerceProviderProps, type CmssyCommerceState, CmssyEditableLayout, type CmssyEditableLayoutProps, CmssyEditablePage, type CmssyEditablePageProps, CmssyLazyEditor, type CmssyLazyEditorProps, CmssyLazyLayout, type CmssyLazyLayoutProps, CmssyLocaleProvider, type CmssyLocaleProviderProps, type CmssyOrderState, type CmssyOrdersState, type EditBridgeConfig, type EditBridgeState, type PatchMap, cartBlock, checkoutBlock, productBlock, useCart, useCmssyLocale, useCmssyOrder, useCmssyOrders, useCmssyUser, useEditBridge };
|
|
96
|
+
export { CmssyEditableLayout, type CmssyEditableLayoutProps, CmssyEditablePage, type CmssyEditablePageProps, CmssyLazyEditor, type CmssyLazyEditorProps, CmssyLazyLayout, type CmssyLazyLayoutProps, type EditBridgeConfig, type EditBridgeState, type PatchMap, useEditBridge };
|