@microvac/plugin-task-routing 0.1.0-rc.33 → 0.1.0-rc.35
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 +1 -1
- package/package.json +1 -1
- package/src/client.tsx +3 -2
package/lib/client.js
CHANGED
|
@@ -252,7 +252,7 @@ var name = "@microvac/plugin-task-routing";
|
|
|
252
252
|
var inject = ["slots"];
|
|
253
253
|
var PLUGIN_SETTINGS_SLOT = "microvac.plugin-settings";
|
|
254
254
|
function SettingsOccupant(props) {
|
|
255
|
-
return props.
|
|
255
|
+
return props.context?.pluginName === name ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TaskRoutingSettingsPanel, {}) : null;
|
|
256
256
|
}
|
|
257
257
|
function apply(ctx) {
|
|
258
258
|
ctx.effect(() => ctx.slots.register({ name: PLUGIN_SETTINGS_SLOT, id: name }, SettingsOccupant), "task-routing: settings panel");
|
package/package.json
CHANGED
package/src/client.tsx
CHANGED
|
@@ -12,8 +12,9 @@ export const inject = ["slots"];
|
|
|
12
12
|
/** `MICROVAC_PLUGIN_SETTINGS_SLOT` in `@paperclipai/shared`. */
|
|
13
13
|
export const PLUGIN_SETTINGS_SLOT = "microvac.plugin-settings";
|
|
14
14
|
|
|
15
|
+
/** Owner props the renderer spreads on the occupant (`MicrovacSlotHost` context). */
|
|
15
16
|
interface SlotOwner {
|
|
16
|
-
|
|
17
|
+
context?: { pluginName?: string };
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
interface TaskRoutingContext {
|
|
@@ -25,7 +26,7 @@ interface TaskRoutingContext {
|
|
|
25
26
|
|
|
26
27
|
/** Renders the panel only under this plugin's own entry. */
|
|
27
28
|
export function SettingsOccupant(props: SlotOwner) {
|
|
28
|
-
return props.
|
|
29
|
+
return props.context?.pluginName === name ? <TaskRoutingSettingsPanel /> : null;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/** The settings slot is a list: each occupant needs its own id. */
|