@flyo/nitro-astro 2.0.0 → 2.0.1

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.
Files changed (3) hide show
  1. package/module.d.ts +0 -2
  2. package/package.json +11 -10
  3. package/toolbar.ts +30 -0
package/module.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
-
3
1
  declare module "virtual:*" {
4
2
  const component: any;
5
3
  export default component;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyo/nitro-astro",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Nitro Astro connecting Flyo Headless to Astro",
5
5
  "main": "./dist/nitro-astro.js",
6
6
  "module": "./dist/nitro-astro.mjs",
@@ -24,6 +24,11 @@
24
24
  "import": "./dist/nitro-astro.mjs",
25
25
  "require": "./dist/nitro-astro.js"
26
26
  },
27
+ "./BlockSlot.astro": {
28
+ "types": "./components/BlockSlot.ts",
29
+ "import": "./components/BlockSlot.ts",
30
+ "require": "./components/BlockSlot.ts"
31
+ },
27
32
  "./FallbackComponent.astro": {
28
33
  "types": "./components/FallbackComponent.ts",
29
34
  "import": "./components/FallbackComponent.ts",
@@ -39,11 +44,6 @@
39
44
  "import": "./components/FlyoNitroPage.ts",
40
45
  "require": "./components/FlyoNitroPage.ts"
41
46
  },
42
- "./BlockSlot.astro": {
43
- "types": "./components/BlockSlot.ts",
44
- "import": "./components/BlockSlot.ts",
45
- "require": "./components/BlockSlot.ts"
46
- },
47
47
  "./MetaInfo.astro": {
48
48
  "types": "./components/MetaInfo.ts",
49
49
  "import": "./components/MetaInfo.ts",
@@ -59,9 +59,9 @@
59
59
  "import": "./components/MetaInfoPage.ts",
60
60
  "require": "./components/MetaInfoPage.ts"
61
61
  },
62
- "./sitemap.ts": "./sitemap.ts",
63
- "./middleware.ts": "./middleware.ts",
64
62
  "./cdn.ts": "./cdn.ts",
63
+ "./middleware.ts": "./middleware.ts",
64
+ "./sitemap.ts": "./sitemap.ts",
65
65
  "./toolbar.ts": "./toolbar.ts"
66
66
  },
67
67
  "type": "module",
@@ -69,9 +69,10 @@
69
69
  "module.d.ts",
70
70
  "dist",
71
71
  "components",
72
- "sitemap.ts",
73
72
  "cdn.ts",
74
- "middleware.ts"
73
+ "middleware.ts",
74
+ "sitemap.ts",
75
+ "toolbar.ts"
75
76
  ],
76
77
  "types": "./dist/index.d.ts",
77
78
  "author": "Basil Suter <git@nadar.io>",
package/toolbar.ts ADDED
@@ -0,0 +1,30 @@
1
+ import { defineToolbarApp } from "astro/toolbar";
2
+
3
+ export default defineToolbarApp({
4
+ init(canvas) {
5
+ const windowElement = document.createElement("astro-dev-toolbar-window");
6
+
7
+ const links = [
8
+ { link: "https://flyo.cloud", text: "Flyo Cloud Login" },
9
+ {
10
+ link: "https://dev.flyo.cloud/nitro/",
11
+ text: "Flyo Nitro Developer Portal",
12
+ },
13
+ {
14
+ link: "https://nitro-openapi.flyo.cloud/",
15
+ text: "Flyo Nitro API Documentation",
16
+ },
17
+ ];
18
+
19
+ const content = links
20
+ .map(
21
+ (link) =>
22
+ `<astro-dev-toolbar-card link="${link.link}" style="margin-bottom:8px;">
23
+ ${link.text}
24
+ </astro-dev-toolbar-card>`
25
+ )
26
+ .join("");
27
+ windowElement.innerHTML = content;
28
+ canvas.appendChild(windowElement);
29
+ },
30
+ });