@elementor/elementor-one-assets 0.4.7 → 0.4.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/index.d.ts +1 -1
- package/package.json +4 -4
- package/README.md +0 -72
package/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { SxProps, Theme } from '@elementor/ui/styles';
|
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { FC, PropsWithChildren } from 'react';
|
|
5
5
|
|
|
6
|
-
type Slug = 'elementor' | 'elementor-pro' | 'ally' | 'image-optimization' | 'site-mailer' | 'angie' | 'elementor-
|
|
6
|
+
type Slug = 'elementor' | 'elementor-pro' | 'ally' | 'image-optimization' | 'site-mailer' | 'angie' | 'elementor-home';
|
|
7
7
|
type AppSettings = {
|
|
8
8
|
slug: Slug;
|
|
9
9
|
version: string;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/elementor-one-assets",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Elementor One Assets Package",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
7
7
|
"main": "./index.cjs.js",
|
|
8
8
|
"module": "./index.esm.js",
|
|
9
9
|
"types": "./index.d.ts",
|
|
10
|
+
"homepage": "https://elementor.com/",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./index.d.ts",
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
"sideEffects": false,
|
|
18
19
|
"repository": {
|
|
19
20
|
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/elementor/
|
|
21
|
+
"url": "git+https://github.com/elementor/elementor.git",
|
|
21
22
|
"directory": "packages/elementor-one-assets"
|
|
22
23
|
},
|
|
23
24
|
"publishConfig": {
|
|
@@ -25,14 +26,13 @@
|
|
|
25
26
|
"directory": "dist"
|
|
26
27
|
},
|
|
27
28
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/elementor/
|
|
29
|
+
"url": "https://github.com/elementor/elementor/issues"
|
|
29
30
|
},
|
|
30
31
|
"files": [
|
|
31
32
|
"index.cjs.js",
|
|
32
33
|
"index.esm.js",
|
|
33
34
|
"index.d.ts",
|
|
34
35
|
"locales",
|
|
35
|
-
"README.md",
|
|
36
36
|
"package.json"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
package/README.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# @elementor/elementor-one-assets
|
|
2
|
-
|
|
3
|
-
A publishable npm package containing shared UI components and utilities for Elementor projects.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @elementor/elementor-one-assets --legacy-peer-dependencies
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
### ElementorOneAssetsProvider
|
|
16
|
-
|
|
17
|
-
The `ElementorOneAssetsProvider` is a context provider that initializes the package's core functionality. It should wrap your application or the components that use this package.
|
|
18
|
-
|
|
19
|
-
**Basic Example:**
|
|
20
|
-
|
|
21
|
-
```tsx
|
|
22
|
-
import { ElementorOneAssetsProvider, Environment } from '@elementor/elementor-one-assets';
|
|
23
|
-
|
|
24
|
-
function App() {
|
|
25
|
-
return <ElementorOneAssetsProvider env={'staging' as Environment}>{/* Your app components */}</ElementorOneAssetsProvider>;
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**Props:**
|
|
30
|
-
|
|
31
|
-
| Prop | Type | Required | Default | Description |
|
|
32
|
-
| ---------- | ------------------------------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
-
| `env` | `'local' \| 'development' \| 'staging' \| 'production'` | Yes | - | Environment configuration for API endpoints and other environment-specific settings. **Note:** The `'local'` environment uses staging API endpoints (`my.stg.elementor.red`) |
|
|
34
|
-
| `language` | `string` | No | `'en'` | Language code for i18n (e.g., 'en', 'es', 'fr', 'de', 'he-IL') |
|
|
35
|
-
| `isRTL` | `boolean` | No | `false` | Right-to-left orientation flag. Determines the text direction and layout orientation. |
|
|
36
|
-
|
|
37
|
-
**Features:**
|
|
38
|
-
|
|
39
|
-
- Initializes i18n with the specified language
|
|
40
|
-
- Configures HTTP client with environment settings
|
|
41
|
-
- Provides environment configuration via context (`ElementorOneAssetsContext`)
|
|
42
|
-
- Applies scoped styles for package components
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
### ElementorOneHeader
|
|
47
|
-
|
|
48
|
-
The `ElementorOneHeader` component provides a standardized header for Elementor One applications with logo, title, help link, feedback dialog, and user info.
|
|
49
|
-
|
|
50
|
-
**Basic Example:**
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
import { ElementorOneHeader } from '@elementor/elementor-one-assets';
|
|
54
|
-
|
|
55
|
-
function App() {
|
|
56
|
-
return (
|
|
57
|
-
<>
|
|
58
|
-
<ElementorOneHeader appSettings={{ slug: 'elementor-pro', version: '1.0.0' }} />
|
|
59
|
-
{/* Rest of your app */}
|
|
60
|
-
</>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**Props:**
|
|
66
|
-
|
|
67
|
-
| Prop | Type | Required | Default | Description |
|
|
68
|
-
| ----------------- | ---------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
69
|
-
| `appSettings` | `AppSettings` | Yes | - | Application settings object containing `slug` and `version`. Supported slug values: `'elementor'`, `'elementor-pro'`, `'pojo-accessibility'`, `'image-optimization'`, `'site-mailer'`, `'angie'` |
|
|
70
|
-
| `title` | `string` | No | - | Custom title to display next to the logo. If not provided, uses the default translated title from i18n |
|
|
71
|
-
| `isWithinWpAdmin` | `boolean` | No | `true` | When `true`, adjusts the header positioning and drawer behavior for WordPress admin context |
|
|
72
|
-
| `containerSx` | `SxProps<Theme>` | No | `{}` | MUI `sx` prop for custom styling of the AppBar container. Useful for positioning |
|