@linxin666/dsh-client-ui-plugin-manager 0.3.22 → 0.3.23

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/lib/client.js CHANGED
@@ -1345,7 +1345,7 @@ window.__ModuleLoader__.load({
1345
1345
  /** The building package's version, when the bundle carries it. */
1346
1346
  function bakedVersion() {
1347
1347
  try {
1348
- return "0.3.22";
1348
+ return "0.3.23";
1349
1349
  } catch {
1350
1350
  return;
1351
1351
  }
package/lib/index.js CHANGED
@@ -324,15 +324,30 @@ function setRowEnabled(text, filename, id, name, enabled, baseEnabled = true) {
324
324
  insertRow.set("disabled", document.createNode(!enabled));
325
325
  return document.toString({ lineWidth: 0 }) + "\n";
326
326
  }
327
- const found = findBareRow(root, id);
327
+ let found = findBareRow(root, id);
328
+ let effBase = baseEnabled;
329
+ if (found === void 0 && name !== void 0) {
330
+ const byName = [];
331
+ root.items.forEach((item, index) => {
332
+ if (!isBareRow(item) || bareRowName(item) !== name || bareRowId(item) === void 0) return;
333
+ if (isMap(item)) byName.push({
334
+ row: item,
335
+ index
336
+ });
337
+ });
338
+ if (byName.length === 1) {
339
+ found = byName[0];
340
+ effBase = false;
341
+ }
342
+ }
328
343
  if (enabled) if (found === void 0) {
329
- if (baseEnabled) return text;
344
+ if (effBase) return text;
330
345
  root.items.push(document.createNode({
331
346
  id,
332
347
  name,
333
348
  disabled: false
334
349
  }));
335
- } else if (baseEnabled) root.items.splice(found.index, 1);
350
+ } else if (effBase) root.items.splice(found.index, 1);
336
351
  else found.row.set("disabled", document.createNode(false));
337
352
  else if (found !== void 0) found.row.set("disabled", document.createNode(true));
338
353
  else root.items.push(document.createNode({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linxin666/dsh-client-ui-plugin-manager",
3
3
  "description": "Plugin manager tab for the dsh web GUI Plugins settings section: installs plugins from npm or git through the official host channels, lists installed plugins with next-start enablement switches, surfaces install-time conflict actions with undo, and hands failures off to repair conversations.",
4
- "version": "0.3.22",
4
+ "version": "0.3.23",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/types/index.d.ts",