@styleflow.app/flowpress-astro-core 0.2.0-beta.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/CHANGELOG.md +16 -0
- package/README.md +47 -0
- package/dist/astro/BaseLayout.astro +49 -0
- package/dist/astro/DefaultTemplate.astro +34 -0
- package/dist/astro/GutenbergRenderer.astro +324 -0
- package/dist/client.d.ts +35 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +233 -0
- package/dist/client.js.map +1 -0
- package/dist/env.d.ts +13 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +39 -0
- package/dist/env.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/styleflow.d.ts +30 -0
- package/dist/styleflow.d.ts.map +1 -0
- package/dist/styleflow.js +47 -0
- package/dist/styleflow.js.map +1 -0
- package/dist/template-hierarchy.d.ts +16 -0
- package/dist/template-hierarchy.d.ts.map +1 -0
- package/dist/template-hierarchy.js +169 -0
- package/dist/template-hierarchy.js.map +1 -0
- package/dist/templates.d.ts +19 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +20 -0
- package/dist/templates.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +109 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import DefaultTemplate from "./astro/DefaultTemplate.astro";
|
|
2
|
+
export const coreTemplates = {
|
|
3
|
+
index: DefaultTemplate,
|
|
4
|
+
singular: DefaultTemplate,
|
|
5
|
+
single: DefaultTemplate,
|
|
6
|
+
page: DefaultTemplate,
|
|
7
|
+
archive: DefaultTemplate,
|
|
8
|
+
taxonomy: DefaultTemplate,
|
|
9
|
+
category: DefaultTemplate,
|
|
10
|
+
tag: DefaultTemplate,
|
|
11
|
+
author: DefaultTemplate,
|
|
12
|
+
date: DefaultTemplate,
|
|
13
|
+
search: DefaultTemplate,
|
|
14
|
+
home: DefaultTemplate,
|
|
15
|
+
attachment: DefaultTemplate,
|
|
16
|
+
embed: DefaultTemplate,
|
|
17
|
+
"privacy-policy": DefaultTemplate,
|
|
18
|
+
"404": DefaultTemplate
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,eAAe;IACzB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,eAAe;IACzB,GAAG,EAAE,eAAe;IACpB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,eAAe;IAC3B,KAAK,EAAE,eAAe;IACtB,gBAAgB,EAAE,eAAe;IACjC,KAAK,EAAE,eAAe;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/astro.d.ts","../src/client.ts","../src/env.ts","../src/index.ts","../src/styleflow.ts","../src/template-hierarchy.ts","../src/templates.ts","../src/types.ts"],"version":"5.9.3"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type FlowpressQueryType = "front-page" | "home" | "page" | "privacy-policy" | "single" | "attachment" | "post-type-archive" | "category" | "tag" | "taxonomy" | "author" | "date" | "search" | "embed" | "archive" | "404";
|
|
2
|
+
export interface SfSeoImage {
|
|
3
|
+
url: string;
|
|
4
|
+
alt?: string | null;
|
|
5
|
+
width?: number | null;
|
|
6
|
+
height?: number | null;
|
|
7
|
+
}
|
|
8
|
+
export interface SfSeoSocial {
|
|
9
|
+
title?: string | null;
|
|
10
|
+
description?: string | null;
|
|
11
|
+
image?: SfSeoImage | null;
|
|
12
|
+
}
|
|
13
|
+
export interface SfSeo {
|
|
14
|
+
title?: string | null;
|
|
15
|
+
description?: string | null;
|
|
16
|
+
canonicalUrl?: string | null;
|
|
17
|
+
robots?: string[] | null;
|
|
18
|
+
openGraph?: SfSeoSocial | null;
|
|
19
|
+
twitter?: SfSeoSocial | null;
|
|
20
|
+
jsonLd?: unknown;
|
|
21
|
+
headHtml?: string | null;
|
|
22
|
+
hreflang?: Array<{
|
|
23
|
+
locale: string;
|
|
24
|
+
url: string;
|
|
25
|
+
}> | null;
|
|
26
|
+
}
|
|
27
|
+
export interface FlowpressContentReference {
|
|
28
|
+
loader: string;
|
|
29
|
+
databaseId?: number | null;
|
|
30
|
+
termId?: number | null;
|
|
31
|
+
}
|
|
32
|
+
export interface FlowpressRoute {
|
|
33
|
+
uri: string;
|
|
34
|
+
status: number;
|
|
35
|
+
queryType: FlowpressQueryType;
|
|
36
|
+
locale?: string | null;
|
|
37
|
+
isFrontPage?: boolean;
|
|
38
|
+
isPostsPage?: boolean;
|
|
39
|
+
frontPageMode?: "page" | "posts" | null;
|
|
40
|
+
postType?: string | null;
|
|
41
|
+
taxonomy?: string | null;
|
|
42
|
+
slug?: string | null;
|
|
43
|
+
term?: string | null;
|
|
44
|
+
databaseId?: number | null;
|
|
45
|
+
termId?: number | null;
|
|
46
|
+
authorNicename?: string | null;
|
|
47
|
+
authorId?: number | null;
|
|
48
|
+
pageTemplate?: string | null;
|
|
49
|
+
mimeType?: string | null;
|
|
50
|
+
postFormat?: string | null;
|
|
51
|
+
templateCandidates: string[];
|
|
52
|
+
content?: FlowpressContentReference | null;
|
|
53
|
+
seo?: SfSeo | null;
|
|
54
|
+
}
|
|
55
|
+
export interface FlowpressLocale {
|
|
56
|
+
code: string;
|
|
57
|
+
slug: string;
|
|
58
|
+
homeUrl?: string | null;
|
|
59
|
+
}
|
|
60
|
+
export interface FlowpressCapabilities {
|
|
61
|
+
schemaVersion: string;
|
|
62
|
+
wpGraphql: boolean;
|
|
63
|
+
acfPro: boolean;
|
|
64
|
+
wpGraphqlAcf: boolean;
|
|
65
|
+
rankMath: boolean;
|
|
66
|
+
wpml: boolean;
|
|
67
|
+
woocommerce: boolean;
|
|
68
|
+
contactForm7: boolean;
|
|
69
|
+
defaultLocale?: string | null;
|
|
70
|
+
locales: FlowpressLocale[];
|
|
71
|
+
}
|
|
72
|
+
export interface FlowpressContent {
|
|
73
|
+
title?: string | null;
|
|
74
|
+
excerpt?: string | null;
|
|
75
|
+
content?: string | null;
|
|
76
|
+
contentBlocks?: unknown[] | null;
|
|
77
|
+
projectFields?: Record<string, unknown> | null;
|
|
78
|
+
[key: string]: unknown;
|
|
79
|
+
}
|
|
80
|
+
export interface FlowpressBlock {
|
|
81
|
+
name: string;
|
|
82
|
+
attributes: Record<string, unknown>;
|
|
83
|
+
innerHtml?: string | null;
|
|
84
|
+
innerBlocks?: FlowpressBlock[];
|
|
85
|
+
}
|
|
86
|
+
export interface FlowpressTemplateProps {
|
|
87
|
+
route: FlowpressRoute;
|
|
88
|
+
content: FlowpressContent | null;
|
|
89
|
+
capabilities: FlowpressCapabilities;
|
|
90
|
+
templateName: string;
|
|
91
|
+
templateCandidates: string[];
|
|
92
|
+
styleflowContract?: import("./styleflow.js").StyleflowContract;
|
|
93
|
+
}
|
|
94
|
+
export interface TemplateContext {
|
|
95
|
+
queryType: FlowpressQueryType;
|
|
96
|
+
frontPageMode?: "page" | "posts";
|
|
97
|
+
postType?: string | null;
|
|
98
|
+
taxonomy?: string | null;
|
|
99
|
+
slug?: string | null;
|
|
100
|
+
term?: string | null;
|
|
101
|
+
databaseId?: number | null;
|
|
102
|
+
termId?: number | null;
|
|
103
|
+
authorNicename?: string | null;
|
|
104
|
+
authorId?: number | null;
|
|
105
|
+
pageTemplate?: string | null;
|
|
106
|
+
mimeType?: string | null;
|
|
107
|
+
postFormat?: string | null;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,YAAY,GACZ,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,YAAY,GACZ,mBAAmB,GACnB,UAAU,GACV,KAAK,GACL,UAAU,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,OAAO,GACP,SAAS,GACT,KAAK,CAAC;AAEV,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAA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IACjC,YAAY,EAAE,qBAAqB,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,gBAAgB,EAAE,iBAAiB,CAAC;CAChE;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@styleflow.app/flowpress-astro-core",
|
|
3
|
+
"version": "0.2.0-beta.0",
|
|
4
|
+
"description": "Project-agnostic WordPress routing, templates, SEO and GraphQL runtime for FlowPress Astro apps.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"license": "UNLICENSED",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/smartmix-packages/flowpress-astro-core.git"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=22.0.0",
|
|
14
|
+
"npm": ">=10.9.3"
|
|
15
|
+
},
|
|
16
|
+
"packageManager": "npm@10.9.3",
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public",
|
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
|
20
|
+
},
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./templates": "./dist/templates.js",
|
|
27
|
+
"./BaseLayout.astro": "./dist/astro/BaseLayout.astro",
|
|
28
|
+
"./DefaultTemplate.astro": "./dist/astro/DefaultTemplate.astro",
|
|
29
|
+
"./GutenbergRenderer.astro": "./dist/astro/GutenbergRenderer.astro"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md",
|
|
34
|
+
"CHANGELOG.md"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc -b && node ./scripts/copy-astro.mjs",
|
|
38
|
+
"typecheck": "tsc -b --pretty false && node ./scripts/copy-astro.mjs",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"release:check": "npm run typecheck && npm test && npm pack --dry-run",
|
|
41
|
+
"release:publish:next": "npm publish --access public --tag next",
|
|
42
|
+
"release:publish:latest": "npm publish --access public --tag latest",
|
|
43
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run build"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@styleflow.app/astro": "0.3.0-beta.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"astro": ">=7.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "^22.19.3",
|
|
53
|
+
"astro": "^7.0.4",
|
|
54
|
+
"typescript": "^5.9.3",
|
|
55
|
+
"vitest": "^3.2.4"
|
|
56
|
+
}
|
|
57
|
+
}
|