@open-feishu-card/renderer 0.2.25 → 0.2.27

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/dist/styles.css CHANGED
@@ -198,8 +198,6 @@
198
198
  .universal-card-header {
199
199
  width: 100%;
200
200
  overflow: hidden;
201
- border-top-left-radius: 8px;
202
- border-top-right-radius: 8px;
203
201
  }
204
202
  .universal-card-header__bg {
205
203
  box-sizing: border-box;
@@ -333,7 +331,7 @@
333
331
  line-height: 22px;
334
332
  }
335
333
 
336
- /* ---- div / note ---- */
334
+ /* ---- div ---- */
337
335
  .universal-card-div > * + * { margin-top: 8px; }
338
336
  /* div 带前置图标:icon 在左、文本在右排成一行(复刻网页版 .universal-card-div 布局) */
339
337
  .universal-card-div--with-icon {
@@ -345,10 +343,6 @@
345
343
  display: flex; align-items: center; overflow: hidden;
346
344
  }
347
345
  .universal-card-div__content { flex: 1; min-width: 0; }
348
- .universal-card-note {
349
- font-size: 12px;
350
- color: #8f959e;
351
- }
352
346
 
353
347
  /* ---- 布局:column_set / column ---- */
354
348
  .universal-card-column-set { display: flex; }
@@ -377,6 +371,7 @@
377
371
  display: inline-flex; align-items: center; justify-content: center;
378
372
  gap: 4px;
379
373
  min-height: 28px; padding: 4px 12px;
374
+ font-family: inherit;
380
375
  font-size: 14px; line-height: 22px; border-radius: 6px;
381
376
  border: 1px solid transparent; background: transparent; color: #1f2329;
382
377
  cursor: pointer; text-decoration: none; box-sizing: border-box;
@@ -389,14 +384,9 @@
389
384
  flex-shrink: 0; height: 1.2em; color: inherit;
390
385
  }
391
386
  .universal-card-button__icon .universal-card-icon { color: inherit; }
392
- /* default 宽度:按内容收缩。列是 flex column(默认 align-items:stretch),
393
- body 又有 > * { width:100% },不加这两条会被撑满所在列。 */
394
- .universal-card-button:not(.universal-card-button--block) {
395
- width: auto;
396
- max-width: 100%;
397
- align-self: flex-start;
398
- }
399
- /* fill(width:"fill"):撑满所在列 */
387
+ /* 宽度:对齐真机——body > * { width:100% }、列 flex stretch 会把按钮撑满所在行/列。
388
+ 不再强制 width:auto(那是网页版观感;真机独立成行的按钮默认占满整行)。
389
+ width:"fill" 显式挂 --block,与缺省撑满同宽,并供 margin calc 识别。 */
400
390
  .universal-card-button--block { width: 100%; }
401
391
 
402
392
  /* —— outlined 描边族 —— */
@@ -418,11 +408,12 @@
418
408
  }
419
409
  .universal-card-button--danger:not(.universal-card-button--static):hover { background: #fef0f0; }
420
410
 
421
- /* —— text 纯文字族(无边框/无底色,按内容宽) —— */
411
+ /* —— text 纯文字族(无边框/无底色;撑满时文字靠左,对齐真机) —— */
422
412
  .universal-card-button--text,
423
413
  .universal-card-button--primary_text,
424
414
  .universal-card-button--danger_text {
425
415
  border-color: transparent; background: transparent; padding: 4px 8px;
416
+ justify-content: flex-start;
426
417
  }
427
418
  .universal-card-button--text { color: #1f2329; }
428
419
  .universal-card-button--primary_text { color: #1456f0; }
@@ -455,17 +446,19 @@
455
446
  /* ---- 表单(预览:仅透传,无表单语义) ---- */
456
447
  .universal-card-form { display: flex; flex-direction: column; row-gap: 8px; }
457
448
  .universal-card-form > * { width: 100%; }
458
- /* input / select 等输入控件:预览里渲染成只读静态框,展示 placeholder */
449
+ /* input / select:静态预览是只读框;interactive 去掉 --static,成为可输入控件 */
450
+ .universal-card-input,
459
451
  .universal-card-input--static {
460
452
  min-height: 32px; padding: 6px 12px; box-sizing: border-box;
461
- font-size: 14px; line-height: 20px; color: #8f959e;
462
- background: #f5f6f7; border: 1px solid #dee0e3; border-radius: 6px;
453
+ font-family: inherit; font-size: 14px; line-height: 20px;
454
+ background: #fff; border: 1px solid #dee0e3; border-radius: 6px;
455
+ color: #1f2329; width: 100%;
456
+ }
457
+ .universal-card-input--static {
458
+ color: #8f959e; background: #f5f6f7;
463
459
  cursor: default; pointer-events: none;
464
460
  }
465
461
 
466
- /* ---- action 容器 ---- */
467
- .universal-card-action { display: flex; flex-wrap: wrap; gap: 12px; }
468
-
469
462
  /* ---- checker 勾选器(对齐网页版 universal-card-checker) ---- */
470
463
  .universal-card-checker {
471
464
  display: flex; box-sizing: border-box; overflow: hidden; align-items: flex-start;
@@ -1056,4 +1049,3 @@
1056
1049
  }
1057
1050
  .universal-card-root.theme-dark .universal-card-markdown { color: #d6d6d6; }
1058
1051
  .universal-card-root.theme-dark .universal-card-hr { background-color: #2e2e30; }
1059
- .universal-card-root.theme-dark .universal-card-note { color: #8a8a8a; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-feishu-card/renderer",
3
- "version": "0.2.25",
3
+ "version": "0.2.27",
4
4
  "description": "零框架依赖的飞书卡片渲染引擎:Web / DOM / SSR,输入 RAW 或公开 DSL,输出真实 DOM 或 HTML 字符串",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -28,7 +28,7 @@
28
28
  "./dist/*.cjs"
29
29
  ],
30
30
  "dependencies": {
31
- "@open-feishu-card/adapter": "0.3.16"
31
+ "@open-feishu-card/adapter": "0.3.17"
32
32
  },
33
33
  "devDependencies": {
34
34
  "tsup": "^8.3.5",