@betarena/ad-engine 0.0.5 → 0.0.7
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/.eslintrc.yaml +164 -0
- package/package.json +34 -14
- package/src/App.svelte +8 -0
- package/src/lib/Widget-AdEngine.svelte +492 -0
- package/src/lib/Widget-AdGeneral.svelte +284 -0
- package/src/lib/Widget-AdvertSlide.svelte +384 -0
- package/src/lib/assets/icon-close.svg +9 -0
- package/src/lib/assets/icon-external-link.svg +4 -0
- package/src/lib/constants/instance.ts +10 -0
- package/src/lib/store.ts +284 -0
- package/src/lib/types/ad-engine.d.ts +21 -0
- package/src/lib/types/geojs.d.ts +83 -0
- package/src/lib/types/global.d.ts +4 -0
- package/src/lib/types/vite-env.d.ts +2 -0
- package/src/lib/utils/device.ts +37 -0
- package/src/lib/utils/fetch.ts +107 -0
- package/src/lib/utils/geo.ts +34 -0
- package/src/main.ts +17 -0
- package/vite.config.ts +29 -3
- package/dist/assets/index-Cm9IxoHj.js +0 -1
- package/dist/index.html +0 -13
- package/dist/vite.svg +0 -1
package/.eslintrc.yaml
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# ▓ > 🔗 read-more :|: https://github.com/sveltejs/eslint-plugin-svelte
|
|
2
|
+
|
|
3
|
+
root: true
|
|
4
|
+
|
|
5
|
+
env:
|
|
6
|
+
es2017: true
|
|
7
|
+
node: true
|
|
8
|
+
browser: true
|
|
9
|
+
|
|
10
|
+
extends:
|
|
11
|
+
- eslint:recommended
|
|
12
|
+
- plugin:svelte/recommended
|
|
13
|
+
- plugin:@typescript-eslint/strict
|
|
14
|
+
# ▓ WARNING:
|
|
15
|
+
# ▓ > (👇) below :: does not work with svelte.
|
|
16
|
+
# - plugin:import/errors
|
|
17
|
+
# - plugin:import/warnings
|
|
18
|
+
# - plugin:import/typescript
|
|
19
|
+
# ▓ > (👇) :|: https://www.npmjs.com/package/eslint-config-google
|
|
20
|
+
# - google
|
|
21
|
+
# - prettier
|
|
22
|
+
# ▓ NOTE:
|
|
23
|
+
# ▓ > (👇) already contained within ../strict.
|
|
24
|
+
# - plugin:@typescript-eslint/recommended
|
|
25
|
+
# - plugin:@typescript-eslint/stylistic
|
|
26
|
+
|
|
27
|
+
parser:
|
|
28
|
+
"@typescript-eslint/parser"
|
|
29
|
+
|
|
30
|
+
parserOptions:
|
|
31
|
+
project:
|
|
32
|
+
- tsconfig.json
|
|
33
|
+
sourceType: module
|
|
34
|
+
ecmaVersion: 2020
|
|
35
|
+
extraFileExtensions:
|
|
36
|
+
- '.svelte'
|
|
37
|
+
- '.ts'
|
|
38
|
+
|
|
39
|
+
overrides:
|
|
40
|
+
- files:
|
|
41
|
+
- '*.svelte'
|
|
42
|
+
parser: 'svelte-eslint-parser'
|
|
43
|
+
parserOptions:
|
|
44
|
+
parser: '@typescript-eslint/parser'
|
|
45
|
+
|
|
46
|
+
globals:
|
|
47
|
+
# ▓ > 🔗 read-more :|: https://github.com/Chatie/eslint-config/issues/45#issuecomment-885507652
|
|
48
|
+
"NodeJS": true
|
|
49
|
+
|
|
50
|
+
ignorePatterns:
|
|
51
|
+
- .DS_Store
|
|
52
|
+
- node_modules
|
|
53
|
+
- /build
|
|
54
|
+
- /.svelte-kit
|
|
55
|
+
- /package
|
|
56
|
+
- .env
|
|
57
|
+
- .env.*
|
|
58
|
+
- '!.env.example'
|
|
59
|
+
- pnpm-lock.yaml
|
|
60
|
+
- package-lock.json
|
|
61
|
+
- yarn.lock
|
|
62
|
+
# ▓ NOTE:
|
|
63
|
+
# ▓ > gradual eslint introduction in project.
|
|
64
|
+
- src/lib/geo-js
|
|
65
|
+
- src/lib/graphql
|
|
66
|
+
- src/lib/redis
|
|
67
|
+
# - src/lib/store
|
|
68
|
+
# - src/routes
|
|
69
|
+
- src/lib/types
|
|
70
|
+
- src/params
|
|
71
|
+
- src/service-worker.ts
|
|
72
|
+
|
|
73
|
+
plugins:
|
|
74
|
+
- "@typescript-eslint"
|
|
75
|
+
- svelte
|
|
76
|
+
# ▓ WARNING:
|
|
77
|
+
# ▓ > (👇) all-below :: does not work with svelte.
|
|
78
|
+
# - import
|
|
79
|
+
|
|
80
|
+
# ▓ IMPORTANT
|
|
81
|
+
# ▓ > Main 'defacto' configuration, do not remove and/or alter heavily.
|
|
82
|
+
# ▓ > 🔗 read-more :|: https://eslint.org/docs/latest/rules/
|
|
83
|
+
rules:
|
|
84
|
+
|
|
85
|
+
# ▓ NOTE:
|
|
86
|
+
# ▓ > (👇) for svelte/sveltekit project only!
|
|
87
|
+
'svelte/valid-compile': 0
|
|
88
|
+
'svelte/no-at-html-tags': 0
|
|
89
|
+
|
|
90
|
+
# ▓ NOTE:
|
|
91
|
+
# ▓ > has been depreceted.
|
|
92
|
+
# "valid-jsdoc": [..]
|
|
93
|
+
no-unexpected-multiline: 0
|
|
94
|
+
import/no-unresolved: 0
|
|
95
|
+
# ▓ NOTE:
|
|
96
|
+
# ▓ > Ideal, but doesn't work as expected :: [ "error", "always", { "allowNewlines": true } ]
|
|
97
|
+
# ▓ > as it requires a space after function declaration, 'always'.
|
|
98
|
+
func-call-spacing: 0
|
|
99
|
+
|
|
100
|
+
"@typescript-eslint/no-inferrable-types": 0
|
|
101
|
+
"@typescript-eslint/prefer-for-of": error
|
|
102
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": error
|
|
103
|
+
|
|
104
|
+
no-console:
|
|
105
|
+
- error
|
|
106
|
+
curly:
|
|
107
|
+
- error
|
|
108
|
+
- multi
|
|
109
|
+
- consistent
|
|
110
|
+
max-len:
|
|
111
|
+
- error
|
|
112
|
+
- code: 250
|
|
113
|
+
quotes:
|
|
114
|
+
- error
|
|
115
|
+
- single
|
|
116
|
+
object-curly-spacing:
|
|
117
|
+
- error
|
|
118
|
+
- always
|
|
119
|
+
brace-style:
|
|
120
|
+
- error
|
|
121
|
+
- allman
|
|
122
|
+
- allowSingleLine: true
|
|
123
|
+
indent:
|
|
124
|
+
- error
|
|
125
|
+
- 2
|
|
126
|
+
space-before-function-paren:
|
|
127
|
+
- error
|
|
128
|
+
- anonymous: always
|
|
129
|
+
named: always
|
|
130
|
+
asyncArrow: always
|
|
131
|
+
padded-blocks:
|
|
132
|
+
- error
|
|
133
|
+
- blocks: never
|
|
134
|
+
comma-dangle:
|
|
135
|
+
- error
|
|
136
|
+
- only-multiline
|
|
137
|
+
comma-style:
|
|
138
|
+
- error
|
|
139
|
+
- last
|
|
140
|
+
operator-linebreak:
|
|
141
|
+
- error
|
|
142
|
+
- before
|
|
143
|
+
new-cap:
|
|
144
|
+
- error
|
|
145
|
+
- capIsNewExceptionPattern: "^express\\.."
|
|
146
|
+
camelcase:
|
|
147
|
+
- error
|
|
148
|
+
- ignoreImports: true
|
|
149
|
+
ignoreDestructuring: true
|
|
150
|
+
properties: never
|
|
151
|
+
allow:
|
|
152
|
+
- "^if_M_"
|
|
153
|
+
- "^B_H_"
|
|
154
|
+
- "^icon_"
|
|
155
|
+
eol-last:
|
|
156
|
+
- error
|
|
157
|
+
- always
|
|
158
|
+
arrow-body-style:
|
|
159
|
+
- error
|
|
160
|
+
- always
|
|
161
|
+
one-var:
|
|
162
|
+
- error
|
|
163
|
+
- initialized: "consecutive"
|
|
164
|
+
no-extra-semi: 0
|
package/package.json
CHANGED
|
@@ -1,24 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betarena/ad-engine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "Betarena Ad-Engine Component
|
|
5
|
+
"description": "Betarena Ad-Engine Component",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"betarena",
|
|
9
|
+
"ad-engine",
|
|
10
|
+
"adverts",
|
|
11
|
+
"bta-token"
|
|
12
|
+
],
|
|
6
13
|
"type": "module",
|
|
7
|
-
"main": "dist/assets/index-Cm9IxoHj.js",
|
|
8
14
|
"scripts": {
|
|
9
|
-
"dev": "vite",
|
|
10
15
|
"build": "vite build",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
16
|
+
"start": "vite build",
|
|
17
|
+
"vite|:|dev": "vite",
|
|
18
|
+
"vite|:|dev|:|1-click": "npm run 'npm|:|link|:|@betarena/scores-lib' && npm ls --link --global & npm run 'vite|:|dev'",
|
|
19
|
+
"vite|:|preview": "vite preview",
|
|
20
|
+
"svelte-check": "svelte-check --tsconfig ./tsconfig.json",
|
|
21
|
+
"npm|:|link|:|@betarena/scores-lib": "npm link @betarena/scores-lib",
|
|
22
|
+
"npm|:|link": "npm link",
|
|
23
|
+
"sass|:|watch": "sass --watch static/app.scss static/app.css"
|
|
14
24
|
},
|
|
15
25
|
"devDependencies": {
|
|
16
|
-
"@
|
|
17
|
-
"@
|
|
18
|
-
"svelte": "
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
26
|
+
"@betarena/scores-lib": "1.11.0-alpha.13",
|
|
27
|
+
"@sveltejs/vite-plugin-svelte": "3.0.2",
|
|
28
|
+
"@tsconfig/svelte": "5.0.2",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "5.59.1",
|
|
30
|
+
"@typescript-eslint/parser": "5.59.1",
|
|
31
|
+
"eslint": "8.51.0",
|
|
32
|
+
"eslint-config-prettier": "8.8.0",
|
|
33
|
+
"eslint-plugin-svelte": "2.34.0",
|
|
34
|
+
"sass": "1.72.0",
|
|
35
|
+
"svelte": "4.2.12",
|
|
36
|
+
"svelte-check": "3.6.6",
|
|
37
|
+
"tslib": "2.6.2",
|
|
38
|
+
"typescript": "5.2.2",
|
|
39
|
+
"vite": "5.1.6"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@fontsource/roboto": "5.0.12"
|
|
23
43
|
}
|
|
24
44
|
}
|