@fenglimg/cocos-state-controller 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 +287 -0
- package/assets/script/controller/Capability.ts +100 -0
- package/assets/script/controller/Capability.ts.meta +10 -0
- package/assets/script/controller/CapabilityRegistry.ts +116 -0
- package/assets/script/controller/CapabilityRegistry.ts.meta +10 -0
- package/assets/script/controller/EnumPropRefMap.ts +232 -0
- package/assets/script/controller/EnumPropRefMap.ts.meta +10 -0
- package/assets/script/controller/NestedCtrlData.ts +199 -0
- package/assets/script/controller/NestedCtrlData.ts.meta +10 -0
- package/assets/script/controller/PrefabIntrospection.ts +151 -0
- package/assets/script/controller/PrefabIntrospection.ts.meta +10 -0
- package/assets/script/controller/Props.meta +13 -0
- package/assets/script/controller/StateControllerV2.ts +1957 -0
- package/assets/script/controller/StateControllerV2.ts.meta +10 -0
- package/assets/script/controller/StateEnumV2.ts +165 -0
- package/assets/script/controller/StateEnumV2.ts.meta +10 -0
- package/assets/script/controller/StateErrorManagerV2.ts +217 -0
- package/assets/script/controller/StateErrorManagerV2.ts.meta +10 -0
- package/assets/script/controller/StatePropHandlerV2.ts +316 -0
- package/assets/script/controller/StatePropHandlerV2.ts.meta +10 -0
- package/assets/script/controller/StatePropertyControlService.ts +148 -0
- package/assets/script/controller/StatePropertyControlService.ts.meta +10 -0
- package/assets/script/controller/StateSelectV2.ts +4542 -0
- package/assets/script/controller/StateSelectV2.ts.meta +10 -0
- package/assets/script/controller/capabilities/AutoSyncCapability.ts +30 -0
- package/assets/script/controller/capabilities/AutoSyncCapability.ts.meta +10 -0
- package/assets/script/controller/capabilities/EventCapability.ts +144 -0
- package/assets/script/controller/capabilities/EventCapability.ts.meta +10 -0
- package/assets/script/controller/capabilities/MigrationCapability.ts +94 -0
- package/assets/script/controller/capabilities/MigrationCapability.ts.meta +10 -0
- package/assets/script/controller/capabilities/MultiCtrlBindingCapability.ts +157 -0
- package/assets/script/controller/capabilities/MultiCtrlBindingCapability.ts.meta +10 -0
- package/assets/script/controller/capabilities/PropertyControlCapability.ts +124 -0
- package/assets/script/controller/capabilities/PropertyControlCapability.ts.meta +10 -0
- package/assets/script/controller/capabilities/RecordingCapability.ts +69 -0
- package/assets/script/controller/capabilities/RecordingCapability.ts.meta +10 -0
- package/assets/script/controller/capabilities/SelectedPageIdCapability.ts +88 -0
- package/assets/script/controller/capabilities/SelectedPageIdCapability.ts.meta +10 -0
- package/assets/script/controller/capabilities.meta +13 -0
- package/assets/script/controller/props/CtrlInspectorGroups.ts +138 -0
- package/assets/script/controller/props/CtrlInspectorGroups.ts.meta +10 -0
- package/assets/script/controller/props/SelectInspectorGroups.ts +104 -0
- package/assets/script/controller/props/SelectInspectorGroups.ts.meta +10 -0
- package/bin/csc.js +286 -0
- package/package.json +60 -0
- package/packages/state-controller-v2-panel/README.md +80 -0
- package/packages/state-controller-v2-panel/inspector-inject.js +917 -0
- package/packages/state-controller-v2-panel/inspector-probe.json +3767 -0
- package/packages/state-controller-v2-panel/lib/handlers.js +534 -0
- package/packages/state-controller-v2-panel/main.js +149 -0
- package/packages/state-controller-v2-panel/package.json +32 -0
- package/packages/state-controller-v2-panel/panel/build.js +23 -0
- package/packages/state-controller-v2-panel/panel/logic.js +1207 -0
- package/packages/state-controller-v2-panel/panel/styles.css +454 -0
- package/packages/state-controller-v2-panel/panel/template.html +296 -0
- package/packages/state-controller-v2-panel/scene-accessor.js +657 -0
- package/skills/cocos-state-controller/SKILL.md +28 -0
- package/skills/cocos-state-controller/refs/cli-usage.md +78 -0
- package/skills/cocos-state-controller/refs/editor-guide.md +127 -0
- package/skills/cocos-state-controller/refs/migrate.md +106 -0
- package/skills/cocos-state-controller/refs/upstream-pr.md +66 -0
- package/tools/migration/migrate-prefab-v1-to-v2.js +608 -0
- package/tools/state-controller-sync-manifest.json +33 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Syne:wght@700;800&display=swap');
|
|
2
|
+
|
|
3
|
+
/* ============================================================
|
|
4
|
+
State Controller 面板 — Neo-Brutalist Pop (撞色新丑)
|
|
5
|
+
设计源: .workflow/.scratchpad/mockups/style-2.html
|
|
6
|
+
============================================================ */
|
|
7
|
+
|
|
8
|
+
:host {
|
|
9
|
+
--bg-main: #FFFDF3;
|
|
10
|
+
--bg-card: #FFFFFF;
|
|
11
|
+
--primary: #FFDE4D;
|
|
12
|
+
--accent-pink: #FF6B6B;
|
|
13
|
+
--accent-green: #6BCB77;
|
|
14
|
+
--accent-blue: #4D96FF;
|
|
15
|
+
--text-main: #000000;
|
|
16
|
+
--text-dim: #555555;
|
|
17
|
+
--border-thick: 3px solid #000000;
|
|
18
|
+
--border-thin: 2px solid #000000;
|
|
19
|
+
--shadow-hard: 4px 4px 0px #000000;
|
|
20
|
+
--shadow-hard-lg: 6px 6px 0px #000000;
|
|
21
|
+
--transition: all 0.13s ease-in-out;
|
|
22
|
+
display: flex;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
27
|
+
color: var(--text-main);
|
|
28
|
+
font-size: 13px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
* { box-sizing: border-box; }
|
|
32
|
+
|
|
33
|
+
.panel-shell {
|
|
34
|
+
flex: 1;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
background: var(--bg-main);
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ---------- 顶部导航 ---------- */
|
|
45
|
+
.top-nav {
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 12px;
|
|
51
|
+
padding: 10px 14px;
|
|
52
|
+
background: var(--primary);
|
|
53
|
+
border-bottom: var(--border-thick);
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
}
|
|
56
|
+
.nav-tabs { display: flex; gap: 8px; }
|
|
57
|
+
.tab-btn {
|
|
58
|
+
font-family: 'Syne', sans-serif;
|
|
59
|
+
font-weight: 800;
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
padding: 7px 14px;
|
|
63
|
+
background: var(--bg-card);
|
|
64
|
+
border: var(--border-thick);
|
|
65
|
+
box-shadow: var(--shadow-hard);
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
transition: var(--transition);
|
|
68
|
+
}
|
|
69
|
+
.tab-btn:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard-lg); }
|
|
70
|
+
.tab-btn.is-active { background: var(--accent-blue); color: #fff; }
|
|
71
|
+
.nav-actions { display: flex; align-items: center; gap: 10px; }
|
|
72
|
+
.actions-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
73
|
+
|
|
74
|
+
.field-label {
|
|
75
|
+
font-size: 11px; font-weight: 700; text-transform: uppercase;
|
|
76
|
+
color: #000; opacity: .7;
|
|
77
|
+
}
|
|
78
|
+
.toggle-label { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12px; cursor: pointer; }
|
|
79
|
+
.toggle-group { display: flex; gap: 10px; }
|
|
80
|
+
.toggle-group.is-disabled { opacity: .4; pointer-events: none; }
|
|
81
|
+
/* 撞色新丑风勾选框 (替代默认蓝勾, 配合黄底 nav) */
|
|
82
|
+
.toggle-label input[type="checkbox"] {
|
|
83
|
+
-webkit-appearance: none; appearance: none;
|
|
84
|
+
width: 16px; height: 16px; margin: 0; flex: 0 0 auto;
|
|
85
|
+
background: #fff; border: var(--border-thin); box-shadow: 2px 2px 0 #000;
|
|
86
|
+
cursor: pointer; position: relative; transition: var(--transition);
|
|
87
|
+
}
|
|
88
|
+
.toggle-label input[type="checkbox"]:checked { background: var(--accent-green); }
|
|
89
|
+
.toggle-label input[type="checkbox"]:checked::after {
|
|
90
|
+
content: '✓'; position: absolute; inset: 0;
|
|
91
|
+
display: flex; align-items: center; justify-content: center;
|
|
92
|
+
font-size: 12px; font-weight: 800; color: #000;
|
|
93
|
+
}
|
|
94
|
+
.toggle-label input[type="checkbox"]:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
|
|
95
|
+
|
|
96
|
+
/* ---------- 通用 NB 控件 ---------- */
|
|
97
|
+
.nb-btn {
|
|
98
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
99
|
+
font-weight: 700; font-size: 13px;
|
|
100
|
+
padding: 6px 12px;
|
|
101
|
+
background: var(--bg-card);
|
|
102
|
+
border: var(--border-thin);
|
|
103
|
+
box-shadow: 2px 2px 0px #000;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
transition: var(--transition);
|
|
106
|
+
}
|
|
107
|
+
.nb-btn:hover:not(:disabled) { transform: translate(-1px,-1px); box-shadow: 3px 3px 0px #000; background: var(--primary); }
|
|
108
|
+
.nb-btn:active:not(:disabled) { transform: translate(1px,1px); box-shadow: none; }
|
|
109
|
+
.nb-btn:disabled, .nb-btn.is-disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
|
|
110
|
+
.nb-btn-primary { background: var(--accent-green); }
|
|
111
|
+
.btn-wide { width: 100%; }
|
|
112
|
+
.btn-icon { padding: 6px 9px; }
|
|
113
|
+
.btn-small { padding: 3px 8px; font-size: 11px; box-shadow: 2px 2px 0 #000; }
|
|
114
|
+
.nb-select, .nb-input {
|
|
115
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
116
|
+
font-weight: 600; font-size: 12px;
|
|
117
|
+
padding: 6px 10px;
|
|
118
|
+
background: var(--bg-card);
|
|
119
|
+
border: var(--border-thin);
|
|
120
|
+
box-shadow: 2px 2px 0px #000;
|
|
121
|
+
}
|
|
122
|
+
.nb-input { min-width: 160px; }
|
|
123
|
+
.nb-input:focus, .nb-select:focus { outline: none; background: #fffdf3; }
|
|
124
|
+
|
|
125
|
+
/* ---------- 视图容器 ---------- */
|
|
126
|
+
.view-container { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
|
127
|
+
|
|
128
|
+
/* ====================================================
|
|
129
|
+
观测总览
|
|
130
|
+
==================================================== */
|
|
131
|
+
#view-overview { padding: 14px; gap: 14px; overflow: auto; }
|
|
132
|
+
|
|
133
|
+
/* 仪表盘 */
|
|
134
|
+
.dashboard-grid {
|
|
135
|
+
flex: 0 0 auto;
|
|
136
|
+
display: grid;
|
|
137
|
+
grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
|
|
138
|
+
gap: 12px;
|
|
139
|
+
}
|
|
140
|
+
.db-card {
|
|
141
|
+
background: var(--bg-card);
|
|
142
|
+
border: var(--border-thick);
|
|
143
|
+
box-shadow: var(--shadow-hard);
|
|
144
|
+
padding: 12px 14px;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
transition: var(--transition);
|
|
147
|
+
}
|
|
148
|
+
.db-card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-hard-lg); }
|
|
149
|
+
.db-card.active { background: var(--primary); }
|
|
150
|
+
.db-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
151
|
+
.db-value { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
|
|
152
|
+
.db-state-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
153
|
+
.status-dot { width: 12px; height: 12px; border: 2px solid #000; border-radius: 50%; flex: 0 0 auto; background: var(--accent-green); }
|
|
154
|
+
.status-dot.recording { background: var(--accent-pink); }
|
|
155
|
+
|
|
156
|
+
/* 主体三栏 */
|
|
157
|
+
.overview-body {
|
|
158
|
+
flex: 1; min-height: 280px;
|
|
159
|
+
display: grid;
|
|
160
|
+
grid-template-columns: minmax(220px, 280px) 1fr minmax(200px, 260px);
|
|
161
|
+
gap: 14px;
|
|
162
|
+
}
|
|
163
|
+
@media (max-width: 900px) { .overview-body { grid-template-columns: 1fr; } }
|
|
164
|
+
|
|
165
|
+
.panel-cap {
|
|
166
|
+
font-family: 'Syne', sans-serif; font-weight: 800; font-size: 14px;
|
|
167
|
+
text-transform: uppercase; padding: 8px 12px;
|
|
168
|
+
background: var(--primary); border: var(--border-thick); border-bottom: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* 拓扑树 */
|
|
172
|
+
.topology-panel { display: flex; flex-direction: column; min-height: 0; }
|
|
173
|
+
.topology-tree {
|
|
174
|
+
flex: 1; min-height: 0; overflow: auto;
|
|
175
|
+
background: var(--bg-card);
|
|
176
|
+
border: var(--border-thick);
|
|
177
|
+
box-shadow: var(--shadow-hard);
|
|
178
|
+
padding: 8px;
|
|
179
|
+
}
|
|
180
|
+
.tree-ctrl {
|
|
181
|
+
display: flex; align-items: center; gap: 6px;
|
|
182
|
+
font-family: 'Syne', sans-serif; font-weight: 800; font-size: 14px;
|
|
183
|
+
padding: 8px 8px; margin-top: 4px;
|
|
184
|
+
background: var(--accent-blue); color: #fff;
|
|
185
|
+
border: var(--border-thin); cursor: pointer;
|
|
186
|
+
box-shadow: 2px 2px 0 #000;
|
|
187
|
+
}
|
|
188
|
+
.tree-ctrl:first-child { margin-top: 0; }
|
|
189
|
+
.tree-ctrl.collapsed .tree-caret { transform: rotate(-90deg); }
|
|
190
|
+
.tree-caret { display: inline-block; transition: var(--transition); font-size: 11px; }
|
|
191
|
+
.tree-ctrl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
192
|
+
.tree-node {
|
|
193
|
+
display: flex; align-items: center; gap: 6px;
|
|
194
|
+
font-weight: 700; padding: 6px 8px; margin: 4px 0 2px 10px;
|
|
195
|
+
background: #fff; border: var(--border-thin); cursor: pointer;
|
|
196
|
+
transition: var(--transition);
|
|
197
|
+
}
|
|
198
|
+
.tree-node:hover { background: var(--primary); transform: translate(-1px,-1px); }
|
|
199
|
+
.tree-node.is-selected { background: var(--primary); box-shadow: 2px 2px 0 #000; }
|
|
200
|
+
.tree-node-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
201
|
+
.tree-prop {
|
|
202
|
+
display: flex; align-items: center; justify-content: space-between; gap: 6px;
|
|
203
|
+
padding: 4px 8px 4px 28px; margin-left: 10px;
|
|
204
|
+
font-size: 12px; cursor: pointer; border-left: var(--border-thin);
|
|
205
|
+
}
|
|
206
|
+
.tree-prop:hover { background: #f4f4f4; }
|
|
207
|
+
.tree-prop.is-selected { background: #fff9e6; font-weight: 700; }
|
|
208
|
+
.tree-prop-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
209
|
+
|
|
210
|
+
.kind-badge {
|
|
211
|
+
font-size: 10px; font-weight: 700; text-transform: uppercase;
|
|
212
|
+
padding: 1px 6px; border: 1.5px solid #000; border-radius: 4px; flex: 0 0 auto;
|
|
213
|
+
}
|
|
214
|
+
.kind-badge.tracked { background: var(--accent-green); }
|
|
215
|
+
.kind-badge.loose { background: var(--primary); }
|
|
216
|
+
.kind-badge.excluded { background: #e5e5e5; color: #555; }
|
|
217
|
+
.kind-badge.mixed { background: var(--accent-pink); }
|
|
218
|
+
|
|
219
|
+
/* 值矩阵 */
|
|
220
|
+
.matrix-container {
|
|
221
|
+
display: flex; flex-direction: column; min-height: 0; min-width: 0;
|
|
222
|
+
background: var(--bg-card);
|
|
223
|
+
border: var(--border-thick);
|
|
224
|
+
box-shadow: var(--shadow-hard);
|
|
225
|
+
overflow: hidden;
|
|
226
|
+
}
|
|
227
|
+
.matrix-title-bar {
|
|
228
|
+
flex: 0 0 auto;
|
|
229
|
+
display: flex; justify-content: space-between; align-items: center; gap: 8px;
|
|
230
|
+
padding: 10px 14px; background: var(--primary); border-bottom: var(--border-thick);
|
|
231
|
+
}
|
|
232
|
+
.matrix-title-bar h2 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
233
|
+
.matrix-hint { font-size: 11px; font-weight: 700; background: #fff; padding: 3px 7px; border: var(--border-thin); white-space: nowrap; flex: 0 0 auto; }
|
|
234
|
+
.matrix-scroll { flex: 1; min-height: 0; overflow: auto; position: relative; }
|
|
235
|
+
.matrix-table { width: 100%; border-collapse: collapse; text-align: left; }
|
|
236
|
+
.matrix-table th, .matrix-table td {
|
|
237
|
+
padding: 10px 14px; border-bottom: var(--border-thin); border-right: var(--border-thin);
|
|
238
|
+
white-space: nowrap;
|
|
239
|
+
}
|
|
240
|
+
.matrix-table th:last-child, .matrix-table td:last-child { border-right: none; }
|
|
241
|
+
.matrix-table thead th {
|
|
242
|
+
position: sticky; top: 0; z-index: 2;
|
|
243
|
+
font-size: 12px; text-transform: uppercase; font-weight: 700; background: #fff;
|
|
244
|
+
}
|
|
245
|
+
.matrix-table th.col-highlight { background: var(--accent-blue) !important; color: #fff !important; }
|
|
246
|
+
.matrix-cell.col-highlight, td.col-highlight { background: #ebf4f6 !important; }
|
|
247
|
+
/* 显示完全: 长值(UUID/资源/向量)在列内换行, 不靠横滚 (老 Chromium sticky 不可靠) */
|
|
248
|
+
.matrix-table tbody td { white-space: normal; }
|
|
249
|
+
.matrix-prop { min-width: 116px; }
|
|
250
|
+
.matrix-cell { word-break: break-all; }
|
|
251
|
+
.matrix-cell .img-name, .matrix-cell .val-vector { white-space: normal; word-break: break-all; }
|
|
252
|
+
.matrix-cell .val-image { align-items: flex-start; }
|
|
253
|
+
.matrix-table tbody tr { transition: var(--transition); }
|
|
254
|
+
.matrix-table tbody tr:hover { background: #f7f7f7; }
|
|
255
|
+
.matrix-table tbody tr.row-changed { background: #fff9e6; }
|
|
256
|
+
.matrix-table tr.row-changed .matrix-prop {
|
|
257
|
+
background: repeating-linear-gradient(-45deg,#fffbe8,#fffbe8 9px,#fff5c0 9px,#fff5c0 18px);
|
|
258
|
+
}
|
|
259
|
+
.matrix-prop .prop-name { font-weight: 700; font-size: 14px; }
|
|
260
|
+
.matrix-prop .prop-type { font-size: 11px; font-weight: 500; color: var(--text-dim); margin-top: 2px; }
|
|
261
|
+
.matrix-empty { padding: 28px 20px; text-align: center; color: var(--text-dim); font-weight: 600; }
|
|
262
|
+
|
|
263
|
+
/* 高保真值 */
|
|
264
|
+
.val-vector { font-size: 13px; font-weight: 700; background: #f1f1f1; padding: 3px 7px; border: var(--border-thin); display: inline-block; }
|
|
265
|
+
.val-vector.changed { background: var(--accent-blue); color: #fff; }
|
|
266
|
+
.val-color { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
|
|
267
|
+
.color-preview { width: 20px; height: 20px; border: var(--border-thin); box-shadow: 2px 2px 0 #000; flex: 0 0 auto; }
|
|
268
|
+
.val-image { display: inline-flex; align-items: center; gap: 8px; }
|
|
269
|
+
.img-thumb { width: 28px; height: 28px; border: var(--border-thin); background: var(--primary); box-shadow: 2px 2px 0 #000; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 14px; }
|
|
270
|
+
.img-name { font-size: 12px; font-weight: 700; }
|
|
271
|
+
.val-bool { font-weight: 700; padding: 2px 8px; border: var(--border-thin); display: inline-block; }
|
|
272
|
+
.val-bool.t { background: var(--accent-green); }
|
|
273
|
+
.val-bool.f { background: var(--accent-pink); }
|
|
274
|
+
.ghost-val { font-style: italic; opacity: .5; font-weight: 500; }
|
|
275
|
+
.ghost-val::after { content: ' 👻'; font-style: normal; }
|
|
276
|
+
|
|
277
|
+
/* 问题清单 */
|
|
278
|
+
.issues-panel {
|
|
279
|
+
display: flex; flex-direction: column; min-height: 0;
|
|
280
|
+
background: var(--bg-card); border: var(--border-thick); box-shadow: var(--shadow-hard);
|
|
281
|
+
padding: 14px;
|
|
282
|
+
}
|
|
283
|
+
.issues-header { display: flex; justify-content: space-between; align-items: center; border-bottom: var(--border-thick); padding-bottom: 10px; margin-bottom: 12px; }
|
|
284
|
+
.issues-header h2 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; }
|
|
285
|
+
.issues-count { background: var(--accent-pink); border: var(--border-thin); font-size: 13px; font-weight: 700; padding: 2px 10px; box-shadow: 2px 2px 0 #000; }
|
|
286
|
+
.issue-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
|
|
287
|
+
.issue-item { padding: 10px; background: #fff; border: var(--border-thin); box-shadow: 3px 3px 0 #000; transition: var(--transition); }
|
|
288
|
+
.issue-item:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 #000; }
|
|
289
|
+
.issue-title { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
|
|
290
|
+
.issue-prop { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
291
|
+
.issue-desc { font-size: 11px; color: #333; margin-bottom: 8px; }
|
|
292
|
+
.badge-type { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 1px 7px; border: 1.5px solid #000; flex: 0 0 auto; }
|
|
293
|
+
.badge-type.loose { background: var(--primary); }
|
|
294
|
+
.badge-type.excluded { background: #e5e5e5; }
|
|
295
|
+
.badge-type.mixed { background: var(--accent-pink); }
|
|
296
|
+
.btn-issue-jump { font-size: 11px; padding: 3px 8px; }
|
|
297
|
+
.issue-empty { font-size: 12px; color: var(--text-dim); font-weight: 600; text-align: center; padding: 16px 0; }
|
|
298
|
+
|
|
299
|
+
/* 空态: logic 以内联 display:flex 显隐, 这里固定竖排居中并填充容器, 否则 h3/p 会并排成一行 */
|
|
300
|
+
.empty-tip { flex: 1 1 auto; min-height: 0; padding: 32px 20px; text-align: center; flex-direction: column; align-items: center; justify-content: center; }
|
|
301
|
+
.empty-tip h3 { font-family: 'Syne', sans-serif; font-size: 18px; margin-bottom: 8px; }
|
|
302
|
+
.empty-tip p { color: var(--text-dim); font-weight: 600; margin-bottom: 12px; }
|
|
303
|
+
|
|
304
|
+
/* ====================================================
|
|
305
|
+
编辑视图 (保留)
|
|
306
|
+
==================================================== */
|
|
307
|
+
#view-editor { flex-direction: row; }
|
|
308
|
+
.sidebar { flex: 0 0 180px; display: flex; flex-direction: column; border-right: var(--border-thick); min-height: 0; }
|
|
309
|
+
.states-list { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
|
|
310
|
+
.states-list.locked { opacity: .7; }
|
|
311
|
+
.sidebar-footer { flex: 0 0 auto; padding: 10px; border-top: var(--border-thin); }
|
|
312
|
+
.state-item { display: flex; align-items: center; gap: 8px; padding: 8px; background: #fff; border: var(--border-thin); box-shadow: 2px 2px 0 #000; cursor: pointer; transition: var(--transition); }
|
|
313
|
+
.state-item:hover { transform: translate(-1px,-1px); }
|
|
314
|
+
.state-item.is-active { background: var(--primary); }
|
|
315
|
+
.state-thumb { width: 26px; height: 26px; border: var(--border-thin); background: var(--accent-blue); flex: 0 0 auto; }
|
|
316
|
+
.state-meta { flex: 1; min-width: 0; }
|
|
317
|
+
.state-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
318
|
+
.state-sub { font-size: 11px; color: var(--text-dim); }
|
|
319
|
+
.record-dot { color: var(--accent-pink); font-size: 12px; }
|
|
320
|
+
|
|
321
|
+
.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px; gap: 14px; overflow: auto; }
|
|
322
|
+
.main-toolbar { display: flex; align-items: center; gap: 10px; }
|
|
323
|
+
.ctrl-switch-wrap { display: flex; gap: 4px; align-items: center; }
|
|
324
|
+
.ctrl-switch { min-width: 120px; }
|
|
325
|
+
.state-detail { display: flex; flex-direction: column; gap: 14px; }
|
|
326
|
+
.shared-strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
|
|
327
|
+
.strip-field { display: flex; align-items: center; gap: 8px; }
|
|
328
|
+
.record-actions { display: flex; gap: 8px; }
|
|
329
|
+
.btn-record { background: var(--accent-pink); }
|
|
330
|
+
.btn-stop { background: var(--accent-green); }
|
|
331
|
+
.detail-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: var(--border-thick); padding-bottom: 10px; }
|
|
332
|
+
.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); }
|
|
333
|
+
.state-title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; }
|
|
334
|
+
.record-badge { font-weight: 700; font-size: 12px; padding: 4px 10px; border: var(--border-thin); box-shadow: 2px 2px 0 #000; background: #fff; }
|
|
335
|
+
.record-badge.is-live { background: var(--accent-pink); }
|
|
336
|
+
/* 单控制器编辑: 受控属性 diff 矩阵 (复用 .matrix-table) */
|
|
337
|
+
.editor-matrix-cap { display: flex; align-items: baseline; gap: 12px; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
|
|
338
|
+
.editor-matrix-cap .cap-hint { font-size: 11px; font-weight: 600; color: var(--text-dim); }
|
|
339
|
+
.editor-matrix { display: flex; flex-direction: column; gap: 16px; }
|
|
340
|
+
.em-member { background: #fff; border: var(--border-thick); box-shadow: var(--shadow-hard); overflow: hidden; }
|
|
341
|
+
.em-member-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 13px; padding: 8px 12px; background: var(--primary); border-bottom: var(--border-thin); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
342
|
+
.em-member-title:hover { background: var(--accent-blue); color: #fff; }
|
|
343
|
+
.em-scroll { max-height: 340px; overflow: auto; }
|
|
344
|
+
.em-cancel { margin-top: 4px; padding: 0 6px; line-height: 18px; font-size: 11px; }
|
|
345
|
+
.editor-matrix-cap .em-showall { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
|
|
346
|
+
.matrix-prop.clickable { cursor: pointer; }
|
|
347
|
+
.matrix-prop.clickable:hover .prop-name { text-decoration: underline; }
|
|
348
|
+
.prop-empty { padding: 16px; color: var(--text-dim); font-size: 13px; font-weight: 600; }
|
|
349
|
+
|
|
350
|
+
/* 属性详情抽屉 */
|
|
351
|
+
.prop-detail { position: fixed; inset: 0; z-index: 100; }
|
|
352
|
+
.pd-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
|
|
353
|
+
.pd-panel { position: absolute; top: 0; right: 0; height: 100%; width: 380px; max-width: 86vw; background: var(--bg-main); border-left: var(--border-thick); box-shadow: -6px 0 0 #000; display: flex; flex-direction: column; }
|
|
354
|
+
.pd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--primary); border-bottom: var(--border-thick); }
|
|
355
|
+
.pd-name { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 18px; word-break: break-all; }
|
|
356
|
+
.pd-type { font-size: 12px; font-weight: 600; color: var(--text-dim); margin-top: 2px; }
|
|
357
|
+
.pd-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
|
|
358
|
+
.pd-state { border: var(--border-thin); box-shadow: 3px 3px 0 #000; background: #fff; padding: 10px 12px; }
|
|
359
|
+
.pd-state.is-current { border-color: var(--accent-blue); box-shadow: 3px 3px 0 var(--accent-blue); }
|
|
360
|
+
.pd-state-name { font-weight: 800; font-size: 13px; margin-bottom: 8px; }
|
|
361
|
+
.pd-state.is-current .pd-state-name::after { content: ' ◀ 当前'; color: var(--accent-blue); font-size: 11px; }
|
|
362
|
+
.pd-state-val { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; word-break: break-all; }
|
|
363
|
+
.pd-state-val .color-preview { width: 32px; height: 32px; }
|
|
364
|
+
.pd-state-val .img-thumb { width: 40px; height: 40px; }
|
|
365
|
+
.pd-ghost-tag { font-size: 11px; font-weight: 700; color: var(--text-dim); border: var(--border-thin); padding: 1px 6px; }
|
|
366
|
+
.ctrl-list { display: flex; flex-direction: column; gap: 8px; max-width: 360px; margin: 0 auto; }
|
|
367
|
+
.ctrl-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border: var(--border-thin); box-shadow: 2px 2px 0 #000; }
|
|
368
|
+
.ctrl-name { font-weight: 700; }
|
|
369
|
+
|
|
370
|
+
/* ====================================================
|
|
371
|
+
联动关系图 (支柱 B)
|
|
372
|
+
==================================================== */
|
|
373
|
+
#view-bindings { padding: 14px; gap: 14px; overflow: auto; }
|
|
374
|
+
.bindings-form {
|
|
375
|
+
flex: 0 0 auto;
|
|
376
|
+
display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
|
|
377
|
+
padding: 12px 14px; background: var(--bg-card);
|
|
378
|
+
border: var(--border-thick); box-shadow: var(--shadow-hard);
|
|
379
|
+
}
|
|
380
|
+
.bind-sep { font-weight: 700; font-size: 12px; color: var(--text-dim); }
|
|
381
|
+
.bindings-graph { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
|
|
382
|
+
.bind-group-cap {
|
|
383
|
+
font-family: 'Syne', sans-serif; font-weight: 800; font-size: 13px; text-transform: uppercase;
|
|
384
|
+
padding: 6px 10px; background: var(--accent-blue); color: #fff; border: var(--border-thin);
|
|
385
|
+
box-shadow: 2px 2px 0 #000; align-self: flex-start;
|
|
386
|
+
}
|
|
387
|
+
.bind-edge {
|
|
388
|
+
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
|
|
389
|
+
padding: 12px 14px; background: var(--bg-card);
|
|
390
|
+
border: var(--border-thick); box-shadow: var(--shadow-hard);
|
|
391
|
+
}
|
|
392
|
+
.bind-edge:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard-lg); transition: var(--transition); }
|
|
393
|
+
.bind-node {
|
|
394
|
+
display: inline-flex; flex-direction: column; gap: 2px;
|
|
395
|
+
padding: 6px 12px; border: var(--border-thin); box-shadow: 2px 2px 0 #000;
|
|
396
|
+
}
|
|
397
|
+
.bind-node.bind-src { background: var(--primary); }
|
|
398
|
+
.bind-node.bind-tgt { background: var(--accent-green); }
|
|
399
|
+
.bind-node .bind-ctrl { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 13px; }
|
|
400
|
+
.bind-node .bind-state { font-size: 11px; font-weight: 700; }
|
|
401
|
+
.bind-arrow { font-family: 'Space Grotesk'; font-weight: 700; font-size: 18px; }
|
|
402
|
+
.bind-edge.broken .bind-tgt { background: var(--accent-pink); }
|
|
403
|
+
.btn-del-binding { margin-left: auto; }
|
|
404
|
+
|
|
405
|
+
/* ====================================================
|
|
406
|
+
回收站 (侧栏可折叠) + 危险按钮 + 自定义确认弹窗
|
|
407
|
+
==================================================== */
|
|
408
|
+
.btn-danger { background: var(--accent-pink); color: #000; }
|
|
409
|
+
.btn-danger:hover:not(:disabled) { background: var(--accent-pink); }
|
|
410
|
+
|
|
411
|
+
.recycle-bin { flex: 0 0 auto; border-top: var(--border-thin); display: flex; flex-direction: column; max-height: 45%; }
|
|
412
|
+
.recycle-bin.locked { opacity: .7; pointer-events: none; }
|
|
413
|
+
.bin-header { display: flex; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer; font-weight: 700; background: var(--bg-card); user-select: none; }
|
|
414
|
+
.bin-header:hover { background: var(--primary); }
|
|
415
|
+
.bin-caret { font-size: 11px; transition: var(--transition); }
|
|
416
|
+
.recycle-bin:not(.is-collapsed) .bin-caret { transform: rotate(90deg); }
|
|
417
|
+
.bin-title { flex: 1; font-size: 12px; }
|
|
418
|
+
.bin-count { font-size: 11px; font-weight: 800; min-width: 18px; text-align: center; padding: 1px 5px; background: var(--accent-pink); border: var(--border-thin); box-shadow: 1px 1px 0 #000; }
|
|
419
|
+
.bin-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
|
|
420
|
+
.recycle-bin.is-collapsed .bin-body { display: none; }
|
|
421
|
+
.bin-item { display: flex; align-items: center; gap: 6px; padding: 6px; background: #fff; border: var(--border-thin); box-shadow: 2px 2px 0 #000; }
|
|
422
|
+
.bin-meta { flex: 1; min-width: 0; }
|
|
423
|
+
.bin-name { font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
424
|
+
.bin-sub { font-size: 10px; color: var(--text-dim); }
|
|
425
|
+
.btn-bin-restore, .btn-bin-purge { flex: 0 0 auto; }
|
|
426
|
+
|
|
427
|
+
/* 自定义确认弹窗 (居中模态, 不可恢复操作专用) */
|
|
428
|
+
.confirm-modal { position: fixed; inset: 0; z-index: 200; }
|
|
429
|
+
.cm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
|
|
430
|
+
.cm-dialog { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 360px; max-width: 88vw; background: var(--bg-main); border: var(--border-thick); box-shadow: var(--shadow-hard-lg); display: flex; flex-direction: column; }
|
|
431
|
+
.cm-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--accent-pink); border-bottom: var(--border-thick); }
|
|
432
|
+
.cm-icon { font-size: 18px; }
|
|
433
|
+
.cm-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 16px; }
|
|
434
|
+
.cm-body { padding: 16px; font-size: 13px; font-weight: 600; line-height: 1.5; }
|
|
435
|
+
.cm-body b { color: var(--accent-pink); }
|
|
436
|
+
.cm-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 16px 16px; }
|
|
437
|
+
|
|
438
|
+
/* ====================================================
|
|
439
|
+
回收态只读预览 (横幅 + 预览按钮态)
|
|
440
|
+
==================================================== */
|
|
441
|
+
.preview-banner {
|
|
442
|
+
display: flex; align-items: center; gap: 10px;
|
|
443
|
+
padding: 8px 12px; margin-bottom: 4px;
|
|
444
|
+
background: var(--accent-blue); color: #fff;
|
|
445
|
+
border: var(--border-thick); box-shadow: var(--shadow-hard);
|
|
446
|
+
font-weight: 700;
|
|
447
|
+
}
|
|
448
|
+
.preview-banner .pv-icon { font-size: 18px; }
|
|
449
|
+
.preview-banner .pv-text { font-size: 13px; }
|
|
450
|
+
.preview-banner .pv-text b { color: var(--primary); }
|
|
451
|
+
.preview-banner .pv-spacer { flex: 1; }
|
|
452
|
+
.btn-primary { background: var(--accent-green); }
|
|
453
|
+
.bin-item .btn-bin-preview { flex: 0 0 auto; padding: 3px 7px; }
|
|
454
|
+
.bin-item .btn-bin-preview.is-active { background: var(--accent-blue); color: #fff; }
|