pactor-app 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.
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/dist/index.cjs +24 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/package.json +79 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pactor Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# pactor-app
|
|
2
|
+
|
|
3
|
+
[Pactor](https://github.com/426-330/pactor) 的聚合安装包(meta package):一次安装完整的 Server-Driven UI + AI-Native 运行时栈,入口转发 `@pactor-app/app` 的一站式 API(`createPactorApplication`)。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install pactor-app
|
|
9
|
+
# 或
|
|
10
|
+
pnpm add pactor-app
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
安装后会一并带入全部 `@pactor-app/*` 模块(core / schema / expression / runtime / resource / permission / router / ui / markdown / chat / app / cli / vite-plugin)。
|
|
14
|
+
|
|
15
|
+
## 示例
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { createPactorApplication } from 'pactor-app';
|
|
19
|
+
import '@pactor-app/ui/styles.css';
|
|
20
|
+
|
|
21
|
+
const app = createPactorApplication({
|
|
22
|
+
appId: 'my-app',
|
|
23
|
+
api: { baseUrl: '/api/dsl' },
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
app.mount('#root');
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 按需安装
|
|
30
|
+
|
|
31
|
+
只需要单个模块时,可以不装本包,直接安装对应模块:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install @pactor-app/core # DSL 协议类型与 Registry(零依赖、React 无关)
|
|
35
|
+
npm install @pactor-app/vite-plugin # Vite 插件:.page.yaml 编译 + HMR
|
|
36
|
+
npm install @pactor-app/cli # DSL 工具链(validate / inspect / lint / build / create)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
各模块说明见 [packages 文档](https://github.com/426-330/pactor/tree/main/packages)。
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
|
|
17
|
+
// src/index.ts
|
|
18
|
+
var index_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(index_exports);
|
|
20
|
+
__reExport(index_exports, require("@pactor-app/app"), module.exports);
|
|
21
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
+
0 && (module.exports = {
|
|
23
|
+
...require("@pactor-app/app")
|
|
24
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@pactor-app/app';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@pactor-app/app';
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pactor-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Pactor meta package: installs the full Server-Driven UI + AI-Native runtime stack (@pactor-app/*) and re-exports the one-stop application API (createPactorApplication)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pactor",
|
|
7
|
+
"dsl",
|
|
8
|
+
"server-driven-ui",
|
|
9
|
+
"dynamic-ui",
|
|
10
|
+
"ai-native",
|
|
11
|
+
"runtime",
|
|
12
|
+
"react"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/426-330/pactor.git",
|
|
18
|
+
"directory": "packages/pactor"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/426-330/pactor/tree/main/packages/pactor",
|
|
21
|
+
"bugs": "https://github.com/426-330/pactor/issues",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./dist/index.cjs",
|
|
24
|
+
"module": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/index.d.cts",
|
|
34
|
+
"default": "./dist/index.cjs"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"sideEffects": false,
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"dist"
|
|
44
|
+
],
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@pactor-app/chat": "0.1.0",
|
|
50
|
+
"@pactor-app/app": "0.1.0",
|
|
51
|
+
"@pactor-app/core": "0.1.0",
|
|
52
|
+
"@pactor-app/permission": "0.1.0",
|
|
53
|
+
"@pactor-app/expression": "0.1.0",
|
|
54
|
+
"@pactor-app/markdown": "0.1.0",
|
|
55
|
+
"@pactor-app/runtime": "0.1.0",
|
|
56
|
+
"@pactor-app/router": "0.1.0",
|
|
57
|
+
"@pactor-app/ui": "0.1.0",
|
|
58
|
+
"@pactor-app/resource": "0.1.0",
|
|
59
|
+
"@pactor-app/schema": "0.1.0",
|
|
60
|
+
"@pactor-app/vite-plugin": "0.1.0",
|
|
61
|
+
"@pactor-app/cli": "0.1.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"react": ">=18",
|
|
65
|
+
"react-dom": ">=18",
|
|
66
|
+
"react-router-dom": ">=6"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/react": "^19.2.18",
|
|
70
|
+
"@types/react-dom": "^19.2.4",
|
|
71
|
+
"react": "^19.2.8",
|
|
72
|
+
"react-dom": "^19.2.8",
|
|
73
|
+
"react-router-dom": "^7.18.2"
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "tsup",
|
|
77
|
+
"typecheck": "tsc --noEmit"
|
|
78
|
+
}
|
|
79
|
+
}
|