@pactor-app/ui 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 +113 -0
- package/dist/chunk-57NRUZ5G.js +95 -0
- package/dist/chunk-DMK6RSTK.js +746 -0
- package/dist/chunk-OH3U6PCM.js +536 -0
- package/dist/chunk-OUTSIJMO.js +442 -0
- package/dist/chunk-QDTVOJ5P.js +147 -0
- package/dist/chunk-QWZ23QLS.js +68 -0
- package/dist/chunk-RQHJBTEU.js +10 -0
- package/dist/chunk-SNFDI77B.js +136 -0
- package/dist/chunk-XGOTHOI6.js +619 -0
- package/dist/components/index.cjs +1111 -0
- package/dist/components/index.d.cts +307 -0
- package/dist/components/index.d.ts +307 -0
- package/dist/components/index.js +40 -0
- package/dist/index.cjs +2626 -0
- package/dist/index.d.cts +41 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +87 -0
- package/dist/interaction/index.cjs +752 -0
- package/dist/interaction/index.d.cts +178 -0
- package/dist/interaction/index.d.ts +178 -0
- package/dist/interaction/index.js +19 -0
- package/dist/layout/index.cjs +938 -0
- package/dist/layout/index.d.cts +158 -0
- package/dist/layout/index.d.ts +158 -0
- package/dist/layout/index.js +25 -0
- package/dist/ui/index.cjs +1076 -0
- package/dist/ui/index.d.cts +166 -0
- package/dist/ui/index.d.ts +166 -0
- package/dist/ui/index.js +233 -0
- package/package.json +127 -0
- package/styles.css +1672 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createShadcnComponentRegistry } from './components/index.cjs';
|
|
2
|
+
export { Alert, AlertProps, AlertVariant, Button, ButtonProps, ButtonSize, ButtonVariant, Card, CardProps, FieldRule, Flex, FlexProps, Form, FormContextValue, FormProps, Grid, GridProps, Input, InputProps, Page, PageProps, Select, SelectOption, SelectProps, Statistic, StatisticProps, TabItem, Table, TableColumn, TablePagination, TablePaginationInfo, TableProps, Tabs, TabsProps, registerShadcnComponents, shadcnComponents, useFormContext } from './components/index.cjs';
|
|
3
|
+
import { createShadcnLayoutRegistry } from './layout/index.cjs';
|
|
4
|
+
export { AdminBrand, AdminLayoutBreakpoint, AdminLayoutConfig, AdminLayoutMode, AdminLayoutProps, BlankLayoutProps, LandingLayoutProps, LayoutComponent, LayoutRegistry, LoginBrand, LoginLayoutProps, ShadcnAdminLayout, ShadcnBlankLayout, ShadcnLandingLayout, ShadcnLoginLayout, collectDefaultOpenKeys, findMenuChain, registerShadcnLayouts, resolveLayout } from './layout/index.cjs';
|
|
5
|
+
import { ShadcnInteractionProvider, ShadcnOverlayHost } from './interaction/index.cjs';
|
|
6
|
+
export { InteractionProviderProps, OVERLAY_CANCEL_PAYLOAD, OverlayConfig, OverlayEntry, OverlayHostProps, OverlayListener, OverlayManager, ResolvePageFn, UiBridge, UiMessage, UiModal, createUiBridge, registerInteractionActions } from './interaction/index.cjs';
|
|
7
|
+
import '@pactor-app/runtime';
|
|
8
|
+
import 'react';
|
|
9
|
+
import '@pactor-app/core';
|
|
10
|
+
import '@pactor-app/permission';
|
|
11
|
+
import '@pactor-app/router';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* shadcn UI kit 预设对象:一次性提供 @pactor-app/app `ui` 选项的三个槽位
|
|
15
|
+
* (组件注册表工厂 / 布局注册表工厂 / 交互层组件对),实现整站 shadcn 切换:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { createPactorApplication } from '@pactor-app/app';
|
|
19
|
+
* import { shadcnUiKit } from '@pactor-app/ui';
|
|
20
|
+
* import '@pactor-app/ui/styles.css';
|
|
21
|
+
*
|
|
22
|
+
* createPactorApplication({
|
|
23
|
+
* appId: 'risk-admin',
|
|
24
|
+
* api: { baseURL: '/api/runtime' },
|
|
25
|
+
* ui: shadcnUiKit,
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* 细粒度选项(componentRegistry / layoutRegistry / interactionKit)优先级
|
|
30
|
+
* 高于预设对应槽位,可逐槽位覆盖。
|
|
31
|
+
*/
|
|
32
|
+
declare const shadcnUiKit: {
|
|
33
|
+
componentRegistry: typeof createShadcnComponentRegistry;
|
|
34
|
+
layoutRegistry: typeof createShadcnLayoutRegistry;
|
|
35
|
+
interactionKit: {
|
|
36
|
+
Provider: typeof ShadcnInteractionProvider;
|
|
37
|
+
OverlayHost: typeof ShadcnOverlayHost;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { ShadcnInteractionProvider, ShadcnOverlayHost, createShadcnComponentRegistry, createShadcnLayoutRegistry, shadcnUiKit };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createShadcnComponentRegistry } from './components/index.js';
|
|
2
|
+
export { Alert, AlertProps, AlertVariant, Button, ButtonProps, ButtonSize, ButtonVariant, Card, CardProps, FieldRule, Flex, FlexProps, Form, FormContextValue, FormProps, Grid, GridProps, Input, InputProps, Page, PageProps, Select, SelectOption, SelectProps, Statistic, StatisticProps, TabItem, Table, TableColumn, TablePagination, TablePaginationInfo, TableProps, Tabs, TabsProps, registerShadcnComponents, shadcnComponents, useFormContext } from './components/index.js';
|
|
3
|
+
import { createShadcnLayoutRegistry } from './layout/index.js';
|
|
4
|
+
export { AdminBrand, AdminLayoutBreakpoint, AdminLayoutConfig, AdminLayoutMode, AdminLayoutProps, BlankLayoutProps, LandingLayoutProps, LayoutComponent, LayoutRegistry, LoginBrand, LoginLayoutProps, ShadcnAdminLayout, ShadcnBlankLayout, ShadcnLandingLayout, ShadcnLoginLayout, collectDefaultOpenKeys, findMenuChain, registerShadcnLayouts, resolveLayout } from './layout/index.js';
|
|
5
|
+
import { ShadcnInteractionProvider, ShadcnOverlayHost } from './interaction/index.js';
|
|
6
|
+
export { InteractionProviderProps, OVERLAY_CANCEL_PAYLOAD, OverlayConfig, OverlayEntry, OverlayHostProps, OverlayListener, OverlayManager, ResolvePageFn, UiBridge, UiMessage, UiModal, createUiBridge, registerInteractionActions } from './interaction/index.js';
|
|
7
|
+
import '@pactor-app/runtime';
|
|
8
|
+
import 'react';
|
|
9
|
+
import '@pactor-app/core';
|
|
10
|
+
import '@pactor-app/permission';
|
|
11
|
+
import '@pactor-app/router';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* shadcn UI kit 预设对象:一次性提供 @pactor-app/app `ui` 选项的三个槽位
|
|
15
|
+
* (组件注册表工厂 / 布局注册表工厂 / 交互层组件对),实现整站 shadcn 切换:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { createPactorApplication } from '@pactor-app/app';
|
|
19
|
+
* import { shadcnUiKit } from '@pactor-app/ui';
|
|
20
|
+
* import '@pactor-app/ui/styles.css';
|
|
21
|
+
*
|
|
22
|
+
* createPactorApplication({
|
|
23
|
+
* appId: 'risk-admin',
|
|
24
|
+
* api: { baseURL: '/api/runtime' },
|
|
25
|
+
* ui: shadcnUiKit,
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* 细粒度选项(componentRegistry / layoutRegistry / interactionKit)优先级
|
|
30
|
+
* 高于预设对应槽位,可逐槽位覆盖。
|
|
31
|
+
*/
|
|
32
|
+
declare const shadcnUiKit: {
|
|
33
|
+
componentRegistry: typeof createShadcnComponentRegistry;
|
|
34
|
+
layoutRegistry: typeof createShadcnLayoutRegistry;
|
|
35
|
+
interactionKit: {
|
|
36
|
+
Provider: typeof ShadcnInteractionProvider;
|
|
37
|
+
OverlayHost: typeof ShadcnOverlayHost;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { ShadcnInteractionProvider, ShadcnOverlayHost, createShadcnComponentRegistry, createShadcnLayoutRegistry, shadcnUiKit };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Alert,
|
|
3
|
+
Button,
|
|
4
|
+
Card,
|
|
5
|
+
Flex,
|
|
6
|
+
Form,
|
|
7
|
+
Grid,
|
|
8
|
+
Input,
|
|
9
|
+
Page,
|
|
10
|
+
Select,
|
|
11
|
+
Statistic,
|
|
12
|
+
Table,
|
|
13
|
+
Tabs,
|
|
14
|
+
createShadcnComponentRegistry,
|
|
15
|
+
registerShadcnComponents,
|
|
16
|
+
shadcnComponents,
|
|
17
|
+
useFormContext
|
|
18
|
+
} from "./chunk-XGOTHOI6.js";
|
|
19
|
+
import {
|
|
20
|
+
OVERLAY_CANCEL_PAYLOAD,
|
|
21
|
+
OverlayManager,
|
|
22
|
+
ShadcnInteractionProvider,
|
|
23
|
+
ShadcnOverlayHost,
|
|
24
|
+
createUiBridge,
|
|
25
|
+
registerInteractionActions
|
|
26
|
+
} from "./chunk-OH3U6PCM.js";
|
|
27
|
+
import {
|
|
28
|
+
ShadcnAdminLayout,
|
|
29
|
+
ShadcnBlankLayout,
|
|
30
|
+
ShadcnLandingLayout,
|
|
31
|
+
ShadcnLoginLayout,
|
|
32
|
+
collectDefaultOpenKeys,
|
|
33
|
+
createShadcnLayoutRegistry,
|
|
34
|
+
findMenuChain,
|
|
35
|
+
registerShadcnLayouts,
|
|
36
|
+
resolveLayout
|
|
37
|
+
} from "./chunk-DMK6RSTK.js";
|
|
38
|
+
import "./chunk-OUTSIJMO.js";
|
|
39
|
+
import "./chunk-QDTVOJ5P.js";
|
|
40
|
+
import "./chunk-QWZ23QLS.js";
|
|
41
|
+
import "./chunk-SNFDI77B.js";
|
|
42
|
+
import "./chunk-57NRUZ5G.js";
|
|
43
|
+
import "./chunk-RQHJBTEU.js";
|
|
44
|
+
|
|
45
|
+
// src/index.ts
|
|
46
|
+
var shadcnUiKit = {
|
|
47
|
+
componentRegistry: createShadcnComponentRegistry,
|
|
48
|
+
layoutRegistry: createShadcnLayoutRegistry,
|
|
49
|
+
interactionKit: {
|
|
50
|
+
Provider: ShadcnInteractionProvider,
|
|
51
|
+
OverlayHost: ShadcnOverlayHost
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
Alert,
|
|
56
|
+
Button,
|
|
57
|
+
Card,
|
|
58
|
+
Flex,
|
|
59
|
+
Form,
|
|
60
|
+
Grid,
|
|
61
|
+
Input,
|
|
62
|
+
OVERLAY_CANCEL_PAYLOAD,
|
|
63
|
+
OverlayManager,
|
|
64
|
+
Page,
|
|
65
|
+
Select,
|
|
66
|
+
ShadcnAdminLayout,
|
|
67
|
+
ShadcnBlankLayout,
|
|
68
|
+
ShadcnInteractionProvider,
|
|
69
|
+
ShadcnLandingLayout,
|
|
70
|
+
ShadcnLoginLayout,
|
|
71
|
+
ShadcnOverlayHost,
|
|
72
|
+
Statistic,
|
|
73
|
+
Table,
|
|
74
|
+
Tabs,
|
|
75
|
+
collectDefaultOpenKeys,
|
|
76
|
+
createShadcnComponentRegistry,
|
|
77
|
+
createShadcnLayoutRegistry,
|
|
78
|
+
createUiBridge,
|
|
79
|
+
findMenuChain,
|
|
80
|
+
registerInteractionActions,
|
|
81
|
+
registerShadcnComponents,
|
|
82
|
+
registerShadcnLayouts,
|
|
83
|
+
resolveLayout,
|
|
84
|
+
shadcnComponents,
|
|
85
|
+
shadcnUiKit,
|
|
86
|
+
useFormContext
|
|
87
|
+
};
|