@elementor/editor-variables 3.33.0-98 → 3.35.0-324
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.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +1903 -809
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1850 -747
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -14
- package/src/api.ts +24 -0
- package/src/batch-operations.ts +86 -0
- package/src/components/fields/color-field.tsx +1 -0
- package/src/components/fields/font-field.tsx +2 -1
- package/src/components/fields/label-field.tsx +42 -6
- package/src/components/ui/deleted-variable-alert.tsx +14 -10
- package/src/components/ui/{no-variables.tsx → empty-state.tsx} +8 -13
- package/src/components/ui/menu-item-content.tsx +14 -11
- package/src/components/ui/mismatch-variable-alert.tsx +5 -9
- package/src/components/ui/missing-variable-alert.tsx +8 -9
- package/src/components/ui/no-search-results.tsx +1 -2
- package/src/components/ui/tags/assigned-tag.tsx +6 -3
- package/src/components/ui/tags/warning-variable-tag.tsx +44 -0
- package/src/components/ui/variable/deleted-variable.tsx +13 -6
- package/src/components/ui/variable/mismatch-variable.tsx +11 -4
- package/src/components/ui/variable/missing-variable.tsx +2 -2
- package/src/components/variable-creation.tsx +13 -4
- package/src/components/variable-edit.tsx +12 -12
- package/src/components/variable-restore.tsx +3 -2
- package/src/components/variables-manager/hooks/use-auto-edit.ts +21 -0
- package/src/components/variables-manager/hooks/use-error-navigation.ts +49 -0
- package/src/components/variables-manager/hooks/use-variables-manager-state.ts +89 -0
- package/src/components/variables-manager/variable-editable-cell.tsx +131 -67
- package/src/components/variables-manager/variables-manager-create-menu.tsx +118 -0
- package/src/components/variables-manager/variables-manager-panel.tsx +290 -59
- package/src/components/variables-manager/variables-manager-table.tsx +124 -14
- package/src/components/variables-selection.tsx +61 -15
- package/src/controls/variable-control.tsx +1 -1
- package/src/hooks/use-prop-variables.ts +28 -9
- package/src/hooks/use-variable-bound-prop.ts +42 -0
- package/src/index.ts +1 -0
- package/src/init.ts +9 -6
- package/src/mcp/create-variable-tool.ts +70 -0
- package/src/mcp/delete-variable-tool.ts +50 -0
- package/src/mcp/index.ts +17 -0
- package/src/mcp/list-variables-tool.ts +58 -0
- package/src/mcp/update-variable-tool.ts +81 -0
- package/src/mcp/variables-resource.ts +28 -0
- package/src/register-variable-types.tsx +4 -0
- package/src/service.ts +60 -1
- package/src/storage.ts +8 -0
- package/src/types.ts +1 -0
- package/src/utils/filter-by-search.ts +5 -0
- package/src/utils/tracking.ts +37 -22
- package/src/utils/unlink-variable.ts +1 -1
- package/src/utils/validations.ts +72 -3
- package/src/variables-registry/create-variable-type-registry.ts +20 -8
- package/src/variables-registry/variable-type-registry.ts +2 -1
- package/src/components/ui/tags/deleted-tag.tsx +0 -37
- package/src/components/ui/tags/mismatch-tag.tsx +0 -37
- package/src/components/ui/tags/missing-tag.tsx +0 -25
- /package/src/components/variables-manager/{variable-edit-menu.tsx → ui/variable-edit-menu.tsx} +0 -0
- /package/src/components/variables-manager/{variable-table-cell.tsx → ui/variable-table-cell.tsx} +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AlertTriangleFilledIcon } from '@elementor/icons';
|
|
3
|
-
import { Box, Chip, type ChipProps, type Theme, Tooltip, Typography } from '@elementor/ui';
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
5
|
-
|
|
6
|
-
export const MismatchTag = React.forwardRef< HTMLDivElement, ChipProps >( ( { label, onClick, ...props }, ref ) => {
|
|
7
|
-
return (
|
|
8
|
-
<Chip
|
|
9
|
-
ref={ ref }
|
|
10
|
-
size="tiny"
|
|
11
|
-
color="warning"
|
|
12
|
-
shape="rounded"
|
|
13
|
-
variant="standard"
|
|
14
|
-
onClick={ onClick }
|
|
15
|
-
icon={ <AlertTriangleFilledIcon /> }
|
|
16
|
-
label={
|
|
17
|
-
<Tooltip title={ label } placement="top">
|
|
18
|
-
<Box sx={ { display: 'flex', gap: 0.5, alignItems: 'center' } }>
|
|
19
|
-
<Typography variant="caption" noWrap>
|
|
20
|
-
{ label }
|
|
21
|
-
</Typography>
|
|
22
|
-
<Typography variant="caption" noWrap sx={ { textOverflow: 'initial', overflow: 'visible' } }>
|
|
23
|
-
({ __( 'changed', 'elementor' ) })
|
|
24
|
-
</Typography>
|
|
25
|
-
</Box>
|
|
26
|
-
</Tooltip>
|
|
27
|
-
}
|
|
28
|
-
sx={ {
|
|
29
|
-
height: ( theme: Theme ) => theme.spacing( 3.5 ),
|
|
30
|
-
borderRadius: ( theme: Theme ) => theme.spacing( 1 ),
|
|
31
|
-
justifyContent: 'flex-start',
|
|
32
|
-
width: '100%',
|
|
33
|
-
} }
|
|
34
|
-
{ ...props }
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
37
|
-
} );
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AlertTriangleFilledIcon } from '@elementor/icons';
|
|
3
|
-
import { Chip, type ChipProps, type Theme } from '@elementor/ui';
|
|
4
|
-
|
|
5
|
-
export const MissingTag = React.forwardRef< HTMLDivElement, ChipProps >( ( { label, onClick, ...props }, ref ) => {
|
|
6
|
-
return (
|
|
7
|
-
<Chip
|
|
8
|
-
ref={ ref }
|
|
9
|
-
size="tiny"
|
|
10
|
-
color="warning"
|
|
11
|
-
shape="rounded"
|
|
12
|
-
variant="standard"
|
|
13
|
-
onClick={ onClick }
|
|
14
|
-
icon={ <AlertTriangleFilledIcon /> }
|
|
15
|
-
label={ label }
|
|
16
|
-
sx={ {
|
|
17
|
-
height: ( theme: Theme ) => theme.spacing( 3.5 ),
|
|
18
|
-
borderRadius: ( theme: Theme ) => theme.spacing( 1 ),
|
|
19
|
-
justifyContent: 'flex-start',
|
|
20
|
-
width: '100%',
|
|
21
|
-
} }
|
|
22
|
-
{ ...props }
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
} );
|
/package/src/components/variables-manager/{variable-edit-menu.tsx → ui/variable-edit-menu.tsx}
RENAMED
|
File without changes
|
/package/src/components/variables-manager/{variable-table-cell.tsx → ui/variable-table-cell.tsx}
RENAMED
|
File without changes
|