@designbasekorea/figma-ui 0.6.6 → 0.6.9

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/index.d.ts CHANGED
@@ -9,6 +9,7 @@ type I18nText = string | {
9
9
  values?: Record<string, any>;
10
10
  };
11
11
  type TFunctionLite = (key: string, values?: Record<string, any>) => string;
12
+ declare function interpolateText(template: string, values?: Record<string, unknown>): string;
12
13
  declare function resolveText(t: TFunctionLite | undefined, input: I18nText | undefined, fallback?: string): string | undefined;
13
14
 
14
15
  interface DonationBadgeProps {
@@ -141,7 +142,11 @@ interface LogoDropdownProps {
141
142
  links?: LogoDropdownLink[];
142
143
  position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
143
144
  className?: string;
144
- t?: (key: string) => string;
145
+ t?: TFunctionLite;
146
+ showLanguageSelector?: boolean;
147
+ languages?: Language[];
148
+ currentLanguage?: string;
149
+ onLanguageChange?: (languageCode: string) => void;
145
150
  }
146
151
  declare const LogoDropdown: React.FC<LogoDropdownProps>;
147
152
 
@@ -241,7 +246,22 @@ interface InteractionFeedbackProps {
241
246
  }
242
247
  declare const InteractionFeedback: React.FC<InteractionFeedbackProps>;
243
248
 
249
+ interface LanguageSettingsModalProps {
250
+ isOpen: boolean;
251
+ onClose: () => void;
252
+ languages?: Language[];
253
+ currentLanguage?: string;
254
+ onLanguageChange?: (languageCode: string) => void;
255
+ title?: string;
256
+ description?: string;
257
+ className?: string;
258
+ t?: TFunctionLite;
259
+ }
260
+ declare const LanguageSettingsModal: React.FC<LanguageSettingsModalProps>;
261
+
244
262
  interface LicenseOfferProps {
263
+ joinUrl?: string;
264
+ guideUrl?: string;
245
265
  membershipUrl?: string;
246
266
  t?: TFunctionLite;
247
267
  className?: string;
@@ -305,6 +325,8 @@ interface LicensePageState {
305
325
  usageReason?: 'USAGE_LIMIT_REACHED' | 'FEATURE_NOT_ALLOWED';
306
326
  lastMessage?: string;
307
327
  lastErrorCode?: string;
328
+ deactivateMessage?: string;
329
+ deactivateErrorCode?: string;
308
330
  licenseStatus?: string;
309
331
  licenseSource?: string;
310
332
  accessScope?: string;
@@ -368,6 +390,7 @@ interface PaymentBadgeProps {
368
390
  }
369
391
  declare const PaymentBadge: React.FC<PaymentBadgeProps>;
370
392
 
393
+ type PaymentActionFeedbackVariant = 'success' | 'error' | 'info' | 'warning';
371
394
  interface PaymentStatusSectionProps {
372
395
  status: 'PAID' | 'FREE' | 'UNPAID';
373
396
  usageCount?: number;
@@ -377,9 +400,13 @@ interface PaymentStatusSectionProps {
377
400
  onDeactivate: () => void;
378
401
  isDeactivating?: boolean;
379
402
  showDetails?: boolean;
403
+ actionMessage?: I18nText;
404
+ actionMessageVariant?: PaymentActionFeedbackVariant;
405
+ errorCode?: string;
380
406
  className?: string;
381
407
  t?: TFunctionLite;
382
408
  }
409
+ declare function resolvePaymentFeedbackVariant(errorCode?: string, explicitVariant?: PaymentActionFeedbackVariant): PaymentActionFeedbackVariant;
383
410
  declare const PaymentStatusSection: React.FC<PaymentStatusSectionProps>;
384
411
 
385
412
  interface ProgressModalProgress {
@@ -474,5 +501,19 @@ interface UpgradeBannerProps {
474
501
  }
475
502
  declare const UpgradeBanner: React.FC<UpgradeBannerProps>;
476
503
 
477
- export { DEFAULT_LICENSE_MESSAGE_TYPES, DonationBadge, FigmaContainer, FigmaFooter, FigmaHeader, FigmaPageHead, FigmaSection, FigmaSidebar, FigmaToast, FigmaToastProvider, FormWithSubmit, InteractionFeedback, LanguageSelector, LicenseOffer, LicenseStatusCard, LogoDropdown, PageLicense, PaymentBadge, PaymentStatusSection, PricingComparison, ProgressModal, ResizablePlugin, START_DESIGNBASE_AUTH_MESSAGE, SettingsModal, TitleDescription, UpgradeBanner, getActiveSection, resolveText, scrollToSection, useFigmaLicenseBridge, useFigmaToast, useToast };
478
- export type { DonationBadgeProps, FeedbackStatus, FigmaContainerProps, FigmaContainerSize, FigmaFooterProps, FigmaHeaderAction, FigmaHeaderProps, FigmaPageHeadAction, FigmaPageHeadProps, FigmaSectionProps, FigmaSidebarProps, FormWithSubmitProps, I18nText, InteractionFeedbackProps, Language, LanguageSelectorProps, LicenseOfferProps, LicensePageState, LicenseStatusCardProps, LogoDropdownLink, LogoDropdownProps, PageLicenseProps, PaymentBadgeProps, PaymentStatusSectionProps, PlanPricing, PricingComparisonProps, PricingFeature, ProgressModalProgress, ProgressModalProps, ResizablePluginProps, SettingsCategory, SettingsCategoryGroup, SettingsModalProps, TFunctionLite, TitleDescriptionProps, UpgradeBannerProps, WordPressLinks };
504
+ type UsagePaymentStatus = 'PAID' | 'FREE' | 'TRIAL' | 'BETA';
505
+ interface UsageStatusPopoverProps {
506
+ paymentStatus: UsagePaymentStatus;
507
+ usageCount?: number;
508
+ maxDailyUsage?: number;
509
+ showUsage?: boolean;
510
+ showPlan?: boolean;
511
+ isLoading?: boolean;
512
+ onLicensePageClick?: () => void;
513
+ t?: TFunctionLite;
514
+ className?: string;
515
+ }
516
+ declare const UsageStatusPopover: React.FC<UsageStatusPopoverProps>;
517
+
518
+ export { DEFAULT_LICENSE_MESSAGE_TYPES, DonationBadge, FigmaContainer, FigmaFooter, FigmaHeader, FigmaPageHead, FigmaSection, FigmaSidebar, FigmaToast, FigmaToastProvider, FormWithSubmit, InteractionFeedback, LanguageSelector, LanguageSettingsModal, LicenseOffer, LicenseStatusCard, LogoDropdown, PageLicense, PaymentBadge, PaymentStatusSection, PricingComparison, ProgressModal, ResizablePlugin, START_DESIGNBASE_AUTH_MESSAGE, SettingsModal, TitleDescription, UpgradeBanner, UsageStatusPopover, getActiveSection, interpolateText, resolvePaymentFeedbackVariant, resolveText, scrollToSection, useFigmaLicenseBridge, useFigmaToast, useToast };
519
+ export type { DonationBadgeProps, FeedbackStatus, FigmaContainerProps, FigmaContainerSize, FigmaFooterProps, FigmaHeaderAction, FigmaHeaderProps, FigmaPageHeadAction, FigmaPageHeadProps, FigmaSectionProps, FigmaSidebarProps, FormWithSubmitProps, I18nText, InteractionFeedbackProps, Language, LanguageSelectorProps, LanguageSettingsModalProps, LicenseOfferProps, LicensePageState, LicenseStatusCardProps, LogoDropdownLink, LogoDropdownProps, PageLicenseProps, PaymentActionFeedbackVariant, PaymentBadgeProps, PaymentStatusSectionProps, PlanPricing, PricingComparisonProps, PricingFeature, ProgressModalProgress, ProgressModalProps, ResizablePluginProps, SettingsCategory, SettingsCategoryGroup, SettingsModalProps, TFunctionLite, TitleDescriptionProps, UpgradeBannerProps, UsagePaymentStatus, UsageStatusPopoverProps, WordPressLinks };