@anvilkit/puck-studio 0.0.1 → 0.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/README.md +195 -176
- package/dist/index.cjs +945 -803
- package/dist/index.d.cts +110 -46
- package/dist/index.d.ts +110 -46
- package/dist/index.js +928 -789
- package/dist/legacy.cjs +54 -0
- package/dist/legacy.js +52 -0
- package/dist/overrides.cjs +2090 -0
- package/dist/overrides.d.cts +212 -0
- package/dist/overrides.d.ts +212 -0
- package/dist/overrides.js +2057 -0
- package/dist/styles.css +88 -0
- package/package.json +109 -65
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Overrides, Config, Data } from '@puckeditor/core';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import * as React from 'react';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
4
|
import * as zustand_middleware from 'zustand/middleware';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
6
6
|
|
|
@@ -27,6 +27,52 @@ interface CopywritingProps {
|
|
|
27
27
|
items?: CopywritingItem[];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
declare const ACTIVE_TABS: readonly ["insert", "layer", "image", "text", "copilot"];
|
|
31
|
+
type ActiveTab = (typeof ACTIVE_TABS)[number];
|
|
32
|
+
interface DrawerSlice {
|
|
33
|
+
drawerSearch: string;
|
|
34
|
+
setDrawerSearch: (q: string) => void;
|
|
35
|
+
drawerCollapsed: Record<string, boolean>;
|
|
36
|
+
toggleDrawerGroup: (group: string) => void;
|
|
37
|
+
}
|
|
38
|
+
interface AsideSlice {
|
|
39
|
+
activeTab: ActiveTab;
|
|
40
|
+
setActiveTab: (tab: ActiveTab) => void;
|
|
41
|
+
}
|
|
42
|
+
interface OutlineSlice {
|
|
43
|
+
outlineExpanded: Record<string, boolean>;
|
|
44
|
+
toggleOutlineItem: (id: string) => void;
|
|
45
|
+
}
|
|
46
|
+
interface ThemeSlice {
|
|
47
|
+
theme: "light" | "dark";
|
|
48
|
+
toggleTheme: () => void;
|
|
49
|
+
}
|
|
50
|
+
type EditorUiStore = DrawerSlice & AsideSlice & OutlineSlice & ThemeSlice;
|
|
51
|
+
type EditorUiStoreApi = ReturnType<typeof createEditorUiStore>;
|
|
52
|
+
declare function createEditorUiStore(storeId: string): Omit<zustand.StoreApi<EditorUiStore>, "setState" | "persist"> & {
|
|
53
|
+
setState(partial: EditorUiStore | Partial<EditorUiStore> | ((state: EditorUiStore) => EditorUiStore | Partial<EditorUiStore>), replace?: false | undefined): unknown;
|
|
54
|
+
setState(state: EditorUiStore | ((state: EditorUiStore) => EditorUiStore), replace: true): unknown;
|
|
55
|
+
persist: {
|
|
56
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
57
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
58
|
+
drawerCollapsed: Record<string, boolean>;
|
|
59
|
+
outlineExpanded: Record<string, boolean>;
|
|
60
|
+
theme: "light" | "dark";
|
|
61
|
+
}, unknown>>) => void;
|
|
62
|
+
clearStorage: () => void;
|
|
63
|
+
rehydrate: () => Promise<void> | void;
|
|
64
|
+
hasHydrated: () => boolean;
|
|
65
|
+
onHydrate: (fn: (state: EditorUiStore) => void) => () => void;
|
|
66
|
+
onFinishHydration: (fn: (state: EditorUiStore) => void) => () => void;
|
|
67
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
68
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
69
|
+
drawerCollapsed: Record<string, boolean>;
|
|
70
|
+
outlineExpanded: Record<string, boolean>;
|
|
71
|
+
theme: "light" | "dark";
|
|
72
|
+
}, unknown>>;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
30
76
|
type Locale = string;
|
|
31
77
|
type Messages = Record<string, string>;
|
|
32
78
|
interface I18nState {
|
|
@@ -65,8 +111,8 @@ interface StudioProps {
|
|
|
65
111
|
onAction?: (action: unknown, appState: unknown) => void;
|
|
66
112
|
overrideExtensions?: Partial<Overrides>;
|
|
67
113
|
aiHost?: string;
|
|
68
|
-
headerSlot?: React.ReactNode;
|
|
69
|
-
drawerHeaderSlot?: React.ReactNode;
|
|
114
|
+
headerSlot?: React$1.ReactNode;
|
|
115
|
+
drawerHeaderSlot?: React$1.ReactNode;
|
|
70
116
|
className?: string;
|
|
71
117
|
images?: ImagesProps;
|
|
72
118
|
copywritings?: CopywritingProps;
|
|
@@ -76,32 +122,38 @@ interface StudioProps {
|
|
|
76
122
|
}
|
|
77
123
|
declare function Studio({ config, data, onPublish, onChange, overrideExtensions, aiHost, className, images, copywritings, storeId, locale, messages, }: StudioProps): react_jsx_runtime.JSX.Element;
|
|
78
124
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
125
|
+
declare const EditorUiStoreProvider: ({ value, children, }: {
|
|
126
|
+
value: Omit<zustand.StoreApi<EditorUiStore>, "setState" | "persist"> & {
|
|
127
|
+
setState(partial: EditorUiStore | Partial<EditorUiStore> | ((state: EditorUiStore) => EditorUiStore | Partial<EditorUiStore>), replace?: false | undefined): unknown;
|
|
128
|
+
setState(state: EditorUiStore | ((state: EditorUiStore) => EditorUiStore), replace: true): unknown;
|
|
129
|
+
persist: {
|
|
130
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
131
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
132
|
+
drawerCollapsed: Record<string, boolean>;
|
|
133
|
+
outlineExpanded: Record<string, boolean>;
|
|
134
|
+
theme: "light" | "dark";
|
|
135
|
+
}, unknown>>) => void;
|
|
136
|
+
clearStorage: () => void;
|
|
137
|
+
rehydrate: () => Promise<void> | void;
|
|
138
|
+
hasHydrated: () => boolean;
|
|
139
|
+
onHydrate: (fn: (state: EditorUiStore) => void) => () => void;
|
|
140
|
+
onFinishHydration: (fn: (state: EditorUiStore) => void) => () => void;
|
|
141
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
142
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
143
|
+
drawerCollapsed: Record<string, boolean>;
|
|
144
|
+
outlineExpanded: Record<string, boolean>;
|
|
145
|
+
theme: "light" | "dark";
|
|
146
|
+
}, unknown>>;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
children?: React.ReactNode;
|
|
150
|
+
}) => React.JSX.Element;
|
|
151
|
+
declare const useEditorUiStoreApi: () => Omit<zustand.StoreApi<EditorUiStore>, "setState" | "persist"> & {
|
|
100
152
|
setState(partial: EditorUiStore | Partial<EditorUiStore> | ((state: EditorUiStore) => EditorUiStore | Partial<EditorUiStore>), replace?: false | undefined): unknown;
|
|
101
153
|
setState(state: EditorUiStore | ((state: EditorUiStore) => EditorUiStore), replace: true): unknown;
|
|
102
154
|
persist: {
|
|
103
155
|
setOptions: (options: Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
104
|
-
activeTab:
|
|
156
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
105
157
|
drawerCollapsed: Record<string, boolean>;
|
|
106
158
|
outlineExpanded: Record<string, boolean>;
|
|
107
159
|
theme: "light" | "dark";
|
|
@@ -112,7 +164,7 @@ declare function createEditorUiStore(storeId: string): Omit<zustand.StoreApi<Edi
|
|
|
112
164
|
onHydrate: (fn: (state: EditorUiStore) => void) => () => void;
|
|
113
165
|
onFinishHydration: (fn: (state: EditorUiStore) => void) => () => void;
|
|
114
166
|
getOptions: () => Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
115
|
-
activeTab:
|
|
167
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
116
168
|
drawerCollapsed: Record<string, boolean>;
|
|
117
169
|
outlineExpanded: Record<string, boolean>;
|
|
118
170
|
theme: "light" | "dark";
|
|
@@ -120,32 +172,44 @@ declare function createEditorUiStore(storeId: string): Omit<zustand.StoreApi<Edi
|
|
|
120
172
|
};
|
|
121
173
|
};
|
|
122
174
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
175
|
+
declare const EditorI18nStoreProvider: ({ value, children, }: {
|
|
176
|
+
value: Omit<zustand.StoreApi<I18nState>, "setState" | "persist"> & {
|
|
177
|
+
setState(partial: I18nState | Partial<I18nState> | ((state: I18nState) => I18nState | Partial<I18nState>), replace?: false | undefined): unknown;
|
|
178
|
+
setState(state: I18nState | ((state: I18nState) => I18nState), replace: true): unknown;
|
|
179
|
+
persist: {
|
|
180
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<I18nState, {
|
|
181
|
+
locale: string;
|
|
182
|
+
}, unknown>>) => void;
|
|
183
|
+
clearStorage: () => void;
|
|
184
|
+
rehydrate: () => Promise<void> | void;
|
|
185
|
+
hasHydrated: () => boolean;
|
|
186
|
+
onHydrate: (fn: (state: I18nState) => void) => () => void;
|
|
187
|
+
onFinishHydration: (fn: (state: I18nState) => void) => () => void;
|
|
188
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<I18nState, {
|
|
189
|
+
locale: string;
|
|
190
|
+
}, unknown>>;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
children?: React.ReactNode;
|
|
194
|
+
}) => React.JSX.Element;
|
|
195
|
+
declare const useEditorI18nStoreApi: () => Omit<zustand.StoreApi<I18nState>, "setState" | "persist"> & {
|
|
196
|
+
setState(partial: I18nState | Partial<I18nState> | ((state: I18nState) => I18nState | Partial<I18nState>), replace?: false | undefined): unknown;
|
|
197
|
+
setState(state: I18nState | ((state: I18nState) => I18nState), replace: true): unknown;
|
|
130
198
|
persist: {
|
|
131
|
-
setOptions: (options: Partial<zustand_middleware.PersistOptions<
|
|
132
|
-
|
|
133
|
-
drawerCollapsed: Record<string, boolean>;
|
|
134
|
-
outlineExpanded: Record<string, boolean>;
|
|
135
|
-
theme: "light" | "dark";
|
|
199
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<I18nState, {
|
|
200
|
+
locale: string;
|
|
136
201
|
}, unknown>>) => void;
|
|
137
202
|
clearStorage: () => void;
|
|
138
203
|
rehydrate: () => Promise<void> | void;
|
|
139
204
|
hasHydrated: () => boolean;
|
|
140
|
-
onHydrate: (fn: (state:
|
|
141
|
-
onFinishHydration: (fn: (state:
|
|
142
|
-
getOptions: () => Partial<zustand_middleware.PersistOptions<
|
|
143
|
-
|
|
144
|
-
drawerCollapsed: Record<string, boolean>;
|
|
145
|
-
outlineExpanded: Record<string, boolean>;
|
|
146
|
-
theme: "light" | "dark";
|
|
205
|
+
onHydrate: (fn: (state: I18nState) => void) => () => void;
|
|
206
|
+
onFinishHydration: (fn: (state: I18nState) => void) => () => void;
|
|
207
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<I18nState, {
|
|
208
|
+
locale: string;
|
|
147
209
|
}, unknown>>;
|
|
148
210
|
};
|
|
149
211
|
};
|
|
150
212
|
|
|
151
|
-
|
|
213
|
+
declare const defaultMessages: Messages;
|
|
214
|
+
|
|
215
|
+
export { type ActiveTab, type CopywritingItem, type CopywritingProps, type EditorI18nStoreApi, EditorI18nStoreProvider, type EditorUiStore, type EditorUiStoreApi, EditorUiStoreProvider, type ImageItem, type ImagesProps, type Locale, type Messages, Studio, type StudioProps, createEditorI18nStore, createEditorUiStore, defaultMessages, puckOverrides, useEditorI18nStoreApi, useEditorUiStoreApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Overrides, Config, Data } from '@puckeditor/core';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import * as React from 'react';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
4
|
import * as zustand_middleware from 'zustand/middleware';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
6
6
|
|
|
@@ -27,6 +27,52 @@ interface CopywritingProps {
|
|
|
27
27
|
items?: CopywritingItem[];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
declare const ACTIVE_TABS: readonly ["insert", "layer", "image", "text", "copilot"];
|
|
31
|
+
type ActiveTab = (typeof ACTIVE_TABS)[number];
|
|
32
|
+
interface DrawerSlice {
|
|
33
|
+
drawerSearch: string;
|
|
34
|
+
setDrawerSearch: (q: string) => void;
|
|
35
|
+
drawerCollapsed: Record<string, boolean>;
|
|
36
|
+
toggleDrawerGroup: (group: string) => void;
|
|
37
|
+
}
|
|
38
|
+
interface AsideSlice {
|
|
39
|
+
activeTab: ActiveTab;
|
|
40
|
+
setActiveTab: (tab: ActiveTab) => void;
|
|
41
|
+
}
|
|
42
|
+
interface OutlineSlice {
|
|
43
|
+
outlineExpanded: Record<string, boolean>;
|
|
44
|
+
toggleOutlineItem: (id: string) => void;
|
|
45
|
+
}
|
|
46
|
+
interface ThemeSlice {
|
|
47
|
+
theme: "light" | "dark";
|
|
48
|
+
toggleTheme: () => void;
|
|
49
|
+
}
|
|
50
|
+
type EditorUiStore = DrawerSlice & AsideSlice & OutlineSlice & ThemeSlice;
|
|
51
|
+
type EditorUiStoreApi = ReturnType<typeof createEditorUiStore>;
|
|
52
|
+
declare function createEditorUiStore(storeId: string): Omit<zustand.StoreApi<EditorUiStore>, "setState" | "persist"> & {
|
|
53
|
+
setState(partial: EditorUiStore | Partial<EditorUiStore> | ((state: EditorUiStore) => EditorUiStore | Partial<EditorUiStore>), replace?: false | undefined): unknown;
|
|
54
|
+
setState(state: EditorUiStore | ((state: EditorUiStore) => EditorUiStore), replace: true): unknown;
|
|
55
|
+
persist: {
|
|
56
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
57
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
58
|
+
drawerCollapsed: Record<string, boolean>;
|
|
59
|
+
outlineExpanded: Record<string, boolean>;
|
|
60
|
+
theme: "light" | "dark";
|
|
61
|
+
}, unknown>>) => void;
|
|
62
|
+
clearStorage: () => void;
|
|
63
|
+
rehydrate: () => Promise<void> | void;
|
|
64
|
+
hasHydrated: () => boolean;
|
|
65
|
+
onHydrate: (fn: (state: EditorUiStore) => void) => () => void;
|
|
66
|
+
onFinishHydration: (fn: (state: EditorUiStore) => void) => () => void;
|
|
67
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
68
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
69
|
+
drawerCollapsed: Record<string, boolean>;
|
|
70
|
+
outlineExpanded: Record<string, boolean>;
|
|
71
|
+
theme: "light" | "dark";
|
|
72
|
+
}, unknown>>;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
30
76
|
type Locale = string;
|
|
31
77
|
type Messages = Record<string, string>;
|
|
32
78
|
interface I18nState {
|
|
@@ -65,8 +111,8 @@ interface StudioProps {
|
|
|
65
111
|
onAction?: (action: unknown, appState: unknown) => void;
|
|
66
112
|
overrideExtensions?: Partial<Overrides>;
|
|
67
113
|
aiHost?: string;
|
|
68
|
-
headerSlot?: React.ReactNode;
|
|
69
|
-
drawerHeaderSlot?: React.ReactNode;
|
|
114
|
+
headerSlot?: React$1.ReactNode;
|
|
115
|
+
drawerHeaderSlot?: React$1.ReactNode;
|
|
70
116
|
className?: string;
|
|
71
117
|
images?: ImagesProps;
|
|
72
118
|
copywritings?: CopywritingProps;
|
|
@@ -76,32 +122,38 @@ interface StudioProps {
|
|
|
76
122
|
}
|
|
77
123
|
declare function Studio({ config, data, onPublish, onChange, overrideExtensions, aiHost, className, images, copywritings, storeId, locale, messages, }: StudioProps): react_jsx_runtime.JSX.Element;
|
|
78
124
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
125
|
+
declare const EditorUiStoreProvider: ({ value, children, }: {
|
|
126
|
+
value: Omit<zustand.StoreApi<EditorUiStore>, "setState" | "persist"> & {
|
|
127
|
+
setState(partial: EditorUiStore | Partial<EditorUiStore> | ((state: EditorUiStore) => EditorUiStore | Partial<EditorUiStore>), replace?: false | undefined): unknown;
|
|
128
|
+
setState(state: EditorUiStore | ((state: EditorUiStore) => EditorUiStore), replace: true): unknown;
|
|
129
|
+
persist: {
|
|
130
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
131
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
132
|
+
drawerCollapsed: Record<string, boolean>;
|
|
133
|
+
outlineExpanded: Record<string, boolean>;
|
|
134
|
+
theme: "light" | "dark";
|
|
135
|
+
}, unknown>>) => void;
|
|
136
|
+
clearStorage: () => void;
|
|
137
|
+
rehydrate: () => Promise<void> | void;
|
|
138
|
+
hasHydrated: () => boolean;
|
|
139
|
+
onHydrate: (fn: (state: EditorUiStore) => void) => () => void;
|
|
140
|
+
onFinishHydration: (fn: (state: EditorUiStore) => void) => () => void;
|
|
141
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
142
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
143
|
+
drawerCollapsed: Record<string, boolean>;
|
|
144
|
+
outlineExpanded: Record<string, boolean>;
|
|
145
|
+
theme: "light" | "dark";
|
|
146
|
+
}, unknown>>;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
children?: React.ReactNode;
|
|
150
|
+
}) => React.JSX.Element;
|
|
151
|
+
declare const useEditorUiStoreApi: () => Omit<zustand.StoreApi<EditorUiStore>, "setState" | "persist"> & {
|
|
100
152
|
setState(partial: EditorUiStore | Partial<EditorUiStore> | ((state: EditorUiStore) => EditorUiStore | Partial<EditorUiStore>), replace?: false | undefined): unknown;
|
|
101
153
|
setState(state: EditorUiStore | ((state: EditorUiStore) => EditorUiStore), replace: true): unknown;
|
|
102
154
|
persist: {
|
|
103
155
|
setOptions: (options: Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
104
|
-
activeTab:
|
|
156
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
105
157
|
drawerCollapsed: Record<string, boolean>;
|
|
106
158
|
outlineExpanded: Record<string, boolean>;
|
|
107
159
|
theme: "light" | "dark";
|
|
@@ -112,7 +164,7 @@ declare function createEditorUiStore(storeId: string): Omit<zustand.StoreApi<Edi
|
|
|
112
164
|
onHydrate: (fn: (state: EditorUiStore) => void) => () => void;
|
|
113
165
|
onFinishHydration: (fn: (state: EditorUiStore) => void) => () => void;
|
|
114
166
|
getOptions: () => Partial<zustand_middleware.PersistOptions<EditorUiStore, {
|
|
115
|
-
activeTab:
|
|
167
|
+
activeTab: "insert" | "layer" | "image" | "text" | "copilot";
|
|
116
168
|
drawerCollapsed: Record<string, boolean>;
|
|
117
169
|
outlineExpanded: Record<string, boolean>;
|
|
118
170
|
theme: "light" | "dark";
|
|
@@ -120,32 +172,44 @@ declare function createEditorUiStore(storeId: string): Omit<zustand.StoreApi<Edi
|
|
|
120
172
|
};
|
|
121
173
|
};
|
|
122
174
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
175
|
+
declare const EditorI18nStoreProvider: ({ value, children, }: {
|
|
176
|
+
value: Omit<zustand.StoreApi<I18nState>, "setState" | "persist"> & {
|
|
177
|
+
setState(partial: I18nState | Partial<I18nState> | ((state: I18nState) => I18nState | Partial<I18nState>), replace?: false | undefined): unknown;
|
|
178
|
+
setState(state: I18nState | ((state: I18nState) => I18nState), replace: true): unknown;
|
|
179
|
+
persist: {
|
|
180
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<I18nState, {
|
|
181
|
+
locale: string;
|
|
182
|
+
}, unknown>>) => void;
|
|
183
|
+
clearStorage: () => void;
|
|
184
|
+
rehydrate: () => Promise<void> | void;
|
|
185
|
+
hasHydrated: () => boolean;
|
|
186
|
+
onHydrate: (fn: (state: I18nState) => void) => () => void;
|
|
187
|
+
onFinishHydration: (fn: (state: I18nState) => void) => () => void;
|
|
188
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<I18nState, {
|
|
189
|
+
locale: string;
|
|
190
|
+
}, unknown>>;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
children?: React.ReactNode;
|
|
194
|
+
}) => React.JSX.Element;
|
|
195
|
+
declare const useEditorI18nStoreApi: () => Omit<zustand.StoreApi<I18nState>, "setState" | "persist"> & {
|
|
196
|
+
setState(partial: I18nState | Partial<I18nState> | ((state: I18nState) => I18nState | Partial<I18nState>), replace?: false | undefined): unknown;
|
|
197
|
+
setState(state: I18nState | ((state: I18nState) => I18nState), replace: true): unknown;
|
|
130
198
|
persist: {
|
|
131
|
-
setOptions: (options: Partial<zustand_middleware.PersistOptions<
|
|
132
|
-
|
|
133
|
-
drawerCollapsed: Record<string, boolean>;
|
|
134
|
-
outlineExpanded: Record<string, boolean>;
|
|
135
|
-
theme: "light" | "dark";
|
|
199
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<I18nState, {
|
|
200
|
+
locale: string;
|
|
136
201
|
}, unknown>>) => void;
|
|
137
202
|
clearStorage: () => void;
|
|
138
203
|
rehydrate: () => Promise<void> | void;
|
|
139
204
|
hasHydrated: () => boolean;
|
|
140
|
-
onHydrate: (fn: (state:
|
|
141
|
-
onFinishHydration: (fn: (state:
|
|
142
|
-
getOptions: () => Partial<zustand_middleware.PersistOptions<
|
|
143
|
-
|
|
144
|
-
drawerCollapsed: Record<string, boolean>;
|
|
145
|
-
outlineExpanded: Record<string, boolean>;
|
|
146
|
-
theme: "light" | "dark";
|
|
205
|
+
onHydrate: (fn: (state: I18nState) => void) => () => void;
|
|
206
|
+
onFinishHydration: (fn: (state: I18nState) => void) => () => void;
|
|
207
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<I18nState, {
|
|
208
|
+
locale: string;
|
|
147
209
|
}, unknown>>;
|
|
148
210
|
};
|
|
149
211
|
};
|
|
150
212
|
|
|
151
|
-
|
|
213
|
+
declare const defaultMessages: Messages;
|
|
214
|
+
|
|
215
|
+
export { type ActiveTab, type CopywritingItem, type CopywritingProps, type EditorI18nStoreApi, EditorI18nStoreProvider, type EditorUiStore, type EditorUiStoreApi, EditorUiStoreProvider, type ImageItem, type ImagesProps, type Locale, type Messages, Studio, type StudioProps, createEditorI18nStore, createEditorUiStore, defaultMessages, puckOverrides, useEditorI18nStoreApi, useEditorUiStoreApi };
|