@elementor/elementor-one-assets 0.3.11 → 0.4.5

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 CHANGED
@@ -1,12 +1,18 @@
1
1
  /// <reference types="react" />
2
2
  import { SxProps, Theme } from '@elementor/ui/styles';
3
- import { SubscriptionAppType } from 'lib-shared-redux';
4
3
  import * as react from 'react';
5
- import { FC, ReactNode } from 'react';
6
- import { SupportedLanguages } from 'lib-core-i18n';
4
+ import { FC, PropsWithChildren } from 'react';
5
+
6
+ type Slug = 'elementor' | 'elementor-pro' | 'pojo-accessibility' | 'image-optimization' | 'site-mailer' | 'angie' | 'elementor-one';
7
+ type AppSettings = {
8
+ slug: Slug;
9
+ version: string;
10
+ };
7
11
 
8
12
  type HeaderProps = {
9
- appType: SubscriptionAppType;
13
+ appSettings: AppSettings;
14
+ title?: string;
15
+ isWithinWpAdmin?: boolean;
10
16
  multiDelpoymentSlot?: React.ReactNode;
11
17
  colorScheme?: 'light' | 'dark';
12
18
  containerSx?: SxProps<Theme>;
@@ -14,6 +20,7 @@ type HeaderProps = {
14
20
  declare const ElementorOneHeader: React.FC<HeaderProps>;
15
21
 
16
22
  type WhatsNewProps = {
23
+ appSettings: AppSettings;
17
24
  containerSx?: SxProps<Theme>;
18
25
  notificationsApiUrl?: string;
19
26
  onCloseCallback?: () => void;
@@ -25,14 +32,6 @@ type SendFeedbackDialogProps = {
25
32
  open: boolean;
26
33
  colorScheme?: 'light' | 'dark';
27
34
  onClose: () => void;
28
- onSendFeedback: (data: FeedbackFormData) => void;
29
- closeOnSubmit?: boolean;
30
- resetFormOnClose?: boolean;
31
- };
32
- type FeedbackFormData = {
33
- subject: string;
34
- title: string;
35
- description: string;
36
35
  };
37
36
  declare const SendFeedbackDialog: FC<SendFeedbackDialogProps>;
38
37
 
@@ -42,12 +41,30 @@ interface EnvConfig {
42
41
  }
43
42
 
44
43
  declare const ElementorOneAssetsContext: react.Context<EnvConfig>;
45
- interface ElementorOneAssetsProviderProps {
44
+ type ElementorOneAssetsProviderProps = PropsWithChildren<{
45
+ /**
46
+ * Environment configuration for the application.
47
+ * Used to configure API endpoints and other environment-specific settings.
48
+ */
46
49
  env: Environment;
47
- language?: SupportedLanguages;
48
- children: ReactNode;
49
- }
50
+ /**
51
+ * Language code for i18n (e.g., 'en', 'es', 'fr').
52
+ * Defaults to 'en' if not provided.
53
+ * @default 'en'
54
+ */
55
+ language?: string;
56
+ }>;
57
+ /**
58
+ * Provider component for Elementor One Assets package.
59
+ *
60
+ * This provider:
61
+ * - Initializes i18n with the specified language
62
+ * - Configures HTTP client with environment settings
63
+ * - Provides environment configuration via context
64
+ */
50
65
  declare const ElementorOneAssetsProvider: FC<ElementorOneAssetsProviderProps>;
51
66
 
52
- export { ElementorOneAssetsContext, ElementorOneAssetsProvider, ElementorOneHeader, SendFeedbackDialog, WhatsNew };
53
- export type { Environment, FeedbackFormData };
67
+ declare const convertImageToBase64: (imageUrl: string) => Promise<string>;
68
+
69
+ export { ElementorOneAssetsContext, ElementorOneAssetsProvider, ElementorOneHeader, SendFeedbackDialog, WhatsNew, convertImageToBase64 };
70
+ export type { Environment };