@flyo/nitro-astro 1.3.3 → 1.4.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.
@@ -0,0 +1,16 @@
1
+ ---
2
+ import FlyoNitroBlock from './FlyoNitroBlock.astro';
3
+
4
+ interface Props {
5
+ slot: {
6
+ content?: object[]; // Add the content property with type object[]
7
+ };
8
+ }
9
+
10
+ const { slot } = Astro.props
11
+
12
+ ---
13
+
14
+ {slot?.content?.map((block: object) => (
15
+ <FlyoNitroBlock block={block} />
16
+ ))}
@@ -0,0 +1,2 @@
1
+ import BlockSlot from "./BlockSlot.astro"
2
+ export default BlockSlot
@@ -0,0 +1,33 @@
1
+ ---
2
+ const { title, image, description, jsonld } = Astro.props;
3
+ const jsonLdString = jsonld ? JSON.stringify(jsonld) : null;
4
+ ---
5
+
6
+ <!-- Title Meta Tags -->
7
+ {title && (
8
+ <meta name="title" content={title} />
9
+ <meta property="og:title" content={title} />
10
+ <meta name="twitter:title" content={title} />
11
+ )}
12
+
13
+ <!-- Description Meta Tags -->
14
+ {description && (
15
+ <meta name="description" content={description} />
16
+ <meta property="og:description" content={description} />
17
+ <meta name="twitter:description" content={description} />
18
+ )}
19
+
20
+ <!-- Image Meta Tags -->
21
+ {image && (
22
+ <meta name="image" content={image} />
23
+ <meta property="og:image" content={image} />
24
+ <meta name="twitter:image" content={image} />
25
+ )}
26
+
27
+ <!-- Other Meta Tags -->
28
+ <meta property="og:type" content="website" />
29
+ <meta name="twitter:card" content="summary_large_image" />
30
+
31
+ {jsonLdString && (
32
+ <script type="application/ld+json" set:html={ jsonLdString } />
33
+ )}
@@ -0,0 +1,2 @@
1
+ import MetaInfo from "./MetaInfo.astro";
2
+ export default MetaInfo;
@@ -0,0 +1,13 @@
1
+ ---
2
+ import { Entity } from '@flyo/nitro-typescript';
3
+ import MetaInfo from './MetaInfo.astro';
4
+
5
+
6
+ interface Props {
7
+ response: Entity;
8
+ }
9
+
10
+ const { response } = Astro.props
11
+
12
+ ---
13
+ <MetaInfo title={response.entity?.entity_title} description={response.entity?.entity_teaser} image={response.entity?.entity_image} jsonld={response.jsonld} />
@@ -0,0 +1,2 @@
1
+ import MetaInfoEntity from "./MetaInfoEntity.astro";
2
+ export default MetaInfoEntity;
@@ -0,0 +1,13 @@
1
+ ---
2
+ import { Page } from '@flyo/nitro-typescript';
3
+ import MetaInfo from './MetaInfo.astro';
4
+
5
+
6
+ interface Props {
7
+ page: Page;
8
+ }
9
+
10
+ const { page } = Astro.props
11
+
12
+ ---
13
+ <MetaInfo title={page.meta_json?.title} description={page.meta_json?.description} image={page.meta_json?.image}/>
@@ -0,0 +1,2 @@
1
+ import MetaInfoPage from "./MetaInfoPage.astro";
2
+ export default MetaInfoPage;
@@ -0,0 +1,2 @@
1
+ import BlockSlot from "./BlockSlot.astro";
2
+ export default BlockSlot;
@@ -0,0 +1,2 @@
1
+ import MetaInfo from "./MetaInfo.astro";
2
+ export default MetaInfo;
@@ -0,0 +1,2 @@
1
+ import MetaInfoEntity from "./MetaInfoEntity.astro";
2
+ export default MetaInfoEntity;
@@ -0,0 +1,2 @@
1
+ import MetaInfoPage from "./MetaInfoPage.astro";
2
+ export default MetaInfoPage;
package/module.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ declare module "virtual:*" {
2
+ const component: any;
3
+ export default component;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyo/nitro-astro",
3
- "version": "1.3.3",
3
+ "version": "1.4.0",
4
4
  "description": "Astro Framework",
5
5
  "main": "./dist/nitro-astro.js",
6
6
  "module": "./dist/nitro-astro.mjs",
@@ -25,11 +25,32 @@
25
25
  "import": "./components/FlyoNitroPage.ts",
26
26
  "require": "./components/FlyoNitroPage.ts"
27
27
  },
28
+ "./BlockSlot.astro": {
29
+ "types": "./components/BlockSlot.ts",
30
+ "import": "./components/BlockSlot.ts",
31
+ "require": "./components/BlockSlot.ts"
32
+ },
33
+ "./MetaInfo.astro": {
34
+ "types": "./components/MetaInfo.ts",
35
+ "import": "./components/MetaInfo.ts",
36
+ "require": "./components/MetaInfo.ts"
37
+ },
38
+ "./MetaInfoEntity.astro": {
39
+ "types": "./components/MetaInfoEntity.ts",
40
+ "import": "./components/MetaInfoEntity.ts",
41
+ "require": "./components/MetaInfoEntity.ts"
42
+ },
43
+ "./MetaInfoPage.astro": {
44
+ "types": "./components/MetaInfoPage.ts",
45
+ "import": "./components/MetaInfoPage.ts",
46
+ "require": "./components/MetaInfoPage.ts"
47
+ },
28
48
  "./sitemap.ts": "./sitemap.ts",
29
49
  "./cdn.ts": "./cdn.ts"
30
50
  },
31
51
  "type": "module",
32
52
  "files": [
53
+ "module.d.ts",
33
54
  "dist",
34
55
  "components",
35
56
  "sitemap.ts",
@@ -43,10 +64,10 @@
43
64
  "build": "vite build"
44
65
  },
45
66
  "devDependencies": {
46
- "astro": "^4.1.3",
67
+ "astro": "^4.2.4",
47
68
  "typescript": "5.3.3",
48
- "vite": "^5.0.11",
49
- "vite-plugin-dts": "^3.7.1"
69
+ "vite": "^5.0.12",
70
+ "vite-plugin-dts": "^3.7.2"
50
71
  },
51
72
  "repository": {
52
73
  "type": "git",