silentium-components 0.0.1 → 0.0.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.
- package/CHANGELOG.md +13 -0
- package/docs/assets/css/base.css +5 -0
- package/docs/assets/css/custom.css +72 -0
- package/docs/assets/img/logo.svg +1522 -0
- package/docs/assets/js/index.mjs +7 -5
- package/docs/build.sh +9 -8
- package/docs/favicon.ico +0 -0
- package/docs/index-dev.html +87 -215
- package/docs/index.html +87 -215
- package/docs/pages/behaviors/dirty.html +15 -0
- package/docs/pages/behaviors/loading.html +24 -0
- package/docs/pages/behaviors.html +12 -0
- package/docs/pages/index.html +5 -0
- package/docs/routes.json +1 -1
- package/docs/template.html +87 -215
- package/eslint.config.mjs +9 -0
- package/package.json +2 -2
- package/src/behaviors/Dirty.test.ts +4 -3
- package/src/behaviors/Dirty.ts +10 -2
- package/src/behaviors/Loading.test.ts +15 -0
- package/src/behaviors/Loading.ts +34 -0
package/docs/assets/js/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CurrentPage, Link, Page, Router } from "
|
|
2
|
-
import { Patron, PatronOnce, SourceWithPool, sourceOf } from "
|
|
3
|
-
import { Attribute, Element, Fetched, StyleInstalled } from "
|
|
1
|
+
import { CurrentPage, Link, Page, Router } from "silentium-components";
|
|
2
|
+
import { Patron, PatronOnce, SourceWithPool, sourceOf } from "silentium";
|
|
3
|
+
import { Attribute, Element, Fetched, StyleInstalled } from "silentium-web-api";
|
|
4
4
|
import { StyleFetched } from "../lib/StyleFetched.mjs";
|
|
5
5
|
|
|
6
6
|
new StyleFetched(
|
|
@@ -9,7 +9,9 @@ new StyleFetched(
|
|
|
9
9
|
|
|
10
10
|
const routing = new Router(".loader", ".page-area", ".menu");
|
|
11
11
|
|
|
12
|
-
const [basePath] = location.href
|
|
12
|
+
const [basePath] = window.location.href
|
|
13
|
+
.replace(window.location.origin, "")
|
|
14
|
+
.split("#");
|
|
13
15
|
const cleanBasePath = basePath.replace(/[^/]+\.html$/, "");
|
|
14
16
|
const currentPage = new CurrentPage();
|
|
15
17
|
const basePathSource = new SourceWithPool(
|
|
@@ -53,7 +55,7 @@ routesTransport.result().value(
|
|
|
53
55
|
url: "/",
|
|
54
56
|
template: "pages/index.html",
|
|
55
57
|
aliases: [basePath, `${basePath}index.html`, ""],
|
|
56
|
-
page: new Page("
|
|
58
|
+
page: new Page("Silentium Components"),
|
|
57
59
|
},
|
|
58
60
|
...dynamicRoutes,
|
|
59
61
|
{
|
package/docs/build.sh
CHANGED
|
@@ -3,22 +3,23 @@
|
|
|
3
3
|
echo "BEGIN"
|
|
4
4
|
cd docs
|
|
5
5
|
cp template.html index.html
|
|
6
|
-
sed -i "s/
|
|
6
|
+
sed -i "s/TPL_SILENTIUM_OOP/https:\/\/cdn.jsdelivr.net\/npm\/silentium@0.0.2\/dist\/silentium.min.mjs/g" "index.html"
|
|
7
7
|
|
|
8
|
-
sed -i "s/
|
|
8
|
+
sed -i "s/TPL_SILENTIUM_WEB_API/https:\/\/cdn.jsdelivr.net\/npm\/silentium-web-api@0.0.1\/dist\/silentium-web-api.min.mjs/g" "index.html"
|
|
9
9
|
|
|
10
|
-
sed -i "s/
|
|
10
|
+
sed -i "s/TPL_SILENTIUM_COMPONENTS/https:\/\/cdn.jsdelivr.net\/npm\/silentium-components@0.0.1\/dist\/silentium-components.min.mjs/g" "index.html"
|
|
11
|
+
|
|
12
|
+
sed -i "s/TPL_SILENTIUM_DESIGN/https:\/\/raw.githubusercontent.com\/silentium-lab\/silentium\/refs\/heads\/main\/docs\/assets\/css\/custom.css/g" "index.html"
|
|
11
13
|
|
|
12
|
-
sed -i "s/TPL_PATRON_DESIGN/https:\/\/raw.githubusercontent.com\/kosukhin\/patorn-design-system\/refs\/heads\/main\/custom.css/g" "index.html"
|
|
13
14
|
|
|
14
15
|
cp template.html index-dev.html
|
|
15
|
-
sed -i "s/
|
|
16
|
+
sed -i "s/TPL_SILENTIUM_OOP/http:\/\/127.0.0.1:5502\/dist\/silentium.min.mjs/g" "index-dev.html"
|
|
16
17
|
|
|
17
|
-
sed -i "s/
|
|
18
|
+
sed -i "s/TPL_SILENTIUM_WEB_API/http:\/\/127.0.0.1:5501\/dist\/silentium-web-api.min.mjs/g" "index-dev.html"
|
|
18
19
|
|
|
19
|
-
sed -i "s/
|
|
20
|
+
sed -i "s/TPL_SILENTIUM_COMPONENTS/http:\/\/127.0.0.1:5500\/dist\/silentium-components.min.mjs/g" "index-dev.html"
|
|
20
21
|
|
|
21
|
-
sed -i "s/
|
|
22
|
+
sed -i "s/TPL_SILENTIUM_DESIGN/http:\/\/127.0.0.1:5502\/docs\/assets\/css\/custom.css/g" "index-dev.html"
|
|
22
23
|
|
|
23
24
|
echo "DONE!"
|
|
24
25
|
|
package/docs/favicon.ico
CHANGED
|
Binary file
|
package/docs/index-dev.html
CHANGED
|
@@ -1,233 +1,105 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="ru">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<link
|
|
21
|
-
rel="apple-touch-icon"
|
|
22
|
-
sizes="57x57"
|
|
23
|
-
href="./assets/favicon/apple-icon-57x57.png"
|
|
24
|
-
/>
|
|
25
|
-
<link
|
|
26
|
-
rel="apple-touch-icon"
|
|
27
|
-
sizes="60x60"
|
|
28
|
-
href="./assets/favicon/apple-icon-60x60.png"
|
|
29
|
-
/>
|
|
30
|
-
<link
|
|
31
|
-
rel="apple-touch-icon"
|
|
32
|
-
sizes="72x72"
|
|
33
|
-
href="./assets/favicon/apple-icon-72x72.png"
|
|
34
|
-
/>
|
|
35
|
-
<link
|
|
36
|
-
rel="apple-touch-icon"
|
|
37
|
-
sizes="76x76"
|
|
38
|
-
href="./assets/favicon/apple-icon-76x76.png"
|
|
39
|
-
/>
|
|
40
|
-
<link
|
|
41
|
-
rel="apple-touch-icon"
|
|
42
|
-
sizes="114x114"
|
|
43
|
-
href="./assets/favicon/apple-icon-114x114.png"
|
|
44
|
-
/>
|
|
45
|
-
<link
|
|
46
|
-
rel="apple-touch-icon"
|
|
47
|
-
sizes="120x120"
|
|
48
|
-
href="./assets/favicon/apple-icon-120x120.png"
|
|
49
|
-
/>
|
|
50
|
-
<link
|
|
51
|
-
rel="apple-touch-icon"
|
|
52
|
-
sizes="144x144"
|
|
53
|
-
href="./assets/favicon/apple-icon-144x144.png"
|
|
54
|
-
/>
|
|
55
|
-
<link
|
|
56
|
-
rel="apple-touch-icon"
|
|
57
|
-
sizes="152x152"
|
|
58
|
-
href="./assets/favicon/apple-icon-152x152.png"
|
|
59
|
-
/>
|
|
60
|
-
<link
|
|
61
|
-
rel="apple-touch-icon"
|
|
62
|
-
sizes="180x180"
|
|
63
|
-
href="./assets/favicon/apple-icon-180x180.png"
|
|
64
|
-
/>
|
|
65
|
-
<link
|
|
66
|
-
rel="icon"
|
|
67
|
-
type="image/png"
|
|
68
|
-
sizes="192x192"
|
|
69
|
-
href="./assets/favicon/android-icon-192x192.png"
|
|
70
|
-
/>
|
|
71
|
-
<link
|
|
72
|
-
rel="icon"
|
|
73
|
-
type="image/png"
|
|
74
|
-
sizes="32x32"
|
|
75
|
-
href="./assets/favicon/favicon-32x32.png"
|
|
76
|
-
/>
|
|
77
|
-
<link
|
|
78
|
-
rel="icon"
|
|
79
|
-
type="image/png"
|
|
80
|
-
sizes="96x96"
|
|
81
|
-
href="./assets/favicon/favicon-96x96.png"
|
|
82
|
-
/>
|
|
83
|
-
<link
|
|
84
|
-
rel="icon"
|
|
85
|
-
type="image/png"
|
|
86
|
-
sizes="16x16"
|
|
87
|
-
href="./assets/favicon/favicon-16x16.png"
|
|
88
|
-
/>
|
|
89
|
-
<meta
|
|
90
|
-
name="msapplication-TileColor"
|
|
91
|
-
content="#ffffff"
|
|
92
|
-
/>
|
|
93
|
-
<meta
|
|
94
|
-
name="msapplication-TileImage"
|
|
95
|
-
content="./assets/favicon/ms-icon-144x144.png"
|
|
96
|
-
/>
|
|
97
|
-
<meta
|
|
98
|
-
name="theme-color"
|
|
99
|
-
content="#ffffff"
|
|
100
|
-
/>
|
|
101
|
-
<link
|
|
102
|
-
rel="stylesheet"
|
|
103
|
-
href="./assets/css/base.css"
|
|
104
|
-
/>
|
|
105
|
-
<script type="importmap">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<meta name="viewport"
|
|
7
|
+
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
|
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
9
|
+
<title>Идет загрузка...</title>
|
|
10
|
+
<link rel="stylesheet"
|
|
11
|
+
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css" />
|
|
12
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
|
13
|
+
<script
|
|
14
|
+
src="//cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.9.0/highlightjs-line-numbers.min.js"></script>
|
|
15
|
+
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
|
|
16
|
+
<meta name="msapplication-TileColor" content="#ffffff" />
|
|
17
|
+
<meta name="theme-color" content="#ffffff" />
|
|
18
|
+
<link rel="stylesheet" href="./assets/css/base.css" />
|
|
19
|
+
<script type="importmap">
|
|
106
20
|
{
|
|
107
21
|
"imports": {
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
22
|
+
"silentium": "http://127.0.0.1:5502/dist/silentium.min.mjs",
|
|
23
|
+
"silentium-web-api": "http://127.0.0.1:5501/dist/silentium-web-api.min.mjs",
|
|
24
|
+
"silentium-components": "http://127.0.0.1:5500/dist/silentium-components.min.mjs"
|
|
111
25
|
}
|
|
112
26
|
}
|
|
113
27
|
</script>
|
|
114
|
-
|
|
28
|
+
</head>
|
|
115
29
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<a href="/" class="text-xl flex items-center active">
|
|
126
|
-
Patron Components
|
|
30
|
+
<body class="flex flex-col h-full global-body body-loading">
|
|
31
|
+
<div class="style-link" data-style="http://127.0.0.1:5502/docs/assets/css/custom.css"></div>
|
|
32
|
+
<header class="text-gray-600 body-font">
|
|
33
|
+
<div class="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center menu">
|
|
34
|
+
<div class="flex title-font font-medium items-center text-gray-900 mb-4 md:mb-0">
|
|
35
|
+
<a href="/" class="ml-3 text-xl flex gap-2 items-center active">
|
|
36
|
+
|
|
37
|
+
<img src="./assets/img/logo.svg" width="40" height="44" />
|
|
38
|
+
Silentium Components
|
|
127
39
|
</a>
|
|
128
|
-
</div>
|
|
129
|
-
<nav
|
|
130
|
-
class="md:mr-auto md:ml-4 md:py-1 md:pl-4 md:border-l md:border-gray-400 flex flex-wrap items-center text-base justify-center"
|
|
131
|
-
>
|
|
132
|
-
</nav>
|
|
133
|
-
<button
|
|
134
|
-
onclick="location.href='https://github.com/kosukhin/patron'"
|
|
135
|
-
class="inline-flex gap-1 items-center bg-gray-100 border-0 py-1 px-3 focus:outline-none hover:bg-gray-200 rounded text-base mt-4 md:mt-0"
|
|
136
|
-
>
|
|
137
|
-
<img
|
|
138
|
-
src="./assets/img/github_16.jpg"
|
|
139
|
-
width="16"
|
|
140
|
-
height="16"
|
|
141
|
-
/>
|
|
142
|
-
GitHub
|
|
143
|
-
<svg
|
|
144
|
-
fill="none"
|
|
145
|
-
stroke="currentColor"
|
|
146
|
-
stroke-linecap="round"
|
|
147
|
-
stroke-linejoin="round"
|
|
148
|
-
stroke-width="2"
|
|
149
|
-
class="w-4 h-4 ml-1"
|
|
150
|
-
viewBox="0 0 24 24"
|
|
151
|
-
>
|
|
152
|
-
<path d="M5 12h14M12 5l7 7-7 7"></path>
|
|
153
|
-
</svg>
|
|
154
|
-
</button>
|
|
155
40
|
</div>
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
41
|
+
<nav
|
|
42
|
+
class="md:mr-auto md:ml-4 md:py-1 md:pl-4 md:border-l md:border-gray-400 flex flex-wrap items-center text-base justify-center">
|
|
43
|
+
</nav>
|
|
44
|
+
<button onclick="location.href='https://github.com/kosukhin/patron'"
|
|
45
|
+
class="inline-flex gap-1 items-center bg-gray-100 border-0 py-1 px-3 focus:outline-none hover:bg-gray-200 rounded text-base mt-4 md:mt-0">
|
|
46
|
+
<img src="./assets/img/github_16.jpg" width="16" height="16" />
|
|
47
|
+
GitHub
|
|
48
|
+
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
49
|
+
class="w-4 h-4 ml-1" viewBox="0 0 24 24">
|
|
50
|
+
<path d="M5 12h14M12 5l7 7-7 7"></path>
|
|
51
|
+
</svg>
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
</header>
|
|
55
|
+
<article class="container mx-auto p-5">
|
|
56
|
+
<div class="loader">
|
|
57
|
+
<div class="w-full flex justify-center">
|
|
58
|
+
<div
|
|
59
|
+
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-e-transparent align-[-0.125em] text-indigo-500 motion-reduce:animate-[spin_1.5s_linear_infinite]"
|
|
60
|
+
role="status">
|
|
61
|
+
<span
|
|
62
|
+
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]">Loading...</span>
|
|
169
63
|
</div>
|
|
170
64
|
</div>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
href="https://kosukhin.github.io/patron-web-api.site/"
|
|
191
|
-
target="_blank"
|
|
192
|
-
>Patron-WEB-API</a
|
|
193
|
-
>
|
|
194
|
-
</div>
|
|
195
|
-
<div class="flex gap-1 items-center">
|
|
196
|
-
<a
|
|
197
|
-
href="https://kosukhin.github.io/patron-web-api.site/"
|
|
198
|
-
target="_blank"
|
|
199
|
-
>Patron Редактор схем</a
|
|
200
|
-
>
|
|
201
|
-
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="page-area"></div>
|
|
67
|
+
</article>
|
|
68
|
+
<footer class="text-gray-600 body-font mt-auto">
|
|
69
|
+
<div class="border-t border-gray-200">
|
|
70
|
+
<div class="container px-5 py-8 flex flex-wrap gap-6 mx-auto">
|
|
71
|
+
<div>
|
|
72
|
+
<h6 class="mb-4 flex font-semibold uppercase md:justify-start">
|
|
73
|
+
Библиотеки
|
|
74
|
+
</h6>
|
|
75
|
+
<div class="flex flex-col gap-2 menu">
|
|
76
|
+
<div class="flex gap-1 items-center">
|
|
77
|
+
<a href="https://kosukhin.github.io/patron/#/" target="_blank">Silentium</a>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="flex gap-1 items-center">
|
|
80
|
+
<a href="https://kosukhin.github.io/patron-web-api.site/" target="_blank">Silentium-WEB-API</a>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="flex gap-1 items-center">
|
|
83
|
+
<a href="https://kosukhin.github.io/patron-web-api.site/" target="_blank">Silentium Редактор схем</a>
|
|
202
84
|
</div>
|
|
203
85
|
</div>
|
|
204
86
|
</div>
|
|
205
87
|
</div>
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
>
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
>@patron-oop</a
|
|
218
|
-
>
|
|
219
|
-
</p>
|
|
220
|
-
<span
|
|
221
|
-
class="sm:ml-auto sm:mt-0 mt-2 sm:w-auto w-full sm:text-left text-center text-gray-500 text-sm"
|
|
222
|
-
>
|
|
223
|
-
patron components
|
|
224
|
-
</span>
|
|
225
|
-
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="bg-gray-100">
|
|
90
|
+
<div class="container mx-auto py-4 px-5 flex flex-wrap flex-col sm:flex-row">
|
|
91
|
+
<p class="text-gray-500 text-sm">
|
|
92
|
+
© 2025 Patron —
|
|
93
|
+
<a href="https://github.com/kosukhin/patron" class="text-gray-600 ml-1" target="_blank"
|
|
94
|
+
rel="noopener noreferrer">@silentium</a>
|
|
95
|
+
</p>
|
|
96
|
+
<span class="sm:ml-auto sm:mt-0 mt-2 sm:w-auto w-full sm:text-left text-center text-gray-500 text-sm">
|
|
97
|
+
|
|
98
|
+
</span>
|
|
226
99
|
</div>
|
|
227
|
-
</
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
</body>
|
|
100
|
+
</div>
|
|
101
|
+
</footer>
|
|
102
|
+
<script src="./assets/js/index.mjs" type="module"></script>
|
|
103
|
+
</body>
|
|
104
|
+
|
|
233
105
|
</html>
|