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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer";
|
|
2
|
+
import "./Card.Ce4dbGEn.js";
|
|
3
|
+
import { useSSRContext } from "vue";
|
|
4
|
+
import "./plugin-vue_export-helper.1tPrXgE0.js";
|
|
5
|
+
const __pageData = JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"api/start/install.md","filePath":"api/start/install.md"}');
|
|
6
|
+
const __default__ = { name: "api/start/install.md" };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
8
|
+
__ssrInlineRender: true,
|
|
9
|
+
setup(__props) {
|
|
10
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
11
|
+
_push(`<div${ssrRenderAttrs(_attrs)}><h1 id="installation" tabindex="-1">Installation <a class="header-anchor" href="#installation" aria-label="Permalink to "Installation""></a></h1><p>Nanosplash can be installed either via CDN or NPM. Installing via CDN is easier and requires less configuration, but installing via NPM is more flexible and allows you to controll the imports and initialization of the Nanosplash service running in your application.</p><h2 id="css" tabindex="-1">CSS <a class="header-anchor" href="#css" aria-label="Permalink to "CSS""></a></h2><p>CSS is included inside the JS bundle. 🎉</p><h2 id="install-via-cdn" tabindex="-1">Install via CDN <a class="header-anchor" href="#install-via-cdn" aria-label="Permalink to "Install via CDN""></a></h2><p>Add the following script tag inside of the <code><body></code> tag:</p><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"><</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">script</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}"> src</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">=</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">"https://unpkg.com/nanosplash/dist/iife/ns.iife.js"</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">script</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span></code></pre></div><div class="language-html vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"><</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">html</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span>
|
|
12
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> <</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">head</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span>
|
|
13
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> <</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">meta</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}"> charset</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">=</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">"UTF-8"</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> /></span></span>
|
|
14
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> <</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">title</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">>My awesome application 🚀</</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">title</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span>
|
|
15
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> </</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">head</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span>
|
|
16
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> <</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">body</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span>
|
|
17
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> <</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">script</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}"> src</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">=</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">"https://unpkg.com/nanosplash/dist/iife/ns.iife.js"</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">script</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span>
|
|
18
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> ...</span></span>
|
|
19
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> </</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">body</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span>
|
|
20
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"></</span><span style="${ssrRenderStyle({ "--shiki-light": "#22863A", "--shiki-dark": "#85E89D" })}">html</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">></span></span></code></pre></div><p>Now you can easily start using Nanosplash by simply calling <code>ns.show</code>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">show</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">(</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">'It works!'</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">)</span></span></code></pre></div><h2 id="install-via-npm" tabindex="-1">Install via NPM <a class="header-anchor" href="#install-via-npm" aria-label="Permalink to "Install via NPM""></a></h2><p>Install Nanosplash via NPM by running the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">yarn</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}"> add</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}"> nanosplash</span></span></code></pre></div><p>To import and start the Nanosplash service in your application, you need to import the Service class and start it.</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#D73A49", "--shiki-dark": "#F97583" })}">import</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> { useNs } </span><span style="${ssrRenderStyle({ "--shiki-light": "#D73A49", "--shiki-dark": "#F97583" })}">from</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}"> 'nanosplash'</span></span>
|
|
21
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#D73A49", "--shiki-dark": "#F97583" })}">const</span><span style="${ssrRenderStyle({ "--shiki-light": "#005CC5", "--shiki-dark": "#79B8FF" })}"> ns</span><span style="${ssrRenderStyle({ "--shiki-light": "#D73A49", "--shiki-dark": "#F97583" })}"> =</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}"> useNs</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">()</span></span>
|
|
22
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">show</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">(</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">'It works!'</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">)</span></span></code></pre></div><p>The hook will inject the Nanosplash API inside the global <code>window</code> object. You can now start using Nanosplash by simply calling <code>ns.show</code>.</p></div>`);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const _sfc_setup = _sfc_main.setup;
|
|
27
|
+
_sfc_main.setup = (props, ctx) => {
|
|
28
|
+
const ssrContext = useSSRContext();
|
|
29
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("api/start/install.md");
|
|
30
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
__pageData,
|
|
34
|
+
_sfc_main as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { ssrRenderAttrs, ssrRenderSlot, ssrRenderList, ssrRenderAttr, ssrInterpolate, ssrRenderComponent } from "vue/server-renderer";
|
|
2
|
+
import { useSSRContext, mergeProps, ref, withCtx, createTextVNode, createVNode } from "vue";
|
|
3
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.1tPrXgE0.js";
|
|
4
|
+
import { C as Card } from "./Card.Ce4dbGEn.js";
|
|
5
|
+
const _sfc_main$3 = {};
|
|
6
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs) {
|
|
7
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "card-grid" }, _attrs))} data-v-60c78c10>`);
|
|
8
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
9
|
+
_push(`</div>`);
|
|
10
|
+
}
|
|
11
|
+
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
12
|
+
_sfc_main$3.setup = (props, ctx) => {
|
|
13
|
+
const ssrContext = useSSRContext();
|
|
14
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add(".vitepress/theme/vue/CardGrid.vue");
|
|
15
|
+
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
16
|
+
};
|
|
17
|
+
const CardGrid = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender], ["__scopeId", "data-v-60c78c10"]]);
|
|
18
|
+
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) => ({
|
|
19
|
+
all: t,
|
|
20
|
+
first: (s) => t(s)[0] ?? null
|
|
21
|
+
}))((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) => {
|
|
22
|
+
const s = document.createElement("div");
|
|
23
|
+
return e && s.classList.add(e), s.append(...t), s;
|
|
24
|
+
}, h = (e) => {
|
|
25
|
+
const t = r();
|
|
26
|
+
return t.innerHTML = e, t.firstChild;
|
|
27
|
+
}, u = () => {
|
|
28
|
+
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));
|
|
29
|
+
return s.nsId = Date.now(), s;
|
|
30
|
+
}, w = () => f().sort((e, t) => e.nsId - t.nsId)[0] ?? null, g = (e, t) => {
|
|
31
|
+
const n = a(e).first(".nst");
|
|
32
|
+
if (!t)
|
|
33
|
+
return n == null ? void 0 : n.remove();
|
|
34
|
+
const o = r("nst", t);
|
|
35
|
+
n ? n.replaceWith(o) : e.insertBefore(o, e.firstChild);
|
|
36
|
+
}, k = (e, t) => {
|
|
37
|
+
const s = t.firstElementChild;
|
|
38
|
+
s && t.insertBefore(e, s), t.append(e), t.classList.add("nsh");
|
|
39
|
+
}, x = (e, t) => {
|
|
40
|
+
const s = t ? b(t) : i;
|
|
41
|
+
let n;
|
|
42
|
+
const o = a(s ?? i()).first("& > .ns");
|
|
43
|
+
o ? n = o : (n = u(), k(n, s)), g(n, e ?? "");
|
|
44
|
+
const p = window.scrollY + "px";
|
|
45
|
+
return i().style.setProperty("--ns-top", p), n.nsId;
|
|
46
|
+
}, c = (e) => {
|
|
47
|
+
var t;
|
|
48
|
+
(t = e == null ? void 0 : e.parentElement) == null || t.classList.remove("nsh"), e == null || e.remove();
|
|
49
|
+
}, S = (e) => f().find((t) => t.nsId === e) ?? null, z = (e) => {
|
|
50
|
+
e === "*" ? l(".ns").forEach(c) : c(typeof e == "number" ? S(e) : w());
|
|
51
|
+
}, I = () => {
|
|
52
|
+
var e;
|
|
53
|
+
(e = d("#nscss")) == null || e.remove(), i().append(h(`<style id=${m}>${v}</style>`));
|
|
54
|
+
}, A = () => !!new Promise(I) && (window.ns = {
|
|
55
|
+
show: x,
|
|
56
|
+
hide: z,
|
|
57
|
+
version: y
|
|
58
|
+
});
|
|
59
|
+
const _sfc_main$2 = {
|
|
60
|
+
__name: "Exe",
|
|
61
|
+
__ssrInlineRender: true,
|
|
62
|
+
setup(__props) {
|
|
63
|
+
A();
|
|
64
|
+
const Commands = {
|
|
65
|
+
ShowInsideA: 'ns.show("Loading A", "#a")',
|
|
66
|
+
ShowInsideB: 'ns.show("Loading B", "#b")',
|
|
67
|
+
ShowInsideC: 'ns.show("Loading C", "#c")',
|
|
68
|
+
ShowInsideD: 'ns.show("Loading D", "#d")',
|
|
69
|
+
ShowInsideWrapper: 'ns.show("Loading Wrapper", "#wrapper")',
|
|
70
|
+
ShowFullScreen: 'ns.show("Loading window")',
|
|
71
|
+
Progress: "Progressive Demo",
|
|
72
|
+
Hide: "ns.hide()",
|
|
73
|
+
HideAll: 'ns.hide("*")'
|
|
74
|
+
};
|
|
75
|
+
ref("");
|
|
76
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
77
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "container" }, _attrs))} data-v-ac48b0fa><select class="select" data-v-ac48b0fa><option value="" selected disabled data-v-ac48b0fa>Click and select</option><!--[-->`);
|
|
78
|
+
ssrRenderList(Commands, (command, i2) => {
|
|
79
|
+
_push(`<option${ssrRenderAttr("value", command)} data-v-ac48b0fa>${ssrInterpolate(command)}</option>`);
|
|
80
|
+
});
|
|
81
|
+
_push(`<!--]--></select><div class="exe" data-v-ac48b0fa>Run</div></div>`);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
86
|
+
_sfc_main$2.setup = (props, ctx) => {
|
|
87
|
+
const ssrContext = useSSRContext();
|
|
88
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add(".vitepress/theme/vue/Exe.vue");
|
|
89
|
+
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
90
|
+
};
|
|
91
|
+
const Exe = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ac48b0fa"]]);
|
|
92
|
+
const _sfc_main$1 = {
|
|
93
|
+
__name: "PlayGround",
|
|
94
|
+
__ssrInlineRender: true,
|
|
95
|
+
setup(__props) {
|
|
96
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
97
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "playground" }, _attrs))} data-v-3c3007cd>`);
|
|
98
|
+
_push(ssrRenderComponent(CardGrid, { id: "wrapper" }, {
|
|
99
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
100
|
+
if (_push2) {
|
|
101
|
+
_push2(ssrRenderComponent(Card, { id: "a" }, {
|
|
102
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
103
|
+
if (_push3) {
|
|
104
|
+
_push3(` Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam `);
|
|
105
|
+
} else {
|
|
106
|
+
return [
|
|
107
|
+
createTextVNode(" Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam ")
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
}),
|
|
111
|
+
_: 1
|
|
112
|
+
}, _parent2, _scopeId));
|
|
113
|
+
_push2(ssrRenderComponent(Card, { id: "b" }, {
|
|
114
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
115
|
+
if (_push3) {
|
|
116
|
+
_push3(` Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam `);
|
|
117
|
+
} else {
|
|
118
|
+
return [
|
|
119
|
+
createTextVNode(" Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam ")
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
}),
|
|
123
|
+
_: 1
|
|
124
|
+
}, _parent2, _scopeId));
|
|
125
|
+
_push2(ssrRenderComponent(Card, { id: "c" }, {
|
|
126
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
127
|
+
if (_push3) {
|
|
128
|
+
_push3(` Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam `);
|
|
129
|
+
} else {
|
|
130
|
+
return [
|
|
131
|
+
createTextVNode(" Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam ")
|
|
132
|
+
];
|
|
133
|
+
}
|
|
134
|
+
}),
|
|
135
|
+
_: 1
|
|
136
|
+
}, _parent2, _scopeId));
|
|
137
|
+
_push2(ssrRenderComponent(Card, { id: "d" }, {
|
|
138
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
139
|
+
if (_push3) {
|
|
140
|
+
_push3(` Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam `);
|
|
141
|
+
} else {
|
|
142
|
+
return [
|
|
143
|
+
createTextVNode(" Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam ")
|
|
144
|
+
];
|
|
145
|
+
}
|
|
146
|
+
}),
|
|
147
|
+
_: 1
|
|
148
|
+
}, _parent2, _scopeId));
|
|
149
|
+
} else {
|
|
150
|
+
return [
|
|
151
|
+
createVNode(Card, { id: "a" }, {
|
|
152
|
+
default: withCtx(() => [
|
|
153
|
+
createTextVNode(" Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam ")
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}),
|
|
157
|
+
createVNode(Card, { id: "b" }, {
|
|
158
|
+
default: withCtx(() => [
|
|
159
|
+
createTextVNode(" Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam ")
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
}),
|
|
163
|
+
createVNode(Card, { id: "c" }, {
|
|
164
|
+
default: withCtx(() => [
|
|
165
|
+
createTextVNode(" Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam ")
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
}),
|
|
169
|
+
createVNode(Card, { id: "d" }, {
|
|
170
|
+
default: withCtx(() => [
|
|
171
|
+
createTextVNode(" Lorem ipsum dolor sit amet consectetur adipiscing elit ut aliquam ")
|
|
172
|
+
]),
|
|
173
|
+
_: 1
|
|
174
|
+
})
|
|
175
|
+
];
|
|
176
|
+
}
|
|
177
|
+
}),
|
|
178
|
+
_: 1
|
|
179
|
+
}, _parent));
|
|
180
|
+
_push(ssrRenderComponent(Exe, null, null, _parent));
|
|
181
|
+
_push(`</div>`);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
186
|
+
_sfc_main$1.setup = (props, ctx) => {
|
|
187
|
+
const ssrContext = useSSRContext();
|
|
188
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add(".vitepress/theme/vue/PlayGround.vue");
|
|
189
|
+
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
190
|
+
};
|
|
191
|
+
const PlayGround = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3c3007cd"]]);
|
|
192
|
+
const __pageData = JSON.parse('{"title":"Playground","description":"","frontmatter":{},"headers":[],"relativePath":"api/start/playground.md","filePath":"api/start/playground.md"}');
|
|
193
|
+
const __default__ = { name: "api/start/playground.md" };
|
|
194
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
195
|
+
__ssrInlineRender: true,
|
|
196
|
+
setup(__props) {
|
|
197
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
198
|
+
_push(`<div${ssrRenderAttrs(_attrs)}><h1 id="playground" tabindex="-1">Playground <a class="header-anchor" href="#playground" aria-label="Permalink to "Playground""></a></h1><p>Here you can play around with Nanosplash and see how it works.</p>`);
|
|
199
|
+
_push(ssrRenderComponent(PlayGround, null, null, _parent));
|
|
200
|
+
_push(`<p>Select a method from the dropdown menu above and click "Run" to see it in action.</p></div>`);
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
const _sfc_setup = _sfc_main.setup;
|
|
205
|
+
_sfc_main.setup = (props, ctx) => {
|
|
206
|
+
const ssrContext = useSSRContext();
|
|
207
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("api/start/playground.md");
|
|
208
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
209
|
+
};
|
|
210
|
+
export {
|
|
211
|
+
__pageData,
|
|
212
|
+
_sfc_main as default
|
|
213
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ssrRenderAttrs, ssrRenderStyle } from "vue/server-renderer";
|
|
2
|
+
import { useSSRContext } from "vue";
|
|
3
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.1tPrXgE0.js";
|
|
4
|
+
const __pageData = JSON.parse('{"title":"Usage","description":"","frontmatter":{},"headers":[],"relativePath":"api/start/usage.md","filePath":"api/start/usage.md"}');
|
|
5
|
+
const _sfc_main = { name: "api/start/usage.md" };
|
|
6
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
7
|
+
_push(`<div${ssrRenderAttrs(_attrs)}><h1 id="usage" tabindex="-1">Usage <a class="header-anchor" href="#usage" aria-label="Permalink to "Usage""></a></h1><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#6A737D", "--shiki-dark": "#6A737D" })}">// Fullscreen spinning wheel</span></span>
|
|
8
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">show</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">()</span></span>
|
|
9
|
+
<span class="line"></span>
|
|
10
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#6A737D", "--shiki-dark": "#6A737D" })}">// Fullscreen spinning wheel with text</span></span>
|
|
11
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">show</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">(</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">'Loading'</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">)</span></span>
|
|
12
|
+
<span class="line"></span>
|
|
13
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#6A737D", "--shiki-dark": "#6A737D" })}">// Display inside an element</span></span>
|
|
14
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">show</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">(</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">'Fetching data'</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">, </span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">'#my-table'</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">)</span></span>
|
|
15
|
+
<span class="line"></span>
|
|
16
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#6A737D", "--shiki-dark": "#6A737D" })}">// Hide the first created loading screen (FIFO)</span></span>
|
|
17
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">hide</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">()</span></span>
|
|
18
|
+
<span class="line"></span>
|
|
19
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#6A737D", "--shiki-dark": "#6A737D" })}">// Hide specific loading screen</span></span>
|
|
20
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#D73A49", "--shiki-dark": "#F97583" })}">const</span><span style="${ssrRenderStyle({ "--shiki-light": "#005CC5", "--shiki-dark": "#79B8FF" })}"> id</span><span style="${ssrRenderStyle({ "--shiki-light": "#D73A49", "--shiki-dark": "#F97583" })}"> =</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}"> ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">show</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">(</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">'Loading'</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">)</span></span>
|
|
21
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">hide</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">(id)</span></span>
|
|
22
|
+
<span class="line"></span>
|
|
23
|
+
<span class="line"><span style="${ssrRenderStyle({ "--shiki-light": "#6A737D", "--shiki-dark": "#6A737D" })}">// Hide all loading screens</span></span>
|
|
24
|
+
<span class="line highlighted"><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">ns.</span><span style="${ssrRenderStyle({ "--shiki-light": "#6F42C1", "--shiki-dark": "#B392F0" })}">hide</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">(</span><span style="${ssrRenderStyle({ "--shiki-light": "#032F62", "--shiki-dark": "#9ECBFF" })}">'*'</span><span style="${ssrRenderStyle({ "--shiki-light": "#24292E", "--shiki-dark": "#E1E4E8" })}">)</span></span></code></pre></div></div>`);
|
|
25
|
+
}
|
|
26
|
+
const _sfc_setup = _sfc_main.setup;
|
|
27
|
+
_sfc_main.setup = (props, ctx) => {
|
|
28
|
+
const ssrContext = useSSRContext();
|
|
29
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("api/start/usage.md");
|
|
30
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
31
|
+
};
|
|
32
|
+
const usage = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
33
|
+
export {
|
|
34
|
+
__pageData,
|
|
35
|
+
usage as default
|
|
36
|
+
};
|