node-karin 1.16.2 → 1.16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # 更新日志
2
2
 
3
+ ## [1.16.3](https://github.com/KarinJS/Karin/compare/core-v1.16.2...core-v1.16.3) (2026-07-07)
4
+
5
+
6
+ ### 🐛 Bug Fixes
7
+
8
+ * web配置组件,手风琴子项内部分配置组件无法正常渲染嵌套字段 ([#664](https://github.com/KarinJS/Karin/issues/664)) ([03ff932](https://github.com/KarinJS/Karin/commit/03ff932e9f901e4a95cbb08b4ebc34aad9051215))
9
+
3
10
  ## [1.16.2](https://github.com/KarinJS/Karin/compare/core-v1.16.1...core-v1.16.2) (2026-07-04)
4
11
 
5
12
 
@@ -207960,15 +207960,18 @@ var import_react$70, import_jsx_runtime$53, createSwitch;
207960
207960
  var init_switchs = __esmMin((() => {
207961
207961
  init_dist$39();
207962
207962
  init_utils$21();
207963
+ init_index_esm();
207963
207964
  import_react$70 = /* @__PURE__ */ __toESM$1(require_react(), 1);
207964
207965
  import_jsx_runtime$53 = require_jsx_runtime();
207965
- createSwitch = (props, register) => {
207966
+ createSwitch = (props, control, basePath) => {
207966
207967
  const { componentType: _, key, className, componentClassName, defaultSelected, isDisabled, ...options } = props;
207968
+ const name = basePath ? `${basePath}.${key}.value` : `${key}.value`;
207967
207969
  const [isDescriptionExpanded, setIsDescriptionExpanded] = (0, import_react$70.useState)(false);
207968
207970
  const handleContainerClick = (e) => {
207969
207971
  if (isDisabled) return;
207970
207972
  if (e.target.closest(".description-area")) return;
207971
- document.querySelector(`[data-switch-key="${key}"]`)?.click();
207973
+ if (e.target.closest(".switch-control-area")) return;
207974
+ document.querySelector(`[data-switch-key="${name}"]`)?.click();
207972
207975
  };
207973
207976
  const handleDescriptionClick = (e) => {
207974
207977
  e.stopPropagation();
@@ -207996,15 +207999,23 @@ var init_switchs = __esmMin((() => {
207996
207999
  })]
207997
208000
  })]
207998
208001
  }), /* @__PURE__ */ (0, import_jsx_runtime$53.jsx)("div", {
207999
- className: "absolute right-3 top-1/2 -translate-y-1/2 sm:right-4",
208000
- children: /* @__PURE__ */ (0, import_jsx_runtime$53.jsx)(switch_default, {
208001
- ...options,
208002
- isDisabled,
208003
- "data-switch-key": key,
208004
- className: cn$3(isDisabled ? "cursor-not-allowed" : "cursor-pointer", `data-[selected=true]:border-${options.color || "primary"}`, componentClassName),
208005
- defaultSelected: defaultSelected ?? false,
208006
- ...register(`${key}.value`)
208007
- }, key)
208002
+ className: "switch-control-area absolute right-3 top-1/2 -translate-y-1/2 sm:right-4",
208003
+ children: /* @__PURE__ */ (0, import_jsx_runtime$53.jsx)(Controller, {
208004
+ name,
208005
+ control,
208006
+ defaultValue: defaultSelected ?? false,
208007
+ render: ({ field: { value, onChange, onBlur, name, ref } }) => /* @__PURE__ */ (0, import_jsx_runtime$53.jsx)(switch_default, {
208008
+ ...options,
208009
+ isDisabled,
208010
+ "data-switch-key": name,
208011
+ className: cn$3(isDisabled ? "cursor-not-allowed" : "cursor-pointer", `data-[selected=true]:border-${options.color || "primary"}`, componentClassName),
208012
+ isSelected: value === true,
208013
+ onValueChange: onChange,
208014
+ onBlur,
208015
+ name,
208016
+ ref
208017
+ }, key)
208018
+ })
208008
208019
  })]
208009
208020
  })
208010
208021
  }, key);
@@ -212224,7 +212235,7 @@ var init_render = __esmMin((() => {
212224
212235
  return;
212225
212236
  }
212226
212237
  if (option.componentType === "switch") {
212227
- list.push(createSwitch(option, register));
212238
+ list.push(createSwitch(option, control, basePath));
212228
212239
  return;
212229
212240
  }
212230
212241
  if (option.componentType === "radio-group") {
@@ -14,7 +14,7 @@
14
14
  content="viewport-fit=cover, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
15
15
  name="viewport" />
16
16
  <link href="/web/assets/ico/favicon-BoqZd694.ico" rel="icon" />
17
- <script type="module" crossorigin src="/web/assets/js/entry-DHm9nPtI.js"></script>
17
+ <script type="module" crossorigin src="/web/assets/js/entry-CR8PMgCV.js"></script>
18
18
  <link rel="stylesheet" crossorigin href="/web/assets/css/style-CBB8wM_W.css">
19
19
  </head>
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "1.16.2",
3
+ "version": "1.16.3",
4
4
  "description": "Lightweight, efficient, concise, and stable robot framework.",
5
5
  "keywords": [
6
6
  "node",
@@ -177,7 +177,7 @@
177
177
  "access": "public",
178
178
  "registry": "https://registry.npmjs.org"
179
179
  },
180
- "time": "2026-06-28T02:07:01.215Z",
180
+ "time": "2026-07-07T03:26:08.299Z",
181
181
  "scripts": {
182
182
  ".": "pnpm app",
183
183
  "app": "node dist/start/index.mjs",