nanosplash 3.0.8 → 3.1.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.
- package/.prettierrc +1 -1
- package/README.md +52 -4
- package/bun.lockb +0 -0
- package/dist/cjs/ns.cjs +1 -2
- package/dist/es/ns.js +42 -340
- package/dist/iife/ns.iife.js +1 -2
- package/docs/.vitepress/.temp/@localSearchIndexroot.Ba2B1gNE.js +4 -0
- package/docs/.vitepress/.temp/Card.Ce4dbGEn.js +30 -0
- package/docs/.vitepress/.temp/VPLocalSearchBox.DV6bivXX.js +382 -0
- package/docs/.vitepress/.temp/api_doc_hide.md.js +25 -0
- package/docs/.vitepress/.temp/api_doc_show.md.js +25 -0
- package/docs/.vitepress/.temp/api_start_customize.md.js +42 -0
- package/docs/.vitepress/.temp/api_start_features.md.js +19 -0
- package/docs/.vitepress/.temp/api_start_install.md.js +35 -0
- package/docs/.vitepress/.temp/api_start_playground.md.js +213 -0
- package/docs/.vitepress/.temp/api_start_usage.md.js +36 -0
- package/docs/.vitepress/.temp/app.js +5090 -0
- package/docs/.vitepress/.temp/assets/style.lcyfX_uc.css +5374 -0
- package/docs/.vitepress/.temp/index.md.js +19 -0
- package/docs/.vitepress/.temp/macos.jpg +0 -0
- package/docs/.vitepress/.temp/package.json +1 -0
- package/docs/.vitepress/.temp/plugin-vue_export-helper.1tPrXgE0.js +10 -0
- package/docs/.vitepress/{config.ts → config.mts} +46 -44
- package/docs/.vitepress/theme/css/style.css +107 -6
- package/docs/.vitepress/theme/vue/CardGrid.vue +1 -1
- package/docs/.vitepress/theme/vue/Exe.vue +58 -28
- package/docs/.vitepress/theme/vue/PlayGround.vue +5 -21
- package/docs/api/doc/hide.md +12 -33
- package/docs/api/doc/show.md +12 -13
- package/docs/api/start/customize.md +30 -0
- package/docs/api/start/features.md +3 -3
- package/docs/api/start/install.md +12 -8
- package/docs/api/start/playground.md +1 -1
- package/docs/api/start/usage.md +4 -7
- package/docs/index.md +25 -25
- package/docs/public/macos.jpg +0 -0
- package/eslint.config.js +9 -0
- package/package.json +54 -48
- package/src/style/ns.sass +98 -73
- package/src/ts/Nanosplash.ts +209 -0
- package/src/ts/main.ts +2 -8
- package/src/ts/types/NanosplashInterface.ts +26 -0
- package/src/ts/types/Types.ts +29 -3
- package/src/ts/types/global.d.ts +9 -9
- package/tests/Nanosplash.spec.ts +33 -0
- package/.prettierignore +0 -1
- package/src/ts/core/DomUtilities.ts +0 -161
- package/src/ts/core/Service.ts +0 -211
- package/src/ts/core/ServiceInterface.ts +0 -58
- package/src/ts/core/Splash.ts +0 -121
- package/src/ts/core/SplashInterface.ts +0 -46
- package/src/ts/core/SplashQueue.ts +0 -49
- package/tests/DomUtilities.spec.ts +0 -117
- package/tests/Guid.spec.ts +0 -21
- package/tests/Service.spec.ts +0 -198
- package/tests/Splash.spec.ts +0 -64
- package/tests/TestUtilities.ts +0 -48
package/.prettierrc
CHANGED
package/README.md
CHANGED
|
@@ -12,10 +12,58 @@
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
+
### Show
|
|
16
|
+
|
|
17
|
+
#### Spinner only
|
|
18
|
+
|
|
19
|
+
Fullscreen Nanosplash with spinner only.
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
ns.show()
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Nanosplash inside the given element with spinner only.
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
ns.show(null, '#my-div')
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### Text and spinner
|
|
32
|
+
|
|
33
|
+
Fullscreen Nanosplash with text and spinner.
|
|
34
|
+
|
|
15
35
|
```js
|
|
16
|
-
|
|
17
|
-
|
|
36
|
+
ns.show('Hi')
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Nanosplash inside the given element with text and spinner.
|
|
18
40
|
|
|
19
|
-
|
|
20
|
-
ns.
|
|
41
|
+
```js
|
|
42
|
+
ns.show('Hi', '#my-div')
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Hide
|
|
46
|
+
|
|
47
|
+
#### Agnostic (FIFO)
|
|
48
|
+
|
|
49
|
+
Remove the oldest Nanosplash residing inside the window body.
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
ns.hide()
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### Specific
|
|
56
|
+
|
|
57
|
+
Remove a specific Nanosplash by its ID.
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
ns.hide(id)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### All
|
|
64
|
+
|
|
65
|
+
Remove all Nanosplashes.
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
ns.hide('*')
|
|
21
69
|
```
|
package/bun.lockb
CHANGED
|
Binary file
|
package/dist/cjs/ns.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
`;class E{constructor(){r(this,"queue");this.queue=[]}enqueue(e){return this.queue.push(e),this}dequeue(){return this.queue.shift()}get(e){return this.queue.find(t=>t.getId()===e)}delete(e){const t=this.queue.findIndex(n=>n.getId()===e);if(t!==-1)return this.queue.splice(t,1)[0]}}const i=class i{constructor(){r(this,"version");r(this,"nsQueue");this.version=y,this.nsQueue=new E,i.addStyle()}static addStyle(){const e=x(`<style>${T}</style>`);document.body.append(e)}static getInstance(){return i.instance||(i.instance=new i),i.instance}static assignToWindow(){Object.defineProperty(window,i.WindowAccessorKey,{value:i.getInstance(),writable:!1})}static start(){window[i.WindowAccessorKey]||i.assignToWindow()}createNS(e){const t=new o().setText(e||"");return this.nsQueue.enqueue(t),t}cleanAndRemoveFromDOM(e){var t;return e?(g(((t=e.getElement())==null?void 0:t.parentElement)??null),e.delete()):!1}deleteNS(e){return this.cleanAndRemoveFromDOM(this.nsQueue.delete(e)??null)}show(e){return this.showInside(document.body,e)}showInside(e,t){try{const n=h(e),d=f(n)??this.createNS();k(d.getElement(),n);const l=t?String(t):"";return d.setText(l).getId()}catch(n){return console.error(n),null}}hide(){const e=this.nsQueue.dequeue();return e?(this.cleanAndRemoveFromDOM(e),e.getId()):null}hideAll(){let e=this.nsQueue.dequeue();for(;e;)this.cleanAndRemoveFromDOM(e),e=this.nsQueue.dequeue()}hideId(e){return this.deleteNS(e)?e:null}hideInside(e){try{const t=f(h(e)),n=(t==null?void 0:t.getId())??"";return this.deleteNS(n??"")?n:null}catch(t){return console.error(t),null}}};r(i,"WindowAccessorKey","ns"),r(i,"instance");let c=i;const z={Service:c};exports.Service=c;exports.default=z;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v='@keyframes nsRotate{to{transform:rotate(360deg)}}@keyframes nsDash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}@keyframes nsFade{0%{opacity:0}to{opacity:1}}@keyframes nsAscend{0%{opacity:0;transform:translateY(13px)}to{opacity:1;transform:translateY(0)}}:root{--ns-top: 0px}.ns,body.nsh,body.nsh:before,.nsh:before{width:100%;height:100%}.ns,.nsh:before{bottom:0;right:0}.ns{display:flex;justify-content:center;align-items:center}.nsh{--color: DarkSlateGray;--size: 20px;--relSize: calc(var(--size) * .9);--font: "Helvetica", "Arial", sans-serif;--weight: 400;--bg: rgba(255, 255, 255, .9);--zIdx: 999999999;--blur: blur(5px)}.nsh{position:relative;z-index:var(--zIdx)}.nsh:before{position:absolute;background-color:var(--bg);content:"";backdrop-filter:var(--blur);-webkit-backdrop-filter:var(--blur);z-index:calc(var(--zIdx) + 1);border-radius:inherit}body.nsh,body.nsh:before{position:fixed;top:var(--ns-top);left:0}.ns{position:absolute;z-index:calc(var(--zIdx) + 2);animation:nsFade 2s;gap:var(--relSize)}.nst{color:var(--color);font-size:var(--size);font-family:var(--font);font-weight:var(--weight);max-width:80dvw;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-shadow:0 0 .06rem rgba(47,79,79,.25);filter:drop-shadow(0 0 .07rem rgba(0,0,0,.25));animation:nsAscend .5s}.nss{display:block;width:var(--relSize);height:var(--relSize);animation:nsAscend .5s}.nss>svg{animation:nsRotate 2s linear infinite;position:relative;width:inherit;height:inherit;stroke-width:8}.nss .path{stroke:var(--color);stroke-linecap:round;animation:nsDash 1.5s ease-in-out infinite}',y="3.1.0",m="nscss",i=()=>document.body,a=e=>(t=>({all:t,first:s=>t(s)[0]??null}))(t=>Array.from(e.querySelectorAll(t))),l=e=>a(document).all(e),d=e=>a(document).first(e),f=()=>l(".ns"),b=e=>e instanceof Element?e:d(e),r=(e,...t)=>{const s=document.createElement("div");return e&&s.classList.add(e),s.append(...t),s},h=e=>{const t=r();return t.innerHTML=e,t.firstChild},u=()=>{const t=h('<svg viewBox="0 0 50 50"><circle class=path cx=25 cy=25 r=20 fill=none /></svg>'),s=r("ns",r("nst"),r("nss",t));return s.nsId=Date.now(),s},g=()=>f().sort((e,t)=>e.nsId-t.nsId)[0]??null,w=(e,t)=>{const n=a(e).first(".nst");if(!t)return n==null?void 0:n.remove();const o=r("nst",t);n?n.replaceWith(o):e.insertBefore(o,e.firstChild)},k=(e,t)=>{const s=t.firstElementChild;s&&t.insertBefore(e,s),t.append(e),t.classList.add("nsh")},x=(e,t)=>{const s=t?b(t):i;let n;const o=a(s??i()).first("& > .ns");o?n=o:(n=u(),k(n,s)),w(n,e??"");const p=window.scrollY+"px";return i().style.setProperty("--ns-top",p),n.nsId},c=e=>{var t;(t=e==null?void 0:e.parentElement)==null||t.classList.remove("nsh"),e==null||e.remove()},S=e=>f().find(t=>t.nsId===e)??null,z=e=>{e==="*"?l(".ns").forEach(c):c(typeof e=="number"?S(e):g())},I=()=>{var e;(e=d("#nscss"))==null||e.remove(),i().append(h(`<style id=${m}>${v}</style>`))},A=()=>!!new Promise(I)&&(window.ns={show:x,hide:z,version:y});exports.useNs=A;
|
package/dist/es/ns.js
CHANGED
|
@@ -1,342 +1,44 @@
|
|
|
1
|
-
var m =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
getElement() {
|
|
43
|
-
return this.element;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* @inheritdoc
|
|
47
|
-
*/
|
|
48
|
-
getTextElement() {
|
|
49
|
-
var e, t;
|
|
50
|
-
return ((t = (e = this.getElement()) == null ? void 0 : e.firstElementChild) == null ? void 0 : t.firstElementChild) ?? null;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @inheritdoc
|
|
54
|
-
*/
|
|
55
|
-
setText(e) {
|
|
56
|
-
return this.getTextElement().innerText = e, e.length > 0 ? this.showText() : this.hideText(), this;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @inheritdoc
|
|
60
|
-
*/
|
|
61
|
-
showText() {
|
|
62
|
-
return I(this.getTextElement()), this;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* @inheritdoc
|
|
66
|
-
*/
|
|
67
|
-
hideText() {
|
|
68
|
-
return S(this.getTextElement()), this;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* @inheritdoc
|
|
72
|
-
*/
|
|
73
|
-
delete() {
|
|
74
|
-
return this.id = null, this.element !== null && (this.element.innerHTML = "", this.element.remove(), this.element = null), this.element === null;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* # CSS Class Name
|
|
79
|
-
* The main CSS class name of the root element of a Nanosplash component.
|
|
80
|
-
*/
|
|
81
|
-
r(a, "NSClass", "ns"), /**
|
|
82
|
-
* # Host CSS Class Name
|
|
83
|
-
* The CSS class name of the host element of a Nanosplash component.
|
|
84
|
-
* The host element is the element that the Nanosplash is attached to.
|
|
85
|
-
*/
|
|
86
|
-
r(a, "NSHostClass", "nsh");
|
|
87
|
-
let o = a;
|
|
88
|
-
function x(s) {
|
|
89
|
-
return ((e) => (
|
|
90
|
-
// @ts-ignore
|
|
91
|
-
(() => e.firstChild)(e.innerHTML = s)
|
|
92
|
-
))(
|
|
93
|
-
document.createElement("div")
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
function w() {
|
|
97
|
-
return x(
|
|
98
|
-
'<div class=ns><div class=nsc><div class=nst></div><div class=nss><svg viewBox="0 0 50 50"><circle class=path cx=25 cy=25 r=20 fill=none></circle></svg></div></div></div>'
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
function b(s, e) {
|
|
102
|
-
e.children.length > 0 ? e.insertBefore(s, e.children.item(0)) : e.append(s);
|
|
103
|
-
}
|
|
104
|
-
function p(s) {
|
|
105
|
-
s == null || s.classList.add(o.NSHostClass);
|
|
106
|
-
}
|
|
107
|
-
function g(s) {
|
|
108
|
-
s == null || s.classList.remove(o.NSHostClass);
|
|
109
|
-
}
|
|
110
|
-
function I(s) {
|
|
111
|
-
s.style.display = "flex";
|
|
112
|
-
}
|
|
113
|
-
function S(s) {
|
|
114
|
-
s.style.display = "none";
|
|
115
|
-
}
|
|
116
|
-
function h(s) {
|
|
117
|
-
switch (typeof s) {
|
|
118
|
-
case "object":
|
|
119
|
-
const e = s === document.body, t = s instanceof Element;
|
|
120
|
-
if (e || t)
|
|
121
|
-
return s;
|
|
122
|
-
throw new Error(
|
|
123
|
-
"Reference is an object but not an Element instance."
|
|
124
|
-
);
|
|
125
|
-
case "string":
|
|
126
|
-
return document.querySelector(s);
|
|
127
|
-
default:
|
|
128
|
-
throw new Error("Reference is not an object or a string.");
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function k(s, e) {
|
|
132
|
-
g(s.parentElement), p(e), b(s, e);
|
|
133
|
-
}
|
|
134
|
-
function f(s) {
|
|
135
|
-
const e = Array.from(s.children || []), t = d.getInstance();
|
|
136
|
-
let n = null;
|
|
137
|
-
const c = e.length;
|
|
138
|
-
for (let l = 0; l < c; l++) {
|
|
139
|
-
const u = e[l];
|
|
140
|
-
if (u.classList.contains(o.NSClass)) {
|
|
141
|
-
n = t.nsQueue.get(u.id) ?? null;
|
|
142
|
-
break;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return n;
|
|
146
|
-
}
|
|
147
|
-
const E = `.ns,.nsh:before{width:100%;height:100%}.ns,.nsh:before{top:0;left:0}.nsc,.ns{display:flex;justify-content:center;align-items:center}.nsh{--color: DarkSlateGray;--size: 20px;--relSize: calc(var(--size) * .9);--font: "Helvetica", "Arial", sans-serif;--weight: 400;--bg: rgba(255, 255, 255, .8);--zIdx: 999999999;--blur: blur(10px)}.nsh{position:relative;z-index:var(--zIdx)}.nsh:before{position:absolute;background-color:var(--bg);content:"";backdrop-filter:var(--blur);-webkit-backdrop-filter:var(--blur);z-index:calc(var(--zIdx) + 1);border-radius:inherit}body.nsh{height:100vh}.ns{position:absolute;z-index:calc(var(--zIdx) + 2)}.nsc{filter:drop-shadow(0 0 .1rem rgba(211,211,211,.5))}.nst{color:var(--color);font-size:var(--size);font-family:var(--font);font-weight:var(--weight);margin-right:var(--relSize);text-shadow:0 0 .06rem rgba(47,79,79,.25)}.nss{display:block;width:var(--relSize);height:var(--relSize)}.nss>svg{animation:Rotate 2s linear infinite;position:relative;width:inherit;height:inherit;stroke-width:8}.nss .path{stroke:var(--color);stroke-linecap:round;animation:Dash 1.5s ease-in-out infinite}@keyframes Rotate{to{transform:rotate(360deg)}}@keyframes Dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}
|
|
148
|
-
`;
|
|
149
|
-
class T {
|
|
150
|
-
constructor() {
|
|
151
|
-
r(this, "queue");
|
|
152
|
-
this.queue = [];
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* # Enqueue
|
|
156
|
-
* Add a new item to the queue.
|
|
157
|
-
* @param item The item to add to the queue.
|
|
158
|
-
*/
|
|
159
|
-
enqueue(e) {
|
|
160
|
-
return this.queue.push(e), this;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* # Dequeue
|
|
164
|
-
* Remove the first item from the queue.
|
|
165
|
-
* @returns The first item from the queue.
|
|
166
|
-
*/
|
|
167
|
-
dequeue() {
|
|
168
|
-
return this.queue.shift();
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* # Get
|
|
172
|
-
* @param id The GUID of the Nanosplash to get.
|
|
173
|
-
* @returns The Nanosplash with the given GUID.
|
|
174
|
-
*/
|
|
175
|
-
get(e) {
|
|
176
|
-
return this.queue.find((t) => t.getId() === e);
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* # Delete
|
|
180
|
-
* @param id The GUID of the Nanosplash to delete.
|
|
181
|
-
* @returns The deleted Nanosplash.
|
|
182
|
-
*/
|
|
183
|
-
delete(e) {
|
|
184
|
-
const t = this.queue.findIndex((n) => n.getId() === e);
|
|
185
|
-
if (t !== -1)
|
|
186
|
-
return this.queue.splice(t, 1)[0];
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
const i = class i {
|
|
190
|
-
/**
|
|
191
|
-
* # Constructor
|
|
192
|
-
* Private constructor to prevent multiple instances.
|
|
193
|
-
* @private
|
|
194
|
-
*/
|
|
195
|
-
constructor() {
|
|
196
|
-
/**
|
|
197
|
-
* # Version
|
|
198
|
-
*/
|
|
199
|
-
r(this, "version");
|
|
200
|
-
/**
|
|
201
|
-
* @inheritdoc
|
|
202
|
-
*/
|
|
203
|
-
r(this, "nsQueue");
|
|
204
|
-
this.version = y, this.nsQueue = new T(), i.addStyle();
|
|
205
|
-
}
|
|
206
|
-
/**e
|
|
207
|
-
* # Add Style
|
|
208
|
-
* Add Nanosplash CSS to the DOM.
|
|
209
|
-
*/
|
|
210
|
-
static addStyle() {
|
|
211
|
-
const e = x(`<style>${E}</style>`);
|
|
212
|
-
document.body.append(e);
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* # Get Instance
|
|
216
|
-
* Singleton instance accessor
|
|
217
|
-
* @returns {Service} NanosplashService instance
|
|
218
|
-
*/
|
|
219
|
-
static getInstance() {
|
|
220
|
-
return i.instance || (i.instance = new i()), i.instance;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* # Assign To Window
|
|
224
|
-
* Assign a NanosplashService instance to the Window object.
|
|
225
|
-
* The NanosplashService instance can be accessed in the window object
|
|
226
|
-
* using the key window accessor key.
|
|
227
|
-
* @see WindowAccessorKey
|
|
228
|
-
* @private
|
|
229
|
-
*/
|
|
230
|
-
static assignToWindow() {
|
|
231
|
-
Object.defineProperty(window, i.WindowAccessorKey, {
|
|
232
|
-
value: i.getInstance(),
|
|
233
|
-
writable: !1
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* # Start
|
|
238
|
-
* Initialize and attach a Nanosplash Service instance to the Window object.
|
|
239
|
-
*/
|
|
240
|
-
static start() {
|
|
241
|
-
window[i.WindowAccessorKey] || i.assignToWindow();
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* # Create Nanosplash
|
|
245
|
-
* Return new Nanosplash instance and push it to the stack.
|
|
246
|
-
* @param text Text to display.
|
|
247
|
-
* @returns {Splash} Nanosplash instance.
|
|
248
|
-
* @private
|
|
249
|
-
*/
|
|
250
|
-
createNS(e) {
|
|
251
|
-
const t = new o().setText(e || "");
|
|
252
|
-
return this.nsQueue.enqueue(t), t;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* # Clean And Remove From DOM
|
|
256
|
-
* Remove Nanosplash from DOM and clean its parent.
|
|
257
|
-
* @param ns Nanosplash instance.
|
|
258
|
-
* @returns True if Nanosplash was removed from DOM.
|
|
259
|
-
* @private
|
|
260
|
-
*/
|
|
261
|
-
cleanAndRemoveFromDOM(e) {
|
|
262
|
-
var t;
|
|
263
|
-
return e ? (g(((t = e.getElement()) == null ? void 0 : t.parentElement) ?? null), e.delete()) : !1;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* # Delete NS
|
|
267
|
-
* Remove Nanosplash instance from both the stack and the
|
|
268
|
-
* @param guid Nanosplash ID.
|
|
269
|
-
* @returns True if Nanosplash was removed from DOM.
|
|
270
|
-
* @private
|
|
271
|
-
*/
|
|
272
|
-
deleteNS(e) {
|
|
273
|
-
return this.cleanAndRemoveFromDOM(this.nsQueue.delete(e) ?? null);
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* @inheritdoc
|
|
277
|
-
*/
|
|
278
|
-
show(e) {
|
|
279
|
-
return this.showInside(document.body, e);
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* @inheritdoc
|
|
283
|
-
*/
|
|
284
|
-
showInside(e, t) {
|
|
285
|
-
try {
|
|
286
|
-
const n = h(e), c = f(n) ?? this.createNS();
|
|
287
|
-
k(c.getElement(), n);
|
|
288
|
-
const l = t ? String(t) : "";
|
|
289
|
-
return c.setText(l).getId();
|
|
290
|
-
} catch (n) {
|
|
291
|
-
return console.error(n), null;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* @inheritdoc
|
|
296
|
-
*/
|
|
297
|
-
hide() {
|
|
298
|
-
const e = this.nsQueue.dequeue();
|
|
299
|
-
return e ? (this.cleanAndRemoveFromDOM(e), e.getId()) : null;
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* @inheritdoc
|
|
303
|
-
*/
|
|
304
|
-
hideAll() {
|
|
305
|
-
let e = this.nsQueue.dequeue();
|
|
306
|
-
for (; e; )
|
|
307
|
-
this.cleanAndRemoveFromDOM(e), e = this.nsQueue.dequeue();
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* @inheritdoc
|
|
311
|
-
*/
|
|
312
|
-
hideId(e) {
|
|
313
|
-
return this.deleteNS(e) ? e : null;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* @inheritdoc
|
|
317
|
-
*/
|
|
318
|
-
hideInside(e) {
|
|
319
|
-
try {
|
|
320
|
-
const t = f(h(e)), n = (t == null ? void 0 : t.getId()) ?? "";
|
|
321
|
-
return this.deleteNS(n ?? "") ? n : null;
|
|
322
|
-
} catch (t) {
|
|
323
|
-
return console.error(t), null;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
/**
|
|
328
|
-
* # Window Accessor Key
|
|
329
|
-
* Key to access NanosplashService instance in the Window object.
|
|
330
|
-
*/
|
|
331
|
-
r(i, "WindowAccessorKey", "ns"), /**
|
|
332
|
-
* # Instance
|
|
333
|
-
* Singleton instance of NanosplashService.
|
|
334
|
-
* @private
|
|
335
|
-
*/
|
|
336
|
-
r(i, "instance");
|
|
337
|
-
let d = i;
|
|
338
|
-
const q = { Service: d };
|
|
1
|
+
const v = '@keyframes nsRotate{to{transform:rotate(360deg)}}@keyframes nsDash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}@keyframes nsFade{0%{opacity:0}to{opacity:1}}@keyframes nsAscend{0%{opacity:0;transform:translateY(13px)}to{opacity:1;transform:translateY(0)}}:root{--ns-top: 0px}.ns,body.nsh,body.nsh:before,.nsh:before{width:100%;height:100%}.ns,.nsh:before{bottom:0;right:0}.ns{display:flex;justify-content:center;align-items:center}.nsh{--color: DarkSlateGray;--size: 20px;--relSize: calc(var(--size) * .9);--font: "Helvetica", "Arial", sans-serif;--weight: 400;--bg: rgba(255, 255, 255, .9);--zIdx: 999999999;--blur: blur(5px)}.nsh{position:relative;z-index:var(--zIdx)}.nsh:before{position:absolute;background-color:var(--bg);content:"";backdrop-filter:var(--blur);-webkit-backdrop-filter:var(--blur);z-index:calc(var(--zIdx) + 1);border-radius:inherit}body.nsh,body.nsh:before{position:fixed;top:var(--ns-top);left:0}.ns{position:absolute;z-index:calc(var(--zIdx) + 2);animation:nsFade 2s;gap:var(--relSize)}.nst{color:var(--color);font-size:var(--size);font-family:var(--font);font-weight:var(--weight);max-width:80dvw;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-shadow:0 0 .06rem rgba(47,79,79,.25);filter:drop-shadow(0 0 .07rem rgba(0,0,0,.25));animation:nsAscend .5s}.nss{display:block;width:var(--relSize);height:var(--relSize);animation:nsAscend .5s}.nss>svg{animation:nsRotate 2s linear infinite;position:relative;width:inherit;height:inherit;stroke-width:8}.nss .path{stroke:var(--color);stroke-linecap:round;animation:nsDash 1.5s ease-in-out infinite}', y = "3.1.0", m = "nscss", i = () => document.body, a = (e) => /* @__PURE__ */ ((t) => ({
|
|
2
|
+
all: t,
|
|
3
|
+
first: (s) => t(s)[0] ?? null
|
|
4
|
+
}))((t) => Array.from(e.querySelectorAll(t))), l = (e) => a(document).all(e), d = (e) => a(document).first(e), f = () => l(".ns"), b = (e) => e instanceof Element ? e : d(e), r = (e, ...t) => {
|
|
5
|
+
const s = document.createElement("div");
|
|
6
|
+
return e && s.classList.add(e), s.append(...t), s;
|
|
7
|
+
}, h = (e) => {
|
|
8
|
+
const t = r();
|
|
9
|
+
return t.innerHTML = e, t.firstChild;
|
|
10
|
+
}, u = () => {
|
|
11
|
+
const t = h('<svg viewBox="0 0 50 50"><circle class=path cx=25 cy=25 r=20 fill=none /></svg>'), s = r("ns", r("nst"), r("nss", t));
|
|
12
|
+
return s.nsId = Date.now(), s;
|
|
13
|
+
}, w = () => f().sort((e, t) => e.nsId - t.nsId)[0] ?? null, g = (e, t) => {
|
|
14
|
+
const n = a(e).first(".nst");
|
|
15
|
+
if (!t)
|
|
16
|
+
return n == null ? void 0 : n.remove();
|
|
17
|
+
const o = r("nst", t);
|
|
18
|
+
n ? n.replaceWith(o) : e.insertBefore(o, e.firstChild);
|
|
19
|
+
}, k = (e, t) => {
|
|
20
|
+
const s = t.firstElementChild;
|
|
21
|
+
s && t.insertBefore(e, s), t.append(e), t.classList.add("nsh");
|
|
22
|
+
}, x = (e, t) => {
|
|
23
|
+
const s = t ? b(t) : i;
|
|
24
|
+
let n;
|
|
25
|
+
const o = a(s ?? i()).first("& > .ns");
|
|
26
|
+
o ? n = o : (n = u(), k(n, s)), g(n, e ?? "");
|
|
27
|
+
const p = window.scrollY + "px";
|
|
28
|
+
return i().style.setProperty("--ns-top", p), n.nsId;
|
|
29
|
+
}, c = (e) => {
|
|
30
|
+
var t;
|
|
31
|
+
(t = e == null ? void 0 : e.parentElement) == null || t.classList.remove("nsh"), e == null || e.remove();
|
|
32
|
+
}, S = (e) => f().find((t) => t.nsId === e) ?? null, z = (e) => {
|
|
33
|
+
e === "*" ? l(".ns").forEach(c) : c(typeof e == "number" ? S(e) : w());
|
|
34
|
+
}, I = () => {
|
|
35
|
+
var e;
|
|
36
|
+
(e = d("#nscss")) == null || e.remove(), i().append(h(`<style id=${m}>${v}</style>`));
|
|
37
|
+
}, A = () => !!new Promise(I) && (window.ns = {
|
|
38
|
+
show: x,
|
|
39
|
+
hide: z,
|
|
40
|
+
version: y
|
|
41
|
+
});
|
|
339
42
|
export {
|
|
340
|
-
|
|
341
|
-
q as default
|
|
43
|
+
A as useNs
|
|
342
44
|
};
|
package/dist/iife/ns.iife.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
`;class S{constructor(){o(this,"queue");this.queue=[]}enqueue(e){return this.queue.push(e),this}dequeue(){return this.queue.shift()}get(e){return this.queue.find(n=>n.getId()===e)}delete(e){const n=this.queue.findIndex(r=>r.getId()===e);if(n!==-1)return this.queue.splice(n,1)[0]}}const i=class i{constructor(){o(this,"version");o(this,"nsQueue");this.version=l,this.nsQueue=new S,i.addStyle()}static addStyle(){const e=a(`<style>${k}</style>`);document.body.append(e)}static getInstance(){return i.instance||(i.instance=new i),i.instance}static assignToWindow(){Object.defineProperty(window,i.WindowAccessorKey,{value:i.getInstance(),writable:!1})}static start(){window[i.WindowAccessorKey]||i.assignToWindow()}createNS(e){const n=new s().setText(e||"");return this.nsQueue.enqueue(n),n}cleanAndRemoveFromDOM(e){var n;return e?(f(((n=e.getElement())==null?void 0:n.parentElement)??null),e.delete()):!1}deleteNS(e){return this.cleanAndRemoveFromDOM(this.nsQueue.delete(e)??null)}show(e){return this.showInside(document.body,e)}showInside(e,n){try{const r=x(e),h=g(r)??this.createNS();I(h.getElement(),r);const d=n?String(n):"";return h.setText(d).getId()}catch(r){return console.error(r),null}}hide(){const e=this.nsQueue.dequeue();return e?(this.cleanAndRemoveFromDOM(e),e.getId()):null}hideAll(){let e=this.nsQueue.dequeue();for(;e;)this.cleanAndRemoveFromDOM(e),e=this.nsQueue.dequeue()}hideId(e){return this.deleteNS(e)?e:null}hideInside(e){try{const n=g(x(e)),r=(n==null?void 0:n.getId())??"";return this.deleteNS(r??"")?r:null}catch(n){return console.error(n),null}}};o(i,"WindowAccessorKey","ns"),o(i,"instance");let u=i;try{u.start()}catch(t){console.warn(t)}})();
|
|
1
|
+
(function(){"use strict";const p='@keyframes nsRotate{to{transform:rotate(360deg)}}@keyframes nsDash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}@keyframes nsFade{0%{opacity:0}to{opacity:1}}@keyframes nsAscend{0%{opacity:0;transform:translateY(13px)}to{opacity:1;transform:translateY(0)}}:root{--ns-top: 0px}.ns,body.nsh,body.nsh:before,.nsh:before{width:100%;height:100%}.ns,.nsh:before{bottom:0;right:0}.ns{display:flex;justify-content:center;align-items:center}.nsh{--color: DarkSlateGray;--size: 20px;--relSize: calc(var(--size) * .9);--font: "Helvetica", "Arial", sans-serif;--weight: 400;--bg: rgba(255, 255, 255, .9);--zIdx: 999999999;--blur: blur(5px)}.nsh{position:relative;z-index:var(--zIdx)}.nsh:before{position:absolute;background-color:var(--bg);content:"";backdrop-filter:var(--blur);-webkit-backdrop-filter:var(--blur);z-index:calc(var(--zIdx) + 1);border-radius:inherit}body.nsh,body.nsh:before{position:fixed;top:var(--ns-top);left:0}.ns{position:absolute;z-index:calc(var(--zIdx) + 2);animation:nsFade 2s;gap:var(--relSize)}.nst{color:var(--color);font-size:var(--size);font-family:var(--font);font-weight:var(--weight);max-width:80dvw;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-shadow:0 0 .06rem rgba(47,79,79,.25);filter:drop-shadow(0 0 .07rem rgba(0,0,0,.25));animation:nsAscend .5s}.nss{display:block;width:var(--relSize);height:var(--relSize);animation:nsAscend .5s}.nss>svg{animation:nsRotate 2s linear infinite;position:relative;width:inherit;height:inherit;stroke-width:8}.nss .path{stroke:var(--color);stroke-linecap:round;animation:nsDash 1.5s ease-in-out infinite}',v="3.1.0",y="nscss",i=()=>document.body,a=e=>(s=>({all:s,first:t=>s(t)[0]??null}))(s=>Array.from(e.querySelectorAll(s))),c=e=>a(document).all(e),l=e=>a(document).first(e),d=()=>c(".ns"),m=e=>e instanceof Element?e:l(e),o=(e,...s)=>{const t=document.createElement("div");return e&&t.classList.add(e),t.append(...s),t},f=e=>{const s=o();return s.innerHTML=e,s.firstChild},b=()=>{const s=f('<svg viewBox="0 0 50 50"><circle class=path cx=25 cy=25 r=20 fill=none /></svg>'),t=o("ns",o("nst"),o("nss",s));return t.nsId=Date.now(),t},u=()=>d().sort((e,s)=>e.nsId-s.nsId)[0]??null,w=(e,s)=>{const n=a(e).first(".nst");if(!s)return n==null?void 0:n.remove();const r=o("nst",s);n?n.replaceWith(r):e.insertBefore(r,e.firstChild)},g=(e,s)=>{const t=s.firstElementChild;t&&s.insertBefore(e,t),s.append(e),s.classList.add("nsh")},k=(e,s)=>{const t=s?m(s):i;let n;const r=a(t??i()).first("& > .ns");r?n=r:(n=b(),g(n,t)),w(n,e??"");const I=window.scrollY+"px";return i().style.setProperty("--ns-top",I),n.nsId},h=e=>{var s;(s=e==null?void 0:e.parentElement)==null||s.classList.remove("nsh"),e==null||e.remove()},x=e=>d().find(s=>s.nsId===e)??null,S=e=>{e==="*"?c(".ns").forEach(h):h(typeof e=="number"?x(e):u())},z=()=>{var e;(e=l("#nscss"))==null||e.remove(),i().append(f(`<style id=${y}>${p}</style>`))};!!new Promise(z)&&(window.ns={show:k,hide:S,version:v})})();
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const _localSearchIndexroot = '{"documentCount":19,"nextId":19,"documentIds":{"0":"/nanosplash/api/doc/hide.html#hide-nanosplash","1":"/nanosplash/api/doc/hide.html#hide","2":"/nanosplash/api/doc/hide.html#hide-by-id","3":"/nanosplash/api/doc/hide.html#hide-all","4":"/nanosplash/api/doc/show.html#show-nanosplash","5":"/nanosplash/api/doc/show.html#show","6":"/nanosplash/api/doc/show.html#show-inside","7":"/nanosplash/api/start/customize.html#customize","8":"/nanosplash/api/start/features.html#features","9":"/nanosplash/api/start/features.html#small-bundle-size","10":"/nanosplash/api/start/features.html#simple-2-function-api","11":"/nanosplash/api/start/features.html#spawning","12":"/nanosplash/api/start/features.html#node-recycling","13":"/nanosplash/api/start/install.html#installation","14":"/nanosplash/api/start/install.html#css","15":"/nanosplash/api/start/install.html#install-via-cdn","16":"/nanosplash/api/start/install.html#install-via-npm","17":"/nanosplash/api/start/playground.html#playground","18":"/nanosplash/api/start/usage.html#usage"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[2,1,1],"1":[1,2,41],"2":[3,2,32],"3":[2,2,10],"4":[2,1,1],"5":[1,2,30],"6":[2,2,67],"7":[1,1,38],"8":[1,1,1],"9":[3,1,28],"10":[4,1,39],"11":[1,1,26],"12":[2,1,33],"13":[1,1,34],"14":[1,1,9],"15":[3,1,52],"16":[3,1,51],"17":[1,1,27],"18":[1,1,32]},"averageFieldLength":[1.8421052631578947,1.263157894736842,29.05263157894737],"storedFields":{"0":{"title":"Hide Nanosplash","titles":[]},"1":{"title":"Hide","titles":["Hide Nanosplash"]},"2":{"title":"Hide by ID","titles":["Hide Nanosplash"]},"3":{"title":"Hide all","titles":["Hide Nanosplash"]},"4":{"title":"Show Nanosplash","titles":[]},"5":{"title":"Show","titles":["Show Nanosplash"]},"6":{"title":"Show inside","titles":["Show Nanosplash"]},"7":{"title":"Customize","titles":[]},"8":{"title":"Features","titles":[]},"9":{"title":"Small bundle size","titles":["Features"]},"10":{"title":"Simple, 2 Function API","titles":["Features"]},"11":{"title":"Spawning","titles":["Features"]},"12":{"title":"Node recycling","titles":["Features"]},"13":{"title":"Installation","titles":[]},"14":{"title":"CSS","titles":["Installation"]},"15":{"title":"Install via CDN","titles":["Installation"]},"16":{"title":"Install via NPM","titles":["Installation"]},"17":{"title":"Playground","titles":[]},"18":{"title":"Usage","titles":[]}},"dirtCount":0,"index":[["quot",{"2":{"17":2}}],["play",{"2":{"17":1}}],["playground",{"0":{"17":1}}],["parent",{"2":{"12":1}}],["package",{"2":{"10":1}}],["🚀",{"2":{"15":1}}],["8",{"2":{"15":1}}],[">",{"2":{"15":3}}],["x3c",{"2":{"15":13}}],["🎉",{"2":{"14":1}}],["run",{"2":{"17":1}}],["running",{"2":{"13":1,"16":1}}],["requires",{"2":{"13":1}}],["repurpose",{"2":{"12":1}}],["recycle",{"2":{"12":1}}],["recycling",{"0":{"12":1}}],["recommend",{"2":{"1":1}}],["ref",{"2":{"6":1}}],["reference",{"2":{"6":1}}],["returns",{"2":{"2":1,"5":1,"6":1}}],["just",{"2":{"10":1}}],["jsimport",{"2":{"16":1}}],["js",{"2":{"6":1,"14":1,"15":2,"18":1}}],["jsconst",{"2":{"2":1}}],["jsns",{"2":{"1":1,"5":2}}],["utf",{"2":{"15":1}}],["unpkg",{"2":{"15":2}}],["usage",{"0":{"18":1}}],["using",{"2":{"10":1,"15":1,"16":1}}],["usens",{"2":{"16":2}}],["use",{"2":{"10":1,"12":1}}],["used",{"2":{"2":1}}],["up",{"2":{"10":1}}],["2",{"0":{"10":1}}],["2kb",{"2":{"9":1}}],["global",{"2":{"16":1}}],["gt",{"2":{"15":1}}],["getting",{"2":{"10":1}}],["get",{"2":{"10":1}}],["getelementbyid",{"2":{"6":1}}],["ground",{"2":{"10":1}}],["go",{"2":{"9":1,"10":1,"11":1}}],["gzipped",{"2":{"9":1}}],["gap",{"2":{"7":1}}],["\\t\\t",{"2":{"15":4}}],["\\t",{"2":{"15":4}}],["\\theight",{"2":{"7":1}}],["\\twidth",{"2":{"7":1}}],["\\tfont",{"2":{"7":3}}],["\\tcolor",{"2":{"7":1}}],["\\tgap",{"2":{"7":1}}],["\\tbackdrop",{"2":{"7":1}}],["\\tbackground",{"2":{"7":1}}],["via",{"0":{"15":1,"16":1},"2":{"13":3,"16":1}}],["very",{"2":{"10":1}}],["var",{"2":{"7":9}}],["void",{"2":{"1":1,"3":1}}],["data",{"2":{"18":1}}],["dropdown",{"2":{"17":1}}],["dist",{"2":{"15":2}}],["display",{"2":{"5":3,"6":1,"18":1}}],["documentation",{"2":{"11":1}}],["document",{"2":{"6":1}}],["dom",{"2":{"6":2,"11":1,"12":1}}],["does",{"2":{"6":1}}],["either",{"2":{"13":1}}],["each",{"2":{"12":1}}],["easier",{"2":{"13":1}}],["easily",{"2":{"10":1,"15":1}}],["easy",{"2":{"7":1,"10":1}}],["exhausting",{"2":{"12":1}}],["existing",{"2":{"6":1,"12":1}}],["even",{"2":{"11":1}}],["ever",{"2":{"9":1}}],["element",{"2":{"6":8,"11":1,"12":2,"18":1}}],["elements",{"2":{"1":1,"11":1,"12":3}}],["enter",{"2":{"5":2}}],["works",{"2":{"15":1,"16":1,"17":1}}],["would",{"2":{"1":1}}],["we",{"2":{"12":2}}],["weight",{"2":{"7":2,"9":1}}],["want",{"2":{"11":1}}],["was",{"2":{"10":1}}],["written",{"2":{"10":1}}],["what",{"2":{"9":1}}],["wheel",{"2":{"5":2,"18":2}}],["with",{"2":{"10":1,"11":1,"17":1,"18":1}}],["width",{"2":{"7":1}}],["will",{"2":{"5":2,"6":1,"9":1,"16":1}}],["window",{"2":{"3":1,"16":1}}],["lt",{"2":{"15":1}}],["less",{"2":{"9":1,"13":1}}],["loading",{"2":{"2":1,"5":1,"6":2,"18":5}}],["later",{"2":{"2":1}}],["=",{"2":{"2":1,"6":2,"16":1,"18":1}}],["|",{"2":{"2":1,"6":2}}],["menu",{"2":{"17":1}}],["meta",{"2":{"15":1}}],["method",{"2":{"2":1,"17":1}}],["mind",{"2":{"10":1}}],["minified",{"2":{"9":1}}],["manipulations",{"2":{"12":1}}],["main",{"2":{"7":1}}],["match",{"2":{"6":1}}],["my",{"2":{"6":2,"18":1}}],["more",{"2":{"1":1,"13":1}}],["multiple",{"2":{"1":1,"11":1}}],["fetching",{"2":{"18":1}}],["features",{"0":{"8":1},"1":{"9":1,"10":1,"11":1,"12":1}}],["flexible",{"2":{"13":1}}],["from",{"2":{"10":1,"16":1,"17":1}}],["following",{"2":{"15":1,"16":1}}],["font",{"2":{"7":1}}],["for",{"2":{"1":1,"9":1,"12":2}}],["family",{"2":{"7":1}}],["first",{"2":{"18":1}}],["filter",{"2":{"7":2}}],["fifo",{"2":{"1":1,"18":1}}],["fullscreen",{"2":{"5":1,"18":2}}],["function",{"0":{"10":1},"2":{"5":1,"6":1}}],["import",{"2":{"16":2}}],["imports",{"2":{"13":1}}],["iife",{"2":{"15":4}}],["is",{"2":{"7":1,"9":1,"10":1,"12":1,"13":2,"14":1}}],["it",{"2":{"5":2,"15":1,"16":2,"17":2}}],["its",{"2":{"2":1}}],["inject",{"2":{"16":1}}],["included",{"2":{"14":1}}],["initialization",{"2":{"13":1}}],["instead",{"2":{"12":3}}],["installing",{"2":{"13":2}}],["installed",{"2":{"13":1}}],["installation",{"0":{"13":1},"1":{"14":1,"15":1,"16":1}}],["install",{"0":{"15":1,"16":1},"2":{"10":1,"16":1}}],["inside",{"0":{"6":1},"2":{"6":3,"12":1,"14":1,"15":1,"16":1,"18":1}}],["internal",{"2":{"5":1,"6":1}}],["in",{"2":{"3":1,"5":1,"10":2,"11":1,"13":1,"16":1,"17":1}}],["information",{"2":{"1":1}}],["identifier",{"2":{"2":1}}],["id",{"0":{"2":1},"2":{"1":2,"2":5,"5":1,"6":1,"18":2}}],["i",{"2":{"1":1}}],["if",{"2":{"1":1,"5":2,"6":2,"11":1}}],["screens",{"2":{"18":1}}],["screen",{"2":{"18":2}}],["script>",{"2":{"15":2}}],["script",{"2":{"15":3}}],["src=",{"2":{"15":2}}],["so",{"2":{"9":1}}],["simply",{"2":{"15":1,"16":1}}],["simplicity",{"2":{"10":1}}],["simple",{"0":{"10":1},"2":{"10":1}}],["significant",{"2":{"9":1}}],["size",{"0":{"9":1},"2":{"7":2}}],["small",{"0":{"9":1}}],["start",{"2":{"10":1,"15":1,"16":3}}],["started",{"2":{"10":2}}],["stying",{"2":{"7":1}}],["string",{"2":{"5":1,"6":3}}],["select",{"2":{"17":1}}],["selector",{"2":{"6":3}}],["service",{"2":{"13":1,"16":2}}],["seconds",{"2":{"10":1}}],["see",{"2":{"1":1,"9":1,"10":1,"11":1,"17":2}}],["spawn",{"2":{"11":2}}],["spawning",{"0":{"11":1}}],["spinner",{"2":{"7":4}}],["spinning",{"2":{"5":2,"18":2}}],["splash",{"2":{"6":3,"11":2,"12":3}}],["specific",{"2":{"1":1,"2":1,"18":1}}],["same",{"2":{"1":1}}],["show",{"0":{"4":1,"5":1,"6":1},"1":{"5":1,"6":1},"2":{"1":3,"2":2,"5":3,"6":4,"10":1,"15":2,"16":2,"18":4}}],["object",{"2":{"16":1}}],["obsolete",{"2":{"12":1}}],["of",{"2":{"12":2,"13":1,"15":1}}],["overwritten",{"2":{"6":1}}],["or",{"2":{"6":1,"13":1}}],["ones",{"2":{"12":1}}],["one",{"2":{"6":1}}],["only",{"2":{"5":1,"6":1}}],["on",{"2":{"1":1}}],["open",{"2":{"1":1}}],["oldest",{"2":{"1":1}}],["here",{"2":{"17":1}}],["head>",{"2":{"15":2}}],["height",{"2":{"7":1}}],["https",{"2":{"15":2}}],["html>",{"2":{"15":2}}],["html",{"2":{"15":2}}],["htmlelement",{"2":{"6":1}}],["hook",{"2":{"16":1}}],["how",{"2":{"10":1,"11":1,"17":1}}],["host",{"2":{"6":1}}],["have",{"2":{"1":1}}],["hides",{"2":{"1":4,"2":1,"3":1}}],["hide",{"0":{"0":1,"1":1,"2":1,"3":1},"1":{"1":1,"2":1,"3":1},"2":{"1":6,"2":3,"3":1,"10":1,"18":6}}],["yourself",{"2":{"9":1}}],["your",{"2":{"7":3,"9":1,"11":1,"13":1,"16":1}}],["you",{"2":{"1":2,"5":2,"6":1,"10":1,"11":3,"13":1,"15":1,"16":2,"17":1}}],["click",{"2":{"17":1}}],["class",{"2":{"16":1}}],["calling",{"2":{"15":1,"16":1}}],["can",{"2":{"2":1,"6":1,"10":1,"11":2,"13":1,"15":1,"16":1,"17":1}}],["charset=",{"2":{"15":1}}],["check",{"2":{"12":1}}],["cdn",{"0":{"15":1},"2":{"13":2}}],["created",{"2":{"12":1,"18":1}}],["creating",{"2":{"12":2}}],["command",{"2":{"16":1}}],["com",{"2":{"15":2}}],["color",{"2":{"7":2}}],["controll",{"2":{"13":1}}],["contains",{"2":{"6":1}}],["contain",{"2":{"6":1}}],["configuration",{"2":{"13":1}}],["const",{"2":{"6":2,"16":1,"18":1}}],["css",{"0":{"14":1},"2":{"7":1,"14":1}}],["customize",{"0":{"7":1}}],["c",{"2":{"1":2}}],["body>",{"2":{"15":2}}],["body",{"2":{"15":1}}],["but",{"2":{"13":1}}],["bundlephobia",{"2":{"9":1}}],["bundle",{"0":{"9":1},"2":{"9":1,"14":1}}],["bg",{"2":{"7":1}}],["bashyarn",{"2":{"16":1}}],["based",{"2":{"1":1}}],["backdrop",{"2":{"7":1}}],["before",{"2":{"7":1}}],["be",{"2":{"2":1,"6":1,"13":1}}],["by",{"0":{"2":1},"2":{"1":1,"2":1,"15":1,"16":2}}],["b",{"2":{"1":2}}],["npm",{"0":{"16":1},"2":{"13":2,"16":1}}],["need",{"2":{"16":1}}],["needs",{"2":{"7":1}}],["new",{"2":{"12":2}}],["now",{"2":{"15":1,"16":1}}],["node",{"0":{"12":1},"2":{"6":1}}],["not",{"2":{"6":1,"9":1}}],["no",{"2":{"5":1}}],["null",{"2":{"2":1,"6":2}}],["number",{"2":{"2":2,"5":3,"6":1}}],["nss",{"2":{"7":1}}],["nst",{"2":{"7":1}}],["nsh",{"2":{"7":1}}],["ns",{"2":{"1":5,"2":2,"5":1,"6":3,"7":1,"10":2,"15":3,"16":3,"18":7}}],["nanosplashes",{"2":{"1":1,"3":1}}],["nanosplash",{"0":{"0":1,"4":1},"1":{"1":1,"2":1,"3":1,"5":1,"6":1},"2":{"1":1,"2":3,"6":1,"7":1,"9":1,"10":1,"11":1,"13":2,"15":3,"16":6,"17":1}}],["action",{"2":{"17":1}}],["above",{"2":{"17":1}}],["around",{"2":{"17":1}}],["argument",{"2":{"6":1}}],["awesome",{"2":{"15":1}}],["api",{"0":{"10":1},"2":{"10":1,"11":1,"16":1}}],["application",{"2":{"9":1,"13":1,"15":1,"16":1}}],["add",{"2":{"9":1,"15":1,"16":1}}],["adjacent",{"2":{"5":1}}],["already",{"2":{"6":1}}],["allows",{"2":{"13":1}}],["all",{"0":{"3":1},"2":{"3":1,"12":1,"18":1}}],["an",{"2":{"6":1,"18":1}}],["anywhere",{"2":{"11":1}}],["any",{"2":{"6":1,"9":1}}],["another",{"2":{"6":1}}],["and",{"2":{"5":1,"6":1,"9":2,"10":4,"12":3,"13":3,"16":2,"17":2}}],["at",{"2":{"1":1,"2":1,"6":1}}],["a",{"2":{"1":2,"2":3,"6":4,"11":1,"12":1,"17":1}}],["tag",{"2":{"15":2}}],["table",{"2":{"6":2,"18":1}}],["try",{"2":{"6":1}}],["text",{"2":{"5":4,"6":1,"7":2,"18":1}}],["to",{"2":{"2":1,"5":1,"6":1,"7":1,"9":3,"10":3,"11":3,"13":1,"16":2,"17":1}}],["than",{"2":{"9":1}}],["that",{"2":{"1":1,"6":1}}],["this",{"2":{"2":1,"5":1,"6":1}}],["them",{"2":{"12":1}}],["their",{"2":{"1":1}}],["the",{"2":{"1":2,"2":2,"3":1,"5":4,"6":4,"9":1,"10":3,"11":1,"12":2,"13":2,"14":1,"15":2,"16":6,"17":1,"18":1}}],["title>",{"2":{"15":1}}],["title>my",{"2":{"15":1}}],["time",{"2":{"1":1,"2":1,"6":1,"12":2}}],["tip",{"2":{"1":1,"6":1}}],["tsns",{"2":{"1":1,"2":1,"3":1,"5":1,"6":1,"15":1}}]],"serializationVersion":2}';
|
|
2
|
+
export {
|
|
3
|
+
_localSearchIndexroot as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useSSRContext, useAttrs, mergeProps, unref } from "vue";
|
|
2
|
+
import { ssrRenderAttrs, ssrInterpolate, ssrRenderSlot } from "vue/server-renderer";
|
|
3
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.1tPrXgE0.js";
|
|
4
|
+
const _sfc_main = {
|
|
5
|
+
__name: "Card",
|
|
6
|
+
__ssrInlineRender: true,
|
|
7
|
+
setup(__props) {
|
|
8
|
+
const attrs = useAttrs();
|
|
9
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
10
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "card" }, _attrs))} data-v-11a850dd>`);
|
|
11
|
+
if (unref(attrs).id) {
|
|
12
|
+
_push(`<div class="id" data-v-11a850dd>#${ssrInterpolate(unref(attrs).id)}</div>`);
|
|
13
|
+
} else {
|
|
14
|
+
_push(`<!---->`);
|
|
15
|
+
}
|
|
16
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
17
|
+
_push(`</div>`);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const _sfc_setup = _sfc_main.setup;
|
|
22
|
+
_sfc_main.setup = (props, ctx) => {
|
|
23
|
+
const ssrContext = useSSRContext();
|
|
24
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add(".vitepress/theme/vue/Card.vue");
|
|
25
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
26
|
+
};
|
|
27
|
+
const Card = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-11a850dd"]]);
|
|
28
|
+
export {
|
|
29
|
+
Card as C
|
|
30
|
+
};
|