sanity-plugin-internationalized-array
5.3.35.3.4
~
Modified (6 files)
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "sanity-plugin-internationalized-array",
- "version": "5.3.3",
+ "version": "5.3.4",
"description": "Store localized fields in an array to save on attributes",
"keywords": [
"sanity",
"sanity-plugin"
@@ -28,16 +28,16 @@
"./package.json": "./package.json"
},
"dependencies": {
"@sanity/icons": "^5.2.3",
- "@sanity/ui": "^4.4.0",
- "@sanity/util": "^6.16.0",
+ "@sanity/ui": "^4.4.4",
+ "@sanity/util": "^6.18.0",
"lodash-es": "^4.18.1"
},
"devDependencies": {
- "@sanity/language-filter": "5.0.20",
+ "@sanity/language-filter": "5.0.21",
"@sanity/tsconfig": "^2.2.1",
- "@sanity/tsdown-config": "^0.27.1",
+ "@sanity/tsdown-config": "^0.28.8",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@types/lodash-es": "^4.17.12",
"@types/node": "^24.13.3",
@@ -46,15 +46,15 @@
"jsdom": "^29.1.1",
"oxc-transform-react": "^0.153.0",
"react": "^19.3.0",
"react-dom": "^19.3.0",
- "sanity": "^6.16.0",
+ "sanity": "^6.18.0",
"styled-components": "^6.5.3",
- "tsdown": "^0.22.14"
+ "tsdown": "^0.23.1"
},
"peerDependencies": {
- "@sanity/assist": "^6.2.3",
- "@sanity/language-filter": "^5.0.20",
+ "@sanity/assist": "^6.2.4",
+ "@sanity/language-filter": "^5.0.21",
"react": "^19.2",
"react-dom": "^19.2",
"sanity": "^5 || ^6.0.0-0"
}, Index: package/dist/index.d.ts.map
===================================================================
--- package/dist/index.d.ts.map
+++ package/dist/index.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/cache.ts","../src/constants.ts","../src/plugin.tsx","../src/utils/internationalizedArrayLanguageFilter.ts"],"mappings":";;;KAEY;EACV,IAAI,KAAK;EACT;;KAGU;KAEA;EACV;EACA,MAAM;EACN,WAAW;EACX;EACA;EACA;EACA;EACA,aAAa,OAAO;EACpB;KAAU;IAAuB;OAAW;;;;;;;KAMlC;EACV;;EAEA;EACA;;iBAGc,iCACd,eACC,QAAQ;KAIC,2BAA2B;EACrC;EACA,QAAQ;;EAER;;;;EAIA;;KAGU,oBACV,QAAQ,cACR,eAAe,4BACZ,QAAQ;KAED;KAEA;;;;;EAKV;;;;;;;;;;;;;EAaA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BT,WAAW,aAAa;;;;;;;;;EASxB;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,sBAAsB,qBAAqB;;;;;;;;;;EAU3C;;;;;;;EAOA;;;;;;;;;;;EAWA;;;;;EAKA,kBAAkB;;;;;;;;;;EAUlB,0BAA0B;;;;;;;;;;;;EAY1B;IACE,eAAe,SAAS;IACxB,mBAAmB;;;cCnKV;;;;;;;;;;;;;;;;;;;;;;;;cCJA;cCZA,yCAAsB,OAAA;;;;;cCJtB,uCAAoC,eAChC,kBAAgB,SACtB,cAAc,eAAa,+BACP,aAChB,qCAAmC,WACrC"}
\ No newline at end of file
+{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/cache.ts","../src/constants.ts","../src/plugin.tsx","../src/utils/internationalizedArrayLanguageFilter.ts"],"mappings":";;;YAEY;EACV,IAAI,KAAK;EACT;;YAGU;YAEA;EACV;EACA,MAAM;EACN,WAAW;EACX;EACA;EACA;EACA;EACA,aAAa,OAAO;EACpB;KAAU;IAAuB;OAAW;;;;;;;YAMlC;EACV;;EAEA;EACA;;wBAGc,iCACd,eACC,QAAQ;YAIC,2BAA2B;EACrC;EACA,QAAQ;;EAER;;;;EAIA;;YAGU,oBACV,QAAQ,cACR,eAAe,4BACZ,QAAQ;YAED;YAEA;;;;;EAKV;;;;;;;;;;;;;EAaA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BT,WAAW,aAAa;;;;;;;;;EASxB;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,sBAAsB,qBAAqB;;;;;;;;;;EAU3C;;;;;;;EAOA;;;;;;;;;;;EAWA;;;;;EAKA,kBAAkB;;;;;;;;;;EAUlB,0BAA0B;;;;;;;;;;;;EAY1B;IACE,eAAe,SAAS;IACxB,mBAAmB;;;qBCnKV;;;;;;;;;;;;;;;;;;;;;;;;qBCJA;qBCZA,yCAAsB,OAAA;;;;;qBCJtB,uCAAoC,eAChC,kBAAgB,SACtB,cAAc,eAAa,+BACP,aAChB,qCAAmC,WACrC"}
\ No newline at end of file Index: package/dist/migrations/index.d.ts.map
===================================================================
--- package/dist/migrations/index.d.ts.map
+++ package/dist/migrations/index.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"index.d.ts","names":[],"sources":["../../migrations/migrateToLanguageField.ts"],"mappings":"AA2BA;;;;;;;;;;iBAAgB,uBAAuB;;;;mEAAvB,sCAAA"}
\ No newline at end of file
+{"version":3,"file":"index.d.ts","names":[],"sources":["../../migrations/migrateToLanguageField.ts"],"mappings":"AA2BA;;;;;;;;;;wBAAgB,uBAAuB;;;;mEAAvB,sCAAA"}
\ No newline at end of file File too large for inline diff
Index: package/dist/index.d.ts
===================================================================
--- package/dist/index.d.ts
+++ package/dist/index.d.ts
@@ -1,13 +1,13 @@
import "@sanity/ui/styles.css";
import { LanguageFilterConfig } from "@sanity/language-filter";
import { FieldDefinition, FieldMember, FieldsetState, ObjectSchemaType, Rule, RuleTypeConstraint, SanityClient } from "sanity";
-type Language = {
+export type Language = {
id: Intl.UnicodeBCP47LocaleIdentifier;
title: string;
};
-type AllowedType = 'string' | 'number' | 'boolean' | 'text' | 'reference';
-type ArrayConfig = {
+export type AllowedType = 'string' | 'number' | 'boolean' | 'text' | 'reference';
+export type ArrayConfig = {
name: string;
type: AllowedType;
languages: Language[];
title?: string;
@@ -24,16 +24,16 @@
};
/**
* @deprecated Use InternationalizedArrayItem instead
*/
-type Value = {
+export type Value = {
_key: string;
/** Language identifier (e.g., 'en', 'fr'). Added in v5. */
language: string;
value?: unknown;
};
-declare function isInternationalizedArrayItemType(type: string): type is InternationalizedArrayItem['_type'];
-type InternationalizedArrayItem<T = unknown> = {
+export declare function isInternationalizedArrayItemType(type: string): type is InternationalizedArrayItem['_type'];
+export type InternationalizedArrayItem<T = unknown> = {
_key: string;
value?: T;
/** Language identifier (e.g., 'en', 'fr'). Added in v5. */
language: string;
@@ -41,11 +41,11 @@
* string that starts with "internationalizedArray" and ends with "Value"
*/
_type: `internationalizedArray${string}Value`;
};
-type LanguageCallback = (client: SanityClient, selectedValue: Record<string, unknown>) => Promise<Language[]>;
-type LanguageDisplay = 'titleOnly' | 'codeOnly' | 'titleAndCode';
-type PluginConfig = {
+export type LanguageCallback = (client: SanityClient, selectedValue: Record<string, unknown>) => Promise<Language[]>;
+export type LanguageDisplay = 'titleOnly' | 'codeOnly' | 'titleAndCode';
+export type PluginConfig = {
/**
* https://www.sanity.io/docs/api-versioning
* @defaultValue '2025-10-15'
*/
@@ -182,9 +182,9 @@
documentTypes: Required<LanguageFilterConfig>['documentTypes'];
defaultLanguages?: LanguageFilterConfig['defaultLanguages'];
};
};
-declare const clear: () => void;
+export declare const clear: () => void;
/**
* The field name used to identify the language of an internationalized array item.
*
* In v4.x this was '_key', in v5+ this is 'language'.
@@ -206,13 +206,12 @@
* ]
* }
* ```
*/
-declare const LANGUAGE_FIELD_NAME: 'language';
-declare const internationalizedArray: import("sanity").Plugin<PluginConfig>;
+export declare const LANGUAGE_FIELD_NAME: 'language';
+export declare const internationalizedArray: import("sanity").Plugin<PluginConfig>;
/**
* Default filter function for the internationalized array field.
* It filter the field base on the `language` value of the object.
*/
-declare const internationalizedArrayLanguageFilter: (enclosingType: ObjectSchemaType, _member: FieldMember | FieldsetState, selectedLanguageIds: string[], parentValue: Record<string, unknown> | undefined, languages: Language[]) => boolean;
-export { AllowedType, ArrayConfig, InternationalizedArrayItem, LANGUAGE_FIELD_NAME, Language, LanguageCallback, LanguageDisplay, PluginConfig, Value, clear, internationalizedArray, internationalizedArrayLanguageFilter, isInternationalizedArrayItemType };
+export declare const internationalizedArrayLanguageFilter: (enclosingType: ObjectSchemaType, _member: FieldMember | FieldsetState, selectedLanguageIds: string[], parentValue: Record<string, unknown> | undefined, languages: Language[]) => boolean;
//# sourceMappingURL=index.d.ts.map
\ No newline at end of file Index: package/dist/migrations/index.d.ts
===================================================================
--- package/dist/migrations/index.d.ts
+++ package/dist/migrations/index.d.ts
@@ -7,9 +7,9 @@
* every matching document. If the object has a `_type` matching
* `internationalizedArray*Value` and is missing the `language` field, it is
* migrated.
*/
-declare function migrateToLanguageField(documentTypes: string[]): {
+export declare function migrateToLanguageField(documentTypes: string[]): {
title: string;
documentTypes: string[];
migrate: {
object<Node extends import("sanity/migrate").JsonObject>(node: Node): import("sanity/migrate").SetOp<Node & {
@@ -25,6 +25,5 @@
} & string);
}> | undefined;
};
};
-export { migrateToLanguageField };
//# sourceMappingURL=index.d.ts.map
\ No newline at end of file