cardbuddy 0.7.0 → 0.8.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/README.md +21 -0
- package/dist/preview-editor/assets/index-BQKzMPBq.js +79 -0
- package/dist/preview-editor/assets/index-D3zp47Dg.css +1 -0
- package/dist/preview-editor/index.html +2 -2
- package/dist/server-core/codeBridge.js +359 -0
- package/dist/server-core/index.js +8 -2
- package/dist/standalone.js +18 -3
- package/dist/vendored/App.vue +17 -13
- package/dist/vendored/api.js +102 -32
- package/dist/vendored/components/ApiCallPanel.vue +13 -1
- package/dist/vendored/components/ApiPayloadTree.vue +34 -1
- package/dist/vendored/components/ComponentPalette.vue +45 -38
- package/dist/vendored/components/DebugPanel.vue +146 -39
- package/dist/vendored/components/EventEditor.vue +27 -3
- package/dist/vendored/components/LogValue.vue +2 -1
- package/dist/vendored/components/PropControl.vue +6 -2
- package/dist/vendored/components/setters/SetCode.vue +111 -3
- package/dist/vendored/styles/app.css +366 -82
- package/dist/vendored/styles/card-gallery.css +3 -2
- package/dist/vendored/styles/dropdown.css +3 -0
- package/dist/vendored/styles/node-inspector.css +176 -119
- package/dist/vendored/styles/setters.css +91 -2
- package/dist/vendored/styles/structure-tree.css +25 -12
- package/package.json +1 -1
- package/dist/preview-editor/assets/index-BlscexDE.js +0 -79
- package/dist/preview-editor/assets/index-dlbSPb5W.css +0 -1
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
background: var(--bg-input);
|
|
221
221
|
border-left: 1px solid var(--border);
|
|
222
222
|
color: var(--text-dim);
|
|
223
|
-
font-size:
|
|
223
|
+
font-size: 12px;
|
|
224
224
|
line-height: 1;
|
|
225
225
|
cursor: pointer;
|
|
226
226
|
user-select: none;
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
background: var(--accent);
|
|
310
310
|
}
|
|
311
311
|
.st-switch__text {
|
|
312
|
-
font-size:
|
|
312
|
+
font-size: 12px;
|
|
313
313
|
color: var(--text-dim);
|
|
314
314
|
}
|
|
315
315
|
|
|
@@ -763,12 +763,31 @@
|
|
|
763
763
|
/* --------------------------- 代码编辑器(SetCode) --------------------------- */
|
|
764
764
|
|
|
765
765
|
.st-code {
|
|
766
|
+
position: relative;
|
|
766
767
|
display: flex;
|
|
767
768
|
flex-direction: column;
|
|
768
769
|
gap: 4px;
|
|
769
770
|
min-width: 0;
|
|
770
771
|
}
|
|
771
772
|
|
|
773
|
+
/* 代码编辑器右上角语言标签:等宽小字 + 发丝线框的弱化标识,不挡交互 */
|
|
774
|
+
.st-code__lang {
|
|
775
|
+
position: absolute;
|
|
776
|
+
top: 6px;
|
|
777
|
+
right: 8px;
|
|
778
|
+
padding: 0 5px;
|
|
779
|
+
border: 1px solid var(--border);
|
|
780
|
+
border-radius: 4px;
|
|
781
|
+
background: var(--bg-bar);
|
|
782
|
+
color: var(--text-faint);
|
|
783
|
+
font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
|
|
784
|
+
font-size: 10px;
|
|
785
|
+
line-height: 16px;
|
|
786
|
+
letter-spacing: 0.4px;
|
|
787
|
+
pointer-events: none;
|
|
788
|
+
user-select: none;
|
|
789
|
+
}
|
|
790
|
+
|
|
772
791
|
.st-code__editor {
|
|
773
792
|
min-height: 140px;
|
|
774
793
|
max-height: 340px;
|
|
@@ -796,6 +815,76 @@
|
|
|
796
815
|
pointer-events: none;
|
|
797
816
|
}
|
|
798
817
|
|
|
818
|
+
/* 桥接期间只读:边框着淡 accent 提示「外部编辑中」,不用 opacity 压暗(与 disabled 区分) */
|
|
819
|
+
.st-code__editor.is-bridged {
|
|
820
|
+
border-color: var(--accent-border);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/* 底栏右侧动作组:VSCode 桥接按钮 + 同步徽标(与左侧行数 hint 两端对齐) */
|
|
824
|
+
.st-code__foot-actions {
|
|
825
|
+
flex: 0 0 auto;
|
|
826
|
+
margin-left: auto;
|
|
827
|
+
display: inline-flex;
|
|
828
|
+
align-items: center;
|
|
829
|
+
gap: 8px;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.st-code__bridge-tag {
|
|
833
|
+
font-size: 11px;
|
|
834
|
+
color: var(--accent);
|
|
835
|
+
white-space: nowrap;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/* 文字+图标弱按钮:与 .ee-help / 面板关闭按钮同一语言(22px 高、无边框、hover 浅底) */
|
|
839
|
+
.st-code__vscode {
|
|
840
|
+
flex: 0 0 auto;
|
|
841
|
+
height: 22px;
|
|
842
|
+
display: inline-flex;
|
|
843
|
+
align-items: center;
|
|
844
|
+
justify-content: center;
|
|
845
|
+
gap: 4px;
|
|
846
|
+
padding: 0 5px;
|
|
847
|
+
background: none;
|
|
848
|
+
border: none;
|
|
849
|
+
border-radius: 6px;
|
|
850
|
+
color: var(--text-faint);
|
|
851
|
+
font-size: 11px;
|
|
852
|
+
line-height: normal;
|
|
853
|
+
white-space: nowrap;
|
|
854
|
+
cursor: pointer;
|
|
855
|
+
transition: color 0.15s, background 0.15s;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.st-code__vscode-label {
|
|
859
|
+
font-size: 11px;
|
|
860
|
+
line-height: normal;
|
|
861
|
+
letter-spacing: 0.2px;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.st-code__vscode:hover {
|
|
865
|
+
color: var(--text);
|
|
866
|
+
background: var(--bg-hover);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.st-code__vscode.is-on {
|
|
870
|
+
color: var(--accent);
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.st-code__vscode.is-on:hover {
|
|
874
|
+
background: var(--accent-soft);
|
|
875
|
+
color: var(--accent);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.st-code__vscode:disabled {
|
|
879
|
+
opacity: 0.5;
|
|
880
|
+
cursor: not-allowed;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
.st-code__vscode svg {
|
|
884
|
+
display: block;
|
|
885
|
+
fill: currentColor;
|
|
886
|
+
}
|
|
887
|
+
|
|
799
888
|
.st-code__foot {
|
|
800
889
|
display: flex;
|
|
801
890
|
align-items: center;
|
|
@@ -115,14 +115,21 @@
|
|
|
115
115
|
border-radius: 50%;
|
|
116
116
|
cursor: pointer;
|
|
117
117
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
|
|
118
|
-
transition: background 0.15s, color 0.15s, border-color 0.15s
|
|
118
|
+
transition: background 0.15s, color 0.15s, border-color 0.15s;
|
|
119
|
+
}
|
|
120
|
+
.st__help svg {
|
|
121
|
+
transition: transform 0.05s;
|
|
119
122
|
}
|
|
120
123
|
.st__help:hover {
|
|
121
124
|
background: var(--bg-hover);
|
|
122
125
|
border-color: var(--accent-border);
|
|
123
126
|
color: var(--accent);
|
|
124
127
|
}
|
|
125
|
-
|
|
128
|
+
/* 按压反馈下移到内部图标:按钮本身是零高度 sticky 容器内的绝对定位元素,
|
|
129
|
+
其 transform 会按 sticky 未吸附时的静态位置(即内容最底部)计入 .debug__body
|
|
130
|
+
的可滚动溢出,按下时多出 1px 溢出导致面板主体闪现滚动条;图标在 28px 按钮内
|
|
131
|
+
上下各有 6px 余量,1px 位移不会外溢。 */
|
|
132
|
+
.st__help:active svg {
|
|
126
133
|
transform: translateY(1px);
|
|
127
134
|
}
|
|
128
135
|
/* 气泡展开时按钮保持激活态配色 */
|
|
@@ -346,30 +353,36 @@
|
|
|
346
353
|
margin-left: auto;
|
|
347
354
|
padding: 0 6px;
|
|
348
355
|
font-size: 11px;
|
|
349
|
-
line-height:
|
|
350
|
-
|
|
351
|
-
background: var(--st-badge-bg);
|
|
356
|
+
line-height: 16px;
|
|
357
|
+
border: 1px solid transparent;
|
|
352
358
|
border-radius: var(--radius-xs);
|
|
353
359
|
}
|
|
354
360
|
|
|
361
|
+
/* 有事件:soft 语言(浅底 + 同色文字 + 发丝描边),与面板内分段 / 来源切换一致,
|
|
362
|
+
不再用实心蓝块;hover 仅提亮文字,不做缩放 / 透明度旧语言 */
|
|
355
363
|
.st__badge--clickable {
|
|
364
|
+
color: var(--accent);
|
|
365
|
+
background: var(--accent-soft);
|
|
366
|
+
border-color: var(--accent-border);
|
|
356
367
|
cursor: pointer;
|
|
357
|
-
transition:
|
|
368
|
+
transition: color 0.15s, background 0.15s, border-color 0.15s;
|
|
358
369
|
}
|
|
359
370
|
.st__badge--clickable:hover {
|
|
360
|
-
|
|
361
|
-
transform: scale(1.05);
|
|
371
|
+
color: var(--accent-hover);
|
|
362
372
|
}
|
|
373
|
+
|
|
374
|
+
/* 无事件:透明底 + 发丝线框的弱标识 */
|
|
363
375
|
.st__badge--muted {
|
|
364
376
|
cursor: pointer;
|
|
365
|
-
background: var(--border-strong);
|
|
366
377
|
color: var(--text-faint);
|
|
367
|
-
|
|
368
|
-
|
|
378
|
+
background: transparent;
|
|
379
|
+
border-color: var(--border);
|
|
380
|
+
transition: opacity 0.15s, color 0.15s, background 0.15s, border-color 0.15s;
|
|
369
381
|
}
|
|
370
382
|
.st__badge--muted:hover {
|
|
371
|
-
opacity: 1;
|
|
372
383
|
color: var(--text-dim);
|
|
384
|
+
background: var(--bg-hover);
|
|
385
|
+
border-color: var(--border-strong);
|
|
373
386
|
}
|
|
374
387
|
|
|
375
388
|
/* 行最右侧「齿轮」:打开节点属性面板(替代原双击行为)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cardbuddy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Local dev service for the CardBuddy card editor — decouples card CRUD (sync/save/validate/render-status/screenshot) from the static public editor, so the editor can be deployed to any static host while each developer runs a local service against their own card source.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|