@amityco/ui-kit-open-source 4.15.0-beta.9 → 4.16.0
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/dist/esm/index.css +1 -1
- package/dist/esm/index.js +765 -761
- package/dist/index.css +1 -1
- package/dist/index.d.mts +38 -2
- package/dist/index.d.ts +38 -2
- package/dist/index.js +898 -894
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,24 @@ import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
import { AnalyticsSourceTypeEnum, FeedSourceEnum } from '@amityco/ts-sdk';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* UIKit v4 — String Resolution Chain (Levels 2–5)
|
|
9
|
+
*
|
|
10
|
+
* Implements the priority chain from the UIKit Cross-Platform Localization Spec §1:
|
|
11
|
+
*
|
|
12
|
+
* Level 1: Config text (remote) — handled by useAmityElement / CustomizationProvider
|
|
13
|
+
* Level 2: Programmatic override — setStringOverrides / clearStringOverrides
|
|
14
|
+
* Level 3: Locale bundle — setLocaleBundle / clearLocaleBundle
|
|
15
|
+
* Level 4: Library default — defaultLocaleBundle (auto-generated en.ts)
|
|
16
|
+
* Level 5: Key name fallback — returns the raw key string
|
|
17
|
+
*
|
|
18
|
+
* Usage:
|
|
19
|
+
* import { resolveString } from '~/v4/core/localization/resolveString';
|
|
20
|
+
* const text = resolveString('amity_social_create_post');
|
|
21
|
+
* const text = resolveString('amity_social_items_count', 42); // format arg
|
|
22
|
+
*/
|
|
23
|
+
type LocaleBundle = Record<string, string>;
|
|
24
|
+
|
|
7
25
|
type AmityReactionType = {
|
|
8
26
|
name: string;
|
|
9
27
|
image: string;
|
|
@@ -342,8 +360,8 @@ type UpcomingEventsPageProps = UpcomingEventsProps;
|
|
|
342
360
|
declare function UpcomingEventsPage({ fromExplore }: UpcomingEventsPageProps): react_jsx_runtime.JSX.Element;
|
|
343
361
|
|
|
344
362
|
declare const enum UserRelationshipPageTabs {
|
|
345
|
-
FOLLOWING = "
|
|
346
|
-
FOLLOWER = "
|
|
363
|
+
FOLLOWING = "Following",
|
|
364
|
+
FOLLOWER = "Follower"
|
|
347
365
|
}
|
|
348
366
|
type UserRelationshipPageProps = {
|
|
349
367
|
userId: string;
|
|
@@ -786,6 +804,24 @@ interface AmityUIKitProviderProps {
|
|
|
786
804
|
seoOptimizationEnabled?: boolean;
|
|
787
805
|
syncNetworkConfig?: boolean;
|
|
788
806
|
onEmptyNavigationStack?: () => void;
|
|
807
|
+
/**
|
|
808
|
+
* Localization configuration for the UIKit.
|
|
809
|
+
* - `localeBundle`: initial Level 3 locale bundle (key → translated string)
|
|
810
|
+
* - `overrides`: initial Level 2 programmatic overrides (merge with locale)
|
|
811
|
+
* - `localeMap`: map of locale code → bundle for automatic device-language detection.
|
|
812
|
+
* When `localeBundle` is not set the provider checks `navigator.language` against
|
|
813
|
+
* this map (exact match, then language-prefix). Falls back to English if no match.
|
|
814
|
+
*
|
|
815
|
+
* @example
|
|
816
|
+
* localization={{ localeBundle: jaLocale }}
|
|
817
|
+
* @example
|
|
818
|
+
* localization={{ localeMap: { ja: jaLocale, th: thLocale } }}
|
|
819
|
+
*/
|
|
820
|
+
localization?: {
|
|
821
|
+
localeBundle?: LocaleBundle;
|
|
822
|
+
overrides?: LocaleBundle;
|
|
823
|
+
localeMap?: Record<string, LocaleBundle>;
|
|
824
|
+
};
|
|
789
825
|
}
|
|
790
826
|
declare const AmityUIKitProvider: React.FC<AmityUIKitProviderProps>;
|
|
791
827
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,24 @@ import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
import { AnalyticsSourceTypeEnum, FeedSourceEnum } from '@amityco/ts-sdk';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* UIKit v4 — String Resolution Chain (Levels 2–5)
|
|
9
|
+
*
|
|
10
|
+
* Implements the priority chain from the UIKit Cross-Platform Localization Spec §1:
|
|
11
|
+
*
|
|
12
|
+
* Level 1: Config text (remote) — handled by useAmityElement / CustomizationProvider
|
|
13
|
+
* Level 2: Programmatic override — setStringOverrides / clearStringOverrides
|
|
14
|
+
* Level 3: Locale bundle — setLocaleBundle / clearLocaleBundle
|
|
15
|
+
* Level 4: Library default — defaultLocaleBundle (auto-generated en.ts)
|
|
16
|
+
* Level 5: Key name fallback — returns the raw key string
|
|
17
|
+
*
|
|
18
|
+
* Usage:
|
|
19
|
+
* import { resolveString } from '~/v4/core/localization/resolveString';
|
|
20
|
+
* const text = resolveString('amity_social_create_post');
|
|
21
|
+
* const text = resolveString('amity_social_items_count', 42); // format arg
|
|
22
|
+
*/
|
|
23
|
+
type LocaleBundle = Record<string, string>;
|
|
24
|
+
|
|
7
25
|
type AmityReactionType = {
|
|
8
26
|
name: string;
|
|
9
27
|
image: string;
|
|
@@ -342,8 +360,8 @@ type UpcomingEventsPageProps = UpcomingEventsProps;
|
|
|
342
360
|
declare function UpcomingEventsPage({ fromExplore }: UpcomingEventsPageProps): react_jsx_runtime.JSX.Element;
|
|
343
361
|
|
|
344
362
|
declare const enum UserRelationshipPageTabs {
|
|
345
|
-
FOLLOWING = "
|
|
346
|
-
FOLLOWER = "
|
|
363
|
+
FOLLOWING = "Following",
|
|
364
|
+
FOLLOWER = "Follower"
|
|
347
365
|
}
|
|
348
366
|
type UserRelationshipPageProps = {
|
|
349
367
|
userId: string;
|
|
@@ -786,6 +804,24 @@ interface AmityUIKitProviderProps {
|
|
|
786
804
|
seoOptimizationEnabled?: boolean;
|
|
787
805
|
syncNetworkConfig?: boolean;
|
|
788
806
|
onEmptyNavigationStack?: () => void;
|
|
807
|
+
/**
|
|
808
|
+
* Localization configuration for the UIKit.
|
|
809
|
+
* - `localeBundle`: initial Level 3 locale bundle (key → translated string)
|
|
810
|
+
* - `overrides`: initial Level 2 programmatic overrides (merge with locale)
|
|
811
|
+
* - `localeMap`: map of locale code → bundle for automatic device-language detection.
|
|
812
|
+
* When `localeBundle` is not set the provider checks `navigator.language` against
|
|
813
|
+
* this map (exact match, then language-prefix). Falls back to English if no match.
|
|
814
|
+
*
|
|
815
|
+
* @example
|
|
816
|
+
* localization={{ localeBundle: jaLocale }}
|
|
817
|
+
* @example
|
|
818
|
+
* localization={{ localeMap: { ja: jaLocale, th: thLocale } }}
|
|
819
|
+
*/
|
|
820
|
+
localization?: {
|
|
821
|
+
localeBundle?: LocaleBundle;
|
|
822
|
+
overrides?: LocaleBundle;
|
|
823
|
+
localeMap?: Record<string, LocaleBundle>;
|
|
824
|
+
};
|
|
789
825
|
}
|
|
790
826
|
declare const AmityUIKitProvider: React.FC<AmityUIKitProviderProps>;
|
|
791
827
|
|