@open-feishu-card/schema 0.1.2 → 0.1.3
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.
|
@@ -5,6 +5,8 @@ import { z } from 'zod';
|
|
|
5
5
|
* - 表单容器示例中,进入 form 后交互推迟到 submit,这些组件可不写 behaviors。
|
|
6
6
|
*
|
|
7
7
|
* 因此:不在 form 内 → 必填;在 form 内(含 form 里的 column_set 等嵌套)→ 可选。
|
|
8
|
+
* 豁免:interactive_container 自带 disabled:true(纯视觉强调框,不可交互)时可省略——
|
|
9
|
+
* 官方组件库的强调框即此用法(白底 + 边框 + 圆角 + disabled,无 behaviors)。
|
|
8
10
|
*
|
|
9
11
|
* @see https://open.feishu.cn/document/feishu-cards/card-json-v2-components/containers/form-container
|
|
10
12
|
* @see https://open.feishu.cn/document/feishu-cards/configuring-card-interactions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behaviors-context.d.ts","sourceRoot":"","sources":["../../src/common/behaviors-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"behaviors-context.d.ts","sourceRoot":"","sources":["../../src/common/behaviors-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AAEH,yCAAyC;AACzC,eAAO,MAAM,+BAA+B,aAW1C,CAAC;AAUH;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,CAAC,CAAC,aAAa,GACnB,IAAI,CAON"}
|
package/dist/index.cjs
CHANGED
|
@@ -2186,7 +2186,8 @@ function walkNode(node, path, inForm, ctx) {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
return;
|
|
2188
2188
|
}
|
|
2189
|
-
if (BEHAVIORS_REQUIRED_OUTSIDE_FORM.has(tag) && !inForm && !hasBehaviorsArray(node)
|
|
2189
|
+
if (BEHAVIORS_REQUIRED_OUTSIDE_FORM.has(tag) && !inForm && !hasBehaviorsArray(node) && // disabled 的纯视觉 interactive_container 不承载交互,豁免(对齐官方组件库强调框写法)
|
|
2190
|
+
!(tag === "interactive_container" && node.disabled === true)) {
|
|
2190
2191
|
ctx.addIssue({
|
|
2191
2192
|
code: "custom",
|
|
2192
2193
|
path: [...path, "behaviors"],
|
package/dist/index.js
CHANGED
|
@@ -2184,7 +2184,8 @@ function walkNode(node, path, inForm, ctx) {
|
|
|
2184
2184
|
}
|
|
2185
2185
|
return;
|
|
2186
2186
|
}
|
|
2187
|
-
if (BEHAVIORS_REQUIRED_OUTSIDE_FORM.has(tag) && !inForm && !hasBehaviorsArray(node)
|
|
2187
|
+
if (BEHAVIORS_REQUIRED_OUTSIDE_FORM.has(tag) && !inForm && !hasBehaviorsArray(node) && // disabled 的纯视觉 interactive_container 不承载交互,豁免(对齐官方组件库强调框写法)
|
|
2188
|
+
!(tag === "interactive_container" && node.disabled === true)) {
|
|
2188
2189
|
ctx.addIssue({
|
|
2189
2190
|
code: "custom",
|
|
2190
2191
|
path: [...path, "behaviors"],
|