layerpro 0.8.5 → 0.9.2

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.
@@ -0,0 +1,115 @@
1
+ # Code of Conduct - layerpro
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to make participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behaviour that contributes to a positive environment for our
15
+ community include:
16
+
17
+ * Demonstrating empathy and kindness toward other people
18
+ * Being respectful of differing opinions, viewpoints, and experiences
19
+ * Giving and gracefully accepting constructive feedback
20
+ * Accepting responsibility and apologising to those affected by our mistakes,
21
+ and learning from the experience
22
+ * Focusing on what is best not just for us as individuals, but for the
23
+ overall community
24
+
25
+ Examples of unacceptable behaviour include:
26
+
27
+ * The use of sexualised language or imagery, and sexual attention or advances
28
+ * Trolling, insulting or derogatory comments, and personal or political attacks
29
+ * Public or private harassment
30
+ * Publishing others' private information, such as a physical or email
31
+ address, without their explicit permission
32
+ * Other conduct which could reasonably be considered inappropriate in a
33
+ professional setting
34
+
35
+ ## Our Responsibilities
36
+
37
+ Project maintainers are responsible for clarifying and enforcing our standards of
38
+ acceptable behaviour and will take appropriate and fair corrective action in
39
+ response to any behaviour that they deem inappropriate,
40
+ threatening, offensive, or harmful.
41
+
42
+ Project maintainers have the right and responsibility to remove, edit, or reject
43
+ comments, commits, code, wiki edits, issues, and other contributions that are
44
+ not aligned to this Code of Conduct, and will
45
+ communicate reasons for moderation decisions when appropriate.
46
+
47
+ ## Scope
48
+
49
+ This Code of Conduct applies within all community spaces, and also applies when
50
+ an individual is officially representing the community in public spaces.
51
+ Examples of representing our community include using an official e-mail address,
52
+ posting via an official social media account, or acting as an appointed
53
+ representative at an online or offline event.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behaviour may be
58
+ reported to the community leaders responsible for enforcement at <dariopassariello@gmail.com>.
59
+ All complaints will be reviewed and investigated promptly and fairly.
60
+
61
+ All community leaders are obligated to respect the privacy and security of the
62
+ reporter of any incident.
63
+
64
+ ## Enforcement Guidelines
65
+
66
+ Community leaders will follow these Community Impact Guidelines in determining
67
+ the consequences for any action they deem in violation of this Code of Conduct:
68
+
69
+ ### 1. Correction
70
+
71
+ **Community Impact**: Use of inappropriate language or other behaviour deemed
72
+ unprofessional or unwelcome in the community.
73
+
74
+ **Consequence**: A private, written warning from community leaders, providing
75
+ clarity around the nature of the violation and an explanation of why the
76
+ behaviour was inappropriate. A public apology may be requested.
77
+
78
+ ### 2. Warning
79
+
80
+ **Community Impact**: A violation through a single incident or series
81
+ of actions.
82
+
83
+ **Consequence**: A warning with consequences for continued behaviour. No
84
+ interaction with the people involved, including unsolicited interaction with
85
+ those enforcing the Code of Conduct, for a specified period of time. This
86
+ includes avoiding interactions in community spaces as well as external channels
87
+ like social media. Violating these terms may lead to a temporary or
88
+ permanent ban.
89
+
90
+ ### 3. Temporary Ban
91
+
92
+ **Community Impact**: A serious violation of community standards, including
93
+ sustained inappropriate behaviour.
94
+
95
+ **Consequence**: A temporary ban from any sort of interaction or public
96
+ communication with the community for a specified period of time. No public or
97
+ private interaction with the people involved, including unsolicited interaction
98
+ with those enforcing the Code of Conduct, is allowed during this period.
99
+ Violating these terms may lead to a permanent ban.
100
+
101
+ ### 4. Permanent Ban
102
+
103
+ **Community Impact**: Demonstrating a pattern of violation of community
104
+ standards, including sustained inappropriate behaviour, harassment of an
105
+ individual, or aggression toward or disparagement of classes of individuals.
106
+
107
+ **Consequence**: A permanent ban from any sort of public interaction within
108
+ the community.
109
+
110
+ ## Attribution
111
+
112
+ This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
113
+ [1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
114
+ [2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md),
115
+ and was generated by [contributing.md](https://contributing.md/generator).
@@ -0,0 +1,159 @@
1
+ <!-- omit in toc -->
2
+ # Contributing to layerpro
3
+
4
+ First off, thanks for taking the time to contribute! ❤️
5
+
6
+ All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
7
+
8
+ > And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
9
+ > - Star the project
10
+ > - Tweet about it
11
+ > - Refer this project in your project's readme
12
+ > - Mention the project at local meetups and tell your friends/colleagues
13
+
14
+ <!-- omit in toc -->
15
+ ## Table of Contents
16
+
17
+ - [Code of Conduct](#code-of-conduct)
18
+ - [I Have a Question](#i-have-a-question)
19
+ - [I Want To Contribute](#i-want-to-contribute)
20
+ - [Reporting Bugs](#reporting-bugs)
21
+ - [Suggesting Enhancements](#suggesting-enhancements)
22
+ - [Your First Code Contribution](#your-first-code-contribution)
23
+ - [Improving The Documentation](#improving-the-documentation)
24
+ - [Styleguides](#styleguides)
25
+ - [Commit Messages](#commit-messages)
26
+ - [Join The Project Team](#join-the-project-team)
27
+
28
+
29
+ ## Code of Conduct
30
+
31
+ This project and everyone participating in it is governed by the
32
+ [layerpro Code of Conduct](https://github.com/passariello/layerpro/blob//CODE_OF_CONDUCT.md).
33
+ By participating, you are expected to uphold this code. Please report unacceptable behavior
34
+ to <dariopassariello@gmail.com>.
35
+
36
+
37
+ ## I Have a Question
38
+
39
+ > If you want to ask a question, we assume that you have read the available [Documentation](https://passariello.github.io/layerPro/).
40
+
41
+ Before you ask a question, it is best to search for existing [Issues](https://github.com/passariello/layerpro/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
42
+
43
+ If you then still feel the need to ask a question and need clarification, we recommend the following:
44
+
45
+ - Open an [Issue](https://github.com/passariello/layerpro/issues/new).
46
+ - Provide as much context as you can about what you're running into.
47
+ - Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
48
+
49
+ We will then take care of the issue as soon as possible.
50
+
51
+ <!--
52
+ You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
53
+
54
+ Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
55
+ - IRC
56
+ - Slack
57
+ - Gitter
58
+ - Stack Overflow tag
59
+ - Blog
60
+ - FAQ
61
+ - Roadmap
62
+ - E-Mail List
63
+ - Forum
64
+ -->
65
+
66
+ ## I Want To Contribute
67
+
68
+ > ### Legal Notice <!-- omit in toc -->
69
+ > When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project licence.
70
+
71
+ ### Reporting Bugs
72
+
73
+ <!-- omit in toc -->
74
+ #### Before Submitting a Bug Report
75
+
76
+ A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
77
+
78
+ - Make sure that you are using the latest version.
79
+ - Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://passariello.github.io/layerPro/). If you are looking for support, you might want to check [this section](#i-have-a-question)).
80
+ - To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/passariello/layerpro/issues?q=label%3Abug).
81
+ - Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
82
+ - Collect information about the bug:
83
+ - Stack trace (Traceback)
84
+ - OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
85
+ - Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
86
+ - Possibly your input and the output
87
+ - Can you reliably reproduce the issue? And can you also reproduce it with older versions?
88
+
89
+ <!-- omit in toc -->
90
+ #### How Do I Submit a Good Bug Report?
91
+
92
+ > You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <dariopassariello@gmail.com>.
93
+ <!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
94
+
95
+ We use GitHub issues to track bugs and errors. If you run into an issue with the project:
96
+
97
+ - Open an [Issue](https://github.com/passariello/layerpro/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
98
+ - Explain the behavior you would expect and the actual behavior.
99
+ - Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
100
+ - Provide the information you collected in the previous section.
101
+
102
+ Once it's filed:
103
+
104
+ - The project team will label the issue accordingly.
105
+ - A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
106
+ - If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
107
+
108
+ <!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
109
+
110
+
111
+ ### Suggesting Enhancements
112
+
113
+ This section guides you through submitting an enhancement suggestion for layerpro, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
114
+
115
+ <!-- omit in toc -->
116
+ #### Before Submitting an Enhancement
117
+
118
+ - Make sure that you are using the latest version.
119
+ - Read the [documentation](https://passariello.github.io/layerPro/) carefully and find out if the functionality is already covered, maybe by an individual configuration.
120
+ - Perform a [search](https://github.com/passariello/layerpro/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
121
+ - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
122
+
123
+ <!-- omit in toc -->
124
+ #### How Do I Submit a Good Enhancement Suggestion?
125
+
126
+ Enhancement suggestions are tracked as [GitHub issues](https://github.com/passariello/layerpro/issues).
127
+
128
+ - Use a **clear and descriptive title** for the issue to identify the suggestion.
129
+ - Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
130
+ - **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
131
+ - You may want to **include screenshots or screen recordings** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [LICEcap](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and the built-in [screen recorder in GNOME](https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en) or [SimpleScreenRecorder](https://github.com/MaartenBaert/ssr) on Linux. <!-- this should only be included if the project has a GUI -->
132
+ - **Explain why this enhancement would be useful** to most layerpro users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
133
+
134
+ <!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
135
+
136
+ <!-- TODO
137
+ ### Your First Code Contribution
138
+ include Setup of env, IDE and typical getting started instructions?
139
+
140
+ -->
141
+
142
+ <!-- TODO
143
+ ### Improving The Documentation
144
+ Updating, improving and correcting the documentation
145
+
146
+ -->
147
+
148
+ <!-- TODO
149
+ ## Styleguides
150
+ ### Commit Messages
151
+
152
+ -->
153
+
154
+ ## Join The Project Team
155
+ Please send email to dariopassariello@gmail.com
156
+
157
+ <!-- omit in toc -->
158
+ ## Attribution
159
+ This guide is based on the [contributing.md](https://contributing.md/generator)!
package/README.md CHANGED
@@ -6,19 +6,23 @@ LayerPro by Dario Passariello
6
6
 
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-006b98?logo=TypeScript&logoColor=white)](#)
8
8
 
9
+ [![Socket Badge](https://socket.dev/api/badge/npm/package/layerpro/0.8.5)](https://socket.dev/npm/package/layerpro/overview/0.8.5)
10
+ [![layerpro](https://snyk.io/advisor/npm-package/layerpro/badge.svg)](https://snyk.io/advisor/npm-package/layerpro)
11
+
12
+ [![version](https://img.shields.io/npm/v/layerpro.svg)](https://npmjs.org/package/layerpro)
13
+ [![downloads](https://img.shields.io/npm/dm/layerpro.svg)](https://npmjs.org/package/layerpro)
9
14
 
10
15
  ## About
11
16
 
12
- LayerPro give you a complete new way to customize web popups on your application. LP permit you also to have custom alert, promps, confirm and message and override the ugly browser popup.
17
+ LayerPro offers a completely new way to customize web popups in your application. With LayerPro, you can create custom alerts, prompts, confirmations, and messages, effectively replacing the default browser popups.
13
18
 
14
- Please, read the [LICENSE](/LICENSE.md) agreement before to implementing in your application.
19
+ Please make sure to read the [LICENSE](/LICENSE.md) agreement before implementing it in your application.
15
20
 
16
21
  ## Live demo
17
22
 
18
23
  [https://a51.dev/tests/](https://a51.dev/tests/)
19
24
 
20
- You can see an HTML version where dpHelper and LayerPro works.
21
- You can use with html, react, vue or any other frontend / library.
25
+ You can view an HTML version demonstrating how dpHelper and LayerPro work together. These tools can be used with HTML, React, Vue, or any other frontend framework/library.
22
26
 
23
27
  ---
24
28
 
@@ -48,19 +52,17 @@ require("layerpro");
48
52
 
49
53
  ## Install for ejs or other type of projects (like html)
50
54
 
51
- note: you don't need to use npm install in this case or you get an error
52
-
53
55
  ```html
54
56
  <script src="https://unpkg.com/layerpro@latest/index.js"></script>
55
57
  ```
56
58
 
57
59
  ## How to use it
58
60
 
59
- type 'layerpro' in your console to have a look about all available tools that you can use globaly!
60
- You can call these from everywhere without import (just one at index).
61
- If you type alert("hello, world!") you can see the result.
61
+ ype layerpro in your console to explore all the available tools you can use globally! You can call these tools from anywhere without needing to import them (just include the import once in your index file).
62
+
63
+ For example, if you type **alert("hello, world!")**, you can see the result.
62
64
 
63
- You can use these (also from console) as messages
65
+ You can also use these tools as messages directly from the console.
64
66
 
65
67
  ```javascript
66
68
  alert("Hello world"); // Normal alert
@@ -81,37 +83,124 @@ message(
81
83
 
82
84
  ---
83
85
 
84
- Another use:
86
+ Popup:
85
87
 
86
88
  ```javascript
87
- layerpro.popup.open({
88
- id: String,
89
- body: String | Component / Module, // text or component
90
- width: Number,
91
- height: Number,
92
- name: String,
93
- icon: "&#9888;", // or from html symbols table
94
- iconize: true | false,
95
- maximize: true | false,
96
- close: true | false,
97
- isMaximize: true | false,
98
- dockable: true | false,
99
- raised: true | false,
100
- movable: true | false,
101
- resizable: true | false,
102
- store: true | false,
103
- top: Number | Percentance,
104
- left: Number | Percentance,
105
- right: Number | Percentance,
106
- bottom: Number | Percentance,
107
- minWidth: Number | Percentance,
108
- minHeight: Number | Percentance,
109
- fadeIn: 0, // Milliseconds
110
- fadeOut: 0, // Milliseconds
111
- timer: 0 // Milliseconds
112
- });
89
+ import 'layerpro';
90
+
91
+ layerpro.popup.open(
92
+ {
93
+ id: String,
94
+ body: String | Component / Module, // text or component
95
+
96
+ buttons: {
97
+ confirm: {
98
+ text: "accept", // customizable
99
+ cb: yourFunctionCallBack() // call your script
100
+ },
101
+ cancel: {
102
+ text: "cancel", // customizable
103
+ cb: yourFunctionCallBack() // optional
104
+ }, // optional
105
+
106
+ width: Number,
107
+ height: Number,
108
+ maxWidth: Number | Percentance,
109
+ maxHeight: Number | Percentance,
110
+ minWidth: Number | Percentance,
111
+ minHeight: Number | Percentance,
112
+ name: String,
113
+ icon: "&#9888;", // or from html symbols table
114
+ iconize: true | false,
115
+ maximize: true | false,
116
+ close: true | false,
117
+ isMaximize: true | false,
118
+ dockable: true | false,
119
+ raised: true | false,
120
+ movable: true | false,
121
+ resizable: true | false,
122
+ store: true | false,
123
+ top: Number | Percentance,
124
+ left: Number | Percentance,
125
+ right: Number | Percentance,
126
+ bottom: Number | Percentance,
127
+ fadeIn: 0, // Milliseconds
128
+ fadeOut: 0, // Milliseconds
129
+ timer: 0 // Milliseconds
130
+ }
131
+ );
132
+ ```
133
+
134
+ Example:
135
+
136
+ ```javascript
137
+ import 'layerpro'
138
+
139
+ // EXAMPLE WITH ALL OPTIONS
140
+ function App() {
141
+
142
+ layerpro.popup.open(
143
+ {
144
+ id: 'examplePopup',
145
+ body: 'Example',
146
+ buttons: {
147
+ confirm: {
148
+ text: "accept",
149
+ cb: (e) => message("confirmed")
150
+ },
151
+ cancel: {
152
+ text: "cancel"
153
+ }
154
+ },
155
+ width: 400,
156
+ height: 300,
157
+ name: 'example',
158
+ icon: '&#9888;',
159
+ iconize: true,
160
+ maximize: true,
161
+ close: true,
162
+ isMaximize: false,
163
+ dockable: false,
164
+ raised: true,
165
+ movable: true,
166
+ resizable: false,
167
+ store: false,
168
+ top: '10%',
169
+ left: '10%',
170
+ right: 'auto',
171
+ bottom: 'auto',
172
+ // maxWidth: 500,
173
+ // maxHeight: 350,
174
+ // minWidth: 200,
175
+ // minHeight: 150,
176
+ fadeIn: 500,
177
+ fadeOut: 500,
178
+ timer: 0
179
+ }
180
+ )
181
+
182
+ }
183
+
184
+ export default App
185
+
113
186
  ```
114
187
 
188
+ Here are some of the main advantages of using LayerPro:
189
+
190
+ **Complete Customization**: LayerPro allows you to create highly customized web pop-ups, surpassing the limitations of standard browser pop-ups. You can configure every aspect of the pop-up, including size, position, icons, and much more.
191
+
192
+ **Improved User Interface**: With LayerPro, you can create alerts, prompts, confirmations, and personalized messages that seamlessly integrate with your application's design, enhancing the user experience.
193
+
194
+ **Compatibility with Various Frameworks**: LayerPro is compatible with HTML, React, Vue, and other frontend frameworks and libraries, making it extremely versatile and easy to integrate into any project.
195
+
196
+ **Ease of Use**: Once LayerPro is imported into your project, you can access all its features globally without needing additional imports. This simplifies the development process and reduces boilerplate code.
197
+
198
+ **Advanced Features**: LayerPro offers advanced options such as the ability to maximize, resize, move, and dock pop-ups. You can also configure fade-in and fade-out effects for a smoother experience.
199
+
200
+ **Override Browser Pop-ups**: LayerPro allows you to replace browser pop-ups with customized versions, eliminating the unattractive look of default pop-ups and providing complete control over the appearance and behavior of your messages.
201
+
202
+ **Component Support**: You can use components or modules as the body of your pop-ups, allowing you to create complex and interactive user interfaces within the pop-ups themselves.
203
+
115
204
  ---
116
205
 
117
206
  copyright (c) 2019 - 2024 by Dario Passariello
@@ -0,0 +1 @@
1
+ theme: jekyll-theme-modernist