@content-streamline/nextjs 0.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.
- package/README.md +400 -0
- package/dist/api/client.d.ts +25 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +69 -0
- package/dist/cache/file-cache.d.ts +38 -0
- package/dist/cache/file-cache.d.ts.map +1 -0
- package/dist/cache/file-cache.js +129 -0
- package/dist/components/PostDetail.d.ts +47 -0
- package/dist/components/PostDetail.d.ts.map +1 -0
- package/dist/components/PostDetail.js +23 -0
- package/dist/components/PostsList.d.ts +44 -0
- package/dist/components/PostsList.d.ts.map +1 -0
- package/dist/components/PostsList.js +22 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/components/styles.css +331 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/server/index.d.ts +35 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +106 -0
- package/dist/types/index.d.ts +51 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/package.json +52 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content Streamline API Types
|
|
3
|
+
*/
|
|
4
|
+
export interface PostTranslation {
|
|
5
|
+
id: number;
|
|
6
|
+
language: string;
|
|
7
|
+
title: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
content?: string;
|
|
10
|
+
meta_description?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PostImage {
|
|
13
|
+
id: number;
|
|
14
|
+
url: string;
|
|
15
|
+
ordering: number;
|
|
16
|
+
alt?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Post {
|
|
19
|
+
id: number;
|
|
20
|
+
description?: string;
|
|
21
|
+
content_type: string;
|
|
22
|
+
platform: string;
|
|
23
|
+
status: string;
|
|
24
|
+
created_at: string;
|
|
25
|
+
post_translations: PostTranslation[];
|
|
26
|
+
images: PostImage[];
|
|
27
|
+
}
|
|
28
|
+
export interface Pagination {
|
|
29
|
+
total_records: number;
|
|
30
|
+
total_pages: number;
|
|
31
|
+
current_page: number;
|
|
32
|
+
next_page: number | null;
|
|
33
|
+
prev_page: number | null;
|
|
34
|
+
}
|
|
35
|
+
export interface PostsResponse {
|
|
36
|
+
pagination: Pagination;
|
|
37
|
+
data: Post[];
|
|
38
|
+
}
|
|
39
|
+
export interface PostDetailResponse extends Post {
|
|
40
|
+
post_translations: PostTranslation[];
|
|
41
|
+
}
|
|
42
|
+
export interface CachedPostIndex {
|
|
43
|
+
posts: Array<{
|
|
44
|
+
id: number;
|
|
45
|
+
slug: string;
|
|
46
|
+
language: string;
|
|
47
|
+
updated_at: string;
|
|
48
|
+
}>;
|
|
49
|
+
last_sync: string;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,eAAe,EAAE,CAAC;IACrC,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,IAAI,EAAE,CAAC;CACd;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI;IAC9C,iBAAiB,EAAE,eAAe,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@content-streamline/nextjs",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Next.js library for Content Streamline API with reusable components",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./server": {
|
|
13
|
+
"types": "./dist/server/index.d.ts",
|
|
14
|
+
"default": "./dist/server/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./components": {
|
|
17
|
+
"types": "./dist/components/index.d.ts",
|
|
18
|
+
"default": "./dist/components/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./components/styles.css": "./dist/components/styles.css"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc && cp src/components/styles.css dist/components/styles.css",
|
|
24
|
+
"dev": "tsc --watch",
|
|
25
|
+
"prepublishOnly": "npm run build"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"nextjs",
|
|
29
|
+
"content-streamline",
|
|
30
|
+
"blog",
|
|
31
|
+
"cms"
|
|
32
|
+
],
|
|
33
|
+
"author": "",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
37
|
+
"next": "^14.0.0 || ^15.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^20.14.0",
|
|
41
|
+
"@types/react": "^18.3.0",
|
|
42
|
+
"@types/react-dom": "^18.3.0",
|
|
43
|
+
"react": "^18.3.0",
|
|
44
|
+
"react-dom": "^18.3.0",
|
|
45
|
+
"typescript": "^5.9.3"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"dist",
|
|
49
|
+
"README.md"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
|