@sanity/document-internationalization 1.0.3 → 1.0.4
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 +0 -9
- package/lib/index.esm.js +1 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/src/index.d.ts +32 -1
- package/package.json +1 -1
- package/src/index.ts +2 -0
package/lib/src/index.d.ts
CHANGED
|
@@ -9,13 +9,28 @@ import {ListItem} from 'sanity/desk'
|
|
|
9
9
|
import {ListItemBuilder} from 'sanity/desk'
|
|
10
10
|
import {Plugin as Plugin_2} from 'sanity'
|
|
11
11
|
import type {PluginOptions} from 'sanity'
|
|
12
|
-
import
|
|
12
|
+
import {SanityClient} from '@sanity/client'
|
|
13
13
|
import {SanityDocument} from 'sanity'
|
|
14
|
+
import {SanityDocument as SanityDocument_2} from '@sanity/client'
|
|
14
15
|
import {Schema} from 'sanity'
|
|
15
16
|
import {SchemaType} from 'sanity'
|
|
16
17
|
import type {SlugIsUniqueValidator} from 'sanity'
|
|
17
18
|
import {StructureBuilder} from 'sanity/desk'
|
|
18
19
|
|
|
20
|
+
declare type ApplyConfigOptionalKeys =
|
|
21
|
+
| 'shouldReload'
|
|
22
|
+
| 'languagesLoader'
|
|
23
|
+
| 'fallbackLanguageSelect'
|
|
24
|
+
| 'customFlagComponents'
|
|
25
|
+
|
|
26
|
+
declare type ApplyConfigResult = Omit<
|
|
27
|
+
Required<{
|
|
28
|
+
[K in keyof Ti18nConfig]: Required<Ti18nConfig[K]>
|
|
29
|
+
}>,
|
|
30
|
+
ApplyConfigOptionalKeys
|
|
31
|
+
> &
|
|
32
|
+
Pick<Ti18nConfig, ApplyConfigOptionalKeys>
|
|
33
|
+
|
|
19
34
|
export declare function createDeleteAction(pluginConfig: Ti18nConfig): DocumentActionComponent
|
|
20
35
|
|
|
21
36
|
export declare function createDuplicateAction(pluginConfig: Ti18nConfig): DocumentActionComponent
|
|
@@ -184,6 +199,22 @@ export declare const UiMessages: {
|
|
|
184
199
|
}
|
|
185
200
|
}
|
|
186
201
|
|
|
202
|
+
export declare function updateIntlFieldsForDocument(
|
|
203
|
+
client: SanityClient,
|
|
204
|
+
config: ApplyConfigResult,
|
|
205
|
+
document: SanityDocument_2,
|
|
206
|
+
baseDocument?: SanityDocument_2
|
|
207
|
+
): Promise<void>
|
|
208
|
+
|
|
209
|
+
export declare function useConfig(pluginConfig: Ti18nConfig, type?: string): ApplyConfigResult
|
|
210
|
+
|
|
211
|
+
export declare function useDelayedFlag(
|
|
212
|
+
value?: boolean,
|
|
213
|
+
timeout?: number,
|
|
214
|
+
delayedOn?: boolean,
|
|
215
|
+
delayedOff?: boolean
|
|
216
|
+
): boolean
|
|
217
|
+
|
|
187
218
|
export declare function withDocumentI18nPlugin(
|
|
188
219
|
plugins: PluginOptions[] | ((config: Ti18nConfig) => PluginOptions[]),
|
|
189
220
|
config: Ti18nConfig & {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED