@unoverse-platform/studio 0.1.6 → 0.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unoverse-platform/studio",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "description": "Unoverse Studio: the local authoring app. Reads your own rx/ folder, no backend.",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ import { UnoverseComponent, type ResolvedTheme } from "@unoverse/sdk";
9
9
  import { client, authedFetch, hasSourceAccess } from "studio-host";
10
10
  import { SourceView } from "./SourceView";
11
11
  import { stateActivation } from "./states";
12
- import { usePersistentState, useRegistryToggles, ToggleSwitch } from "studio-host";
12
+ import { usePersistentState } from "studio-host";
13
13
 
14
14
  const CHAT_ID = "demo";
15
15
 
@@ -31,7 +31,8 @@ interface ComponentDef {
31
31
  whenToUse?: string;
32
32
  category?: string;
33
33
  /** Spatial-CAPABLE: the component folder carries a manifest.json (server-projected).
34
- * Only capable components show the Spatial toggle — a basic component shows nothing. */
34
+ * Capability, not activation: a capable component can be put on a workflow's map from
35
+ * Canvas's Content Library. It gates the Meta panel here, nothing more. */
35
36
  spatial?: boolean;
36
37
  props?: Record<string, PropDef>;
37
38
  /** The node's input prop keys, derived server-side (= the node's configSchema).
@@ -56,7 +57,6 @@ const VIEWPORTS: { id: string; label: string; w: number | null }[] = [
56
57
 
57
58
  export function ComponentsView({ theme, org = "all" }: { theme: ResolvedTheme; org?: string }) {
58
59
  const store = useMemo(() => new ComponentStore(), []);
59
- const spatial = useRegistryToggles("component");
60
60
  const [components, setComponents] = useState<ComponentDef[]>([]);
61
61
  const [selected, setSelected] = usePersistentState<string | null>("wb:components:selected", null);
62
62
  const [values, setValues] = useState<Record<string, unknown>>({}); // typed values → store/render
@@ -500,7 +500,11 @@ export function ComponentsView({ theme, org = "all" }: { theme: ResolvedTheme; o
500
500
  {/* Spatial toggle — ONLY for spatial-capable components (manifest.json present).
501
501
  Same two-level model as templates/skills: this is Level 1 (workbench
502
502
  eligibility); the Content Engine's per-workflow toggle is Level 2. */}
503
- {current?.spatial && <ToggleSwitch on={spatial.isEnabled(current.name)} onClick={() => spatial.toggle(current.name)} label="Spatial" />}
503
+ {/* NO SPATIAL TOGGLE HERE. It wrote `plugin_state.enabled`, which the spatial catalogue
504
+ deliberately IGNORES (`routeRegistrySpatial`): published IS available. What is actually
505
+ on a map is the PER-WORKFLOW row, switched in Canvas's Content Library — spatial is
506
+ unique to each workflow, and this screen has no workflow. A control that reads as the
507
+ answer to "is this in spatial?" while writing where nothing reads is worse than none. */}
504
508
  {current?.spatial && (
505
509
  <button
506
510
  onClick={() => setMetaOpen((o) => !o)}
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { useEffect, useState } from "react";
13
13
  import { fetchUnoverse } from "studio-host";
14
- import { usePersistentState, useRegistryToggles, ToggleSwitch } from "studio-host";
14
+ import { usePersistentState } from "studio-host";
15
15
  import { IdentityHeader } from "./IdentityHeader";
16
16
 
17
17
  interface SkillSummary {
@@ -37,7 +37,6 @@ export function SkillsView() {
37
37
  const [detail, setDetail] = useState<SkillDetail | null>(null);
38
38
  const [loadingDetail, setLoadingDetail] = useState(false);
39
39
  const [error, setError] = useState<string | null>(null);
40
- const spatial = useRegistryToggles("skill");
41
40
 
42
41
  // Load the library list once.
43
42
  useEffect(() => {
@@ -108,7 +107,6 @@ export function SkillsView() {
108
107
  }`}
109
108
  >
110
109
  <div className="flex items-center gap-1.5 text-sm font-medium">
111
- {spatial.isEnabled(s.name) && <span className="h-1.5 w-1.5 rounded-full bg-emerald-400" title="Spatial on" />}
112
110
  {s.name}
113
111
  </div>
114
112
  <div className="truncate text-[11px] text-gray-500">{s.description}</div>
@@ -130,9 +128,8 @@ export function SkillsView() {
130
128
  version={detail?.version}
131
129
  description={detail?.description}
132
130
  whenToUse={detail?.whenToUse}
133
- right={<ToggleSwitch on={spatial.isEnabled(selected)} onClick={() => spatial.toggle(selected)} label="Spatial" />}
134
131
  />
135
- <p className="mb-3 text-[11px] text-gray-500">When Spatial is on, this skill is embedded as-is into the spatial engine on the next train.</p>
132
+ <p className="mb-3 text-[11px] text-gray-500">Whether this skill is on a map is switched per workflow, in Canvas’s Content Library: spatial is unique to each workflow.</p>
136
133
 
137
134
  {detail?.triggers && detail.triggers.length > 0 && (
138
135
  <div className="mb-5 flex flex-wrap gap-1.5">
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
11
11
  import { useAuth } from "react-oidc-context";
12
- import { usePersistentState, useRegistryToggles, ToggleSwitch } from "studio-host";
12
+ import { usePersistentState } from "studio-host";
13
13
  import { ComponentStore } from "@unoverse/sdk";
14
14
  import { StreamedUnoverseTemplate, useUnoverseConnection, computeAppWidth, resolveActiveLayout, type ResolvedTheme, type UseVoiceServiceConfig } from "@unoverse/sdk";
15
15
  import { NativeAppHost } from "./NativeAppHost";
@@ -166,7 +166,6 @@ export function TemplatesView({
166
166
  useCallback((cb) => store.subscribe(cb), [store]),
167
167
  useCallback(() => store.getVersion(), [store]),
168
168
  );
169
- const spatial = useRegistryToggles("template");
170
169
  const [seeded, setSeeded] = useState<string[]>([]);
171
170
  const [metaOpen, setMetaOpen] = usePersistentState<boolean>("wb:templates:meta", false); // MCP details panel
172
171
  const [copiedUri, setCopiedUri] = useState(false);
@@ -636,7 +635,11 @@ export function TemplatesView({
636
635
  })}
637
636
  </div>
638
637
  )}
639
- {selected && <ToggleSwitch on={spatial.isEnabled(selected)} onClick={() => spatial.toggle(selected)} label="Spatial" />}
638
+ {/* NO SPATIAL TOGGLE HERE. It wrote `plugin_state.enabled`, which the spatial catalogue
639
+ deliberately IGNORES (`routeRegistrySpatial`): published IS available. What is actually
640
+ on a map is the PER-WORKFLOW row, switched in Canvas's Content Library — spatial is
641
+ unique to each workflow, and this screen has no workflow. A control that reads as the
642
+ answer to "is this in spatial?" while writing where nothing reads is worse than none. */}
640
643
  {selected && (
641
644
  <button
642
645
  onClick={() => setMetaOpen((o) => !o)}