@gen3/workspaces 0.12.48 → 0.12.49

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.
Files changed (28) hide show
  1. package/dist/dts/components/CompactDictionaryPanel/CompactDictionaryPanel.d.ts.map +1 -1
  2. package/dist/dts/components/CompactDictionaryPanel/CompactDictionaryPanel.js +2 -2
  3. package/dist/dts/components/CompactDictionaryPanel/CompactDictionaryPanel.js.map +1 -1
  4. package/dist/dts/components/CompactDictionaryPanel/data/large_dictionary.d.ts +11168 -0
  5. package/dist/dts/components/CompactDictionaryPanel/data/large_dictionary.d.ts.map +1 -0
  6. package/dist/dts/components/CompactDictionaryPanel/data/large_dictionary.js +13055 -0
  7. package/dist/dts/components/CompactDictionaryPanel/data/large_dictionary.js.map +1 -0
  8. package/dist/dts/components/DataToolsPanel.js +1 -1
  9. package/dist/dts/components/DataToolsPanel.js.map +1 -1
  10. package/dist/dts/core/hatcheryApi.d.ts +20 -20
  11. package/dist/dts/core/jegGatewayApi.d.ts +8 -8
  12. package/dist/dts/core/kernelApi.d.ts +12 -12
  13. package/dist/dts/workspace/WorkspaceLayout/WorkspaceLayout.d.ts.map +1 -1
  14. package/dist/dts/workspace/WorkspaceLayout/WorkspaceLayout.js +16 -2
  15. package/dist/dts/workspace/WorkspaceLayout/WorkspaceLayout.js.map +1 -1
  16. package/dist/dts/workspace/WorkspaceLayout/WorkspaceToolbar.d.ts +2 -1
  17. package/dist/dts/workspace/WorkspaceLayout/WorkspaceToolbar.d.ts.map +1 -1
  18. package/dist/dts/workspace/WorkspaceLayout/WorkspaceToolbar.js +10 -5
  19. package/dist/dts/workspace/WorkspaceLayout/WorkspaceToolbar.js.map +1 -1
  20. package/dist/index/cjs/index.js +36 -22
  21. package/dist/index/cjs/index.js.map +1 -1
  22. package/dist/index/esm/index.js +38 -24
  23. package/dist/index/esm/index.js.map +1 -1
  24. package/package.json +4 -4
  25. package/dist/dts/api/utils.d.ts +0 -2
  26. package/dist/dts/api/utils.d.ts.map +0 -1
  27. package/dist/dts/api/utils.js +0 -13
  28. package/dist/dts/api/utils.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import React, { useCallback, useMemo, useState, useRef, useEffect, createContext, useImperativeHandle } from 'react';
2
+ import React, { useCallback, useMemo, useState, useRef, useEffect, createContext, useImperativeHandle, forwardRef } from 'react';
3
3
  import { mergeDefaultTailwindClassnames, ACTIVITY_CHANNEL, convertSecondsToMilliseconds, InfoRolloverButton, OverflowTooltippedLabel, PanelErrorBoundary, ProtectedContent, NavPageLayout, ContentSource, getNavPageLayoutPropsFromConfig } from '@gen3/frontend';
4
4
  import { Card, Stack, Badge, Text, List, Group, Tooltip, Button, LoadingOverlay, Alert, Loader, Divider, Select, ActionIcon, TextInput, Textarea, Table, Scroller, Tabs, Center } from '@mantine/core';
5
5
  import { Icon } from '@iconify-icon/react';
6
6
  import { GEN3_API, GEN3_WORKSPACE_API, gen3Api, useCoreSelector, selectJEGActiveWorkspaceStatus, useCoreDispatch, setJEGActiveWorkspaceStatus, WorkspaceStatus, setJEGRequestedWorkspaceStatus, RequestedWorkspaceStatus, setJEGActiveWorkspaceId, isFetchBaseQueryError, selectJEGRequestedWorkspaceStatus, selectJEGRequestedWorkspaceStatusTimestamp, isTimeGreaterThan, formatUptimeInMinutes, selectJEGKernelIds, removeManyJEGActiveKernels, upsertManyJEGActiveKernels, normalizeRtkError, selectAllJEGKernels, addJEGActiveKernel, selectWorkspaceTier, setWorkspaceTier, selectWorkspaceFullscreen, setWorkspaceFullscreen, useGetDictionaryFromUrlQuery, useUserAuth, GEN3_COMMONS_NAME } from '@gen3/core';
7
7
  import { useDeepCompareEffect } from 'use-deep-compare';
8
8
  import { notifications } from '@mantine/notifications';
9
- import { useElementSize, useDisclosure } from '@mantine/hooks';
9
+ import { useElementSize, useDisclosure, useResizeObserver } from '@mantine/hooks';
10
10
  import { IoSettingsSharp } from 'react-icons/io5';
11
11
  import { BsFillInfoCircleFill } from 'react-icons/bs';
12
12
  import { MdKeyboardArrowDown, MdKeyboardArrowRight } from 'react-icons/md';
@@ -2229,7 +2229,7 @@ const SettingsPanel = ({ showKernels, expanded, setExpanded, width = 380 })=>{
2229
2229
  });
2230
2230
  };
2231
2231
 
2232
- const WorkspaceToolbar = ({ toolbarConfiguration })=>{
2232
+ const WorkspaceToolbar = /*#__PURE__*/ forwardRef(({ toolbarConfiguration }, ref)=>{
2233
2233
  const workspaceTier = useCoreSelector((state)=>selectWorkspaceTier(state));
2234
2234
  const workspaceStatus = useCoreSelector((state)=>selectJEGActiveWorkspaceStatus(state));
2235
2235
  const isFullscreen = useCoreSelector((state)=>selectWorkspaceFullscreen(state));
@@ -2248,6 +2248,7 @@ const WorkspaceToolbar = ({ toolbarConfiguration })=>{
2248
2248
  const fullscreenLabel = isFullscreen ? 'Exit Fullscreen' : 'Fullscreen View';
2249
2249
  const statusLabel = workspaceStatus === WorkspaceStatus.NotFound ? 'Not Running' : workspaceStatus;
2250
2250
  return /*#__PURE__*/ jsxs("div", {
2251
+ ref: ref,
2251
2252
  role: "toolbar",
2252
2253
  "aria-label": "Workspace toolbar",
2253
2254
  className: "flex items-center justify-between px-4 border-b-2 border-base-lighter pb-4",
@@ -2361,7 +2362,8 @@ const WorkspaceToolbar = ({ toolbarConfiguration })=>{
2361
2362
  })
2362
2363
  ]
2363
2364
  });
2364
- };
2365
+ });
2366
+ WorkspaceToolbar.displayName = 'WorkspaceToolbar';
2365
2367
 
2366
2368
  // Streaming LLM client — OpenAI, Anthropic, Gemini, Ollama
2367
2369
  // All requests go directly from the browser to provider APIs (no backend proxy).
@@ -3553,7 +3555,7 @@ const CompactDictionaryPanel = ({ schemaUrl = '_dictionary/_all' })=>{
3553
3555
  }
3554
3556
  return /*#__PURE__*/ jsxs("div", {
3555
3557
  ref: ref,
3556
- className: "relative flex h-full flex-col gap-2 overflow-hidden bg-base-lightest p-2",
3558
+ className: "relative flex flex-col gap-2 bg-base-lightest p-2 h-full",
3557
3559
  children: [
3558
3560
  /*#__PURE__*/ jsx(LoadingOverlay, {
3559
3561
  visible: isFetching
@@ -3573,7 +3575,7 @@ const CompactDictionaryPanel = ({ schemaUrl = '_dictionary/_all' })=>{
3573
3575
  ]
3574
3576
  }),
3575
3577
  /*#__PURE__*/ jsx("div", {
3576
- className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto",
3578
+ className: "flex h-full flex-1 flex-col gap-0.5 overflow-y-auto",
3577
3579
  children: filtered.map((node)=>{
3578
3580
  const isExpanded = expandedId === node.id;
3579
3581
  const propCount = Object.keys(node.properties).length;
@@ -3611,18 +3613,12 @@ const CompactDictionaryPanel = ({ schemaUrl = '_dictionary/_all' })=>{
3611
3613
  })
3612
3614
  ]
3613
3615
  }),
3614
- isNarrow && /*#__PURE__*/ jsxs("div", {
3616
+ isNarrow && /*#__PURE__*/ jsx("div", {
3615
3617
  className: "flex w-full items-center justify-between pl-5 pt-0.5",
3616
- children: [
3617
- node.category && /*#__PURE__*/ jsx("span", {
3618
- className: "truncate text-xs text-base-darker",
3619
- children: node.category
3620
- }),
3621
- /*#__PURE__*/ jsx(FieldLinkCountBadge, {
3622
- fieldsCount: propCount,
3623
- linksCount: linkCount
3624
- })
3625
- ]
3618
+ children: node.category && /*#__PURE__*/ jsx("span", {
3619
+ className: "truncate text-xs text-base-darker",
3620
+ children: node.category
3621
+ })
3626
3622
  })
3627
3623
  ]
3628
3624
  }),
@@ -3753,12 +3749,12 @@ const TABS = [
3753
3749
  ];
3754
3750
  const DataToolsPanel = ({ schemaUrl = DEFAULT_DICTIONARY_SCHEMA_URL, kbUrl })=>{
3755
3751
  return /*#__PURE__*/ jsx("div", {
3756
- className: "flex shrink-0",
3752
+ className: "flex flex-col h-full",
3757
3753
  children: /*#__PURE__*/ jsxs(Tabs, {
3758
3754
  defaultValue: "dictionary",
3759
3755
  variant: "outline",
3760
3756
  classNames: {
3761
- root: 'p-2'
3757
+ root: 'flex flex-col p-2'
3762
3758
  },
3763
3759
  keepMounted: true,
3764
3760
  children: [
@@ -3771,7 +3767,7 @@ const DataToolsPanel = ({ schemaUrl = DEFAULT_DICTIONARY_SCHEMA_URL, kbUrl })=>{
3771
3767
  }, tab.id))
3772
3768
  }),
3773
3769
  /*#__PURE__*/ jsx("div", {
3774
- className: "min-h-0 flex-1 overflow-hidden pt-4",
3770
+ className: "flex-1 min-h-0 h-full pt-4",
3775
3771
  children: /*#__PURE__*/ jsxs(PanelErrorBoundary, {
3776
3772
  children: [
3777
3773
  /*#__PURE__*/ jsx(Tabs.Panel, {
@@ -3809,26 +3805,44 @@ const WorkspaceLayout = ({ children, tierConfiguration })=>{
3809
3805
  const workspaceTier = useCoreSelector((state)=>selectWorkspaceTier(state));
3810
3806
  const [toolsExpanded, { set: setToolsExpanded }] = useDisclosure(true);
3811
3807
  const [settingsExpanded, { set: setSettingsExpanded }] = useDisclosure(true);
3808
+ const [toolbarRef, toolbarRect] = useResizeObserver();
3812
3809
  const isFullScreen = useCoreSelector((state)=>selectWorkspaceFullscreen(state));
3810
+ useEffect(()=>{
3811
+ if (isFullScreen) {
3812
+ setToolsExpanded(false);
3813
+ setSettingsExpanded(false);
3814
+ } else {
3815
+ setToolsExpanded(true);
3816
+ setSettingsExpanded(true);
3817
+ }
3818
+ }, [
3819
+ isFullScreen,
3820
+ setSettingsExpanded,
3821
+ setToolsExpanded
3822
+ ]);
3813
3823
  if (!workspaceTier) return null;
3814
3824
  return /*#__PURE__*/ jsxs("div", {
3815
3825
  className: "flex flex-col w-full grow",
3816
3826
  children: [
3817
3827
  /*#__PURE__*/ jsx(WorkspaceToolbar, {
3818
- toolbarConfiguration: tierConfiguration.toolbar
3828
+ toolbarConfiguration: tierConfiguration.toolbar,
3829
+ ref: toolbarRef
3819
3830
  }),
3820
3831
  /*#__PURE__*/ jsxs("div", {
3821
- className: "flex w-full grow",
3832
+ className: "flex w-full nowrap",
3833
+ style: {
3834
+ height: `calc(100% - ${toolbarRect?.height ?? 0}px`
3835
+ },
3822
3836
  children: [
3823
3837
  tierConfiguration.dataAndTools.enabled && /*#__PURE__*/ jsx(ToolsPanel, {
3824
- expanded: toolsExpanded && !isFullScreen,
3838
+ expanded: toolsExpanded,
3825
3839
  setExpanded: setToolsExpanded,
3826
3840
  width: tierConfiguration.dataAndTools.width
3827
3841
  }),
3828
3842
  children,
3829
3843
  /*#__PURE__*/ jsx(SettingsPanel, {
3830
3844
  showKernels: tierConfiguration.settings.showKernels,
3831
- expanded: settingsExpanded && !isFullScreen,
3845
+ expanded: settingsExpanded,
3832
3846
  setExpanded: setSettingsExpanded,
3833
3847
  width: tierConfiguration.settings.width
3834
3848
  })