@robosystems/core 0.13.5 → 0.13.6

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.
@@ -369,7 +369,7 @@ export function getGraphExampleKind(graph, preferredKind) {
369
369
  }
370
370
  /** Merge an app's branding with the example set for the given graph. */
371
371
  export function buildGraphAwareConsoleConfig(graph, branding) {
372
- var _a, _b, _c;
372
+ var _a, _b, _c, _d;
373
373
  const kind = getGraphExampleKind(graph, branding.preferredKind);
374
374
  const set = EXAMPLE_SETS[kind];
375
375
  const isRepository = (_a = graph === null || graph === void 0 ? void 0 : graph.isRepository) !== null && _a !== void 0 ? _a : false;
@@ -404,8 +404,10 @@ export function buildGraphAwareConsoleConfig(graph, branding) {
404
404
  noSelectionError: (_c = branding.noSelectionError) !== null && _c !== void 0 ? _c : 'No graph selected. Please select a graph first.',
405
405
  // Semantic memory is per-user-graph; shared repositories reject it.
406
406
  enableRecall: !isRepository,
407
- // Writes need a user graph; the API also checks the write role.
408
- enableAuthor: !isRepository,
407
+ // Writes need a user graph and a role above viewer, which is read-only.
408
+ // The API checks the write role either way; this keeps a viewer from
409
+ // being offered /do only to be refused.
410
+ enableAuthor: !isRepository && ((_d = graph === null || graph === void 0 ? void 0 : graph.role) === null || _d === void 0 ? void 0 : _d.toLowerCase()) !== 'viewer',
409
411
  };
410
412
  }
411
413
  /**
@@ -422,6 +424,7 @@ export function useGraphAwareConsoleConfig(branding) {
422
424
  currentGraph === null || currentGraph === void 0 ? void 0 : currentGraph.repositoryType,
423
425
  currentGraph === null || currentGraph === void 0 ? void 0 : currentGraph.schemaExtensions,
424
426
  currentGraph === null || currentGraph === void 0 ? void 0 : currentGraph.graphName,
427
+ currentGraph === null || currentGraph === void 0 ? void 0 : currentGraph.role,
425
428
  branding,
426
429
  ]);
427
430
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robosystems/core",
3
- "version": "0.13.5",
3
+ "version": "0.13.6",
4
4
  "description": "Shared RoboSystems frontend core library (auth, contexts, task monitoring, UI components) for the RoboSystems Next.js apps",
5
5
  "license": "MIT",
6
6
  "private": false,