@kelviq/js-promotions-ui 0.0.1

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,3 @@
1
+ VITE_API_URL="https://edge.stagingapi.kelviq.com/api/v1/promotions/"
2
+ VITE_SANDBOX_API_URL="https://edge.sandboxapi.kelviq.com/api/v1/promotions/"
3
+
@@ -0,0 +1,2 @@
1
+ VITE_API_URL="https://edge.stagingapi.kelviq.com/api/v1/promotions/"
2
+ VITE_SANDBOX_API_URL="https://edge.sandboxapi.kelviq.com/api/v1/promotions/"
package/.eslintignore ADDED
@@ -0,0 +1,6 @@
1
+ .history
2
+ .husky
3
+ .vscode
4
+ coverage
5
+ dist
6
+ node_modules
package/.eslintrc ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "root": true,
3
+ "parser": "@typescript-eslint/parser",
4
+ "plugins": ["@typescript-eslint", "prettier"],
5
+ "extends": [
6
+ "eslint:recommended",
7
+ "plugin:@typescript-eslint/eslint-recommended",
8
+ "plugin:@typescript-eslint/recommended",
9
+ "prettier"
10
+ ],
11
+ "env": {
12
+ "browser": true,
13
+ "node": true
14
+ },
15
+ "rules": {
16
+ "prettier/prettier": "error"
17
+ }
18
+ }
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx --no -- commitlint --edit "$1"
@@ -0,0 +1 @@
1
+ npx lint-staged
package/.lintstagedrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "./**/*.{ts,html,json}": "npm run format:scripts",
3
+ "./**/*.{css,scss}": "npm run format:styles"
4
+ }
@@ -0,0 +1,6 @@
1
+ .history
2
+ .husky
3
+ .vscode
4
+ coverage
5
+ dist
6
+ node_modules
package/.prettierrc ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "printWidth": 80,
3
+ "tabWidth": 2,
4
+ "singleQuote": false,
5
+ "trailingComma": "es5",
6
+ "arrowParens": "avoid",
7
+ "bracketSpacing": true,
8
+ "useTabs": false,
9
+ "endOfLine": "auto",
10
+ "singleAttributePerLine": false,
11
+ "bracketSameLine": false,
12
+ "jsxSingleQuote": false,
13
+ "quoteProps": "as-needed",
14
+ "semi": true
15
+ }
@@ -0,0 +1,6 @@
1
+ .history
2
+ .husky
3
+ .vscode
4
+ coverage
5
+ dist
6
+ node_modules
package/.stylelintrc ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "plugins": ["stylelint-order", "stylelint-prettier"],
3
+ "extends": [
4
+ "stylelint-config-recommended",
5
+ "stylelint-config-sass-guidelines"
6
+ ],
7
+ "overrides": [
8
+ {
9
+ "files": ["**/*.scss"],
10
+ "customSyntax": "postcss-scss"
11
+ }
12
+ ],
13
+ "rules": {
14
+ "prettier/prettier": true,
15
+ "no-descending-specificity": null,
16
+ "max-nesting-depth": 2,
17
+ "selector-max-id": 1,
18
+ "order/properties-alphabetical-order": true
19
+ }
20
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # Change Log
2
+
3
+ All notable changes to the "vite-vanilla-ts-lib-starter" project will be documented in this file.
4
+
5
+ ## [0.0.4] - 2024-07-30
6
+
7
+ - Update all packages to the latest versions
8
+ - Remove support for CommonJS modules
9
+
10
+ ## [0.0.3] - 2024-01-23
11
+
12
+ - Update all packages to the latest versions (update to vite 5.x)
13
+
14
+ ## [0.0.2] - 2023-01-18
15
+
16
+ - Update all packages to the latest versions (update to vite 4.x)
17
+
18
+ ## [0.0.1] - 2022-09-08
19
+
20
+ - Update all packages to the latest versions (update to vite 3.x)
21
+
22
+ ## [0.0.0] - 2022-03-28
23
+
24
+ - Initial release
package/DEVELOPER.md ADDED
@@ -0,0 +1,61 @@
1
+ # vite-vanilla-ts-lib-starter
2
+
3
+ The starter is built on top of Vite 5.x and prepared for writing libraries in TypeScript. It generates a package with support for ESM modules and IIFE.
4
+
5
+ ## Features
6
+
7
+ - ESM modules
8
+ - IIFE bundle for direct browser support without bundler
9
+ - Typings bundle
10
+ - ESLint - scripts linter
11
+ - Stylelint - styles linter
12
+ - Prettier - formatter
13
+ - Vitest - test framework
14
+ - Husky + lint-staged - pre-commit git hook set up for formatting
15
+
16
+ ## GitHub Template
17
+
18
+ This is a template repo. Click the green [Use this template](https://github.com/kbysiec/vite-vanilla-ts-lib-starter/generate) button to get started.
19
+
20
+ ## Clone to local
21
+
22
+ If you prefer to do it manually with the cleaner git history
23
+
24
+ ```bash
25
+ git clone https://github.com/kbysiec/vite-vanilla-ts-lib-starter.git
26
+ cd vite-vanilla-ts-lib-starter
27
+ npm i
28
+ ```
29
+
30
+ ## Checklist
31
+
32
+ When you use this template, update the following:
33
+
34
+ - Remove `.git` directory and run `git init` to clean up the history
35
+ - Change the name in `package.json` - it will be the name of the IIFE bundle global variable and bundle files name (`.cjs`, `.mjs`, `.iife.js`, `d.ts`)
36
+ - Change the author name in `LICENSE`
37
+ - Clean up the `README` and `CHANGELOG` files
38
+
39
+ And, enjoy :)
40
+
41
+ ## Usage
42
+
43
+ The starter contains the following scripts:
44
+
45
+ - `dev` - starts dev server
46
+ - `build` - generates the following bundles: ESM (`.js`) and IIFE (`.iife.js`). The name of bundle is automatically taken from `package.json` name property
47
+ - `test` - starts vitest and runs all tests
48
+ - `test:coverage` - starts vitest and run all tests with code coverage report
49
+ - `lint:scripts` - lint `.ts` files with eslint
50
+ - `lint:styles` - lint `.css` and `.scss` files with stylelint
51
+ - `format:scripts` - format `.ts`, `.html` and `.json` files with prettier
52
+ - `format:styles` - format `.cs` and `.scss` files with stylelint
53
+ - `format` - format all with prettier and stylelint
54
+ - `prepare` - script for setting up husky pre-commit hook
55
+ - `uninstall-husky` - script for removing husky from repository
56
+
57
+ ## Acknowledgment
58
+
59
+ If you found it useful somehow, I would be grateful if you could leave a star in the project's GitHub repository.
60
+
61
+ Thank you.
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Kamil Bysiec
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ Javascipt promotion UI SDK
@@ -0,0 +1,4 @@
1
+ // commitlint.config.js
2
+ module.exports = {
3
+ extends: ["@commitlint/config-conventional"],
4
+ };
@@ -0,0 +1,11 @@
1
+ const config = {
2
+ entries: [
3
+ {
4
+ filePath: "./src/index.ts",
5
+ outFile: "./build/dist/index.d.ts",
6
+ noCheck: false,
7
+ },
8
+ ],
9
+ };
10
+
11
+ module.exports = config;
package/favicon.svg ADDED
@@ -0,0 +1,15 @@
1
+ <svg width="410" height="404" viewBox="0 0 410 404" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.8058C397.439 43.2894 403.768 52.1434 399.641 59.5246Z" fill="url(#paint0_linear)"/>
3
+ <path d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27314 296.636 0.855181 292.965 1.5744Z" fill="url(#paint1_linear)"/>
4
+ <defs>
5
+ <linearGradient id="paint0_linear" x1="6.00017" y1="32.9999" x2="235" y2="344" gradientUnits="userSpaceOnUse">
6
+ <stop stop-color="#41D1FF"/>
7
+ <stop offset="1" stop-color="#BD34FE"/>
8
+ </linearGradient>
9
+ <linearGradient id="paint1_linear" x1="194.651" y1="8.81818" x2="236.076" y2="292.989" gradientUnits="userSpaceOnUse">
10
+ <stop stop-color="#FFEA83"/>
11
+ <stop offset="0.0833333" stop-color="#FFDD35"/>
12
+ <stop offset="1" stop-color="#FFA800"/>
13
+ </linearGradient>
14
+ </defs>
15
+ </svg>