@republicroad/seal-appshell 1.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 +74 -0
- package/dist/assets/custom-node-schema.json.d.ts +549 -0
- package/dist/components/__tests__/skinned-decision-graph.test.d.ts +1 -0
- package/dist/components/__tests__/skinned-header.test.d.ts +1 -0
- package/dist/components/__tests__/skinned-panels.test.d.ts +1 -0
- package/dist/components/__tests__/skinned-simulator-panel.test.d.ts +1 -0
- package/dist/components/__tests__/skinned-simulator.test.d.ts +1 -0
- package/dist/components/custom-node/__tests__/custom-node-button.test.d.ts +1 -0
- package/dist/components/custom-node/__tests__/schema-container-tab.test.d.ts +1 -0
- package/dist/components/custom-node/crypto-node.d.ts +5 -0
- package/dist/components/custom-node/current-date-node.d.ts +8 -0
- package/dist/components/custom-node/http-request-node.d.ts +5 -0
- package/dist/components/custom-node/key-value-editor.d.ts +16 -0
- package/dist/components/custom-node/locked-corner-badge.d.ts +2 -0
- package/dist/components/custom-node/query-list-node.d.ts +5 -0
- package/dist/components/custom-node/schema-container-tab.d.ts +13 -0
- package/dist/components/icons/code.d.ts +3 -0
- package/dist/components/icons/flash-circle.d.ts +3 -0
- package/dist/components/reui/alert.d.ts +9 -0
- package/dist/components/reui/autocomplete.d.ts +40 -0
- package/dist/components/reui/badge.d.ts +14 -0
- package/dist/components/reui/cascader/cascader-async.d.ts +86 -0
- package/dist/components/reui/cascader/cascader-columns.d.ts +26 -0
- package/dist/components/reui/cascader/cascader-context.d.ts +190 -0
- package/dist/components/reui/cascader/cascader-footer.d.ts +83 -0
- package/dist/components/reui/cascader/cascader-i18n.d.ts +13 -0
- package/dist/components/reui/cascader/cascader-item.d.ts +112 -0
- package/dist/components/reui/cascader/cascader-lib.d.ts +137 -0
- package/dist/components/reui/cascader/cascader-nav.d.ts +56 -0
- package/dist/components/reui/cascader/cascader-types.d.ts +179 -0
- package/dist/components/reui/cascader/cascader-virtual.d.ts +62 -0
- package/dist/components/reui/cascader/cascader.d.ts +325 -0
- package/dist/components/shell-header.d.ts +20 -0
- package/dist/components/skinned-decision-graph.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/avatar.d.ts +5 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/field.d.ts +24 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/scroll-area.d.ts +4 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/separator.d.ts +3 -0
- package/dist/components/ui/sheet.d.ts +23 -0
- package/dist/components/ui/sonner.d.ts +5 -0
- package/dist/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/switch.d.ts +3 -0
- package/dist/components/ui/tabs.d.ts +6 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/version-history/__tests__/version-history-panel.test.d.ts +1 -0
- package/dist/components/version-history/version-history-panel.d.ts +40 -0
- package/dist/context/theme.provider.d.ts +29 -0
- package/dist/hooks/useCustomNodes.d.ts +16 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +121959 -0
- package/dist/integration/decision-graph-appshell.stories.d.ts +10 -0
- package/dist/lib/__tests__/crypto-protocol.test.d.ts +1 -0
- package/dist/lib/__tests__/custom-node-registry.test.d.ts +1 -0
- package/dist/lib/__tests__/http-request-protocol.test.d.ts +1 -0
- package/dist/lib/__tests__/json-path-protocol.test.d.ts +1 -0
- package/dist/lib/__tests__/storage-key.test.d.ts +1 -0
- package/dist/lib/auth/__tests__/adapter.test.d.ts +1 -0
- package/dist/lib/auth/adapter.d.ts +7 -0
- package/dist/lib/auth-client.d.ts +3 -0
- package/dist/lib/crypto-protocol.d.ts +28 -0
- package/dist/lib/custom-node-plans.d.ts +24 -0
- package/dist/lib/custom-node-registry.d.ts +13 -0
- package/dist/lib/custom-node-schema-source.d.ts +6 -0
- package/dist/lib/custom-node-types.d.ts +73 -0
- package/dist/lib/http-request-protocol.d.ts +47 -0
- package/dist/lib/json-path-protocol.d.ts +11 -0
- package/dist/lib/roster-source.d.ts +12 -0
- package/dist/lib/storage-key.d.ts +5 -0
- package/dist/lib/user-resolver.d.ts +6 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/reui/icons/animated/duotone/lock.d.ts +3 -0
- package/dist/reui/icons/animated/outline/play-circle.d.ts +3 -0
- package/dist/reui/icons/default/outline/plus-circle.d.ts +3 -0
- package/dist/reui/icons/default/outline/shield-search.d.ts +3 -0
- package/dist/reui/icons/default/outline/trash-square.d.ts +3 -0
- package/dist/setupTests.d.ts +0 -0
- package/dist/shell/__tests__/default-simulate.test.d.ts +1 -0
- package/dist/shell/__tests__/graphs-http-adapter.test.d.ts +1 -0
- package/dist/shell/__tests__/indexed-db-adapter.test.d.ts +0 -0
- package/dist/shell/__tests__/restore.test.d.ts +0 -0
- package/dist/shell/default-simulate.d.ts +3 -0
- package/dist/shell/editor-shell.context.d.ts +22 -0
- package/dist/shell/execute-simulate.d.ts +8 -0
- package/dist/shell/graphs-http-adapter.d.ts +7 -0
- package/dist/shell/index.d.ts +10 -0
- package/dist/shell/indexed-db-adapter.d.ts +16 -0
- package/dist/shell/persistence.d.ts +89 -0
- package/dist/shell/restore.d.ts +21 -0
- package/dist/shell/types.d.ts +20 -0
- package/dist/skin/__tests__/apply.test.d.ts +1 -0
- package/dist/skin/apply.d.ts +7 -0
- package/dist/skin/layout.d.ts +17 -0
- package/dist/skin/types.d.ts +73 -0
- package/dist/style.css +2 -0
- package/package.json +73 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { DecisionGraphRef, DecisionGraphType } from '@republicroad/seal-editor';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { CustomNodeSpec } from '../lib/custom-node-registry';
|
|
4
|
+
export type SkinSeeds = {
|
|
5
|
+
primary?: string;
|
|
6
|
+
success?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
warning?: string;
|
|
9
|
+
info?: string;
|
|
10
|
+
fieldInput?: string;
|
|
11
|
+
fieldOutput?: string;
|
|
12
|
+
};
|
|
13
|
+
/** 节点 UI 槽位覆写:按 kind 劫持画布卡 / Tab 渲染,未指定的槽位回落原实现 */
|
|
14
|
+
export type NodeUiOverride = {
|
|
15
|
+
renderTab?: CustomNodeSpec['renderTab'];
|
|
16
|
+
renderNode?: CustomNodeSpec['renderNode'];
|
|
17
|
+
};
|
|
18
|
+
/** 槽位渲染上下文——与 CustomNodeSpec 渲染上下文对齐(S005 P1 最小集,宿主裁决见规格稿 §10-4) */
|
|
19
|
+
export type SkinSlotContext = {
|
|
20
|
+
/** 当前图文档(受控值,随编辑实时更新) */
|
|
21
|
+
graph: DecisionGraphType;
|
|
22
|
+
/** kernel disabled 态(含画布 diff 对比模式等) */
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
/** 图命令句柄;惰性挂载,早期可能为 null */
|
|
25
|
+
graphRef?: DecisionGraphRef | null;
|
|
26
|
+
};
|
|
27
|
+
export type SkinSlotRender = (ctx: SkinSlotContext) => ReactNode;
|
|
28
|
+
/** P1 · 工具栏槽位(docs/design/skin-layout-slots.md §4) */
|
|
29
|
+
export type SkinToolbarLayout = {
|
|
30
|
+
/** 槽位 id → 渲染函数;id 建议 host: 前缀(裸名 dev-warn + 自动补前缀) */
|
|
31
|
+
slots?: Record<string, SkinSlotRender>;
|
|
32
|
+
/** 槽位排列顺序(数组序即渲染序);未列出的槽位排在列出的之后,按字典序 */
|
|
33
|
+
order?: string[];
|
|
34
|
+
};
|
|
35
|
+
/** P2 · 右缘面板槽位(Sheet 容器,VersionHistoryPanel 同款;bottom 已裁剪 §10-2) */
|
|
36
|
+
export type SkinPanelsLayout = {
|
|
37
|
+
right?: {
|
|
38
|
+
slots?: Record<string, SkinSlotRender>;
|
|
39
|
+
order?: string[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/** P3 · 头部槽位(ShellHeader 壳层实现;每侧一个渲染函数,宿主裁决 §10-3) */
|
|
43
|
+
export type SkinHeaderLayout = {
|
|
44
|
+
slots?: {
|
|
45
|
+
/** 标题区左侧(标题/环境标识) */
|
|
46
|
+
left?: SkinSlotRender;
|
|
47
|
+
/** 标题区右侧(状态徽标/操作) */
|
|
48
|
+
right?: SkinSlotRender;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/** 布局槽位(S005 三期:toolbar P1 / panels P2 / header P3) */
|
|
52
|
+
export type SkinLayout = {
|
|
53
|
+
toolbar?: SkinToolbarLayout;
|
|
54
|
+
panels?: SkinPanelsLayout;
|
|
55
|
+
header?: SkinHeaderLayout;
|
|
56
|
+
};
|
|
57
|
+
/** 皮肤 = 主题种子 + token 覆写 + 节点 UI 槽位覆写 + 布局槽位;一次切换即「一键换UI/换肤/换布局」 */
|
|
58
|
+
export type SkinDefinition = {
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
seeds?: SkinSeeds;
|
|
62
|
+
/** JdmConfigProvider theme.token 透传(优先级高于 seeds 派生) */
|
|
63
|
+
tokens?: Record<string, string>;
|
|
64
|
+
nodeOverrides?: Record<string, NodeUiOverride>;
|
|
65
|
+
/** 布局槽位(S005):缺省零渲染零开销,默认皮肤行为不变 */
|
|
66
|
+
layout?: SkinLayout;
|
|
67
|
+
};
|
|
68
|
+
/** 槽位宿主上下文装载(SkinnedDecisionGraph 每次渲染时构造) */
|
|
69
|
+
export type SkinSlotHostContext = {
|
|
70
|
+
graph?: DecisionGraphType;
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
graphRef?: DecisionGraphRef | null;
|
|
73
|
+
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
._nodeIcon_1hv62_1{color:inherit;align-items:center;line-height:0;display:inline-flex}._nodeIcon_1hv62_1 svg{width:1em;height:1em}._form_1hv62_13{flex-direction:column;gap:6px;display:flex}._callPreview_1hv62_19{align-items:center;gap:8px;min-width:0;display:flex}._callPreview_1hv62_19 .ant-typography{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._summary_1hv62_33{flex-direction:column;gap:6px;padding:8px 10px;font-size:12px;line-height:18px;display:flex}._kind_1hv62_42{opacity:.75;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:11px}._rows_1hv62_48{flex-direction:column;gap:2px;display:flex}._row_1hv62_48{justify-content:space-between;align-items:center;gap:8px;display:flex}._rowKey_1hv62_61{opacity:.6;flex:none}._rowValue_1hv62_66{text-overflow:ellipsis;white-space:nowrap;text-align:right;flex:1;min-width:0;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;overflow:hidden}._returns_1hv62_76{border-top:1px dashed var(--seal-color-border,#00000014);justify-content:space-between;align-items:center;gap:8px;padding-top:4px;display:flex}._traceValue_1hv62_85{text-overflow:ellipsis;white-space:nowrap;max-width:110px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;overflow:hidden}._tabSplit_1hv62_93{flex-direction:row;height:100%;min-height:0;display:flex}._tabList_1hv62_100{border-right:1px solid var(--seal-color-border,#00000014);flex-direction:column;flex:none;width:232px;min-height:0;display:flex}._listRows_1hv62_109{flex-direction:column;flex:1;gap:2px;min-height:0;padding:8px;display:flex;overflow-y:auto}._listRow_1hv62_109{cursor:pointer;border-radius:6px;flex-direction:column;gap:2px;padding:6px 8px;display:flex}._listRow_1hv62_109:hover{background-color:var(--seal-color-fill-tertiary,#0000000a)}._listRowSelected_1hv62_132{box-shadow:inset 0 0 0 1px var(--seal-color-primary,#1677ff80)}._listRowHeader_1hv62_136{justify-content:space-between;align-items:center;gap:8px;display:flex}._listRowActions_1hv62_143{align-items:center;gap:2px;display:flex}._rosterRowValue_1hv62_149{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px;line-height:18px;overflow:hidden}._listAdd_1hv62_160{border-top:1px solid var(--seal-color-border,#00000014);flex:none;padding:8px}._tabDetail_1hv62_166{flex-direction:column;flex:1;min-width:0;min-height:0;padding:12px;display:flex;overflow-y:auto}._httpSplit_1hv62_176{flex-direction:row;height:100%;min-height:0;display:flex}._httpRequestPane_1hv62_183{flex-direction:column;flex:1;min-width:0;min-height:0;padding:12px;display:flex;overflow-y:auto}._httpResponsePane_1hv62_193{border-left:1px solid var(--seal-color-border,#00000014);flex-direction:column;flex:none;gap:6px;width:340px;min-height:0;padding:12px;display:flex;overflow-y:auto}._httpHeaderLine_1hv62_205{justify-content:space-between;align-items:center;gap:8px;display:flex}._httpKeyValueRow_1hv62_212{grid-template-columns:minmax(110px,2fr) 3fr auto;align-items:stretch;gap:6px;display:grid}._httpKeyValueRow_1hv62_212 .cm-editor{height:100%}._httpKeyValueRow_1hv62_212>.ant-btn{align-self:center}._httpMono_1hv62_227{border-radius:6px;max-height:240px;margin:0;padding:8px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12px;line-height:18px;overflow:auto}
|
|
2
|
+
/*$vite$:1*/
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@republicroad/seal-appshell",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Application shell for @republicroad/jdm-editor — custom node hosting, UI slot overrides and skinning",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./dist/style.css": "./dist/style.css"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@republicroad/jdm-editor": "^0.10.0",
|
|
25
|
+
"monaco-editor": "^0.52.2",
|
|
26
|
+
"react": ">=18",
|
|
27
|
+
"react-dom": ">=18"
|
|
28
|
+
},
|
|
29
|
+
"peerDependenciesMeta": {
|
|
30
|
+
"monaco-editor": {
|
|
31
|
+
"optional": false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@base-ui/react": "^1.8.0",
|
|
36
|
+
"@tanstack/react-virtual": "^3.14.10",
|
|
37
|
+
"axios": "^1.13.5",
|
|
38
|
+
"better-auth": "^1.6.25",
|
|
39
|
+
"class-variance-authority": "^0.7.1",
|
|
40
|
+
"clsx": "^2.1.1",
|
|
41
|
+
"lucide-react": "^0.488.0",
|
|
42
|
+
"sonner": "^2.0.8",
|
|
43
|
+
"tailwind-merge": "^3.6.0",
|
|
44
|
+
"ts-pattern": "^5.9.0",
|
|
45
|
+
"zustand": "^5.0.15",
|
|
46
|
+
"@republicroad/seal-editor": "^1.1.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@lezer/common": "^1.5.2",
|
|
50
|
+
"@lezer/lr": "^1.4.2",
|
|
51
|
+
"@storybook/react-vite": "10.6.0",
|
|
52
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
53
|
+
"@testing-library/react": "16.3.0",
|
|
54
|
+
"@types/bun": "^1.3.14",
|
|
55
|
+
"@types/react": "^18.3.1",
|
|
56
|
+
"fake-indexeddb": "^6.0.0",
|
|
57
|
+
"jsdom": "^30.0.1",
|
|
58
|
+
"monaco-editor": "^0.52.2",
|
|
59
|
+
"typescript": "^5.9.3",
|
|
60
|
+
"unplugin-dts": "^1.1.0",
|
|
61
|
+
"vite": "^8.2.2",
|
|
62
|
+
"vitest": "^4.1.11"
|
|
63
|
+
},
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "vite build",
|
|
69
|
+
"typecheck": "tsc --noEmit",
|
|
70
|
+
"test:npm-smoke": "node scripts/npm-smoke.mjs",
|
|
71
|
+
"test": "vitest run"
|
|
72
|
+
}
|
|
73
|
+
}
|