@voltius/plugin-types 0.43.0 → 0.44.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/index.d.ts +8 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -495,10 +495,10 @@ export interface PluginObjectMoveOutcome {
|
|
|
495
495
|
|
|
496
496
|
export interface OmniCommand {
|
|
497
497
|
id: string;
|
|
498
|
-
label:
|
|
498
|
+
label: PluginLabel;
|
|
499
499
|
icon: string;
|
|
500
500
|
keywords?: string[];
|
|
501
|
-
section?:
|
|
501
|
+
section?: PluginLabel;
|
|
502
502
|
/** Optional keyboard shortcut. Format: "ctrl+k", "meta+shift+p". First-registered wins on conflict. */
|
|
503
503
|
keybinding?: string;
|
|
504
504
|
/** ID of a core shortcut to resolve as the hint (reactive, updates when user rebinds). */
|
|
@@ -782,8 +782,13 @@ export interface I18nAPI {
|
|
|
782
782
|
* before rendering anything that resolves keys. */
|
|
783
783
|
register(catalog: PluginI18nCatalog): void;
|
|
784
784
|
/** Resolve `key` against the host's active locale. Falls back to the "en" entry,
|
|
785
|
-
* then to `key` itself (visible, never blank) if neither has it.
|
|
785
|
+
* then to `key` itself (visible, never blank) if neither has it. A numeric
|
|
786
|
+
* `vars.count` picks a plural form the way i18next does: `key_one`, `key_few`,
|
|
787
|
+
* `key_many`… per the locale's CLDR rules, then `key_other`, then `key`. */
|
|
786
788
|
t(key: string, vars?: Record<string, string | number>): string;
|
|
789
|
+
/** A timestamp relative to now in the active locale ("5 minutes ago", "now"),
|
|
790
|
+
* via Intl.RelativeTimeFormat. Call it during render, next to `t()`. */
|
|
791
|
+
formatRelativeTime(time: Date | number): string;
|
|
787
792
|
/** The host's current active locale. */
|
|
788
793
|
getLocale(): PluginLocale;
|
|
789
794
|
/** Fires whenever the host's active locale changes. Re-call `t()` and re-render
|