@imgly/plugin-ai-generation-web 0.2.14 → 0.2.16

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.
@@ -1,4 +1,26 @@
1
1
  import type CreativeEditorSDK from '@cesdk/cesdk-js';
2
+ type TranslationDefinition = Partial<Record<string, Partial<Record<string, string>>>>;
3
+ /**
4
+ * Sets default translations only for keys that don't already exist.
5
+ *
6
+ * This allows integrators to set custom translations BEFORE plugins load,
7
+ * and the plugins won't override those custom values with their defaults.
8
+ *
9
+ * @param cesdk - The CE.SDK instance
10
+ * @param definition - The translations to set (same format as setTranslations)
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * // Integrator sets custom translation BEFORE plugin loads
15
+ * cesdk.i18n.setTranslations({ en: { 'my.key': 'Custom Value' } });
16
+ *
17
+ * // Plugin uses setDefaultTranslations - won't override 'my.key'
18
+ * setDefaultTranslations(cesdk, { en: { 'my.key': 'Default Value', 'other.key': 'Other' } });
19
+ *
20
+ * // Result: 'my.key' = 'Custom Value', 'other.key' = 'Other'
21
+ * ```
22
+ */
23
+ export declare function setDefaultTranslations(cesdk: CreativeEditorSDK, definition: TranslationDefinition): void;
2
24
  /**
3
25
  * Creates a translation callback function for AI asset sources
4
26
  * @param cesdk - The CE.SDK instance
@@ -17,3 +39,4 @@ export declare function createTranslationCallback(cesdk: CreativeEditorSDK, mode
17
39
  * @returns Array of translation keys in fallback order
18
40
  */
19
41
  export declare function buildTranslationKeys(modelKey: string, propertyName: string, value: string, pluginType?: string): string[];
42
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imgly/plugin-ai-generation-web",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "AI generation plugin for the CE.SDK editor",
5
5
  "keywords": [
6
6
  "CE.SDK",