wp-uikit-cli 1.0.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/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "wp-uikit-cli",
3
+ "version": "1.0.0",
4
+ "description": "⚡ A blazing-fast CLI to scaffold, clean, debug and deploy SF Framework / SF Widget (Elementor) plugin widgets & traits in seconds.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "wordpress",
9
+ "elementor",
10
+ "elementor-widget",
11
+ "cli",
12
+ "scaffold",
13
+ "generator",
14
+ "sf-framework",
15
+ "sf-widget",
16
+ "widget-generator",
17
+ "wp-uikit"
18
+ ],
19
+ "engines": {
20
+ "node": ">=16"
21
+ },
22
+ "bin": {
23
+ "sf": "index.js"
24
+ },
25
+ "files": [
26
+ "index.js",
27
+ "stubs",
28
+ "traits.json",
29
+ "README.md",
30
+ "LICENSE"
31
+ ],
32
+ "dependencies": {
33
+ "adm-zip": "^0.5.16",
34
+ "chalk": "^5.6.2",
35
+ "clean-css": "^5.3.3",
36
+ "commander": "^10.0.0",
37
+ "figlet": "^1.5.2",
38
+ "fs-extra": "^11.0.0",
39
+ "inquirer": "^9.0.0",
40
+ "ora": "^6.0.0",
41
+ "terser": "^5.50.0"
42
+ }
43
+ }
@@ -0,0 +1 @@
1
+ alert('{{WIDGET_NAME}} is loaded');
@@ -0,0 +1,4 @@
1
+
2
+ .sf-{{FILENAME}} {
3
+
4
+ }
@@ -0,0 +1,12 @@
1
+ <?php
2
+ namespace SFWPStudio\Core\Includes\Traits;
3
+
4
+ trait {{TRAITNAME}} {
5
+ public function register_{{TRAITSLUG}}_controls() {
6
+ // Add controls here
7
+ }
8
+
9
+ public function render_{{TRAITSLUG}}() {
10
+ // Add render logic here
11
+ }
12
+ }
@@ -0,0 +1,100 @@
1
+ <?php
2
+ namespace SFWPStudio\Widgets;
3
+
4
+ // Elementor Base
5
+ use Elementor\Widget_Base;
6
+ use Elementor\Controls_Manager;
7
+ use Elementor\Repeater;
8
+
9
+ // Group Controls
10
+ use Elementor\Group_Control_Background;
11
+ use Elementor\Group_Control_Border;
12
+ use Elementor\Group_Control_Box_Shadow;
13
+ use Elementor\Group_Control_Css_Filter;
14
+ use Elementor\Group_Control_Image_Size;
15
+ use Elementor\Group_Control_Text_Shadow;
16
+ use Elementor\Group_Control_Typography;
17
+
18
+ // Media & Icons
19
+ use Elementor\Icons_Manager;
20
+ use Elementor\Control_Media;
21
+
22
+ // Other Control Types
23
+ use Elementor\Control_Select2;
24
+ use Elementor\Control_Slider;
25
+ use Elementor\Control_Switcher;
26
+ use Elementor\Control_Heading;
27
+ use Elementor\Control_Textarea;
28
+ use Elementor\Control_Number;
29
+ use Elementor\Control_Dimensions;
30
+ use Elementor\Control_Color;
31
+ use Elementor\Control_Gallery;
32
+ use Elementor\Control_Date_Time;
33
+ use Elementor\Control_Code;
34
+
35
+ // Schemes
36
+ use Elementor\Core\Schemes\Color;
37
+ use Elementor\Core\Schemes\Typography;
38
+
39
+ // Utilities & Core
40
+ use Elementor\Utils;
41
+ use Elementor\Plugin;
42
+ use Elementor\Core\Base\Document;
43
+ use Elementor\Core\Responsive\Responsive;
44
+ use Elementor\Core\Kits\Documents\Kit;
45
+ use Elementor\Core\Settings\Manager;
46
+
47
+ if (!defined('ABSPATH')) exit;
48
+
49
+ class {{CLASSNAME}} extends Widget_Base {
50
+ {{TRAIT_IMPORTS}}
51
+
52
+ public function get_name() {
53
+ return '{{SLUG}}';
54
+ }
55
+
56
+ public function get_title() {
57
+ return esc_html__('{{WIDGET_NAME}}', 'sf-widgets');
58
+ }
59
+
60
+ public function get_icon() {
61
+ return 'sf-wt-badge sf-widget-icon-{{ICON}}';
62
+ }
63
+
64
+ public function get_keywords() {
65
+ return ['sf', '{{WIDGET_NAME}}'];
66
+ }
67
+
68
+ {{STYLE_DEPENDS}}
69
+ {{SCRIPT_DEPENDS}}
70
+
71
+ public function get_categories() {
72
+ return ['syncfusion-widgets'];
73
+ }
74
+
75
+ public function is_dynamic_content(): bool {
76
+ return false;
77
+ }
78
+
79
+ protected function register_controls() {
80
+ {{TRAIT_CONTROLS}}
81
+ }
82
+
83
+ protected function render() {
84
+ echo '<div class="ekit-wid-con {{SLUG}}-wid-con">';
85
+ $this->render_raw();
86
+ echo '</div>';
87
+ }
88
+
89
+ protected function render_raw() {
90
+ $settings = $this->get_settings_for_display();
91
+
92
+ echo '<div class="sf-{{FILENAME}}" style="background: linear-gradient(135deg, #f61067, #5e239d,#00f0b5);padding: 2rem;border-radius: 12px;color: #fff; text-align: center;">';
93
+ echo '<h1 style="font-size: 2.5rem;margin: 0;font-weight: 700;letter-spacing: 1px;">Happy Hacking</h1>';
94
+ echo '<p>This widget was generated with ❤️ by <strong>WP-UIkit</strong>.</p>';
95
+ {{TRAIT_RENDER}}
96
+ echo '</div>';
97
+ }
98
+ }
99
+
100
+
package/traits.json ADDED
@@ -0,0 +1,22 @@
1
+ [
2
+ "AvatarTrait",
3
+ "BadgeTrait",
4
+ "ButtonTrait",
5
+ "DescriptionTrait",
6
+ "FancyAnimatedTextTrait",
7
+ "HeaderTrait",
8
+ "HeadingTrait",
9
+ "HtmlSnippetTrait",
10
+ "InsideRepeaterBadgeTrait",
11
+ "ListTrait",
12
+ "ParagraphTrait",
13
+ "ProgressbarTrait",
14
+ "RatingTrait",
15
+ "RepeaterAvatarTrait",
16
+ "RepeaterBadgeInsideRepeaterTrait",
17
+ "RepeaterBadgeTrait",
18
+ "RepeaterButtonTrait",
19
+ "RepeaterListTrait",
20
+ "RepeaterRadialProgressbarTrait",
21
+ "RepeaterRatingTrait"
22
+ ]