@leavittsoftware/web 6.4.0 → 6.6.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.
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../app/app-main-content-container';
|
|
3
|
+
import '../app/app-width-limiter';
|
|
4
|
+
declare const LeavittErrorPage_base: import("../theme/theme-preference").Constructor<import("../theme/theme-preference").ThemePreferenceInterface> & typeof LitElement;
|
|
5
|
+
/**
|
|
6
|
+
* A pre-styled error page
|
|
7
|
+
*
|
|
8
|
+
* @element leavitt-error-page
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare class LeavittErrorPage extends LeavittErrorPage_base {
|
|
12
|
+
#private;
|
|
13
|
+
/**
|
|
14
|
+
* Reason text for the error
|
|
15
|
+
*/
|
|
16
|
+
accessor message: string;
|
|
17
|
+
private accessor particlesContainer;
|
|
18
|
+
firstUpdated(): Promise<void>;
|
|
19
|
+
static styles: import("lit").CSSResult;
|
|
20
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=error-page.d.ts.map
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
|
+
import { property, customElement, query } from 'lit/decorators.js';
|
|
4
|
+
import '../app/app-main-content-container';
|
|
5
|
+
import '../app/app-width-limiter';
|
|
6
|
+
import { tsParticles } from '@tsparticles/engine';
|
|
7
|
+
import { loadStarsPreset } from '@tsparticles/preset-stars';
|
|
8
|
+
import { ThemePreference } from '../theme/theme-preference';
|
|
9
|
+
import themePreferenceEvent from '../theme/theme-preference-event';
|
|
10
|
+
/**
|
|
11
|
+
* A pre-styled error page
|
|
12
|
+
*
|
|
13
|
+
* @element leavitt-error-page
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
let LeavittErrorPage = class LeavittErrorPage extends ThemePreference(LitElement) {
|
|
17
|
+
#message_accessor_storage = "It looks like that page doesn't exist.";
|
|
18
|
+
/**
|
|
19
|
+
* Reason text for the error
|
|
20
|
+
*/
|
|
21
|
+
get message() { return this.#message_accessor_storage; }
|
|
22
|
+
set message(value) { this.#message_accessor_storage = value; }
|
|
23
|
+
#particlesContainer_accessor_storage;
|
|
24
|
+
get particlesContainer() { return this.#particlesContainer_accessor_storage; }
|
|
25
|
+
set particlesContainer(value) { this.#particlesContainer_accessor_storage = value; }
|
|
26
|
+
#mdSysColorBackground;
|
|
27
|
+
#mdSysColorOnBackground;
|
|
28
|
+
#particles;
|
|
29
|
+
async firstUpdated() {
|
|
30
|
+
this.#setColors(this.themePreference);
|
|
31
|
+
themePreferenceEvent.subscribe('theme-preference', 'change', (themePreference) => {
|
|
32
|
+
this.#setColors(themePreference);
|
|
33
|
+
if (this.#particles) {
|
|
34
|
+
this.#particles.options.background.color = this.#mdSysColorBackground;
|
|
35
|
+
this.#particles.options.particles.color.value = this.#mdSysColorOnBackground;
|
|
36
|
+
this.#particles.refresh();
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
await loadStarsPreset(tsParticles);
|
|
40
|
+
if (this.particlesContainer) {
|
|
41
|
+
this.#particles = await tsParticles.load({
|
|
42
|
+
element: this.particlesContainer,
|
|
43
|
+
options: {
|
|
44
|
+
preset: 'stars',
|
|
45
|
+
background: {
|
|
46
|
+
color: this.#mdSysColorBackground,
|
|
47
|
+
},
|
|
48
|
+
particles: {
|
|
49
|
+
color: {
|
|
50
|
+
value: this.#mdSysColorOnBackground,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
fullScreen: {
|
|
54
|
+
enable: false,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
#setColors(themePreference) {
|
|
61
|
+
this.#mdSysColorBackground =
|
|
62
|
+
themePreference === 'dark'
|
|
63
|
+
? getComputedStyle(document.body).getPropertyValue('--md-sys-color-surface-container-lowest')
|
|
64
|
+
: getComputedStyle(document.body).getPropertyValue('--md-sys-color-surface-container-highest');
|
|
65
|
+
this.#mdSysColorOnBackground = this.themePreference === 'dark' ? '#5c5959' : '#bfbbbb';
|
|
66
|
+
}
|
|
67
|
+
static { this.styles = css `
|
|
68
|
+
:host {
|
|
69
|
+
display: grid;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
h1 {
|
|
73
|
+
font-family: var(Metropolis, Roboto, Noto, sans-serif);
|
|
74
|
+
-webkit-font-smoothing: antialiased;
|
|
75
|
+
font-size: 48px;
|
|
76
|
+
line-height: 34px;
|
|
77
|
+
font-weight: 700;
|
|
78
|
+
letter-spacing: -1px;
|
|
79
|
+
|
|
80
|
+
margin: 48px 0 24px 0;
|
|
81
|
+
padding: 0;
|
|
82
|
+
|
|
83
|
+
text-align: center;
|
|
84
|
+
|
|
85
|
+
z-index: 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
h2 {
|
|
89
|
+
font-family: Roboto;
|
|
90
|
+
-webkit-font-smoothing: antialiased;
|
|
91
|
+
font-size: 20px;
|
|
92
|
+
line-height: 22px;
|
|
93
|
+
font-weight: 300;
|
|
94
|
+
letter-spacing: 0.3px;
|
|
95
|
+
|
|
96
|
+
margin: 0;
|
|
97
|
+
padding: 0;
|
|
98
|
+
|
|
99
|
+
text-align: center;
|
|
100
|
+
|
|
101
|
+
z-index: 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
image-container {
|
|
105
|
+
display: grid;
|
|
106
|
+
max-width: 390px;
|
|
107
|
+
min-width: 200px;
|
|
108
|
+
justify-self: center;
|
|
109
|
+
position: relative;
|
|
110
|
+
z-index: 1;
|
|
111
|
+
margin-top: 24px;
|
|
112
|
+
|
|
113
|
+
img[mark] {
|
|
114
|
+
position: absolute;
|
|
115
|
+
width: 30px;
|
|
116
|
+
top: 12%;
|
|
117
|
+
right: 12%;
|
|
118
|
+
z-index: 1;
|
|
119
|
+
opacity: 0.5;
|
|
120
|
+
animation: spin 4.5s infinite linear;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
img[planet] {
|
|
124
|
+
z-index: 1;
|
|
125
|
+
width: 100%;
|
|
126
|
+
height: auto;
|
|
127
|
+
object-fit: contain;
|
|
128
|
+
object-position: center;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
div[particles] {
|
|
133
|
+
position: absolute;
|
|
134
|
+
inset: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@keyframes spin {
|
|
138
|
+
from {
|
|
139
|
+
transform: rotate(0deg);
|
|
140
|
+
}
|
|
141
|
+
to {
|
|
142
|
+
transform: rotate(360deg);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
`; }
|
|
146
|
+
render() {
|
|
147
|
+
return html `
|
|
148
|
+
<leavitt-app-main-content-container>
|
|
149
|
+
<leavitt-app-width-limiter>
|
|
150
|
+
<div particles></div>
|
|
151
|
+
<h1>Hmm...</h1>
|
|
152
|
+
<h2>${this.message}</h2>
|
|
153
|
+
<image-container>
|
|
154
|
+
<img mark src="https://cdn.leavitt.com/icons/lg-mark.svg" />
|
|
155
|
+
<img planet src="https://cdn.leavitt.com/icons/lg-planet.svg" />
|
|
156
|
+
</image-container>
|
|
157
|
+
</leavitt-app-width-limiter>
|
|
158
|
+
</leavitt-app-main-content-container>
|
|
159
|
+
`;
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ type: String })
|
|
164
|
+
], LeavittErrorPage.prototype, "message", null);
|
|
165
|
+
__decorate([
|
|
166
|
+
query('div[particles]')
|
|
167
|
+
], LeavittErrorPage.prototype, "particlesContainer", null);
|
|
168
|
+
LeavittErrorPage = __decorate([
|
|
169
|
+
customElement('leavitt-error-page')
|
|
170
|
+
], LeavittErrorPage);
|
|
171
|
+
export { LeavittErrorPage };
|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;;;gBAKC,IAAI,CAAC,OAAO;;;;;;;KAOvB,CAAC;IACJ,CAAC;;AAjJoC;IAApC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAqE;AAEtD;IAAzC,KAAK,CAAC,gBAAgB,CAAC;0DAAqD;AANlE,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAsJ5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavittsoftware/web",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"files": [
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"@leavittsoftware/lg-core-typescript": "*",
|
|
20
20
|
"@lit/context": "^1.1.6",
|
|
21
21
|
"@material/web": "*",
|
|
22
|
+
"@tsparticles/engine": "^3.9.1",
|
|
23
|
+
"@tsparticles/preset-stars": "^3.2.0",
|
|
22
24
|
"@types/google.maps": "*",
|
|
23
25
|
"bowser": "^2.12.1",
|
|
24
26
|
"countup.js": "^2.9.0",
|
|
@@ -42,5 +44,5 @@
|
|
|
42
44
|
"url": "https://github.com/LeavittSoftware/titanium-elements/issues"
|
|
43
45
|
},
|
|
44
46
|
"homepage": "https://github.com/LeavittSoftware/titanium-elements/#readme",
|
|
45
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "847a6d05d5934f684f854dfc3b4938f34bbf4a6f"
|
|
46
48
|
}
|