@blocklet/pages-kit-runtime 0.1.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,39 @@
1
+ export type StateMode = 'production' | 'draft';
2
+ export declare const STATE_MODES: StateMode[];
3
+ export type PublishMode = 'production';
4
+ export declare const PUBLISH_MODES: PublishMode[];
5
+ export type Page = {
6
+ id: string;
7
+ createdAt: string;
8
+ updatedAt: string;
9
+ publishedAt: string;
10
+ slug: string;
11
+ sections: Record<string, Section>;
12
+ sectionIds: string[];
13
+ locales?: Record<string, {
14
+ title?: string;
15
+ description?: string;
16
+ backgroundColor?: string;
17
+ image?: string;
18
+ header?: {
19
+ sticky?: boolean;
20
+ translucent?: boolean;
21
+ hideNavMenus?: boolean;
22
+ translucentTextColor?: string;
23
+ };
24
+ footer?: {
25
+ hidden?: boolean;
26
+ };
27
+ [key: string]: any;
28
+ }>;
29
+ };
30
+ export interface Section<T = {
31
+ [key: string]: any;
32
+ }> {
33
+ id: string;
34
+ component: string;
35
+ config?: T;
36
+ visibility?: 'visible' | 'hidden';
37
+ name?: string;
38
+ locales?: Record<string, T>;
39
+ }
File without changes
package/package.json ADDED
@@ -0,0 +1,161 @@
1
+ {
2
+ "name": "@blocklet/pages-kit-runtime",
3
+ "version": "0.1.0",
4
+ "description": "Pages Kit runtime library",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
9
+ "homepage": "https://github.com/blocklet/pages-kit#readme",
10
+ "license": "ISC",
11
+ "main": "./lib/cjs/index.js",
12
+ "module": "./lib/esm/index.js",
13
+ "types": "./lib/types/index.d.js",
14
+ "exports": {
15
+ ".": {
16
+ "import": "./lib/esm/index.js",
17
+ "require": "./lib/cjs/index.js"
18
+ },
19
+ "./api": {
20
+ "import": "./lib/esm/api/index.js",
21
+ "require": "./lib/cjs/api/index.js"
22
+ },
23
+ "./api/*": {
24
+ "import": "./lib/esm/api/*.js",
25
+ "require": "./lib/cjs/api/*.js"
26
+ },
27
+ "./builtin/*": {
28
+ "import": "./lib/esm/builtin/*.js",
29
+ "require": "./lib/cjs/builtin/*.js"
30
+ },
31
+ "./builtin/async/ai-runtime": {
32
+ "import": "./lib/esm/builtin/async/ai-runtime/index.js",
33
+ "require": "./lib/cjs/builtin/async/ai-runtime/index.js"
34
+ },
35
+ "./components": {
36
+ "import": "./lib/esm/components/index.js",
37
+ "require": "./lib/cjs/components/index.js"
38
+ },
39
+ "./types": {
40
+ "import": "./lib/esm/types/index.js",
41
+ "require": "./lib/cjs/types/index.js"
42
+ },
43
+ "./types/*": {
44
+ "import": "./lib/esm/types/*.js",
45
+ "require": "./lib/cjs/types/*.js"
46
+ },
47
+ "./utils/*": {
48
+ "import": "./lib/esm/utils/*.js",
49
+ "require": "./lib/cjs/utils/*.js"
50
+ },
51
+ "./client": {
52
+ "import": "./lib/esm/client.js",
53
+ "require": "./lib/cjs/client.js"
54
+ },
55
+ "./locales": {
56
+ "import": "./lib/esm/locales/index.js",
57
+ "require": "./lib/cjs/locales/index.js"
58
+ }
59
+ },
60
+ "typesVersions": {
61
+ "*": {
62
+ "*": [
63
+ "./lib/types/index.d.ts"
64
+ ],
65
+ "api": [
66
+ "./lib/types/api/index.d.ts"
67
+ ],
68
+ "api/*": [
69
+ "./lib/types/api/*.d.ts",
70
+ "./lib/types/api/*/index.d.ts"
71
+ ],
72
+ "builtin/*": [
73
+ "./lib/types/builtin/*.d.ts",
74
+ "./lib/types/builtin/*/index.d.ts"
75
+ ],
76
+ "components": [
77
+ "./lib/types/components/index.d.ts"
78
+ ],
79
+ "types": [
80
+ "./lib/types/types/index.d.ts"
81
+ ],
82
+ "types/*": [
83
+ "./lib/types/types/*.d.ts"
84
+ ],
85
+ "utils/*": [
86
+ "./lib/types/utils/*.d.ts",
87
+ "./lib/types/utils/*/index.d.ts"
88
+ ],
89
+ "client": [
90
+ "./lib/types/client.d.ts",
91
+ "./lib/types/client.d.ts"
92
+ ],
93
+ "locales": [
94
+ "./lib/types/locales/index.d.ts"
95
+ ]
96
+ }
97
+ },
98
+ "files": [
99
+ "lib",
100
+ "LICENSE",
101
+ "package.json",
102
+ "README.md",
103
+ "tsconfig.json"
104
+ ],
105
+ "repository": {
106
+ "type": "git",
107
+ "url": "git+https://github.com/blocklet/pages-kit.git"
108
+ },
109
+ "dependencies": {
110
+ "@arcblock/ux": "^2.12.1",
111
+ "@blocklet/js-sdk": "1.16.38",
112
+ "@blocklet/ui-react": "^2.12.1",
113
+ "@mdx-js/react": "^3.1.0",
114
+ "@mui/icons-material": "^5.16.7",
115
+ "@mui/material": "^5.16.7",
116
+ "ahooks": "^3.8.4",
117
+ "axios": "^1.7.4",
118
+ "chalk": "^4.1.2",
119
+ "esbuild": "^0.19.12",
120
+ "glob": "^11.0.0",
121
+ "gogocode": "^1.0.55",
122
+ "lodash": "^4.17.21",
123
+ "react": "^18.3.1",
124
+ "react-dom": "^18.3.1",
125
+ "react-router-dom": "^6.26.1",
126
+ "typescript": "^5.7.2",
127
+ "ufo": "^1.5.4",
128
+ "vite-plugin-react-pages": "^5.0.0",
129
+ "@blocklet/pages-kit-inner-components": "0.1.0"
130
+ },
131
+ "peerDependencies": {
132
+ "react": "^18.3.1",
133
+ "react-dom": "^18.3.1",
134
+ "react-router-dom": "^6.26.1",
135
+ "@mui/icons-material": "^5.16.7",
136
+ "@mui/material": "^5.16.7",
137
+ "@arcblock/ux": "^2.11.35"
138
+ },
139
+ "devDependencies": {
140
+ "@rollup/plugin-typescript": "^11.1.6",
141
+ "@types/react": "^18.3.18",
142
+ "@types/react-dom": "^18.3.5",
143
+ "@vitejs/plugin-react": "^4.3.4",
144
+ "npm-run-all": "^4.1.5",
145
+ "rimraf": "^6.0.1",
146
+ "vite-node": "^2.1.8",
147
+ "vite-plugin-require": "^1.2.14",
148
+ "vite-tsconfig-paths": "^4.3.2",
149
+ "zx": "^8.3.0"
150
+ },
151
+ "scripts": {
152
+ "lint": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx",
153
+ "lint:fix": "npm run lint -- --fix",
154
+ "build": "run-p build:*",
155
+ "build:cjs": "tsc --module commonjs --outDir lib/cjs",
156
+ "build:esm": "tsc --module es2022 --outDir lib/esm",
157
+ "build:types": "tsc --declaration --emitDeclarationOnly --outDir lib/types",
158
+ "dev": "run-p 'build:* -- -w'",
159
+ "clean": "rimraf lib"
160
+ }
161
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "../../tsconfig",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "outDir": "lib",
6
+ "lib": ["DOM", "ESNext"],
7
+ "paths": {
8
+ // FIXME: Just for local dev, comment next line before publish
9
+ // "@blocklet/ai-runtime/*": ["../../../ai-studio/packages/ai-runtime/src/*"]
10
+ // "@blocklet/ai-kit/*": ["../../../ai-kit/packages/ai-kit/src/*"]
11
+ }
12
+ }
13
+ }