@nocode-factory/sanity-kit 2.36.0 → 2.37.1
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/bin/ncf-kit.mjs +3 -0
- package/dist/fixCrossLanguageReferences-CagQ_Vvk.js +263 -0
- package/dist/fixCrossLanguageReferences-CagQ_Vvk.js.map +1 -0
- package/dist/fixCrossLanguageReferences-D4phJn84.d.ts +427 -0
- package/dist/index.d.ts +3 -302
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +2 -2
- package/dist/schema.js +2 -2
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/lib/fixCrossLanguageReferences.ts +76 -0
- package/src/schema/index.ts +3 -0
- package/src/schema/sameLanguageReferences.ts +65 -0
- package/src/version.ts +1 -1
- package/dist/componentDefaults-CNiuukLt.d.ts +0 -78
- package/dist/componentDefaults-CelL5Ain.js +0 -149
- package/dist/componentDefaults-CelL5Ain.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,306 +1,7 @@
|
|
|
1
|
-
import { a as defineComponentDefaults, i as
|
|
1
|
+
import { A as ResolvedI18n, C as NcfPageTypeConfig, D as ResolvedComponentPreview, E as NcfToolsConfig, M as ResolvedPageType, O as ResolvedDocumentColumn, S as NcfKitConfig, T as NcfToolName, _ as NcfEnvironment, a as componentDefaultsMainDocument, b as NcfInternalField, c as defineComponentDefaults, d as ConfigIssue, f as IssueLevel, g as NcfDocumentColumn, h as NcfComponentPreviewConfig, i as DEFAULT_COMPONENT_DEFAULTS_TYPE, j as ResolvedKitConfig, k as ResolvedHistory, l as requiredUnlessDefault, m as NcfBoardTag, n as fixCrossLanguageReferences, o as componentDefaultsMainDocuments, p as KitContextValue, r as withSameLanguageReferences, s as defaultsFieldName, t as CrossLanguageReport, u as requiredUnlessDefaultFor, v as NcfHistoryConfig, w as NcfPageTypeInput, x as NcfInternalFieldOption, y as NcfI18nConfig } from "./fixCrossLanguageReferences-D4phJn84.js";
|
|
2
2
|
import { ComponentType, ReactNode } from "react";
|
|
3
3
|
import { SanityClient, Schema, Tool, ToolMenuProps } from "sanity";
|
|
4
4
|
import { PreviewHeaderProps } from "sanity/presentation";
|
|
5
|
-
/**
|
|
6
|
-
* Configuration publique du plugin. Tout est optionnel sauf `pageTypes` :
|
|
7
|
-
* le kit ne doit rien savoir du contenu d'un projet client.
|
|
8
|
-
*/
|
|
9
|
-
/** Un type de document considéré comme une page du site. */
|
|
10
|
-
interface NcfPageTypeInput {
|
|
11
|
-
/** Nom du type de document Sanity (ex. 'page'). */
|
|
12
|
-
type: string;
|
|
13
|
-
/**
|
|
14
|
-
* Champ de type `slug` portant l'URL. Hérite de `slugField` global.
|
|
15
|
-
* Mettre à `null` pour un type sans slug : `path` devient obligatoire.
|
|
16
|
-
*/
|
|
17
|
-
slugField?: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* Chemin fixe, pour les pages sans slug (ex. l'accueil : '/').
|
|
20
|
-
* Prioritaire sur `slugField` quand les deux sont renseignés.
|
|
21
|
-
*/
|
|
22
|
-
path?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Préfixe d'URL placé devant le slug, pour les collections servies sous un
|
|
25
|
-
* répertoire : `pathPrefix: '/blog'` donne `/blog/<slug>`. Sans effet avec
|
|
26
|
-
* `path`. C'est la clé `pathPrefix` du registre `site-routes.json` du starter.
|
|
27
|
-
*/
|
|
28
|
-
pathPrefix?: string;
|
|
29
|
-
/** Champ portant le titre affiché. Hérite de `titleField` global. */
|
|
30
|
-
titleField?: string;
|
|
31
|
-
}
|
|
32
|
-
type NcfPageTypeConfig = string | NcfPageTypeInput;
|
|
33
|
-
/** Sites multilingues (ex. @sanity/document-internationalization). */
|
|
34
|
-
interface NcfI18nConfig {
|
|
35
|
-
/** Champ portant le code de langue sur le document. */
|
|
36
|
-
field?: string;
|
|
37
|
-
/** Langue servie à la racine, sans préfixe d'URL. */
|
|
38
|
-
defaultLocale?: string;
|
|
39
|
-
/** Langues attendues. Vide = déduites des documents rencontrés. */
|
|
40
|
-
locales?: string[];
|
|
41
|
-
/**
|
|
42
|
-
* Langue SOURCE des valeurs par défaut des composants (défaut : `en` si le site
|
|
43
|
-
* l'a, sinon la langue principale). Publier ses valeurs par défaut propose de
|
|
44
|
-
* retraduire celles des autres langues ; un champ qui hérite d'une valeur par
|
|
45
|
-
* défaut non traduite propose « Translate default with AI ».
|
|
46
|
-
*/
|
|
47
|
-
defaultsSourceLocale?: string;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Aperçu visuel des blocs du page builder. Aujourd'hui un seul fournisseur :
|
|
51
|
-
* la page « design system » du front, avec les captures générées par la CI.
|
|
52
|
-
* Storybook viendra s'ajouter ici le jour où un projet en aura un.
|
|
53
|
-
*/
|
|
54
|
-
interface NcfComponentPreviewConfig {
|
|
55
|
-
provider?: 'designSystemPage' | 'none';
|
|
56
|
-
/** Chemin de la page de démonstration, relatif à `previewUrl`. */
|
|
57
|
-
path?: string;
|
|
58
|
-
/** Ancre vers le bloc sur cette page. Gabarit : {name} / {kebab}. */
|
|
59
|
-
anchor?: string;
|
|
60
|
-
/** Chemin de la capture, relatif à `previewUrl`. Gabarit : {name} / {kebab}. */
|
|
61
|
-
thumbnail?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Type du document des valeurs par défaut des composants (un champ par
|
|
64
|
-
* composant, nommé `{name}`). Présent dans le schéma : un clic sur un composant
|
|
65
|
-
* ouvre Presentation avec son rendu réel et ses valeurs par défaut côte à côte.
|
|
66
|
-
*/
|
|
67
|
-
defaultsType?: string;
|
|
68
|
-
/** Page qui rend un composant seul, avec ses valeurs par défaut. Gabarit : {name} / {kebab}. */
|
|
69
|
-
live?: string;
|
|
70
|
-
}
|
|
71
|
-
/** Journal des modifications (phase 2). */
|
|
72
|
-
interface NcfHistoryConfig {
|
|
73
|
-
/**
|
|
74
|
-
* Clé de lecture du projet, écrite dans `studio/.env` par `npx ncf-kit setup`
|
|
75
|
-
* (variable `SANITY_STUDIO_NCF_PROJECT_KEY`). Elle voyage dans le bundle du
|
|
76
|
-
* Studio : imprévisible, pas confidentielle. Jamais une clé d'écriture.
|
|
77
|
-
* Vide ou absente : l'onglet Historique explique comment l'obtenir.
|
|
78
|
-
*/
|
|
79
|
-
projectKey?: string;
|
|
80
|
-
/** Base des Edge Functions. Par défaut, le service du kit. */
|
|
81
|
-
endpoint?: string;
|
|
82
|
-
}
|
|
83
|
-
/** Étiquette de suivi posable sur une page dans le board. */
|
|
84
|
-
interface NcfBoardTag {
|
|
85
|
-
/** Identifiant stable, enregistré dans le document de disposition. */
|
|
86
|
-
id: string;
|
|
87
|
-
label: string;
|
|
88
|
-
/** Couleur CSS de la pastille et de la bordure du nœud. */
|
|
89
|
-
color: string;
|
|
90
|
-
}
|
|
91
|
-
/** Choix possible d'un champ de gestion interne de type « select ». */
|
|
92
|
-
interface NcfInternalFieldOption {
|
|
93
|
-
id: string;
|
|
94
|
-
label: string;
|
|
95
|
-
/** Couleur de la pastille. Sans elle, le choix s'affiche en texte. */
|
|
96
|
-
color?: string;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Champ de suivi éditorial, libre. Autant qu'on veut : responsable, cible,
|
|
100
|
-
* rôle de la page… Ces valeurs vivent dans le document du kit, jamais dans le
|
|
101
|
-
* schéma du client.
|
|
102
|
-
*/
|
|
103
|
-
interface NcfInternalField {
|
|
104
|
-
/** Identifiant stable, enregistré avec la valeur. */
|
|
105
|
-
id: string;
|
|
106
|
-
label: string;
|
|
107
|
-
/** `text` par défaut. `select` exige `options`. */
|
|
108
|
-
type?: 'text' | 'select';
|
|
109
|
-
options?: NcfInternalFieldOption[];
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Donnée du document de la page, affichable telle quelle dans une colonne.
|
|
113
|
-
*
|
|
114
|
-
* Réservé aux valeurs qui tiennent sur une ligne : une meta description, un
|
|
115
|
-
* booléen d'indexabilité, une date. Surtout pas un tableau de sections, qu'on
|
|
116
|
-
* ne saurait pas rendre dans une cellule.
|
|
117
|
-
*/
|
|
118
|
-
interface NcfDocumentColumn {
|
|
119
|
-
/** Identifiant stable. Lettres, chiffres et tirets. */
|
|
120
|
-
key: string;
|
|
121
|
-
label: string;
|
|
122
|
-
/** Chemins essayés dans l'ordre, le premier renseigné gagne. */
|
|
123
|
-
path: string | string[];
|
|
124
|
-
/** `text` par défaut. `boolean` affiche Oui/Non. */
|
|
125
|
-
type?: 'text' | 'boolean' | 'number';
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Une version du front déployée quelque part : production, préproduction,
|
|
129
|
-
* branche de recette.
|
|
130
|
-
*
|
|
131
|
-
* Le code change d'un environnement à l'autre, **pas les données** : c'est
|
|
132
|
-
* toujours le même dataset qu'on regarde. Voir le contenu de production dans
|
|
133
|
-
* le front d'une branche est justement l'intérêt.
|
|
134
|
-
*/
|
|
135
|
-
interface NcfEnvironment {
|
|
136
|
-
/** Identifiant stable, retenu d'une session à l'autre. */
|
|
137
|
-
id: string;
|
|
138
|
-
label: string;
|
|
139
|
-
/** Base URL du front, sans slash final. */
|
|
140
|
-
url: string;
|
|
141
|
-
}
|
|
142
|
-
interface NcfToolsConfig {
|
|
143
|
-
pages?: boolean;
|
|
144
|
-
components?: boolean;
|
|
145
|
-
history?: boolean;
|
|
146
|
-
/** Bouton « Design system » : ouvre la page /design-system dans Presentation. */
|
|
147
|
-
designSystem?: boolean;
|
|
148
|
-
}
|
|
149
|
-
interface NcfKitConfig {
|
|
150
|
-
/** Types de documents traités comme des pages. Au moins un. */
|
|
151
|
-
pageTypes: NcfPageTypeConfig[];
|
|
152
|
-
/** Champ tableau du page builder. */
|
|
153
|
-
pageBuilderField?: string;
|
|
154
|
-
/**
|
|
155
|
-
* Préfixe commun aux types de blocs, retiré pour l'affichage et les gabarits
|
|
156
|
-
* d'URL. Ex. 'section.' pour des blocs nommés `section.hero`.
|
|
157
|
-
*/
|
|
158
|
-
blockNamespace?: string;
|
|
159
|
-
/** Champ slug par défaut des `pageTypes`. */
|
|
160
|
-
slugField?: string;
|
|
161
|
-
/** Champ titre par défaut des `pageTypes`. */
|
|
162
|
-
titleField?: string;
|
|
163
|
-
/**
|
|
164
|
-
* Champ booléen marquant une page comme non indexable. Plusieurs chemins
|
|
165
|
-
* sont essayés dans l'ordre, le premier renseigné gagne.
|
|
166
|
-
* Défaut : `['seo.noindex', 'noindex']`.
|
|
167
|
-
*/
|
|
168
|
-
noindexField?: string | string[];
|
|
169
|
-
/** Base URL du front, sans slash final. */
|
|
170
|
-
previewUrl?: string;
|
|
171
|
-
/**
|
|
172
|
-
* Fronts déployés entre lesquels basculer dans l'aperçu. Sans eux, le seul
|
|
173
|
-
* environnement proposé est `previewUrl`.
|
|
174
|
-
*
|
|
175
|
-
* Leurs origines doivent figurer dans `allowOrigins` de `presentationTool` :
|
|
176
|
-
* `ncfAllowedOrigins(config)` les produit.
|
|
177
|
-
*/
|
|
178
|
-
environments?: NcfEnvironment[];
|
|
179
|
-
/**
|
|
180
|
-
* `false` retire la préproduction déduite par convention
|
|
181
|
-
* (`preview-<projet>.vercel.app`). Utile pour un projet qui n'en a pas.
|
|
182
|
-
*/
|
|
183
|
-
preprodUrl?: false;
|
|
184
|
-
/**
|
|
185
|
-
* Gabarit d'URL de la capture d'une page, pour afficher la page entière dans
|
|
186
|
-
* le board plutôt qu'une iframe tronquée. Variables : {slug} (chemin sans
|
|
187
|
-
* slash de tête, avec des tirets), {locale}, {id}.
|
|
188
|
-
*
|
|
189
|
-
* Chemin relatif à `previewUrl` (« /pages/{slug}.png ») ou URL absolue.
|
|
190
|
-
* Vide : le board retombe sur l'aperçu iframe en direct.
|
|
191
|
-
*/
|
|
192
|
-
pageThumbnail?: string;
|
|
193
|
-
/** `false` (défaut) pour un site monolingue. */
|
|
194
|
-
i18n?: NcfI18nConfig | false;
|
|
195
|
-
componentPreview?: NcfComponentPreviewConfig;
|
|
196
|
-
history?: NcfHistoryConfig;
|
|
197
|
-
/**
|
|
198
|
-
* Base des Edge Functions du kit, pour l'enregistrement et l'historique.
|
|
199
|
-
* `false` coupe tout appel sortant, y compris le signalement de présence.
|
|
200
|
-
*/
|
|
201
|
-
serviceEndpoint?: string | false;
|
|
202
|
-
/** Permet de n'activer qu'une partie des outils. */
|
|
203
|
-
tools?: NcfToolsConfig;
|
|
204
|
-
/**
|
|
205
|
-
* Outils techniques rangés dans le menu « Plus » de la barre du Studio, pour ne
|
|
206
|
-
* pas encombrer le marketing. Par défaut : Vision et la planification
|
|
207
|
-
* (« Scheduled drafts » / Releases, nom d'outil `releases`). `false` : aucun.
|
|
208
|
-
*/
|
|
209
|
-
moreTools?: string[] | false;
|
|
210
|
-
/**
|
|
211
|
-
* Étiquettes de suivi du board. Remplacent entièrement les valeurs par
|
|
212
|
-
* défaut quand elles sont fournies.
|
|
213
|
-
*/
|
|
214
|
-
boardTags?: NcfBoardTag[];
|
|
215
|
-
/**
|
|
216
|
-
* Colonnes de l'onglet « Gestion interne » de la liste des pages.
|
|
217
|
-
* Remplacent entièrement les valeurs par défaut quand elles sont fournies.
|
|
218
|
-
*/
|
|
219
|
-
internalFields?: NcfInternalField[];
|
|
220
|
-
/**
|
|
221
|
-
* Données du document affichables en colonne, proposées dans le sélecteur de
|
|
222
|
-
* colonnes. Masquées tant que personne ne les coche.
|
|
223
|
-
* Défaut : meta description, titre SEO, indexabilité.
|
|
224
|
-
*/
|
|
225
|
-
documentColumns?: NcfDocumentColumn[];
|
|
226
|
-
}
|
|
227
|
-
interface ResolvedPageType {
|
|
228
|
-
type: string;
|
|
229
|
-
slugField: string | null;
|
|
230
|
-
path: string | null;
|
|
231
|
-
/** Préfixe normalisé ('/blog'), `null` pour une collection à la racine. */
|
|
232
|
-
pathPrefix: string | null;
|
|
233
|
-
titleField: string;
|
|
234
|
-
}
|
|
235
|
-
interface ResolvedI18n {
|
|
236
|
-
field: string;
|
|
237
|
-
defaultLocale: string;
|
|
238
|
-
locales: string[];
|
|
239
|
-
defaultsSourceLocale: string;
|
|
240
|
-
}
|
|
241
|
-
interface ResolvedComponentPreview {
|
|
242
|
-
provider: 'designSystemPage' | 'none';
|
|
243
|
-
path: string;
|
|
244
|
-
anchor: string;
|
|
245
|
-
thumbnail: string;
|
|
246
|
-
defaultsType: string;
|
|
247
|
-
live: string;
|
|
248
|
-
}
|
|
249
|
-
interface ResolvedKitConfig {
|
|
250
|
-
pageTypes: ResolvedPageType[];
|
|
251
|
-
pageTypeNames: string[];
|
|
252
|
-
pageBuilderField: string;
|
|
253
|
-
blockNamespace: string;
|
|
254
|
-
noindexFields: string[];
|
|
255
|
-
previewUrl: string | null;
|
|
256
|
-
environments: NcfEnvironment[];
|
|
257
|
-
pageThumbnail: string | null;
|
|
258
|
-
i18n: ResolvedI18n | null;
|
|
259
|
-
componentPreview: ResolvedComponentPreview;
|
|
260
|
-
history: ResolvedHistory | null;
|
|
261
|
-
/** `null` quand on a explicitement coupé les appels sortants. */
|
|
262
|
-
serviceEndpoint: string | null;
|
|
263
|
-
tools: Required<NcfToolsConfig>;
|
|
264
|
-
/** Outils rangés dans le menu « Plus » de la barre (noms d'outils). */
|
|
265
|
-
moreTools: string[];
|
|
266
|
-
boardTags: NcfBoardTag[];
|
|
267
|
-
internalFields: NcfInternalField[];
|
|
268
|
-
documentColumns: ResolvedDocumentColumn[];
|
|
269
|
-
}
|
|
270
|
-
interface ResolvedHistory {
|
|
271
|
-
projectKey: string;
|
|
272
|
-
endpoint: string;
|
|
273
|
-
}
|
|
274
|
-
interface ResolvedDocumentColumn {
|
|
275
|
-
key: string;
|
|
276
|
-
label: string;
|
|
277
|
-
/** Chemins retenus, nettoyés. */
|
|
278
|
-
paths: string[];
|
|
279
|
-
type: 'text' | 'boolean' | 'number';
|
|
280
|
-
/**
|
|
281
|
-
* Inverse un booléen à l'affichage. Sert à `noindex`, qu'on veut lire
|
|
282
|
-
* « Indexable : oui » plutôt que « Noindex : non ».
|
|
283
|
-
*/
|
|
284
|
-
invert?: boolean;
|
|
285
|
-
}
|
|
286
|
-
type IssueLevel = 'error' | 'warning';
|
|
287
|
-
/**
|
|
288
|
-
* Un problème de configuration. `error` neutralise l'outil concerné (mais pas
|
|
289
|
-
* le Studio) ; `warning` laisse l'outil fonctionner en mode dégradé.
|
|
290
|
-
*/
|
|
291
|
-
interface ConfigIssue {
|
|
292
|
-
level: IssueLevel;
|
|
293
|
-
/** Chemin de l'option fautive, ex. 'pageTypes[1].slugField'. */
|
|
294
|
-
path: string;
|
|
295
|
-
message: string;
|
|
296
|
-
/** Quels outils sont concernés. Vide = tous. */
|
|
297
|
-
tools?: NcfToolName[];
|
|
298
|
-
}
|
|
299
|
-
type NcfToolName = 'pages' | 'components' | 'history' | 'designSystem';
|
|
300
|
-
interface KitContextValue {
|
|
301
|
-
config: ResolvedKitConfig;
|
|
302
|
-
issues: ConfigIssue[];
|
|
303
|
-
}
|
|
304
5
|
/** Garantit un chemin absolu ('accueil' -> '/accueil', '' -> '/'). */
|
|
305
6
|
export declare const normalizePath: (path: string) => string;
|
|
306
7
|
/** Applique les valeurs par défaut. Ne valide rien : voir `validateConfig`. */
|
|
@@ -1389,7 +1090,7 @@ export declare function ActorName(props: {
|
|
|
1389
1090
|
* quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
|
|
1390
1091
|
* le vérifie.
|
|
1391
1092
|
*/
|
|
1392
|
-
export declare const KIT_VERSION = "2.
|
|
1093
|
+
export declare const KIT_VERSION = "2.37.1";
|
|
1393
1094
|
/**
|
|
1394
1095
|
* Données de la page proposées comme colonnes.
|
|
1395
1096
|
*
|
|
@@ -1885,5 +1586,5 @@ export declare const NCF_HISTORY_TOOL = "ncf-history";
|
|
|
1885
1586
|
export declare const NCF_DESIGN_SYSTEM_TOOL = "ncf-design-system";
|
|
1886
1587
|
export declare const NCF_TOOL_NAMES: readonly ["ncf-pages", "ncf-components", "ncf-history", "ncf-design-system"];
|
|
1887
1588
|
export declare const ncfKit: import("sanity").Plugin<NcfKitConfig>;
|
|
1888
|
-
export { type AddColumnInput, type Annotation, type AnnotationsState, type BlockOccurrence, type BlockTypeInfo, type BoardEdge, type BoardGraph, type BoardLayoutState, type BoardNode, CONTENT_SCAN_LIMIT as OCCURRENCE_SCAN_LIMIT, type Change, type ChangeKind, type CollectedLinks, type ColorBy, type ColorOptions, type ConfigIssue, DEFAULT_COMPONENT_DEFAULTS_TYPE, type DeriveOptions, type GroupBy, type GroupOptions, type HistoryDetail, type HistoryEvent, type IssueLevel, type KitContextValue, type KitUpdate, type LayoutMode, type MainDocumentRoute, type MergedDoc, type NcfBoardTag, type NcfComponentPreviewConfig, type NcfDocumentColumn, type NcfEnvironment, type NcfHistoryConfig, type NcfI18nConfig, type NcfInternalField, type NcfInternalFieldOption, type NcfKitConfig, type NcfPageTypeConfig, type NcfPageTypeInput, type NcfToolName, type NcfToolsConfig, type NodeLayout, type NodePosition, type OccurrenceInput, type OccurrencePage, type OccurrencesState, type PageContent, type PageContentsState, type PageDoc, type PageFilters, type PageRow, type PageStatus, type PagesState, type PathInput, type Positioned, type PresentationOptions, type PreviewGrant, type PreviewPerspective, type PreviewTargetState, type ProjectStatus, type Registration, type ResolvedComponentPreview, type ResolvedDocumentColumn, type ResolvedHistory, type ResolvedI18n, type ResolvedKitConfig, type ResolvedPageType, type RowColor, type RowGroup, type SchemaFieldLike, type SchemaTypeLike, type SectionLayout, type SectionMapNode, type SectionOrder, type SectionsMapOptions, type Segment, type SiteRoutesRegistry, type SortDirection, type SortKey, type ThumbnailInput, type VersionedDoc, componentDefaultsMainDocument, componentDefaultsMainDocuments, defaultsFieldName, defineComponentDefaults, requiredUnlessDefault, requiredUnlessDefaultFor };
|
|
1589
|
+
export { type AddColumnInput, type Annotation, type AnnotationsState, type BlockOccurrence, type BlockTypeInfo, type BoardEdge, type BoardGraph, type BoardLayoutState, type BoardNode, CONTENT_SCAN_LIMIT as OCCURRENCE_SCAN_LIMIT, type Change, type ChangeKind, type CollectedLinks, type ColorBy, type ColorOptions, type ConfigIssue, type CrossLanguageReport, DEFAULT_COMPONENT_DEFAULTS_TYPE, type DeriveOptions, type GroupBy, type GroupOptions, type HistoryDetail, type HistoryEvent, type IssueLevel, type KitContextValue, type KitUpdate, type LayoutMode, type MainDocumentRoute, type MergedDoc, type NcfBoardTag, type NcfComponentPreviewConfig, type NcfDocumentColumn, type NcfEnvironment, type NcfHistoryConfig, type NcfI18nConfig, type NcfInternalField, type NcfInternalFieldOption, type NcfKitConfig, type NcfPageTypeConfig, type NcfPageTypeInput, type NcfToolName, type NcfToolsConfig, type NodeLayout, type NodePosition, type OccurrenceInput, type OccurrencePage, type OccurrencesState, type PageContent, type PageContentsState, type PageDoc, type PageFilters, type PageRow, type PageStatus, type PagesState, type PathInput, type Positioned, type PresentationOptions, type PreviewGrant, type PreviewPerspective, type PreviewTargetState, type ProjectStatus, type Registration, type ResolvedComponentPreview, type ResolvedDocumentColumn, type ResolvedHistory, type ResolvedI18n, type ResolvedKitConfig, type ResolvedPageType, type RowColor, type RowGroup, type SchemaFieldLike, type SchemaTypeLike, type SectionLayout, type SectionMapNode, type SectionOrder, type SectionsMapOptions, type Segment, type SiteRoutesRegistry, type SortDirection, type SortKey, type ThumbnailInput, type VersionedDoc, componentDefaultsMainDocument, componentDefaultsMainDocuments, defaultsFieldName, defineComponentDefaults, fixCrossLanguageReferences, requiredUnlessDefault, requiredUnlessDefaultFor, withSameLanguageReferences };
|
|
1889
1590
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as DEFAULT_SLUG_FIELD, a as componentDefaultsMainDocuments, b as DEFAULT_TOOLS, c as requiredUnlessDefault, d as DEFAULT_COMPONENT_PREVIEW, f as DEFAULT_I18N, h as DEFAULT_PAGE_BUILDER_FIELD, i as componentDefaultsMainDocument, l as requiredUnlessDefaultFor, m as DEFAULT_NOINDEX_FIELDS, n as withSameLanguageReferences, o as defaultsFieldName, p as DEFAULT_INTERNAL_FIELDS, r as DEFAULT_COMPONENT_DEFAULTS_TYPE, s as defineComponentDefaults, t as fixCrossLanguageReferences, u as DEFAULT_BOARD_TAGS, v as DEFAULT_TITLE_FIELD, y as DEFAULT_TOOLBAR_MORE } from "./fixCrossLanguageReferences-CagQ_Vvk.js";
|
|
2
2
|
import { createContext, createElement, forwardRef, memo, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
import { ToolLink, defineField, definePlugin, defineType, pathToString, set, unset, useClient, useCurrentUser, useFormValue, usePerspective, useSchema, useSetPerspective, useUser, useWorkspace } from "sanity";
|
|
4
4
|
import { ClockIcon } from "@sanity/icons/Clock";
|
|
@@ -1384,7 +1384,7 @@ function explainGrantError(error) {
|
|
|
1384
1384
|
* quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
|
|
1385
1385
|
* le vérifie.
|
|
1386
1386
|
*/
|
|
1387
|
-
const KIT_VERSION = "2.
|
|
1387
|
+
const KIT_VERSION = "2.37.1";
|
|
1388
1388
|
/**
|
|
1389
1389
|
* Signale ce Studio au service du kit, une fois par montage.
|
|
1390
1390
|
*
|
|
@@ -1727,7 +1727,7 @@ function useKitUpdate() {
|
|
|
1727
1727
|
!controller.signal.aborted && body?.version && setLatest(body.version);
|
|
1728
1728
|
}).catch(() => {}), () => controller.abort();
|
|
1729
1729
|
}, []);
|
|
1730
|
-
let available = !!(latest && !isPrerelease(latest) && compareVersions(latest, "2.
|
|
1730
|
+
let available = !!(latest && !isPrerelease(latest) && compareVersions(latest, "2.37.1") > 0);
|
|
1731
1731
|
return {
|
|
1732
1732
|
current: KIT_VERSION,
|
|
1733
1733
|
latest,
|
|
@@ -10215,6 +10215,6 @@ function hasLanguageField(schemaType, field) {
|
|
|
10215
10215
|
let fields = schemaType?.fields;
|
|
10216
10216
|
return Array.isArray(fields) && fields.some((f) => f?.name === field);
|
|
10217
10217
|
}
|
|
10218
|
-
export { ANNOTATION_TYPE, ActorName, BOARD_LAYOUT_ID, BOARD_LAYOUT_TYPE, BRAIN_NODE_SIZE, BoardLayoutProvider, COLUMN_TYPE, CONTENT_SCAN_LIMIT, CONTENT_SCAN_LIMIT as OCCURRENCE_SCAN_LIMIT, CUSTOM_ENVIRONMENT_ID, DATA_PREFIX, DEFAULT_BOARD_TAGS, DEFAULT_COMPONENT_DEFAULTS_TYPE, DEFAULT_COMPONENT_PREVIEW, DEFAULT_I18N, DEFAULT_INTERNAL_FIELDS, DEFAULT_MORE_TOOLS, DEFAULT_PAGE_BUILDER_FIELD, DEFAULT_SLUG_FIELD, DEFAULT_TITLE_FIELD, KIT_API_VERSION, KIT_VERSION, NCF_COMPONENTS_TOOL, NCF_DESIGN_SYSTEM_TOOL, NCF_HIDDEN_TYPES, NCF_HISTORY_TOOL, NCF_MORE_TOOL, NCF_PAGES_TOOL, NCF_TOOL_NAMES, NODE_FIELD_TYPE, NODE_HEIGHT, NODE_WIDTH, NcfKitUpdate, NcfPreviewHeader, NcfPreviewLauncher, PERSPECTIVES, PROJECTION, SECTION_NODE_TYPE, STATUS_COLORS, STATUS_LABELS, SharePreview, UNSET_LABEL, addColumn, addColumnOption, announce, applySavedPositions, baseId, blockName, blockTypesFromSchema, buildContentsQuery, buildLinkGraph, buildPageRows, buildPagesQuery, collectLinks, collectOccurrences, colorForRow, colorFromString, columnId, compareVersions, componentDefaultsMainDocument, componentDefaultsMainDocuments, createPreviewLauncher, customEnvironment, defaultNodeSize, defaultsFieldName, defineComponentDefaults, depth, deriveDocumentColumns, diffDocuments, diffWords, editIntentPath, explainGrantError, fallbackLayout, fetchDetail, fetchTimeline, fillTemplate, filterRows, flatten, formatDocumentValue, groupPageRows, groupValue, hasBlockingIssue, humanizeBlockName, isDraftId, isKitType, isPrerelease, isSafeColumnKey, isSafeFieldPath, isTextChange, isVersionId, issuesForTool, keyForPath, kitSchemaTypes, layoutGraph, layoutSectionsMap, localesInRows, mergeVersions, missingPageTypes, moveColumn, ncfAllowedOrigins, ncfKit, ncfMainDocuments, ncfPresentationComponents, ncfPreviewComponents, normalizeInternalPath, normalizePath, occurrencesForTypes, pageThumbnailUrl, pageTypeFor, pageTypesFromSiteRoutes, pageTypesWithoutBuilder, parentPath, presentationPath, pruneSavedPositions, releaseId, removeColumn, renameColumn, requestPreviewGrant, requiredUnlessDefault, requiredUnlessDefaultFor, resolveColorBy, resolveConfig, segments, slugKey, sortRows, summarize, toKebabCase, toPath, toUrl, topLevelBlockCount, uniqueColumnId, upsertLayout, urlOn, useAnnotations, useBoardLayout, useDocumentColumns, useHistory, useInternalColumns, useKitClient, useKitConfig, useKitContext, useKitUpdate, useOccurrences, usePageContents, usePages, usePreviewTarget, useRegistration, validateConfig, withAlpha, withMoreTool };
|
|
10218
|
+
export { ANNOTATION_TYPE, ActorName, BOARD_LAYOUT_ID, BOARD_LAYOUT_TYPE, BRAIN_NODE_SIZE, BoardLayoutProvider, COLUMN_TYPE, CONTENT_SCAN_LIMIT, CONTENT_SCAN_LIMIT as OCCURRENCE_SCAN_LIMIT, CUSTOM_ENVIRONMENT_ID, DATA_PREFIX, DEFAULT_BOARD_TAGS, DEFAULT_COMPONENT_DEFAULTS_TYPE, DEFAULT_COMPONENT_PREVIEW, DEFAULT_I18N, DEFAULT_INTERNAL_FIELDS, DEFAULT_MORE_TOOLS, DEFAULT_PAGE_BUILDER_FIELD, DEFAULT_SLUG_FIELD, DEFAULT_TITLE_FIELD, KIT_API_VERSION, KIT_VERSION, NCF_COMPONENTS_TOOL, NCF_DESIGN_SYSTEM_TOOL, NCF_HIDDEN_TYPES, NCF_HISTORY_TOOL, NCF_MORE_TOOL, NCF_PAGES_TOOL, NCF_TOOL_NAMES, NODE_FIELD_TYPE, NODE_HEIGHT, NODE_WIDTH, NcfKitUpdate, NcfPreviewHeader, NcfPreviewLauncher, PERSPECTIVES, PROJECTION, SECTION_NODE_TYPE, STATUS_COLORS, STATUS_LABELS, SharePreview, UNSET_LABEL, addColumn, addColumnOption, announce, applySavedPositions, baseId, blockName, blockTypesFromSchema, buildContentsQuery, buildLinkGraph, buildPageRows, buildPagesQuery, collectLinks, collectOccurrences, colorForRow, colorFromString, columnId, compareVersions, componentDefaultsMainDocument, componentDefaultsMainDocuments, createPreviewLauncher, customEnvironment, defaultNodeSize, defaultsFieldName, defineComponentDefaults, depth, deriveDocumentColumns, diffDocuments, diffWords, editIntentPath, explainGrantError, fallbackLayout, fetchDetail, fetchTimeline, fillTemplate, filterRows, fixCrossLanguageReferences, flatten, formatDocumentValue, groupPageRows, groupValue, hasBlockingIssue, humanizeBlockName, isDraftId, isKitType, isPrerelease, isSafeColumnKey, isSafeFieldPath, isTextChange, isVersionId, issuesForTool, keyForPath, kitSchemaTypes, layoutGraph, layoutSectionsMap, localesInRows, mergeVersions, missingPageTypes, moveColumn, ncfAllowedOrigins, ncfKit, ncfMainDocuments, ncfPresentationComponents, ncfPreviewComponents, normalizeInternalPath, normalizePath, occurrencesForTypes, pageThumbnailUrl, pageTypeFor, pageTypesFromSiteRoutes, pageTypesWithoutBuilder, parentPath, presentationPath, pruneSavedPositions, releaseId, removeColumn, renameColumn, requestPreviewGrant, requiredUnlessDefault, requiredUnlessDefaultFor, resolveColorBy, resolveConfig, segments, slugKey, sortRows, summarize, toKebabCase, toPath, toUrl, topLevelBlockCount, uniqueColumnId, upsertLayout, urlOn, useAnnotations, useBoardLayout, useDocumentColumns, useHistory, useInternalColumns, useKitClient, useKitConfig, useKitContext, useKitUpdate, useOccurrences, usePageContents, usePages, usePreviewTarget, useRegistration, validateConfig, withAlpha, withMoreTool, withSameLanguageReferences };
|
|
10219
10219
|
|
|
10220
10220
|
//# sourceMappingURL=index.js.map
|