@nocode-factory/sanity-kit 2.64.0-rc.1 → 2.64.0-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocode-factory/sanity-kit",
3
- "version": "2.64.0-rc.1",
3
+ "version": "2.64.0-rc.3",
4
4
  "description": "Outils Studio de NoCode Factory : Pages (liste + board), Composants, Historique",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -20,14 +20,18 @@ export interface NcfChoiceInputsOptions {
20
20
  linkType?: string
21
21
  /**
22
22
  * Repli propre à un emplacement, quand ni l'instance ni les valeurs par défaut ne
23
- * fixent la valeur : {'champParent.champ': valeur}. Ex. {'secondary.style': 'secondary'}
24
- * pour un bouton secondaire, comme le site (LinkButton defaultStyle).
23
+ * fixent la valeur : {'champParent.champ': valeur}, ajouté aux replis du kit. Par défaut
24
+ * (convention du starter) : {'secondary.style': 'secondary'}, le bouton « secondary »
25
+ * d'une section est secondaire, comme sur le site (LinkButton defaultStyle).
25
26
  */
26
27
  fallbacks?: Record<string, string>
27
28
  /** Libellés (interface du kit en anglais par défaut ; le starter les passe en français). */
28
29
  labels?: {default?: string; reset?: string; emptyItem?: string}
29
30
  }
30
31
 
32
+ /** Replis du starter NCF : un champ `secondary` (bouton secondaire) est de style secondaire. */
33
+ export const DEFAULT_FALLBACKS: Record<string, string> = {'secondary.style': 'secondary'}
34
+
31
35
  export interface ResolvedChoiceInputsOptions {
32
36
  colors: Record<string, {value: string}>
33
37
  headingLevels: {default: string; sections: Record<string, string>}
@@ -45,7 +49,7 @@ export function resolveChoiceInputsOptions(input: NcfChoiceInputsOptions = {}):
45
49
  defaultsType: input.defaultsType ?? DEFAULT_COMPONENT_DEFAULTS_TYPE,
46
50
  namespace: input.namespace ?? 'section.',
47
51
  linkType: input.linkType ?? 'link',
48
- fallbacks: input.fallbacks ?? {},
52
+ fallbacks: {...DEFAULT_FALLBACKS, ...input.fallbacks},
49
53
  labels: {
50
54
  default: input.labels?.default ?? '(default)',
51
55
  reset: input.labels?.reset ?? 'Reset',
package/src/version.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  * quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
4
4
  * le vérifie.
5
5
  */
6
- export const KIT_VERSION = '2.64.0-rc.1'
6
+ export const KIT_VERSION = '2.64.0-rc.3'