flowpilot 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.
@@ -0,0 +1,20 @@
1
+ //#region src/utils/search.ts
2
+ function filterByRelevance(items, query, limit = 30) {
3
+ if (!query) return items.slice(0, limit);
4
+ const q = query.toLowerCase();
5
+ return items.filter((p) => p.name.toLowerCase().includes(q) || (p.path ?? "").toLowerCase().includes(q)).map((p) => {
6
+ const name = p.name.toLowerCase();
7
+ const path = (p.path ?? "").toLowerCase();
8
+ let score;
9
+ if (name === q) score = 0;
10
+ else if (name.startsWith(q)) score = 1 + name.length - q.length;
11
+ else if (path.startsWith(q)) score = 50;
12
+ else score = Math.min(name.includes(q) ? 10 + name.indexOf(q) : 999, path.includes(q) ? 60 + path.indexOf(q) : 999);
13
+ return {
14
+ p,
15
+ score
16
+ };
17
+ }).sort((a, b) => a.score - b.score).slice(0, limit).map((e) => e.p);
18
+ }
19
+ //#endregion
20
+ export { filterByRelevance as t };
@@ -0,0 +1,36 @@
1
+ //#region src/commands/config/meta.ts
2
+ const meta$2 = {
3
+ titleKey: "web.settingsTitle",
4
+ href: "/config",
5
+ categoryKey: "web.generalCategory"
6
+ };
7
+ //#endregion
8
+ //#region src/commands/end/meta.ts
9
+ const meta$1 = {
10
+ titleKey: "web.endTitle",
11
+ href: "/end",
12
+ categoryKey: "web.generalCategory"
13
+ };
14
+ //#endregion
15
+ //#region src/commands/release/meta.ts
16
+ const meta = {
17
+ titleKey: "web.releaseTitle",
18
+ href: "/release",
19
+ categoryKey: "web.generalCategory"
20
+ };
21
+ //#endregion
22
+ //#region src/client.ts
23
+ const routes = {
24
+ [meta$2.href]: () => import("./chunks/client-Bb-xh-5_.js"),
25
+ [meta$1.href]: () => import("./chunks/client-DSXtnba0.js"),
26
+ [meta.href]: () => import("./chunks/client-oAYP8wOx.js")
27
+ };
28
+ async function boot() {
29
+ const el = document.getElementById("app");
30
+ if (!el) return;
31
+ const loader = routes[window.location.pathname];
32
+ if (!loader) return;
33
+ (await loader()).mount(el);
34
+ }
35
+ boot();
36
+ //#endregion
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "Favicon",
3
+ "short_name": "Favicon",
4
+ "icons": [
5
+ {
6
+ "src": "/android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "/android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "theme_color": "#ffffff",
17
+ "background_color": "#ffffff",
18
+ "display": "standalone"
19
+ }